mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-21 07:45:36 +08:00
62 lines
100 KiB
JavaScript
62 lines
100 KiB
JavaScript
|
|
import{m as e,p as t}from"./src.OgxTg4hg.js";import{n}from"./chunk-Y2CYZVJY.DsF7k-Jl.js";import{A as r,B as i,M as a,T as o,b as s,g as c,x as l,z as u}from"./chunk-WYO6CB5R.Bq018eTN.js";import{a as d,r as f,u as p}from"./chunk-ICXQ74PX.CHLqHIum.js";import{t as m}from"./chunk-HOUHSVGY.CdijRtwJ.js";import{n as h}from"./chunk-Q4XR5HBZ.4OOalI9b.js";import{n as g,t as _}from"./chunk-OGEWGWER.CAu18ldV.js";import{a as v,i as y,r as b,t as x}from"./chunk-C7G6YPKG.E3ngv4Wc.js";import{t as S}from"./rough.esm.CSKSodPl.js";var C=n(async(e,n,r)=>{let i,a=n.useHtmlLabels||c(l()?.htmlLabels);i=r||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,n.domId||n.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,p(n.labelStyle)),f;f=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let m=!!n.icon||!!n.img,g=n.labelType===`markdown`,v=await h(s,u(d(f),l()),{useHtmlLabels:a,width:n.width||l().flowchart?.wrappingWidth,classes:g?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:m,markdown:g},l()),y=v.getBBox(),b=(n?.padding??0)/2;if(a){let e=v.children[0],n=t(v);await _(e,f),y=e.getBoundingClientRect(),n.attr(`width`,y.width),n.attr(`height`,y.height)}return a?s.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):s.attr(`transform`,`translate(0, `+-y.height/2+`)`),n.centerLabel&&s.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:y,halfPadding:b,label:s}},`labelHelper`),w=n(async(e,n,r)=>{let i=r.useHtmlLabels??o(l()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await h(a,u(d(n),l()),{useHtmlLabels:i,width:r.width||l()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=s.getBBox(),f=r.padding/2;if(o(l())){let e=s.children[0],n=t(s);c=e.getBoundingClientRect(),n.attr(`width`,c.width),n.attr(`height`,c.height)}return i?a.attr(`transform`,`translate(`+-c.width/2+`, `+-c.height/2+`)`):a.attr(`transform`,`translate(0, `+-c.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-c.width/2+`, `+-c.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:c,halfPadding:f,label:a}},`insertLabel`),T=n((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),E=n((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function D(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}n(D,`createPathFromPoints`);function O(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}n(O,`generateFullSineWavePoints`);function k(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}n(k,`generateCirclePoints`);function A(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=t.find(e=>e.getAttribute(`fill`)!==`none`),o=t.find(e=>e.getAttribute(`stroke`)!==`none`),s=n((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}n(A,`mergePaths`);var j=n((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),M=n(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=l(),c=o(s);return await h(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`),N=n((
|
||
|
|
M ${i.x},${i.y} L ${o.x},${o.y}`}n(fe,`createLine`);function pe(t,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r,n.label=``;let a=t.insert(`g`).attr(`class`,E(n)).attr(`id`,n.domId??n.id),o=Math.max(30,n?.width??0),{cssStyles:s}=n,c=S.svg(a),l=v(n,{});n.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=fe(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),T(n,p),n.intersect=function(t){return e.info(`crossedCircle intersect`,n,{radius:o,point:t}),G.circle(n,o,t)},a}n(pe,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}n(J,`generateCirclePoints`);async function me(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...J(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...J(l/2+d*2,-d,d,20,-180,-270),...J(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...J(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...J(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...J(l/2+l*.1,-d,d,20,-180,-270),...J(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...J(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=S.svg(i),g=v(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=D(p).replace(`Z`,``),b=h.path(_,g),x=D(m),w=h.path(x,{...g}),O=i.insert(`g`,`:first-child`);return O.insert(()=>w,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>b,`:first-child`),O.attr(`class`,`text`),f&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,m,e)},i}n(me,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}n(Y,`generateCirclePoints`);async function he(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=S.svg(i),g=v(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=D(p).replace(`Z`,``),b=h.path(_,g),x=D(m),w=h.path(x,{...g}),O=i.insert(`g`,`:first-child`);return O.insert(()=>w,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>b,`:first-child`),O.attr(`class`,`text`),f&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,m,e)},i}n(he,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}n(X,`generateCirclePoints`);async function ge(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t
|
||
|
|
a${i},${a} 0,0,1 0,${-r}
|
||
|
|
l${n},0
|
||
|
|
a${i},${a} 0,0,1 0,${r}
|
||
|
|
M${n},${-r}
|
||
|
|
a${i},${a} 0,0,0 0,${r}
|
||
|
|
l${-n},0`,`createCylinderPathD`),St=n((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),Ct=n((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),wt=5,Tt=10;async function Et(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?12:i/2;if(t.width||t.height){let e=t.height??0;t.height=(t.height??0)-a,t.height<wt&&(t.height=wt);let n=e/2/(2.5+e/50);t.width=(t.width??0)-a-n*3,t.width<Tt&&(t.width=Tt)}let{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=(t.height?t.height:s.height)+a,u=l/2,d=u/(2.5+l/50),f=(t.width?t.width:s.width)+d+a,{cssStyles:m}=t,h;if(t.look===`handDrawn`){let e=S.svg(o),n=St(0,0,f,l,d,u),r=Ct(0,0,f,l,d,u),i=e.path(n,v(t,{})),a=e.path(r,v(t,{fill:`none`}));h=o.insert(()=>a,`:first-child`),h=o.insert(()=>i,`:first-child`),h.attr(`class`,`basic label-container`),m&&h.attr(`style`,m)}else{let e=xt(0,0,f,l,d,u);h=o.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,p(m)).attr(`style`,r),h.attr(`class`,`basic label-container outer-path`),m&&h.selectAll(`path`).attr(`style`,m),r&&h.selectAll(`path`).attr(`style`,r)}return h.attr(`label-offset-x`,d),h.attr(`transform`,`translate(${-f/2}, ${l/2} )`),c.attr(`transform`,`translate(${-(s.width/2)-d-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),T(t,h),t.intersect=function(e){let n=G.rect(t,e),r=n.y-(t.y??0);if(u!=0&&(Math.abs(r)<(t.height??0)/2||Math.abs(r)==(t.height??0)/2&&Math.abs(n.x-(t.x??0))>(t.width??0)/2-d)){let i=d*d*(1-r*r/(u*u));i!=0&&(i=Math.sqrt(Math.abs(i))),i=d-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},o}n(Et,`tiltedCylinder`);async function Dt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}n(Dt,`trapezoid`);async function Ot(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<5&&(t.height=5),t.width=(t.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o*2,{cssStyles:d}=t,f=S.svg(s),p=v(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],h=D(m),g=f.path(h,p),_=s.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,r),T(t,_),t.intersect=function(e){return G.polygon(t,m,e)},s}n(Ot,`trapezoidalPentagon`);var kt=10,At=10;async function jt(t,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.width=((n?.width??0)-o)/2,n.width<At&&(n.width=At),n.height=n?.height??0,n.height<kt&&(n.height=kt));let{shapeSvg:s,bbox:u,label:d}=await C(t,n,E(n)),f=c(l().flowchart?.htmlLabels),p=(n?.width?n?.width:u.width)+o,m=n?.height?n?.height:p+u.height,h=m,g=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-m}],{cssStyles:_}=n,b=S.svg(s),x=v(n,{});n.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let w=D(g),O=b.path(w,x),k=s.insert(()=>O,`:first-child`).attr(`transform`,`translate(${-m/2}, ${m/2})`).attr(`class`,`outer-path`);return _&&n.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,_),i&&n.look!==`handDrawn`&&k.selectChildren(`path`).attr(`styl
|
||
|
|
M${p-Q},${m} L${p+d},${m}
|
||
|
|
M${p},${m-Q} L${p},${m+f}`;t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let w=g.path(x,_),D=o.insert(()=>w,`:first-child`);return D.attr(`transform`,`translate(${Q/2}, ${Q/2})`),D.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${-(s.width/2)+Q/2-(s.x-(s.left??0))}, ${-(s.height/2)+Q/2-(s.y-(s.top??0))})`),T(t,D),t.intersect=function(e){return G.polygon(t,b,e)},o}n(Pt,`windowPane`);var Ft=new Set([`redux-color`,`redux-dark-color`]),It=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]);async function Lt(e,n){let r=n;r.alias&&(n.label=r.alias);let{theme:i,themeVariables:a}=s(),{rowEven:o,rowOdd:l,nodeBorder:u,borderColorArray:d}=a;if(n.look===`handDrawn`){let{themeVariables:t}=s(),{background:r}=t;await Lt(e,{...n,id:n.id+`-background`,domId:(n.domId||n.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let p=s();n.useHtmlLabels=p.htmlLabels;let m=p.er?.diagramPadding??10,h=p.er?.entityPadding??6,{cssStyles:g}=n,{labelStyles:_,nodeStyles:b}=y(n);if(r.attributes.length===0&&n.label){let t={rx:0,ry:0,labelPaddingX:m,labelPaddingY:m*1.5,classes:``};f(n.label,p)+t.labelPaddingX*2<p.er.minEntityWidth&&(n.width=p.er.minEntityWidth);let a=await we(e,n,t);if(i!=null&&Ft.has(i)){let e=r.colorIndex??0;a.attr(`data-color-id`,`color-${e%d.length}`)}if(!c(p.htmlLabels)){let e=a.select(`text`),t=e.node()?.getBBox();e.attr(`transform`,`translate(${-t.width/2}, 0)`)}return a}p.htmlLabels||(m*=1.25,h*=1.25);let x=E(n);x||=`node default`;let C=e.insert(`g`).attr(`class`,x).attr(`id`,n.domId||n.id),w=await Rt(C,n.label??``,p,0,0,[`name`],_);w.height+=h;let D=0,O=[],k=[],A=0,j=0,M=0,N=0,P=!0,F=!0;for(let e of r.attributes){let t=await Rt(C,e.type,p,0,D,[`attribute-type`],_);A=Math.max(A,t.width+m);let n=await Rt(C,e.name,p,0,D,[`attribute-name`],_);j=Math.max(j,n.width+m);let r=await Rt(C,e.keys.join(),p,0,D,[`attribute-keys`],_);M=Math.max(M,r.width+m);let i=await Rt(C,e.comment,p,0,D,[`attribute-comment`],_);N=Math.max(N,i.width+m);let a=Math.max(t.height,n.height,r.height,i.height)+h;k.push({yOffset:D,rowHeight:a}),D+=a}let I=4;M<=m&&(P=!1,M=0,I--),N<=m&&(F=!1,N=0,I--);let L=C.node().getBBox();if(w.width+m*2-(A+j+M+N)>0){let e=w.width+m*2-(A+j+M+N);A+=e/I,j+=e/I,M>0&&(M+=e/I),N>0&&(N+=e/I)}let ee=A+j+M+N,R=S.svg(C),z=v(n,{});n.look!==`handDrawn`&&(z.roughness=0,z.fillStyle=`solid`);let te=0;k.length>0&&(te=k.reduce((e,t)=>e+(t?.rowHeight??0),0));let B=Math.max(L.width+m*2,n?.width||0,ee),V=Math.max((te??0)+w.height,n?.height||0),H=-B/2,U=-V/2;if(C.selectAll(`g:not(:first-child)`).each((e,n,r)=>{let i=t(r[n]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]),i.attr(`class`).includes(`attribute-name`)?o+=A:i.attr(`class`).includes(`attribute-keys`)?o+=A+j:i.attr(`class`).includes(`attribute-comment`)&&(o+=A+j+M))}i.attr(`transform`,`translate(${H+m/2+o}, ${s+U+w.height+h/2})`)}),C.select(`.name`).attr(`transform`,`translate(`+-w.width/2+`, `+(U+h/2)+`)`),i!=null&&Ft.has(i)){let e=r.colorIndex??0;C.attr(`data-color-id`,`color-${e%d.length}`)}let ne=R.rectangle(H,U,B,V,z),re=C.insert(()=>ne,`:first-child`).attr(`class`,`outer-path`).attr(`style`,g.join(``));O.push(0);for(let[e,t]of k.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=R.rectangle(H,w.height+U+t?.yOffset,B,t?.rowHeight,{...z,fill:n?o:l,stroke:u});C.insert(()=>r,`g.label`).attr(`style`,g.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let ie=1e-4,W=zt(H,w.height+U,B+H,w.height+U,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z);if(C.insert(()=>K).attr(`class`,`divider`),W=zt(A+H,w.height+U,A+H,V+U,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z),C.insert(()=>K).attr(`class`,`divider`),P){let e=A+j+H;W=zt(e,w.height+U,e,V+U,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z),C.insert(()=>K).attr(`class`,`divider`)}if(F){let e=A+j+M+H;W=zt(e,w.height+U,e,V+U,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z),C.insert(()=>K).attr(`c
|
||
|
|
a${d},${d} 1 0,0 ${g*.25},${-1*_*.1}
|
||
|
|
a${d},${d} 1 0,0 ${g*.25},0
|
||
|
|
a${d},${d} 1 0,0 ${g*.25},0
|
||
|
|
a${d},${d} 1 0,0 ${g*.25},${_*.1}
|
||
|
|
|
||
|
|
a${d},${d} 1 0,0 ${g*.15},${_*.33}
|
||
|
|
a${d*.8},${d*.8} 1 0,0 0,${_*.34}
|
||
|
|
a${d},${d} 1 0,0 ${-1*g*.15},${_*.33}
|
||
|
|
|
||
|
|
a${d},${d} 1 0,0 ${-1*g*.25},${_*.15}
|
||
|
|
a${d},${d} 1 0,0 ${-1*g*.25},0
|
||
|
|
a${d},${d} 1 0,0 ${-1*g*.25},0
|
||
|
|
a${d},${d} 1 0,0 ${-1*g*.25},${-1*_*.15}
|
||
|
|
|
||
|
|
a${d},${d} 1 0,0 ${-1*g*.1},${-1*_*.33}
|
||
|
|
a${d*.8},${d*.8} 1 0,0 0,${-1*_*.34}
|
||
|
|
a${d},${d} 1 0,0 ${g*.1},${-1*_*.33}
|
||
|
|
H0 V0 Z`;if(n.look===`handDrawn`){let e=S.svg(a),t=v(n,{}),r=e.path(x,t);b=a.insert(()=>r,`:first-child`),b.attr(`class`,`basic label-container`).attr(`style`,p(f))}else b=a.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`d`,x);return b.attr(`transform`,`translate(${-g/2}, ${-_/2})`),T(n,b),n.calcIntersect=function(e,t){return G.rect(e,t)},n.intersect=function(t){return e.info(`Bang intersect`,n,t),G.rect(n,t)},a}n(Kt,`bang`);async function qt(t,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await C(t,n,E(n)),l=o.width+2*s,u=o.height+2*s,d=.15*l,f=.25*l,m=.35*l,h=.2*l,{cssStyles:g}=n,_,b=`M0 0
|
||
|
|
a${d},${d} 0 0,1 ${l*.25},${-1*l*.1}
|
||
|
|
a${m},${m} 1 0,1 ${l*.4},${-1*l*.1}
|
||
|
|
a${f},${f} 1 0,1 ${l*.35},${l*.2}
|
||
|
|
|
||
|
|
a${d},${d} 1 0,1 ${l*.15},${u*.35}
|
||
|
|
a${h},${h} 1 0,1 ${-1*l*.15},${u*.65}
|
||
|
|
|
||
|
|
a${f},${d} 1 0,1 ${-1*l*.25},${l*.15}
|
||
|
|
a${m},${m} 1 0,1 ${-1*l*.5},0
|
||
|
|
a${d},${d} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
||
|
|
|
||
|
|
a${d},${d} 1 0,1 ${-1*l*.1},${-1*u*.35}
|
||
|
|
a${h},${h} 1 0,1 ${l*.1},${-1*u*.65}
|
||
|
|
H0 V0 Z`;if(n.look===`handDrawn`){let e=S.svg(a),t=v(n,{}),r=e.path(b,t);_=a.insert(()=>r,`:first-child`),_.attr(`class`,`basic label-container`).attr(`style`,p(g))}else _=a.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`d`,b);return c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`),_.attr(`transform`,`translate(${-l/2}, ${-u/2})`),T(n,_),n.calcIntersect=function(e,t){return G.rect(e,t)},n.intersect=function(t){return e.info(`Cloud intersect`,n,t),G.rect(n,t)},a}n(qt,`cloud`);async function Jt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await C(e,t,E(t)),c=a.width+8*o,l=a.height+2*o,u=t.look===`neo`?`
|
||
|
|
M${-c/2} ${l/2-5}
|
||
|
|
v${-l+10}
|
||
|
|
q0,-5 5,-5
|
||
|
|
h${c-10}
|
||
|
|
q5,0 5,5
|
||
|
|
v${l-5}
|
||
|
|
H${-c/2}
|
||
|
|
Z
|
||
|
|
`:`
|
||
|
|
M${-c/2} ${l/2-5}
|
||
|
|
v${-l+10}
|
||
|
|
q0,-5 5,-5
|
||
|
|
h${c-10}
|
||
|
|
q5,0 5,5
|
||
|
|
v${l-10}
|
||
|
|
q0,5 -5,5
|
||
|
|
h${-(c-10)}
|
||
|
|
q-5,0 -5,-5
|
||
|
|
Z
|
||
|
|
`;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,u);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-c/2).attr(`y1`,l/2).attr(`x2`,c/2).attr(`y2`,l/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),T(t,d),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return G.rect(t,e)},i}n(Jt,`defaultMindmapNode`);async function Yt(e,t){return de(e,t,{padding:t.padding??0})}n(Yt,`mindmapCircle`);var Xt=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:ut},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:st},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:dt},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:gt},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:Ce},{semanticName:`Data Store`,name:`Data Store`,shortName:`datastore`,description:`Data flow diagram data store`,aliases:[`data-store`],handler:Te},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:de},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:Kt},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:qt},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:it},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:Fe},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:Ge},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:We},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:Dt},{semanticName:`Manual Operation`,name:`Trapezoid Base Top`,shortName:`trap-t`,description:`Represents a manual task`,aliases:[`manual`,`trapezoid-top`,`inv-trapezoid`],internalAliases:[`inv_trapezoid`],handler:He},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:De},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:bt},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:le},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:ct},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:mt},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:pt},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:Me},{semanticName
|