@next-bricks/diagram 0.33.2 → 0.33.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +5 -5
- package/dist/chunks/{5030.d3abbe90.js → 5030.5dd4080b.js} +2 -2
- package/dist/chunks/{5030.d3abbe90.js.map → 5030.5dd4080b.js.map} +1 -1
- package/dist/chunks/{5481.96ff558b.js → 5481.d6977dfc.js} +3 -3
- package/dist/chunks/{5481.96ff558b.js.map → 5481.d6977dfc.js.map} +1 -1
- package/dist/chunks/{5576.4aa3c030.js → 5576.ccc9b07c.js} +2 -2
- package/dist/chunks/{5576.4aa3c030.js.map → 5576.ccc9b07c.js.map} +1 -1
- package/dist/chunks/5669.6a29cf42.js +2 -0
- package/dist/chunks/5669.6a29cf42.js.map +1 -0
- package/dist/chunks/{7034.2b76ed5d.js → 7034.3601cdf8.js} +3 -3
- package/dist/chunks/{7034.2b76ed5d.js.map → 7034.3601cdf8.js.map} +1 -1
- package/dist/chunks/7733.557f1536.js +2 -0
- package/dist/chunks/7733.557f1536.js.map +1 -0
- package/dist/chunks/8050.3fbd70a1.js +2 -0
- package/dist/chunks/8050.3fbd70a1.js.map +1 -0
- package/dist/chunks/8954.8a2753c6.js +2 -0
- package/dist/chunks/8954.8a2753c6.js.map +1 -0
- package/dist/chunks/{editable-label.27f45f0e.js → editable-label.8e6f528c.js} +3 -3
- package/dist/chunks/{editable-label.27f45f0e.js.map → editable-label.8e6f528c.js.map} +1 -1
- package/dist/chunks/{eo-diagram.d23e4cc3.js → eo-diagram.78ef4cc9.js} +2 -2
- package/dist/chunks/{eo-diagram.d23e4cc3.js.map → eo-diagram.78ef4cc9.js.map} +1 -1
- package/dist/chunks/{eo-display-canvas.1de621b4.js → eo-display-canvas.0560f7b0.js} +2 -2
- package/dist/chunks/{eo-display-canvas.1de621b4.js.map → eo-display-canvas.0560f7b0.js.map} +1 -1
- package/dist/chunks/{eo-draw-canvas.b28017a5.js → eo-draw-canvas.ab7bd87c.js} +2 -2
- package/dist/chunks/{eo-draw-canvas.b28017a5.js.map → eo-draw-canvas.ab7bd87c.js.map} +1 -1
- package/dist/chunks/{experimental-node.e8c45637.js → experimental-node.4545beba.js} +2 -2
- package/dist/chunks/{experimental-node.e8c45637.js.map → experimental-node.4545beba.js.map} +1 -1
- package/dist/chunks/main.456f6194.js +2 -0
- package/dist/chunks/main.456f6194.js.map +1 -0
- package/dist/examples.json +3 -3
- package/dist/index.2bbf9aec.js +2 -0
- package/dist/index.2bbf9aec.js.map +1 -0
- package/dist/manifest.json +134 -134
- package/dist/types.json +1950 -2002
- package/package.json +3 -3
- package/dist/chunks/1860.08a89fdc.js +0 -2
- package/dist/chunks/1860.08a89fdc.js.map +0 -1
- package/dist/chunks/1972.2904ef68.js +0 -2
- package/dist/chunks/1972.2904ef68.js.map +0 -1
- package/dist/chunks/7733.7a82300e.js +0 -2
- package/dist/chunks/7733.7a82300e.js.map +0 -1
- package/dist/chunks/9591.50cab9c8.js +0 -2
- package/dist/chunks/9591.50cab9c8.js.map +0 -1
- package/dist/chunks/main.01b6daf9.js +0 -2
- package/dist/chunks/main.01b6daf9.js.map +0 -1
- package/dist/index.2de5bb8f.js +0 -2
- package/dist/index.2de5bb8f.js.map +0 -1
- /package/dist/chunks/{5481.96ff558b.js.LICENSE.txt → 5481.d6977dfc.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{7034.2b76ed5d.js.LICENSE.txt → 7034.3601cdf8.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{editable-label.27f45f0e.js.LICENSE.txt → editable-label.8e6f528c.js.LICENSE.txt} +0 -0
package/dist/bricks.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "bricks/diagram",
|
|
3
3
|
"bricks": [
|
|
4
|
-
"diagram.
|
|
5
|
-
"diagram.
|
|
4
|
+
"diagram.experimental-node",
|
|
5
|
+
"diagram.editable-label"
|
|
6
6
|
],
|
|
7
7
|
"elements": [
|
|
8
8
|
"eo-diagram",
|
|
9
|
-
"eo-
|
|
10
|
-
"eo-
|
|
9
|
+
"eo-draw-canvas",
|
|
10
|
+
"eo-display-canvas"
|
|
11
11
|
],
|
|
12
12
|
"processors": [],
|
|
13
13
|
"dependencies": {
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"basic.lock-body-scroll"
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
|
-
"filePath": "bricks/diagram/dist/index.
|
|
18
|
+
"filePath": "bricks/diagram/dist/index.2bbf9aec.js"
|
|
19
19
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_diagram=self.webpackChunk_next_bricks_diagram||[]).push([[5030],{3739:(e,t,r)=>{r.d(t,{c:()=>o});var a=r(8769),n=r.n(a);function o(e){var t,{id:r,type:a,strokeColor:o}=e;switch(a){case"0..1":t=l;break;case"0..N":t=d;break;default:t=i}return n().createElement(t,{id:r,strokeColor:o})}function i(e){var{id:t,strokeColor:r}=e;return n().createElement("marker",{id:t,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 l(e){var{id:t,strokeColor:r}=e;return n().createElement("marker",{id:t,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 d(e){var{id:t,strokeColor:r}=e;return n().createElement("marker",{id:t,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"}))}},3188:(e,t,r)=>{r.d(t,{h:()=>n});var a=r(733);function n(e,t,r){if(e===t||(0,a.w)(e,t,0,0))return null;var n,i,l=0,d=0;if(r){var s=t.x-e.x,c=t.y-e.y,u=Math.atan2(c,s);l=r/2*Math.cos(u+Math.PI/2),d=r/2*Math.sin(u+Math.PI/2)}var h=[[e.x+l,e.y+d],[t.x+l,t.y+d]],v=o(e,h),f=o(t,h);return n=v.length>0?v[0]:[e.x,e.y],i=f.length>0?f[0]:[t.x,t.y],[{x:n[0],y:n[1]},{x:i[0],y:i[1]}]}function o(e,t){for(var r=[[e.x-e.width/2,e.y-e.height/2],[e.x+e.width/2,e.y-e.height/2],[e.x+e.width/2,e.y+e.height/2],[e.x-e.width/2,e.y+e.height/2]],a=[],n=0;n<4;n++)a.push([r[n],r[(n+1)%4]]);var o=[];for(var l of a){var d=i(t[0],t[1],l[0],l[1]);d&&o.push(d)}return o}function i(e,t,r,a){var[n,o]=e,[i,l]=t,[d,s]=r,[c,u]=a;if(n===i&&o===l||d===c&&s===u)return null;var h=(u-s)*(i-n)-(c-d)*(l-o);if(0===h)return null;var v=((c-d)*(o-s)-(u-s)*(n-d))/h,f=((i-n)*(o-s)-(l-o)*(n-d))/h;return v<0||v>1||f<0||f>1?null:[n+v*(i-n),o+v*(l-o)]}},733:(e,t,r)=>{function a(e,t,r,a){var o=r?n(e,r):e,i=a?n(t,a):t,l=Math.min(o.x-o.width/2,i.x-i.width/2),d=Math.max(o.x+o.width/2,i.x+i.width/2),s=Math.min(o.y-o.height/2,i.y-i.height/2),c=Math.max(o.y+o.height/2,i.y+i.height/2);return d-l<o.width+i.width&&c-s<o.height+i.height}function n(e,t){return{x:e.x-e.width/2-t,y:e.y-e.height/2-t,width:e.width+2*t,height:e.height+2*t}}r.d(t,{w:()=>a})},8802:(e,t,r)=>{function a(e){if(Array.isArray(e)){var t=e[0],r=e.length>1?e[1]:t;return[t,r,e.length>2?e[2]:t,e.length>3?e[3]:r]}return new Array(4).fill(e)}r.d(t,{D:()=>a})},2830:(e,t,r)=>{r.d(t,{m:()=>z});var a=r(8769),n=r.n(a),o=r(3373),i=r.n(o),l=r(531),d=r(3188);function s(e,t){return e.find((e=>(0,l.N)(e)&&e.id===t))}var c=r(3033);function u(e){var t,r,o,{edge:u,cells:v,lineConfMap:f}=e,g=(0,a.useRef)(null),m=(0,a.useMemo)((()=>s(v,u.source)),[v,u.source]),p=(0,a.useMemo)((()=>s(v,u.target)),[v,u.target]),w=(0,a.useMemo)((()=>f.get(u)),[u,f]),y=(0,a.useMemo)((()=>v.some((e=>(0,l.WW)(e)&&e.source===u.target&&e.target===u.source))?w.parallelGap:0),[v,u,w.parallelGap]),x=(0,a.useMemo)((()=>m&&p&&null!=m.view.x&&null!=p.view.x?(0,d.h)(h(m.view,5),h(p.view,5),y):null),[y,m,p]);if(!x)return null;var k="M".concat(x[0].x," ").concat(x[0].y,"L").concat(x[1].x," ").concat(x[1].y);return n().createElement(n().Fragment,null,n().createElement("path",{d:k,fill:"none",stroke:"transparent",strokeWidth:w.interactStrokeWidth}),n().createElement("path",{ref:g,className:i()("line",{dashed:w.dashed,["".concat(w.dashed?"dashed":"solid","-animation")]:w.animate.useAnimate}),style:{"--time":"".concat(null!==(t=w.animate.duration)&&void 0!==t?t:c.Be,"s"),"--solid-length":null===(r=g.current)||void 0===r||null===(o=r.getTotalLength)||void 0===o?void 0:o.call(r)},d:k,fill:"none",stroke:w.strokeColor,strokeWidth:w.strokeWidth,markerStart:w.showStartArrow?w.markerArrow:"",markerEnd:w.showEndArrow?w.markerArrow:""}),n().createElement("path",{className:"line-active-bg",d:k,fill:"none"}))}function h(e,t){return{x:e.x+e.width/2,y:e.y+e.height/2,width:e.width+t,height:e.height+t}}var v=r(6263),f=r(5530),g=r(1030),m=r(9126);function p(e){var{node:t,degraded:r,degradedNodeLabel:o,defaultNodeBricks:i,onResize:l}=e,d=function(e){var[t,r]=(0,a.useState)(e);return(0,a.useEffect)((()=>{r((t=>(0,g.isEqual)(t,e)?t:e))}),[e]),t}({node:{id:t.id,data:t.data}}),s=t.useBrick,c=(0,a.useRef)(null),u=(0,a.useMemo)((()=>{var e;return r?null:null!=s?s:null==i||null===(e=i.find((e=>(0,f.checkIfByTransform)(e,d))))||void 0===e?void 0:e.useBrick}),[r,s,i,d]),h=(0,a.useMemo)((()=>r?String(f.__secret_internals.legacyDoTransform(d,null!=o?o:"<% DATA.node.id %>")):""),[r,o,d]),p=(0,a.useCallback)((e=>{var r=c.current;r&&(r.disconnect(),c.current=null),e?setTimeout((()=>{var r=new m.A((()=>{l(t.id,[e.offsetWidth,e.offsetHeight])}));r.observe(e),c.current=r})):l(t.id,null)}),[t.id,l]),w=(0,a.useCallback)((e=>{if(e){var r=e.getBBox();l(t.id,[r.width,r.height])}else l(t.id,null)}),[t.id,l]);return u?n().createElement("foreignObject",{width:9999,height:9999,className:"node"},u&&n().createElement(v.ReactUseBrick,{useBrick:u,data:d,refCallback:p})):r?n().createElement("g",{className:"degraded",ref:w},n().createElement("circle",{cx:8,cy:8,r:8}),n().createElement("text",{x:8,y:32},h)):null}function w(e){return"edge"===e.type?(0,g.pick)(e,["type","source","target","data"]):(0,g.pick)(e,["type","id","data"])}function y(e,t){var{action:r,cell:a,scale:n,layout:o,onCellMoving:i,onCellMoved:d,onCellResizing:s,onCellResized:c,onSwitchActiveTarget:u}=t;if(e.stopPropagation(),null==u||u(w(a)),!(0,l.WW)(a)&&("force"!==o&&"dagre"!==o||!(0,l.N)(a))){var h=[e.clientX,e.clientY],v="move"===r?[a.view.x,a.view.y]:[a.view.width,a.view.height],f=!1,g=(e,t)=>{var o,l,u=function(e){return[(e.clientX-h[0])/n,(e.clientY-h[1])/n]}(e);f||(f=u[0]**2+u[1]**2>=9),f&&("move"===r?null===(o=t?d:i)||void 0===o||o({type:a.type,id:a.id,x:v[0]+u[0],y:v[1]+u[1]}):null===(l=t?c:s)||void 0===l||l({type:a.type,id:a.id,width:v[0]+u[0],height:v[1]+u[1]}))},m=e=>{g(e)},p=e=>{g(e,!0),f=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",p)};document.addEventListener("mousemove",m),document.addEventListener("mouseup",p)}}function x(e){var{cell:t,transform:r,readOnly:o,onCellResizing:i,onCellResized:l,onSwitchActiveTarget:d}=e,s=n().useRef(null);return(0,a.useEffect)((()=>{var e=s.current;if(e&&!o){var a=e=>{y(e,{action:"resize",cell:t,scale:r.k,onCellResizing:i,onCellResized:l,onSwitchActiveTarget:d})};return e.addEventListener("mousedown",a),()=>{e.removeEventListener("mousedown",a)}}}),[t,l,i,d,o,r.k]),n().createElement("g",{className:"decorator-area"},n().createElement("rect",{width:t.view.width,height:t.view.height,className:"area"}),!o&&n().createElement("g",{ref:s,className:"resize-handle",transform:"translate(".concat(t.view.width-20," ").concat(t.view.height-20,")")},n().createElement("rect",{width:20,height:20}),n().createElement("path",{d:"M10 18L18 10 M15 18L18 15"})))}var k=r(9740);function b(e){var t,{cell:r,readOnly:o,onDecoratorTextEditing:l,onDecoratorTextChange:d}=e,s=null!==(t=r.view.text)&&void 0!==t?t:"",[c,u]=(0,a.useState)(s),[h,v]=(0,a.useState)(!1),f=(0,a.useRef)(!1),[g,m]=(0,a.useState)(!1),p=(0,a.useRef)(null),w=(0,a.useCallback)((e=>{o||(e.preventDefault(),e.stopPropagation(),v(!0))}),[o]);(0,a.useEffect)((()=>{var e=p.current;e&&e.textContent!==c&&(e.textContent=c)}),[c]),(0,a.useEffect)((()=>{h&&p.current&&(p.current.focus(),function(e){var t=document.createRange();t.selectNodeContents(e);var r=window.getSelection();r.removeAllRanges(),r.addRange(t)}(p.current)),null==l||l({id:r.id,editing:h})}),[r.id,h,l]),(0,a.useEffect)((()=>{f.current?null==l||l({id:r.id,editing:h}):f.current=!0}),[r.id,h,l]);var y=(0,a.useCallback)((e=>{o||u(e.target.textContent)}),[o]),x=(0,a.useCallback)((()=>{o||(v(!1),m(!0))}),[o]);return(0,a.useEffect)((()=>{g&&(null==d||d({id:r.id,view:(0,k.A)((0,k.A)({},r.view),{},{text:c})}),m(!1))}),[r,c,d,g]),n().createElement("foreignObject",{className:"decorator-text"},n().createElement("div",{className:i()("text-container",{editing:h}),onDoubleClick:w},n().createElement("div",{className:"text",contentEditable:h,ref:p,onInput:y,onBlur:x})))}function C(e){var t,{cell:r,transform:a,readOnly:o,onCellResizing:i,onCellResized:l,onSwitchActiveTarget:d,onDecoratorTextEditing:s,onDecoratorTextChange:c}=e;switch(r.decorator){case"area":t=x;break;case"text":t=b;break;default:return console.error("Unknown decorator: ".concat(r.decorator)),null}return n().createElement(t,{cell:r,transform:a,readOnly:o,onCellResizing:i,onCellResized:l,onSwitchActiveTarget:d,onDecoratorTextEditing:s,onDecoratorTextChange:c})}var E=r(8185);function z(e){var{layout:t,cell:r,cells:o,degraded:d,degradedNodeLabel:s,defaultNodeBricks:c,lineConfMap:h,active:v,readOnly:f,transform:g,unrelatedCells:m,onCellMoving:x,onCellMoved:k,onCellResizing:b,onCellResized:z,onSwitchActiveTarget:A,onCellContextMenu:M,onCellClick:N,onDecoratorTextEditing:R,onDecoratorTextChange:S,onNodeBrickResize:W,onCellMouseEnter:L,onCellMouseLeave:T}=e,D=(0,a.useRef)(null),B=(0,a.useMemo)((()=>m.some((e=>(0,E.c)(e,r)))),[r,m]);(0,a.useEffect)((()=>{var e=D.current;if(e){var a=e=>{f?e.stopPropagation():y(e,{layout:t,action:"move",cell:r,scale:g.k,onCellMoving:x,onCellMoved:k,onSwitchActiveTarget:A})};return e.addEventListener("mousedown",a),()=>{e.removeEventListener("mousedown",a)}}}),[t,r,k,x,A,f,g.k]);var V=(0,a.useCallback)((e=>{f&&"decorator"===r.type||(e.preventDefault(),A(w(r)),M({cell:r,clientX:e.clientX,clientY:e.clientY}))}),[r,M,A,f]),H=(0,a.useCallback)((e=>{N&&"decorator"!==r.type&&N({cell:r,clientX:e.clientX,clientY:e.clientY})}),[r,N]),P=(0,a.useCallback)((()=>{null==L||L(r)}),[r,L]),O=(0,a.useCallback)((()=>{null==T||T(r)}),[r,T]);return n().createElement("g",{className:i()("cell",{active:v,faded:B,"read-only":f}),ref:D,transform:"edge"===r.type||null==r.view.x?void 0:"translate(".concat(r.view.x," ").concat(r.view.y,")"),onContextMenu:V,onClick:H,onMouseEnter:P,onMouseLeave:O},(0,l.N)(r)?n().createElement(p,{node:r,degraded:d,degradedNodeLabel:s,defaultNodeBricks:c,onResize:W}):(0,l.WW)(r)?n().createElement(u,{edge:r,cells:o,lineConfMap:h}):(0,l.mH)(r)?n().createElement(C,{cell:r,transform:g,readOnly:f,onCellResizing:b,onCellResized:z,onSwitchActiveTarget:A,onDecoratorTextEditing:R,onDecoratorTextChange:S}):null)}},3033:(e,t,r)=>{r.d(t,{Be:()=>m,CV:()=>a,HP:()=>o,Ie:()=>v,N8:()=>l,Ub:()=>g,VO:()=>h,XV:()=>f,Yt:()=>c,mF:()=>u,pC:()=>p,sS:()=>s,sz:()=>i,w1:()=>d,xc:()=>n});var a=Symbol.for("size-initialized"),n=Symbol.for("layout-initialized"),o=20,i=36,l=100,d=60,s=.5,c=2,u="gray",h=1,v=15,f=!1,g=!0,m=1,p=500},531:(e,t,r)=>{function a(e){return"node"===e.type}function n(e){return"decorator"===e.type}function o(e){return"node"===e.type}function i(e){return"edge"===e.type}function l(e){return"node"===e.type||"edge"===e.type}r.d(t,{N:()=>a,WW:()=>i,mH:()=>n,nv:()=>l,vC:()=>o})},227:(e,t,r)=>{r.d(t,{Y:()=>n});var a=r(8185);function n(e,t,r){var n=[];if(t){var o=new Set;for(var i of e)"edge"===i.type&&i.source===t.source.id&&o.add(i.target);for(var l of e)"node"===l.type?o.has(l.id)&&n.push(l):n.push(l)}else switch(null==r?void 0:r.type){case"node":var d=new Map,s=new Set([r.id]);for(var c of e)"node"===c.type?d.set(c.id,c):"edge"===c.type?c.source===r.id?s.add(c.target):c.target===r.id?s.add(c.source):n.push(c):n.push(c);for(var[u,h]of d)s.has(u)||n.push(h);break;case"edge":for(var v of e)("edge"===v.type?(0,a.c)(v,r):"node"===v.type&&(v.id===r.source||v.id===r.target))||n.push(v)}return n}},3783:(e,t,r)=>{r.d(t,{C:()=>o});var a=r(9740),n=r(531);function o(e,t){var{defaultNodeSize:r}=t;return(null!=e?e:[]).map((e=>{var t,o;return!(0,n.vC)(e)||void 0!==(null===(t=e.view)||void 0===t?void 0:t.width)&&void 0!==(null===(o=e.view)||void 0===o?void 0:o.height)?e:(0,a.A)((0,a.A)({},e),{},{view:(0,a.A)({width:r[0],height:r[1]},e.view)})}))}},8185:(e,t,r)=>{function a(e,t){return e?!!t&&e.type===t.type&&("node"===e.type||"decorator"===e.type?e.id===t.id:e.source===t.source&&e.target===t.target):!t}r.d(t,{c:()=>a})},908:(e,t,r)=>{r.d(t,{r:()=>n});var a=r(531);function n(e,t){var{canvasWidth:r,canvasHeight:n,scaleRange:o}=t,i=1/0,l=1/0,d=-1/0,s=-1/0,c=!0;for(var u of e)if(!(0,a.WW)(u)){c=!1;var{view:h}=u,v=h.x+h.width,f=h.y+h.height;h.x<i&&(i=h.x),v>d&&(d=v),h.y<l&&(l=h.y),f>s&&(s=f)}var g=d-i,m=s-l,p=o&&!c&&(g>r||m>n)?Math.max(Math.min(r/g,n/m,o[1]),o[0]):1;return{x:c?0:(r-g*p)/2-i*p,y:c?0:(n-m*p)/2-l*p,k:p}}},2098:(e,t,r)=>{r.d(t,{L:()=>c});var a=r(1030),n=r(3033),o=r(531),i=r(3783),l=r(908),d=r(6170),s=r(9127);function c(e){var{cells:t,layout:r,previousCells:c,defaultNodeSize:u,canvasWidth:h,canvasHeight:v,scaleRange:f,transform:g,reason:m,parent:p}=e,w="force"!==r&&"dagre"!==r,y=(0,i.C)(t,{defaultNodeSize:u}),x=[],k=!1,b=new Map,C=!1;for(var E of c)(0,o.mH)(E)?C=!0:(0,o.N)(E)&&(C=!0,E[n.CV]&&b.set(E.id,E));var z=new Map;for(var A of y)if((0,o.N)(A)){z.set(A.id,A);var M=b.get(A.id);M&&(A.view.width=M.view.width,A.view.height=M.view.height,A[n.CV]=!0)}var N=!1;if("add-related-nodes"===m&&p){var R=new Set;for(var S of y)(0,o.WW)(S)&&S.source===p&&S.target!==p&&R.add(S.target);var W=z.get(p);if(void 0!==(null==W?void 0:W.view.x)&&void 0!==W.view.y){N=!0;var L=[...R].map((e=>z.get(e))).filter(Boolean),T=void 0;for(var D of L)void 0!==D.view.x&&void 0!==D.view.y?(!T||D.view.x>T.view.x)&&D.view.y>W.view.y&&(T=D):x.push(D);if(x.length>0&&w){var B,V;if(T)B=T.view.x+T.view.width+n.sz,V=T.view.y;else{var H=x.reduce(((e,t)=>e+t.view.width+n.sz),-n.sz);B=W.view.x-H/2+W.view.width/2,V=W.view.y+W.view.height+n.sz}for(var P of x)P.view.x=B,P.view.y=V,B+=P.view.width+n.sz}}}if(!N){var O,I=u[0],Y=u[1],_=[],X=!1;for(var U of y)(0,o.N)(U)?(U.view.width>I&&(I=U.view.width),U.view.height>Y&&(Y=U.view.height),void 0===U.view.x||void 0===U.view.y?x.push(U):_.push(U)):(0,o.mH)(U)&&(X=!0);if(w)for(var j of(C||(g=(0,l.r)((0,a.without)(y,...x),{canvasWidth:h,canvasHeight:v,scaleRange:f})),0===_.length||1===_.length&&!X?(x.push(..._),({getNodeView:O}=(0,s.C)({cells:y})),k=!0):({getNodeView:O}=(0,d.k)({cells:y,fixedPosition:!0,center:[(h/2-g.x)/g.k,(v/2-g.y)/g.k]})),y))if((0,o.N)(j)){var G=O(j.id);j.view.x=G.x,j.view.y=G.y}}return{cells:y,updated:x,shouldReCenter:k}}},5748:(e,t,r)=>{r.d(t,{d:()=>d});var a=r(9740),n=r(531),o=r(3033);function i(e,t,r){var a=e.findLastIndex(r)+1;return[...e.slice(0,a),t,...e.slice(a)]}var l,d=(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":var r=e.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1;return[...e.slice(0,r),...t.payload,...e.slice(r)];case"add-edge":return i(e,t.payload,(e=>"edge"===e.type||"decorator"===e.type&&"area"===e.decorator));case"move-cell":var{type:l,id:d,x:s,y:c}=t.payload,u=e.findIndex((e=>e.type===l&&e.id===d));if(-1!==u){var h=e[u];return[...e.slice(0,u),(0,a.A)((0,a.A)({},h),{},{view:(0,a.A)((0,a.A)({},h.view),{},{x:s,y:c})}),...e.slice(u+1)]}return e;case"resize-cell":var{type:v,id:f,width:g,height:m}=t.payload,p=e.findIndex((e=>e.type===v&&e.id===f));if(-1!==p){var w=e[p];return[...e.slice(0,p),(0,a.A)((0,a.A)({},w),{},{view:(0,a.A)((0,a.A)({},w.view),{},{width:g,height:m})}),...e.slice(p+1)]}return e;case"update-cells":return t.payload;case"update-node-size":return e.map((e=>(0,n.N)(e)&&e.id===t.payload.id?(0,a.A)((0,a.A)({},e),{},{[o.CV]:!0,view:t.payload.size?(0,a.A)((0,a.A)({},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((r=>{var[a,n]=r;return[a,n(e[a],t)]}))))},7099:(e,t,r)=>{r.d(t,{Y:()=>f});var a=r(8769),n=r.n(a),o=r(2657),i=r(6768),l=r(198),d=r(8621),s=r(6263),c=r(9575);const u=e=>a.createElement("svg",(0,c.A)({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"},e),a.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"})),h=e=>a.createElement("svg",(0,c.A)({xmlns:"http://www.w3.org/2000/svg",width:128,height:128,className:"icon",viewBox:"0 0 1024 1024"},e),a.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"}),a.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"})),v=e=>a.createElement("svg",(0,c.A)({xmlns:"http://www.w3.org/2000/svg",width:128,height:128,className:"icon",viewBox:"0 0 1024 1024"},e),a.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"}),a.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 f(e){var{shadowRoot:t,scale:r,scaleRange:c,onZoomChange:f,onReCenter:g}=e,m=(0,s.useCurrentTheme)(),p=(0,a.useMemo)((()=>(0,d.VC)()),[]),w=(0,a.useRef)(null),y=100*c[0],x=100*c[1],k=100*r,b=(0,a.useMemo)((()=>({formatter:e=>"".concat(e,"%"),placement:"left",getPopupContainer:()=>w.current})),[]),C=(0,a.useCallback)((()=>{f(Math.min(k+5,x))}),[x,f,k]),E=(0,a.useCallback)((()=>{f(Math.max(k-5,y))}),[y,f,k]);return n().createElement(o.Ay,{theme:{algorithm:"dark-v2"===m?i.A.darkAlgorithm:i.A.defaultAlgorithm}},n().createElement(d.N7,{container:t,autoClear:!0,cache:p,hashPriority:"high"},n().createElement("div",{className:"zoom-bar",ref:w},n().createElement("div",{className:"center-button",onClick:g,role:"button"},n().createElement(u,null)),n().createElement("div",{className:"zoom-slider"},n().createElement("div",{className:"zoom-button",role:"button",onClick:C},n().createElement(h,null)),n().createElement(l.A,{min:y,max:x,value:k,step:5,vertical:!0,included:!1,tooltip:b,onChange:f}),n().createElement("div",{className:"zoom-button",role:"button",onClick:E},n().createElement(v,null))))))}},9127:(e,t,r)=>{r.d(t,{C:()=>u});var a=r(9740),n=r(4223),o=r(1030),i=r(7586),l=r.n(i),d=r(8802),s=r(531),c=["nodePadding"];function u(e){var{cells:t,layoutOptions:r}=e,i=(0,a.A)({nodePadding:0,rankdir:"TB",ranksep:50,edgesep:10,nodesep:50},(0,o.pick)(r,["nodePadding","rankdir","ranksep","edgesep","nodesep","align"])),{nodePadding:u}=i,h=(0,n.A)(i,c),v=(0,d.D)(u);if(!t.some(s.N))return{getNodeView:()=>null,nodePaddings:v};var f=new(l().graphlib.Graph);for(var g of(f.setGraph(h),f.setDefaultEdgeLabel((function(){return{}})),t))(0,s.N)(g)?f.setNode(g.id,{id:g.id,width:g.view.width+v[1]+v[3],height:g.view.height+v[0]+v[2]}):(0,s.WW)(g)&&f.setEdge(g.source,g.target);return l().layout(f),{getNodeView:e=>f.node(e),nodePaddings:v}}},6170:(e,t,r)=>{r.d(t,{k:()=>v});var a=r(9740),n=r(1030),o=r(6149),i=r(4842),l=r(1945),d=r(9418),s=r(3854),c=r(7931),u=r(531),h=r(8802);function v(e){var{cells:t,layoutOptions:r,center:v,fixedPosition:f}=e,{nodePadding:g,collide:m}=(0,a.A)((0,a.A)({nodePadding:0},(0,n.pick)(r,["nodePadding"])),{},{collide:!1!==(null==r?void 0:r.collide)&&(0,a.A)({radiusDiff:18,strength:1,iterations:1},!0===(null==r?void 0:r.collide)?null:null==r?void 0:r.collide)}),p=(0,h.D)(g),w=[],y=[],x=new Map;for(var k of t)if((0,u.N)(k)){var b=(0,a.A)({id:k.id,width:k.view.width+p[1]+p[3],height:k.view.height+p[0]+p[2]},f?{fx:k.view.x,fy:k.view.y}:null);w.push(b),x.set(b.id,b)}else(0,u.WW)(k)&&y.push({source:k.source,target:k.target});var C=(0,o.A)(y).id((e=>e.id)),E=(0,i.A)(w).force("link",C).force("x",(0,l.A)(null==v?void 0:v[0])).force("y",(0,d.A)(null==v?void 0:v[1])).force("charge",(0,s.A)());return m&&E.force("collide",(0,c.A)().radius((e=>Math.sqrt(e.width**2+e.height**2)/2+m.radiusDiff)).strength(m.strength).iterations(m.iterations)),E.stop(),function(e){e.tick(Math.ceil(Math.log(e.alphaMin())/Math.log(1-e.alphaDecay())))}(E),{getNodeView:e=>x.get(e),nodePaddings:p}}},1819:(e,t,r)=>{r.d(t,{J:()=>o});var a=r(8769),n=r(8185);function o(e){var{cellsRef:t,activeTarget:r,onActiveTargetChange:o}=e,i=null!=r?r:null,[l,d]=(0,a.useState)(i);(0,a.useEffect)((()=>{d((e=>(0,n.c)(e,i)?e:i))}),[i]);var s=(0,a.useRef)(!1);return(0,a.useEffect)((()=>{s.current?o(l):s.current=!0}),[l,o]),(0,a.useEffect)((()=>{if(l){var e=e=>{e.composedPath().indexOf(t.current)<=0&&d(null)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}}),[l,t]),l}},1484:(e,t,r)=>{r.d(t,{g:()=>f});var a=r(9740),n=r(8769),o=r(7566),i=r(1517),l=r(3033),d=r(531),s=r(908),c=r(6170),u=r(9127),h=new Map([["center",.5],["left",0],["right",1],["top",0],["bottom",1]]);function v(e,t){if("string"==typeof e){var r=h.get(e);if(void 0!==r)return r;var a=e.match(/^(-?\d+(?:\.\d+)?)%$/);if(a)return Number(a[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){var{layout:t,layoutOptions:r,rootRef:h,cells:f,zoomable:g,zoomer:m,scaleRange:p,layoutKey:w,dispatch:y}=e,[x,k]=(0,n.useState)("force"!==t&&"dagre"!==t),b=(0,n.useRef)(w),C=(0,n.useCallback)((()=>++b.current),[]),[E,z]=function(e){var{rootRef:t,cells:r,layoutInitialized:a,zoomable:c,zoomer:u,scaleRange:h}=e,[v,f]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{var e=t.current;if(e&&a&&!v&&r.some((e=>(0,d.N)(e)||(0,d.mH)(e)))&&!r.some((e=>(0,d.N)(e)&&!e[l.CV]))){var{k:n,x:g,y:m}=(0,s.r)(r,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:c?h:void 0});u.transform((0,o.A)(e),new i.uV(n,g,m)),f(!0)}}),[r,v,a,t,h,c,u]),(0,n.useEffect)((()=>{r.some((e=>(0,d.N)(e)||(0,d.mH)(e)))||f(!1)}),[r]),[v,f]}({rootRef:h,layoutInitialized:x,cells:f,zoomable:g,zoomer:m,scaleRange:p}),A=(0,n.useRef)(null);return(0,n.useEffect)((()=>{if(!f.some((e=>(0,d.N)(e)&&!e[l.CV])))if("force"===t||"dagre"===t){if(b.current===w&&(e=A.current,n=f.filter(d.nv),(null==e?void 0:e.length)!==n.length||!e.every(((e,t)=>e===n[t])))){var e,n,o,i;({getNodeView:o,nodePaddings:i}="force"===t?(0,c.k)({cells:f,layoutOptions:r}):(0,u.C)({cells:f,layoutOptions:r}));var s=function(e){var t=null!=e?e:[.5,.5];return[v(t[0],"x"),v(t[1],"y")]}(null==r?void 0:r.alignOrigin),h=f.map((e=>{if((0,d.N)(e)){var t=o(e.id);return(0,a.A)((0,a.A)({},e),{},{view:(0,a.A)((0,a.A)({},e.view),{},{x:t.x-t.width*s[0]+i[3],y:t.y-t.height*s[1]+i[0]}),[l.xc]:!0})}return e}));A.current=h.filter(d.nv),y({type:"update-cells",payload:h}),z(!1),k(!0)}}else k(!0)}),[f,y,t,w,r,z]),{centered:E,setCentered:z,getNextLayoutKey:C}}},7531:(e,t,r)=>{r.d(t,{d:()=>s});var a=r(9740),n=r(8769),o=r(5530),i=r(1030),l=r(531),d=r(3033);function s(e){var{cells:t,defaultEdgeLines:r,markerPrefix:s}=e;return(0,n.useMemo)((()=>{var e=[{strokeColor:d.mF}],n=new WeakMap,c=function(t){if((0,l.WW)(t)){var c,u=null!==(c=o.__secret_internals.legacyDoTransform({edge:t},null==r?void 0:r.find((e=>(0,o.checkIfByTransform)(e,{edge:t})))))&&void 0!==c?c:{},h=(0,a.A)({dashed:!1,strokeColor:d.mF,strokeWidth:d.VO,interactStrokeWidth:d.Ie,showStartArrow:d.XV,showEndArrow:d.Ub,animate:{useAnimate:!1,duration:d.Be}},(0,i.omitBy)(u,i.isUndefined));void 0===h.parallelGap&&(h.parallelGap=h.interactStrokeWidth);var v=function(e,t){var r=(0,i.findIndex)(t,e);return-1===r&&(r=t.push(e)-1),r}({strokeColor:h.strokeColor},e);h.markerArrow="url(#".concat(s).concat(v,")"),n.set(t,h)}};for(var u of t)c(u);return[n,e]}),[t,r,s])}},8197:(e,t,r)=>{r.d(t,{H:()=>i});var a=r(8769),n=r(531),o=r(3033);function i(e){var{cells:t,layout:r,centered:i}=e;return(0,a.useMemo)((()=>i&&t.every((e=>!(0,n.N)(e)||e[o.CV]&&("force"!==r&&"dagre"!==r||e[o.xc])))),[t,i,r])}},8091:(e,t,r)=>{r.d(t,{f:()=>l});var a=r(8769),n=r(7566),o=r(1517),i=r(3033);function l(e){var{rootRef:t,zoomable:r,scrollable:l,pannable:d,draggable:s,scaleRange:c,onSwitchActiveTarget:u}=e,[h,v]=(0,a.useState)(!1),[f,g]=(0,a.useState)({k:1,x:0,y:0}),m=(0,a.useMemo)((()=>null!=c?c:[i.sS,i.Yt]),[c]),p=(0,a.useMemo)((()=>(0,o.s_)()),[]);return(0,a.useEffect)((()=>{var e=!1;p.scaleExtent(r?m:[1,1]).on("start",(()=>{e=!1,v(!0)})).on("zoom",(t=>{e=!0,g(t.transform)})).on("end",(()=>{v(!1),e||null==u||u(null)}))}),[u,m,r,p]),(0,a.useEffect)((()=>{var e=t.current;if(e){var a=(0,n.A)(e),o=()=>{a.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(r||l||d)return(r||l)&&a.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),l&&(e.preventDefault(),p.translateBy(a,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),a.call(p).on("wheel",(e=>e.preventDefault())).on("dblclick.zoom",null),s&&d||a.on("mousedown.zoom",null),d||a.on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),o;o()}}),[s,d,t,l,r,p]),{grabbing:h,transform:f,zoomer:p,scaleRange:m}}},8618:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(6758),n=r.n(a),o=r(935),i=r.n(o)()(n());i.push([e.id,'.zoom-bar{position:absolute;bottom:20px;right:20px;width:40px}.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=i.toString()},3012:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(6758),n=r.n(a),o=r(935),i=r.n(o)()(n());i.push([e.id,"*{box-sizing:border-box}:host{display:block;position:relative;overflow:hidden;--animation-dasharray:48;--stroke-dashoffset:96;--dasharray:4}:host,\n.root{width:100%;height:100%}:host([hidden]){display:none}.root{opacity:0}.root.ready{opacity:1}.root:focus{outline:none}@keyframes dashedAnimation{0%{stroke-dashoffset:var(--stroke-dashoffset)}to{stroke-dashoffset:0}}@keyframes solidAnimation{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}.decorator-area .area{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 .line-active-bg{stroke:var(--palette-blue-5);stroke-dasharray:var(--dasharray);stroke-width:1}.cell:not(.read-only){-webkit-user-select:none;-moz-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{opacity:1}.connect-line{pointer-events:none}.connect-line:not(.connecting){display:none}.line.dashed{stroke-dasharray:var(--dasharray)}.cell.active .decorator-text .text-container{outline:1px dashed var(--palette-blue-5)}.decorator-text .text-container{width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:0.5em}.decorator-text .text:focus{outline:none}.cell.faded{opacity:0.3}.cell .node{pointer-events:none}.cell .node > *{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)}",""]);const l=i.toString()}}]);
|
|
2
|
-
//# sourceMappingURL=5030.
|
|
1
|
+
"use strict";(self.webpackChunk_next_bricks_diagram=self.webpackChunk_next_bricks_diagram||[]).push([[5030],{3739:(e,t,r)=>{r.d(t,{c:()=>o});var a=r(8769),n=r.n(a);function o(e){var t,{id:r,type:a,strokeColor:o}=e;switch(a){case"0..1":t=l;break;case"0..N":t=d;break;default:t=i}return n().createElement(t,{id:r,strokeColor:o})}function i(e){var{id:t,strokeColor:r}=e;return n().createElement("marker",{id:t,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 l(e){var{id:t,strokeColor:r}=e;return n().createElement("marker",{id:t,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 d(e){var{id:t,strokeColor:r}=e;return n().createElement("marker",{id:t,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"}))}},3188:(e,t,r)=>{r.d(t,{h:()=>n});var a=r(733);function n(e,t,r){if(e===t||(0,a.w)(e,t,0,0))return null;var n,i,l=0,d=0;if(r){var s=t.x-e.x,c=t.y-e.y,u=Math.atan2(c,s);l=r/2*Math.cos(u+Math.PI/2),d=r/2*Math.sin(u+Math.PI/2)}var h=[[e.x+l,e.y+d],[t.x+l,t.y+d]],v=o(e,h),f=o(t,h);return n=v.length>0?v[0]:[e.x,e.y],i=f.length>0?f[0]:[t.x,t.y],[{x:n[0],y:n[1]},{x:i[0],y:i[1]}]}function o(e,t){for(var r=[[e.x-e.width/2,e.y-e.height/2],[e.x+e.width/2,e.y-e.height/2],[e.x+e.width/2,e.y+e.height/2],[e.x-e.width/2,e.y+e.height/2]],a=[],n=0;n<4;n++)a.push([r[n],r[(n+1)%4]]);var o=[];for(var l of a){var d=i(t[0],t[1],l[0],l[1]);d&&o.push(d)}return o}function i(e,t,r,a){var[n,o]=e,[i,l]=t,[d,s]=r,[c,u]=a;if(n===i&&o===l||d===c&&s===u)return null;var h=(u-s)*(i-n)-(c-d)*(l-o);if(0===h)return null;var v=((c-d)*(o-s)-(u-s)*(n-d))/h,f=((i-n)*(o-s)-(l-o)*(n-d))/h;return v<0||v>1||f<0||f>1?null:[n+v*(i-n),o+v*(l-o)]}},733:(e,t,r)=>{function a(e,t,r,a){var o=r?n(e,r):e,i=a?n(t,a):t,l=Math.min(o.x-o.width/2,i.x-i.width/2),d=Math.max(o.x+o.width/2,i.x+i.width/2),s=Math.min(o.y-o.height/2,i.y-i.height/2),c=Math.max(o.y+o.height/2,i.y+i.height/2);return d-l<o.width+i.width&&c-s<o.height+i.height}function n(e,t){return{x:e.x-e.width/2-t,y:e.y-e.height/2-t,width:e.width+2*t,height:e.height+2*t}}r.d(t,{w:()=>a})},8802:(e,t,r)=>{function a(e){if(Array.isArray(e)){var t=e[0],r=e.length>1?e[1]:t;return[t,r,e.length>2?e[2]:t,e.length>3?e[3]:r]}return new Array(4).fill(e)}r.d(t,{D:()=>a})},2830:(e,t,r)=>{r.d(t,{m:()=>z});var a=r(8769),n=r.n(a),o=r(3373),i=r.n(o),l=r(531),d=r(3188);function s(e,t){return e.find((e=>(0,l.N)(e)&&e.id===t))}var c=r(3033);function u(e){var t,r,o,{edge:u,cells:v,lineConfMap:f}=e,g=(0,a.useRef)(null),m=(0,a.useMemo)((()=>s(v,u.source)),[v,u.source]),p=(0,a.useMemo)((()=>s(v,u.target)),[v,u.target]),w=(0,a.useMemo)((()=>f.get(u)),[u,f]),y=(0,a.useMemo)((()=>v.some((e=>(0,l.WW)(e)&&e.source===u.target&&e.target===u.source))?w.parallelGap:0),[v,u,w.parallelGap]),x=(0,a.useMemo)((()=>m&&p&&null!=m.view.x&&null!=p.view.x?(0,d.h)(h(m.view,5),h(p.view,5),y):null),[y,m,p]);if(!x)return null;var k="M".concat(x[0].x," ").concat(x[0].y,"L").concat(x[1].x," ").concat(x[1].y);return n().createElement(n().Fragment,null,n().createElement("path",{d:k,fill:"none",stroke:"transparent",strokeWidth:w.interactStrokeWidth}),n().createElement("path",{ref:g,className:i()("line",{dashed:w.dashed,["".concat(w.dashed?"dashed":"solid","-animation")]:w.animate.useAnimate}),style:{"--time":"".concat(null!==(t=w.animate.duration)&&void 0!==t?t:c.Be,"s"),"--solid-length":null===(r=g.current)||void 0===r||null===(o=r.getTotalLength)||void 0===o?void 0:o.call(r)},d:k,fill:"none",stroke:w.strokeColor,strokeWidth:w.strokeWidth,markerStart:w.showStartArrow?w.markerArrow:"",markerEnd:w.showEndArrow?w.markerArrow:""}),n().createElement("path",{className:"line-active-bg",d:k,fill:"none"}))}function h(e,t){return{x:e.x+e.width/2,y:e.y+e.height/2,width:e.width+t,height:e.height+t}}var v=r(9981),f=r(2090),g=r(1030),m=r(9126);function p(e){var{node:t,degraded:r,degradedNodeLabel:o,defaultNodeBricks:i,onResize:l}=e,d=function(e){var[t,r]=(0,a.useState)(e);return(0,a.useEffect)((()=>{r((t=>(0,g.isEqual)(t,e)?t:e))}),[e]),t}({node:{id:t.id,data:t.data}}),s=t.useBrick,c=(0,a.useRef)(null),u=(0,a.useMemo)((()=>{var e;return r?null:null!=s?s:null==i||null===(e=i.find((e=>(0,f.checkIfByTransform)(e,d))))||void 0===e?void 0:e.useBrick}),[r,s,i,d]),h=(0,a.useMemo)((()=>r?String(f.__secret_internals.legacyDoTransform(d,null!=o?o:"<% DATA.node.id %>")):""),[r,o,d]),p=(0,a.useCallback)((e=>{var r=c.current;r&&(r.disconnect(),c.current=null),e?setTimeout((()=>{var r=new m.A((()=>{l(t.id,[e.offsetWidth,e.offsetHeight])}));r.observe(e),c.current=r})):l(t.id,null)}),[t.id,l]),w=(0,a.useCallback)((e=>{if(e){var r=e.getBBox();l(t.id,[r.width,r.height])}else l(t.id,null)}),[t.id,l]);return u?n().createElement("foreignObject",{width:9999,height:9999,className:"node"},u&&n().createElement(v.ReactUseBrick,{useBrick:u,data:d,refCallback:p})):r?n().createElement("g",{className:"degraded",ref:w},n().createElement("circle",{cx:8,cy:8,r:8}),n().createElement("text",{x:8,y:32},h)):null}function w(e){return"edge"===e.type?(0,g.pick)(e,["type","source","target","data"]):(0,g.pick)(e,["type","id","data"])}function y(e,t){var{action:r,cell:a,scale:n,layout:o,onCellMoving:i,onCellMoved:d,onCellResizing:s,onCellResized:c,onSwitchActiveTarget:u}=t;if(e.stopPropagation(),null==u||u(w(a)),!(0,l.WW)(a)&&("force"!==o&&"dagre"!==o||!(0,l.N)(a))){var h=[e.clientX,e.clientY],v="move"===r?[a.view.x,a.view.y]:[a.view.width,a.view.height],f=!1,g=(e,t)=>{var o,l,u=function(e){return[(e.clientX-h[0])/n,(e.clientY-h[1])/n]}(e);f||(f=u[0]**2+u[1]**2>=9),f&&("move"===r?null===(o=t?d:i)||void 0===o||o({type:a.type,id:a.id,x:v[0]+u[0],y:v[1]+u[1]}):null===(l=t?c:s)||void 0===l||l({type:a.type,id:a.id,width:v[0]+u[0],height:v[1]+u[1]}))},m=e=>{g(e)},p=e=>{g(e,!0),f=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",p)};document.addEventListener("mousemove",m),document.addEventListener("mouseup",p)}}function x(e){var{cell:t,transform:r,readOnly:o,onCellResizing:i,onCellResized:l,onSwitchActiveTarget:d}=e,s=n().useRef(null);return(0,a.useEffect)((()=>{var e=s.current;if(e&&!o){var a=e=>{y(e,{action:"resize",cell:t,scale:r.k,onCellResizing:i,onCellResized:l,onSwitchActiveTarget:d})};return e.addEventListener("mousedown",a),()=>{e.removeEventListener("mousedown",a)}}}),[t,l,i,d,o,r.k]),n().createElement("g",{className:"decorator-area"},n().createElement("rect",{width:t.view.width,height:t.view.height,className:"area"}),!o&&n().createElement("g",{ref:s,className:"resize-handle",transform:"translate(".concat(t.view.width-20," ").concat(t.view.height-20,")")},n().createElement("rect",{width:20,height:20}),n().createElement("path",{d:"M10 18L18 10 M15 18L18 15"})))}var k=r(9740);function b(e){var t,{cell:r,readOnly:o,onDecoratorTextEditing:l,onDecoratorTextChange:d}=e,s=null!==(t=r.view.text)&&void 0!==t?t:"",[c,u]=(0,a.useState)(s),[h,v]=(0,a.useState)(!1),f=(0,a.useRef)(!1),[g,m]=(0,a.useState)(!1),p=(0,a.useRef)(null),w=(0,a.useCallback)((e=>{o||(e.preventDefault(),e.stopPropagation(),v(!0))}),[o]);(0,a.useEffect)((()=>{var e=p.current;e&&e.textContent!==c&&(e.textContent=c)}),[c]),(0,a.useEffect)((()=>{h&&p.current&&(p.current.focus(),function(e){var t=document.createRange();t.selectNodeContents(e);var r=window.getSelection();r.removeAllRanges(),r.addRange(t)}(p.current)),null==l||l({id:r.id,editing:h})}),[r.id,h,l]),(0,a.useEffect)((()=>{f.current?null==l||l({id:r.id,editing:h}):f.current=!0}),[r.id,h,l]);var y=(0,a.useCallback)((e=>{o||u(e.target.textContent)}),[o]),x=(0,a.useCallback)((()=>{o||(v(!1),m(!0))}),[o]);return(0,a.useEffect)((()=>{g&&(null==d||d({id:r.id,view:(0,k.A)((0,k.A)({},r.view),{},{text:c})}),m(!1))}),[r,c,d,g]),n().createElement("foreignObject",{className:"decorator-text"},n().createElement("div",{className:i()("text-container",{editing:h}),onDoubleClick:w},n().createElement("div",{className:"text",contentEditable:h,ref:p,onInput:y,onBlur:x})))}function C(e){var t,{cell:r,transform:a,readOnly:o,onCellResizing:i,onCellResized:l,onSwitchActiveTarget:d,onDecoratorTextEditing:s,onDecoratorTextChange:c}=e;switch(r.decorator){case"area":t=x;break;case"text":t=b;break;default:return console.error("Unknown decorator: ".concat(r.decorator)),null}return n().createElement(t,{cell:r,transform:a,readOnly:o,onCellResizing:i,onCellResized:l,onSwitchActiveTarget:d,onDecoratorTextEditing:s,onDecoratorTextChange:c})}var E=r(8185);function z(e){var{layout:t,cell:r,cells:o,degraded:d,degradedNodeLabel:s,defaultNodeBricks:c,lineConfMap:h,active:v,readOnly:f,transform:g,unrelatedCells:m,onCellMoving:x,onCellMoved:k,onCellResizing:b,onCellResized:z,onSwitchActiveTarget:A,onCellContextMenu:M,onCellClick:N,onDecoratorTextEditing:R,onDecoratorTextChange:S,onNodeBrickResize:W,onCellMouseEnter:L,onCellMouseLeave:T}=e,D=(0,a.useRef)(null),B=(0,a.useMemo)((()=>m.some((e=>(0,E.c)(e,r)))),[r,m]);(0,a.useEffect)((()=>{var e=D.current;if(e){var a=e=>{f?e.stopPropagation():y(e,{layout:t,action:"move",cell:r,scale:g.k,onCellMoving:x,onCellMoved:k,onSwitchActiveTarget:A})};return e.addEventListener("mousedown",a),()=>{e.removeEventListener("mousedown",a)}}}),[t,r,k,x,A,f,g.k]);var V=(0,a.useCallback)((e=>{f&&"decorator"===r.type||(e.preventDefault(),A(w(r)),M({cell:r,clientX:e.clientX,clientY:e.clientY}))}),[r,M,A,f]),H=(0,a.useCallback)((e=>{N&&"decorator"!==r.type&&N({cell:r,clientX:e.clientX,clientY:e.clientY})}),[r,N]),P=(0,a.useCallback)((()=>{null==L||L(r)}),[r,L]),O=(0,a.useCallback)((()=>{null==T||T(r)}),[r,T]);return n().createElement("g",{className:i()("cell",{active:v,faded:B,"read-only":f}),ref:D,transform:"edge"===r.type||null==r.view.x?void 0:"translate(".concat(r.view.x," ").concat(r.view.y,")"),onContextMenu:V,onClick:H,onMouseEnter:P,onMouseLeave:O},(0,l.N)(r)?n().createElement(p,{node:r,degraded:d,degradedNodeLabel:s,defaultNodeBricks:c,onResize:W}):(0,l.WW)(r)?n().createElement(u,{edge:r,cells:o,lineConfMap:h}):(0,l.mH)(r)?n().createElement(C,{cell:r,transform:g,readOnly:f,onCellResizing:b,onCellResized:z,onSwitchActiveTarget:A,onDecoratorTextEditing:R,onDecoratorTextChange:S}):null)}},3033:(e,t,r)=>{r.d(t,{Be:()=>m,CV:()=>a,HP:()=>o,Ie:()=>v,N8:()=>l,Ub:()=>g,VO:()=>h,XV:()=>f,Yt:()=>c,mF:()=>u,pC:()=>p,sS:()=>s,sz:()=>i,w1:()=>d,xc:()=>n});var a=Symbol.for("size-initialized"),n=Symbol.for("layout-initialized"),o=20,i=36,l=100,d=60,s=.5,c=2,u="gray",h=1,v=15,f=!1,g=!0,m=1,p=500},531:(e,t,r)=>{function a(e){return"node"===e.type}function n(e){return"decorator"===e.type}function o(e){return"node"===e.type}function i(e){return"edge"===e.type}function l(e){return"node"===e.type||"edge"===e.type}r.d(t,{N:()=>a,WW:()=>i,mH:()=>n,nv:()=>l,vC:()=>o})},227:(e,t,r)=>{r.d(t,{Y:()=>n});var a=r(8185);function n(e,t,r){var n=[];if(t){var o=new Set;for(var i of e)"edge"===i.type&&i.source===t.source.id&&o.add(i.target);for(var l of e)"node"===l.type?o.has(l.id)&&n.push(l):n.push(l)}else switch(null==r?void 0:r.type){case"node":var d=new Map,s=new Set([r.id]);for(var c of e)"node"===c.type?d.set(c.id,c):"edge"===c.type?c.source===r.id?s.add(c.target):c.target===r.id?s.add(c.source):n.push(c):n.push(c);for(var[u,h]of d)s.has(u)||n.push(h);break;case"edge":for(var v of e)("edge"===v.type?(0,a.c)(v,r):"node"===v.type&&(v.id===r.source||v.id===r.target))||n.push(v)}return n}},3783:(e,t,r)=>{r.d(t,{C:()=>o});var a=r(9740),n=r(531);function o(e,t){var{defaultNodeSize:r}=t;return(null!=e?e:[]).map((e=>{var t,o;return!(0,n.vC)(e)||void 0!==(null===(t=e.view)||void 0===t?void 0:t.width)&&void 0!==(null===(o=e.view)||void 0===o?void 0:o.height)?e:(0,a.A)((0,a.A)({},e),{},{view:(0,a.A)({width:r[0],height:r[1]},e.view)})}))}},8185:(e,t,r)=>{function a(e,t){return e?!!t&&e.type===t.type&&("node"===e.type||"decorator"===e.type?e.id===t.id:e.source===t.source&&e.target===t.target):!t}r.d(t,{c:()=>a})},908:(e,t,r)=>{r.d(t,{r:()=>n});var a=r(531);function n(e,t){var{canvasWidth:r,canvasHeight:n,scaleRange:o}=t,i=1/0,l=1/0,d=-1/0,s=-1/0,c=!0;for(var u of e)if(!(0,a.WW)(u)){c=!1;var{view:h}=u,v=h.x+h.width,f=h.y+h.height;h.x<i&&(i=h.x),v>d&&(d=v),h.y<l&&(l=h.y),f>s&&(s=f)}var g=d-i,m=s-l,p=o&&!c&&(g>r||m>n)?Math.max(Math.min(r/g,n/m,o[1]),o[0]):1;return{x:c?0:(r-g*p)/2-i*p,y:c?0:(n-m*p)/2-l*p,k:p}}},2098:(e,t,r)=>{r.d(t,{L:()=>c});var a=r(1030),n=r(3033),o=r(531),i=r(3783),l=r(908),d=r(6170),s=r(9127);function c(e){var{cells:t,layout:r,previousCells:c,defaultNodeSize:u,canvasWidth:h,canvasHeight:v,scaleRange:f,transform:g,reason:m,parent:p}=e,w="force"!==r&&"dagre"!==r,y=(0,i.C)(t,{defaultNodeSize:u}),x=[],k=!1,b=new Map,C=!1;for(var E of c)(0,o.mH)(E)?C=!0:(0,o.N)(E)&&(C=!0,E[n.CV]&&b.set(E.id,E));var z=new Map;for(var A of y)if((0,o.N)(A)){z.set(A.id,A);var M=b.get(A.id);M&&(A.view.width=M.view.width,A.view.height=M.view.height,A[n.CV]=!0)}var N=!1;if("add-related-nodes"===m&&p){var R=new Set;for(var S of y)(0,o.WW)(S)&&S.source===p&&S.target!==p&&R.add(S.target);var W=z.get(p);if(void 0!==(null==W?void 0:W.view.x)&&void 0!==W.view.y){N=!0;var L=[...R].map((e=>z.get(e))).filter(Boolean),T=void 0;for(var D of L)void 0!==D.view.x&&void 0!==D.view.y?(!T||D.view.x>T.view.x)&&D.view.y>W.view.y&&(T=D):x.push(D);if(x.length>0&&w){var B,V;if(T)B=T.view.x+T.view.width+n.sz,V=T.view.y;else{var H=x.reduce(((e,t)=>e+t.view.width+n.sz),-n.sz);B=W.view.x-H/2+W.view.width/2,V=W.view.y+W.view.height+n.sz}for(var P of x)P.view.x=B,P.view.y=V,B+=P.view.width+n.sz}}}if(!N){var O,I=u[0],Y=u[1],_=[],X=!1;for(var U of y)(0,o.N)(U)?(U.view.width>I&&(I=U.view.width),U.view.height>Y&&(Y=U.view.height),void 0===U.view.x||void 0===U.view.y?x.push(U):_.push(U)):(0,o.mH)(U)&&(X=!0);if(w)for(var j of(C||(g=(0,l.r)((0,a.without)(y,...x),{canvasWidth:h,canvasHeight:v,scaleRange:f})),0===_.length||1===_.length&&!X?(x.push(..._),({getNodeView:O}=(0,s.C)({cells:y})),k=!0):({getNodeView:O}=(0,d.k)({cells:y,fixedPosition:!0,center:[(h/2-g.x)/g.k,(v/2-g.y)/g.k]})),y))if((0,o.N)(j)){var G=O(j.id);j.view.x=G.x,j.view.y=G.y}}return{cells:y,updated:x,shouldReCenter:k}}},5748:(e,t,r)=>{r.d(t,{d:()=>d});var a=r(9740),n=r(531),o=r(3033);function i(e,t,r){var a=e.findLastIndex(r)+1;return[...e.slice(0,a),t,...e.slice(a)]}var l,d=(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":var r=e.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1;return[...e.slice(0,r),...t.payload,...e.slice(r)];case"add-edge":return i(e,t.payload,(e=>"edge"===e.type||"decorator"===e.type&&"area"===e.decorator));case"move-cell":var{type:l,id:d,x:s,y:c}=t.payload,u=e.findIndex((e=>e.type===l&&e.id===d));if(-1!==u){var h=e[u];return[...e.slice(0,u),(0,a.A)((0,a.A)({},h),{},{view:(0,a.A)((0,a.A)({},h.view),{},{x:s,y:c})}),...e.slice(u+1)]}return e;case"resize-cell":var{type:v,id:f,width:g,height:m}=t.payload,p=e.findIndex((e=>e.type===v&&e.id===f));if(-1!==p){var w=e[p];return[...e.slice(0,p),(0,a.A)((0,a.A)({},w),{},{view:(0,a.A)((0,a.A)({},w.view),{},{width:g,height:m})}),...e.slice(p+1)]}return e;case"update-cells":return t.payload;case"update-node-size":return e.map((e=>(0,n.N)(e)&&e.id===t.payload.id?(0,a.A)((0,a.A)({},e),{},{[o.CV]:!0,view:t.payload.size?(0,a.A)((0,a.A)({},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((r=>{var[a,n]=r;return[a,n(e[a],t)]}))))},7099:(e,t,r)=>{r.d(t,{Y:()=>f});var a=r(8769),n=r.n(a),o=r(2657),i=r(6768),l=r(198),d=r(8621),s=r(9981),c=r(9575);const u=e=>a.createElement("svg",(0,c.A)({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"},e),a.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"})),h=e=>a.createElement("svg",(0,c.A)({xmlns:"http://www.w3.org/2000/svg",width:128,height:128,className:"icon",viewBox:"0 0 1024 1024"},e),a.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"}),a.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"})),v=e=>a.createElement("svg",(0,c.A)({xmlns:"http://www.w3.org/2000/svg",width:128,height:128,className:"icon",viewBox:"0 0 1024 1024"},e),a.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"}),a.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 f(e){var{shadowRoot:t,scale:r,scaleRange:c,onZoomChange:f,onReCenter:g}=e,m=(0,s.useCurrentTheme)(),p=(0,a.useMemo)((()=>(0,d.VC)()),[]),w=(0,a.useRef)(null),y=100*c[0],x=100*c[1],k=100*r,b=(0,a.useMemo)((()=>({formatter:e=>"".concat(e,"%"),placement:"left",getPopupContainer:()=>w.current})),[]),C=(0,a.useCallback)((()=>{f(Math.min(k+5,x))}),[x,f,k]),E=(0,a.useCallback)((()=>{f(Math.max(k-5,y))}),[y,f,k]);return n().createElement(o.Ay,{theme:{algorithm:"dark-v2"===m?i.A.darkAlgorithm:i.A.defaultAlgorithm}},n().createElement(d.N7,{container:t,autoClear:!0,cache:p,hashPriority:"high"},n().createElement("div",{className:"zoom-bar",ref:w},n().createElement("div",{className:"center-button",onClick:g,role:"button"},n().createElement(u,null)),n().createElement("div",{className:"zoom-slider"},n().createElement("div",{className:"zoom-button",role:"button",onClick:C},n().createElement(h,null)),n().createElement(l.A,{min:y,max:x,value:k,step:5,vertical:!0,included:!1,tooltip:b,onChange:f}),n().createElement("div",{className:"zoom-button",role:"button",onClick:E},n().createElement(v,null))))))}},9127:(e,t,r)=>{r.d(t,{C:()=>u});var a=r(9740),n=r(4223),o=r(1030),i=r(7586),l=r.n(i),d=r(8802),s=r(531),c=["nodePadding"];function u(e){var{cells:t,layoutOptions:r}=e,i=(0,a.A)({nodePadding:0,rankdir:"TB",ranksep:50,edgesep:10,nodesep:50},(0,o.pick)(r,["nodePadding","rankdir","ranksep","edgesep","nodesep","align"])),{nodePadding:u}=i,h=(0,n.A)(i,c),v=(0,d.D)(u);if(!t.some(s.N))return{getNodeView:()=>null,nodePaddings:v};var f=new(l().graphlib.Graph);for(var g of(f.setGraph(h),f.setDefaultEdgeLabel((function(){return{}})),t))(0,s.N)(g)?f.setNode(g.id,{id:g.id,width:g.view.width+v[1]+v[3],height:g.view.height+v[0]+v[2]}):(0,s.WW)(g)&&f.setEdge(g.source,g.target);return l().layout(f),{getNodeView:e=>f.node(e),nodePaddings:v}}},6170:(e,t,r)=>{r.d(t,{k:()=>v});var a=r(9740),n=r(1030),o=r(6149),i=r(4842),l=r(1945),d=r(9418),s=r(3854),c=r(7931),u=r(531),h=r(8802);function v(e){var{cells:t,layoutOptions:r,center:v,fixedPosition:f}=e,{nodePadding:g,collide:m}=(0,a.A)((0,a.A)({nodePadding:0},(0,n.pick)(r,["nodePadding"])),{},{collide:!1!==(null==r?void 0:r.collide)&&(0,a.A)({radiusDiff:18,strength:1,iterations:1},!0===(null==r?void 0:r.collide)?null:null==r?void 0:r.collide)}),p=(0,h.D)(g),w=[],y=[],x=new Map;for(var k of t)if((0,u.N)(k)){var b=(0,a.A)({id:k.id,width:k.view.width+p[1]+p[3],height:k.view.height+p[0]+p[2]},f?{fx:k.view.x,fy:k.view.y}:null);w.push(b),x.set(b.id,b)}else(0,u.WW)(k)&&y.push({source:k.source,target:k.target});var C=(0,o.A)(y).id((e=>e.id)),E=(0,i.A)(w).force("link",C).force("x",(0,l.A)(null==v?void 0:v[0])).force("y",(0,d.A)(null==v?void 0:v[1])).force("charge",(0,s.A)());return m&&E.force("collide",(0,c.A)().radius((e=>Math.sqrt(e.width**2+e.height**2)/2+m.radiusDiff)).strength(m.strength).iterations(m.iterations)),E.stop(),function(e){e.tick(Math.ceil(Math.log(e.alphaMin())/Math.log(1-e.alphaDecay())))}(E),{getNodeView:e=>x.get(e),nodePaddings:p}}},1819:(e,t,r)=>{r.d(t,{J:()=>o});var a=r(8769),n=r(8185);function o(e){var{cellsRef:t,activeTarget:r,onActiveTargetChange:o}=e,i=null!=r?r:null,[l,d]=(0,a.useState)(i);(0,a.useEffect)((()=>{d((e=>(0,n.c)(e,i)?e:i))}),[i]);var s=(0,a.useRef)(!1);return(0,a.useEffect)((()=>{s.current?o(l):s.current=!0}),[l,o]),(0,a.useEffect)((()=>{if(l){var e=e=>{e.composedPath().indexOf(t.current)<=0&&d(null)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}}),[l,t]),l}},1484:(e,t,r)=>{r.d(t,{g:()=>f});var a=r(9740),n=r(8769),o=r(7566),i=r(1517),l=r(3033),d=r(531),s=r(908),c=r(6170),u=r(9127),h=new Map([["center",.5],["left",0],["right",1],["top",0],["bottom",1]]);function v(e,t){if("string"==typeof e){var r=h.get(e);if(void 0!==r)return r;var a=e.match(/^(-?\d+(?:\.\d+)?)%$/);if(a)return Number(a[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){var{layout:t,layoutOptions:r,rootRef:h,cells:f,zoomable:g,zoomer:m,scaleRange:p,layoutKey:w,dispatch:y}=e,[x,k]=(0,n.useState)("force"!==t&&"dagre"!==t),b=(0,n.useRef)(w),C=(0,n.useCallback)((()=>++b.current),[]),[E,z]=function(e){var{rootRef:t,cells:r,layoutInitialized:a,zoomable:c,zoomer:u,scaleRange:h}=e,[v,f]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{var e=t.current;if(e&&a&&!v&&r.some((e=>(0,d.N)(e)||(0,d.mH)(e)))&&!r.some((e=>(0,d.N)(e)&&!e[l.CV]))){var{k:n,x:g,y:m}=(0,s.r)(r,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:c?h:void 0});u.transform((0,o.A)(e),new i.uV(n,g,m)),f(!0)}}),[r,v,a,t,h,c,u]),(0,n.useEffect)((()=>{r.some((e=>(0,d.N)(e)||(0,d.mH)(e)))||f(!1)}),[r]),[v,f]}({rootRef:h,layoutInitialized:x,cells:f,zoomable:g,zoomer:m,scaleRange:p}),A=(0,n.useRef)(null);return(0,n.useEffect)((()=>{if(!f.some((e=>(0,d.N)(e)&&!e[l.CV])))if("force"===t||"dagre"===t){if(b.current===w&&(e=A.current,n=f.filter(d.nv),(null==e?void 0:e.length)!==n.length||!e.every(((e,t)=>e===n[t])))){var e,n,o,i;({getNodeView:o,nodePaddings:i}="force"===t?(0,c.k)({cells:f,layoutOptions:r}):(0,u.C)({cells:f,layoutOptions:r}));var s=function(e){var t=null!=e?e:[.5,.5];return[v(t[0],"x"),v(t[1],"y")]}(null==r?void 0:r.alignOrigin),h=f.map((e=>{if((0,d.N)(e)){var t=o(e.id);return(0,a.A)((0,a.A)({},e),{},{view:(0,a.A)((0,a.A)({},e.view),{},{x:t.x-t.width*s[0]+i[3],y:t.y-t.height*s[1]+i[0]}),[l.xc]:!0})}return e}));A.current=h.filter(d.nv),y({type:"update-cells",payload:h}),z(!1),k(!0)}}else k(!0)}),[f,y,t,w,r,z]),{centered:E,setCentered:z,getNextLayoutKey:C}}},7531:(e,t,r)=>{r.d(t,{d:()=>s});var a=r(9740),n=r(8769),o=r(2090),i=r(1030),l=r(531),d=r(3033);function s(e){var{cells:t,defaultEdgeLines:r,markerPrefix:s}=e;return(0,n.useMemo)((()=>{var e=[{strokeColor:d.mF}],n=new WeakMap,c=function(t){if((0,l.WW)(t)){var c,u=null!==(c=o.__secret_internals.legacyDoTransform({edge:t},null==r?void 0:r.find((e=>(0,o.checkIfByTransform)(e,{edge:t})))))&&void 0!==c?c:{},h=(0,a.A)({dashed:!1,strokeColor:d.mF,strokeWidth:d.VO,interactStrokeWidth:d.Ie,showStartArrow:d.XV,showEndArrow:d.Ub,animate:{useAnimate:!1,duration:d.Be}},(0,i.omitBy)(u,i.isUndefined));void 0===h.parallelGap&&(h.parallelGap=h.interactStrokeWidth);var v=function(e,t){var r=(0,i.findIndex)(t,e);return-1===r&&(r=t.push(e)-1),r}({strokeColor:h.strokeColor},e);h.markerArrow="url(#".concat(s).concat(v,")"),n.set(t,h)}};for(var u of t)c(u);return[n,e]}),[t,r,s])}},8197:(e,t,r)=>{r.d(t,{H:()=>i});var a=r(8769),n=r(531),o=r(3033);function i(e){var{cells:t,layout:r,centered:i}=e;return(0,a.useMemo)((()=>i&&t.every((e=>!(0,n.N)(e)||e[o.CV]&&("force"!==r&&"dagre"!==r||e[o.xc])))),[t,i,r])}},8091:(e,t,r)=>{r.d(t,{f:()=>l});var a=r(8769),n=r(7566),o=r(1517),i=r(3033);function l(e){var{rootRef:t,zoomable:r,scrollable:l,pannable:d,draggable:s,scaleRange:c,onSwitchActiveTarget:u}=e,[h,v]=(0,a.useState)(!1),[f,g]=(0,a.useState)({k:1,x:0,y:0}),m=(0,a.useMemo)((()=>null!=c?c:[i.sS,i.Yt]),[c]),p=(0,a.useMemo)((()=>(0,o.s_)()),[]);return(0,a.useEffect)((()=>{var e=!1;p.scaleExtent(r?m:[1,1]).on("start",(()=>{e=!1,v(!0)})).on("zoom",(t=>{e=!0,g(t.transform)})).on("end",(()=>{v(!1),e||null==u||u(null)}))}),[u,m,r,p]),(0,a.useEffect)((()=>{var e=t.current;if(e){var a=(0,n.A)(e),o=()=>{a.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(r||l||d)return(r||l)&&a.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),l&&(e.preventDefault(),p.translateBy(a,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),a.call(p).on("wheel",(e=>e.preventDefault())).on("dblclick.zoom",null),s&&d||a.on("mousedown.zoom",null),d||a.on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),o;o()}}),[s,d,t,l,r,p]),{grabbing:h,transform:f,zoomer:p,scaleRange:m}}},8618:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(6758),n=r.n(a),o=r(935),i=r.n(o)()(n());i.push([e.id,'.zoom-bar{position:absolute;bottom:20px;right:20px;width:40px}.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=i.toString()},3012:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(6758),n=r.n(a),o=r(935),i=r.n(o)()(n());i.push([e.id,"*{box-sizing:border-box}:host{display:block;position:relative;overflow:hidden;--animation-dasharray:48;--stroke-dashoffset:96;--dasharray:4}:host,\n.root{width:100%;height:100%}:host([hidden]){display:none}.root{opacity:0}.root.ready{opacity:1}.root:focus{outline:none}@keyframes dashedAnimation{0%{stroke-dashoffset:var(--stroke-dashoffset)}to{stroke-dashoffset:0}}@keyframes solidAnimation{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}.decorator-area .area{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 .line-active-bg{stroke:var(--palette-blue-5);stroke-dasharray:var(--dasharray);stroke-width:1}.cell:not(.read-only){-webkit-user-select:none;-moz-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{opacity:1}.connect-line{pointer-events:none}.connect-line:not(.connecting){display:none}.line.dashed{stroke-dasharray:var(--dasharray)}.cell.active .decorator-text .text-container{outline:1px dashed var(--palette-blue-5)}.decorator-text .text-container{width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:0.5em}.decorator-text .text:focus{outline:none}.cell.faded{opacity:0.3}.cell .node{pointer-events:none}.cell .node > *{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)}",""]);const l=i.toString()}}]);
|
|
2
|
+
//# sourceMappingURL=5030.5dd4080b.js.map
|