orbitchat 3.7.3 → 3.8.0
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/{ChartRenderer-DT_xMTNY.js → ChartRenderer-BtP6M888.js} +1 -1
- package/dist/assets/{MermaidRenderer-VYLR5GOS.js → MermaidRenderer-COe0fSY4.js} +5 -5
- package/dist/assets/{MusicRenderer-_8UTyAE7.js → MusicRenderer-3SlVL3Cp.js} +2 -2
- package/dist/assets/{SVGRenderer-llAKIC2k.js → SVGRenderer-DmGNRIG9.js} +1 -1
- package/dist/assets/{_baseUniq-CR0YkvNb.js → _baseUniq-VCPfrKF9.js} +1 -1
- package/dist/assets/{architectureDiagram-Q4EWVU46-lUo-DTHd.js → architectureDiagram-Q4EWVU46-CAb7SpHy.js} +1 -1
- package/dist/assets/{blockDiagram-DXYQGD6D-Daa_MZkW.js → blockDiagram-DXYQGD6D-zF0XhzrV.js} +1 -1
- package/dist/assets/{c4Diagram-AHTNJAMY-BFQaT7dL.js → c4Diagram-AHTNJAMY-CtXcWimM.js} +1 -1
- package/dist/assets/channel-mf4dnkHE.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-C-cKCdxs.js → chunk-4BX2VUAB-CLoswc9M.js} +1 -1
- package/dist/assets/{chunk-4TB4RGXK-DEBJORqa.js → chunk-4TB4RGXK-DYggF6Hx.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-COFVd3oq.js → chunk-55IACEB6-DUwnnktj.js} +1 -1
- package/dist/assets/{chunk-EDXVE4YY-DRSMNuYZ.js → chunk-EDXVE4YY-CCUnR99_.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-B0p-wnvB.js → chunk-FMBD7UC4-D__vucyu.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-DUwtANXT.js → chunk-OYMX7WX6-BSP0bfYC.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-C1f5xdda.js → chunk-QZHKN3VN-DoM7nTge.js} +1 -1
- package/dist/assets/{chunk-YZCP3GAM-1aFbRa3d.js → chunk-YZCP3GAM-97a1xbVl.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-DZbkhyES.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-DZbkhyES.js +1 -0
- package/dist/assets/clone-3PY4S2rf.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-DdBj_0M_.js → cose-bilkent-S5V4N54A-D9pIdP63.js} +1 -1
- package/dist/assets/{dagre-KV5264BT-DyZwu9_D.js → dagre-KV5264BT-R4kA6TEm.js} +1 -1
- package/dist/assets/{diagram-5BDNPKRD-DkviKgtE.js → diagram-5BDNPKRD-Ck9sbNIl.js} +1 -1
- package/dist/assets/{diagram-G4DWMVQ6-BMrayBwe.js → diagram-G4DWMVQ6-By6yL4TG.js} +1 -1
- package/dist/assets/{diagram-MMDJMWI5-DZyfU7g3.js → diagram-MMDJMWI5-76UpTtZI.js} +1 -1
- package/dist/assets/{diagram-TYMM5635-PcU8mRno.js → diagram-TYMM5635-DUXBFLDY.js} +1 -1
- package/dist/assets/{erDiagram-SMLLAGMA-BuflP4ph.js → erDiagram-SMLLAGMA-dvTwP73Z.js} +1 -1
- package/dist/assets/{flowDiagram-DWJPFMVM-Dg8lsF8D.js → flowDiagram-DWJPFMVM-nUn8ioKQ.js} +1 -1
- package/dist/assets/{ganttDiagram-T4ZO3ILL-Cq-i7uzT.js → ganttDiagram-T4ZO3ILL-CdmMf_Xs.js} +1 -1
- package/dist/assets/{gitGraphDiagram-UUTBAWPF-ZBJydDfs.js → gitGraphDiagram-UUTBAWPF-Bq_AcfFW.js} +1 -1
- package/dist/assets/{graph-k6HtItlT.js → graph-Bnw4Q1d0.js} +1 -1
- package/dist/assets/{index-DlXfDyTk.js → index-CoDZInz3.js} +1 -1
- package/dist/assets/index-CtoiZ6Pv.js +643 -0
- package/dist/assets/index-DoqRNkTy.css +1 -0
- package/dist/assets/{infoDiagram-42DDH7IO-Df-xUCwW.js → infoDiagram-42DDH7IO-BLmflRAX.js} +1 -1
- package/dist/assets/{ishikawaDiagram-UXIWVN3A-BMKEFo3x.js → ishikawaDiagram-UXIWVN3A-CrE4ugEq.js} +1 -1
- package/dist/assets/{journeyDiagram-VCZTEJTY-DLOQW0xz.js → journeyDiagram-VCZTEJTY-fU5W-l6c.js} +1 -1
- package/dist/assets/{kanban-definition-6JOO6SKY-Lu5bOTRm.js → kanban-definition-6JOO6SKY-fm7YcdsI.js} +1 -1
- package/dist/assets/{layout-DLET05W6.js → layout-DpP4BBzL.js} +1 -1
- package/dist/assets/{min-Dac9u-c-.js → min-CqAOoSgE.js} +1 -1
- package/dist/assets/{mindmap-definition-QFDTVHPH-Cxl8VK02.js → mindmap-definition-QFDTVHPH-XRFMFwUx.js} +1 -1
- package/dist/assets/{pieDiagram-DEJITSTG-ChviersA.js → pieDiagram-DEJITSTG-kiLqOnvB.js} +1 -1
- package/dist/assets/{quadrantDiagram-34T5L4WZ-DabOqfH9.js → quadrantDiagram-34T5L4WZ-B0Iiewfx.js} +1 -1
- package/dist/assets/{requirementDiagram-MS252O5E-B-QfnoHc.js → requirementDiagram-MS252O5E-BrHeAbUK.js} +1 -1
- package/dist/assets/{sankeyDiagram-XADWPNL6-1odiQfVY.js → sankeyDiagram-XADWPNL6-d3u5t5tk.js} +1 -1
- package/dist/assets/{sequenceDiagram-FGHM5R23-D6Ktga09.js → sequenceDiagram-FGHM5R23-DAe0V9U4.js} +1 -1
- package/dist/assets/{stateDiagram-FHFEXIEX-BD9nZGbD.js → stateDiagram-FHFEXIEX-NTviBaYL.js} +1 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-DS4y8FWC.js +1 -0
- package/dist/assets/{timeline-definition-GMOUNBTQ-BSjQXl6e.js → timeline-definition-GMOUNBTQ-DfsdKhLR.js} +1 -1
- package/dist/assets/{vennDiagram-DHZGUBPP-CXhWj2N5.js → vennDiagram-DHZGUBPP-CrLXjk0j.js} +1 -1
- package/dist/assets/{wardley-RL74JXVD-BeNdW1Kn.js → wardley-RL74JXVD-9q7UxPyC.js} +1 -1
- package/dist/assets/{wardleyDiagram-NUSXRM2D-Nhgn3KBd.js → wardleyDiagram-NUSXRM2D-D4HzW-Z_.js} +1 -1
- package/dist/assets/{xychartDiagram-5P7HB3ND-DW0WLkNW.js → xychartDiagram-5P7HB3ND-B4oqzUM2.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/sitemap.xml +14 -10
- package/package.json +1 -1
- package/dist/assets/channel-Dpew0xmp.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-CnbcCnHu.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-CnbcCnHu.js +0 -1
- package/dist/assets/clone-D0m7yD1h.js +0 -1
- package/dist/assets/index-BsCzlXF7.css +0 -1
- package/dist/assets/index-CFJE7oH8.js +0 -617
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-Bz5NAWkr.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{al as Gt,s as Wt,g as Kt,q as Ht,p as Yt,a as Xt,b as Zt,_ as S,C as St,H as Jt,d as rt,ab as Qt,T as $t,U as te,V as ee,e as ne,y as se,E as ie,F as re}from"./MermaidRenderer-VYLR5GOS.js";import"./index-CFJE7oH8.js";import"./purify.es-BlZidd4c.js";import"./step-EjIQ8UIn.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-c.x,a.y-c.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(f.parentIndex.includes(a.parentIndex[m])){const x=t[a.parentIndex[m]],M=Math.atan2(a.x-x.x,a.y-x.y),E=Math.atan2(f.x-x.x,f.y-x.y);let _=E-M;_<0&&(_+=2*Math.PI);const w=E-_/2;let g=W(y,{x:x.x+x.radius*Math.sin(w),y:x.y+x.radius*Math.cos(w)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(W(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>W(t,s)<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 r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function W(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=W(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}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 tt(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(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,x=new Array(m+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<m;++v){const l=n.slice();l[v]=l[v]?l[v]*i:r,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[m][l]=v[l];x[m].fx=v.fx}const E=(v,l)=>v.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(x.sort(E),s.history){const p=x.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<m;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[m].fx)<o&&d<c)break;for(let p=0;p<m;++p){_[p]=0;for(let h=0;h<m;++h)_[p]+=x[h][p];_[p]/=m}const l=x[m];if(Q(w,1+f,_,-f,l),w.fx=t(w),w.fx<x[0].fx)Q(b,1+u,_,-u,l),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(Q(g,1-a*f,_,a*f,l),g.fx=t(g),g.fx<w.fx?M(g):p=!0),p){if(y>=1)break;for(let h=1;h<x.length;++h)Q(x[h],1-y,x[0],y,x[h]),x[h].fx=t(x[h])}}else M(w)}return x.sort(E),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,r,o){const c=s.fx,f=tt(s.fxprime,n);let u=c,a=c,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(x,M,E){for(let _=0;_<16;++_)if(i=(x+M)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||u>=E)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,E=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ce(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ht(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);Q(o,d,o,-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:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||et,i=he(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const a of o)c.push(r[a].x),c.push(r[a].y);const u=zt(a=>{const y={};for(let d=0;d<o.length;++d){const m=o[d];y[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(y,i)},c,n).x;for(let a=0;a<o.length;++a){const y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}const Rt=1e-10;function ft(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 he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);c.set(a,f.size+(c.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const d=String(f.sets[y]),m=`${a};${d}`,x=`${d};${a}`;c.set(m,f.size+(c.get(m)||0)),c.set(x,f.size+(c.get(x)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function fe(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],m=(u-o)*(u-o)+(a-c)*(a-c),x=Math.sqrt(m),M=m-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(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:r,constraints:o}=fe(t,e,i);const c=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),x=ue(f,m,n);(!u||x.fx<u.fx)&&(u=x)}const a=u.x,y={};for(let d=0;d<e.length;++d){const m=e[d];y[m.sets[0]]={x:a[2*d]*c,y:a[2*d+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:et,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 m=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;m<i[y].length;++m)d+=i[y][m].size*i[y][m].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);const c={};function f(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},r[0].set);for(let y=1;y<r.length;++y){const d=r[y].set,m=i[d].filter(f),x=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(x.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],l=ft(x.radius,v.radius,m[b].size),p=Tt({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let E=1e50,_=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<E&&(E=g,_=w)}u(_,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=xt(o.radius,c.radius,W(o,c))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(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]],f=t[e.sets[1]];i=xt(c.radius,f.radius,W(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&W(t[0],t[1])<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,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;W(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function 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 a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=dt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const m=Math.sqrt(i/Math.PI)*2;f=n/m,u=s/m}else f=n/(o.max-o.min),u=s/(c.max-c.min);const a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(c.max-c.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in E)return E[p];var h=E[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Dt(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const Y={};h.forEach(I=>{I.label&&(Y[I.sets]=I.label)});function B(I){if(I.sets in Y)return Y[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const G=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(G,x)}}const C=U.selectAll(".venn-area").data(h,I=>I.sets),O=C.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function R(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let T=p;z&&typeof T.transition=="function"?(T=R(p),T.selectAll("path").attrTween("d",A)):T.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=T.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const D=R(C.exit()).remove();typeof C.transition=="function"&&D.selectAll("path").attrTween("d",A);const X=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),X.style("font-size","0px")),{circles:k,textCentres:N,nodes:C,enter:O,update:T,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?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Ct:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const E=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-W(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-W(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=W(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Lt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(W(c,a)>a.radius){f=!1;break}for(const a of n)if(W(c,a)<a.radius){f=!1;break}if(f)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(a=>a.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],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=W(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let d=0;d<o.length;++d){c[o[d]]=!0;const m=i[o[d]];for(let x=0;x<m.length;++x)f[m[x]]=!0}const u=[],a=[];for(let d in t)d in c?u.push(t[d]):d in f||a.push(t[d]);const y=Lt(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{al as Gt,s as Wt,g as Kt,q as Ht,p as Yt,a as Xt,b as Zt,_ as S,C as St,H as Jt,d as rt,ab as Qt,T as $t,U as te,V as ee,e as ne,y as se,E as ie,F as re}from"./MermaidRenderer-COe0fSY4.js";import"./index-CtoiZ6Pv.js";import"./purify.es-BlZidd4c.js";import"./step-EjIQ8UIn.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-c.x,a.y-c.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(f.parentIndex.includes(a.parentIndex[m])){const x=t[a.parentIndex[m]],M=Math.atan2(a.x-x.x,a.y-x.y),E=Math.atan2(f.x-x.x,f.y-x.y);let _=E-M;_<0&&(_+=2*Math.PI);const w=E-_/2;let g=W(y,{x:x.x+x.radius*Math.sin(w),y:x.y+x.radius*Math.cos(w)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(W(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>W(t,s)<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 r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function W(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=W(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}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 tt(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(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,x=new Array(m+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<m;++v){const l=n.slice();l[v]=l[v]?l[v]*i:r,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[m][l]=v[l];x[m].fx=v.fx}const E=(v,l)=>v.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(x.sort(E),s.history){const p=x.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<m;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[m].fx)<o&&d<c)break;for(let p=0;p<m;++p){_[p]=0;for(let h=0;h<m;++h)_[p]+=x[h][p];_[p]/=m}const l=x[m];if(Q(w,1+f,_,-f,l),w.fx=t(w),w.fx<x[0].fx)Q(b,1+u,_,-u,l),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(Q(g,1-a*f,_,a*f,l),g.fx=t(g),g.fx<w.fx?M(g):p=!0),p){if(y>=1)break;for(let h=1;h<x.length;++h)Q(x[h],1-y,x[0],y,x[h]),x[h].fx=t(x[h])}}else M(w)}return x.sort(E),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,r,o){const c=s.fx,f=tt(s.fxprime,n);let u=c,a=c,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(x,M,E){for(let _=0;_<16;++_)if(i=(x+M)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||u>=E)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,E=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ce(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ht(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);Q(o,d,o,-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:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||et,i=he(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const a of o)c.push(r[a].x),c.push(r[a].y);const u=zt(a=>{const y={};for(let d=0;d<o.length;++d){const m=o[d];y[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(y,i)},c,n).x;for(let a=0;a<o.length;++a){const y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}const Rt=1e-10;function ft(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 he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);c.set(a,f.size+(c.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const d=String(f.sets[y]),m=`${a};${d}`,x=`${d};${a}`;c.set(m,f.size+(c.get(m)||0)),c.set(x,f.size+(c.get(x)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function fe(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],m=(u-o)*(u-o)+(a-c)*(a-c),x=Math.sqrt(m),M=m-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(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:r,constraints:o}=fe(t,e,i);const c=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),x=ue(f,m,n);(!u||x.fx<u.fx)&&(u=x)}const a=u.x,y={};for(let d=0;d<e.length;++d){const m=e[d];y[m.sets[0]]={x:a[2*d]*c,y:a[2*d+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:et,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 m=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;m<i[y].length;++m)d+=i[y][m].size*i[y][m].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);const c={};function f(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},r[0].set);for(let y=1;y<r.length;++y){const d=r[y].set,m=i[d].filter(f),x=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(x.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],l=ft(x.radius,v.radius,m[b].size),p=Tt({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let E=1e50,_=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<E&&(E=g,_=w)}u(_,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=xt(o.radius,c.radius,W(o,c))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(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]],f=t[e.sets[1]];i=xt(c.radius,f.radius,W(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&W(t[0],t[1])<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,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;W(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function 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 a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=dt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const m=Math.sqrt(i/Math.PI)*2;f=n/m,u=s/m}else f=n/(o.max-o.min),u=s/(c.max-c.min);const a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(c.max-c.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in E)return E[p];var h=E[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Dt(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const Y={};h.forEach(I=>{I.label&&(Y[I.sets]=I.label)});function B(I){if(I.sets in Y)return Y[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const G=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(G,x)}}const C=U.selectAll(".venn-area").data(h,I=>I.sets),O=C.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function R(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let T=p;z&&typeof T.transition=="function"?(T=R(p),T.selectAll("path").attrTween("d",A)):T.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=T.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const D=R(C.exit()).remove();typeof C.transition=="function"&&D.selectAll("path").attrTween("d",A);const X=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),X.style("font-size","0px")),{circles:k,textCentres:N,nodes:C,enter:O,update:T,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?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Ct:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const E=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-W(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-W(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=W(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Lt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(W(c,a)>a.radius){f=!1;break}for(const a of n)if(W(c,a)<a.radius){f=!1;break}if(f)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(a=>a.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],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=W(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let d=0;d<o.length;++d){c[o[d]]=!0;const m=i[o[d]];for(let x=0;x<m.length;++x)f[m[x]]=!0}const u=[],a=[];for(let d in t)d in c?u.push(t[d]):d in f||a.push(t[d]);const y=Lt(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" 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(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Gp=Object.defineProperty;var jp=(t,e,r)=>e in t?Gp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var er=(t,e,r)=>jp(t,typeof e!="symbol"?e+"":e,r);import{c as at,b as zp,_ as Ot}from"./index-CFJE7oH8.js";import{m as Gt,f as Up,d as Bp}from"./min-Dac9u-c-.js";import{b as Wp,l as Kp,c as Vp,m as qp,r as Yc,n as no}from"./_baseUniq-CR0YkvNb.js";import{aP as Hp}from"./MermaidRenderer-VYLR5GOS.js";function Xp(t,e){return Wp(Gt(t,e))}function Yp(t,e){return t&&t.length?Kp(t,Vp(e)):[]}function je(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function pt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function rr(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Jp(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function ci(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Nd{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=(i=r.properties[e.property])==null?void 0:i.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return je(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const i=n[r];if(i!==void 0)return i;{const a=this.types[e],s=a?a.superTypes.some(o=>this.isSubtype(o,r)):!1;return n[r]=s,s}}getAllSubTypes(e){const r=this.allSubtypes[e];if(r)return r;{const n=this.getAllTypes(),i=[];for(const a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}}function Oi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function _d(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Id(t){return Oi(t)&&typeof t.fullText=="string"}class xe{constructor(e,r){this.startFn=e,this.nextFn=r}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 r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){const e=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){const n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){return new xe(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return Qe})}join(e=","){const r=this.iterator();let n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=Zp(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){const n=this.iterator();let i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new xe(this.startFn,r=>{const{done:n,value:i}=this.nextFn(r);return n?Qe:{done:!1,value:e(i)}})}filter(e){return new xe(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return Qe})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){const n=this.iterator();let i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){const i=e.next();if(i.done)return n;const a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new xe(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:n,value:i}=this.nextFn(r.this);if(!n){const a=e(i);if(es(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Qe})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new xe(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:i,value:a}=r.nextFn(n.this);if(!i)if(es(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Qe})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new xe(()=>{const r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new xe(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Qe:this.nextFn(r.state)))}distinct(e){return new xe(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return Qe})}exclude(e,r){const n=new Set;for(const i of e){const a=r?r(i):i;n.add(a)}return this.filter(i=>{const a=r?r(i):i;return!n.has(a)})}}function Zp(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function es(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Pd=new xe(()=>{},()=>Qe),Qe=Object.freeze({done:!0,value:void 0});function ce(...t){if(t.length===1){const e=t[0];if(e instanceof xe)return e;if(es(e))return new xe(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new xe(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:Qe)}return t.length>1?new xe(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const r=t[e.collIndex++];es(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return Qe}):Pd}class Sc extends xe{constructor(e,r,n){super(()=>({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return Qe})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Io;(function(t){function e(a){return a.reduce((s,o)=>s+o,0)}t.sum=e;function r(a){return a.reduce((s,o)=>s*o,0)}t.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}t.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}t.max=i})(Io||(Io={}));function Po(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((i,a)=>{je(i)&&(i.$container=t,i.$containerProperty=r,i.$containerIndex=a,e.deep&&Po(i,e))}):je(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&Po(n,e)))}function _s(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function jt(t){const r=Ga(t).$document;if(!r)throw new Error("AST node has no document.");return r}function Ga(t){for(;t.$container;)t=t.$container;return t}function Jc(t){return pt(t)?t.ref?[t.ref]:[]:rr(t)?t.items.map(e=>e.ref):[]}function wc(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e==null?void 0:e.range;return new xe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){const i=n.keys[n.keyIndex];if(!i.startsWith("$")){const a=t[i];if(je(a)){if(n.keyIndex++,Zc(a,r))return{done:!1,value:a}}else if(Array.isArray(a)){for(;n.arrayIndex<a.length;){const s=n.arrayIndex++,o=a[s];if(je(o)&&Zc(o,r))return{done:!1,value:o}}n.arrayIndex=0}}n.keyIndex++}return Qe})}function Hi(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Sc(t,r=>wc(r,e))}function zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Sc(t,r=>wc(r,e),{includeRoot:!0})}function Zc(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)==null?void 0:n.range;return r?Em(r,e):!1}function ts(t){return new xe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const r=e.keys[e.keyIndex];if(!r.startsWith("$")){const n=t[r];if(pt(n)||rr(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){const i=e.arrayIndex++,a=n[i];if(pt(a)||rr(n))return{done:!1,value:{reference:a,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Qe})}function Qp(t,e){const r=t.getTypeMetaData(e.$type),n=e;for(const i of Object.values(r.properties))i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=Od(i.defaultValue))}function Od(t){return Array.isArray(t)?[...t.map(Od)]:t}const Ze={$type:"AbstractElement",cardinality:"cardinality"};function em(t){return Y.isInstance(t,Ze.$type)}const ja={$type:"AbstractParserRule"};function Xi(t){return Y.isInstance(t,ja.$type)}const Ea={$type:"AbstractRule"},ft={$type:"AbstractType"},Er={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Is(t){return Y.isInstance(t,Er.$type)}const za={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function Ld(t){return Y.isInstance(t,za.$type)}const Qc={$type:"ArrayLiteral",elements:"elements"},eu={$type:"ArrayType",elementType:"elementType"},Ar={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function _r(t){return Y.isInstance(t,Ar.$type)}const Oo={$type:"BooleanLiteral",true:"true"};function tm(t){return Y.isInstance(t,Oo.$type)}const $r={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function rm(t){return Y.isInstance(t,$r.$type)}const jr={$type:"Condition"},Ua={$type:"Conjunction",left:"left",right:"right"};function nm(t){return Y.isInstance(t,Ua.$type)}const Cr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Ps(t){return Y.isInstance(t,Cr.$type)}const Ba={$type:"Disjunction",left:"left",right:"right"};function im(t){return Y.isInstance(t,Ba.$type)}const Lo={$type:"EndOfFile",cardinality:"cardinality"};function am(t){return Y.isInstance(t,Lo.$type)}const yr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},tu={$type:"GrammarImport",path:"path"},Vr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function kc(t){return Y.isInstance(t,Vr.$type)}const xo={$type:"InferredType",name:"name"};function xd(t){return Y.isInstance(t,xo.$type)}const Lt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function rs(t){return Y.isInstance(t,Lt.$type)}const io={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},ru={$type:"InfixRuleOperators",precedences:"precedences"},Ei={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function sm(t){return Y.isInstance(t,Ei.$type)}const Ai={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Ir(t){return Y.isInstance(t,Ai.$type)}const Aa={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},qr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function om(t){return Y.isInstance(t,qr.$type)}const Do={$type:"Negation",value:"value"};function lm(t){return Y.isInstance(t,Do.$type)}const nu={$type:"NumberLiteral",value:"value"},$a={$type:"Parameter",name:"name"},Mo={$type:"ParameterReference",parameter:"parameter"};function cm(t){return Y.isInstance(t,Mo.$type)}const Rt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Vt(t){return Y.isInstance(t,Rt.$type)}const ao={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},Hr={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function um(t){return Y.isInstance(t,Hr.$type)}const Fo={$type:"ReturnType",name:"name"};function fm(t){return Y.isInstance(t,Fo.$type)}const Xr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Pr(t){return Y.isInstance(t,Xr.$type)}const $i={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function dm(t){return Y.isInstance(t,$i.$type)}const iu={$type:"StringLiteral",value:"value"},Yr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function hm(t){return Y.isInstance(t,Yr.$type)}const nt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},Jr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function pm(t){return Y.isInstance(t,Jr.$type)}const tr={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function qt(t){return Y.isInstance(t,tr.$type)}const Zr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function mm(t){return Y.isInstance(t,Zr.$type)}const Wa={$type:"Type",name:"name",type:"type"};function gm(t){return Y.isInstance(t,Wa.$type)}const ui={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},fi={$type:"TypeDefinition"},au={$type:"UnionType",types:"types"},Ka={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function Dd(t){return Y.isInstance(t,Ka.$type)}const Qr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function ym(t){return Y.isInstance(t,Qr.$type)}const di={$type:"ValueLiteral"},Ci={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Tm(t){return Y.isInstance(t,Ci.$type)}class Md extends Nd{constructor(){super(...arguments),this.types={AbstractElement:{name:Ze.$type,properties:{cardinality:{name:Ze.cardinality}},superTypes:[]},AbstractParserRule:{name:ja.$type,properties:{},superTypes:[Ea.$type,ft.$type]},AbstractRule:{name:Ea.$type,properties:{},superTypes:[]},AbstractType:{name:ft.$type,properties:{},superTypes:[]},Action:{name:Er.$type,properties:{cardinality:{name:Er.cardinality},feature:{name:Er.feature},inferredType:{name:Er.inferredType},operator:{name:Er.operator},type:{name:Er.type,referenceType:ft.$type}},superTypes:[Ze.$type]},Alternatives:{name:za.$type,properties:{cardinality:{name:za.cardinality},elements:{name:za.elements,defaultValue:[]}},superTypes:[Ze.$type]},ArrayLiteral:{name:Qc.$type,properties:{elements:{name:Qc.elements,defaultValue:[]}},superTypes:[di.$type]},ArrayType:{name:eu.$type,properties:{elementType:{name:eu.elementType}},superTypes:[fi.$type]},Assignment:{name:Ar.$type,properties:{cardinality:{name:Ar.cardinality},feature:{name:Ar.feature},operator:{name:Ar.operator},predicate:{name:Ar.predicate},terminal:{name:Ar.terminal}},superTypes:[Ze.$type]},BooleanLiteral:{name:Oo.$type,properties:{true:{name:Oo.true,defaultValue:!1}},superTypes:[jr.$type,di.$type]},CharacterRange:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},left:{name:$r.left},lookahead:{name:$r.lookahead},parenthesized:{name:$r.parenthesized,defaultValue:!1},right:{name:$r.right}},superTypes:[nt.$type]},Condition:{name:jr.$type,properties:{},superTypes:[]},Conjunction:{name:Ua.$type,properties:{left:{name:Ua.left},right:{name:Ua.right}},superTypes:[jr.$type]},CrossReference:{name:Cr.$type,properties:{cardinality:{name:Cr.cardinality},deprecatedSyntax:{name:Cr.deprecatedSyntax,defaultValue:!1},isMulti:{name:Cr.isMulti,defaultValue:!1},terminal:{name:Cr.terminal},type:{name:Cr.type,referenceType:ft.$type}},superTypes:[Ze.$type]},Disjunction:{name:Ba.$type,properties:{left:{name:Ba.left},right:{name:Ba.right}},superTypes:[jr.$type]},EndOfFile:{name:Lo.$type,properties:{cardinality:{name:Lo.cardinality}},superTypes:[Ze.$type]},Grammar:{name:yr.$type,properties:{imports:{name:yr.imports,defaultValue:[]},interfaces:{name:yr.interfaces,defaultValue:[]},isDeclared:{name:yr.isDeclared,defaultValue:!1},name:{name:yr.name},rules:{name:yr.rules,defaultValue:[]},types:{name:yr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:tu.$type,properties:{path:{name:tu.path}},superTypes:[]},Group:{name:Vr.$type,properties:{cardinality:{name:Vr.cardinality},elements:{name:Vr.elements,defaultValue:[]},guardCondition:{name:Vr.guardCondition},predicate:{name:Vr.predicate}},superTypes:[Ze.$type]},InferredType:{name:xo.$type,properties:{name:{name:xo.name}},superTypes:[ft.$type]},InfixRule:{name:Lt.$type,properties:{call:{name:Lt.call},dataType:{name:Lt.dataType},inferredType:{name:Lt.inferredType},name:{name:Lt.name},operators:{name:Lt.operators},parameters:{name:Lt.parameters,defaultValue:[]},returnType:{name:Lt.returnType,referenceType:ft.$type}},superTypes:[ja.$type]},InfixRuleOperatorList:{name:io.$type,properties:{associativity:{name:io.associativity},operators:{name:io.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:ru.$type,properties:{precedences:{name:ru.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Ei.$type,properties:{attributes:{name:Ei.attributes,defaultValue:[]},name:{name:Ei.name},superTypes:{name:Ei.superTypes,defaultValue:[],referenceType:ft.$type}},superTypes:[ft.$type]},Keyword:{name:Ai.$type,properties:{cardinality:{name:Ai.cardinality},predicate:{name:Ai.predicate},value:{name:Ai.value}},superTypes:[Ze.$type]},NamedArgument:{name:Aa.$type,properties:{calledByName:{name:Aa.calledByName,defaultValue:!1},parameter:{name:Aa.parameter,referenceType:$a.$type},value:{name:Aa.value}},superTypes:[]},NegatedToken:{name:qr.$type,properties:{cardinality:{name:qr.cardinality},lookahead:{name:qr.lookahead},parenthesized:{name:qr.parenthesized,defaultValue:!1},terminal:{name:qr.terminal}},superTypes:[nt.$type]},Negation:{name:Do.$type,properties:{value:{name:Do.value}},superTypes:[jr.$type]},NumberLiteral:{name:nu.$type,properties:{value:{name:nu.value}},superTypes:[di.$type]},Parameter:{name:$a.$type,properties:{name:{name:$a.name}},superTypes:[]},ParameterReference:{name:Mo.$type,properties:{parameter:{name:Mo.parameter,referenceType:$a.$type}},superTypes:[jr.$type]},ParserRule:{name:Rt.$type,properties:{dataType:{name:Rt.dataType},definition:{name:Rt.definition},entry:{name:Rt.entry,defaultValue:!1},fragment:{name:Rt.fragment,defaultValue:!1},inferredType:{name:Rt.inferredType},name:{name:Rt.name},parameters:{name:Rt.parameters,defaultValue:[]},returnType:{name:Rt.returnType,referenceType:ft.$type}},superTypes:[ja.$type]},ReferenceType:{name:ao.$type,properties:{isMulti:{name:ao.isMulti,defaultValue:!1},referenceType:{name:ao.referenceType}},superTypes:[fi.$type]},RegexToken:{name:Hr.$type,properties:{cardinality:{name:Hr.cardinality},lookahead:{name:Hr.lookahead},parenthesized:{name:Hr.parenthesized,defaultValue:!1},regex:{name:Hr.regex}},superTypes:[nt.$type]},ReturnType:{name:Fo.$type,properties:{name:{name:Fo.name}},superTypes:[]},RuleCall:{name:Xr.$type,properties:{arguments:{name:Xr.arguments,defaultValue:[]},cardinality:{name:Xr.cardinality},predicate:{name:Xr.predicate},rule:{name:Xr.rule,referenceType:Ea.$type}},superTypes:[Ze.$type]},SimpleType:{name:$i.$type,properties:{primitiveType:{name:$i.primitiveType},stringType:{name:$i.stringType},typeRef:{name:$i.typeRef,referenceType:ft.$type}},superTypes:[fi.$type]},StringLiteral:{name:iu.$type,properties:{value:{name:iu.value}},superTypes:[di.$type]},TerminalAlternatives:{name:Yr.$type,properties:{cardinality:{name:Yr.cardinality},elements:{name:Yr.elements,defaultValue:[]},lookahead:{name:Yr.lookahead},parenthesized:{name:Yr.parenthesized,defaultValue:!1}},superTypes:[nt.$type]},TerminalElement:{name:nt.$type,properties:{cardinality:{name:nt.cardinality},lookahead:{name:nt.lookahead},parenthesized:{name:nt.parenthesized,defaultValue:!1}},superTypes:[Ze.$type]},TerminalGroup:{name:Jr.$type,properties:{cardinality:{name:Jr.cardinality},elements:{name:Jr.elements,defaultValue:[]},lookahead:{name:Jr.lookahead},parenthesized:{name:Jr.parenthesized,defaultValue:!1}},superTypes:[nt.$type]},TerminalRule:{name:tr.$type,properties:{definition:{name:tr.definition},fragment:{name:tr.fragment,defaultValue:!1},hidden:{name:tr.hidden,defaultValue:!1},name:{name:tr.name},type:{name:tr.type}},superTypes:[Ea.$type]},TerminalRuleCall:{name:Zr.$type,properties:{cardinality:{name:Zr.cardinality},lookahead:{name:Zr.lookahead},parenthesized:{name:Zr.parenthesized,defaultValue:!1},rule:{name:Zr.rule,referenceType:tr.$type}},superTypes:[nt.$type]},Type:{name:Wa.$type,properties:{name:{name:Wa.name},type:{name:Wa.type}},superTypes:[ft.$type]},TypeAttribute:{name:ui.$type,properties:{defaultValue:{name:ui.defaultValue},isOptional:{name:ui.isOptional,defaultValue:!1},name:{name:ui.name},type:{name:ui.type}},superTypes:[]},TypeDefinition:{name:fi.$type,properties:{},superTypes:[]},UnionType:{name:au.$type,properties:{types:{name:au.types,defaultValue:[]}},superTypes:[fi.$type]},UnorderedGroup:{name:Ka.$type,properties:{cardinality:{name:Ka.cardinality},elements:{name:Ka.elements,defaultValue:[]}},superTypes:[Ze.$type]},UntilToken:{name:Qr.$type,properties:{cardinality:{name:Qr.cardinality},lookahead:{name:Qr.lookahead},parenthesized:{name:Qr.parenthesized,defaultValue:!1},terminal:{name:Qr.terminal}},superTypes:[nt.$type]},ValueLiteral:{name:di.$type,properties:{},superTypes:[]},Wildcard:{name:Ci.$type,properties:{cardinality:{name:Ci.cardinality},lookahead:{name:Ci.lookahead},parenthesized:{name:Ci.parenthesized,defaultValue:!1}},superTypes:[nt.$type]}}}}const Y=new Md;function Go(t){return new Sc(t,e=>Oi(e)?e.content:[],{includeRoot:!0})}function Rm(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function jo(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function ns(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}var Mt;(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"})(Mt||(Mt={}));function vm(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Mt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Mt.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?Mt.Inside:r?Mt.OverlapBack:n?Mt.OverlapFront:Mt.Outside}function Em(t,e){return vm(t,e)>Mt.After}const Am=/^[\w\p{L}]$/u;function $m(t,e){if(t){const r=Cm(t,!0);if(r&&su(r,e))return r;if(Id(t)){const n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){const a=t.content[i];if(su(a,e))return a}}}}function su(t,e){return _d(t)&&e.includes(t.tokenType.name)}function Cm(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const i=r.content[n];if(e||!i.hidden)return i}t=r}}class Fd extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}function Yi(t,e="Error: Got unexpected value."){throw new Error(e)}function U(t){return t.charCodeAt(0)}function so(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function hi(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function zr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Sm(){throw Error("Internal Error - Should never get here!")}function ou(t){return t.type==="Character"}const is=[];for(let t=U("0");t<=U("9");t++)is.push(t);const as=[U("_")].concat(is);for(let t=U("a");t<=U("z");t++)as.push(t);for(let t=U("A");t<=U("Z");t++)as.push(t);const lu=[U(" "),U("\f"),U(`
|
|
1
|
+
var Gp=Object.defineProperty;var jp=(t,e,r)=>e in t?Gp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var er=(t,e,r)=>jp(t,typeof e!="symbol"?e+"":e,r);import{c as at,b as zp,_ as Ot}from"./index-CtoiZ6Pv.js";import{m as Gt,f as Up,d as Bp}from"./min-CqAOoSgE.js";import{b as Wp,l as Kp,c as Vp,m as qp,r as Yc,n as no}from"./_baseUniq-VCPfrKF9.js";import{aP as Hp}from"./MermaidRenderer-COe0fSY4.js";function Xp(t,e){return Wp(Gt(t,e))}function Yp(t,e){return t&&t.length?Kp(t,Vp(e)):[]}function je(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function pt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function rr(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Jp(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function ci(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Nd{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=(i=r.properties[e.property])==null?void 0:i.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return je(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const i=n[r];if(i!==void 0)return i;{const a=this.types[e],s=a?a.superTypes.some(o=>this.isSubtype(o,r)):!1;return n[r]=s,s}}getAllSubTypes(e){const r=this.allSubtypes[e];if(r)return r;{const n=this.getAllTypes(),i=[];for(const a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}}function Oi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function _d(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Id(t){return Oi(t)&&typeof t.fullText=="string"}class xe{constructor(e,r){this.startFn=e,this.nextFn=r}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 r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){const e=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){const n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){return new xe(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return Qe})}join(e=","){const r=this.iterator();let n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=Zp(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){const n=this.iterator();let i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new xe(this.startFn,r=>{const{done:n,value:i}=this.nextFn(r);return n?Qe:{done:!1,value:e(i)}})}filter(e){return new xe(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return Qe})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){const n=this.iterator();let i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){const i=e.next();if(i.done)return n;const a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new xe(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:n,value:i}=this.nextFn(r.this);if(!n){const a=e(i);if(es(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Qe})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new xe(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:i,value:a}=r.nextFn(n.this);if(!i)if(es(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Qe})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new xe(()=>{const r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new xe(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Qe:this.nextFn(r.state)))}distinct(e){return new xe(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return Qe})}exclude(e,r){const n=new Set;for(const i of e){const a=r?r(i):i;n.add(a)}return this.filter(i=>{const a=r?r(i):i;return!n.has(a)})}}function Zp(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function es(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Pd=new xe(()=>{},()=>Qe),Qe=Object.freeze({done:!0,value:void 0});function ce(...t){if(t.length===1){const e=t[0];if(e instanceof xe)return e;if(es(e))return new xe(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new xe(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:Qe)}return t.length>1?new xe(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const r=t[e.collIndex++];es(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return Qe}):Pd}class Sc extends xe{constructor(e,r,n){super(()=>({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return Qe})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Io;(function(t){function e(a){return a.reduce((s,o)=>s+o,0)}t.sum=e;function r(a){return a.reduce((s,o)=>s*o,0)}t.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}t.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}t.max=i})(Io||(Io={}));function Po(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((i,a)=>{je(i)&&(i.$container=t,i.$containerProperty=r,i.$containerIndex=a,e.deep&&Po(i,e))}):je(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&Po(n,e)))}function _s(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function jt(t){const r=Ga(t).$document;if(!r)throw new Error("AST node has no document.");return r}function Ga(t){for(;t.$container;)t=t.$container;return t}function Jc(t){return pt(t)?t.ref?[t.ref]:[]:rr(t)?t.items.map(e=>e.ref):[]}function wc(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e==null?void 0:e.range;return new xe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){const i=n.keys[n.keyIndex];if(!i.startsWith("$")){const a=t[i];if(je(a)){if(n.keyIndex++,Zc(a,r))return{done:!1,value:a}}else if(Array.isArray(a)){for(;n.arrayIndex<a.length;){const s=n.arrayIndex++,o=a[s];if(je(o)&&Zc(o,r))return{done:!1,value:o}}n.arrayIndex=0}}n.keyIndex++}return Qe})}function Hi(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Sc(t,r=>wc(r,e))}function zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Sc(t,r=>wc(r,e),{includeRoot:!0})}function Zc(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)==null?void 0:n.range;return r?Em(r,e):!1}function ts(t){return new xe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const r=e.keys[e.keyIndex];if(!r.startsWith("$")){const n=t[r];if(pt(n)||rr(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){const i=e.arrayIndex++,a=n[i];if(pt(a)||rr(n))return{done:!1,value:{reference:a,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Qe})}function Qp(t,e){const r=t.getTypeMetaData(e.$type),n=e;for(const i of Object.values(r.properties))i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=Od(i.defaultValue))}function Od(t){return Array.isArray(t)?[...t.map(Od)]:t}const Ze={$type:"AbstractElement",cardinality:"cardinality"};function em(t){return Y.isInstance(t,Ze.$type)}const ja={$type:"AbstractParserRule"};function Xi(t){return Y.isInstance(t,ja.$type)}const Ea={$type:"AbstractRule"},ft={$type:"AbstractType"},Er={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Is(t){return Y.isInstance(t,Er.$type)}const za={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function Ld(t){return Y.isInstance(t,za.$type)}const Qc={$type:"ArrayLiteral",elements:"elements"},eu={$type:"ArrayType",elementType:"elementType"},Ar={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function _r(t){return Y.isInstance(t,Ar.$type)}const Oo={$type:"BooleanLiteral",true:"true"};function tm(t){return Y.isInstance(t,Oo.$type)}const $r={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function rm(t){return Y.isInstance(t,$r.$type)}const jr={$type:"Condition"},Ua={$type:"Conjunction",left:"left",right:"right"};function nm(t){return Y.isInstance(t,Ua.$type)}const Cr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Ps(t){return Y.isInstance(t,Cr.$type)}const Ba={$type:"Disjunction",left:"left",right:"right"};function im(t){return Y.isInstance(t,Ba.$type)}const Lo={$type:"EndOfFile",cardinality:"cardinality"};function am(t){return Y.isInstance(t,Lo.$type)}const yr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},tu={$type:"GrammarImport",path:"path"},Vr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function kc(t){return Y.isInstance(t,Vr.$type)}const xo={$type:"InferredType",name:"name"};function xd(t){return Y.isInstance(t,xo.$type)}const Lt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function rs(t){return Y.isInstance(t,Lt.$type)}const io={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},ru={$type:"InfixRuleOperators",precedences:"precedences"},Ei={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function sm(t){return Y.isInstance(t,Ei.$type)}const Ai={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Ir(t){return Y.isInstance(t,Ai.$type)}const Aa={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},qr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function om(t){return Y.isInstance(t,qr.$type)}const Do={$type:"Negation",value:"value"};function lm(t){return Y.isInstance(t,Do.$type)}const nu={$type:"NumberLiteral",value:"value"},$a={$type:"Parameter",name:"name"},Mo={$type:"ParameterReference",parameter:"parameter"};function cm(t){return Y.isInstance(t,Mo.$type)}const Rt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Vt(t){return Y.isInstance(t,Rt.$type)}const ao={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},Hr={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function um(t){return Y.isInstance(t,Hr.$type)}const Fo={$type:"ReturnType",name:"name"};function fm(t){return Y.isInstance(t,Fo.$type)}const Xr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Pr(t){return Y.isInstance(t,Xr.$type)}const $i={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function dm(t){return Y.isInstance(t,$i.$type)}const iu={$type:"StringLiteral",value:"value"},Yr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function hm(t){return Y.isInstance(t,Yr.$type)}const nt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},Jr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function pm(t){return Y.isInstance(t,Jr.$type)}const tr={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function qt(t){return Y.isInstance(t,tr.$type)}const Zr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function mm(t){return Y.isInstance(t,Zr.$type)}const Wa={$type:"Type",name:"name",type:"type"};function gm(t){return Y.isInstance(t,Wa.$type)}const ui={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},fi={$type:"TypeDefinition"},au={$type:"UnionType",types:"types"},Ka={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function Dd(t){return Y.isInstance(t,Ka.$type)}const Qr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function ym(t){return Y.isInstance(t,Qr.$type)}const di={$type:"ValueLiteral"},Ci={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Tm(t){return Y.isInstance(t,Ci.$type)}class Md extends Nd{constructor(){super(...arguments),this.types={AbstractElement:{name:Ze.$type,properties:{cardinality:{name:Ze.cardinality}},superTypes:[]},AbstractParserRule:{name:ja.$type,properties:{},superTypes:[Ea.$type,ft.$type]},AbstractRule:{name:Ea.$type,properties:{},superTypes:[]},AbstractType:{name:ft.$type,properties:{},superTypes:[]},Action:{name:Er.$type,properties:{cardinality:{name:Er.cardinality},feature:{name:Er.feature},inferredType:{name:Er.inferredType},operator:{name:Er.operator},type:{name:Er.type,referenceType:ft.$type}},superTypes:[Ze.$type]},Alternatives:{name:za.$type,properties:{cardinality:{name:za.cardinality},elements:{name:za.elements,defaultValue:[]}},superTypes:[Ze.$type]},ArrayLiteral:{name:Qc.$type,properties:{elements:{name:Qc.elements,defaultValue:[]}},superTypes:[di.$type]},ArrayType:{name:eu.$type,properties:{elementType:{name:eu.elementType}},superTypes:[fi.$type]},Assignment:{name:Ar.$type,properties:{cardinality:{name:Ar.cardinality},feature:{name:Ar.feature},operator:{name:Ar.operator},predicate:{name:Ar.predicate},terminal:{name:Ar.terminal}},superTypes:[Ze.$type]},BooleanLiteral:{name:Oo.$type,properties:{true:{name:Oo.true,defaultValue:!1}},superTypes:[jr.$type,di.$type]},CharacterRange:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},left:{name:$r.left},lookahead:{name:$r.lookahead},parenthesized:{name:$r.parenthesized,defaultValue:!1},right:{name:$r.right}},superTypes:[nt.$type]},Condition:{name:jr.$type,properties:{},superTypes:[]},Conjunction:{name:Ua.$type,properties:{left:{name:Ua.left},right:{name:Ua.right}},superTypes:[jr.$type]},CrossReference:{name:Cr.$type,properties:{cardinality:{name:Cr.cardinality},deprecatedSyntax:{name:Cr.deprecatedSyntax,defaultValue:!1},isMulti:{name:Cr.isMulti,defaultValue:!1},terminal:{name:Cr.terminal},type:{name:Cr.type,referenceType:ft.$type}},superTypes:[Ze.$type]},Disjunction:{name:Ba.$type,properties:{left:{name:Ba.left},right:{name:Ba.right}},superTypes:[jr.$type]},EndOfFile:{name:Lo.$type,properties:{cardinality:{name:Lo.cardinality}},superTypes:[Ze.$type]},Grammar:{name:yr.$type,properties:{imports:{name:yr.imports,defaultValue:[]},interfaces:{name:yr.interfaces,defaultValue:[]},isDeclared:{name:yr.isDeclared,defaultValue:!1},name:{name:yr.name},rules:{name:yr.rules,defaultValue:[]},types:{name:yr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:tu.$type,properties:{path:{name:tu.path}},superTypes:[]},Group:{name:Vr.$type,properties:{cardinality:{name:Vr.cardinality},elements:{name:Vr.elements,defaultValue:[]},guardCondition:{name:Vr.guardCondition},predicate:{name:Vr.predicate}},superTypes:[Ze.$type]},InferredType:{name:xo.$type,properties:{name:{name:xo.name}},superTypes:[ft.$type]},InfixRule:{name:Lt.$type,properties:{call:{name:Lt.call},dataType:{name:Lt.dataType},inferredType:{name:Lt.inferredType},name:{name:Lt.name},operators:{name:Lt.operators},parameters:{name:Lt.parameters,defaultValue:[]},returnType:{name:Lt.returnType,referenceType:ft.$type}},superTypes:[ja.$type]},InfixRuleOperatorList:{name:io.$type,properties:{associativity:{name:io.associativity},operators:{name:io.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:ru.$type,properties:{precedences:{name:ru.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Ei.$type,properties:{attributes:{name:Ei.attributes,defaultValue:[]},name:{name:Ei.name},superTypes:{name:Ei.superTypes,defaultValue:[],referenceType:ft.$type}},superTypes:[ft.$type]},Keyword:{name:Ai.$type,properties:{cardinality:{name:Ai.cardinality},predicate:{name:Ai.predicate},value:{name:Ai.value}},superTypes:[Ze.$type]},NamedArgument:{name:Aa.$type,properties:{calledByName:{name:Aa.calledByName,defaultValue:!1},parameter:{name:Aa.parameter,referenceType:$a.$type},value:{name:Aa.value}},superTypes:[]},NegatedToken:{name:qr.$type,properties:{cardinality:{name:qr.cardinality},lookahead:{name:qr.lookahead},parenthesized:{name:qr.parenthesized,defaultValue:!1},terminal:{name:qr.terminal}},superTypes:[nt.$type]},Negation:{name:Do.$type,properties:{value:{name:Do.value}},superTypes:[jr.$type]},NumberLiteral:{name:nu.$type,properties:{value:{name:nu.value}},superTypes:[di.$type]},Parameter:{name:$a.$type,properties:{name:{name:$a.name}},superTypes:[]},ParameterReference:{name:Mo.$type,properties:{parameter:{name:Mo.parameter,referenceType:$a.$type}},superTypes:[jr.$type]},ParserRule:{name:Rt.$type,properties:{dataType:{name:Rt.dataType},definition:{name:Rt.definition},entry:{name:Rt.entry,defaultValue:!1},fragment:{name:Rt.fragment,defaultValue:!1},inferredType:{name:Rt.inferredType},name:{name:Rt.name},parameters:{name:Rt.parameters,defaultValue:[]},returnType:{name:Rt.returnType,referenceType:ft.$type}},superTypes:[ja.$type]},ReferenceType:{name:ao.$type,properties:{isMulti:{name:ao.isMulti,defaultValue:!1},referenceType:{name:ao.referenceType}},superTypes:[fi.$type]},RegexToken:{name:Hr.$type,properties:{cardinality:{name:Hr.cardinality},lookahead:{name:Hr.lookahead},parenthesized:{name:Hr.parenthesized,defaultValue:!1},regex:{name:Hr.regex}},superTypes:[nt.$type]},ReturnType:{name:Fo.$type,properties:{name:{name:Fo.name}},superTypes:[]},RuleCall:{name:Xr.$type,properties:{arguments:{name:Xr.arguments,defaultValue:[]},cardinality:{name:Xr.cardinality},predicate:{name:Xr.predicate},rule:{name:Xr.rule,referenceType:Ea.$type}},superTypes:[Ze.$type]},SimpleType:{name:$i.$type,properties:{primitiveType:{name:$i.primitiveType},stringType:{name:$i.stringType},typeRef:{name:$i.typeRef,referenceType:ft.$type}},superTypes:[fi.$type]},StringLiteral:{name:iu.$type,properties:{value:{name:iu.value}},superTypes:[di.$type]},TerminalAlternatives:{name:Yr.$type,properties:{cardinality:{name:Yr.cardinality},elements:{name:Yr.elements,defaultValue:[]},lookahead:{name:Yr.lookahead},parenthesized:{name:Yr.parenthesized,defaultValue:!1}},superTypes:[nt.$type]},TerminalElement:{name:nt.$type,properties:{cardinality:{name:nt.cardinality},lookahead:{name:nt.lookahead},parenthesized:{name:nt.parenthesized,defaultValue:!1}},superTypes:[Ze.$type]},TerminalGroup:{name:Jr.$type,properties:{cardinality:{name:Jr.cardinality},elements:{name:Jr.elements,defaultValue:[]},lookahead:{name:Jr.lookahead},parenthesized:{name:Jr.parenthesized,defaultValue:!1}},superTypes:[nt.$type]},TerminalRule:{name:tr.$type,properties:{definition:{name:tr.definition},fragment:{name:tr.fragment,defaultValue:!1},hidden:{name:tr.hidden,defaultValue:!1},name:{name:tr.name},type:{name:tr.type}},superTypes:[Ea.$type]},TerminalRuleCall:{name:Zr.$type,properties:{cardinality:{name:Zr.cardinality},lookahead:{name:Zr.lookahead},parenthesized:{name:Zr.parenthesized,defaultValue:!1},rule:{name:Zr.rule,referenceType:tr.$type}},superTypes:[nt.$type]},Type:{name:Wa.$type,properties:{name:{name:Wa.name},type:{name:Wa.type}},superTypes:[ft.$type]},TypeAttribute:{name:ui.$type,properties:{defaultValue:{name:ui.defaultValue},isOptional:{name:ui.isOptional,defaultValue:!1},name:{name:ui.name},type:{name:ui.type}},superTypes:[]},TypeDefinition:{name:fi.$type,properties:{},superTypes:[]},UnionType:{name:au.$type,properties:{types:{name:au.types,defaultValue:[]}},superTypes:[fi.$type]},UnorderedGroup:{name:Ka.$type,properties:{cardinality:{name:Ka.cardinality},elements:{name:Ka.elements,defaultValue:[]}},superTypes:[Ze.$type]},UntilToken:{name:Qr.$type,properties:{cardinality:{name:Qr.cardinality},lookahead:{name:Qr.lookahead},parenthesized:{name:Qr.parenthesized,defaultValue:!1},terminal:{name:Qr.terminal}},superTypes:[nt.$type]},ValueLiteral:{name:di.$type,properties:{},superTypes:[]},Wildcard:{name:Ci.$type,properties:{cardinality:{name:Ci.cardinality},lookahead:{name:Ci.lookahead},parenthesized:{name:Ci.parenthesized,defaultValue:!1}},superTypes:[nt.$type]}}}}const Y=new Md;function Go(t){return new Sc(t,e=>Oi(e)?e.content:[],{includeRoot:!0})}function Rm(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function jo(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function ns(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}var Mt;(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"})(Mt||(Mt={}));function vm(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Mt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Mt.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?Mt.Inside:r?Mt.OverlapBack:n?Mt.OverlapFront:Mt.Outside}function Em(t,e){return vm(t,e)>Mt.After}const Am=/^[\w\p{L}]$/u;function $m(t,e){if(t){const r=Cm(t,!0);if(r&&su(r,e))return r;if(Id(t)){const n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){const a=t.content[i];if(su(a,e))return a}}}}function su(t,e){return _d(t)&&e.includes(t.tokenType.name)}function Cm(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const i=r.content[n];if(e||!i.hidden)return i}t=r}}class Fd extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}function Yi(t,e="Error: Got unexpected value."){throw new Error(e)}function U(t){return t.charCodeAt(0)}function so(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function hi(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function zr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Sm(){throw Error("Internal Error - Should never get here!")}function ou(t){return t.type==="Character"}const is=[];for(let t=U("0");t<=U("9");t++)is.push(t);const as=[U("_")].concat(is);for(let t=U("a");t<=U("z");t++)as.push(t);for(let t=U("A");t<=U("Z");t++)as.push(t);const lu=[U(" "),U("\f"),U(`
|
|
2
2
|
`),U("\r"),U(" "),U("\v"),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U("\u2028"),U("\u2029"),U(" "),U(" "),U(" "),U("\uFEFF")],wm=/[0-9a-fA-F]/,Ca=/[0-9]/,km=/[1-9]/;class Gd{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const r=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":hi(n,"global");break;case"i":hi(n,"ignoreCase");break;case"m":hi(n,"multiLine");break;case"u":hi(n,"unicode");break;case"y":hi(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){const e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){const e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":r="Lookbehind";break;case"!":r="NegativeLookbehind"}break}}zr(r);const n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return Sm()}quantifier(e=!1){let r;const n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),r={atLeast:i,atMost:a}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;zr(r);break}if(!(e===!0&&r===void 0)&&zr(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e;const r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),zr(e))return e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[U(`
|
|
3
3
|
`),U("\r"),U("\u2028"),U("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=is;break;case"D":e=is,r=!0;break;case"s":e=lu;break;case"S":e=lu,r=!0;break;case"w":e=as;break;case"W":e=as,r=!0;break}if(zr(e))return{type:"Set",value:e,complement:r}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=U("\f");break;case"n":e=U(`
|
|
4
4
|
`);break;case"r":e=U("\r");break;case"t":e=U(" ");break;case"v":e=U("\v");break}if(zr(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:U("\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:U(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
package/dist/assets/{wardleyDiagram-NUSXRM2D-Nhgn3KBd.js → wardleyDiagram-NUSXRM2D-D4HzW-Z_.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as Lt,g as zt,q as Xt,p as At,a as Ct,b as Et,_ as y,l as et,H as Tt,e as Yt,y as Bt,c as H,i as Rt}from"./MermaidRenderer-
|
|
1
|
+
import{s as Lt,g as zt,q as Xt,p as At,a as Ct,b as Et,_ as y,l as et,H as Tt,e as Yt,y as Bt,c as H,i as Rt}from"./MermaidRenderer-COe0fSY4.js";import{p as Ft}from"./chunk-4BX2VUAB-CLoswc9M.js";import{p as Ot}from"./wardley-RL74JXVD-9q7UxPyC.js";import"./index-CtoiZ6Pv.js";import"./purify.es-BlZidd4c.js";import"./step-EjIQ8UIn.js";import"./min-CqAOoSgE.js";import"./_baseUniq-VCPfrKF9.js";var q=y((a,r)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),Y=y((a,r,e)=>({x:q(r,`${e} evolution`),y:q(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),It=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const r=/^\+'([^']*)'/.exec(a),e=r==null?void 0:r[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=y((a,r)=>{if(Ft(a,r),a.size&&r.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(o=>o.secondName?`${o.name.trim()} / ${o.secondName.trim()}`:o.name.trim()),h=a.evolution.stages.filter(o=>o.boundary!==void 0).map(o=>o.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(a.anchors.forEach(e=>{const h=Y(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),a.components.forEach(e=>{var v;const h=Y(e.visibility,e.evolution,`Component "${e.name}"`),o=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",o,d,e.inertia,m)}),a.notes.forEach(e=>{const h=Y(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),a.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const o=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,A=q(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,A,o,"pipeline-component",v,g),r.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let o=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=It(e.arrow);!o&&d&&(o=d);const v=e.linkLabel,g=m??v;r.addLink(e.from,e.to,h,g,o)}),a.evolves.forEach(e=>{const h=r.getNode(e.component);if((h==null?void 0:h.y)!==void 0){const o=q(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,o,h.y)}}),a.annotations.length>0){const e=a.annotations[0],h=Y(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}a.annotation.forEach(e=>{const h=Y(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),a.accelerators.forEach(e=>{const h=Y(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),a.deaccelerators.forEach(e=>{const h=Y(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var h;const r=await Ot("wardley",a);et.debug(r);const e=(h=at.parser)==null?void 0:h.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},R,Dt=(R=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const o=this.nodes.get(e);o&&(o.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(R,"WardleyBuilder"),R),P=new Dt;function N(a){const r=H();return Rt(a.trim(),r)}y(N,"textSanitizer");function rt(){return H()["wardley-beta"]}y(rt,"getConfig");function ot(a,r,e,h,o,d,m,v,g){P.addNode({id:a,label:N(r),x:e,y:h,className:o,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,r,e=!1,h,o){P.addLink({source:a,target:r,dashed:e,label:h,flow:o})}y(st,"addLink");function nt(a,r,e){P.addTrend({nodeId:a,targetX:r,targetY:e})}y(nt,"addTrend");function it(a,r,e){P.addAnnotation({number:a,coordinates:r,text:e?N(e):void 0})}y(it,"addAnnotation");function dt(a,r,e){P.addNote({text:N(a),x:r,y:e})}y(dt,"addNote");function lt(a,r,e){P.addAccelerator({name:N(a),x:r,y:e})}y(lt,"addAccelerator");function ct(a,r,e){P.addDeaccelerator({name:N(a),x:r,y:e})}y(ct,"addDeaccelerator");function pt(a,r){P.setAnnotationsBox(a,r)}y(pt,"setAnnotationsBox");function ht(a,r){P.setSize(a,r)}y(ht,"setSize");function xt(a){P.startPipeline(a)}y(xt,"startPipeline");function ft(a,r){P.addPipelineComponent(a,r)}y(ft,"addPipelineComponent");function gt(a){const r={};a.xLabel&&(r.xLabel=N(a.xLabel)),a.yLabel&&(r.yLabel=N(a.yLabel)),a.stages&&(r.stages=a.stages.map(e=>N(e))),a.stageBoundaries&&(r.stageBoundaries=a.stageBoundaries),P.setAxes(r)}y(gt,"updateAxes");function ut(a){return P.getNode(a)}y(ut,"getNode");function yt(){return P.build()}y(yt,"getWardleyData");function mt(){P.clear(),Bt()}y(mt,"clear");var Gt={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,getWardleyData:yt,clear:mt,setAccTitle:Et,getAccTitle:Ct,setDiagramTitle:At,getDiagramTitle:Xt,getAccDescription:zt,setAccDescription:Lt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=y(()=>{var r,e,h,o,d,m,v,g,A,M,b,L;const{themeVariables:a}=H();return{backgroundColor:((r=a.wardley)==null?void 0:r.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((h=a.wardley)==null?void 0:h.axisTextColor)??a.primaryTextColor??"#222",gridColor:((o=a.wardley)==null?void 0:o.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((A=a.wardley)==null?void 0:A.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((b=a.wardley)==null?void 0:b.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((L=a.wardley)==null?void 0:L.annotationFill)??a.background??"#fff"}},"getTheme"),jt=y(()=>{const a=H()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),_t=y((a,r,e,h)=>{var K,Q;et.debug(`Rendering Wardley map
|
|
2
2
|
`+a);const o=jt(),d=Ht(),m=o.nodeRadius*1.6,v=h.db,g=v.getWardleyData(),A=v.getDiagramTitle(),M=((K=g.size)==null?void 0:K.width)??o.width,b=((Q=g.size)==null?void 0:Q.height)??o.height,L=Tt(r);L.selectAll("*").remove(),Yt(L,b,M,o.useMaxWidth),L.attr("viewBox",`0 0 ${M} ${b}`);const S=L.append("g").attr("class","wardley-map"),j=L.append("defs");j.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),j.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),j.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),S.append("rect").attr("class","wardley-background").attr("width",M).attr("height",b).attr("fill",d.backgroundColor);const F=M-o.padding*2,O=b-o.padding*2;A&&S.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",o.padding/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(A);const C=y(t=>o.padding+t/100*F,"projectX"),E=y(t=>b-o.padding-t/100*O,"projectY"),W=S.append("g").attr("class","wardley-axes");W.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1),W.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";W.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+F/2).attr("y",b-o.padding/4).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),W.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+O/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+O/2})`).text(bt);const I=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(I.length>0){const t=S.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===I.length){let i=0;n.forEach(p=>{s.push({start:i,end:p}),i=p})}else{const i=1/I.length;I.forEach((p,l)=>{s.push({start:l*i,end:(l+1)*i})})}I.forEach((i,p)=>{const l=s[p],x=o.padding+l.start*F,f=o.padding+l.end*F,u=(x+f)/2;p>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",b-o.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(o.showGrid){const t=S.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=o.padding+F*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding-O*s).attr("y2",b-o.padding-O*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:C(t.x),y:E(t.y),node:t})}),g.pipelines.length>0){const t=S.append("g").attr("class","wardley-pipelines"),n=S.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(p=Math.min(p,u.x),l=Math.max(l,u.x),x=u.y)}),p!==1/0&&l!==-1/0){const u=o.nodeRadius*4,w=x-u/2,$=c.get(s.nodeId);if($){const X=(p+l)/2;$.x=X,$.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",w).attr("width",l-p+15*2).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const Z=S.append("g").attr("class","wardley-links"),U=new Map;g.pipelines.forEach(t=>{U.set(t.nodeId,new Set(t.componentIds))});const J=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=U.get(t.target);return!(n!=null&&n.has(t.source))});Z.selectAll("line").data(J).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*p}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*p}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*p}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),Z.selectAll("text").data(J.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+p*p),f=8,u=p/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,p=s.x-n.x,l=s.y-n.y,x=Math.sqrt(p*p+l*l),f=8,u=-p/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,$=-l/f,X=i+w*u,D=p+$*u;let B=Math.atan2(x,l)*180/Math.PI;return(B>90||B<-90)&&(B+=180),`rotate(${B} ${X} ${D})`}).text(t=>t.label);const kt=S.append("g").attr("class","wardley-trends"),Pt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=C(t.targetX),i=E(t.targetY),p=s-n.x,l=i-n.y,x=Math.sqrt(p*p+l*l),f=o.nodeRadius+2,u=x>f?s-p/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);kt.selectAll("line").data(Pt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const z=S.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));z.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=z.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const _=o.nodeRadius*.7,k=o.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-k).attr("x2",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-k).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-k).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),z.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),z.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",o.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=S.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:C(i.x),y:E(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=C(g.annotationsBox.x),s=E(g.annotationsBox.y);const i=10,p=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,$)=>w.number-$.number),u=[];if(f.forEach((w,$)=>{const X=x.append("text").attr("x",n+i).attr("y",s+i+($+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(X)}),u.length>0){let w=0,$=0;u.forEach(V=>{const G=V.node(),Mt=G.getComputedTextLength();w=Math.max(w,Mt);const Nt=G.getBBox();$=Math.max($,Nt.height)});const X=w+i*2+105,D=f.length*p+i*2+$/2,B=o.padding,vt=M-o.padding-X,St=o.padding,$t=b-o.padding-D;n=Math.max(B,Math.min(n,vt)),s=Math.max(St,Math.min(s,$t)),u.forEach((V,G)=>{V.attr("x",n+i).attr("y",s+i+(G+1)*p)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",X).attr("height",D).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=S.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=C(n.x),i=E(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=S.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=C(n.x),i=E(n.y),p=60,l=30,x=20,f=`
|
|
3
3
|
M ${s} ${i-l/2}
|
|
4
4
|
L ${s+p-x} ${i-l/2}
|
package/dist/assets/{xychartDiagram-5P7HB3ND-DW0WLkNW.js → xychartDiagram-5P7HB3ND-B4oqzUM2.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as gi,g as xi,q as Xt,p as di,a as pi,b as fi,_ as n,l as Yt,H as mi,e as yi,y as bi,C as St,i as Ai,E as Nt,F as wi,I as Ci,K as Si}from"./MermaidRenderer-
|
|
1
|
+
import{s as gi,g as xi,q as Xt,p as di,a as pi,b as fi,_ as n,l as Yt,H as mi,e as yi,y as bi,C as St,i as Ai,E as Nt,F as wi,I as Ci,K as Si}from"./MermaidRenderer-COe0fSY4.js";import{b as Bt}from"./band-CquvqAHh.js";import{l as Wt}from"./linear-CKzVTQ0r.js";import{l as zt}from"./step-EjIQ8UIn.js";import"./index-CtoiZ6Pv.js";import"./purify.es-BlZidd4c.js";import"./init-Dmth1JHB.js";import"./ordinal-DILIJJjt.js";import"./defaultLocale-DX6XiGOO.js";var bt=function(){var s=n(function(O,r,c,u){for(c=c||{},u=O.length;u--;c[O[u]]=r);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],e=[1,3],a=[1,5],l=[1,6],g=[1,7],b=[1,5,10,12,14,16,18,19,21,23,34,35,36],w=[1,25],L=[1,26],M=[1,28],R=[1,29],E=[1,30],z=[1,31],F=[1,32],D=[1,33],B=[1,34],p=[1,35],_=[1,36],h=[1,37],I=[1,43],W=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],f=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],y=[1,64],P={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(r,c,u,x,A,o,ot){var d=o.length-1;switch(A){case 5:x.setOrientation(o[d]);break;case 9:x.setDiagramTitle(o[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[d]);break;case 13:x.setLineData(o[d-1],o[d]);break;case 14:x.setBarData({text:"",type:"text"},o[d]);break;case 15:x.setBarData(o[d-1],o[d]);break;case 16:this.$=o[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[d-1];break;case 20:this.$=[Number(o[d-2]),...o[d]];break;case 21:this.$=[Number(o[d])];break;case 22:x.setXAxisTitle(o[d]);break;case 23:x.setXAxisTitle(o[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(o[d]);break;case 26:x.setXAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 27:this.$=o[d-1];break;case 28:this.$=[o[d-2],...o[d]];break;case 29:this.$=[o[d]];break;case 30:x.setYAxisTitle(o[d]);break;case 31:x.setYAxisTitle(o[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 37:this.$={text:o[d],type:"text"};break;case 38:this.$={text:o[d],type:"text"};break;case 39:this.$={text:o[d],type:"markdown"};break;case 40:this.$=o[d];break;case 41:this.$=o[d-1]+""+o[d];break}},"anonymous"),table:[s(t,i,{3:1,4:2,7:4,5:e,34:a,35:l,36:g}),{1:[3]},s(t,i,{4:2,7:4,3:8,5:e,34:a,35:l,36:g}),s(t,i,{4:2,7:4,6:9,3:10,5:e,8:[1,11],34:a,35:l,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},s(b,[2,34]),s(b,[2,35]),s(b,[2,36]),{1:[2,1]},s(t,i,{4:2,7:4,3:21,5:e,34:a,35:l,36:g}),{1:[2,3]},s(b,[2,5]),s(t,[2,7],{4:22,34:a,35:l,36:g}),{11:23,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{11:39,13:38,24:I,27:W,29:40,30:41,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{11:45,15:44,27:X,33:46,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{11:49,17:48,24:Y,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{11:52,17:51,24:Y,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{20:[1,53]},{22:[1,54]},s(C,[2,18]),{1:[2,2]},s(C,[2,8]),s(C,[2,9]),s(U,[2,37],{40:55,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h}),s(U,[2,38]),s(U,[2,39]),s(f,[2,40]),s(f,[2,42]),s(f,[2,43]),s(f,[2,44]),s(f,[2,45]),s(f,[2,46]),s(f,[2,47]),s(f,[2,48]),s(f,[2,49]),s(f,[2,50]),s(f,[2,51]),s(C,[2,10]),s(C,[2,22],{30:41,29:56,24:I,27:W}),s(C,[2,24]),s(C,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},s(C,[2,11]),s(C,[2,30],{33:60,27:X}),s(C,[2,32]),{31:[1,61]},s(C,[2,12]),{17:62,24:Y},{25:63,27:y},s(C,[2,14]),{17:65,24:Y},s(C,[2,16]),s(C,[2,17]),s(f,[2,41]),s(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},s(C,[2,31]),{27:[1,69]},s(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},s(C,[2,15]),s(C,[2,26]),s(C,[2,27]),{11:59,32:72,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},s(C,[2,33]),s(C,[2,19]),{25:73,27:y},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(r,c){if(c.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=c,u}},"parseError"),parse:n(function(r){var c=this,u=[0],x=[],A=[null],o=[],ot=this.table,d="",ct=0,Et=0,hi=2,It=1,li=o.slice.call(arguments,1),k=Object.create(this.lexer),$={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&($.yy[pt]=this.yy[pt]);k.setInput(r,$.yy),$.yy.lexer=k,$.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var ft=k.yylloc;o.push(ft);var ci=k.options&&k.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(v){u.length=u.length-2*v,A.length=A.length-v,o.length=o.length-v}n(ui,"popStack");function Vt(){var v;return v=x.pop()||k.lex()||It,typeof v!="number"&&(v instanceof Array&&(x=v,v=x.pop()),v=c.symbols_[v]||v),v}n(Vt,"lex");for(var T,q,V,mt,G={},ut,N,Mt,gt;;){if(q=u[u.length-1],this.defaultActions[q]?V=this.defaultActions[q]:((T===null||typeof T>"u")&&(T=Vt()),V=ot[q]&&ot[q][T]),typeof V>"u"||!V.length||!V[0]){var yt="";gt=[];for(ut in ot[q])this.terminals_[ut]&&ut>hi&>.push("'"+this.terminals_[ut]+"'");k.showPosition?yt="Parse error on line "+(ct+1)+`:
|
|
2
2
|
`+k.showPosition()+`
|
|
3
3
|
Expecting `+gt.join(", ")+", got '"+(this.terminals_[T]||T)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(T==It?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(yt,{text:k.match,token:this.terminals_[T]||T,line:k.yylineno,loc:ft,expected:gt})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+T);switch(V[0]){case 1:u.push(T),A.push(k.yytext),o.push(k.yylloc),u.push(V[1]),T=null,Et=k.yyleng,d=k.yytext,ct=k.yylineno,ft=k.yylloc;break;case 2:if(N=this.productions_[V[1]][1],G.$=A[A.length-N],G._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},ci&&(G._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),mt=this.performAction.apply(G,[d,Et,ct,$.yy,V[1],A,o].concat(li)),typeof mt<"u")return mt;N&&(u=u.slice(0,-1*N*2),A=A.slice(0,-1*N),o=o.slice(0,-1*N)),u.push(this.productions_[V[1]][0]),A.push(G.$),o.push(G._$),Mt=ot[u[u.length-2]][u[u.length-1]],u.push(Mt);break;case 3:return!0}}return!0},"parse")},S=function(){var O={EOF:1,parseError:n(function(c,u){if(this.yy.parser)this.yy.parser.parseError(c,u);else throw new Error(c)},"parseError"),setInput:n(function(r,c){return this.yy=c||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:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var c=r.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var c=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===x.length?this.yylloc.first_column:0)+x[x.length-u.length].length-u[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(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:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(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:n(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:n(function(){var r=this.pastInput(),c=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
package/dist/index.html
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
22
22
|
}
|
|
23
23
|
</style>
|
|
24
|
-
<script type="module" crossorigin src="/assets/index-
|
|
25
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
24
|
+
<script type="module" crossorigin src="/assets/index-CtoiZ6Pv.js"></script>
|
|
25
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DoqRNkTy.css">
|
|
26
26
|
</head>
|
|
27
27
|
<body>
|
|
28
28
|
<div id="root"></div>
|
package/dist/sitemap.xml
CHANGED
|
@@ -1,44 +1,48 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<!-- Generated by orbitchat-config -->
|
|
3
3
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
4
|
+
<url>
|
|
5
|
+
<loc>http://localhost:5173/ai-image-generator</loc>
|
|
6
|
+
<lastmod>2026-05-04T15:36:29.047Z</lastmod>
|
|
7
|
+
</url>
|
|
4
8
|
<url>
|
|
5
9
|
<loc>http://localhost:5173/business-analytics-assistant</loc>
|
|
6
|
-
<lastmod>2026-05-
|
|
10
|
+
<lastmod>2026-05-04T15:36:29.047Z</lastmod>
|
|
7
11
|
</url>
|
|
8
12
|
<url>
|
|
9
13
|
<loc>http://localhost:5173/chat-with-movies-db</loc>
|
|
10
|
-
<lastmod>2026-05-
|
|
14
|
+
<lastmod>2026-05-04T15:36:29.047Z</lastmod>
|
|
11
15
|
</url>
|
|
12
16
|
<url>
|
|
13
17
|
<loc>http://localhost:5173/city-faq-assistant-chroma</loc>
|
|
14
|
-
<lastmod>2026-05-
|
|
18
|
+
<lastmod>2026-05-04T15:36:29.047Z</lastmod>
|
|
15
19
|
</url>
|
|
16
20
|
<url>
|
|
17
21
|
<loc>http://localhost:5173/city-faq-assistant-sqlite</loc>
|
|
18
|
-
<lastmod>2026-05-
|
|
22
|
+
<lastmod>2026-05-04T15:36:29.047Z</lastmod>
|
|
19
23
|
</url>
|
|
20
24
|
<url>
|
|
21
25
|
<loc>http://localhost:5173/graphql-chatbot</loc>
|
|
22
|
-
<lastmod>2026-05-
|
|
26
|
+
<lastmod>2026-05-04T15:36:29.047Z</lastmod>
|
|
23
27
|
</url>
|
|
24
28
|
<url>
|
|
25
29
|
<loc>http://localhost:5173/hr-system-assistant</loc>
|
|
26
|
-
<lastmod>2026-05-
|
|
30
|
+
<lastmod>2026-05-04T15:36:29.047Z</lastmod>
|
|
27
31
|
</url>
|
|
28
32
|
<url>
|
|
29
33
|
<loc>http://localhost:5173/rest-api-chat</loc>
|
|
30
|
-
<lastmod>2026-05-
|
|
34
|
+
<lastmod>2026-05-04T15:36:29.047Z</lastmod>
|
|
31
35
|
</url>
|
|
32
36
|
<url>
|
|
33
37
|
<loc>http://localhost:5173/simple-ai-chat</loc>
|
|
34
|
-
<lastmod>2026-05-
|
|
38
|
+
<lastmod>2026-05-04T15:36:29.047Z</lastmod>
|
|
35
39
|
</url>
|
|
36
40
|
<url>
|
|
37
41
|
<loc>http://localhost:5173/simple-ai-chat-multimodal</loc>
|
|
38
|
-
<lastmod>2026-05-
|
|
42
|
+
<lastmod>2026-05-04T15:36:29.047Z</lastmod>
|
|
39
43
|
</url>
|
|
40
44
|
<url>
|
|
41
45
|
<loc>http://localhost:5173/wa-state-electric-vehicles-population</loc>
|
|
42
|
-
<lastmod>2026-05-
|
|
46
|
+
<lastmod>2026-05-04T15:36:29.047Z</lastmod>
|
|
43
47
|
</url>
|
|
44
48
|
</urlset>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a9 as o,aa as n}from"./MermaidRenderer-VYLR5GOS.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-DEBJORqa.js";import{_ as i}from"./MermaidRenderer-VYLR5GOS.js";import"./chunk-FMBD7UC4-B0p-wnvB.js";import"./chunk-YZCP3GAM-1aFbRa3d.js";import"./chunk-55IACEB6-COFVd3oq.js";import"./chunk-EDXVE4YY-DRSMNuYZ.js";import"./purify.es-BlZidd4c.js";import"./index-CFJE7oH8.js";import"./step-EjIQ8UIn.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-DEBJORqa.js";import{_ as i}from"./MermaidRenderer-VYLR5GOS.js";import"./chunk-FMBD7UC4-B0p-wnvB.js";import"./chunk-YZCP3GAM-1aFbRa3d.js";import"./chunk-55IACEB6-COFVd3oq.js";import"./chunk-EDXVE4YY-DRSMNuYZ.js";import"./purify.es-BlZidd4c.js";import"./index-CFJE7oH8.js";import"./step-EjIQ8UIn.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./graph-k6HtItlT.js";var e=4;function a(o){return r(o,e)}export{a as c};
|