@axhub/genie 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{App-BfaNALgf.js → App-Cay5kE3A.js} +2 -2
- package/dist/assets/{ReviewApp-DIT2yWk-.js → ReviewApp-Bp_y3xff.js} +1 -1
- package/dist/assets/{_basePickBy-Dz3NcIVK.js → _basePickBy-C5f221Kr.js} +1 -1
- package/dist/assets/{_baseUniq-DON_Sg7x.js → _baseUniq-CeEXFlBh.js} +1 -1
- package/dist/assets/{arc-Y4G80q-l.js → arc-CZVQXROF.js} +1 -1
- package/dist/assets/{architectureDiagram-2XIMDMQ5-D_qR4657.js → architectureDiagram-2XIMDMQ5-D91MBXeh.js} +1 -1
- package/dist/assets/{blockDiagram-WCTKOSBZ-NsmAlV5_.js → blockDiagram-WCTKOSBZ-CsHP3zT2.js} +1 -1
- package/dist/assets/{c4Diagram-IC4MRINW-cbOJM4yr.js → c4Diagram-IC4MRINW-DakKlk21.js} +1 -1
- package/dist/assets/channel-CnzaP2H9.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-bLBhl74J.js → chunk-4BX2VUAB-BXZoxrtv.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-D8kNkDUO.js → chunk-55IACEB6-V9_WXk3w.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-BjR6UbXB.js → chunk-FMBD7UC4-IgdHo6Dd.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-luNqWn64.js → chunk-JSJVCQXG-CnaAsDTd.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-CNnKm6dK.js → chunk-KX2RTZJC-D0qksU2H.js} +1 -1
- package/dist/assets/{chunk-NQ4KR5QH-Cp9gb43u.js → chunk-NQ4KR5QH-rd6KG4-c.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-HlVYo2Oq.js → chunk-QZHKN3VN-Cyltgv4l.js} +1 -1
- package/dist/assets/{chunk-WL4C6EOR-CjSZoOGO.js → chunk-WL4C6EOR-DkNtSo86.js} +1 -1
- package/dist/assets/classDiagram-VBA2DB6C-CUcYxMZ8.js +1 -0
- package/dist/assets/classDiagram-v2-RAHNMMFH-CUcYxMZ8.js +1 -0
- package/dist/assets/clone-DJXJGSg2.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-DZWRjeEd.js → cose-bilkent-S5V4N54A-D_Wsd3iv.js} +1 -1
- package/dist/assets/{dagre-KLK3FWXG-yAzUmqI7.js → dagre-KLK3FWXG-CrrmZeGu.js} +1 -1
- package/dist/assets/{diagram-E7M64L7V-CvzlIvDJ.js → diagram-E7M64L7V-WzO26pGn.js} +1 -1
- package/dist/assets/{diagram-IFDJBPK2-DFMIJpuM.js → diagram-IFDJBPK2-COynsdO3.js} +1 -1
- package/dist/assets/{diagram-P4PSJMXO-KL-J3gyb.js → diagram-P4PSJMXO-CSqD5HJx.js} +1 -1
- package/dist/assets/{erDiagram-INFDFZHY-BXszHbTM.js → erDiagram-INFDFZHY-BiFhS6xi.js} +1 -1
- package/dist/assets/{flowDiagram-PKNHOUZH-Ba43NVp6.js → flowDiagram-PKNHOUZH-9jdAJSs0.js} +1 -1
- package/dist/assets/{ganttDiagram-A5KZAMGK-uLHfhCrg.js → ganttDiagram-A5KZAMGK-pGyMKWCo.js} +1 -1
- package/dist/assets/{gitGraphDiagram-K3NZZRJ6-BTEuFaiL.js → gitGraphDiagram-K3NZZRJ6-D4jvwoW1.js} +1 -1
- package/dist/assets/{graph-h2nuWjx4.js → graph-DMknFkkX.js} +1 -1
- package/dist/assets/{highlighted-body-TPN3WLV5-C6BY7XZJ.js → highlighted-body-TPN3WLV5-DhMGh1O7.js} +1 -1
- package/dist/assets/{index-C6Bb2jGF.js → index-EMGPq9Uy.js} +2 -2
- package/dist/assets/{infoDiagram-LFFYTUFH-BOLfvCIq.js → infoDiagram-LFFYTUFH-CP5zYiVP.js} +1 -1
- package/dist/assets/{ishikawaDiagram-PHBUUO56-BRzQ1ee5.js → ishikawaDiagram-PHBUUO56-BplLZAQ5.js} +1 -1
- package/dist/assets/{journeyDiagram-4ABVD52K-DXm_VcMy.js → journeyDiagram-4ABVD52K-CYVgkl-y.js} +1 -1
- package/dist/assets/{kanban-definition-K7BYSVSG-D_oyzopl.js → kanban-definition-K7BYSVSG-D3on0q66.js} +1 -1
- package/dist/assets/{layout-Q8YoR_E1.js → layout-DoKWZNVk.js} +1 -1
- package/dist/assets/{linear-B3qNg7di.js → linear-D4YTLdon.js} +1 -1
- package/dist/assets/{mermaid-O7DHMXV3-BVZ_4MKo.js → mermaid-O7DHMXV3-KLW3VWsF.js} +5 -5
- package/dist/assets/{mindmap-definition-YRQLILUH-CjulgYdi.js → mindmap-definition-YRQLILUH-EEAggxM3.js} +1 -1
- package/dist/assets/{pieDiagram-SKSYHLDU-8VzrefxA.js → pieDiagram-SKSYHLDU-Da-_fmYg.js} +1 -1
- package/dist/assets/{quadrantDiagram-337W2JSQ-CFh-ijm2.js → quadrantDiagram-337W2JSQ-Dq4gr7Sw.js} +1 -1
- package/dist/assets/{requirementDiagram-Z7DCOOCP-BNPlTs5Q.js → requirementDiagram-Z7DCOOCP-DNSXyCNU.js} +1 -1
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-C5l_hYst.js → sankeyDiagram-WA2Y5GQK-CT4ST2HW.js} +1 -1
- package/dist/assets/{sequenceDiagram-2WXFIKYE-B4a_rQw8.js → sequenceDiagram-2WXFIKYE-CshVYjrF.js} +1 -1
- package/dist/assets/{stateDiagram-RAJIS63D-Bt4mMmKB.js → stateDiagram-RAJIS63D-hsG5Yi2A.js} +1 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-BQa1Ppoo.js +1 -0
- package/dist/assets/{timeline-definition-YZTLITO2-CLYvSw_R.js → timeline-definition-YZTLITO2-EztFFK5F.js} +1 -1
- package/dist/assets/{treemap-KZPCXAKY-ksND0hZK.js → treemap-KZPCXAKY-D5UZCcq_.js} +1 -1
- package/dist/assets/{vennDiagram-LZ73GAT5-CaQg4oZK.js → vennDiagram-LZ73GAT5-9Qwv8UTR.js} +1 -1
- package/dist/assets/{xychartDiagram-JWTSCODW-C8dCbTeM.js → xychartDiagram-JWTSCODW-BBjpC1Qv.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/server/cli.js +1 -1
- package/dist/assets/channel-C6KNnXlA.js +0 -1
- package/dist/assets/classDiagram-VBA2DB6C-BQlzzlH7.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-BQlzzlH7.js +0 -1
- package/dist/assets/clone-DMxS3qWP.js +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-6NYMazfq.js +0 -1
package/dist/assets/{sankeyDiagram-WA2Y5GQK-C5l_hYst.js → sankeyDiagram-WA2Y5GQK-CT4ST2HW.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as g,q as _t,t as xt,s as vt,g as bt,b as wt,a as St,c as lt,B as Lt,d as H,af as Et,A as At,k as Tt}from"./mermaid-O7DHMXV3-BVZ_4MKo.js";import{o as Mt}from"./ordinal-Cboi1Yqb.js";import"./vendor-react-Cpt6D04s.js";import"./vendor-codemirror-Dz7_EqNA.js";import"./index-C6Bb2jGF.js";import"./init-Gi6I4Gst.js";function Nt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a<e;)i[a]="#"+t.slice(a*6,++a*6);return i}const It=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i<a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i<h||i===void 0&&h>=h)&&(i=h)}return i}function pt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function nt(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function Pt(t){return t.target.depth}function Ct(t){return t.depth}function Ot(t,e){return e-1-t.height}function mt(t,e){return t.sourceLinks.length?t.depth:e-1}function Dt(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,e){return Q(t.source,e.source)||t.index-e.index}function ht(t,e){return Q(t.target,e.target)||t.index-e.index}function Q(t,e){return t.y0-e.y0}function it(t){return t.value}function $t(t){return t.index}function zt(t){return t.nodes}function jt(t){return t.links}function ft(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function yt({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function Bt(){let t=0,e=0,i=1,a=1,h=24,b=8,p,k=$t,s=mt,o,l,_=zt,x=jt,y=6;function v(){const n={nodes:_.apply(null,arguments),links:x.apply(null,arguments)};return M(n),T(n),N(n),C(n),S(n),yt(n),n}v.update=function(n){return yt(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:X(n),v):k},v.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:X(n),v):s},v.nodeSort=function(n){return arguments.length?(o=n,v):o},v.nodeWidth=function(n){return arguments.length?(h=+n,v):h},v.nodePadding=function(n){return arguments.length?(b=p=+n,v):b},v.nodes=function(n){return arguments.length?(_=typeof n=="function"?n:X(n),v):_},v.links=function(n){return arguments.length?(x=typeof n=="function"?n:X(n),v):x},v.linkSort=function(n){return arguments.length?(l=n,v):l},v.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],v):[i-t,a-e]},v.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],v):[[t,e],[i,a]]},v.iterations=function(n){return arguments.length?(y=+n,v):y};function M({nodes:n,links:f}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[k(c,r,n),c]));for(const[c,r]of f.entries()){r.index=c;let{source:m,target:w}=r;typeof m!="object"&&(m=r.source=ft(u,m)),typeof w!="object"&&(w=r.target=ft(u,w)),m.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function N({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const m of u){m.depth=r;for(const{target:w}of m.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const m of u){m.height=r;for(const{source:w}of m.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function $({nodes:n}){const f=ct(n,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of n){const m=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=m,r.x0=t+m*u,r.x1=r.x0+h,c[m]?c[m].push(r):c[m]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const f=pt(n,u=>(a-e-(u.length-1)*p)/nt(u,it));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+p;for(const m of r.sourceLinks)m.width=m.value*f}c=(a-c+p)/(u.length+1);for(let r=0;r<u.length;++r){const m=u[r];m.y0+=c*(r+1),m.y1+=c*(r+1)}A(u)}}function S(n){const f=$(n);p=Math.min(b,(a-e)/(ct(f,u=>u.length)-1)),R(f);for(let u=0;u<y;++u){const c=Math.pow(.99,u),r=Math.max(1-c,(u+1)/y);B(f,c,r),P(f,c,r)}}function P(n,f,u){for(let c=1,r=n.length;c<r;++c){const m=n[c];for(const w of m){let L=0,F=0;for(const{source:Y,value:et}of w.targetLinks){let q=et*(w.layer-Y.layer);L+=z(Y,w)*q,F+=q}if(!(F>0))continue;let G=(L/F-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&m.sort(Q),O(m,u)}}function B(n,f,u){for(let c=n.length,r=c-2;r>=0;--r){const m=n[r];for(const w of m){let L=0,F=0;for(const{target:Y,value:et}of w.sourceLinks){let q=et*(Y.layer-w.layer);L+=I(w,Y)*q,F+=q}if(!(F>0))continue;let G=(L/F-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&m.sort(Q),O(m,u)}}function O(n,f){const u=n.length>>1,c=n[u];d(n,c.y0-p,u-1,f),D(n,c.y1+p,u+1,f),d(n,a,n.length-1,f),D(n,e,0,f)}function D(n,f,u,c){for(;u<n.length;++u){const r=n[u],m=(f-r.y0)*c;m>1e-6&&(r.y0+=m,r.y1+=m),f=r.y1+p}}function d(n,f,u,c){for(;u>=0;--u){const r=n[u],m=(r.y1-f)*c;m>1e-6&&(r.y0-=m,r.y1-=m),f=r.y0-p}}function E({sourceLinks:n,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ht);for(const{target:{targetLinks:u}}of n)u.sort(ut)}}function A(n){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of n)f.sort(ht),u.sort(ut)}function z(n,f){let u=n.y0-(n.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u+=r+p}for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u-=r}return u}function I(n,f){let u=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u+=r+p}for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u-=r}return u}return v}var st=Math.PI,rt=2*st,V=1e-6,Rt=rt-V;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,b){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+b)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var b=this._x1,p=this._y1,k=i-t,s=a-e,o=b-t,l=p-e,_=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(_>V)if(!(Math.abs(l*k-s*o)>V)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var x=i-b,y=a-p,v=k*k+s*s,M=x*x+y*y,T=Math.sqrt(v),N=Math.sqrt(_),C=h*Math.tan((st-Math.acos((v+_-M)/(2*T*N)))/2),$=C/N,R=C/T;Math.abs($-1)>V&&(this._+="L"+(t+$*o)+","+(e+$*l)),this._+="A"+h+","+h+",0,0,"+ +(l*x>o*y)+","+(this._x1=t+R*k)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,b){t=+t,e=+e,i=+i,b=!!b;var p=i*Math.cos(a),k=i*Math.sin(a),s=t+p,o=e+k,l=1^b,_=b?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>V||Math.abs(this._y1-o)>V)&&(this._+="L"+s+","+o),i&&(_<0&&(_=_%rt+rt),_>Rt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(e-k)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):_>V&&(this._+="A"+i+","+i+",0,"+ +(_>=st)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Ft(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Ut(t){return t.source}function Gt(t){return t.target}function Yt(t){var e=Ut,i=Gt,a=Ft,h=Vt,b=null;function p(){var k,s=Wt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(b||(b=k=kt()),t(b,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),k)return b=null,k+""||null}return p.source=function(k){return arguments.length?(e=k,p):e},p.target=function(k){return arguments.length?(i=k,p):i},p.x=function(k){return arguments.length?(a=typeof k=="function"?k:dt(+k),p):a},p.y=function(k){return arguments.length?(h=typeof k=="function"?k:dt(+k),p):h},p.context=function(k){return arguments.length?(b=k??null,p):b},p}function qt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}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=g(function(k,s,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:g(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:g(function(s,o,l,_,x,y,v){var M=y.length-1;switch(x){case 7:const T=_.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=_.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());_.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-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:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[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(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:g(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:g(function(s){var o=this,l=[0],_=[],x=[null],y=[],v=this.table,M="",T=0,N=0,C=2,$=1,R=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(P.yy[B]=this.yy[B]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var D=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(L){l.length=l.length-2*L,x.length=x.length-L,y.length=y.length-L}g(d,"popStack");function E(){var L;return L=_.pop()||S.lex()||$,typeof L!="number"&&(L instanceof Array&&(_=L,L=_.pop()),L=o.symbols_[L]||L),L}g(E,"lex");for(var A,z,I,n,f={},u,c,r,m;;){if(z=l[l.length-1],this.defaultActions[z]?I=this.defaultActions[z]:((A===null||typeof A>"u")&&(A=E()),I=v[z]&&v[z][A]),typeof I>"u"||!I.length||!I[0]){var w="";m=[];for(u in v[z])this.terminals_[u]&&u>C&&m.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`:
|
|
1
|
+
import{_ as g,q as _t,t as xt,s as vt,g as bt,b as wt,a as St,c as lt,B as Lt,d as H,af as Et,A as At,k as Tt}from"./mermaid-O7DHMXV3-KLW3VWsF.js";import{o as Mt}from"./ordinal-Cboi1Yqb.js";import"./vendor-react-Cpt6D04s.js";import"./vendor-codemirror-Dz7_EqNA.js";import"./index-EMGPq9Uy.js";import"./init-Gi6I4Gst.js";function Nt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a<e;)i[a]="#"+t.slice(a*6,++a*6);return i}const It=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i<a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i<h||i===void 0&&h>=h)&&(i=h)}return i}function pt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function nt(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function Pt(t){return t.target.depth}function Ct(t){return t.depth}function Ot(t,e){return e-1-t.height}function mt(t,e){return t.sourceLinks.length?t.depth:e-1}function Dt(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,e){return Q(t.source,e.source)||t.index-e.index}function ht(t,e){return Q(t.target,e.target)||t.index-e.index}function Q(t,e){return t.y0-e.y0}function it(t){return t.value}function $t(t){return t.index}function zt(t){return t.nodes}function jt(t){return t.links}function ft(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function yt({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function Bt(){let t=0,e=0,i=1,a=1,h=24,b=8,p,k=$t,s=mt,o,l,_=zt,x=jt,y=6;function v(){const n={nodes:_.apply(null,arguments),links:x.apply(null,arguments)};return M(n),T(n),N(n),C(n),S(n),yt(n),n}v.update=function(n){return yt(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:X(n),v):k},v.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:X(n),v):s},v.nodeSort=function(n){return arguments.length?(o=n,v):o},v.nodeWidth=function(n){return arguments.length?(h=+n,v):h},v.nodePadding=function(n){return arguments.length?(b=p=+n,v):b},v.nodes=function(n){return arguments.length?(_=typeof n=="function"?n:X(n),v):_},v.links=function(n){return arguments.length?(x=typeof n=="function"?n:X(n),v):x},v.linkSort=function(n){return arguments.length?(l=n,v):l},v.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],v):[i-t,a-e]},v.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],v):[[t,e],[i,a]]},v.iterations=function(n){return arguments.length?(y=+n,v):y};function M({nodes:n,links:f}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[k(c,r,n),c]));for(const[c,r]of f.entries()){r.index=c;let{source:m,target:w}=r;typeof m!="object"&&(m=r.source=ft(u,m)),typeof w!="object"&&(w=r.target=ft(u,w)),m.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function N({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const m of u){m.depth=r;for(const{target:w}of m.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const m of u){m.height=r;for(const{source:w}of m.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function $({nodes:n}){const f=ct(n,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of n){const m=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=m,r.x0=t+m*u,r.x1=r.x0+h,c[m]?c[m].push(r):c[m]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const f=pt(n,u=>(a-e-(u.length-1)*p)/nt(u,it));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+p;for(const m of r.sourceLinks)m.width=m.value*f}c=(a-c+p)/(u.length+1);for(let r=0;r<u.length;++r){const m=u[r];m.y0+=c*(r+1),m.y1+=c*(r+1)}A(u)}}function S(n){const f=$(n);p=Math.min(b,(a-e)/(ct(f,u=>u.length)-1)),R(f);for(let u=0;u<y;++u){const c=Math.pow(.99,u),r=Math.max(1-c,(u+1)/y);B(f,c,r),P(f,c,r)}}function P(n,f,u){for(let c=1,r=n.length;c<r;++c){const m=n[c];for(const w of m){let L=0,F=0;for(const{source:Y,value:et}of w.targetLinks){let q=et*(w.layer-Y.layer);L+=z(Y,w)*q,F+=q}if(!(F>0))continue;let G=(L/F-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&m.sort(Q),O(m,u)}}function B(n,f,u){for(let c=n.length,r=c-2;r>=0;--r){const m=n[r];for(const w of m){let L=0,F=0;for(const{target:Y,value:et}of w.sourceLinks){let q=et*(Y.layer-w.layer);L+=I(w,Y)*q,F+=q}if(!(F>0))continue;let G=(L/F-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&m.sort(Q),O(m,u)}}function O(n,f){const u=n.length>>1,c=n[u];d(n,c.y0-p,u-1,f),D(n,c.y1+p,u+1,f),d(n,a,n.length-1,f),D(n,e,0,f)}function D(n,f,u,c){for(;u<n.length;++u){const r=n[u],m=(f-r.y0)*c;m>1e-6&&(r.y0+=m,r.y1+=m),f=r.y1+p}}function d(n,f,u,c){for(;u>=0;--u){const r=n[u],m=(r.y1-f)*c;m>1e-6&&(r.y0-=m,r.y1-=m),f=r.y0-p}}function E({sourceLinks:n,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ht);for(const{target:{targetLinks:u}}of n)u.sort(ut)}}function A(n){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of n)f.sort(ht),u.sort(ut)}function z(n,f){let u=n.y0-(n.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u+=r+p}for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u-=r}return u}function I(n,f){let u=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u+=r+p}for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u-=r}return u}return v}var st=Math.PI,rt=2*st,V=1e-6,Rt=rt-V;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,b){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+b)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var b=this._x1,p=this._y1,k=i-t,s=a-e,o=b-t,l=p-e,_=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(_>V)if(!(Math.abs(l*k-s*o)>V)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var x=i-b,y=a-p,v=k*k+s*s,M=x*x+y*y,T=Math.sqrt(v),N=Math.sqrt(_),C=h*Math.tan((st-Math.acos((v+_-M)/(2*T*N)))/2),$=C/N,R=C/T;Math.abs($-1)>V&&(this._+="L"+(t+$*o)+","+(e+$*l)),this._+="A"+h+","+h+",0,0,"+ +(l*x>o*y)+","+(this._x1=t+R*k)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,b){t=+t,e=+e,i=+i,b=!!b;var p=i*Math.cos(a),k=i*Math.sin(a),s=t+p,o=e+k,l=1^b,_=b?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>V||Math.abs(this._y1-o)>V)&&(this._+="L"+s+","+o),i&&(_<0&&(_=_%rt+rt),_>Rt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(e-k)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):_>V&&(this._+="A"+i+","+i+",0,"+ +(_>=st)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Ft(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Ut(t){return t.source}function Gt(t){return t.target}function Yt(t){var e=Ut,i=Gt,a=Ft,h=Vt,b=null;function p(){var k,s=Wt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(b||(b=k=kt()),t(b,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),k)return b=null,k+""||null}return p.source=function(k){return arguments.length?(e=k,p):e},p.target=function(k){return arguments.length?(i=k,p):i},p.x=function(k){return arguments.length?(a=typeof k=="function"?k:dt(+k),p):a},p.y=function(k){return arguments.length?(h=typeof k=="function"?k:dt(+k),p):h},p.context=function(k){return arguments.length?(b=k??null,p):b},p}function qt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}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=g(function(k,s,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:g(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:g(function(s,o,l,_,x,y,v){var M=y.length-1;switch(x){case 7:const T=_.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=_.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());_.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-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:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[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(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:g(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:g(function(s){var o=this,l=[0],_=[],x=[null],y=[],v=this.table,M="",T=0,N=0,C=2,$=1,R=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(P.yy[B]=this.yy[B]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var D=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(L){l.length=l.length-2*L,x.length=x.length-L,y.length=y.length-L}g(d,"popStack");function E(){var L;return L=_.pop()||S.lex()||$,typeof L!="number"&&(L instanceof Array&&(_=L,L=_.pop()),L=o.symbols_[L]||L),L}g(E,"lex");for(var A,z,I,n,f={},u,c,r,m;;){if(z=l[l.length-1],this.defaultActions[z]?I=this.defaultActions[z]:((A===null||typeof A>"u")&&(A=E()),I=v[z]&&v[z][A]),typeof I>"u"||!I.length||!I[0]){var w="";m=[];for(u in v[z])this.terminals_[u]&&u>C&&m.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`:
|
|
2
2
|
`+S.showPosition()+`
|
|
3
3
|
Expecting `+m.join(", ")+", got '"+(this.terminals_[A]||A)+"'":w="Parse error on line "+(T+1)+": Unexpected "+(A==$?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(w,{text:S.match,token:this.terminals_[A]||A,line:S.yylineno,loc:O,expected:m})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+A);switch(I[0]){case 1:l.push(A),x.push(S.yytext),y.push(S.yylloc),l.push(I[1]),A=null,N=S.yyleng,M=S.yytext,T=S.yylineno,O=S.yylloc;break;case 2:if(c=this.productions_[I[1]][1],f.$=x[x.length-c],f._$={first_line:y[y.length-(c||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(c||1)].first_column,last_column:y[y.length-1].last_column},D&&(f._$.range=[y[y.length-(c||1)].range[0],y[y.length-1].range[1]]),n=this.performAction.apply(f,[M,N,T,P.yy,I[1],x,y].concat(R)),typeof n<"u")return n;c&&(l=l.slice(0,-1*c*2),x=x.slice(0,-1*c),y=y.slice(0,-1*c)),l.push(this.productions_[I[1]][0]),x.push(f.$),y.push(f._$),r=v[l[l.length-2]][l[l.length-1]],l.push(r);break;case 3:return!0}}return!0},"parse")},b=function(){var k={EOF:1,parseError:g(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:g(function(s,o){return this.yy=o||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:g(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(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:g(function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var _=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 x=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===_.length?this.yylloc.first_column:0)+_[_.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-o]),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).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(s){this.unput(this.match.slice(s))},"less"),pastInput:g(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:g(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:g(function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
package/dist/assets/{sequenceDiagram-2WXFIKYE-B4a_rQw8.js → sequenceDiagram-2WXFIKYE-CshVYjrF.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_,o as je,c as et,d as kt,l as Q,j as ve,e as ts,f as es,k as S,b as Pe,s as ss,q as rs,a as as,g as is,t as ns,v as os,J as cs,A as ls,i as vt,u as q,a5 as U,a6 as mt,a7 as Ce,a8 as hs,a9 as ds,aa as Me,K as Gt}from"./mermaid-O7DHMXV3-BVZ_4MKo.js";import{a as Ts,b as Qt,g as lt,d as Es,e as $t,f as jt}from"./chunk-JSJVCQXG-luNqWn64.js";import{I as ps}from"./chunk-QZHKN3VN-HlVYo2Oq.js";import"./vendor-react-Cpt6D04s.js";import"./vendor-codemirror-Dz7_EqNA.js";import"./index-C6Bb2jGF.js";var Xt=function(){var e=_(function(Tt,L,N,m){for(N=N||{},m=Tt.length;m--;N[Tt[m]]=L);return N},"o"),t=[1,2],a=[1,3],s=[1,4],i=[2,4],n=[1,9],o=[1,11],h=[1,12],l=[1,14],r=[1,15],E=[1,17],p=[1,18],f=[1,19],u=[1,25],y=[1,26],R=[1,27],b=[1,28],w=[1,29],A=[1,30],D=[1,31],k=[1,32],M=[1,33],W=[1,34],K=[1,35],H=[1,36],G=[1,37],X=[1,38],z=[1,39],v=[1,40],$=[1,42],J=[1,43],j=[1,44],st=[1,45],rt=[1,46],O=[1,47],I=[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],nt=[1,74],ot=[1,80],C=[1,81],te=[1,82],ee=[1,83],se=[1,84],re=[1,85],ae=[1,86],ie=[1,87],ne=[1,88],oe=[1,89],ce=[1,90],le=[1,91],he=[1,92],de=[1,93],Te=[1,94],Ee=[1,95],pe=[1,96],ue=[1,97],_e=[1,98],fe=[1,99],ge=[1,100],xe=[1,101],Ie=[1,102],Re=[1,103],Oe=[1,104],ye=[1,105],Le=[2,78],Lt=[4,5,17,51,53,54],Nt=[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],be=[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],Wt=[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],Se=[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],Kt=[5,52],B=[70,71,72,73],at=[1,151],Ft={trace:_(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:_(function(L,N,m,g,V,c,bt){var T=c.length-1;switch(V){case 3:return g.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:g.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:g.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:g.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:g.LINETYPE.ACTIVE_START,actor:c[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:g.LINETYPE.ACTIVE_END,actor:c[T-1].actor};break;case 30:g.setDiagramTitle(c[T].substring(6)),this.$=c[T].substring(6);break;case 31:g.setDiagramTitle(c[T].substring(7)),this.$=c[T].substring(7);break;case 32:this.$=c[T].trim(),g.setAccTitle(this.$);break;case 33:case 34:this.$=c[T].trim(),g.setAccDescription(this.$);break;case 35:c[T-1].unshift({type:"loopStart",loopText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.LOOP_START}),c[T-1].push({type:"loopEnd",loopText:c[T-2],signalType:g.LINETYPE.LOOP_END}),this.$=c[T-1];break;case 36:c[T-1].unshift({type:"rectStart",color:g.parseMessage(c[T-2]),signalType:g.LINETYPE.RECT_START}),c[T-1].push({type:"rectEnd",color:g.parseMessage(c[T-2]),signalType:g.LINETYPE.RECT_END}),this.$=c[T-1];break;case 37:c[T-1].unshift({type:"optStart",optText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.OPT_START}),c[T-1].push({type:"optEnd",optText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.OPT_END}),this.$=c[T-1];break;case 38:c[T-1].unshift({type:"altStart",altText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.ALT_START}),c[T-1].push({type:"altEnd",signalType:g.LINETYPE.ALT_END}),this.$=c[T-1];break;case 39:c[T-1].unshift({type:"parStart",parText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.PAR_START}),c[T-1].push({type:"parEnd",signalType:g.LINETYPE.PAR_END}),this.$=c[T-1];break;case 40:c[T-1].unshift({type:"parStart",parText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.PAR_OVER_START}),c[T-1].push({type:"parEnd",signalType:g.LINETYPE.PAR_END}),this.$=c[T-1];break;case 41:c[T-1].unshift({type:"criticalStart",criticalText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.CRITICAL_START}),c[T-1].push({type:"criticalEnd",signalType:g.LINETYPE.CRITICAL_END}),this.$=c[T-1];break;case 42:c[T-1].unshift({type:"breakStart",breakText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.BREAK_START}),c[T-1].push({type:"breakEnd",optText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.BREAK_END}),this.$=c[T-1];break;case 44:this.$=c[T-3].concat([{type:"option",optionText:g.parseMessage(c[T-1]),signalType:g.LINETYPE.CRITICAL_OPTION},c[T]]);break;case 46:this.$=c[T-3].concat([{type:"and",parText:g.parseMessage(c[T-1]),signalType:g.LINETYPE.PAR_AND},c[T]]);break;case 48:this.$=c[T-3].concat([{type:"else",altText:g.parseMessage(c[T-1]),signalType:g.LINETYPE.ALT_ELSE},c[T]]);break;case 49:c[T-3].draw="participant",c[T-3].type="addParticipant",c[T-3].description=g.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=g.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=g.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=g.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:g.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.$=g.PLACEMENT.LEFTOF;break;case 69:this.$=g.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:g.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:g.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:g.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:g.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:g.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:g.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:g.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:g.LINETYPE.CENTRAL_CONNECTION,actor:c[T-1].actor},{type:"centralConnectionReverse",signalType:g.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.$=g.LINETYPE.SOLID_OPEN;break;case 80:this.$=g.LINETYPE.DOTTED_OPEN;break;case 81:this.$=g.LINETYPE.SOLID;break;case 82:this.$=g.LINETYPE.SOLID_TOP;break;case 83:this.$=g.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=g.LINETYPE.STICK_TOP;break;case 85:this.$=g.LINETYPE.STICK_BOTTOM;break;case 86:this.$=g.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=g.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=g.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=g.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=g.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=g.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=g.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=g.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=g.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=g.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=g.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=g.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=g.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=g.LINETYPE.DOTTED;break;case 100:this.$=g.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=g.LINETYPE.SOLID_CROSS;break;case 102:this.$=g.LINETYPE.DOTTED_CROSS;break;case 103:this.$=g.LINETYPE.SOLID_POINT;break;case 104:this.$=g.LINETYPE.DOTTED_POINT;break;case 105:this.$=g.parseMessage(c[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:s},{1:[3]},{3:5,4:t,5:a,6:s},{3:6,4:t,5:a,6:s},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:o,8:8,9:10,10:h,13:13,14:l,15:r,18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},e(I,[2,5]),{9:48,13:13,14:l,15:r,18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:X,53:z,54:v},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:O},{23:56,73:O},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[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:nt},{23:75,55:76,73:nt},{23:77,73:O},{69:78,72:[1,79],78:ot,79:C,80:te,81:ee,82:se,83:re,84:ae,85:ie,86:ne,87:oe,88:ce,89:le,90:he,91:de,92:Te,93:Ee,94:pe,95:ue,96:_e,97:fe,98:ge,99:xe,100:Ie,101:Re,102:Oe,103:ye},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:O},{23:111,73:O},{23:112,73:O},{23:113,73:O},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],Le),e(I,[2,6]),e(I,[2,16]),e(Lt,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(Nt,i,{7:120}),e(Nt,i,{7:121}),e(Nt,i,{7:122}),e(be,i,{41:123,7:124}),e(Wt,i,{43:125,7:126}),e(Wt,i,{7:126,43:127}),e(Se,i,{46:128,7:129}),e(Nt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Kt,Le,{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:O},{69:146,78:ot,79:C,80:te,81:ee,82:se,83:re,84:ae,85:ie,86:ne,87:oe,88:ce,89:le,90:he,91:de,92:Te,93:Ee,94:pe,95:ue,96:_e,97:fe,98:ge,99:xe,100:Ie,101:Re,102:Oe,103:ye},e(B,[2,79]),e(B,[2,80]),e(B,[2,81]),e(B,[2,82]),e(B,[2,83]),e(B,[2,84]),e(B,[2,85]),e(B,[2,86]),e(B,[2,87]),e(B,[2,88]),e(B,[2,89]),e(B,[2,90]),e(B,[2,91]),e(B,[2,92]),e(B,[2,93]),e(B,[2,94]),e(B,[2,95]),e(B,[2,96]),e(B,[2,97]),e(B,[2,98]),e(B,[2,99]),e(B,[2,100]),e(B,[2,101]),e(B,[2,102]),e(B,[2,103]),e(B,[2,104]),{23:147,73:O},{23:149,60:148,73:O},{73:[2,68]},{73:[2,69]},{58:150,104:at},{58:152,104:at},{58:153,104:at},{58:154,104:at},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:X,53:z,54:v},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,161],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,162],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,163],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,164]},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[2,47],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,50:[1,165],51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,166]},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[2,45],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,49:[1,167],51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,168]},{17:[1,169]},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[2,43],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,48:[1,170],51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,171],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Kt,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:O},{23:178,73:O},{23:179,73:O},{58:180,104:at},{23:181,72:[1,182],73:O},{58:183,104:at},{58:184,104:at},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(Lt,[2,11]),{13:186,51:X,53:z,54:v},e(Lt,[2,13]),e(Lt,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:at},{58:196,104:at},{58:197,104:at},{5:[2,75]},{58:198,104:at},{23:199,73:O},{5:[2,58]},{5:[2,59]},{23:200,73:O},e(Lt,[2,12]),e(be,i,{7:124,41:201}),e(Wt,i,{7:126,43:202}),e(Se,i,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Kt,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:at},{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:_(function(L,N){if(N.recoverable)this.trace(L);else{var m=new Error(L);throw m.hash=N,m}},"parseError"),parse:_(function(L){var N=this,m=[0],g=[],V=[null],c=[],bt=this.table,T="",wt=0,me=0,Je=2,Ne=1,Ze=c.slice.call(arguments,1),F=Object.create(this.lexer),ut={yy:{}};for(var qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qt)&&(ut.yy[qt]=this.yy[qt]);F.setInput(L,ut.yy),ut.yy.lexer=F,ut.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var Ht=F.yylloc;c.push(Ht);var Qe=F.options&&F.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $e(tt){m.length=m.length-2*tt,V.length=V.length-tt,c.length=c.length-tt}_($e,"popStack");function Ae(){var tt;return tt=g.pop()||F.lex()||Ne,typeof tt!="number"&&(tt instanceof Array&&(g=tt,tt=g.pop()),tt=N.symbols_[tt]||tt),tt}_(Ae,"lex");for(var Z,_t,it,zt,It={},Pt,ht,we,Dt;;){if(_t=m[m.length-1],this.defaultActions[_t]?it=this.defaultActions[_t]:((Z===null||typeof Z>"u")&&(Z=Ae()),it=bt[_t]&&bt[_t][Z]),typeof it>"u"||!it.length||!it[0]){var Ut="";Dt=[];for(Pt in bt[_t])this.terminals_[Pt]&&Pt>Je&&Dt.push("'"+this.terminals_[Pt]+"'");F.showPosition?Ut="Parse error on line "+(wt+1)+`:
|
|
1
|
+
import{_,o as je,c as et,d as kt,l as Q,j as ve,e as ts,f as es,k as S,b as Pe,s as ss,q as rs,a as as,g as is,t as ns,v as os,J as cs,A as ls,i as vt,u as q,a5 as U,a6 as mt,a7 as Ce,a8 as hs,a9 as ds,aa as Me,K as Gt}from"./mermaid-O7DHMXV3-KLW3VWsF.js";import{a as Ts,b as Qt,g as lt,d as Es,e as $t,f as jt}from"./chunk-JSJVCQXG-CnaAsDTd.js";import{I as ps}from"./chunk-QZHKN3VN-Cyltgv4l.js";import"./vendor-react-Cpt6D04s.js";import"./vendor-codemirror-Dz7_EqNA.js";import"./index-EMGPq9Uy.js";var Xt=function(){var e=_(function(Tt,L,N,m){for(N=N||{},m=Tt.length;m--;N[Tt[m]]=L);return N},"o"),t=[1,2],a=[1,3],s=[1,4],i=[2,4],n=[1,9],o=[1,11],h=[1,12],l=[1,14],r=[1,15],E=[1,17],p=[1,18],f=[1,19],u=[1,25],y=[1,26],R=[1,27],b=[1,28],w=[1,29],A=[1,30],D=[1,31],k=[1,32],M=[1,33],W=[1,34],K=[1,35],H=[1,36],G=[1,37],X=[1,38],z=[1,39],v=[1,40],$=[1,42],J=[1,43],j=[1,44],st=[1,45],rt=[1,46],O=[1,47],I=[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],nt=[1,74],ot=[1,80],C=[1,81],te=[1,82],ee=[1,83],se=[1,84],re=[1,85],ae=[1,86],ie=[1,87],ne=[1,88],oe=[1,89],ce=[1,90],le=[1,91],he=[1,92],de=[1,93],Te=[1,94],Ee=[1,95],pe=[1,96],ue=[1,97],_e=[1,98],fe=[1,99],ge=[1,100],xe=[1,101],Ie=[1,102],Re=[1,103],Oe=[1,104],ye=[1,105],Le=[2,78],Lt=[4,5,17,51,53,54],Nt=[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],be=[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],Wt=[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],Se=[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],Kt=[5,52],B=[70,71,72,73],at=[1,151],Ft={trace:_(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:_(function(L,N,m,g,V,c,bt){var T=c.length-1;switch(V){case 3:return g.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:g.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:g.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:g.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:g.LINETYPE.ACTIVE_START,actor:c[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:g.LINETYPE.ACTIVE_END,actor:c[T-1].actor};break;case 30:g.setDiagramTitle(c[T].substring(6)),this.$=c[T].substring(6);break;case 31:g.setDiagramTitle(c[T].substring(7)),this.$=c[T].substring(7);break;case 32:this.$=c[T].trim(),g.setAccTitle(this.$);break;case 33:case 34:this.$=c[T].trim(),g.setAccDescription(this.$);break;case 35:c[T-1].unshift({type:"loopStart",loopText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.LOOP_START}),c[T-1].push({type:"loopEnd",loopText:c[T-2],signalType:g.LINETYPE.LOOP_END}),this.$=c[T-1];break;case 36:c[T-1].unshift({type:"rectStart",color:g.parseMessage(c[T-2]),signalType:g.LINETYPE.RECT_START}),c[T-1].push({type:"rectEnd",color:g.parseMessage(c[T-2]),signalType:g.LINETYPE.RECT_END}),this.$=c[T-1];break;case 37:c[T-1].unshift({type:"optStart",optText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.OPT_START}),c[T-1].push({type:"optEnd",optText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.OPT_END}),this.$=c[T-1];break;case 38:c[T-1].unshift({type:"altStart",altText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.ALT_START}),c[T-1].push({type:"altEnd",signalType:g.LINETYPE.ALT_END}),this.$=c[T-1];break;case 39:c[T-1].unshift({type:"parStart",parText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.PAR_START}),c[T-1].push({type:"parEnd",signalType:g.LINETYPE.PAR_END}),this.$=c[T-1];break;case 40:c[T-1].unshift({type:"parStart",parText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.PAR_OVER_START}),c[T-1].push({type:"parEnd",signalType:g.LINETYPE.PAR_END}),this.$=c[T-1];break;case 41:c[T-1].unshift({type:"criticalStart",criticalText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.CRITICAL_START}),c[T-1].push({type:"criticalEnd",signalType:g.LINETYPE.CRITICAL_END}),this.$=c[T-1];break;case 42:c[T-1].unshift({type:"breakStart",breakText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.BREAK_START}),c[T-1].push({type:"breakEnd",optText:g.parseMessage(c[T-2]),signalType:g.LINETYPE.BREAK_END}),this.$=c[T-1];break;case 44:this.$=c[T-3].concat([{type:"option",optionText:g.parseMessage(c[T-1]),signalType:g.LINETYPE.CRITICAL_OPTION},c[T]]);break;case 46:this.$=c[T-3].concat([{type:"and",parText:g.parseMessage(c[T-1]),signalType:g.LINETYPE.PAR_AND},c[T]]);break;case 48:this.$=c[T-3].concat([{type:"else",altText:g.parseMessage(c[T-1]),signalType:g.LINETYPE.ALT_ELSE},c[T]]);break;case 49:c[T-3].draw="participant",c[T-3].type="addParticipant",c[T-3].description=g.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=g.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=g.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=g.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:g.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.$=g.PLACEMENT.LEFTOF;break;case 69:this.$=g.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:g.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:g.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:g.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:g.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:g.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:g.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:g.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:g.LINETYPE.CENTRAL_CONNECTION,actor:c[T-1].actor},{type:"centralConnectionReverse",signalType:g.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.$=g.LINETYPE.SOLID_OPEN;break;case 80:this.$=g.LINETYPE.DOTTED_OPEN;break;case 81:this.$=g.LINETYPE.SOLID;break;case 82:this.$=g.LINETYPE.SOLID_TOP;break;case 83:this.$=g.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=g.LINETYPE.STICK_TOP;break;case 85:this.$=g.LINETYPE.STICK_BOTTOM;break;case 86:this.$=g.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=g.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=g.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=g.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=g.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=g.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=g.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=g.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=g.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=g.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=g.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=g.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=g.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=g.LINETYPE.DOTTED;break;case 100:this.$=g.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=g.LINETYPE.SOLID_CROSS;break;case 102:this.$=g.LINETYPE.DOTTED_CROSS;break;case 103:this.$=g.LINETYPE.SOLID_POINT;break;case 104:this.$=g.LINETYPE.DOTTED_POINT;break;case 105:this.$=g.parseMessage(c[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:s},{1:[3]},{3:5,4:t,5:a,6:s},{3:6,4:t,5:a,6:s},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:o,8:8,9:10,10:h,13:13,14:l,15:r,18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},e(I,[2,5]),{9:48,13:13,14:l,15:r,18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:X,53:z,54:v},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:O},{23:56,73:O},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[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:nt},{23:75,55:76,73:nt},{23:77,73:O},{69:78,72:[1,79],78:ot,79:C,80:te,81:ee,82:se,83:re,84:ae,85:ie,86:ne,87:oe,88:ce,89:le,90:he,91:de,92:Te,93:Ee,94:pe,95:ue,96:_e,97:fe,98:ge,99:xe,100:Ie,101:Re,102:Oe,103:ye},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:O},{23:111,73:O},{23:112,73:O},{23:113,73:O},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],Le),e(I,[2,6]),e(I,[2,16]),e(Lt,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(Nt,i,{7:120}),e(Nt,i,{7:121}),e(Nt,i,{7:122}),e(be,i,{41:123,7:124}),e(Wt,i,{43:125,7:126}),e(Wt,i,{7:126,43:127}),e(Se,i,{46:128,7:129}),e(Nt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Kt,Le,{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:O},{69:146,78:ot,79:C,80:te,81:ee,82:se,83:re,84:ae,85:ie,86:ne,87:oe,88:ce,89:le,90:he,91:de,92:Te,93:Ee,94:pe,95:ue,96:_e,97:fe,98:ge,99:xe,100:Ie,101:Re,102:Oe,103:ye},e(B,[2,79]),e(B,[2,80]),e(B,[2,81]),e(B,[2,82]),e(B,[2,83]),e(B,[2,84]),e(B,[2,85]),e(B,[2,86]),e(B,[2,87]),e(B,[2,88]),e(B,[2,89]),e(B,[2,90]),e(B,[2,91]),e(B,[2,92]),e(B,[2,93]),e(B,[2,94]),e(B,[2,95]),e(B,[2,96]),e(B,[2,97]),e(B,[2,98]),e(B,[2,99]),e(B,[2,100]),e(B,[2,101]),e(B,[2,102]),e(B,[2,103]),e(B,[2,104]),{23:147,73:O},{23:149,60:148,73:O},{73:[2,68]},{73:[2,69]},{58:150,104:at},{58:152,104:at},{58:153,104:at},{58:154,104:at},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:X,53:z,54:v},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,161],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,162],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,163],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,164]},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[2,47],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,50:[1,165],51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,166]},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[2,45],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,49:[1,167],51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,168]},{17:[1,169]},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[2,43],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,48:[1,170],51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:o,8:8,9:10,10:h,13:13,14:l,15:r,17:[1,171],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Kt,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:O},{23:178,73:O},{23:179,73:O},{58:180,104:at},{23:181,72:[1,182],73:O},{58:183,104:at},{58:184,104:at},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(Lt,[2,11]),{13:186,51:X,53:z,54:v},e(Lt,[2,13]),e(Lt,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:at},{58:196,104:at},{58:197,104:at},{5:[2,75]},{58:198,104:at},{23:199,73:O},{5:[2,58]},{5:[2,59]},{23:200,73:O},e(Lt,[2,12]),e(be,i,{7:124,41:201}),e(Wt,i,{7:126,43:202}),e(Se,i,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Kt,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:at},{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:_(function(L,N){if(N.recoverable)this.trace(L);else{var m=new Error(L);throw m.hash=N,m}},"parseError"),parse:_(function(L){var N=this,m=[0],g=[],V=[null],c=[],bt=this.table,T="",wt=0,me=0,Je=2,Ne=1,Ze=c.slice.call(arguments,1),F=Object.create(this.lexer),ut={yy:{}};for(var qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qt)&&(ut.yy[qt]=this.yy[qt]);F.setInput(L,ut.yy),ut.yy.lexer=F,ut.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var Ht=F.yylloc;c.push(Ht);var Qe=F.options&&F.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $e(tt){m.length=m.length-2*tt,V.length=V.length-tt,c.length=c.length-tt}_($e,"popStack");function Ae(){var tt;return tt=g.pop()||F.lex()||Ne,typeof tt!="number"&&(tt instanceof Array&&(g=tt,tt=g.pop()),tt=N.symbols_[tt]||tt),tt}_(Ae,"lex");for(var Z,_t,it,zt,It={},Pt,ht,we,Dt;;){if(_t=m[m.length-1],this.defaultActions[_t]?it=this.defaultActions[_t]:((Z===null||typeof Z>"u")&&(Z=Ae()),it=bt[_t]&&bt[_t][Z]),typeof it>"u"||!it.length||!it[0]){var Ut="";Dt=[];for(Pt in bt[_t])this.terminals_[Pt]&&Pt>Je&&Dt.push("'"+this.terminals_[Pt]+"'");F.showPosition?Ut="Parse error on line "+(wt+1)+`:
|
|
2
2
|
`+F.showPosition()+`
|
|
3
3
|
Expecting `+Dt.join(", ")+", got '"+(this.terminals_[Z]||Z)+"'":Ut="Parse error on line "+(wt+1)+": Unexpected "+(Z==Ne?"end of input":"'"+(this.terminals_[Z]||Z)+"'"),this.parseError(Ut,{text:F.match,token:this.terminals_[Z]||Z,line:F.yylineno,loc:Ht,expected:Dt})}if(it[0]instanceof Array&&it.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_t+", token: "+Z);switch(it[0]){case 1:m.push(Z),V.push(F.yytext),c.push(F.yylloc),m.push(it[1]),Z=null,me=F.yyleng,T=F.yytext,wt=F.yylineno,Ht=F.yylloc;break;case 2:if(ht=this.productions_[it[1]][1],It.$=V[V.length-ht],It._$={first_line:c[c.length-(ht||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(ht||1)].first_column,last_column:c[c.length-1].last_column},Qe&&(It._$.range=[c[c.length-(ht||1)].range[0],c[c.length-1].range[1]]),zt=this.performAction.apply(It,[T,me,wt,ut.yy,it[1],V,c].concat(Ze)),typeof zt<"u")return zt;ht&&(m=m.slice(0,-1*ht*2),V=V.slice(0,-1*ht),c=c.slice(0,-1*ht)),m.push(this.productions_[it[1]][0]),V.push(It.$),c.push(It._$),we=bt[m[m.length-2]][m[m.length-1]],m.push(we);break;case 3:return!0}}return!0},"parse")},Xe=function(){var Tt={EOF:1,parseError:_(function(N,m){if(this.yy.parser)this.yy.parser.parseError(N,m);else throw new Error(N)},"parseError"),setInput:_(function(L,N){return this.yy=N||this.yy||{},this._input=L,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var L=this._input[0];this.yytext+=L,this.yyleng++,this.offset++,this.match+=L,this.matched+=L;var N=L.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),L},"input"),unput:_(function(L){var N=L.length,m=L.split(/(?:\r\n?|\n)/g);this._input=L+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-N),this.offset-=N;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),m.length-1&&(this.yylineno-=m.length-1);var V=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===g.length?this.yylloc.first_column:0)+g[g.length-m.length].length-m[0].length:this.yylloc.first_column-N},this.options.ranges&&(this.yylloc.range=[V[0],V[0]+this.yyleng-N]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(L){this.unput(this.match.slice(L))},"less"),pastInput:_(function(){var L=this.matched.substr(0,this.matched.length-this.match.length);return(L.length>20?"...":"")+L.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var L=this.match;return L.length<20&&(L+=this._input.substr(0,20-L.length)),(L.substr(0,20)+(L.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var L=this.pastInput(),N=new Array(L.length+1).join("-");return L+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as R,a as W,S as N}from"./chunk-NQ4KR5QH-Cp9gb43u.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,ac as _,ad as U,a9 as C,u as F}from"./mermaid-O7DHMXV3-BVZ_4MKo.js";import{G as O}from"./graph-h2nuWjx4.js";import{l as J}from"./layout-Q8YoR_E1.js";import"./chunk-55IACEB6-D8kNkDUO.js";import"./chunk-KX2RTZJC-CNnKm6dK.js";import"./vendor-react-Cpt6D04s.js";import"./vendor-codemirror-Dz7_EqNA.js";import"./index-C6Bb2jGF.js";import"./_baseUniq-DON_Sg7x.js";import"./_basePickBy-Dz3NcIVK.js";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(g,B,m){const E=g.append("tspan").attr("x",2*t().state.padding).text(B);m||E.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,x=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(g){a||(d(x,g,s),s=!1),a=!1});const w=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"),p=x.node().getBBox(),o=Math.max(p.width,n.width);return w.attr("x2",o+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o+2*t().state.padding).attr("height",p.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(),x=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),p=s.node().getBBox().width+n;let o=Math.max(p,x);o===x&&(o=o+n);let g;const B=e.node().getBBox();i.doc,g=a-c,p>x&&(g=(x-o)/2+c),Math.abs(a-B.x)<c&&p>x&&(g=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",o).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",g+c),p<=x&&s.attr("x",a+(o-n)/2-p/2+c),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).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 x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const w of a){const p=w.trim();if(p.length>0){const o=l.append("tspan");if(o.text(p),s===0){const g=o.node().getBBox();s+=g.height}n+=s,o.attr("x",i+t().state.noteMargin),o.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"),A=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),x=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),x.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:w,y:p}=F.calcLabelPosition(i.points),o=z.getRows(d.title);let g=0;const B=[];let m=0,E=0;for(let u=0;u<=o.length;u++){const h=s.append("text").attr("text-anchor","middle").text(o[u]).attr("x",w).attr("y",p+g),y=h.node().getBBox();m=Math.max(m,y.width),E=Math.min(E,y.x),S.info(y.x,w,p+g),g===0&&(g=h.node().getBBox().height,S.info("Title height",g,p)),B.push(h)}let k=g*o.length;if(o.length>1){const u=(o.length-1)*g*.5;B.forEach((h,y)=>h.attr("y",p+y*g-u)),k=g*o.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",w-m/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"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 x=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=x.select(`[id='${i}']`);tt(s);const w=c.db.getRootDoc();G(w,s,void 0,!1,x,a,c);const p=b.padding,o=s.node().getBBox(),g=o.width+p*2,B=o.height+p*2,m=g*1.75;P(s,B,m,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+g+" "+B)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,x)=>{const a=new O({compound:!0,multigraph:!0});let s,w=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){w=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),o=x.db.getRelations(),g=Object.keys(p);for(const r of g){const u=p[r];d&&(u.parentId=d);let h;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");h=G(u.doc,y,u.id,!c,n,l,x);{y=$(y,u,c);let v=y.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const y={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},v=L(i,y,a);u.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;o.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const y=h.parentElement;let v=0,M=0;y&&(y.parentElement&&(v=y.parentElement.getBBox().width),M=parseInt(y.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let E=m.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))}),E=m.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=E.width+2*b.padding,k.height=E.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ut={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ut as diagram};
|
|
1
|
+
import{s as R,a as W,S as N}from"./chunk-NQ4KR5QH-rd6KG4-c.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,ac as _,ad as U,a9 as C,u as F}from"./mermaid-O7DHMXV3-KLW3VWsF.js";import{G as O}from"./graph-DMknFkkX.js";import{l as J}from"./layout-DoKWZNVk.js";import"./chunk-55IACEB6-V9_WXk3w.js";import"./chunk-KX2RTZJC-D0qksU2H.js";import"./vendor-react-Cpt6D04s.js";import"./vendor-codemirror-Dz7_EqNA.js";import"./index-EMGPq9Uy.js";import"./_baseUniq-CeEXFlBh.js";import"./_basePickBy-C5f221Kr.js";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(g,B,m){const E=g.append("tspan").attr("x",2*t().state.padding).text(B);m||E.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,x=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(g){a||(d(x,g,s),s=!1),a=!1});const w=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"),p=x.node().getBBox(),o=Math.max(p.width,n.width);return w.attr("x2",o+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o+2*t().state.padding).attr("height",p.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(),x=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),p=s.node().getBBox().width+n;let o=Math.max(p,x);o===x&&(o=o+n);let g;const B=e.node().getBBox();i.doc,g=a-c,p>x&&(g=(x-o)/2+c),Math.abs(a-B.x)<c&&p>x&&(g=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",o).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",g+c),p<=x&&s.attr("x",a+(o-n)/2-p/2+c),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).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 x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const w of a){const p=w.trim();if(p.length>0){const o=l.append("tspan");if(o.text(p),s===0){const g=o.node().getBBox();s+=g.height}n+=s,o.attr("x",i+t().state.noteMargin),o.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"),A=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),x=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),x.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:w,y:p}=F.calcLabelPosition(i.points),o=z.getRows(d.title);let g=0;const B=[];let m=0,E=0;for(let u=0;u<=o.length;u++){const h=s.append("text").attr("text-anchor","middle").text(o[u]).attr("x",w).attr("y",p+g),y=h.node().getBBox();m=Math.max(m,y.width),E=Math.min(E,y.x),S.info(y.x,w,p+g),g===0&&(g=h.node().getBBox().height,S.info("Title height",g,p)),B.push(h)}let k=g*o.length;if(o.length>1){const u=(o.length-1)*g*.5;B.forEach((h,y)=>h.attr("y",p+y*g-u)),k=g*o.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",w-m/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"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 x=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=x.select(`[id='${i}']`);tt(s);const w=c.db.getRootDoc();G(w,s,void 0,!1,x,a,c);const p=b.padding,o=s.node().getBBox(),g=o.width+p*2,B=o.height+p*2,m=g*1.75;P(s,B,m,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+g+" "+B)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,x)=>{const a=new O({compound:!0,multigraph:!0});let s,w=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){w=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),o=x.db.getRelations(),g=Object.keys(p);for(const r of g){const u=p[r];d&&(u.parentId=d);let h;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");h=G(u.doc,y,u.id,!c,n,l,x);{y=$(y,u,c);let v=y.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const y={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},v=L(i,y,a);u.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;o.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const y=h.parentElement;let v=0,M=0;y&&(y.parentElement&&(v=y.parentElement.getBBox().width),M=parseInt(y.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let E=m.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))}),E=m.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=E.width+2*b.padding,k.height=E.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ut={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ut as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as r,b as e,a,S as s}from"./chunk-NQ4KR5QH-rd6KG4-c.js";import{_ as i}from"./mermaid-O7DHMXV3-KLW3VWsF.js";import"./chunk-55IACEB6-V9_WXk3w.js";import"./chunk-KX2RTZJC-D0qksU2H.js";import"./vendor-react-Cpt6D04s.js";import"./vendor-codemirror-Dz7_EqNA.js";import"./index-EMGPq9Uy.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as s,c as xt,l as E,d as j,af as kt,ag as vt,ah as _t,ai as bt,F as wt,aj as St,A as Et}from"./mermaid-O7DHMXV3-
|
|
1
|
+
import{_ as s,c as xt,l as E,d as j,af as kt,ag as vt,ah as _t,ai as bt,F as wt,aj as St,A as Et}from"./mermaid-O7DHMXV3-KLW3VWsF.js";import{d as nt}from"./arc-CZVQXROF.js";import"./vendor-react-Cpt6D04s.js";import"./vendor-codemirror-Dz7_EqNA.js";import"./index-EMGPq9Uy.js";var Q=function(){var n=s(function(x,r,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=r);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],i=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],p={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline: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,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",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",20:"period",21:"event"},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,1],[9,1],[18,1],[19,1]],performAction:s(function(r,a,c,u,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:u.addTask(o[v],0,""),this.$=o[v];break;case 16:u.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:i,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:i,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(r,a){if(a.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=a,c}},"parseError"),parse:s(function(r){var a=this,c=[0],u=[],y=[null],o=[],w=this.table,v="",N=0,A=0,V=2,U=1,H=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(r,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var M=g.yylloc;o.push(M);var W=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=u.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,P,I,J,R={},B,$,et,O;;){if(P=c[c.length-1],this.defaultActions[P]?I=this.defaultActions[P]:((S===null||typeof S>"u")&&(S=tt()),I=w[P]&&w[P][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[P])this.terminals_[B]&&B>V&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`:
|
|
2
2
|
`+g.showPosition()+`
|
|
3
3
|
Expecting `+O.join(", ")+", got '"+(this.terminals_[S]||S)+"'":K="Parse error on line "+(N+1)+": Unexpected "+(S==U?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(K,{text:g.match,token:this.terminals_[S]||S,line:g.yylineno,loc:M,expected:O})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+S);switch(I[0]){case 1:c.push(S),y.push(g.yytext),o.push(g.yylloc),c.push(I[1]),S=null,A=g.yyleng,v=g.yytext,N=g.yylineno,M=g.yylloc;break;case 2:if($=this.productions_[I[1]][1],R.$=y[y.length-$],R._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},W&&(R._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),J=this.performAction.apply(R,[v,A,N,b.yy,I[1],y,o].concat(H)),typeof J<"u")return J;$&&(c=c.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),c.push(this.productions_[I[1]][0]),y.push(R.$),o.push(R._$),et=w[c[c.length-2]][c[c.length-1]],c.push(et);break;case 3:return!0}}return!0},"parse")},k=function(){var x={EOF:1,parseError:s(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:s(function(r,a){return this.yy=a||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 a=r.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),r},"input"),unput:s(function(r){var a=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;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),c.length-1&&(this.yylineno-=c.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:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[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: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).
|
|
4
4
|
`+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(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as En}from"./index-C6Bb2jGF.js";import{cC as Oh,cD as xh,aY as wd,bt as Dh,b0 as Mh,aZ as je,az as Fh,aA as wl,bj as Gh,bm as bd,bn as _d,bk as Uh,by as bl,aC as Yn,aD as ae,a_ as qh,aU as jh}from"./mermaid-O7DHMXV3-BVZ_4MKo.js";import{k as qr,j as tl,g as Hr,S as zh,w as Bh,x as Wh,c as Id,v as Pe,y as Pd,l as Vh,z as Kh,A as Hh,B as Yh,C as Xh,a as Ld,d as q,i as tn,r as Je,f as ht,D as Fe}from"./_baseUniq-DON_Sg7x.js";import{j as nl,m as M,d as Jh,f as yt,g as jr,h as z,i as rl,l as jn,e as Qh}from"./_basePickBy-Dz3NcIVK.js";import{c as Be}from"./clone-DMxS3qWP.js";import{l as Zh}from"./vendor-react-Cpt6D04s.js";var ep=Object.prototype,tp=ep.hasOwnProperty,ft=Oh(function(t,e){if(xh(e)||wd(e)){Dh(e,qr(e),t);return}for(var n in e)tp.call(e,n)&&Mh(t,n,e[n])});function Od(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function ns(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}function np(t,e,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;){var a=t[i];e(r,a,n(a),t)}return r}function rp(t,e,n,r){return tl(t,function(i,s,a){e(r,i,n(i),a)}),r}function ip(t,e){return function(n,r){var i=je(n)?np:rp,s=e?e():{};return i(n,t,Hr(r),s)}}var sp=200;function ap(t,e,n,r){var i=-1,s=Bh,a=!0,o=t.length,c=[],l=e.length;if(!o)return c;e.length>=sp&&(s=Wh,a=!1,e=new zh(e));e:for(;++i<o;){var u=t[i],f=u;if(u=u!==0?u:0,a&&f===f){for(var m=l;m--;)if(e[m]===f)continue e;c.push(u)}else s(e,f,r)||c.push(u)}return c}var ba=Fh(function(t,e){return wl(t)?ap(t,Id(e,1,wl,!0)):[]});function Ge(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:nl(e),Od(t,e<0?0:e,r)):[]}function zi(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:nl(e),e=r-e,Od(t,0,e<0?0:e)):[]}function op(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function cp(t,e){var n=!0;return tl(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function St(t,e,n){var r=je(t)?op:cp;return r(t,Hr(e))}function Ct(t){return t&&t.length?t[0]:void 0}function dt(t,e){return Id(M(t,e))}var lp=Object.prototype,up=lp.hasOwnProperty,dp=ip(function(t,e,n){up.call(t,n)?t[n].push(e):Gh(t,n,[e])}),fp="[object String]";function nt(t){return typeof t=="string"||!je(t)&&bd(t)&&_d(t)==fp}var hp=Math.max;function et(t,e,n,r){t=wd(t)?t:Pe(t),n=n?nl(n):0;var i=t.length;return n<0&&(n=hp(i+n,0)),nt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Pd(t,e,n)>-1}function _l(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return Pd(t,e,i)}var pp="[object RegExp]";function mp(t){return bd(t)&&_d(t)==pp}var Il=bl&&bl.isRegExp,nn=Il?Uh(Il):mp,gp="Expected a function";function yp(t){if(typeof t!="function")throw new TypeError(gp);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)}}function Nt(t,e){if(t==null)return{};var n=Vh(Kh(t),function(r){return[r]});return e=Hr(e),Jh(t,n,function(r,i){return e(r,i[0])})}function _a(t,e){var n=je(t)?Hh:Yh;return n(t,yp(Hr(e)))}function Tp(t,e){var n;return tl(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function xd(t,e,n){var r=je(t)?Xh:Tp;return r(t,Hr(e))}function il(t){return t&&t.length?Ld(t):[]}function Rp(t,e){return t&&t.length?Ld(t,Hr(e)):[]}function We(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function $t(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function un(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function vp(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function fi(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Dd{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=n.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return We(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Bi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Md(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Fd(t){return Bi(t)&&typeof t.fullText=="string"}class Ue{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new Ue(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return lt})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=Ep(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new Ue(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?lt:{done:!1,value:e(i)}})}filter(e){return new Ue(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return lt})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new Ue(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(aa(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return lt})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new Ue(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(aa(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return lt})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new Ue(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new Ue(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?lt:this.nextFn(n.state)))}distinct(e){return new Ue(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return lt})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function Ep(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function aa(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Gd=new Ue(()=>{},()=>lt),lt=Object.freeze({done:!0,value:void 0});function me(...t){if(t.length===1){const e=t[0];if(e instanceof Ue)return e;if(aa(e))return new Ue(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new Ue(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:lt)}return t.length>1?new Ue(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];aa(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return lt}):Gd}class sl extends Ue{constructor(e,n,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return lt})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var To;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})(To||(To={}));function Ro(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{We(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Ro(i,e))}):We(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Ro(r,e)))}function Ia(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function Qt(t){const n=Ws(t).$document;if(!n)throw new Error("AST node has no document.");return n}function Ws(t){for(;t.$container;)t=t.$container;return t}function Pl(t){return $t(t)?t.ref?[t.ref]:[]:un(t)?t.items.map(e=>e.ref):[]}function al(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e?.range;return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(We(s)){if(r.keyIndex++,Ll(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(We(o)&&Ll(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return lt})}function rs(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new sl(t,n=>al(n,e))}function Zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new sl(t,n=>al(n,e),{includeRoot:!0})}function Ll(t,e){if(!e)return!0;const n=t.$cstNode?.range;return n?Bp(n,e):!1}function oa(t){return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if($t(r)||un(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if($t(s)||un(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return lt})}function Ap(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=Ud(i.defaultValue))}function Ud(t){return Array.isArray(t)?[...t.map(Ud)]:t}const ct={$type:"AbstractElement",cardinality:"cardinality"};function $p(t){return ee.isInstance(t,ct.$type)}const Vs={$type:"AbstractParserRule"};function is(t){return ee.isInstance(t,Vs.$type)}const _s={$type:"AbstractRule"},Et={$type:"AbstractType"},On={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Pa(t){return ee.isInstance(t,On.$type)}const Ks={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function qd(t){return ee.isInstance(t,Ks.$type)}const Ol={$type:"ArrayLiteral",elements:"elements"},xl={$type:"ArrayType",elementType:"elementType"},xn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function zn(t){return ee.isInstance(t,xn.$type)}const vo={$type:"BooleanLiteral",true:"true"};function Sp(t){return ee.isInstance(t,vo.$type)}const Dn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function kp(t){return ee.isInstance(t,Dn.$type)}const nr={$type:"Condition"},Hs={$type:"Conjunction",left:"left",right:"right"};function Cp(t){return ee.isInstance(t,Hs.$type)}const Mn={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function La(t){return ee.isInstance(t,Mn.$type)}const Ys={$type:"Disjunction",left:"left",right:"right"};function Np(t){return ee.isInstance(t,Ys.$type)}const Eo={$type:"EndOfFile",cardinality:"cardinality"};function wp(t){return ee.isInstance(t,Eo.$type)}const An={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Dl={$type:"GrammarImport",path:"path"},cr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function ol(t){return ee.isInstance(t,cr.$type)}const Ao={$type:"InferredType",name:"name"};function jd(t){return ee.isInstance(t,Ao.$type)}const Vt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function ca(t){return ee.isInstance(t,Vt.$type)}const Ka={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},Ml={$type:"InfixRuleOperators",precedences:"precedences"},Li={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function bp(t){return ee.isInstance(t,Li.$type)}const Oi={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Bn(t){return ee.isInstance(t,Oi.$type)}const Is={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},lr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function _p(t){return ee.isInstance(t,lr.$type)}const $o={$type:"Negation",value:"value"};function Ip(t){return ee.isInstance(t,$o.$type)}const Fl={$type:"NumberLiteral",value:"value"},Ps={$type:"Parameter",name:"name"},So={$type:"ParameterReference",parameter:"parameter"};function Pp(t){return ee.isInstance(t,So.$type)}const It={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function sn(t){return ee.isInstance(t,It.$type)}const Ha={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},ur={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Lp(t){return ee.isInstance(t,ur.$type)}const ko={$type:"ReturnType",name:"name"};function Op(t){return ee.isInstance(t,ko.$type)}const dr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Wn(t){return ee.isInstance(t,dr.$type)}const xi={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function xp(t){return ee.isInstance(t,xi.$type)}const Gl={$type:"StringLiteral",value:"value"},fr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Dp(t){return ee.isInstance(t,fr.$type)}const gt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},hr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Mp(t){return ee.isInstance(t,hr.$type)}const ln={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function an(t){return ee.isInstance(t,ln.$type)}const pr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Fp(t){return ee.isInstance(t,pr.$type)}const Xs={$type:"Type",name:"name",type:"type"};function Gp(t){return ee.isInstance(t,Xs.$type)}const hi={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},pi={$type:"TypeDefinition"},Ul={$type:"UnionType",types:"types"},Js={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function zd(t){return ee.isInstance(t,Js.$type)}const mr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Up(t){return ee.isInstance(t,mr.$type)}const mi={$type:"ValueLiteral"},Di={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function qp(t){return ee.isInstance(t,Di.$type)}class Bd extends Dd{constructor(){super(...arguments),this.types={AbstractElement:{name:ct.$type,properties:{cardinality:{name:ct.cardinality}},superTypes:[]},AbstractParserRule:{name:Vs.$type,properties:{},superTypes:[_s.$type,Et.$type]},AbstractRule:{name:_s.$type,properties:{},superTypes:[]},AbstractType:{name:Et.$type,properties:{},superTypes:[]},Action:{name:On.$type,properties:{cardinality:{name:On.cardinality},feature:{name:On.feature},inferredType:{name:On.inferredType},operator:{name:On.operator},type:{name:On.type,referenceType:Et.$type}},superTypes:[ct.$type]},Alternatives:{name:Ks.$type,properties:{cardinality:{name:Ks.cardinality},elements:{name:Ks.elements,defaultValue:[]}},superTypes:[ct.$type]},ArrayLiteral:{name:Ol.$type,properties:{elements:{name:Ol.elements,defaultValue:[]}},superTypes:[mi.$type]},ArrayType:{name:xl.$type,properties:{elementType:{name:xl.elementType}},superTypes:[pi.$type]},Assignment:{name:xn.$type,properties:{cardinality:{name:xn.cardinality},feature:{name:xn.feature},operator:{name:xn.operator},predicate:{name:xn.predicate},terminal:{name:xn.terminal}},superTypes:[ct.$type]},BooleanLiteral:{name:vo.$type,properties:{true:{name:vo.true,defaultValue:!1}},superTypes:[nr.$type,mi.$type]},CharacterRange:{name:Dn.$type,properties:{cardinality:{name:Dn.cardinality},left:{name:Dn.left},lookahead:{name:Dn.lookahead},parenthesized:{name:Dn.parenthesized,defaultValue:!1},right:{name:Dn.right}},superTypes:[gt.$type]},Condition:{name:nr.$type,properties:{},superTypes:[]},Conjunction:{name:Hs.$type,properties:{left:{name:Hs.left},right:{name:Hs.right}},superTypes:[nr.$type]},CrossReference:{name:Mn.$type,properties:{cardinality:{name:Mn.cardinality},deprecatedSyntax:{name:Mn.deprecatedSyntax,defaultValue:!1},isMulti:{name:Mn.isMulti,defaultValue:!1},terminal:{name:Mn.terminal},type:{name:Mn.type,referenceType:Et.$type}},superTypes:[ct.$type]},Disjunction:{name:Ys.$type,properties:{left:{name:Ys.left},right:{name:Ys.right}},superTypes:[nr.$type]},EndOfFile:{name:Eo.$type,properties:{cardinality:{name:Eo.cardinality}},superTypes:[ct.$type]},Grammar:{name:An.$type,properties:{imports:{name:An.imports,defaultValue:[]},interfaces:{name:An.interfaces,defaultValue:[]},isDeclared:{name:An.isDeclared,defaultValue:!1},name:{name:An.name},rules:{name:An.rules,defaultValue:[]},types:{name:An.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Dl.$type,properties:{path:{name:Dl.path}},superTypes:[]},Group:{name:cr.$type,properties:{cardinality:{name:cr.cardinality},elements:{name:cr.elements,defaultValue:[]},guardCondition:{name:cr.guardCondition},predicate:{name:cr.predicate}},superTypes:[ct.$type]},InferredType:{name:Ao.$type,properties:{name:{name:Ao.name}},superTypes:[Et.$type]},InfixRule:{name:Vt.$type,properties:{call:{name:Vt.call},dataType:{name:Vt.dataType},inferredType:{name:Vt.inferredType},name:{name:Vt.name},operators:{name:Vt.operators},parameters:{name:Vt.parameters,defaultValue:[]},returnType:{name:Vt.returnType,referenceType:Et.$type}},superTypes:[Vs.$type]},InfixRuleOperatorList:{name:Ka.$type,properties:{associativity:{name:Ka.associativity},operators:{name:Ka.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ml.$type,properties:{precedences:{name:Ml.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Li.$type,properties:{attributes:{name:Li.attributes,defaultValue:[]},name:{name:Li.name},superTypes:{name:Li.superTypes,defaultValue:[],referenceType:Et.$type}},superTypes:[Et.$type]},Keyword:{name:Oi.$type,properties:{cardinality:{name:Oi.cardinality},predicate:{name:Oi.predicate},value:{name:Oi.value}},superTypes:[ct.$type]},NamedArgument:{name:Is.$type,properties:{calledByName:{name:Is.calledByName,defaultValue:!1},parameter:{name:Is.parameter,referenceType:Ps.$type},value:{name:Is.value}},superTypes:[]},NegatedToken:{name:lr.$type,properties:{cardinality:{name:lr.cardinality},lookahead:{name:lr.lookahead},parenthesized:{name:lr.parenthesized,defaultValue:!1},terminal:{name:lr.terminal}},superTypes:[gt.$type]},Negation:{name:$o.$type,properties:{value:{name:$o.value}},superTypes:[nr.$type]},NumberLiteral:{name:Fl.$type,properties:{value:{name:Fl.value}},superTypes:[mi.$type]},Parameter:{name:Ps.$type,properties:{name:{name:Ps.name}},superTypes:[]},ParameterReference:{name:So.$type,properties:{parameter:{name:So.parameter,referenceType:Ps.$type}},superTypes:[nr.$type]},ParserRule:{name:It.$type,properties:{dataType:{name:It.dataType},definition:{name:It.definition},entry:{name:It.entry,defaultValue:!1},fragment:{name:It.fragment,defaultValue:!1},inferredType:{name:It.inferredType},name:{name:It.name},parameters:{name:It.parameters,defaultValue:[]},returnType:{name:It.returnType,referenceType:Et.$type}},superTypes:[Vs.$type]},ReferenceType:{name:Ha.$type,properties:{isMulti:{name:Ha.isMulti,defaultValue:!1},referenceType:{name:Ha.referenceType}},superTypes:[pi.$type]},RegexToken:{name:ur.$type,properties:{cardinality:{name:ur.cardinality},lookahead:{name:ur.lookahead},parenthesized:{name:ur.parenthesized,defaultValue:!1},regex:{name:ur.regex}},superTypes:[gt.$type]},ReturnType:{name:ko.$type,properties:{name:{name:ko.name}},superTypes:[]},RuleCall:{name:dr.$type,properties:{arguments:{name:dr.arguments,defaultValue:[]},cardinality:{name:dr.cardinality},predicate:{name:dr.predicate},rule:{name:dr.rule,referenceType:_s.$type}},superTypes:[ct.$type]},SimpleType:{name:xi.$type,properties:{primitiveType:{name:xi.primitiveType},stringType:{name:xi.stringType},typeRef:{name:xi.typeRef,referenceType:Et.$type}},superTypes:[pi.$type]},StringLiteral:{name:Gl.$type,properties:{value:{name:Gl.value}},superTypes:[mi.$type]},TerminalAlternatives:{name:fr.$type,properties:{cardinality:{name:fr.cardinality},elements:{name:fr.elements,defaultValue:[]},lookahead:{name:fr.lookahead},parenthesized:{name:fr.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalElement:{name:gt.$type,properties:{cardinality:{name:gt.cardinality},lookahead:{name:gt.lookahead},parenthesized:{name:gt.parenthesized,defaultValue:!1}},superTypes:[ct.$type]},TerminalGroup:{name:hr.$type,properties:{cardinality:{name:hr.cardinality},elements:{name:hr.elements,defaultValue:[]},lookahead:{name:hr.lookahead},parenthesized:{name:hr.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalRule:{name:ln.$type,properties:{definition:{name:ln.definition},fragment:{name:ln.fragment,defaultValue:!1},hidden:{name:ln.hidden,defaultValue:!1},name:{name:ln.name},type:{name:ln.type}},superTypes:[_s.$type]},TerminalRuleCall:{name:pr.$type,properties:{cardinality:{name:pr.cardinality},lookahead:{name:pr.lookahead},parenthesized:{name:pr.parenthesized,defaultValue:!1},rule:{name:pr.rule,referenceType:ln.$type}},superTypes:[gt.$type]},Type:{name:Xs.$type,properties:{name:{name:Xs.name},type:{name:Xs.type}},superTypes:[Et.$type]},TypeAttribute:{name:hi.$type,properties:{defaultValue:{name:hi.defaultValue},isOptional:{name:hi.isOptional,defaultValue:!1},name:{name:hi.name},type:{name:hi.type}},superTypes:[]},TypeDefinition:{name:pi.$type,properties:{},superTypes:[]},UnionType:{name:Ul.$type,properties:{types:{name:Ul.types,defaultValue:[]}},superTypes:[pi.$type]},UnorderedGroup:{name:Js.$type,properties:{cardinality:{name:Js.cardinality},elements:{name:Js.elements,defaultValue:[]}},superTypes:[ct.$type]},UntilToken:{name:mr.$type,properties:{cardinality:{name:mr.cardinality},lookahead:{name:mr.lookahead},parenthesized:{name:mr.parenthesized,defaultValue:!1},terminal:{name:mr.terminal}},superTypes:[gt.$type]},ValueLiteral:{name:mi.$type,properties:{},superTypes:[]},Wildcard:{name:Di.$type,properties:{cardinality:{name:Di.cardinality},lookahead:{name:Di.lookahead},parenthesized:{name:Di.parenthesized,defaultValue:!1}},superTypes:[gt.$type]}}}}const ee=new Bd;function Co(t){return new sl(t,e=>Bi(e)?e.content:[],{includeRoot:!0})}function jp(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function No(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function la(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Xt;(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"})(Xt||(Xt={}));function zp(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Xt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Xt.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?Xt.Inside:n?Xt.OverlapBack:r?Xt.OverlapFront:Xt.Outside}function Bp(t,e){return zp(t,e)>Xt.After}const Wp=/^[\w\p{L}]$/u;function Vp(t,e){if(t){const n=Kp(t,!0);if(n&&ql(n,e))return n;if(Fd(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(ql(s,e))return s}}}}function ql(t,e){return Md(t)&&e.includes(t.tokenType.name)}function Kp(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class Wd extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function ss(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function Ya(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function gi(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function rr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Hp(){throw Error("Internal Error - Should never get here!")}function jl(t){return t.type==="Character"}const ua=[];for(let t=W("0");t<=W("9");t++)ua.push(t);const da=[W("_")].concat(ua);for(let t=W("a");t<=W("z");t++)da.push(t);for(let t=W("A");t<=W("Z");t++)da.push(t);const zl=[W(" "),W("\f"),W(`
|
|
1
|
+
import{_ as En}from"./index-EMGPq9Uy.js";import{cC as Oh,cD as xh,aY as wd,bt as Dh,b0 as Mh,aZ as je,az as Fh,aA as wl,bj as Gh,bm as bd,bn as _d,bk as Uh,by as bl,aC as Yn,aD as ae,a_ as qh,aU as jh}from"./mermaid-O7DHMXV3-KLW3VWsF.js";import{k as qr,j as tl,g as Hr,S as zh,w as Bh,x as Wh,c as Id,v as Pe,y as Pd,l as Vh,z as Kh,A as Hh,B as Yh,C as Xh,a as Ld,d as q,i as tn,r as Je,f as ht,D as Fe}from"./_baseUniq-CeEXFlBh.js";import{j as nl,m as M,d as Jh,f as yt,g as jr,h as z,i as rl,l as jn,e as Qh}from"./_basePickBy-C5f221Kr.js";import{c as Be}from"./clone-DJXJGSg2.js";import{l as Zh}from"./vendor-react-Cpt6D04s.js";var ep=Object.prototype,tp=ep.hasOwnProperty,ft=Oh(function(t,e){if(xh(e)||wd(e)){Dh(e,qr(e),t);return}for(var n in e)tp.call(e,n)&&Mh(t,n,e[n])});function Od(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function ns(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}function np(t,e,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;){var a=t[i];e(r,a,n(a),t)}return r}function rp(t,e,n,r){return tl(t,function(i,s,a){e(r,i,n(i),a)}),r}function ip(t,e){return function(n,r){var i=je(n)?np:rp,s=e?e():{};return i(n,t,Hr(r),s)}}var sp=200;function ap(t,e,n,r){var i=-1,s=Bh,a=!0,o=t.length,c=[],l=e.length;if(!o)return c;e.length>=sp&&(s=Wh,a=!1,e=new zh(e));e:for(;++i<o;){var u=t[i],f=u;if(u=u!==0?u:0,a&&f===f){for(var m=l;m--;)if(e[m]===f)continue e;c.push(u)}else s(e,f,r)||c.push(u)}return c}var ba=Fh(function(t,e){return wl(t)?ap(t,Id(e,1,wl,!0)):[]});function Ge(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:nl(e),Od(t,e<0?0:e,r)):[]}function zi(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:nl(e),e=r-e,Od(t,0,e<0?0:e)):[]}function op(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function cp(t,e){var n=!0;return tl(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function St(t,e,n){var r=je(t)?op:cp;return r(t,Hr(e))}function Ct(t){return t&&t.length?t[0]:void 0}function dt(t,e){return Id(M(t,e))}var lp=Object.prototype,up=lp.hasOwnProperty,dp=ip(function(t,e,n){up.call(t,n)?t[n].push(e):Gh(t,n,[e])}),fp="[object String]";function nt(t){return typeof t=="string"||!je(t)&&bd(t)&&_d(t)==fp}var hp=Math.max;function et(t,e,n,r){t=wd(t)?t:Pe(t),n=n?nl(n):0;var i=t.length;return n<0&&(n=hp(i+n,0)),nt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Pd(t,e,n)>-1}function _l(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return Pd(t,e,i)}var pp="[object RegExp]";function mp(t){return bd(t)&&_d(t)==pp}var Il=bl&&bl.isRegExp,nn=Il?Uh(Il):mp,gp="Expected a function";function yp(t){if(typeof t!="function")throw new TypeError(gp);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)}}function Nt(t,e){if(t==null)return{};var n=Vh(Kh(t),function(r){return[r]});return e=Hr(e),Jh(t,n,function(r,i){return e(r,i[0])})}function _a(t,e){var n=je(t)?Hh:Yh;return n(t,yp(Hr(e)))}function Tp(t,e){var n;return tl(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function xd(t,e,n){var r=je(t)?Xh:Tp;return r(t,Hr(e))}function il(t){return t&&t.length?Ld(t):[]}function Rp(t,e){return t&&t.length?Ld(t,Hr(e)):[]}function We(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function $t(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function un(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function vp(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function fi(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Dd{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=n.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return We(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Bi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Md(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Fd(t){return Bi(t)&&typeof t.fullText=="string"}class Ue{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new Ue(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return lt})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=Ep(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new Ue(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?lt:{done:!1,value:e(i)}})}filter(e){return new Ue(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return lt})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new Ue(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(aa(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return lt})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new Ue(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(aa(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return lt})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new Ue(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new Ue(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?lt:this.nextFn(n.state)))}distinct(e){return new Ue(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return lt})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function Ep(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function aa(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Gd=new Ue(()=>{},()=>lt),lt=Object.freeze({done:!0,value:void 0});function me(...t){if(t.length===1){const e=t[0];if(e instanceof Ue)return e;if(aa(e))return new Ue(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new Ue(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:lt)}return t.length>1?new Ue(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];aa(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return lt}):Gd}class sl extends Ue{constructor(e,n,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return lt})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var To;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})(To||(To={}));function Ro(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{We(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Ro(i,e))}):We(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Ro(r,e)))}function Ia(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function Qt(t){const n=Ws(t).$document;if(!n)throw new Error("AST node has no document.");return n}function Ws(t){for(;t.$container;)t=t.$container;return t}function Pl(t){return $t(t)?t.ref?[t.ref]:[]:un(t)?t.items.map(e=>e.ref):[]}function al(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e?.range;return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(We(s)){if(r.keyIndex++,Ll(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(We(o)&&Ll(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return lt})}function rs(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new sl(t,n=>al(n,e))}function Zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new sl(t,n=>al(n,e),{includeRoot:!0})}function Ll(t,e){if(!e)return!0;const n=t.$cstNode?.range;return n?Bp(n,e):!1}function oa(t){return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if($t(r)||un(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if($t(s)||un(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return lt})}function Ap(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=Ud(i.defaultValue))}function Ud(t){return Array.isArray(t)?[...t.map(Ud)]:t}const ct={$type:"AbstractElement",cardinality:"cardinality"};function $p(t){return ee.isInstance(t,ct.$type)}const Vs={$type:"AbstractParserRule"};function is(t){return ee.isInstance(t,Vs.$type)}const _s={$type:"AbstractRule"},Et={$type:"AbstractType"},On={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Pa(t){return ee.isInstance(t,On.$type)}const Ks={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function qd(t){return ee.isInstance(t,Ks.$type)}const Ol={$type:"ArrayLiteral",elements:"elements"},xl={$type:"ArrayType",elementType:"elementType"},xn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function zn(t){return ee.isInstance(t,xn.$type)}const vo={$type:"BooleanLiteral",true:"true"};function Sp(t){return ee.isInstance(t,vo.$type)}const Dn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function kp(t){return ee.isInstance(t,Dn.$type)}const nr={$type:"Condition"},Hs={$type:"Conjunction",left:"left",right:"right"};function Cp(t){return ee.isInstance(t,Hs.$type)}const Mn={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function La(t){return ee.isInstance(t,Mn.$type)}const Ys={$type:"Disjunction",left:"left",right:"right"};function Np(t){return ee.isInstance(t,Ys.$type)}const Eo={$type:"EndOfFile",cardinality:"cardinality"};function wp(t){return ee.isInstance(t,Eo.$type)}const An={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Dl={$type:"GrammarImport",path:"path"},cr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function ol(t){return ee.isInstance(t,cr.$type)}const Ao={$type:"InferredType",name:"name"};function jd(t){return ee.isInstance(t,Ao.$type)}const Vt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function ca(t){return ee.isInstance(t,Vt.$type)}const Ka={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},Ml={$type:"InfixRuleOperators",precedences:"precedences"},Li={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function bp(t){return ee.isInstance(t,Li.$type)}const Oi={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Bn(t){return ee.isInstance(t,Oi.$type)}const Is={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},lr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function _p(t){return ee.isInstance(t,lr.$type)}const $o={$type:"Negation",value:"value"};function Ip(t){return ee.isInstance(t,$o.$type)}const Fl={$type:"NumberLiteral",value:"value"},Ps={$type:"Parameter",name:"name"},So={$type:"ParameterReference",parameter:"parameter"};function Pp(t){return ee.isInstance(t,So.$type)}const It={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function sn(t){return ee.isInstance(t,It.$type)}const Ha={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},ur={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Lp(t){return ee.isInstance(t,ur.$type)}const ko={$type:"ReturnType",name:"name"};function Op(t){return ee.isInstance(t,ko.$type)}const dr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Wn(t){return ee.isInstance(t,dr.$type)}const xi={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function xp(t){return ee.isInstance(t,xi.$type)}const Gl={$type:"StringLiteral",value:"value"},fr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Dp(t){return ee.isInstance(t,fr.$type)}const gt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},hr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Mp(t){return ee.isInstance(t,hr.$type)}const ln={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function an(t){return ee.isInstance(t,ln.$type)}const pr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Fp(t){return ee.isInstance(t,pr.$type)}const Xs={$type:"Type",name:"name",type:"type"};function Gp(t){return ee.isInstance(t,Xs.$type)}const hi={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},pi={$type:"TypeDefinition"},Ul={$type:"UnionType",types:"types"},Js={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function zd(t){return ee.isInstance(t,Js.$type)}const mr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Up(t){return ee.isInstance(t,mr.$type)}const mi={$type:"ValueLiteral"},Di={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function qp(t){return ee.isInstance(t,Di.$type)}class Bd extends Dd{constructor(){super(...arguments),this.types={AbstractElement:{name:ct.$type,properties:{cardinality:{name:ct.cardinality}},superTypes:[]},AbstractParserRule:{name:Vs.$type,properties:{},superTypes:[_s.$type,Et.$type]},AbstractRule:{name:_s.$type,properties:{},superTypes:[]},AbstractType:{name:Et.$type,properties:{},superTypes:[]},Action:{name:On.$type,properties:{cardinality:{name:On.cardinality},feature:{name:On.feature},inferredType:{name:On.inferredType},operator:{name:On.operator},type:{name:On.type,referenceType:Et.$type}},superTypes:[ct.$type]},Alternatives:{name:Ks.$type,properties:{cardinality:{name:Ks.cardinality},elements:{name:Ks.elements,defaultValue:[]}},superTypes:[ct.$type]},ArrayLiteral:{name:Ol.$type,properties:{elements:{name:Ol.elements,defaultValue:[]}},superTypes:[mi.$type]},ArrayType:{name:xl.$type,properties:{elementType:{name:xl.elementType}},superTypes:[pi.$type]},Assignment:{name:xn.$type,properties:{cardinality:{name:xn.cardinality},feature:{name:xn.feature},operator:{name:xn.operator},predicate:{name:xn.predicate},terminal:{name:xn.terminal}},superTypes:[ct.$type]},BooleanLiteral:{name:vo.$type,properties:{true:{name:vo.true,defaultValue:!1}},superTypes:[nr.$type,mi.$type]},CharacterRange:{name:Dn.$type,properties:{cardinality:{name:Dn.cardinality},left:{name:Dn.left},lookahead:{name:Dn.lookahead},parenthesized:{name:Dn.parenthesized,defaultValue:!1},right:{name:Dn.right}},superTypes:[gt.$type]},Condition:{name:nr.$type,properties:{},superTypes:[]},Conjunction:{name:Hs.$type,properties:{left:{name:Hs.left},right:{name:Hs.right}},superTypes:[nr.$type]},CrossReference:{name:Mn.$type,properties:{cardinality:{name:Mn.cardinality},deprecatedSyntax:{name:Mn.deprecatedSyntax,defaultValue:!1},isMulti:{name:Mn.isMulti,defaultValue:!1},terminal:{name:Mn.terminal},type:{name:Mn.type,referenceType:Et.$type}},superTypes:[ct.$type]},Disjunction:{name:Ys.$type,properties:{left:{name:Ys.left},right:{name:Ys.right}},superTypes:[nr.$type]},EndOfFile:{name:Eo.$type,properties:{cardinality:{name:Eo.cardinality}},superTypes:[ct.$type]},Grammar:{name:An.$type,properties:{imports:{name:An.imports,defaultValue:[]},interfaces:{name:An.interfaces,defaultValue:[]},isDeclared:{name:An.isDeclared,defaultValue:!1},name:{name:An.name},rules:{name:An.rules,defaultValue:[]},types:{name:An.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Dl.$type,properties:{path:{name:Dl.path}},superTypes:[]},Group:{name:cr.$type,properties:{cardinality:{name:cr.cardinality},elements:{name:cr.elements,defaultValue:[]},guardCondition:{name:cr.guardCondition},predicate:{name:cr.predicate}},superTypes:[ct.$type]},InferredType:{name:Ao.$type,properties:{name:{name:Ao.name}},superTypes:[Et.$type]},InfixRule:{name:Vt.$type,properties:{call:{name:Vt.call},dataType:{name:Vt.dataType},inferredType:{name:Vt.inferredType},name:{name:Vt.name},operators:{name:Vt.operators},parameters:{name:Vt.parameters,defaultValue:[]},returnType:{name:Vt.returnType,referenceType:Et.$type}},superTypes:[Vs.$type]},InfixRuleOperatorList:{name:Ka.$type,properties:{associativity:{name:Ka.associativity},operators:{name:Ka.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ml.$type,properties:{precedences:{name:Ml.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Li.$type,properties:{attributes:{name:Li.attributes,defaultValue:[]},name:{name:Li.name},superTypes:{name:Li.superTypes,defaultValue:[],referenceType:Et.$type}},superTypes:[Et.$type]},Keyword:{name:Oi.$type,properties:{cardinality:{name:Oi.cardinality},predicate:{name:Oi.predicate},value:{name:Oi.value}},superTypes:[ct.$type]},NamedArgument:{name:Is.$type,properties:{calledByName:{name:Is.calledByName,defaultValue:!1},parameter:{name:Is.parameter,referenceType:Ps.$type},value:{name:Is.value}},superTypes:[]},NegatedToken:{name:lr.$type,properties:{cardinality:{name:lr.cardinality},lookahead:{name:lr.lookahead},parenthesized:{name:lr.parenthesized,defaultValue:!1},terminal:{name:lr.terminal}},superTypes:[gt.$type]},Negation:{name:$o.$type,properties:{value:{name:$o.value}},superTypes:[nr.$type]},NumberLiteral:{name:Fl.$type,properties:{value:{name:Fl.value}},superTypes:[mi.$type]},Parameter:{name:Ps.$type,properties:{name:{name:Ps.name}},superTypes:[]},ParameterReference:{name:So.$type,properties:{parameter:{name:So.parameter,referenceType:Ps.$type}},superTypes:[nr.$type]},ParserRule:{name:It.$type,properties:{dataType:{name:It.dataType},definition:{name:It.definition},entry:{name:It.entry,defaultValue:!1},fragment:{name:It.fragment,defaultValue:!1},inferredType:{name:It.inferredType},name:{name:It.name},parameters:{name:It.parameters,defaultValue:[]},returnType:{name:It.returnType,referenceType:Et.$type}},superTypes:[Vs.$type]},ReferenceType:{name:Ha.$type,properties:{isMulti:{name:Ha.isMulti,defaultValue:!1},referenceType:{name:Ha.referenceType}},superTypes:[pi.$type]},RegexToken:{name:ur.$type,properties:{cardinality:{name:ur.cardinality},lookahead:{name:ur.lookahead},parenthesized:{name:ur.parenthesized,defaultValue:!1},regex:{name:ur.regex}},superTypes:[gt.$type]},ReturnType:{name:ko.$type,properties:{name:{name:ko.name}},superTypes:[]},RuleCall:{name:dr.$type,properties:{arguments:{name:dr.arguments,defaultValue:[]},cardinality:{name:dr.cardinality},predicate:{name:dr.predicate},rule:{name:dr.rule,referenceType:_s.$type}},superTypes:[ct.$type]},SimpleType:{name:xi.$type,properties:{primitiveType:{name:xi.primitiveType},stringType:{name:xi.stringType},typeRef:{name:xi.typeRef,referenceType:Et.$type}},superTypes:[pi.$type]},StringLiteral:{name:Gl.$type,properties:{value:{name:Gl.value}},superTypes:[mi.$type]},TerminalAlternatives:{name:fr.$type,properties:{cardinality:{name:fr.cardinality},elements:{name:fr.elements,defaultValue:[]},lookahead:{name:fr.lookahead},parenthesized:{name:fr.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalElement:{name:gt.$type,properties:{cardinality:{name:gt.cardinality},lookahead:{name:gt.lookahead},parenthesized:{name:gt.parenthesized,defaultValue:!1}},superTypes:[ct.$type]},TerminalGroup:{name:hr.$type,properties:{cardinality:{name:hr.cardinality},elements:{name:hr.elements,defaultValue:[]},lookahead:{name:hr.lookahead},parenthesized:{name:hr.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalRule:{name:ln.$type,properties:{definition:{name:ln.definition},fragment:{name:ln.fragment,defaultValue:!1},hidden:{name:ln.hidden,defaultValue:!1},name:{name:ln.name},type:{name:ln.type}},superTypes:[_s.$type]},TerminalRuleCall:{name:pr.$type,properties:{cardinality:{name:pr.cardinality},lookahead:{name:pr.lookahead},parenthesized:{name:pr.parenthesized,defaultValue:!1},rule:{name:pr.rule,referenceType:ln.$type}},superTypes:[gt.$type]},Type:{name:Xs.$type,properties:{name:{name:Xs.name},type:{name:Xs.type}},superTypes:[Et.$type]},TypeAttribute:{name:hi.$type,properties:{defaultValue:{name:hi.defaultValue},isOptional:{name:hi.isOptional,defaultValue:!1},name:{name:hi.name},type:{name:hi.type}},superTypes:[]},TypeDefinition:{name:pi.$type,properties:{},superTypes:[]},UnionType:{name:Ul.$type,properties:{types:{name:Ul.types,defaultValue:[]}},superTypes:[pi.$type]},UnorderedGroup:{name:Js.$type,properties:{cardinality:{name:Js.cardinality},elements:{name:Js.elements,defaultValue:[]}},superTypes:[ct.$type]},UntilToken:{name:mr.$type,properties:{cardinality:{name:mr.cardinality},lookahead:{name:mr.lookahead},parenthesized:{name:mr.parenthesized,defaultValue:!1},terminal:{name:mr.terminal}},superTypes:[gt.$type]},ValueLiteral:{name:mi.$type,properties:{},superTypes:[]},Wildcard:{name:Di.$type,properties:{cardinality:{name:Di.cardinality},lookahead:{name:Di.lookahead},parenthesized:{name:Di.parenthesized,defaultValue:!1}},superTypes:[gt.$type]}}}}const ee=new Bd;function Co(t){return new sl(t,e=>Bi(e)?e.content:[],{includeRoot:!0})}function jp(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function No(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function la(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Xt;(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"})(Xt||(Xt={}));function zp(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Xt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Xt.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?Xt.Inside:n?Xt.OverlapBack:r?Xt.OverlapFront:Xt.Outside}function Bp(t,e){return zp(t,e)>Xt.After}const Wp=/^[\w\p{L}]$/u;function Vp(t,e){if(t){const n=Kp(t,!0);if(n&&ql(n,e))return n;if(Fd(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(ql(s,e))return s}}}}function ql(t,e){return Md(t)&&e.includes(t.tokenType.name)}function Kp(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class Wd extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function ss(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function Ya(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function gi(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function rr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Hp(){throw Error("Internal Error - Should never get here!")}function jl(t){return t.type==="Character"}const ua=[];for(let t=W("0");t<=W("9");t++)ua.push(t);const da=[W("_")].concat(ua);for(let t=W("a");t<=W("z");t++)da.push(t);for(let t=W("A");t<=W("Z");t++)da.push(t);const zl=[W(" "),W("\f"),W(`
|
|
2
2
|
`),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")],Yp=/[0-9a-fA-F]/,Ls=/[0-9]/,Xp=/[1-9]/;class Vd{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 n=this.disjunction();this.consumeChar("/");const r={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":gi(r,"global");break;case"i":gi(r,"ignoreCase");break;case"m":gi(r,"multiLine");break;case"u":gi(r,"unicode");break;case"y":gi(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:n,loc:this.loc(0)}}disjunction(){const e=[],n=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(n)}}alternative(){const e=[],n=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(n)}}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 n;switch(this.popChar()){case"=":n="Lookahead";break;case"!":n="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":n="Lookbehind";break;case"!":n="NegativeLookbehind"}break}}rr(n);const r=this.disjunction();return this.consumeChar(")"),{type:n,value:r,loc:this.loc(e)}}return Hp()}quantifier(e=!1){let n;const r=this.idx;switch(this.popChar()){case"*":n={atLeast:0,atMost:1/0};break;case"+":n={atLeast:1,atMost:1/0};break;case"?":n={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":n={atLeast:i,atMost:i};break;case",":let s;this.isDigit()?(s=this.integerIncludingZero(),n={atLeast:i,atMost:s}):n={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&n===void 0)return;rr(n);break}if(!(e===!0&&n===void 0)&&rr(n))return this.peekChar(0)==="?"?(this.consumeChar("?"),n.greedy=!1):n.greedy=!0,n.type="Quantifier",n.loc=this.loc(r),n}atom(){let e;const n=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()),rr(e))return e.loc=this.loc(n),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[W(`
|
|
3
3
|
`),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,n=!1;switch(this.popChar()){case"d":e=ua;break;case"D":e=ua,n=!0;break;case"s":e=zl;break;case"S":e=zl,n=!0;break;case"w":e=da;break;case"W":e=da,n=!0;break}if(rr(e))return{type:"Set",value:e,complement:n}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=W("\f");break;case"n":e=W(`
|
|
4
4
|
`);break;case"r":e=W("\r");break;case"t":e=W(" ");break;case"v":e=W("\v");break}if(rr(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`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aO as Gt,_ as w,s as Wt,g as Kt,t as Ht,q as Yt,a as Xt,b as Zt,K as wt,N as Jt,d as ot,av as Qt,ag as $t,ah as te,ai as ee,e as ne,A as se,H as ie,L as oe}from"./mermaid-O7DHMXV3-BVZ_4MKo.js";import"./vendor-react-Cpt6D04s.js";import"./vendor-codemirror-Dz7_EqNA.js";import"./index-C6Bb2jGF.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>re(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=Et(e);for(let u=0;u<e.length;++u){const r=e[u];r.angle=Math.atan2(r.x-c.x,r.y-c.y)}e.sort((u,r)=>r.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const r=e[u];o+=(h.x+r.x)*(r.y-h.y);const y={x:(r.x+h.x)/2,y:(r.y+h.y)/2};let d=null;for(let b=0;b<r.parentIndex.length;++b)if(h.parentIndex.includes(r.parentIndex[b])){const x=t[r.parentIndex[b]],M=Math.atan2(r.x-x.x,r.y-x.y),A=Math.atan2(h.x-x.x,h.y-x.y);let T=A-M;T<0&&(T+=2*Math.PI);const S=A-T/2;let g=q(y,{x:x.x+x.radius*Math.sin(S),y:x.y+x.radius*Math.cos(S)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:r,p2:h,large:g>x.radius,sweep:!0})}d!=null&&(a.push(d),i+=lt(d.circle.radius,d.width),h=r)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(q(t[u],c)>Math.abs(c.radius-t[u].radius)){h=!0;break}h?i=o=0:(i=c.radius*c.radius*Math.PI,a.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 o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function re(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(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=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,h=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(a/s),r=-(n.x-t.x)*(a/s);return[{x:c+u,y:h-r},{x:c-u,y:h+r}]}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,o=e.tolerance||1e-10,a=t(n),c=t(s);let h=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let u=0;u<i;++u){h/=2;const r=n+h,y=t(r);if(y*a>=0&&(n=r),Math.abs(h)<o||y===0)return r}return n+h}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,a=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,r=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const b=n.length,x=new Array(b+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<b;++v){const l=n.slice();l[v]=l[v]?l[v]*i:o,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[b][l]=v[l];x[b].fx=v.fx}const A=(v,l)=>v.fx-l.fx,T=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(x.sort(A),s.history){const p=x.map(f=>{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});p.sort((f,N)=>f.id-N.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<b;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[b].fx)<a&&d<c)break;for(let p=0;p<b;++p){T[p]=0;for(let f=0;f<b;++f)T[p]+=x[f][p];T[p]/=b}const l=x[b];if(J(S,1+h,T,-h,l),S.fx=t(S),S.fx<x[0].fx)J(m,1+u,T,-u,l),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=x[b-1].fx){let p=!1;if(S.fx>l.fx?(J(g,1+r,T,-r,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(J(g,1-r*h,T,r*h,l),g.fx=t(g),g.fx<S.fx?M(g):p=!0),p){if(y>=1)break;for(let f=1;f<x.length;++f)J(x[f],1-y,x[0],y,x[f]),x[f].fx=t(x[f])}}else M(S)}return x.sort(A),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,o,a){const c=s.fx,h=$(s.fxprime,n);let u=c,r=c,y=h,d=0;i=i||1,o=o||1e-6,a=a||.1;function b(x,M,A){for(let T=0;T<16;++T)if(i=(x+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||u>=A)M=i;else{if(Math.abs(y)<=-a*h)return i;y*(M-x)>=0&&(M=x),x=i,A=u}return 0}for(let x=0;x<10;++x){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||x&&u>=r)return b(d,i,r);if(Math.abs(y)<=-a*h)return i;if(y>=0)return b(i,d,u);r=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 o=n.slice();let a,c,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),ft(a,e.fxprime,-1);for(let r=0;r<u;++r){if(h=ce(t,a,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ft(a,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),d=Math.max(0,$(o,i.fxprime)/y);J(a,d,a,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||tt,i=fe(t,n),o=s(i,n),a=Object.keys(o),c=[];for(const r of a)c.push(o[r].x),c.push(o[r].y);const u=zt(r=>{const y={};for(let d=0;d<a.length;++d){const b=a[d];y[b]={x:r[2*d],y:r[2*d+1],radius:o[b].radius}}return e(y,i)},c,n).x;for(let r=0;r<a.length;++r){const y=a[r];o[y].x=u[2*r],o[y].y=u[2*r+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function fe(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 h of e)for(let u=0;u<h.sets.length;u++){const r=String(h.sets[u]);c.set(r,h.size+(c.get(r)||0));for(let y=u+1;y<h.sets.length;y++){const d=String(h.sets[y]),b=`${r};${d}`,x=`${d};${r}`;c.set(b,h.size+(c.get(b)||0)),c.set(x,h.size+(c.get(x)||0))}}for(const h of e)h.sets.length<3&&(h.size=c.get(i(h.sets)))}const o=[],a=new Set;for(const c of e)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){const h=c.sets[0],u=c.sets[1];a.add(i(c.sets)),a.add(i([u,h]))}o.sort((c,h)=>c===h?0:c<h?-1:1);for(let c=0;c<o.length;++c){const h=o[c];for(let u=c+1;u<o.length;++u){const r=o[u];a.has(i([h,r]))||e.push({sets:[h,r],size:0})}}return e}function he(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],h=Math.sqrt(n[a].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),r=ht(h,u,o.size);e[a][c]=e[c][a]=r;let y=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?y=1:o.size<=1e-10&&(y=-1),i[a][c]=i[c][a]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const a=t[2*o],c=t[2*o+1];for(let h=o+1;h<s.length;++h){const u=t[2*h],r=t[2*h+1],y=s[o][h],d=e[o][h],b=(u-a)*(u-a)+(r-c)*(r-c),x=Math.sqrt(b),M=b-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*o]+=4*M*(a-u),n[2*o+1]+=4*M*(c-r),n[2*h]+=4*M*(u-a),n[2*h+1]+=4*M*(r-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=xe(t,n),o=e(i,t),a=e(s,t);o+1e-8<a&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:o,constraints:a}=he(t,e,i);const c=ut(o.map(ut))/o.length;o=o.map(d=>d.map(b=>b/c));const h=(d,b)=>de(d,b,o,a);let u=null;for(let d=0;d<s;++d){const b=ct(o.length*2).map(Math.random),x=ue(h,b,n);(!u||x.fx<u.fx)&&(u=x)}const r=u.x,y={};for(let d=0;d<e.length;++d){const b=e[d];y[b.sets[0]]={x:r[2*d]*c,y:r[2*d+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const d of n.history)ft(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const b=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[x].size)&&(d=0),i[b].push({set:x,size:y.size,weight:d}),i[x].push({set:b,size:y.size,weight:d})}const o=[];Object.keys(i).forEach(y=>{let d=0;for(let b=0;b<i[y].length;++b)d+=i[y][b].size*i[y][b].weight;o.push({set:y,size:d})});function a(y,d){return d.size-y.size}o.sort(a);const c={};function h(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const d=o[y].set,b=i[d].filter(h),x=e[d];if(b.sort(a),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var r=0;r<b.length;++r){const S=e[b[r].set],g=ht(x.radius,S.radius,b[r].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=r+1;m<b.length;++m){const v=e[b[m].set],l=ht(x.radius,v.radius,b[m].size),p=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let A=1e50,T=M[0];for(const S of M){e[d].x=S.x,e[d].y=S.y;const g=s(e,t);g<A&&(A=g,T=S)}u(T,d)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const a=t[e.sets[0]],c=t[e.sets[1]];i=xt(a.radius,c.radius,q(a,c))}else i=st(e.sets.map(a=>t[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(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]],h=t[e.sets[1]];i=xt(c.radius,h.radius,q(c,h))}else i=st(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function pe(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const h=c.x,u=c.y;c.x=o*h-a*u,c.y=a*h+o*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 o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.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,o){const a=n(i),c=n(o);a.parent=c}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const a=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<a&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,a)=>Math.max(o,a[s]+a.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,a)=>Math.min(o,a[s]-a.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(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 r=dt(u);u.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),u.bounds=r}i.sort((u,r)=>r.size-u.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(u,r,y){if(!u)return;const d=u.bounds;let b,x;if(r)b=o.xRange.max-d.xRange.min+a;else{b=o.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)x=o.yRange.max-d.yRange.min+a;else{x=o.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=b,M.y+=x,e.push(M)}let h=1;for(;h<i.length;)c(i[h],!0,!1),c(i[h+1],!1,!0),c(i[h+2],!0,!0),h+=3,o=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:a,yRange:c}=dt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const b=Math.sqrt(i/Math.PI)*2;h=n/b,u=s/b}else h=n/(a.max-a.min),u=s/(c.max-c.min);const r=Math.min(u,h),y=(n-(a.max-a.min)*r)/2,d=(s-(c.max-c.min)*r)/2;return Ot(o.map(b=>({radius:r*b.radius,x:e+y+(b.x-a.min)*r,y:e+d+(b.y-c.min)*r,setid:b.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,o=1e3,a=Math.PI/2,c=!0,h=null,u=!0,r=!0,y=null,d=null,b=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,A={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(p){if(p in A)return A[p];var f=A[p]=T[S];return S+=1,S>=T.length&&(S=0),f},m=At,v=tt;function l(p){let f=p.datum();const N=new Set;f.forEach(k=>{k.size==0&&k.sets.length==1&&N.add(k.sets[0])}),f=f.filter(k=>!k.sets.some(F=>N.has(F)));let I={},C={};if(f.length>0){let k=m(f,{lossFunction:v,distinct:b});c&&(k=Dt(k,a,d)),I=Nt(k,s,e,i,h),C=jt(I,f,M)}const U={};f.forEach(k=>{k.label&&(U[k.sets]=k.label)});function j(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}p.selectAll("svg").data([I]).enter().append("svg");const E=p.select("svg");n?E.attr("viewBox",`0 0 ${s} ${e}`):E.attr("width",s).attr("height",e);const R={};let _=!1;E.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(_=!0,R[k.sets[0]]=ke(F))});function P(k){return F=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,x)}}const V=E.selectAll(".venn-area").data(f,k=>k.sets),O=V.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=O.append("path"),W=O.append("text").attr("class","label").text(k=>j(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);r&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),W.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=p;_&&typeof z.transition=="function"?(z=K(p),z.selectAll("path").attrTween("d",P)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),x);const L=z.selectAll("text").filter(k=>k.sets in C).text(k=>j(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(_?"on"in L?L.on("end",rt(I,j)):L.each("end",rt(I,j)):L.each(rt(I,j)));const D=K(V.exit()).remove();typeof V.transition=="function"&&D.selectAll("path").attrTween("d",P);const X=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(W.style("font-size","0px"),L.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:V,enter:O,update:z,exit:D}}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?(b=p,l):b},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?(o=p,l):o},l.layoutFunction=function(p){return arguments.length?(m=p,l):m},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(h=p,l):h},l.styled=function(p){return arguments.length?(r=p,l):r},l.orientation=function(p){return arguments.length?(a=p,l):a},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?tt:p==="logRatio"?Ct:p,l):v},l}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),h=(o.length+a.length)/3;let u=a.pop(),r=[u],y=0;const d=1.1;e.textContent=null;const b=[];function x(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=x(u);for(;u=a.pop(),!!u;){r.push(u);const g=r.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(r.pop(),M.textContent=r.join(" "),r=[u],M=x(u),y++)}const A=.35-y*d/2,T=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",S),g.setAttribute("dy",`${A+m*d}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function Lt(t,n,s){const e=[];for(const r of t)e.push({x:r.x,y:r.y}),e.push({x:r.x+r.radius/2,y:r.y}),e.push({x:r.x-r.radius/2,y:r.y}),e.push({x:r.x,y:r.y+r.radius/2}),e.push({x:r.x,y:r.y-r.radius/2});let i=e[0],o=at(e[0],t,n);for(let r=1;r<e.length;++r){const y=at(e[r],t,n);y>=o&&(i=e[r],o=y)}const a=zt(r=>-1*at({x:r[0],y:r[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let h=!0;for(const r of t)if(q(c,r)>r.radius){h=!1;break}for(const r of n)if(q(c,r)<r.radius){h=!1;break}if(h)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Et(u.arcs.map(r=>r.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let a=e+1;a<s.length;++a){const c=s[a],h=t[c],u=q(o,h);u+h.radius<=o.radius+1e-10?n[c].push(i):u+o.radius<=h.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let o=0;o<n.length;++o){const a=n[o].sets,c={},h={};for(let d=0;d<a.length;++d){c[a[d]]=!0;const b=i[a[d]];for(let x=0;x<b.length;++x)h[b[x]]=!0}const u=[],r=[];for(let d in t)d in c?u.push(t[d]):d in h||r.push(t[d]);const y=Lt(u,r,s);e[a]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{aO as Gt,_ as w,s as Wt,g as Kt,t as Ht,q as Yt,a as Xt,b as Zt,K as wt,N as Jt,d as ot,av as Qt,ag as $t,ah as te,ai as ee,e as ne,A as se,H as ie,L as oe}from"./mermaid-O7DHMXV3-KLW3VWsF.js";import"./vendor-react-Cpt6D04s.js";import"./vendor-codemirror-Dz7_EqNA.js";import"./index-EMGPq9Uy.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>re(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=Et(e);for(let u=0;u<e.length;++u){const r=e[u];r.angle=Math.atan2(r.x-c.x,r.y-c.y)}e.sort((u,r)=>r.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const r=e[u];o+=(h.x+r.x)*(r.y-h.y);const y={x:(r.x+h.x)/2,y:(r.y+h.y)/2};let d=null;for(let b=0;b<r.parentIndex.length;++b)if(h.parentIndex.includes(r.parentIndex[b])){const x=t[r.parentIndex[b]],M=Math.atan2(r.x-x.x,r.y-x.y),A=Math.atan2(h.x-x.x,h.y-x.y);let T=A-M;T<0&&(T+=2*Math.PI);const S=A-T/2;let g=q(y,{x:x.x+x.radius*Math.sin(S),y:x.y+x.radius*Math.cos(S)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:r,p2:h,large:g>x.radius,sweep:!0})}d!=null&&(a.push(d),i+=lt(d.circle.radius,d.width),h=r)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(q(t[u],c)>Math.abs(c.radius-t[u].radius)){h=!0;break}h?i=o=0:(i=c.radius*c.radius*Math.PI,a.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 o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function re(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(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=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,h=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(a/s),r=-(n.x-t.x)*(a/s);return[{x:c+u,y:h-r},{x:c-u,y:h+r}]}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,o=e.tolerance||1e-10,a=t(n),c=t(s);let h=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let u=0;u<i;++u){h/=2;const r=n+h,y=t(r);if(y*a>=0&&(n=r),Math.abs(h)<o||y===0)return r}return n+h}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,a=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,r=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const b=n.length,x=new Array(b+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<b;++v){const l=n.slice();l[v]=l[v]?l[v]*i:o,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[b][l]=v[l];x[b].fx=v.fx}const A=(v,l)=>v.fx-l.fx,T=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(x.sort(A),s.history){const p=x.map(f=>{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});p.sort((f,N)=>f.id-N.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<b;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[b].fx)<a&&d<c)break;for(let p=0;p<b;++p){T[p]=0;for(let f=0;f<b;++f)T[p]+=x[f][p];T[p]/=b}const l=x[b];if(J(S,1+h,T,-h,l),S.fx=t(S),S.fx<x[0].fx)J(m,1+u,T,-u,l),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=x[b-1].fx){let p=!1;if(S.fx>l.fx?(J(g,1+r,T,-r,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(J(g,1-r*h,T,r*h,l),g.fx=t(g),g.fx<S.fx?M(g):p=!0),p){if(y>=1)break;for(let f=1;f<x.length;++f)J(x[f],1-y,x[0],y,x[f]),x[f].fx=t(x[f])}}else M(S)}return x.sort(A),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,o,a){const c=s.fx,h=$(s.fxprime,n);let u=c,r=c,y=h,d=0;i=i||1,o=o||1e-6,a=a||.1;function b(x,M,A){for(let T=0;T<16;++T)if(i=(x+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||u>=A)M=i;else{if(Math.abs(y)<=-a*h)return i;y*(M-x)>=0&&(M=x),x=i,A=u}return 0}for(let x=0;x<10;++x){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||x&&u>=r)return b(d,i,r);if(Math.abs(y)<=-a*h)return i;if(y>=0)return b(i,d,u);r=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 o=n.slice();let a,c,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),ft(a,e.fxprime,-1);for(let r=0;r<u;++r){if(h=ce(t,a,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ft(a,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),d=Math.max(0,$(o,i.fxprime)/y);J(a,d,a,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||tt,i=fe(t,n),o=s(i,n),a=Object.keys(o),c=[];for(const r of a)c.push(o[r].x),c.push(o[r].y);const u=zt(r=>{const y={};for(let d=0;d<a.length;++d){const b=a[d];y[b]={x:r[2*d],y:r[2*d+1],radius:o[b].radius}}return e(y,i)},c,n).x;for(let r=0;r<a.length;++r){const y=a[r];o[y].x=u[2*r],o[y].y=u[2*r+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function fe(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 h of e)for(let u=0;u<h.sets.length;u++){const r=String(h.sets[u]);c.set(r,h.size+(c.get(r)||0));for(let y=u+1;y<h.sets.length;y++){const d=String(h.sets[y]),b=`${r};${d}`,x=`${d};${r}`;c.set(b,h.size+(c.get(b)||0)),c.set(x,h.size+(c.get(x)||0))}}for(const h of e)h.sets.length<3&&(h.size=c.get(i(h.sets)))}const o=[],a=new Set;for(const c of e)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){const h=c.sets[0],u=c.sets[1];a.add(i(c.sets)),a.add(i([u,h]))}o.sort((c,h)=>c===h?0:c<h?-1:1);for(let c=0;c<o.length;++c){const h=o[c];for(let u=c+1;u<o.length;++u){const r=o[u];a.has(i([h,r]))||e.push({sets:[h,r],size:0})}}return e}function he(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],h=Math.sqrt(n[a].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),r=ht(h,u,o.size);e[a][c]=e[c][a]=r;let y=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?y=1:o.size<=1e-10&&(y=-1),i[a][c]=i[c][a]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const a=t[2*o],c=t[2*o+1];for(let h=o+1;h<s.length;++h){const u=t[2*h],r=t[2*h+1],y=s[o][h],d=e[o][h],b=(u-a)*(u-a)+(r-c)*(r-c),x=Math.sqrt(b),M=b-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*o]+=4*M*(a-u),n[2*o+1]+=4*M*(c-r),n[2*h]+=4*M*(u-a),n[2*h+1]+=4*M*(r-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=xe(t,n),o=e(i,t),a=e(s,t);o+1e-8<a&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:o,constraints:a}=he(t,e,i);const c=ut(o.map(ut))/o.length;o=o.map(d=>d.map(b=>b/c));const h=(d,b)=>de(d,b,o,a);let u=null;for(let d=0;d<s;++d){const b=ct(o.length*2).map(Math.random),x=ue(h,b,n);(!u||x.fx<u.fx)&&(u=x)}const r=u.x,y={};for(let d=0;d<e.length;++d){const b=e[d];y[b.sets[0]]={x:r[2*d]*c,y:r[2*d+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const d of n.history)ft(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const b=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[x].size)&&(d=0),i[b].push({set:x,size:y.size,weight:d}),i[x].push({set:b,size:y.size,weight:d})}const o=[];Object.keys(i).forEach(y=>{let d=0;for(let b=0;b<i[y].length;++b)d+=i[y][b].size*i[y][b].weight;o.push({set:y,size:d})});function a(y,d){return d.size-y.size}o.sort(a);const c={};function h(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const d=o[y].set,b=i[d].filter(h),x=e[d];if(b.sort(a),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var r=0;r<b.length;++r){const S=e[b[r].set],g=ht(x.radius,S.radius,b[r].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=r+1;m<b.length;++m){const v=e[b[m].set],l=ht(x.radius,v.radius,b[m].size),p=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let A=1e50,T=M[0];for(const S of M){e[d].x=S.x,e[d].y=S.y;const g=s(e,t);g<A&&(A=g,T=S)}u(T,d)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const a=t[e.sets[0]],c=t[e.sets[1]];i=xt(a.radius,c.radius,q(a,c))}else i=st(e.sets.map(a=>t[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(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]],h=t[e.sets[1]];i=xt(c.radius,h.radius,q(c,h))}else i=st(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function pe(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const h=c.x,u=c.y;c.x=o*h-a*u,c.y=a*h+o*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 o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.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,o){const a=n(i),c=n(o);a.parent=c}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const a=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<a&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,a)=>Math.max(o,a[s]+a.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,a)=>Math.min(o,a[s]-a.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(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 r=dt(u);u.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),u.bounds=r}i.sort((u,r)=>r.size-u.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(u,r,y){if(!u)return;const d=u.bounds;let b,x;if(r)b=o.xRange.max-d.xRange.min+a;else{b=o.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)x=o.yRange.max-d.yRange.min+a;else{x=o.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=b,M.y+=x,e.push(M)}let h=1;for(;h<i.length;)c(i[h],!0,!1),c(i[h+1],!1,!0),c(i[h+2],!0,!0),h+=3,o=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:a,yRange:c}=dt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const b=Math.sqrt(i/Math.PI)*2;h=n/b,u=s/b}else h=n/(a.max-a.min),u=s/(c.max-c.min);const r=Math.min(u,h),y=(n-(a.max-a.min)*r)/2,d=(s-(c.max-c.min)*r)/2;return Ot(o.map(b=>({radius:r*b.radius,x:e+y+(b.x-a.min)*r,y:e+d+(b.y-c.min)*r,setid:b.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,o=1e3,a=Math.PI/2,c=!0,h=null,u=!0,r=!0,y=null,d=null,b=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,A={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(p){if(p in A)return A[p];var f=A[p]=T[S];return S+=1,S>=T.length&&(S=0),f},m=At,v=tt;function l(p){let f=p.datum();const N=new Set;f.forEach(k=>{k.size==0&&k.sets.length==1&&N.add(k.sets[0])}),f=f.filter(k=>!k.sets.some(F=>N.has(F)));let I={},C={};if(f.length>0){let k=m(f,{lossFunction:v,distinct:b});c&&(k=Dt(k,a,d)),I=Nt(k,s,e,i,h),C=jt(I,f,M)}const U={};f.forEach(k=>{k.label&&(U[k.sets]=k.label)});function j(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}p.selectAll("svg").data([I]).enter().append("svg");const E=p.select("svg");n?E.attr("viewBox",`0 0 ${s} ${e}`):E.attr("width",s).attr("height",e);const R={};let _=!1;E.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(_=!0,R[k.sets[0]]=ke(F))});function P(k){return F=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,x)}}const V=E.selectAll(".venn-area").data(f,k=>k.sets),O=V.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=O.append("path"),W=O.append("text").attr("class","label").text(k=>j(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);r&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),W.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=p;_&&typeof z.transition=="function"?(z=K(p),z.selectAll("path").attrTween("d",P)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),x);const L=z.selectAll("text").filter(k=>k.sets in C).text(k=>j(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(_?"on"in L?L.on("end",rt(I,j)):L.each("end",rt(I,j)):L.each(rt(I,j)));const D=K(V.exit()).remove();typeof V.transition=="function"&&D.selectAll("path").attrTween("d",P);const X=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(W.style("font-size","0px"),L.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:V,enter:O,update:z,exit:D}}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?(b=p,l):b},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?(o=p,l):o},l.layoutFunction=function(p){return arguments.length?(m=p,l):m},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(h=p,l):h},l.styled=function(p){return arguments.length?(r=p,l):r},l.orientation=function(p){return arguments.length?(a=p,l):a},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?tt:p==="logRatio"?Ct:p,l):v},l}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),h=(o.length+a.length)/3;let u=a.pop(),r=[u],y=0;const d=1.1;e.textContent=null;const b=[];function x(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=x(u);for(;u=a.pop(),!!u;){r.push(u);const g=r.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(r.pop(),M.textContent=r.join(" "),r=[u],M=x(u),y++)}const A=.35-y*d/2,T=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",S),g.setAttribute("dy",`${A+m*d}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function Lt(t,n,s){const e=[];for(const r of t)e.push({x:r.x,y:r.y}),e.push({x:r.x+r.radius/2,y:r.y}),e.push({x:r.x-r.radius/2,y:r.y}),e.push({x:r.x,y:r.y+r.radius/2}),e.push({x:r.x,y:r.y-r.radius/2});let i=e[0],o=at(e[0],t,n);for(let r=1;r<e.length;++r){const y=at(e[r],t,n);y>=o&&(i=e[r],o=y)}const a=zt(r=>-1*at({x:r[0],y:r[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let h=!0;for(const r of t)if(q(c,r)>r.radius){h=!1;break}for(const r of n)if(q(c,r)<r.radius){h=!1;break}if(h)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Et(u.arcs.map(r=>r.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let a=e+1;a<s.length;++a){const c=s[a],h=t[c],u=q(o,h);u+h.radius<=o.radius+1e-10?n[c].push(i):u+o.radius<=h.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let o=0;o<n.length;++o){const a=n[o].sets,c={},h={};for(let d=0;d<a.length;++d){c[a[d]]=!0;const b=i[a[d]];for(let x=0;x<b.length;++x)h[b[x]]=!0}const u=[],r=[];for(let d in t)d in c?u.push(t[d]):d in h||r.push(t[d]);const y=Lt(u,r,s);e[a]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|