@next-bricks/diagram 0.46.1 → 0.47.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.
Files changed (32) hide show
  1. package/dist/bricks.json +1 -1
  2. package/dist/chunks/4192.5903f562.js +2 -0
  3. package/dist/chunks/4192.5903f562.js.map +1 -0
  4. package/dist/chunks/6055.9858b4b9.js +2 -0
  5. package/dist/chunks/6055.9858b4b9.js.map +1 -0
  6. package/dist/chunks/9711.58afee04.js +2 -0
  7. package/dist/chunks/9711.58afee04.js.map +1 -0
  8. package/dist/chunks/eo-display-canvas.31ead79a.js +2 -0
  9. package/dist/chunks/eo-display-canvas.31ead79a.js.map +1 -0
  10. package/dist/chunks/{eo-draw-canvas.7ee23e06.js → eo-draw-canvas.a5b81b45.js} +2 -2
  11. package/dist/chunks/eo-draw-canvas.a5b81b45.js.map +1 -0
  12. package/dist/chunks/{main.2a2456a9.js → main.5593807b.js} +2 -2
  13. package/dist/chunks/{main.2a2456a9.js.map → main.5593807b.js.map} +1 -1
  14. package/dist/examples.json +4 -4
  15. package/dist/{index.de34a017.js → index.cccdafd2.js} +2 -2
  16. package/dist/{index.de34a017.js.map → index.cccdafd2.js.map} +1 -1
  17. package/dist/manifest.json +57 -57
  18. package/dist/types.json +62 -0
  19. package/dist-types/diagram/interfaces.d.ts +1 -1
  20. package/dist-types/draw-canvas/interfaces.d.ts +4 -1
  21. package/docs/eo-diagram.md +1 -1
  22. package/docs/eo-draw-canvas.md +2 -0
  23. package/package.json +2 -2
  24. package/dist/chunks/4192.d6afa672.js +0 -2
  25. package/dist/chunks/4192.d6afa672.js.map +0 -1
  26. package/dist/chunks/6055.c26f35cf.js +0 -2
  27. package/dist/chunks/6055.c26f35cf.js.map +0 -1
  28. package/dist/chunks/9711.b1a2a5bc.js +0 -2
  29. package/dist/chunks/9711.b1a2a5bc.js.map +0 -1
  30. package/dist/chunks/eo-display-canvas.162cc0f1.js +0 -2
  31. package/dist/chunks/eo-display-canvas.162cc0f1.js.map +0 -1
  32. package/dist/chunks/eo-draw-canvas.7ee23e06.js.map +0 -1
package/dist/bricks.json CHANGED
@@ -16,5 +16,5 @@
16
16
  "basic.lock-body-scroll"
17
17
  ]
18
18
  },
19
- "filePath": "bricks/diagram/dist/index.de34a017.js"
19
+ "filePath": "bricks/diagram/dist/index.cccdafd2.js"
20
20
  }
@@ -0,0 +1,2 @@
1
+ "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[4192],{3739:(t,e,r)=>{r.d(e,{c:()=>o});var i=r(8769),n=r.n(i);function o(t){let e,{id:r,type:i,strokeColor:o}=t;switch(i){case"0..1":e=y;break;case"0..N":e=x;break;case"circle":e=h;break;default:e=s}return n().createElement(e,{id:r,strokeColor:o})}function h(t){let{id:e,strokeColor:r}=t;return n().createElement("marker",{viewBox:"0 0 9 9",refX:3,refY:3,id:e,overflow:"visible",markerWidth:9,markerHeight:9},n().createElement("circle",{stroke:"none",fill:r,cx:3,cy:3,r:3}))}function s(t){let{id:e,strokeColor:r}=t;return n().createElement("marker",{id:e,viewBox:"0 0 6 6",refX:5,refY:3,markerWidth:6,markerHeight:6,orient:"auto-start-reverse",strokeLinejoin:"round"},n().createElement("path",{d:"M 0.5 0.5 L 5.5 3 L 0.5 5.5 z",stroke:r,strokeWidth:1,fill:r}))}function y(t){let{id:e,strokeColor:r}=t;return n().createElement("marker",{id:e,viewBox:"0 0 21 11",refX:.5,refY:5.5,markerWidth:21,markerHeight:11,orient:"auto-start-reverse"},n().createElement("path",{d:"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 15.5 0.5 V 10.5 M 10.5 5.5 H 20.5",stroke:r,strokeWidth:1,fill:"none"}))}function x(t){let{id:e,strokeColor:r}=t;return n().createElement("marker",{id:e,viewBox:"0 0 21 11",refX:.5,refY:5.5,markerWidth:21,markerHeight:11,orient:"auto-start-reverse"},n().createElement("path",{d:"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 20.5 0.5 L 10.5 5.5 L 20.5 10.5 M 10.5 5.5 H 20.5",stroke:r,strokeWidth:1,fill:"none"}))}},8653:(t,e,r)=>{r.d(e,{S:()=>x});var i=r(482),n=r(4643),o=r(3488),h=r(6066),s=r(4993),y=r(3269);function x(t,e,r,x){if(!Array.isArray(t))return"";let a;switch(e){case"curveLinear":a=i.A;break;case"curveBumpX":a=n.dJ;break;case"curveBumpY":a=n.kl;break;case"curveMonotoneX":a=o.G;break;case"curveMonotoneY":a=o.N;break;case"curveNatural":a=h.A;break;default:a=s.Ay}const l=c(t[1],t[0],r),u=c(t[t.length-2],t[t.length-1],x);return(0,y.A)().x(((e,r)=>e.x-(0===r?l.x:r===t.length-1?u.x:0))).y(((e,r)=>e.y-(0===r?l.y:r===t.length-1?u.y:0))).curve(a)(t)}function c(t,e,r){if(!r)return{x:0,y:0};const{x:i,y:n}=t,{x:o,y:h}=e,s=r/Math.sqrt(Math.pow(o-i,2)+Math.pow(h-n,2));return{x:(o-i)*s,y:(h-n)*s}}},3188:(t,e,r)=>{r.d(e,{h:()=>n});var i=r(733);function n(t,e,r,n){const h=!(null==n||!n.exitPosition),s=!(null==n||!n.entryPosition);if(t===e||(0,i.w)(t,e,0,0)&&!h&&!s)return null;let y,x,c=0,a=0;if(r){const i=e.x-t.x,n=e.y-t.y,o=Math.atan2(n,i);c=r/2*Math.cos(o+Math.PI/2),a=r/2*Math.sin(o+Math.PI/2)}const l=[h?[t.x+(n.exitPosition.x-.5)*t.width,t.y+(n.exitPosition.y-.5)*t.height]:[t.x+c,t.y+a],s?[e.x+(n.entryPosition.x-.5)*e.width,e.y+(n.entryPosition.y-.5)*e.height]:[e.x+c,e.y+a]];if(h)y=l[0];else{const e=o(t,l);y=e.length>0?e[0]:[t.x,t.y]}if(s)x=l[1];else{const t=o(e,l);x=t.length>0?t[0]:[e.x,e.y]}return[{x:y[0],y:y[1]},{x:x[0],y:x[1]}]}function o(t,e){const r=[[t.x-t.width/2,t.y-t.height/2],[t.x+t.width/2,t.y-t.height/2],[t.x+t.width/2,t.y+t.height/2],[t.x-t.width/2,t.y+t.height/2]],i=[];for(let t=0;t<4;t++)i.push([r[t],r[(t+1)%4]]);const n=[];for(const t of i){const r=h(e[0],e[1],t[0],t[1]);r&&n.push(r)}return n}function h(t,e,r,i){let[n,o]=t,[h,s]=e,[y,x]=r,[c,a]=i;if(n===h&&o===s||y===c&&x===a)return null;const l=(a-x)*(h-n)-(c-y)*(s-o);if(0===l)return null;const u=((c-y)*(o-x)-(a-x)*(n-y))/l,f=((h-n)*(o-x)-(s-o)*(n-y))/l;return u<0||u>1||f<0||f>1?null:[n+u*(h-n),o+u*(s-o)]}},4059:(t,e,r)=>{r.d(e,{o:()=>n});const i=20;function n(t,e,r,n,h,s){const y=o(t,r,h),x=o(e,n,s);let c=[],a=!1;const l="top"===r||"bottom"===r;if(l!==("top"===n||"bottom"===n)){let o,h,s,u,f,d;l?(o=e,h=t,s="right"===n?1:-1,u="bottom"===r?1:-1,f=x,d=y):(o=t,h=e,s="right"===r?1:-1,u="bottom"===n?1:-1,f=y,d=x,a=!0);const g=f.x+i*s,k=d.y+i*u;if((o.x-h.x)*s>=0)if((h.y-o.y)*u>=0)c=[{x:d.x,y:k},{x:g,y:k},{x:g,y:f.y}];else{const t=h.y+(h.height/2+i)*u,e=o.y-(o.height/2+i)*u;if((e-t)*u>=0){const r=(t+e)/2;c=[{x:d.x,y:r},{x:g,y:r},{x:g,y:f.y}]}else{const r=(h.x+h.width/2*s+o.x-o.width/2*s)/2;c=[{x:d.x,y:t},{x:r,y:t},{x:r,y:e},{x:g,y:e},{x:g,y:f.y}]}}else if((f.y-k)*u>=0)if((d.x-g)*s>=0)c=[{x:d.x,y:f.y}];else{const t=(h.y+(h.height/2+i)*u+(o.y-(o.height/2+i)*u))/2;c=[{x:d.x,y:t},{x:g,y:t},{x:g,y:f.y}]}else{const t=h.x-(h.width/2+i)*s;if((t-g)*s>=0){const e=(t+g)/2;c=[{x:d.x,y:k},{x:e,y:k},{x:e,y:f.y}]}else{const e=(h.y-h.height/2*u+o.y+o.height/2*u)/2;c=[{x:d.x,y:k},{x:t,y:k},{x:t,y:e},{x:g,y:e},{x:g,y:f.y}]}}}else if(r===n){const n="bottom"===r||"right"===r?1:-1;let o,h,s,u;const f=l?"y":"x",d=l?"x":"y";let g,k,w,m;e[f]<t[f]?(o=e,h=t,s=x,u=y,a=1===n):(o=t,h=e,s=y,u=x,a=1!==n),1===n?(g=h,k=o,w=u,m=s):(g=o,k=h,w=s,m=u);const b=g===(e[d]<t[d]?t:e)?1:-1;if(l){const t=g.x-(g.width/2+i)*b,e=w.y+i*n;if((t-m.x)*b>=0)c=[{x:m.x,y:e},{x:w.x,y:e}];else{const r=(k.y+k.height/2*n+g.y-g.height/2*n)/2;c=[{x:m.x,y:r},{x:t,y:r},{x:t,y:e},{x:w.x,y:e}]}}else{const t=w.x+i*n,e=g.y-(g.height/2+i)*b;if((e-m.y)*b>=0)c=[{x:t,y:m.y},{x:t,y:w.y}];else{const r=(k.x+k.width/2*n+g.x-g.width/2*n)/2;c=[{x:r,y:m.y},{x:r,y:e},{x:t,y:e},{x:t,y:w.y}]}}}else{const r="bottom"===n||"right"===n?1:-1;let o,h,s,a;l?(o="y",h="x",s="height",a="width"):(o="x",h="y",s="width",a="height");const u=e[o]+e[s]/2*r,f=t[o]-t[s]/2*r,d=u+i*r,g=f-i*r,k=y[h]===x[h];if((g-d)*r>=0){const t=(g+d)/2;c=k?[]:[{[h]:y[h],[o]:t},{[h]:x[h],[o]:t}]}else if(k&&(f-u)*r>=0)c=[];else{const n=e[h]<t[h]?-1:1,l=t[h]+(t[a]/2+i)*n,u=e[h]-(e[a]/2+i)*n;if((u-l)*n>=0||Math.abs((g-d)*r)<i){const t=(l+u)/2;c=[{[h]:y[h],[o]:g},{[h]:t,[o]:g},{[h]:t,[o]:d},{[h]:x[h],[o]:d}]}else{const i=(t[o]+t[s]/2*r+e[o]-e[s]/2*r)/2;c=[{[h]:y[h],[o]:g},{[h]:l,[o]:g},{[h]:l,[o]:i},{[h]:u,[o]:i},{[h]:u,[o]:d},{[h]:x[h],[o]:d}]}}}return a&&c.reverse(),[y,...c,x]}function o(t,e,r){const{x:i,y:n,width:o,height:h}=t;switch(e){case"top":return{x:i-o/2+o*r,y:n-h/2};case"bottom":return{x:i-o/2+o*r,y:n+h/2};case"left":return{x:i-o/2,y:n-h/2+h*r};case"right":return{x:i+o/2,y:n-h/2+h*r}}}},733:(t,e,r)=>{function i(t,e,r,i){const o=r?n(t,r):t,h=i?n(e,i):e,s=Math.min(o.x-o.width/2,h.x-h.width/2),y=Math.max(o.x+o.width/2,h.x+h.width/2),x=Math.min(o.y-o.height/2,h.y-h.height/2),c=Math.max(o.y+o.height/2,h.y+h.height/2);return y-s<o.width+h.width&&c-x<o.height+h.height}function n(t,e){return{x:t.x-t.width/2-e,y:t.y-t.height/2-e,width:t.width+2*e,height:t.height+2*e}}r.d(e,{w:()=>i})},8802:(t,e,r)=>{function i(t){if(Array.isArray(t)){const e=t[0],r=t.length>1?t[1]:e;return[e,r,t.length>2?t[2]:e,t.length>3?t[3]:r]}return new Array(4).fill(t)}r.d(e,{D:()=>i})}}]);
2
+ //# sourceMappingURL=4192.5903f562.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunks/4192.5903f562.js","mappings":"gLAYO,SAASA,EAAeC,GAIO,IAChCC,GAL0B,GAC9BC,EAAE,KACFC,EAAI,YACJC,GACqBJ,EAGrB,OAAQG,GACN,IAAK,OACHF,EAAYI,EACZ,MACF,IAAK,OACHJ,EAAYK,EACZ,MACF,IAAK,SACHL,EAAYM,EACZ,MACF,QACEN,EAAYO,EAEhB,OAAOC,IAAAA,cAACR,EAAS,CAACC,GAAIA,EAAIE,YAAaA,GACzC,CAEA,SAASG,EAAYG,GAGqB,IAHpB,GACpBR,EAAE,YACFE,GACyBM,EAGzB,OACED,I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,EAAE7E,OAAS,EAAG+E,EAAEnH,EAAImH,EAAE/E,OAAS,GAC7D,OAAOkF,EAAQF,EAAOH,EAAE9E,MAAQgF,EAAEhF,OAASsF,EAASD,EAAMP,EAAE7E,OAAS+E,EAAE/E,MACzE,CAEA,SAAS8E,EAAoBR,EAAgBgB,GAC3C,MAAO,CACL5H,EAAG4G,EAAK5G,EAAI4G,EAAKvE,MAAQ,EAAIuF,EAC7B1H,EAAG0G,EAAK1G,EAAI0G,EAAKtE,OAAS,EAAIsF,EAC9BvF,MAAOuE,EAAKvE,MAAkB,EAAVuF,EACpBtF,OAAQsE,EAAKtE,OAAmB,EAAVsF,EAE1B,C,iCCtBO,SAASC,EACdC,GAEA,GAAI7I,MAAMC,QAAQ4I,GAAQ,CACxB,MAAMC,EAAKD,EAAM,GACXE,EAAKF,EAAMhI,OAAS,EAAIgI,EAAM,GAAMC,EAG1C,MAAO,CAACA,EAAIC,EAFDF,EAAMhI,OAAS,EAAIgI,EAAM,GAAMC,EAC/BD,EAAMhI,OAAS,EAAIgI,EAAM,GAAME,EAE5C,CACA,OAAO,IAAI/I,MAAM,GAAGf,KAAK4J,EAC3B,C","sources":["webpack:///./src/diagram/MarkerComponent.tsx","webpack:///./src/diagram/lines/curveLine.ts","webpack:///./src/diagram/lines/getDirectLinePoints.ts","webpack:///./src/diagram/lines/getPolyLinePoints.ts","webpack:///./src/diagram/processors/doTwoNodesOverlap.ts","webpack:///./src/diagram/processors/extractPartialRectTuple.ts"],"sourcesContent":["import React from \"react\";\nimport type { LineMarkerType } from \"./interfaces\";\n\nexport interface MarkerComponentProps extends BaseMarkerComponentProps {\n type: LineMarkerType;\n}\n\nexport interface BaseMarkerComponentProps {\n id: string;\n strokeColor?: string;\n}\n\nexport function MarkerComponent({\n id,\n type,\n strokeColor,\n}: MarkerComponentProps): JSX.Element {\n let Component: (props: BaseMarkerComponentProps) => JSX.Element;\n\n switch (type) {\n case \"0..1\":\n Component = EntityRelationZeroOrOneMarker;\n break;\n case \"0..N\":\n Component = EntityRelationZeroOrManyMarker;\n break;\n case \"circle\":\n Component = CircleMarker;\n break;\n default:\n Component = ArrowMarker;\n }\n return <Component id={id} strokeColor={strokeColor} />;\n}\n\nfunction CircleMarker({\n id,\n strokeColor,\n}: BaseMarkerComponentProps): JSX.Element {\n const r = 3;\n const d = r * 3;\n return (\n <marker\n viewBox={`0 0 ${d} ${d}`}\n refX={r}\n refY={r}\n id={id}\n overflow=\"visible\"\n markerWidth={d}\n markerHeight={d}\n >\n <circle stroke=\"none\" fill={strokeColor} cx={r} cy={r} r={r} />\n </marker>\n );\n}\n\nfunction ArrowMarker({\n id,\n strokeColor,\n}: BaseMarkerComponentProps): JSX.Element {\n return (\n <marker\n id={id}\n viewBox=\"0 0 6 6\"\n refX={5}\n refY={3}\n markerWidth={6}\n markerHeight={6}\n orient=\"auto-start-reverse\"\n strokeLinejoin=\"round\"\n >\n <path\n d=\"M 0.5 0.5 L 5.5 3 L 0.5 5.5 z\"\n stroke={strokeColor}\n strokeWidth={1}\n fill={strokeColor}\n />\n </marker>\n );\n}\n\nfunction EntityRelationZeroOrOneMarker({\n id,\n strokeColor,\n}: BaseMarkerComponentProps): JSX.Element {\n return (\n <marker\n id={id}\n viewBox=\"0 0 21 11\"\n refX={0.5}\n refY={5.5}\n markerWidth={21}\n markerHeight={11}\n orient=\"auto-start-reverse\"\n >\n <path\n d=\"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 15.5 0.5 V 10.5 M 10.5 5.5 H 20.5\"\n stroke={strokeColor}\n strokeWidth={1}\n fill=\"none\"\n />\n </marker>\n );\n}\n\nfunction EntityRelationZeroOrManyMarker({\n id,\n strokeColor,\n}: BaseMarkerComponentProps): JSX.Element {\n return (\n <marker\n id={id}\n viewBox=\"0 0 21 11\"\n refX={0.5}\n refY={5.5}\n markerWidth={21}\n markerHeight={11}\n orient=\"auto-start-reverse\"\n >\n <path\n d=\"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 20.5 0.5 L 10.5 5.5 L 20.5 10.5 M 10.5 5.5 H 20.5\"\n stroke={strokeColor}\n strokeWidth={1}\n fill=\"none\"\n />\n </marker>\n );\n}\n","import {\n curveLinear,\n line,\n curveBasis,\n curveBumpX,\n curveBumpY,\n type CurveFactory,\n curveMonotoneX,\n curveNatural,\n curveMonotoneY,\n} from \"d3-shape\";\nimport type { CurveType, NodePosition } from \"../interfaces\";\n\n/**\n * Generate Line from points\n */\nexport function curveLine(\n points: Array<NodePosition> | null | undefined,\n curveType: CurveType | undefined,\n startOffset: number,\n endOffset: number\n): string {\n if (!Array.isArray(points)) {\n return \"\";\n }\n let curveFactory: CurveFactory;\n switch (curveType) {\n case \"curveLinear\":\n curveFactory = curveLinear;\n break;\n case \"curveBumpX\":\n curveFactory = curveBumpX;\n break;\n case \"curveBumpY\":\n curveFactory = curveBumpY;\n break;\n case \"curveMonotoneX\":\n curveFactory = curveMonotoneX;\n break;\n case \"curveMonotoneY\":\n curveFactory = curveMonotoneY;\n break;\n case \"curveNatural\":\n curveFactory = curveNatural;\n break;\n default:\n curveFactory = curveBasis;\n }\n const startOffsets = getOffsets(points[1], points[0], startOffset);\n const endOffsets = getOffsets(\n points[points.length - 2],\n points[points.length - 1],\n endOffset\n );\n const lineFunction = line()\n .x(\n (d, index) =>\n (d as unknown as { x: number }).x -\n (index === 0\n ? startOffsets.x\n : index === points.length - 1\n ? endOffsets.x\n : 0)\n )\n .y(\n (d, index) =>\n (d as unknown as { y: number }).y -\n (index === 0\n ? startOffsets.y\n : index === points.length - 1\n ? endOffsets.y\n : 0)\n )\n .curve(curveFactory);\n return lineFunction(points as unknown as Array<[number, number]>)!;\n}\n\nfunction getOffsets(\n start: NodePosition,\n end: NodePosition,\n offset: number\n): NodePosition {\n if (!offset) {\n return { x: 0, y: 0 };\n }\n const { x: x0, y: y0 } = start;\n const { x: x1, y: y1 } = end;\n const distance = Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2));\n const ratio = offset / distance;\n return {\n x: (x1 - x0) * ratio,\n y: (y1 - y0) * ratio,\n };\n}\n","import type { EdgeView } from \"../../draw-canvas/interfaces\";\nimport type { NodePosition, NodeRect, PositionTuple } from \"../interfaces\";\nimport { doTwoNodesOverlap } from \"../processors/doTwoNodesOverlap\";\n\ntype LineTuple = [start: PositionTuple, end: PositionTuple];\n\nexport function getDirectLinePoints(\n source: NodeRect,\n target: NodeRect,\n parallelGap?: number,\n edgeView?: EdgeView\n): NodePosition[] | null {\n const hasExitPosition = !!edgeView?.exitPosition;\n const hasEntryPosition = !!edgeView?.entryPosition;\n\n // Ignore if two nodes are the same.\n // Ignore if two nodes overlap and no entry nor exit position.\n if (\n source === target ||\n (doTwoNodesOverlap(source, target, 0, 0) &&\n !(hasExitPosition || hasEntryPosition))\n ) {\n return null;\n }\n\n let p0: PositionTuple;\n let p1: PositionTuple;\n\n let xDiff = 0;\n let yDiff = 0;\n\n if (parallelGap) {\n const dx = target.x - source.x;\n const dy = target.y - source.y;\n const angle = Math.atan2(dy, dx);\n xDiff = (parallelGap / 2) * Math.cos(angle + Math.PI / 2);\n yDiff = (parallelGap / 2) * Math.sin(angle + Math.PI / 2);\n }\n\n const line: LineTuple = [\n hasExitPosition\n ? [\n source.x + (edgeView!.exitPosition!.x - 0.5) * source.width,\n source.y + (edgeView!.exitPosition!.y - 0.5) * source.height,\n ]\n : [source.x + xDiff, source.y + yDiff],\n hasEntryPosition\n ? [\n target.x + (edgeView!.entryPosition!.x - 0.5) * target.width,\n target.y + (edgeView!.entryPosition!.y - 0.5) * target.height,\n ]\n : [target.x + xDiff, target.y + yDiff],\n ];\n\n if (hasExitPosition) {\n p0 = line[0];\n } else {\n const sourceIntersections = getIntersections(source, line);\n // Todo: handle when more than one intersection\n if (sourceIntersections.length > 0) {\n p0 = sourceIntersections[0];\n } else {\n p0 = [source.x, source.y];\n }\n }\n\n if (hasEntryPosition) {\n p1 = line[1];\n } else {\n const targetIntersections = getIntersections(target, line);\n // Todo: handle when more than one intersection\n if (targetIntersections.length > 0) {\n p1 = targetIntersections[0];\n } else {\n p1 = [target.x, target.y];\n }\n }\n\n return [\n { x: p0[0], y: p0[1] },\n { x: p1[0], y: p1[1] },\n ];\n}\n\nfunction getIntersections(rect: NodeRect, line: LineTuple) {\n const vertices: PositionTuple[] = [\n [rect.x - rect.width / 2, rect.y - rect.height / 2],\n [rect.x + rect.width / 2, rect.y - rect.height / 2],\n [rect.x + rect.width / 2, rect.y + rect.height / 2],\n [rect.x - rect.width / 2, rect.y + rect.height / 2],\n ];\n const possibleLines: [start: PositionTuple, end: PositionTuple][] = [];\n for (let i = 0; i < 4; i++) {\n possibleLines.push([vertices[i], vertices[(i + 1) % 4]]);\n }\n const intersections: PositionTuple[] = [];\n for (const item of possibleLines) {\n const intersection = intersect(line[0], line[1], item[0], item[1]);\n if (intersection) {\n intersections.push(intersection);\n }\n }\n return intersections;\n}\n\n// https://paulbourke.net/geometry/pointlineplane/javascript.txt\nfunction intersect(\n [x1, y1]: PositionTuple,\n [x2, y2]: PositionTuple,\n [x3, y3]: PositionTuple,\n [x4, y4]: PositionTuple\n): null | PositionTuple {\n // Check if none of the lines are of length 0\n if ((x1 === x2 && y1 === y2) || (x3 === x4 && y3 === y4)) {\n return null;\n }\n\n const denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);\n\n // Lines are parallel\n if (denominator === 0) {\n return null;\n }\n\n const ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator;\n const ub = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denominator;\n\n // is the intersection along the segments\n if (ua < 0 || ua > 1 || ub < 0 || ub > 1) {\n return null;\n }\n\n // Return a object with the x and y coordinates of the intersection\n const x = x1 + ua * (x2 - x1);\n const y = y1 + ua * (y2 - y1);\n\n return [x, y];\n}\n","import type { Direction, NodePosition, NodeRect } from \"../interfaces\";\n\nconst MINIMAL_OFFSET = 20;\n\nexport function getPolyLinePoints(\n source: NodeRect,\n target: NodeRect,\n sourceDirection: Direction,\n targetDirection: Direction,\n sourcePosition: number,\n targetPosition: number\n): NodePosition[] {\n const p0 = getCoordinates(source, sourceDirection, sourcePosition);\n const p1 = getCoordinates(target, targetDirection, targetPosition);\n\n let controls: NodePosition[] = [];\n let reverseControls = false;\n\n const sourceIsVertical =\n sourceDirection === \"top\" || sourceDirection === \"bottom\";\n const targetIsVertical =\n targetDirection === \"top\" || targetDirection === \"bottom\";\n\n if (sourceIsVertical !== targetIsVertical) {\n // One is vertical and the other is horizontal\n let horizontal: NodeRect;\n let vertical: NodeRect;\n let horizontalSign: number;\n let verticalSign: number;\n let horizontalPosition: NodePosition;\n let verticalPosition: NodePosition;\n if (sourceIsVertical) {\n horizontal = target;\n vertical = source;\n horizontalSign = targetDirection === \"right\" ? 1 : -1;\n verticalSign = sourceDirection === \"bottom\" ? 1 : -1;\n horizontalPosition = p1;\n verticalPosition = p0;\n } else {\n horizontal = source;\n vertical = target;\n horizontalSign = sourceDirection === \"right\" ? 1 : -1;\n verticalSign = targetDirection === \"bottom\" ? 1 : -1;\n horizontalPosition = p0;\n verticalPosition = p1;\n reverseControls = true;\n }\n\n const defaultControlX =\n horizontalPosition.x + MINIMAL_OFFSET * horizontalSign;\n const defaultControlY = verticalPosition.y + MINIMAL_OFFSET * verticalSign;\n\n if ((horizontal.x - vertical.x) * horizontalSign >= 0) {\n if ((vertical.y - horizontal.y) * verticalSign >= 0) {\n // ┌──────────────┐\n // ┌──┴──┐ ┌─────┐ │\n // │ S │ │ T ├─┘\n // └─────┘ └─────┘\n controls = [\n { x: verticalPosition.x, y: defaultControlY },\n { x: defaultControlX, y: defaultControlY },\n { x: defaultControlX, y: horizontalPosition.y },\n ];\n } else {\n const controlY0 =\n vertical.y + (vertical.height / 2 + MINIMAL_OFFSET) * verticalSign;\n const controlY1 =\n horizontal.y -\n (horizontal.height / 2 + MINIMAL_OFFSET) * verticalSign;\n if ((controlY1 - controlY0) * verticalSign >= 0) {\n // ┌─────┐\n // │ T ├─┐\n // └─────┘ │\n // ┌────────┘\n // ┌──┴──┐\n // │ S │\n // └─────┘\n const middleY = (controlY0 + controlY1) / 2;\n controls = [\n { x: verticalPosition.x, y: middleY },\n { x: defaultControlX, y: middleY },\n { x: defaultControlX, y: horizontalPosition.y },\n ];\n } else {\n // ┌─────┐\n // ┌────┐ │ T ├─┐\n // ┌──┴──┐ │ └─────┘ │\n // │ S │ └─────────┘\n // └─────┘\n const middleX =\n (vertical.x +\n (vertical.width / 2) * horizontalSign +\n horizontal.x -\n (horizontal.width / 2) * horizontalSign) /\n 2;\n controls = [\n { x: verticalPosition.x, y: controlY0 },\n { x: middleX, y: controlY0 },\n { x: middleX, y: controlY1 },\n { x: defaultControlX, y: controlY1 },\n { x: defaultControlX, y: horizontalPosition.y },\n ];\n }\n }\n } else if ((horizontalPosition.y - defaultControlY) * verticalSign >= 0) {\n if ((verticalPosition.x - defaultControlX) * horizontalSign >= 0) {\n // ┌─────┐\n // ┌──┤ T │\n // │ └─────┘\n // ┌──┴──┐\n // │ S │\n // └─────┘\n controls = [{ x: verticalPosition.x, y: horizontalPosition.y }];\n } else {\n // ┌─────┐\n // │ T ├─┐\n // └─────┘ │\n // ┌─┘\n // ┌──┴──┐\n // │ S │\n // └─────┘\n const controlY0 =\n vertical.y + (vertical.height / 2 + MINIMAL_OFFSET) * verticalSign;\n const controlY1 =\n horizontal.y -\n (horizontal.height / 2 + MINIMAL_OFFSET) * verticalSign;\n const middleY = (controlY0 + controlY1) / 2;\n controls = [\n { x: verticalPosition.x, y: middleY },\n { x: defaultControlX, y: middleY },\n { x: defaultControlX, y: horizontalPosition.y },\n ];\n }\n } else {\n const sourceExtendX =\n vertical.x - (vertical.width / 2 + MINIMAL_OFFSET) * horizontalSign;\n if ((sourceExtendX - defaultControlX) * horizontalSign >= 0) {\n // ┌────┐\n // │ ┌──┴──┐\n // │ │ S │\n // ┌─────┐ │ └─────┘\n // │ T ├─┘\n // └─────┘\n const middleX = (sourceExtendX + defaultControlX) / 2;\n controls = [\n { x: verticalPosition.x, y: defaultControlY },\n { x: middleX, y: defaultControlY },\n { x: middleX, y: horizontalPosition.y },\n ];\n } else {\n // ┌────┐\n // │ ┌──┴──┐\n // │ │ S │\n // │ └─────┘\n // └───┐\n // ┌─────┐ │\n // │ T ├─┘\n // └─────┘\n const middleY =\n (vertical.y -\n (vertical.height / 2) * verticalSign +\n horizontal.y +\n (horizontal.height / 2) * verticalSign) /\n 2;\n controls = [\n { x: verticalPosition.x, y: defaultControlY },\n { x: sourceExtendX, y: defaultControlY },\n { x: sourceExtendX, y: middleY },\n { x: defaultControlX, y: middleY },\n { x: defaultControlX, y: horizontalPosition.y },\n ];\n }\n }\n } else if (sourceDirection === targetDirection) {\n // Same direction\n const sign =\n sourceDirection === \"bottom\" || sourceDirection === \"right\" ? 1 : -1;\n let start: NodeRect;\n let end: NodeRect;\n let startPosition: NodePosition;\n let endPosition: NodePosition;\n const axis = sourceIsVertical ? \"y\" : \"x\";\n const oppositeAxis = sourceIsVertical ? \"x\" : \"y\";\n if (target[axis] < source[axis]) {\n start = target;\n end = source;\n startPosition = p1;\n endPosition = p0;\n reverseControls = sign === 1;\n } else {\n start = source;\n end = target;\n startPosition = p0;\n endPosition = p1;\n reverseControls = sign !== 1;\n }\n const perpendicular =\n target[oppositeAxis] < source[oppositeAxis] ? source : target;\n let around: NodeRect;\n let nonAround: NodeRect;\n let aroundPosition: NodePosition;\n let nonAroundPosition: NodePosition;\n if (sign === 1) {\n around = end;\n nonAround = start;\n aroundPosition = endPosition;\n nonAroundPosition = startPosition;\n } else {\n around = start;\n nonAround = end;\n aroundPosition = startPosition;\n nonAroundPosition = endPosition;\n }\n const aroundSign = around === perpendicular ? 1 : -1;\n if (sourceIsVertical) {\n const defaultControlX =\n around.x - (around.width / 2 + MINIMAL_OFFSET) * aroundSign;\n const defaultControlY = aroundPosition.y + MINIMAL_OFFSET * sign;\n if ((defaultControlX - nonAroundPosition.x) * aroundSign >= 0) {\n // ┌─────────┐\n // │ ┌──┴──┐\n // │ │ T │\n // ┌──┴──┐ └─────┘\n // │ S │\n // └─────┘\n controls = [\n { x: nonAroundPosition.x, y: defaultControlY },\n { x: aroundPosition.x, y: defaultControlY },\n ];\n } else {\n // ┌────┐\n // │ ┌──┴──┐\n // │ │ T │\n // │ └─────┘\n // └─┐\n // ┌──┴──┐\n // │ S │\n // └─────┘\n const middleY =\n (nonAround.y +\n (nonAround.height / 2) * sign +\n around.y -\n (around.height / 2) * sign) /\n 2;\n controls = [\n { x: nonAroundPosition.x, y: middleY },\n { x: defaultControlX, y: middleY },\n { x: defaultControlX, y: defaultControlY },\n { x: aroundPosition.x, y: defaultControlY },\n ];\n }\n } else {\n const defaultControlX = aroundPosition.x + MINIMAL_OFFSET * sign;\n const defaultControlY =\n around.y - (around.height / 2 + MINIMAL_OFFSET) * aroundSign;\n if ((defaultControlY - nonAroundPosition.y) * aroundSign >= 0) {\n // ┌─────┐\n // ┌─────────┤ T │\n // │ ┌─────┐ └─────┘\n // └─┤ S │\n // └─────┘\n controls = [\n { x: defaultControlX, y: nonAroundPosition.y },\n { x: defaultControlX, y: aroundPosition.y },\n ];\n } else {\n // ┌─────────┐\n // │ ┌─────┐ │ ┌─────┐\n // └─┤ S │ └─┤ T │\n // └─────┘ └─────┘\n const middleX =\n (nonAround.x +\n (nonAround.width / 2) * sign +\n around.x -\n (around.width / 2) * sign) /\n 2;\n controls = [\n { x: middleX, y: nonAroundPosition.y },\n { x: middleX, y: defaultControlY },\n { x: defaultControlX, y: defaultControlY },\n { x: defaultControlX, y: aroundPosition.y },\n ];\n }\n }\n } else {\n // Opposite direction\n const targetSign =\n targetDirection === \"bottom\" || targetDirection === \"right\" ? 1 : -1;\n let axis: \"x\" | \"y\";\n let oppositeAxis: \"x\" | \"y\";\n let size: \"width\" | \"height\";\n let oppositeSize: \"width\" | \"height\";\n if (sourceIsVertical) {\n axis = \"y\";\n oppositeAxis = \"x\";\n size = \"height\";\n oppositeSize = \"width\";\n } else {\n axis = \"x\";\n oppositeAxis = \"y\";\n size = \"width\";\n oppositeSize = \"height\";\n }\n const targetEdge = target[axis] + (target[size] / 2) * targetSign;\n const sourceEdge = source[axis] - (source[size] / 2) * targetSign;\n const targetControl = targetEdge + MINIMAL_OFFSET * targetSign;\n const sourceControl = sourceEdge - MINIMAL_OFFSET * targetSign;\n const oppositeIsStraight = p0[oppositeAxis] === p1[oppositeAxis];\n if ((sourceControl - targetControl) * targetSign >= 0) {\n const middle = (sourceControl + targetControl) / 2;\n if (oppositeIsStraight) {\n // Straight line\n // ┌─────┐\n // │ T │\n // └──┬──┘\n // │\n // ┌──┴──┐\n // │ S │\n // └─────┘\n controls = [];\n } else {\n // ┌─────┐\n // │ T │\n // └──┬──┘\n // ┌───┘\n // ┌──┴──┐\n // │ S │\n // └─────┘\n controls = [\n { [oppositeAxis]: p0[oppositeAxis], [axis]: middle },\n { [oppositeAxis]: p1[oppositeAxis], [axis]: middle },\n ] as unknown[] as NodePosition[];\n }\n } else if (\n oppositeIsStraight &&\n (sourceEdge - targetEdge) * targetSign >= 0\n ) {\n // Straight line (very close)\n // ┌─────┐\n // │ T │\n // └──┬──┘\n // ┌──┴──┐\n // │ S │\n // └─────┘\n controls = [];\n } else {\n const targetOppositeSign =\n target[oppositeAxis] < source[oppositeAxis] ? -1 : 1;\n const sourceOppositeControl =\n source[oppositeAxis] +\n (source[oppositeSize] / 2 + MINIMAL_OFFSET) * targetOppositeSign;\n const targetOppositeControl =\n target[oppositeAxis] -\n (target[oppositeSize] / 2 + MINIMAL_OFFSET) * targetOppositeSign;\n if (\n (targetOppositeControl - sourceOppositeControl) * targetOppositeSign >=\n 0 ||\n Math.abs((sourceControl - targetControl) * targetSign) < MINIMAL_OFFSET\n ) {\n // ┌─────┐\n // ┌────┐ │ T │\n // ┌──┴──┐ │ └──┬──┘\n // │ S │ └────┘\n // └─────┘\n const oppositeMiddle =\n (sourceOppositeControl + targetOppositeControl) / 2;\n controls = [\n { [oppositeAxis]: p0[oppositeAxis], [axis]: sourceControl },\n { [oppositeAxis]: oppositeMiddle, [axis]: sourceControl },\n { [oppositeAxis]: oppositeMiddle, [axis]: targetControl },\n { [oppositeAxis]: p1[oppositeAxis], [axis]: targetControl },\n ] as unknown[] as NodePosition[];\n } else {\n // ┌────┐\n // ┌──┴──┐ │\n // │ S │ │\n // └─────┘ │\n // ┌─────────┘\n // │ ┌─────┐\n // │ │ T │\n // │ └──┬──┘\n // └────┘\n const middle =\n (source[axis] +\n (source[size] / 2) * targetSign +\n target[axis] -\n (target[size] / 2) * targetSign) /\n 2;\n controls = [\n { [oppositeAxis]: p0[oppositeAxis], [axis]: sourceControl },\n { [oppositeAxis]: sourceOppositeControl, [axis]: sourceControl },\n { [oppositeAxis]: sourceOppositeControl, [axis]: middle },\n { [oppositeAxis]: targetOppositeControl, [axis]: middle },\n { [oppositeAxis]: targetOppositeControl, [axis]: targetControl },\n { [oppositeAxis]: p1[oppositeAxis], [axis]: targetControl },\n ] as unknown[] as NodePosition[];\n }\n }\n }\n\n if (reverseControls) {\n controls.reverse();\n }\n\n return [p0, ...controls, p1] as NodePosition[];\n}\n\nfunction getCoordinates(\n node: NodeRect,\n direction: Direction,\n position: number\n): NodePosition {\n const { x, y, width, height } = node;\n switch (direction) {\n case \"top\":\n return {\n x: x - width / 2 + width * position,\n y: y - height / 2,\n };\n case \"bottom\":\n return {\n x: x - width / 2 + width * position,\n y: y + height / 2,\n };\n case \"left\":\n return {\n x: x - width / 2,\n y: y - height / 2 + height * position,\n };\n case \"right\":\n return {\n x: x + width / 2,\n y: y - height / 2 + height * position,\n };\n }\n}\n","import type { NodeRect } from \"../interfaces\";\n\nexport function doTwoNodesOverlap(\n a: NodeRect,\n b: NodeRect,\n paddingA: number,\n paddingB: number\n): boolean {\n const A = paddingA ? getNodesWithPadding(a, paddingA) : a;\n const B = paddingB ? getNodesWithPadding(b, paddingB) : b;\n const left = Math.min(A.x - A.width / 2, B.x - B.width / 2);\n const right = Math.max(A.x + A.width / 2, B.x + B.width / 2);\n const top = Math.min(A.y - A.height / 2, B.y - B.height / 2);\n const bottom = Math.max(A.y + A.height / 2, B.y + B.height / 2);\n return right - left < A.width + B.width && bottom - top < A.height + B.height;\n}\n\nfunction getNodesWithPadding(node: NodeRect, padding: number) {\n return {\n x: node.x - node.width / 2 - padding,\n y: node.y - node.height / 2 - padding,\n width: node.width + padding * 2,\n height: node.height + padding * 2,\n };\n}\n","import type { FullRectTuple, PartialRectTuple } from \"../interfaces\";\n\nexport function extractPartialRectTuple(\n value: PartialRectTuple\n): FullRectTuple {\n if (Array.isArray(value)) {\n const v0 = value[0];\n const v1 = value.length > 1 ? value[1]! : v0;\n const v2 = value.length > 2 ? value[2]! : v0;\n const v3 = value.length > 3 ? value[3]! : v1;\n return [v0, v1, v2, v3];\n }\n return new Array(4).fill(value) as FullRectTuple;\n}\n"],"names":["MarkerComponent","_ref","Component","id","type","strokeColor","EntityRelationZeroOrOneMarker","EntityRelationZeroOrManyMarker","CircleMarker","ArrowMarker","React","_ref2","viewBox","refX","refY","overflow","markerWidth","r","markerHeight","stroke","fill","cx","cy","_ref3","orient","strokeLinejoin","d","strokeWidth","_ref4","_ref5","curveLine","points","curveType","startOffset","endOffset","Array","isArray","curveFactory","curveLinear","curveBumpX","curveBumpY","curveMonotoneX","curveMonotoneY","curveNatural","curveBasis","startOffsets","getOffsets","endOffsets","length","line","x","index","y","curve","lineFunction","start","end","offset","x0","y0","x1","y1","ratio","Math","sqrt","pow","getDirectLinePoints","source","target","parallelGap","edgeView","hasExitPosition","exitPosition","hasEntryPosition","entryPosition","doTwoNodesOverlap","p0","p1","xDiff","yDiff","dx","dy","angle","atan2","cos","PI","sin","width","height","sourceIntersections","getIntersections","targetIntersections","rect","vertices","possibleLines","i","push","intersections","item","intersection","intersect","x2","y2","x3","y3","x4","y4","denominator","ua","ub","MINIMAL_OFFSET","getPolyLinePoints","sourceDirection","targetDirection","sourcePosition","targetPosition","getCoordinates","controls","reverseControls","sourceIsVertical","horizontal","vertical","horizontalSign","verticalSign","horizontalPosition","verticalPosition","defaultControlX","defaultControlY","controlY0","controlY1","middleY","middleX","sourceExtendX","sign","startPosition","endPosition","axis","oppositeAxis","around","nonAround","aroundPosition","nonAroundPosition","aroundSign","targetSign","size","oppositeSize","targetEdge","sourceEdge","targetControl","sourceControl","oppositeIsStraight","middle","targetOppositeSign","sourceOppositeControl","targetOppositeControl","abs","oppositeMiddle","reverse","node","direction","position","a","b","paddingA","paddingB","A","getNodesWithPadding","B","left","min","right","max","top","bottom","padding","extractPartialRectTuple","value","v0","v1"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[6055],{4932:(e,t,n)=>{n.d(t,{m:()=>N});var o=n(8769),r=n.n(o),i=n(3373),a=n.n(i),l=n(531),c=n(3033),s=n(8653),d=n(967);function u(e,t){return e.find((e=>(0,l.o6)(e)&&e.id===t))}var v=n(9978);function f(e){var t,n;let{edge:i,cells:f,lineConfMap:h,active:m}=e;const{setActiveEditableLine:g}=(0,v.s)(),p=(0,o.useRef)(null),y=(0,o.useMemo)((()=>u(f,i.source)),[f,i.source]),w=(0,o.useMemo)((()=>u(f,i.target)),[f,i.target]),x=(0,o.useMemo)((()=>h.get(i)),[i,h]),E=(0,o.useMemo)((()=>{var e;return(0,l.jw)(null===(e=i.view)||void 0===e?void 0:e.type)&&f.some((e=>{var t;return(0,l.WW)(e)&&e.source===i.target&&e.target===i.source&&(0,l.jw)(null===(t=e.view)||void 0===t?void 0:t.type)}))?x.parallelGap:0}),[f,i.source,i.target,i.view,x.parallelGap]),k=(0,o.useMemo)((()=>y&&w&&null!=y.view.x&&null!=w.view.x?(0,d.V)(y.view,w.view,i.view,E):null),[i.view,E,y,w]),b=(0,o.useMemo)((()=>{const e=x.type;return(0,s.S)(k,"curve"===e?x.curveType:"curveLinear",0,1)}),[x,k]);return(0,o.useEffect)((()=>{g((e=>m?k&&y&&w?{edge:i,source:y,target:w,linePoints:k,lineType:x.type,lineCurveType:x.curveType,parallelGap:E}:null:null!=e&&e.edge&&e.edge.source===i.source&&e.edge.target===i.target?null:e))}),[m,i,x.curveType,x.type,k,g,y,w,E]),b&&k?r().createElement(r().Fragment,null,r().createElement("path",{d:b,fill:"none",stroke:"transparent",strokeWidth:x.interactStrokeWidth}),r().createElement("path",{ref:p,className:a()("line",{dashed:x.dashed,dotted:x.dotted,[(x.dashed?"dashed":x.dotted?"dotted":"solid")+"-animation"]:x.animate.useAnimate}),style:{"--time":`${x.animate.duration??c.Be}s`,"--solid-length":null===(t=p.current)||void 0===t||null===(n=t.getTotalLength)||void 0===n?void 0:n.call(t)},d:b,fill:"none",stroke:x.strokeColor,strokeWidth:x.strokeWidth,markerStart:x.showStartArrow?x.$markerUrl:"",markerEnd:x.showEndArrow?x.$markerUrl:""}),r().createElement("path",{className:"line-active-bg",d:b,fill:"none"})):null}var h=n(5068),m=n(7619),g=n(1030),p=n(9126);function y(e){let{node:t,degraded:n,degradedNodeLabel:i,defaultNodeBricks:a,onResize:l}=e;const c=function(e){const[t,n]=(0,o.useState)(e);return(0,o.useEffect)((()=>{n((t=>(0,g.isEqual)(t,e)?t:e))}),[e]),t}({node:{id:t.id,data:t.data}}),s=t.useBrick,d=(0,o.useRef)(null),u=(0,o.useMemo)((()=>{var e;return n?null:s??(null==a||null===(e=a.find((e=>(0,m.checkIfByTransform)(e,c))))||void 0===e?void 0:e.useBrick)}),[n,s,a,c]),v=(0,o.useMemo)((()=>n?String(m.__secret_internals.legacyDoTransform(c,i??"<% DATA.node.id %>")):""),[n,i,c]),f=(0,o.useCallback)((e=>{const n=d.current;n&&(n.disconnect(),d.current=null),e?setTimeout((()=>{const n=new p.A((()=>{l(t.id,[e.offsetWidth,e.offsetHeight])}));n.observe(e),d.current=n})):l(t.id,null)}),[t.id,l]),y=(0,o.useCallback)((e=>{if(e){const n=e.getBBox();l(t.id,[n.width,n.height])}else l(t.id,null)}),[t.id,l]);return u?r().createElement("foreignObject",{width:9999,height:9999,className:"node"},u&&r().createElement(h.ReactUseBrick,{useBrick:u,data:c,refCallback:f})):n?r().createElement("g",{className:"degraded",ref:y},r().createElement("circle",{cx:8,cy:8,r:8}),r().createElement("text",{x:8,y:32},v)):null}var w=n(9386),x=n(4197);function E(e,t){let{action:n,cell:o,scale:r,layout:i,layoutOptions:a,activeTarget:s,cells:d,onCellsMoving:u,onCellsMoved:v,onCellResizing:f,onCellResized:h,onSwitchActiveTarget:m}=t;if(e.stopPropagation(),"resize"!==n&&(0,x.Q)(o,s)||null==m||m((0,w.P)(o)),(0,l.WW)(o))return;const g=[],p="multi"===(null==s?void 0:s.type)&&"move"===n?d.filter((e=>(0,x.Q)(e,s))):[o];p.forEach((e=>{g.push(e),"move"===n&&(0,l.t2)(e)&&g.push(...d.filter((t=>(0,l.N)(t)&&t.containerId===e.id&&!p.includes(t))))}));const y="force"===i||"dagre"===i,E=g.filter((e=>(0,l.N)(e)&&!y||(0,l.mH)(e)));if(0===E.length)return;const b=function(e){const t=e?!0===e?{grid:!0,object:!0}:e:null,n=null!=t&&t.grid?!0===t.grid?{}:t.grid:null,o=null!=t&&t.object?!0===t.object?{}:t.object:null;return{grid:n?{size:n.size??c.gx}:null,object:o?{distance:o.distance??c.ld}:null}}(null==a?void 0:a.snap),I=[e.clientX,e.clientY],C=E.map((e=>({cell:e,position:"move"===n?[e.view.x,e.view.y]:[e.view.width,e.view.height],center:"move"!==n||(0,l.WW)(e)?null:k(e.view)}))),L=C[0].position;let S=C.map((e=>{let{position:t}=e;return t})),z=[];if("move"===n&&b.object){const e=d.filter((e=>!(0,l.WW)(e)&&!g.includes(e)));z=e.map((e=>({cell:e,center:k(e.view)})))}let M=!1;const P=(e,t)=>{const i=function(e){return[(e.clientX-I[0])/r,(e.clientY-I[1])/r]}(e);let a,c,s,d,m;if(!b.grid&&!b.object||e.altKey)a=C.map((e=>{let{position:t}=e;return[t[0]+i[0],t[1]+i[1]]})),M||(M=i[0]**2+i[1]**2>=9);else{let e=1/0,t=1/0;const n=[...i];if(b.object){const o=b.object.distance;let r,a,l,u,v=0,f=0;for(const{cell:c,center:[s,h]}of z)for(const{cell:g,center:p}of C){const[y,w]=p,x=Math.abs(y+i[0]-s),E=Math.abs(w+i[1]-h),k=E<o&&E<t;x<o&&x<e&&(e=x,n[0]=s-y,d=g,l=c,r=[s,h],v=w),k&&(t=E,n[1]=h-w,m=g,u=c,a=[s,h],f=y)}if(l&&l===u){const e=l.view.height/2,t=l.view.width/2;c=[[r[0],r[1]-e],[r[0],r[1]+e]],s=[[a[0]-t,a[1]],[a[0]+t,a[1]]]}else r&&(c=[r,[r[0],v+n[1]]]),a&&(s=[a,[f+n[0],a[1]]])}if(b.grid){const o=b.grid.size,r=[Math.round((L[0]+i[0])/o)*o,Math.round((L[1]+i[1])/o)*o],a=[r[0]-L[0],r[1]-L[1]],l=Math.abs(a[0]-i[0]),u=Math.abs(a[1]-i[1]);l<e&&(e=l,n[0]=a[0],c=void 0,d=void 0),u<t&&(t=u,n[1]=a[1],s=void 0,m=void 0)}a=C.map((e=>{let{position:t}=e;return[Math.round(t[0]+n[0]),Math.round(t[1]+n[1])]})),(a[0][0]!==S[0][0]||a[0][1]!==S[0][1])&&(S=a,M=!0)}if(M)if("move"===n){var g;const e=C.map(((e,n)=>{let{cell:o}=e;return{type:o.type,id:o.id,x:a[n][0],y:a[n][1],width:o.view.width,height:o.view.height,decorator:(0,l.mH)(o)?o.decorator:void 0,guideLines:t?void 0:[...d===o?[c]:[],...m===o?[s]:[]]}}));null===(g=t?v:u)||void 0===g||g(e)}else{var p;null===(p=t?h:f)||void 0===p||p({type:o.type,id:o.id,width:a[0][0],height:a[0][1]})}},N=e=>{P(e)},R=e=>{P(e,!0),M=!1,document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",R)};document.addEventListener("mousemove",N),document.addEventListener("mouseup",R)}function k(e){return[e.x+e.width/2,e.y+e.height/2]}function b(e){let{cell:t,transform:n,readOnly:i,layoutOptions:a,activeTarget:l,cells:c,onCellResizing:s,onCellResized:d,onSwitchActiveTarget:u}=e;const v=r().useRef(null);return(0,o.useEffect)((()=>{const e=v.current;if(!e||i)return;const o=e=>{E(e,{action:"resize",cell:t,scale:n.k,layoutOptions:a,activeTarget:l,cells:c,onCellResizing:s,onCellResized:d,onSwitchActiveTarget:u})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[l,t,c,a,d,s,u,i,n.k]),r().createElement("g",{className:"decorator-area"},r().createElement("rect",{width:t.view.width,height:t.view.height,className:"area"}),!i&&r().createElement("g",{ref:v,className:"resize-handle",transform:`translate(${t.view.width-20} ${t.view.height-20})`},r().createElement("rect",{width:20,height:20}),r().createElement("path",{d:"M10 18L18 10 M15 18L18 15"})))}function I(e){let{cell:t,readOnly:n,onDecoratorTextEditing:i,onDecoratorTextChange:l}=e;const c=t.view.text??"",[s,d]=(0,o.useState)(c),[u,v]=(0,o.useState)(!1),f=(0,o.useRef)(!1),[h,m]=(0,o.useState)(!1),g=(0,o.useRef)(null),p=(0,o.useCallback)((e=>{n||(e.preventDefault(),e.stopPropagation(),v(!0))}),[n]);(0,o.useEffect)((()=>{const e=g.current;e&&e.textContent!==s&&(e.textContent=s)}),[s]),(0,o.useEffect)((()=>{var e;const n=null===(e=g.current)||void 0===e?void 0:e.parentElement;n&&(t.view.width=n.clientWidth,t.view.height=n.clientHeight)}),[s,t.id]),(0,o.useEffect)((()=>{u&&g.current&&(g.current.focus(),C(g.current)),null==i||i({id:t.id,editing:u})}),[t.id,u,i]),(0,o.useEffect)((()=>{f.current?null==i||i({id:t.id,editing:u}):f.current=!0}),[t.id,u,i]);const y=(0,o.useCallback)((e=>{n||d(e.target.textContent)}),[n]),w=(0,o.useCallback)((()=>{n||(v(!1),m(!0))}),[n]);return(0,o.useEffect)((()=>{h&&(null==l||l({id:t.id,view:{...t.view,text:s}}),m(!1))}),[t,s,l,h]),r().createElement("foreignObject",{className:"decorator-text"},r().createElement("div",{className:a()("text-container",{editing:u}),onDoubleClick:p},r().createElement("div",{className:"text",contentEditable:u,ref:g,onInput:y,onBlur:w})))}function C(e){const t=document.createRange();t.selectNodeContents(e);const n=window.getSelection();n.removeAllRanges(),n.addRange(t)}var L=n(9068);function S(e){let{cell:t,transform:n,readOnly:i,layout:c,view:s,activeTarget:d,cells:u,onCellResizing:v,onCellResized:f,onSwitchActiveTarget:h,onDecoratorTextEditing:m,onDecoratorTextChange:p}=e;const y=(0,g.get)(t.view,"text",""),w=(0,g.get)(t.view,"direction","top"),x=(0,o.useRef)(null),k=r().useRef(null),[b,I]=(0,o.useState)(!1),[S,z]=(0,o.useState)(y),[M,P]=(0,o.useState)(!1),[N,R]=(0,o.useState)(),[A,T]=(0,o.useState)({x:0,y:0,width:t.view.width,height:t.view.height}),H=(0,o.useCallback)((e=>{i||(e.preventDefault(),e.stopPropagation(),I(!0))}),[i]),Z=(0,o.useCallback)((e=>{i||z(e.target.textContent)}),[i]),D=(0,o.useCallback)((()=>{i||(I(!1),P(!0),R((0,L.uuidV4)()))}),[i]);return(0,o.useEffect)((()=>{z(y)}),[y]),(0,o.useEffect)((()=>{const e=x.current;e&&e.textContent!==S&&(e.textContent=S)}),[S]),(0,o.useEffect)((()=>{var e;const t=null===(e=x.current)||void 0===e?void 0:e.parentElement;if(t){const{clientWidth:e,clientHeight:n}=t;if(["left","right"].includes(w)){const t={width:e,height:s.height,x:"left"===w?-e:s.width,y:0};T(t)}else{const e={width:s.width,height:n,x:0,y:"top"===w?-n:s.height};T(e)}}}),[s,S,w,N]),(0,o.useEffect)((()=>{b&&x.current&&(x.current.focus(),C(x.current)),null==m||m({id:t.id,editing:b})}),[t.id,b,m]),(0,o.useEffect)((()=>{M&&(null==p||p({id:t.id,view:{...s,text:S}}),P(!1))}),[t,s,S,p,M]),(0,o.useEffect)((()=>{const e=k.current;if(!e||i)return;const o=e=>{E(e,{action:"resize",cell:t,scale:n.k,activeTarget:d,cells:u,onCellResizing:v,onCellResized:f,onSwitchActiveTarget:h})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[d,t,u,f,v,h,i,n.k]),r().createElement("g",{className:"decorator-container"},r().createElement("foreignObject",A,r().createElement("div",{className:a()("text-container",{editing:b,[["left","right"].includes(w)?"vertical":"horizontal"]:!0}),onDoubleClick:H},r().createElement("div",{className:"text",contentEditable:b,ref:x,onInput:Z,onBlur:D}))),r().createElement("rect",{width:s.width,height:s.height,className:"container"}),!i&&!(0,l.OD)(c)&&r().createElement("g",{ref:k,className:"resize-handle",transform:`translate(${s.width-20} ${s.height-20})`},r().createElement("rect",{width:20,height:20}),r().createElement("path",{d:"M10 18L18 10 M15 18L18 15"})))}function z(e){let t,{cell:n,view:o,transform:i,readOnly:a,layout:l,layoutOptions:c,activeTarget:s,cells:d,onCellResizing:u,onCellResized:v,onSwitchActiveTarget:f,onDecoratorTextEditing:h,onDecoratorTextChange:m}=e;switch(n.decorator){case"container":t=S;break;case"area":t=b;break;case"text":t=I;break;default:return console.error(`Unknown decorator: ${n.decorator}`),null}return r().createElement(t,{cell:n,view:o,transform:i,readOnly:a,layout:l,layoutOptions:c,activeTarget:s,cells:d,onCellResizing:u,onCellResized:v,onSwitchActiveTarget:f,onDecoratorTextEditing:h,onDecoratorTextChange:m})}var M=n(8185);function P(e){let t=1/0,n=1/0,o=-1/0,r=-1/0;return e.forEach((e=>{const{x:i,y:a,width:l,height:c}=e.view;i<t&&(t=i),a<n&&(n=a),i+l>o&&(o=i+l),a+c>r&&(r=a+c)})),[t,o,n,r].some((e=>isFinite(e)))?{x:t-20,y:n-20,width:o-t+40,height:r-n+40}:{}}function N(e){let{layout:t,layoutOptions:n,cell:i,cells:c,degraded:s,degradedNodeLabel:d,defaultNodeBricks:u,lineConfMap:h,activeTarget:m,dragNodeToContainerActive:p,readOnly:k,transform:b,unrelatedCells:I,allowEdgeToArea:C,onCellsMoving:L,onCellsMoved:S,onCellResizing:N,onCellResized:R,onSwitchActiveTarget:A,onCellContextMenu:T,onCellClick:H,onDecoratorTextEditing:Z,onDecoratorTextChange:D,onNodeBrickResize:W,onCellMouseEnter:j,onCellMouseLeave:B}=e;const{lineEditorState:V,smartConnectLineState:O,setSmartConnectLineState:G,onConnect:U,setLineEditorState:X,onChangeEdgeView:Y}=(0,v.s)(),$=(0,o.useRef)(null),Q=(0,o.useMemo)((()=>I.some((e=>(0,M.c)(e,i)))),[i,I]),F=(0,o.useMemo)((()=>{if((0,l.t2)(i)&&(0,l.OD)(t)){const e=c.filter((e=>(0,l.N)(e)&&e.containerId===i.id)),t={...i.view,...P(e)};return i.view=t,t}return(0,l.WW)(i)?void 0:(0,g.get)(i,"view",{x:0,y:0,width:0,height:0})}),[t,i,c]);(0,o.useEffect)((()=>{const e=$.current;if(!e)return;const o=e=>{k||(0,l.t2)(i)&&(0,l.OD)(t)?e.stopPropagation():E(e,{layout:t,layoutOptions:n,action:"move",cell:i,scale:b.k,activeTarget:m,cells:c,onCellsMoving:L,onCellsMoved:S,onSwitchActiveTarget:A})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[t,n,i,m,c,S,L,A,k,b.k]),(0,o.useEffect)((()=>{const e=$.current;if(!e||!(0,l.bo)(i,C)||!(O||V&&"control"!==V.type))return;const t=e=>{if(e.preventDefault(),e.stopPropagation(),O)O.source!==i&&(null==U||U(O.source,i,O.exitPosition,void 0)),G(null);else if(V){const{type:e,source:t,target:n,edge:{view:o}}=V,r="entry"===e;(r?n:t)===i&&(r?null==Y||Y(t,n,{...o,entryPosition:null}):null==Y||Y(t,n,{...o,exitPosition:null})),X(null)}};return e.addEventListener("mouseup",t),()=>{e.removeEventListener("mouseup",t)}}),[C,i,V,Y,U,X,G,O]);const J=(0,o.useCallback)((e=>{k&&"decorator"===i.type||(e.preventDefault(),A((0,w.P)(i)),T({cell:i,clientX:e.clientX,clientY:e.clientY}))}),[i,T,A,k]),K=(0,o.useCallback)((e=>{H&&"decorator"!==i.type&&H({cell:i,clientX:e.clientX,clientY:e.clientY})}),[i,H]),_=(0,o.useCallback)((()=>{null==j||j(i)}),[i,j]),q=(0,o.useCallback)((()=>{null==B||B(i)}),[i,B]),ee=(0,x.Q)(i,m);return r().createElement("g",{className:a()("cell",{active:ee,faded:Q,"read-only":k,"container-active":p}),ref:$,transform:"edge"===i.type||null==i.view.x?void 0:`translate(${F.x} ${F.y})`,onContextMenu:J,onClick:K,onMouseEnter:_,onMouseLeave:q},(0,l.N)(i)?r().createElement(y,{node:i,degraded:s,degradedNodeLabel:d,defaultNodeBricks:u,onResize:W}):(0,l.WW)(i)?r().createElement(f,{edge:i,cells:c,lineConfMap:h,active:ee}):(0,l.mH)(i)?r().createElement(z,{cell:i,view:F,transform:b,readOnly:k,layout:t,layoutOptions:n,activeTarget:m,cells:c,onCellResizing:N,onCellResized:R,onSwitchActiveTarget:A,onDecoratorTextEditing:Z,onDecoratorTextChange:D}):null)}},3639:(e,t,n)=>{n.d(t,{w:()=>l});var o=n(8769),r=n.n(o),i=n(3373),a=n.n(i);function l(e){let{connectLineState:t,transform:n,markerEnd:i,onConnect:l}=e;const[c,s]=(0,o.useState)(null);return(0,o.useEffect)((()=>{t&&s(t.from)}),[t]),(0,o.useEffect)((()=>{if(t){const e=e=>[(e.clientX-n.x-t.offset[0])/n.k,(e.clientY-n.y-t.offset[1])/n.k],o=t=>{s(e(t))},r=e=>{e.stopPropagation()},i=n=>{n.stopPropagation(),a(),l(t,e(n))},a=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mousedown",r,{capture:!0}),document.removeEventListener("click",i,{capture:!0}),s(null)};return document.addEventListener("mousemove",o),document.addEventListener("mousedown",r,{capture:!0}),document.addEventListener("click",i,{capture:!0}),a}}),[t,l,n]),r().createElement("path",{className:a()("connect-line",{connecting:!!t&&c&&(c[0]-t.from[0])**2+(c[1]-t.from[1])**2>25}),d:t&&c?`M${t.from.join(" ")}L${c.join(" ")}`:"",fill:"none",stroke:"gray",strokeWidth:1,markerEnd:`url(#${i})`})}},1825:(e,t,n)=>{n.d(t,{W:()=>v});var o=n(8769),r=n.n(o),i=n(3373),a=n.n(i),l=n(8653),c=n(9978),s=n(1030),d=n(967);function u(e,t){const{control:n,linePoints:o}=e,r=[],[i,a]=t,l=o[0],c=o[o.length-1];0===n.index&&r.push("ns"===n.direction?{x:l.x,y:a}:{x:i,y:l.y});for(let e=1;e<o.length-1;e++){const t=o[e];r.push(e===n.index||e===n.index+1?"ns"===n.direction?{x:t.x,y:a}:{x:i,y:t.y}:t)}return n.index===o.length-2&&r.push("ns"===n.direction?{x:c.x,y:a}:{x:i,y:c.y}),(0,d.P)(l,r,c)}function v(e){let{transform:t,options:n}=e;const[i,v]=(0,o.useState)(null),{activeEditableLine:f,hoverState:h,lineEditorState:m,setLineEditorState:g,onChangeEdgeView:p}=(0,c.s)(),y=(0,o.useRef)(!1);(0,o.useEffect)((()=>{m||setTimeout((()=>{y.current=!1}),0)}),[m]),(0,o.useEffect)((()=>{if(!m)return;y.current=!1;const{type:e,offset:n,from:o}=m,r=r=>{const i={x:(r.clientX-t.x-n[0])/t.k,y:(r.clientY-t.y-n[1])/t.k};let a=1/0;if("control"===e&&!r.altKey){const{linePoints:e,control:t}=m,n="ns"===t.direction?"y":"x",o=t[n],r=e.filter(((n,o)=>0===o||o===e.length-1||o!==t.index&&o!==t.index+1)),l=5;for(const e of r){const t=Math.abs(e[n]-i[n]);t<=l&&t<a&&(i[n]=e[n],a=t,y.current||o===i[n]||(y.current=!0))}}if(a===1/0&&!y.current){const e=(r.clientX-o[0])/t.k,n=(r.clientY-o[1])/t.k;y.current=e**2+n**2>=9}return[i.x,i.y]},i=e=>{const t=r(e);y.current&&v(t)};function a(e){if(e.preventDefault(),l(),"control"===(null==m?void 0:m.type)){const t=r(e);if(y.current){const{source:e,target:n,edge:{view:o}}=m;null==p||p(e,n,{...o,vertices:u(m,t)})}}}function l(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a),v(null),g(null)}return document.addEventListener("mousemove",i),document.addEventListener("mouseup",a),l}),[m,t,g,p]),(0,o.useEffect)((()=>{if(!f)return;const e=e=>{y.current&&(e.stopPropagation(),e.preventDefault())};return document.body.addEventListener("click",e),()=>{document.body.removeEventListener("click",e)}}),[f]);const w=(0,o.useMemo)((()=>{var e;const t=function(e,t,n){if(!e||!(t||"control"!==e.type&&void 0!==(null==n?void 0:n.activePointIndex)))return null;const{type:o,source:r,target:i,edge:{view:a}}=e,{exitPosition:l,entryPosition:c,vertices:v}=a??{},f=(0,s.pick)(a,["type","curveType"]);if("control"===o){const n=u(e,t);return(0,d.V)(r.view,i.view,{...f,exitPosition:l,entryPosition:c,vertices:n})}if(void 0!==(null==n?void 0:n.activePointIndex)){const e=n.relativePoints[n.activePointIndex];return(0,d.V)(r.view,i.view,{...f,..."entry"===o?{exitPosition:l,entryPosition:e}:{exitPosition:e,entryPosition:c},vertices:v})}const[h,m]=t;return"entry"===o?(0,d.V)(r.view,{x:h,y:m,width:0,height:0},{...f,exitPosition:l,vertices:v}):(0,d.V)({x:h,y:m,width:0,height:0},i.view,{...f,entryPosition:c,vertices:v})}(m,i,h);return(0,l.S)(t,"curve"===(null==m||null===(e=m.edge.view)||void 0===e?void 0:e.type)?m.edge.view.curveType:"curveLinear",0,1)}),[i,h,m]);return r().createElement("path",{className:a()("editing-line",{editing:!(!m||!i)}),d:w,fill:"none",stroke:n.editingStrokeColor,markerStart:n.showStartArrow?n.$editingMarkerUrl:"",markerEnd:n.showEndArrow?n.$editingMarkerUrl:""})}},9978:(e,t,n)=>{n.d(t,{H:()=>i,s:()=>a});var o=n(8769),r=n.n(o);const i=r().createContext({rootRef:{current:null},smartConnectLineState:null,unsetHoverStateTimeoutRef:{current:null},hoverState:null,activeEditableLine:null,lineEditorState:null,setLineEditorState:()=>{},setActiveEditableLine:()=>{},setHoverState:()=>{},setSmartConnectLineState:()=>{}});function a(){return r().useContext(i)}},2722:(e,t,n)=>{n.d(t,{T:()=>v});var o=n(8769),r=n.n(o),i=n(9978),a=n(4197),l=n(3033);const c="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSI1cHgiIGhlaWdodD0iNXB4IiB2ZXJzaW9uPSIxLjEiPjxwYXRoIGQ9Im0gMCAwIEwgNSA1IE0gMCA1IEwgNSAwIiBzdHJva2Utd2lkdGg9IjIiIHN0eWxlPSJzdHJva2Utb3BhY2l0eTowLjQiIHN0cm9rZT0iI2ZmZmZmZiIvPjxwYXRoIGQ9Im0gMCAwIEwgNSA1IE0gMCA1IEwgNSAwIiBzdHJva2U9IiMyOWI2ZjIiLz48L3N2Zz4=",s=5,d=8,u=s/2;function v(e){let{activeTarget:t,scale:n,disabled:c}=e;const{unsetHoverStateTimeoutRef:s,hoverState:u,setHoverState:v,smartConnectLineState:h,lineEditorState:m}=(0,i.s)(),g=(0,o.useCallback)((()=>{null!==s.current&&(clearTimeout(s.current),s.current=null)}),[s]),p=(0,o.useCallback)((()=>{g(),v((e=>void 0===(null==e?void 0:e.activePointIndex)?e:{...u,activePointIndex:void 0}))}),[u,v,g]),y=(0,o.useCallback)((()=>{s.current=setTimeout((()=>{v(null)}))}),[v,s]),w=!c&&u&&(!!h||(m?"entry"===m.type?u.cell===m.target:"exit"===m.type&&u.cell===m.source:!(0,a.Q)(u.cell,t)&&!function(e){return e&&("edge"===e.type||"multi"===e.type&&e.targets.some((e=>"edge"===e.type)))}(t))),x=l.XK,E=x/2;return r().createElement("g",{onMouseEnter:p,onMouseLeave:y},w&&r().createElement(r().Fragment,null,r().createElement("rect",{x:u.cell.view.x-E,y:u.cell.view.y-E,width:u.cell.view.width+x,height:u.cell.view.height+x,fill:"none",stroke:"transparent",strokeWidth:2*d/n,pointerEvents:"stroke"}),void 0!==u.activePointIndex&&r().createElement("circle",{cx:u.points[u.activePointIndex].x,cy:u.points[u.activePointIndex].y,r:d/n,fill:"lightgreen",fillOpacity:.5,pointerEvents:"none"}),u.points.map(((e,t)=>r().createElement(f,{key:t,index:t,point:e,scale:n,unsetActivePointIndex:p,unsetTimeout:g})))))}function f(e){let{index:t,point:n,scale:a,unsetTimeout:l,unsetActivePointIndex:v}=e;const{rootRef:f,smartConnectLineState:h,hoverState:m,setHoverState:g,setSmartConnectLineState:p,onConnect:y,lineEditorState:w,setLineEditorState:x,onChangeEdgeView:E}=(0,i.s)(),k=(0,o.useRef)(null);return(0,o.useEffect)((()=>{const e=k.current,n=o=>{"mousemove"===o.type&&(null==e||e.removeEventListener(o.type,n)),l(),g((e=>e&&e.activePointIndex!==t?{...m,activePointIndex:t}:e))};return null==e||e.addEventListener("mouseenter",n),null==e||e.addEventListener("mousemove",n),()=>{null==e||e.removeEventListener("mouseenter",n),null==e||e.removeEventListener("mousemove",n)}}),[m,t,g,l]),(0,o.useEffect)((()=>{if(w)return;const e=e=>{e.preventDefault(),e.stopPropagation();const n=f.current.getBoundingClientRect(),o=m.points[t];p({source:m.cell,from:[o.x,o.y],offset:[n.left,n.top],exitPosition:m.relativePoints[t]})},n=k.current;return null==n||n.addEventListener("mousedown",e),()=>{null==n||n.removeEventListener("mousedown",e)}}),[m,t,w,f,p]),(0,o.useEffect)((()=>{const e=e=>{if(e.preventDefault(),e.stopPropagation(),h)h.source!==(null==m?void 0:m.cell)&&(null==y||y(h.source,m.cell,h.exitPosition,m.relativePoints[m.activePointIndex])),p(null);else if(w){const e=m.relativePoints[m.activePointIndex],{type:t,source:n,target:o,edge:{view:r}}=w;"entry"===t?null==E||E(n,o,{...r,entryPosition:e}):null==E||E(n,o,{...r,exitPosition:e}),x(null)}},t=k.current;return null==t||t.addEventListener("mouseup",e),()=>{null==t||t.removeEventListener("mouseup",e)}}),[h,m,y,p,w,E,x]),r().createElement("g",{ref:k,onMouseLeave:v},r().createElement("circle",{cx:n.x,cy:n.y,r:d,fill:"transparent"}),r().createElement("image",{x:n.x-u/a,y:n.y-u/a,width:s/a,height:s/a,xlinkHref:c,preserveAspectRatio:"none"}))}},2202:(e,t,n)=>{n.d(t,{F:()=>v});var o=n(9575),r=n(8769),i=n.n(r),a=n(9978),l=n(531);const c="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMnB4IiBoZWlnaHQ9IjIycHgiIHZlcnNpb249IjEuMSI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iNyIgc3Ryb2tlPSIjZmZmIiBmaWxsPSIjMjliNmYyIi8+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iMyIgc3Ryb2tlPSIjZmZmIiBmaWxsPSJ0cmFuc3BhcmVudCIvPjwvc3ZnPg==",s="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMnB4IiBoZWlnaHQ9IjIycHgiIHZlcnNpb249IjEuMSI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iNyIgc3Ryb2tlPSIjZmZmIiBmaWxsPSIjMDFiZDIyIi8+PHBhdGggZD0ibSA4IDggTCAxNCAxNE0gOCAxNCBMIDE0IDgiIHN0cm9rZT0iI2ZmZiIvPjwvc3ZnPg==",d="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiIHZlcnNpb249IjEuMSI+PGNpcmNsZSBjeD0iOSIgY3k9IjkiIHI9IjUiIHN0cm9rZT0iI2ZmZiIgZmlsbD0iIzI5YjZmMiIvPjwvc3ZnPg==",u=22;function v(e){let{scale:t}=e;const{rootRef:n,activeEditableLine:v,setLineEditorState:f}=(0,a.s)(),h=(0,r.useRef)(null),m=(0,r.useRef)(null),g=(0,r.useRef)([]);(0,r.useEffect)((()=>{const e=h.current,t=m.current;if(!e||!t||!v)return;const o=e=>t=>{t.stopPropagation(),t.preventDefault();const o=n.current.getBoundingClientRect();f({...v,offset:[o.left,o.top],from:[t.clientX,t.clientY],type:e})},r=o("exit"),i=o("entry");return e.addEventListener("mousedown",r),t.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",r),t.removeEventListener("mousedown",i)}}),[v,n,f]);const p=(0,r.useMemo)((()=>{var e;return v&&!(0,l.jw)(null===(e=v.edge.view)||void 0===e?void 0:e.type)?function(e){const t=[];let n=e[0],o=1;for(;o<e.length;){const r=e[o],i=n.y===r.y,a=n.x===r.x;if(!i||!a){const e=i?"ns":"ew";t.push({direction:e,index:o-1,x:(n.x+r.x)/2,y:(n.y+r.y)/2})}n=r,o++}return t}(v.linePoints):[]}),[v]);(0,r.useEffect)((()=>{if(!v)return;const e=g.current,t=p.map((e=>(e=>t=>{t.stopPropagation(),t.preventDefault();const o=n.current.getBoundingClientRect();f({...v,offset:[o.left,o.top],from:[t.clientX,t.clientY],type:"control",control:e})})(e)));return e.forEach(((e,n)=>{null==e||e.addEventListener("mousedown",t[n])})),()=>{e.forEach(((e,n)=>{null==e||e.removeEventListener("mousedown",t[n])}))}}),[v,p,n,f]);const y=(0,r.useRef)(null);if((0,r.useEffect)((()=>{const e=y.current,t=e=>{e.stopPropagation(),e.preventDefault()};return null==e||e.addEventListener("click",t),()=>{null==e||e.removeEventListener("click",t)}}),[]),!v)return null;const{linePoints:w,edge:{view:x}}=v,{exitPosition:E,entryPosition:k}=x??{},b={width:u/t,height:u/t,preserveAspectRatio:"none",cursor:"pointer",pointerEvents:"fill"},I=w[0],C=w[w.length-1],L=u/t/2;return i().createElement("g",{ref:y},i().createElement("image",(0,o.A)({ref:h},b,{x:I.x-L,y:I.y-L,xlinkHref:E?s:c})),p.map(((e,t)=>i().createElement("image",(0,o.A)({key:t,ref:e=>{g.current[t]=e}},b,{x:e.x-L,y:e.y-L,xlinkHref:d,cursor:"ns"===e.direction?"row-resize":"col-resize"})))),i().createElement("image",(0,o.A)({ref:m},b,{x:C.x-L,y:C.y-L,xlinkHref:k?s:c})))}},1103:(e,t,n)=>{n.d(t,{X:()=>d});var o=n(8769),r=n.n(o),i=n(3373),a=n.n(i),l=n(8653),c=n(9978),s=n(967);function d(e){let{transform:t,lineSettings:n,options:i}=e;const[d,u]=(0,o.useState)(null),{hoverState:v,smartConnectLineState:f,setSmartConnectLineState:h}=(0,c.s)();(0,o.useEffect)((()=>{if(f)return document.addEventListener("mousemove",e),document.addEventListener("mouseup",n),o;function e(e){u([(e.clientX-t.x-f.offset[0])/t.k,(e.clientY-t.y-f.offset[1])/t.k])}function n(e){e.preventDefault(),o()}function o(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n),u(null),h(null)}}),[h,f,t]);const m=(0,o.useMemo)((()=>{const e=function(e,t,n,o){if(!e||!t&&void 0===(null==n?void 0:n.activePointIndex))return null;const r=e.source.view;if(void 0!==(null==n?void 0:n.activePointIndex))return(0,s.V)(r,n.cell.view,{...o,exitPosition:e.exitPosition,entryPosition:n.relativePoints[n.activePointIndex]});const[i,a]=t;return(0,s.V)(r,{x:i,y:a,width:0,height:0},{...o,exitPosition:e.exitPosition})}(f,d,v,n);return(0,l.S)(e,"curve"===i.type?i.curveType:"curveLinear",0,1)}),[d,v,f,i,n]);return r().createElement("path",{className:a()("connect-line",{connecting:!(!f||!d)}),d:m,fill:"none",stroke:i.strokeColor,strokeWidth:i.strokeWidth,markerStart:i.showStartArrow?i.$markerUrl:"",markerEnd:i.showEndArrow?i.$markerUrl:""})}},3033:(e,t,n)=>{n.d(t,{Be:()=>g,CV:()=>o,HP:()=>i,Ie:()=>f,N8:()=>l,Ub:()=>m,VO:()=>v,XK:()=>E,XV:()=>h,Yt:()=>d,gx:()=>y,ld:()=>w,mF:()=>u,p6:()=>x,pC:()=>p,sS:()=>s,sz:()=>a,w1:()=>c,xc:()=>r});const o=Symbol.for("size-initialized"),r=Symbol.for("layout-initialized"),i=20,a=36,l=180,c=120,s=.5,d=2,u="gray",v=1,f=15,h=!1,m=!0,g=1,p=500,y=10,w=5,x=5,E=0},531:(e,t,n)=>{function o(e){return"node"===e.type}function r(e){return"decorator"===e.type}function i(e){return"node"===e.type}function a(e){return"edge"===e.type}function l(e){return"node"===e.type||"edge"===e.type}function c(e){return"node"===e.type||"decorator"===e.type&&"area"===e.decorator}function s(e,t){return"node"===e.type||!!t&&"decorator"===e.type&&"area"===e.decorator}function d(e){return"decorator"===e.type&&"text"===e.decorator}function u(e){return"decorator"===e.type&&"container"===e.decorator}function v(e){return!["manual",void 0].includes(e)}function f(e){return!("polyline"===e||"curve"===e)}n.d(t,{Hs:()=>d,N:()=>o,OD:()=>v,WW:()=>a,bo:()=>s,jw:()=>f,mH:()=>r,nv:()=>l,o6:()=>c,t2:()=>u,vC:()=>i})},9386:(e,t,n)=>{n.d(t,{P:()=>r});var o=n(1030);function r(e){return"edge"===e.type?(0,o.pick)(e,["type","source","target","data"]):(0,o.pick)(e,["type","id","data"])}},227:(e,t,n)=>{n.d(t,{Y:()=>r});var o=n(4197);function r(e,t,n,r){const i=[];if(t){const n=new Set;for(const o of e)"edge"===o.type&&o.source===t.source.id&&n.add(o.target);for(const t of e)switch(t.type){case"node":n.has(t.id)&&i.push(t);break;case"decorator":r&&"text"!=t.decorator&&!n.has(t.id)||i.push(t);break;default:i.push(t)}}else switch(null==n?void 0:n.type){case"multi":{const t=new Map,r=new Set,a=new Set;for(const e of n.targets)"node"===e.type&&(r.add(e.id),a.add(e.id));for(const l of e)"node"===l.type?t.set(l.id,l):"edge"===l.type?r.has(l.source)?a.add(l.target):r.has(l.target)?a.add(l.source):(0,o.Q)(l,n)||i.push(l):(0,o.Q)(l,n)||i.push(l);for(const[e,n]of t)a.has(e)||i.push(n);break}case"node":{const t=new Map,o=new Set([n.id]);for(const r of e)"node"===r.type?t.set(r.id,r):"edge"===r.type?r.source===n.id?o.add(r.target):r.target===n.id?o.add(r.source):i.push(r):i.push(r);for(const[e,n]of t)o.has(e)||i.push(n);break}case"edge":for(const t of e)("edge"===t.type?(0,o.Q)(t,n):"node"===t.type&&(t.id===n.source||t.id===n.target))||i.push(t)}return i}},5114:(e,t,n)=>{n.d(t,{a:()=>r});var o=n(4197);function r(e,t){let{cells:n,activeTarget:r}=t;const i=n.filter((e=>(0,o.Q)(e,r)));if(0!==i.length)switch(e.key||e.keyCode||e.which){case"Backspace":case 8:case"Delete":case 46:return e.preventDefault(),e.stopPropagation(),{action:"delete-cells",cells:i}}}},2219:(e,t,n)=>{function o(e,t){let{transform:n,offset:o,onLassoing:r,onLassoed:i}=t;if(e.ctrlKey||e.button)return;e.stopPropagation();const a=[e.clientX,e.clientY],l=(e.clientX-o[0]-n.x)/n.k,c=(e.clientY-o[1]-n.y)/n.k;let s=!1;const d=(e,t)=>{const o=function(e){return[(e.clientX-a[0])/n.k,(e.clientY-a[1])/n.k]}(e);if(s||(s=o[0]**2+o[1]**2>=9),s){let[e,n]=o,a=l,s=c;e<0&&(a=l+e,e=-e),n<0&&(s=c+n,n=-n),(t?i:r)({x:a,y:s,width:e,height:n})}},u=e=>{d(e)},v=e=>{d(e,!0),s=!1,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",u),document.addEventListener("mouseup",v)}n.d(t,{F:()=>o})},1991:(e,t,n)=>{n.d(t,{_:()=>r});var o=n(531);function r(e,t,n){const r=t.filter((e=>(0,o.N)(e))),i=e.filter((e=>(0,o.t2)(e))).map((e=>e.id)),a=e.filter((e=>{const t=r.find((t=>t.id===e.id)),n=(null==t?void 0:t.containerId)&&i.includes(t.containerId);return(0,o.N)(e)&&!n}));a.forEach((e=>{const n=e.x,r=e.x+e.width,i=e.y,a=e.y+e.height,l=t.filter((e=>(0,o.t2)(e)));for(const t of l){const o=t.view.x,l=t.view.x+t.view.width,c=t.view.y,s=t.view.y+t.view.height;if(n>=o&&r<=l&&i>=c&&a<=s){e.containerCell=t;break}}}));let l=[];return l=a.filter((e=>{var t;const n=r.find((t=>t.id===e.id));return(null==n?void 0:n.containerId)!==(null===(t=e.containerCell)||void 0===t?void 0:t.id)})),l.length>0&&(null==n||n(l)),l}},3783:(e,t,n)=>{n.d(t,{C:()=>r});var o=n(531);function r(e,t){let{defaultNodeSize:n}=t;return(e??[]).map((e=>{var t,r;return!(0,o.vC)(e)||void 0!==(null===(t=e.view)||void 0===t?void 0:t.width)&&void 0!==(null===(r=e.view)||void 0===r?void 0:r.height)?e:{...e,view:{width:n[0],height:n[1],...e.view}}}))}},8185:(e,t,n)=>{function o(e,t){return e?!!t&&e.type===t.type&&("multi"===e.type?e.targets.length===t.targets.length&&e.targets.every((e=>t.targets.some((t=>o(e,t))))):"node"===e.type||"decorator"===e.type?e.id===t.id:e.source===t.source&&e.target===t.target):!t}n.d(t,{c:()=>o})},4197:(e,t,n)=>{n.d(t,{Q:()=>r});var o=n(8185);function r(e,t){return!!t&&("multi"===t.type?t.targets:[t]).some((t=>(0,o.c)(t,e)))}},908:(e,t,n)=>{n.d(t,{r:()=>r});var o=n(531);function r(e,t){let{canvasWidth:n,canvasHeight:r,scaleRange:i}=t,a=1/0,l=1/0,c=-1/0,s=-1/0,d=!0;for(const t of e)if(!(0,o.WW)(t)){d=!1;const{view:e}=t,n=e.x+e.width,o=e.y+e.height;e.x<a&&(a=e.x),n>c&&(c=n),e.y<l&&(l=e.y),o>s&&(s=o)}const u=c-a,v=s-l,f=i&&!d&&(u>n||v>r)?Math.max(Math.min(n/u,r/v,i[1]),i[0]):1;return{x:d?0:(n-u*f)/2-a*f,y:d?0:(r-v*f)/2-l*f,k:f}}},2098:(e,t,n)=>{n.d(t,{L:()=>u});var o=n(1030),r=n(3033),i=n(531),a=n(3783),l=n(908),c=n(6170),s=n(9127),d=n(8185);function u(e){let{cells:t,layout:n,previousCells:u,defaultNodeSize:v,canvasWidth:f,canvasHeight:h,scaleRange:m,transform:g,reason:p,parent:y,allowEdgeToArea:w}=e;const x="force"!==n&&"dagre"!==n,E=(0,a.C)(t,{defaultNodeSize:v}),k=[];let b=!1;const I=new Map;let C=!1;for(const e of u)(0,i.mH)(e)?C=!0:(0,i.N)(e)&&(C=!0,e[r.CV]&&I.set(e.id,e));const L=new Map;for(const e of E)if((0,i.N)(e)){L.set(e.id,e);const t=I.get(e.id);t&&(e.view.width=t.view.width,e.view.height=t.view.height,e[r.CV]=!0)}let S=!1;if("add-related-nodes"===p&&y){const e=new Set;for(const t of E)(0,i.WW)(t)&&t.source===y&&t.target!==y&&e.add(t.target);const t=L.get(y);if(void 0!==(null==t?void 0:t.view.x)&&void 0!==t.view.y){if(S=!0,x)for(const t of E)((0,i.N)(t)&&void 0===t.view.x||(0,i.N)(t)&&void 0===t.view.y)&&e.add(t.id);const n=[...e].map((e=>L.get(e))).filter(Boolean);let o;for(const e of n)void 0!==e.view.x&&void 0!==e.view.y?(!o||e.view.x>o.view.x)&&e.view.y>t.view.y&&(o=e):k.push(e);if(k.length>0&&x){let e,n;if(o)e=o.view.x+o.view.width+r.sz,n=o.view.y;else{const o=k.reduce(((e,t)=>e+t.view.width+r.sz),-r.sz);e=t.view.x-o/2+t.view.width/2,n=t.view.y+t.view.height+r.sz}for(const t of k)t.view.x=e,t.view.y=n,e+=t.view.width+r.sz}}}if(!S){let e=v[0],t=v[1];const n=[];let r=!1;for(const o of E)(0,i.N)(o)?(o.view.width>e&&(e=o.view.width),o.view.height>t&&(t=o.view.height),void 0===o.view.x||void 0===o.view.y?k.push(o):n.push(o)):(0,i.mH)(o)&&(r=!0);if(x){let e;C||(g=(0,l.r)((0,o.without)(E,...k),{canvasWidth:f,canvasHeight:h,scaleRange:m})),0===n.length||1===n.length&&!r?(k.push(...n),({getNodeView:e}=(0,s.C)({cells:E,allowEdgeToArea:w})),b=0===u.length||u.length===E.length&&u.every(((e,t)=>(0,d.c)(e,E[t])))):({getNodeView:e}=(0,c.k)({cells:E,fixedPosition:!0,allowEdgeToArea:w,center:[(f/2-g.x)/g.k,(h/2-g.y)/g.k]}));for(const t of E)if((0,i.N)(t)){const n=e(t.id);t.view.x=n.x,t.view.y=n.y}}}return{cells:E,updated:k,shouldReCenter:b}}},5748:(e,t,n)=>{n.d(t,{d:()=>a});var o=n(531),r=n(3033);function i(e,t,n){const o=e.findLastIndex(n)+1;return[...e.slice(0,o),t,...e.slice(o)]}const a=(l={cells:(e,t)=>{switch(t.type){case"drop-node":return i(e,t.payload,(e=>!("decorator"===e.type&&"text"===e.decorator)));case"drop-decorator":return"text"===t.payload.decorator?[...e,t.payload]:i(e,t.payload,(e=>"decorator"===e.type&&"area"===e.decorator));case"add-nodes":{const n=e.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1;return[...e.slice(0,n),...t.payload,...e.slice(n)]}case"add-edge":{const n=e.findIndex((e=>"edge"===e.type&&e.source===t.payload.source&&e.target===t.payload.target));return-1===n?i(e,t.payload,(e=>"edge"===e.type||"decorator"===e.type&&"area"===e.decorator)):[...e.slice(0,n),t.payload,...e.slice(n+1)]}case"change-edge-view":{const n=e.findIndex((e=>"edge"===e.type&&e.source===t.payload.source&&e.target===t.payload.target));return-1===n?e:[...e.slice(0,n),{...e[n],view:{...e[n].view,...t.payload.view}},...e.slice(n+1)]}case"move-cells":{let n=!1;const o=e.map((e=>{const o=t.payload.find((t=>e.type===t.type&&e.id===t.id));return o?(n=!0,{...e,view:{...e.view,x:o.x,y:o.y}}):e}));return n?o:e}case"resize-cell":{const{type:n,id:o,width:r,height:i}=t.payload,a=e.findIndex((e=>e.type===n&&e.id===o));if(-1!==a){const t=e[a];return[...e.slice(0,a),{...t,view:{...t.view,width:r,height:i}},...e.slice(a+1)]}return e}case"update-cells":return t.payload;case"update-node-size":return e.map((e=>(0,o.N)(e)&&e.id===t.payload.id?{...e,[r.CV]:!0,view:t.payload.size?{...e.view,width:t.payload.size[0],height:t.payload.size[1]}:e.view}:e))}return e},layoutKey:(e,t)=>"update-node-size"===t.type?t.layoutKey:e},(e,t)=>Object.fromEntries(Object.entries(l).map((n=>{let[o,r]=n;return[o,r(e[o],t)]}))));var l},7099:(e,t,n)=>{n.d(t,{Y:()=>h});var o=n(8769),r=n.n(o),i=n(2588),a=n(6768),l=n(6308),c=n(6257),s=n(5068),d=n(9575);const u=e=>o.createElement("svg",(0,d.A)({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"},e),o.createElement("path",{d:"M12 0a.5.5 0 0 1 .5.5v2.013a9.5 9.5 0 0 1 8.987 8.988L23.5 11.5a.5.5 0 0 1 0 1h-2.013a9.5 9.5 0 0 1-8.987 8.987V23.5a.5.5 0 0 1-1 0v-2.013A9.5 9.5 0 0 1 2.514 12.5H.5a.5.5 0 0 1 0-1h2.013A9.5 9.5 0 0 1 11.5 2.514V.5A.5.5 0 0 1 12 0M3.514 11.5H7.5a.5.5 0 0 1 0 1H3.514a8.5 8.5 0 0 0 7.987 7.986L11.5 16.5a.5.5 0 0 1 1 0v3.986a8.5 8.5 0 0 0 7.986-7.986H16.5a.5.5 0 0 1 0-1h3.986A8.5 8.5 0 0 0 12.5 3.515V7.5a.5.5 0 0 1-1 0V3.514a8.5 8.5 0 0 0-7.986 7.987zm8.486-1a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3"})),v=e=>o.createElement("svg",(0,d.A)({xmlns:"http://www.w3.org/2000/svg",width:128,height:128,className:"icon",viewBox:"0 0 1024 1024"},e),o.createElement("path",{d:"M512 76.8A435.2 435.2 0 1 0 947.2 512 435.71 435.71 0 0 0 512 76.8m0 819.2a384 384 0 1 1 384-384 384 384 0 0 1-384 384"}),o.createElement("path",{d:"M744.448 486.4h-204.8V281.6a25.6 25.6 0 1 0-51.2 0v204.8h-204.8a25.6 25.6 0 0 0 0 51.2h204.8v204.8a25.6 25.6 0 0 0 51.2 0V537.6h204.8a25.6 25.6 0 0 0 0-51.2"})),f=e=>o.createElement("svg",(0,d.A)({xmlns:"http://www.w3.org/2000/svg",width:128,height:128,className:"icon",viewBox:"0 0 1024 1024"},e),o.createElement("path",{d:"M512 76.8A435.2 435.2 0 1 0 947.2 512 435.71 435.71 0 0 0 512 76.8m0 819.2a384 384 0 1 1 384-384 384 384 0 0 1-384 384"}),o.createElement("path",{d:"M744.448 486.4H280.064a25.6 25.6 0 1 0 0 51.2h464.384a25.6 25.6 0 0 0 0-51.2"}));function h(e){let{shadowRoot:t,scale:n,scaleRange:d,onZoomChange:h,onReCenter:m}=e;const g=(0,s.useCurrentTheme)(),p=(0,o.useMemo)((()=>(0,c.VC)()),[]),y=(0,o.useRef)(null),w=100*d[0],x=100*d[1],E=100*n,k=(0,o.useMemo)((()=>({formatter:e=>`${e}%`,placement:"left",getPopupContainer:()=>y.current})),[]),b=(0,o.useCallback)((()=>{h(Math.min(E+5,x))}),[x,h,E]),I=(0,o.useCallback)((()=>{h(Math.max(E-5,w))}),[w,h,E]);return r().createElement(i.Ay,{theme:{algorithm:"dark-v2"===g?a.A.darkAlgorithm:a.A.defaultAlgorithm}},r().createElement(c.N7,{container:t,autoClear:!0,cache:p,hashPriority:"high"},r().createElement("div",{className:"zoom-bar",ref:y},r().createElement("div",{className:"center-button",onClick:m,role:"button"},r().createElement(u,null)),r().createElement("div",{className:"zoom-slider"},r().createElement("div",{className:"zoom-button",role:"button",onClick:b},r().createElement(v,null)),r().createElement(l.A,{min:w,max:x,value:E,step:5,vertical:!0,included:!1,tooltip:k,onChange:h}),r().createElement("div",{className:"zoom-button",role:"button",onClick:I},r().createElement(f,null))))))}},9127:(e,t,n)=>{n.d(t,{C:()=>c});var o=n(1030),r=n(7586),i=n.n(r),a=n(8802),l=n(531);function c(e){let{cells:t,layoutOptions:n,allowEdgeToArea:r}=e;const{nodePadding:c,...s}={nodePadding:0,rankdir:"TB",ranksep:50,edgesep:10,nodesep:50,...(0,o.pick)(n,["nodePadding","rankdir","ranksep","edgesep","nodesep","align"])},d=(0,a.D)(c);if(!t.some(l.N))return{getNodeView:()=>null,nodePaddings:d};const u=new(i().graphlib.Graph);u.setGraph(s),u.setDefaultEdgeLabel((function(){return{}}));for(const e of t)r&&(0,l.o6)(e)||(0,l.N)(e)?u.setNode(e.id,{id:e.id,width:e.view.width+d[1]+d[3],height:e.view.height+d[0]+d[2]}):(0,l.WW)(e)&&u.setEdge(e.source,e.target);return i().layout(u),{getNodeView:e=>u.node(e),nodePaddings:d}}},6170:(e,t,n)=>{n.d(t,{k:()=>v});var o=n(1030),r=n(6149),i=n(4842),a=n(1945),l=n(9418),c=n(3854),s=n(7931),d=n(531),u=n(8802);function v(e){let{cells:t,layoutOptions:n,center:v,fixedPosition:f,allowEdgeToArea:h}=e;const{nodePadding:m,collide:g}={nodePadding:0,...(0,o.pick)(n,["nodePadding"]),collide:!1!==(null==n?void 0:n.collide)&&{radiusDiff:18,strength:1,iterations:1,...!0===(null==n?void 0:n.collide)?null:null==n?void 0:n.collide}},p=(0,u.D)(m),y=[],w=[],x=new Map;for(const e of t)if(h&&(0,d.o6)(e)||(0,d.N)(e)){const t={id:e.id,width:e.view.width+p[1]+p[3],height:e.view.height+p[0]+p[2],...f?{fx:e.view.x,fy:e.view.y}:null};y.push(t),x.set(t.id,t)}else(0,d.WW)(e)&&w.push({source:e.source,target:e.target});const E=(0,r.A)(w).id((e=>e.id)),k=(0,i.A)(y).force("link",E).force("x",(0,a.A)(null==v?void 0:v[0])).force("y",(0,l.A)(null==v?void 0:v[1])).force("charge",(0,c.A)());return g&&k.force("collide",(0,s.A)().radius((e=>Math.sqrt(e.width**2+e.height**2)/2+g.radiusDiff)).strength(g.strength).iterations(g.iterations)),k.stop(),function(e){e.tick(Math.ceil(Math.log(e.alphaMin())/Math.log(1-e.alphaDecay())))}(k),{getNodeView:e=>x.get(e),nodePaddings:p}}},967:(e,t,n)=>{n.d(t,{V:()=>u,P:()=>v});var o=n(1030),r=n(8875),i=n(4059);function a(e,t){return{x:e.x+e.width/2,y:e.y+e.height/2,width:e.width+t,height:e.height+t}}var l=n(3033),c=n(3188),s=n(531);const d=["right","top","left","bottom"];function u(e,t,n,u){var p,y;const{type:w,vertices:x,exitPosition:E,entryPosition:k}=n??{};if((0,s.jw)(w))return(0,c.h)(a(e,E?l.XK:l.p6),a(t,k?l.XK:l.p6),u,n);if(null!=x&&x.length){const n=x[0],o=x[x.length-1];let r,i,a,l;if(E)r=h(e,E);else{let i;if(x.length>1?i=x[1]:k&&(i=h(t,k)),i)r=m(n,e,n.y===i.y);else{const n=o.y<t.y||o.y>t.y+t.height?"ns":"ew";({point:r,direction:a}=g(e,t,x,n))}}if(k)i=h(t,k);else{let r;if(x.length>1?r=x[x.length-2]:E&&(r=h(e,E)),r)i=m(o,t,o.y===r.y);else{const o=n.x<e.x||n.x>e.x+e.width?"ew":"ns";({point:i,direction:l}=g(t,e,x.slice().reverse(),o))}}const{x:c,y:s}=r,{x:d,y:u}=i,f=[r,...x,i],p=[...x];return n&&n.x!==c&&n.y!==s&&p.unshift("ns"===a?{x:c,y:n.y}:"ew"===a?{x:n.x,y:s}:n.x===f[2].x?{x:c,y:n.y}:{x:n.x,y:s}),o&&o.x!==d&&o.y!==u&&p.push("ns"===l?{x:d,y:o.y}:"ew"===l?{x:o.x,y:u}:o.x===f[f.length-3].x?{x:d,y:o.y}:{x:o.x,y:u}),[r,...v(r,p,i),i]}const b=E??f(t,e),I=k??f(e,t),{x:C,y:L}=h(e,b),{x:S,y:z}=h(t,I),M=(0,r.X)(),P=(null===(p=M.find((e=>e.x===b.x&&e.y===b.y)))||void 0===p?void 0:p.d)??d,N=(null===(y=M.find((e=>e.x===I.x&&e.y===I.y)))||void 0===y?void 0:y.d)??d,R=[...P],A=[...N];C<S?((0,o.pull)(R,"left"),(0,o.pull)(A,"right")):((0,o.pull)(R,"right"),(0,o.pull)(A,"left")),L<z?((0,o.pull)(R,"top"),(0,o.pull)(A,"bottom")):((0,o.pull)(R,"bottom"),(0,o.pull)(A,"top"));const T=R[0]??P[0],H=A[0]??N[0],Z="left"===T||"right"===T?b.y:b.x,D="left"===H||"right"===H?I.y:I.x;return(0,i.o)(a(e,l.XK),a(t,l.XK),T,H,Z,D)}function v(e,t,n){const o=[];let r,i=e,a=0;for(;a<t.length;){const e=t[a],l=e.x!==i.x,c=e.y!==i.y;if(l||c){const c=l?"ew":"ns";if(c!==r){const l=a===t.length-1?n:t[a+1],s=l.x!==e.x,d=l.y!==e.y;(s||d)&&c!==(s?"ew":"ns")&&(r=c,o.push(e),i=e)}}a++}return o}function f(e,t){return t.y+t.height<e.y?{x:.5,y:1}:t.y>e.y+e.height?{x:.5,y:0}:t.x<e.x?{x:1,y:.5}:{x:0,y:.5}}function h(e,t){const n=l.XK/2;return{x:e.x-n+t.x*(e.width+l.XK),y:e.y-n+t.y*(e.height+l.XK)}}function m(e,t,n){let o,r,i,a,c;if(n?(o="y",r="x",i="height",a="width"):(o="x",r="y",i="width",a="height"),t[r]+t[a]<e[r]&&(c={[o]:.5,[r]:1}),t[r]>e[r]&&(c={[o]:.5,[r]:0}),c)return h(t,c);const s=t[o]<e[o]?1:0;return{[o]:t[o]-l.XK/2+s*(t[i]+l.XK),[r]:e[r]}}function g(e,t,n,o){let r,i,a,l,c,s,d,u;"ns"===o?(a="x",l="y",c="width",s="height",d="ns",u="ew"):(a="y",l="x",c="height",s="width",d="ew",u="ns");const v=n[0];if(v[a]>=e[a]&&v[a]<=e[a]+e[c])if(v[l]>e[l]+e[s])r={[a]:v[a],[l]:e[l]+e[s]},i=d;else if(v[l]<e[l])r={[a]:v[a],[l]:e[l]},i=d;else{const o=n[1]??t;r={[a]:v[a],[l]:o[l]<v[l]?v[l]:e[l]+e[s]},i=d}else v[l]<e[l]?(r={[a]:e[a]+e[c]/2,[l]:e[l]},i=d):v[l]>e[l]+e[s]?(r={[a]:e[a]+e[c]/2,[l]:e[l]+e[s]},i=d):v[a]<e[a]?(r={[a]:e[a],[l]:v[l]},i=u):(r={[a]:e[a]+e[c],[l]:v[l]},i=u);return{point:r,direction:i}}},8875:(e,t,n)=>{n.d(t,{G:()=>a,X:()=>i});const o=[{x:0,y:0,d:["top","left"]},{x:.5,y:0,d:["top"]},{x:1,y:0,d:["top","right"]},{x:0,y:.5,d:["left"]},{x:1,y:.5,d:["right"]},{x:0,y:1,d:["bottom","left"]},{x:.5,y:1,d:["bottom"]},{x:1,y:1,d:["bottom","right"]}],r=o.map((e=>({x:e.x,y:e.y})));function i(){return o}function a(){return r}},1819:(e,t,n)=>{n.d(t,{J:()=>i});var o=n(8769),r=n(8185);function i(e){let{rootRef:t,activeTarget:n,onActiveTargetChange:i}=e;const a=n??null,[l,c]=(0,o.useState)(a);(0,o.useEffect)((()=>{c((e=>(0,r.c)(e,a)?e:a))}),[a]);const s=(0,o.useRef)(!1);return(0,o.useEffect)((()=>{s.current?i(l):s.current=!0}),[l,i]),(0,o.useEffect)((()=>{if(!l)return;const e=e=>{e.composedPath().indexOf(t.current)<=0&&c(null)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}),[l,t]),l}},1484:(e,t,n)=>{n.d(t,{g:()=>f});var o=n(8769),r=n(7566),i=n(9047),a=n(3033),l=n(531),c=n(908),s=n(6170),d=n(9127);const u=new Map([["center",.5],["left",0],["right",1],["top",0],["bottom",1]]);function v(e,t){if("string"==typeof e){const n=u.get(e);if(void 0!==n)return n;const o=e.match(/^(-?\d+(?:\.\d+)?)%$/);if(o)return Number(o[1])/100;console.error("Unexpected align origin %s:",t,e)}else{if("number"==typeof e)return e;console.error("Unexpected align origin %s, expected %s, received %s:",t,"string | number",typeof e,e)}return.5}function f(e){let{layout:t,layoutOptions:n,rootRef:u,cells:f,zoomable:h,zoomer:m,scaleRange:g,layoutKey:p,allowEdgeToArea:y,dispatch:w}=e;const[x,E]=(0,o.useState)("force"!==t&&"dagre"!==t),k=(0,o.useRef)(p),b=(0,o.useCallback)((()=>++k.current),[]),[I,C]=function(e){let{rootRef:t,cells:n,layoutInitialized:s,zoomable:d,zoomer:u,scaleRange:v}=e;const[f,h]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{const e=t.current;if(!e||!s||f||!n.some((e=>(0,l.N)(e)||(0,l.mH)(e)))||n.some((e=>(0,l.N)(e)&&!e[a.CV])))return;const{k:o,x:m,y:g}=(0,c.r)(n,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:d?v:void 0});u.transform((0,r.A)(e),new i.uV(o,m,g)),h(!0)}),[n,f,s,t,v,d,u]),(0,o.useEffect)((()=>{n.some((e=>(0,l.N)(e)||(0,l.mH)(e)))||h(!1)}),[n]),[f,h]}({rootRef:u,layoutInitialized:x,cells:f,zoomable:h,zoomer:m,scaleRange:g}),L=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(f.some((e=>(0,l.N)(e)&&!e[a.CV]))||0===f.length)return;if("force"!==t&&"dagre"!==t)return void E(!0);if(k.current!==p||(e=L.current,o=f.filter(l.nv),(null==e?void 0:e.length)===o.length&&e.every(((e,t)=>e===o[t]))))return;var e,o;let r,i;({getNodeView:r,nodePaddings:i}="force"===t?(0,s.k)({cells:f,layoutOptions:n,allowEdgeToArea:y}):(0,d.C)({cells:f,layoutOptions:n,allowEdgeToArea:y}));const c=function(e){const t=e??[.5,.5];return[v(t[0],"x"),v(t[1],"y")]}(null==n?void 0:n.alignOrigin),u=f.map((e=>{if(y&&(0,l.o6)(e)||(0,l.N)(e)){const t=r(e.id);return{...e,view:{...e.view,x:t.x-t.width*c[0]+i[3],y:t.y-t.height*c[1]+i[0]},[a.xc]:!0}}return e}));L.current=u.filter(l.nv),w({type:"update-cells",payload:u}),E(!0)}),[f,w,t,p,n]),{centered:I,setCentered:C,getNextLayoutKey:b}}},7531:(e,t,n)=>{n.d(t,{d:()=>c});var o=n(8769),r=n(7619),i=n(1030),a=n(531),l=n(3033);function c(e){let{cells:t,defaultEdgeLines:n,markerPrefix:c,lineConnector:u}=e;return(0,o.useMemo)((()=>{const e=[{strokeColor:l.mF,markerType:"arrow"}];let o=null;if(u){o={...d(),editingStrokeColor:"var(--palette-blue-5)",...(0,i.omitBy)(!0===u?{}:u,i.isUndefined)};const t=s({strokeColor:o.strokeColor,markerType:o.markerType},e);o.$markerUrl=`url(#${c}${t})`;const n=s({strokeColor:o.editingStrokeColor,markerType:o.markerType},e);o.$editingMarkerUrl=`url(#${c}${n})`}const v=new WeakMap;for(const o of t)if((0,a.WW)(o)){const t=r.__secret_internals.legacyDoTransform({edge:o},null==n?void 0:n.find((e=>(0,r.checkIfByTransform)(e,{edge:o}))))??{},a={...d(),...(0,i.omitBy)(t,i.isUndefined),...(0,i.omitBy)(o.view,i.isUndefined)};void 0===a.parallelGap&&(a.parallelGap=a.interactStrokeWidth);const l=s({strokeColor:a.strokeColor,markerType:a.markerType},e);a.$markerUrl=`url(#${c}${l})`,v.set(o,a)}return{lineConfMap:v,lineConnectorConf:o,markers:e}}),[t,n,u,c])}function s(e,t){let n=(0,i.findIndex)(t,e);return-1===n&&(n=t.push(e)-1),n}function d(){return{type:"straight",markerType:"arrow",dashed:!1,strokeColor:l.mF,strokeWidth:l.VO,interactStrokeWidth:l.Ie,showStartArrow:l.XV,showEndArrow:l.Ub,animate:{useAnimate:!1,duration:l.Be}}}},8197:(e,t,n)=>{n.d(t,{H:()=>a});var o=n(8769),r=n(531),i=n(3033);function a(e){let{cells:t,layout:n,centered:a}=e;return(0,o.useMemo)((()=>a&&t.every((e=>!(0,r.N)(e)||e[i.CV]&&("force"!==n&&"dagre"!==n||e[i.xc])))),[t,a,n])}},8091:(e,t,n)=>{n.d(t,{f:()=>l});var o=n(8769),r=n(7566),i=n(9047),a=n(3033);function l(e){let{rootRef:t,zoomable:n,scrollable:l,pannable:c,draggable:s,ctrlDraggable:d,scaleRange:u,onSwitchActiveTarget:v}=e;const[f,h]=(0,o.useState)(!1),[m,g]=(0,o.useState)({k:1,x:0,y:0}),p=(0,o.useMemo)((()=>u??[a.sS,a.Yt]),[u]),y=(0,o.useMemo)((()=>(0,i.s_)()),[]);return(0,o.useEffect)((()=>{let e=!1;y.scaleExtent(n?p:[1,1]).on("start",(()=>{e=!1,h(!0)})).on("zoom",(t=>{e=!0,g(t.transform)})).on("end",(()=>{h(!1),e||null==v||v(null)})).filter((e=>("wheel"===e.type||(d?s||e.ctrlKey:!e.ctrlKey))&&!e.button))}),[v,p,n,y,d,s]),(0,o.useEffect)((()=>{if(d){const e=e=>{e.ctrlKey&&e.preventDefault()};return document.addEventListener("contextmenu",e,!0),()=>{document.removeEventListener("contextmenu",e,!0)}}}),[d]),(0,o.useEffect)((()=>{const e=t.current;if(!e)return;const o=(0,r.A)(e),i=()=>{o.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(n||l||c)return(n||l)&&o.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),l&&(e.preventDefault(),y.translateBy(o,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),o.call(y).on("wheel",(e=>{e.preventDefault()})).on("dblclick.zoom",null),(s||d)&&c||o.on("mousedown.zoom",null),c||o.on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),i;i()}),[d,s,c,t,l,n,y]),{grabbing:f,transform:m,zoomer:y,scaleRange:p}}},6237:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(6758),r=n.n(o),i=n(935),a=n.n(i)()(r());a.push([e.id,'.zoom-bar{position:absolute;bottom:20px;right:20px;width:40px;scale:0.8}.zoom-slider,\n.center-button{width:100%;display:flex;align-items:center;border:1px solid var(--antd-background-color-base);border-radius:var(--larger-border-radius);box-shadow:var(--connected-overlay-shadow);background-color:var(--color-fill-bg-container-4)}.zoom-slider{height:140px;padding:8px 0;flex-direction:column}[role="button"]{cursor:pointer}.center-button{justify-content:center;margin-bottom:8px;height:40px}.center-button:hover{border-color:var(--antd-btn-default-hover-border-color)}.center-button path{fill:var(--antd-link-hover-color)}.center-button:hover path{fill:var(--palette-blue-7)}.zoom-button{font-size:16px;line-height:0}.zoom-button svg{width:1em;height:1em;fill:var(--antd-link-hover-color)}.zoom-slider .ant-slider-vertical{padding-inline:5px}.zoom-slider .ant-slider-vertical .ant-slider-rail{width:2px}.zoom-slider .ant-slider-vertical .ant-slider-handle{width:6px;height:6px;inset-inline-start:3px}.zoom-slider .ant-slider .ant-slider-handle:hover::before,\n.zoom-slider .ant-slider .ant-slider-handle:focus::before,\n.zoom-slider .ant-slider .ant-slider-handle::before{width:10px;height:10px;inset-inline-start:-2px}.zoom-slider .ant-slider .ant-slider-handle:hover::after,\n.zoom-slider .ant-slider .ant-slider-handle:focus::after,\n.zoom-slider .ant-slider .ant-slider-handle::after{width:6px;height:6px;inset-block-start:0;inset-inline-start:0}',""]);const l=a.toString()},3012:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(6758),r=n.n(o),i=n(935),a=n.n(i)()(r());a.push([e.id,"*{box-sizing:border-box}:host{display:block;position:relative;overflow:hidden;--animation-dasharray:48;--stroke-dashedoffset:96;--stroke-dottedoffset:24;--dasharray:4;--dotted:1}:host,\n.root{width:100%;height:100%}:host([hidden]){display:none}.root{opacity:0}.root.ready{opacity:1}.root:focus{outline:none}@keyframes solidAnimation{to{stroke-dashoffset:0}}@keyframes dashedAnimation{0%{stroke-dashoffset:var(--stroke-dashedoffset)}to{stroke-dashoffset:0}}@keyframes dottedAnimation{0%{stroke-dashoffset:var(--stroke-dottedoffset)}to{stroke-dashoffset:0}}.solid-animation{stroke-dasharray:var(--solid-length);stroke-dashoffset:var(--solid-length);animation:solidAnimation var(--time) linear infinite}.dashed-animation{animation:dashedAnimation var(--time) linear infinite}.dotted-animation{animation:dottedAnimation var(--time) linear infinite}.decorator-area .area,\n.decorator-container .container{fill:rgba(119,141,195,0.1);stroke:none;stroke-width:0}.node,\n.decorator-text{overflow:visible}.cell.active .decorator-area .area,\n.cell.active .decorator-container .container,\n.cell:not(.read-only) .decorator-container .container:hover,\n.allowEdgeToArea .decorator-area .area:hover,\n.cell.active .line-active-bg{stroke:var(--palette-blue-5);stroke-dasharray:var(--dasharray);stroke-width:1}.container-active .decorator-container .container{stroke:var(--palette-blue-5);stroke-width:1}.cell:not(.read-only){-webkit-user-select:none;user-select:none}.resize-handle{cursor:nwse-resize;opacity:0}.resize-handle rect{fill:transparent;stroke:none}.resize-handle path{fill:none;stroke:var(--palette-gray-5);stroke-width:1.5}.cell.active .decorator-area .resize-handle,\n.decorator-area:hover .resize-handle,\n.decorator-container:hover .resize-handle{opacity:1}.connect-line{pointer-events:none}.connect-line:not(.connecting){display:none}.editing-line{pointer-events:none;stroke-dasharray:var(--dasharray);stroke-width:1}.editing-line:not(.editing){display:none}.line.dashed{stroke-dasharray:var(--dasharray)}.line.dotted{stroke-dasharray:var(--dotted)}.cell.active .decorator-text .text-container{outline:1px dashed var(--palette-blue-5)}.decorator-text .text-container{width:max-content;padding:0.5em}.decorator-text .text:focus{outline:none}.cell.faded{opacity:0.3}.cell.container-active{opacity:1}.cell .node{pointer-events:none}.cell .node > *{position:fixed;pointer-events:auto}.degraded{pointer-events:bounding-box}.degraded circle{fill:rgb(119,141,195)}.degraded text{text-anchor:middle;fill:var(--antd-text-color)}.cell.active .degraded circle,\n.cell.active .degraded text,\n.degraded:hover circle,\n.degraded:hover text{fill:var(--color-brand)}.decorator-container{--defaultSize:24px}.decorator-container .text-container{display:flex;align-items:center;justify-content:center;padding:0.5em;text-align:center;font-size:16px;background-color:rgba(119,141,195,0.6);overflow:hidden}.decorator-container .horizontal{height:max-content;width:100%}:is(.decorator-container .horizontal) .text{min-height:var(--defaultSize)}.decorator-container .vertical{width:max-content;height:100%;writing-mode:vertical-lr;text-orientation:upright;letter-spacing:4px}:is(.decorator-container .vertical) .text{min-width:var(--defaultSize)}",""]);const l=a.toString()}}]);
2
+ //# sourceMappingURL=6055.9858b4b9.js.map