@next-bricks/diagram 0.42.11 → 0.42.12

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 (75) hide show
  1. package/dist/bricks.json +3 -3
  2. package/dist/chunks/{1122.97ee7474.js → 1122.dea87200.js} +2 -2
  3. package/dist/chunks/{1122.97ee7474.js.map → 1122.dea87200.js.map} +1 -1
  4. package/dist/chunks/{114.9d0b78d2.js → 114.d27688d7.js} +2 -2
  5. package/dist/chunks/{114.9d0b78d2.js.map → 114.d27688d7.js.map} +1 -1
  6. package/dist/chunks/1371.226b7bfe.js +2 -0
  7. package/dist/chunks/{1371.4d56b3dc.js.map → 1371.226b7bfe.js.map} +1 -1
  8. package/dist/chunks/{1940.3fa9b819.js → 1940.e1fdb1c6.js} +2 -2
  9. package/dist/chunks/{1940.3fa9b819.js.map → 1940.e1fdb1c6.js.map} +1 -1
  10. package/dist/chunks/{2277.642aada3.js → 2277.0b3548af.js} +2 -2
  11. package/dist/chunks/{4658.ff7efb11.js.map → 2277.0b3548af.js.map} +1 -1
  12. package/dist/chunks/2416.f25f772b.js +2 -0
  13. package/dist/chunks/{2416.1dd136d0.js.map → 2416.f25f772b.js.map} +1 -1
  14. package/dist/chunks/{3171.9a74d0e1.js → 3171.633b30e8.js} +2 -2
  15. package/dist/chunks/{3171.9a74d0e1.js.map → 3171.633b30e8.js.map} +1 -1
  16. package/dist/chunks/3489.c2223b1c.js +3 -0
  17. package/dist/chunks/{3489.e0ce6106.js.map → 3489.c2223b1c.js.map} +1 -1
  18. package/dist/chunks/3933.fca8ae82.js +2 -0
  19. package/dist/chunks/{6314.d82ad8ed.js.map → 3933.fca8ae82.js.map} +1 -1
  20. package/dist/chunks/4017.c7b74992.js +3 -0
  21. package/dist/chunks/{4017.2680d65a.js.map → 4017.c7b74992.js.map} +1 -1
  22. package/dist/chunks/{4658.ff7efb11.js → 4658.d4d0115b.js} +2 -2
  23. package/dist/chunks/{2277.642aada3.js.map → 4658.d4d0115b.js.map} +1 -1
  24. package/dist/chunks/4837.44f22425.js +2 -0
  25. package/dist/chunks/{7218.3cc8b20d.js.map → 4837.44f22425.js.map} +1 -1
  26. package/dist/chunks/{5552.69fe3835.js → 5552.ad11237e.js} +2 -2
  27. package/dist/chunks/{5552.69fe3835.js.map → 5552.ad11237e.js.map} +1 -1
  28. package/dist/chunks/6314.f35cc928.js +2 -0
  29. package/dist/chunks/{3933.e4f7efe6.js.map → 6314.f35cc928.js.map} +1 -1
  30. package/dist/chunks/7218.6822e904.js +2 -0
  31. package/dist/chunks/{4837.ac3853bb.js.map → 7218.6822e904.js.map} +1 -1
  32. package/dist/chunks/{7733.a27200f8.js → 7733.e752ca8f.js} +2 -2
  33. package/dist/chunks/{7733.a27200f8.js.map → 7733.e752ca8f.js.map} +1 -1
  34. package/dist/chunks/799.5e6749ba.js +3 -0
  35. package/dist/chunks/799.5e6749ba.js.map +1 -0
  36. package/dist/chunks/{9559.436645e2.js → 9559.1cd5e0b2.js} +2 -2
  37. package/dist/chunks/{9559.436645e2.js.map → 9559.1cd5e0b2.js.map} +1 -1
  38. package/dist/chunks/{editable-label.a3d1d983.js → editable-label.e65ba20e.js} +3 -3
  39. package/dist/chunks/{editable-label.a3d1d983.js.map → editable-label.e65ba20e.js.map} +1 -1
  40. package/dist/chunks/{eo-diagram.261eb2d9.js → eo-diagram.e353ce7a.js} +2 -2
  41. package/dist/chunks/{eo-diagram.261eb2d9.js.map → eo-diagram.e353ce7a.js.map} +1 -1
  42. package/dist/chunks/eo-display-canvas.ccd2cce0.js +2 -0
  43. package/dist/chunks/{eo-display-canvas.e43ca2e5.js.map → eo-display-canvas.ccd2cce0.js.map} +1 -1
  44. package/dist/chunks/eo-draw-canvas.5d50938b.js +2 -0
  45. package/dist/chunks/{eo-draw-canvas.91b46e0d.js.map → eo-draw-canvas.5d50938b.js.map} +1 -1
  46. package/dist/chunks/{experimental-node.c9bb5135.js → experimental-node.ff43315f.js} +2 -2
  47. package/dist/chunks/{experimental-node.c9bb5135.js.map → experimental-node.ff43315f.js.map} +1 -1
  48. package/dist/chunks/main.5cfa7eee.js +2 -0
  49. package/dist/chunks/main.5cfa7eee.js.map +1 -0
  50. package/dist/examples.json +5 -5
  51. package/dist/index.820bfcb6.js +2 -0
  52. package/dist/index.820bfcb6.js.map +1 -0
  53. package/dist/manifest.json +181 -181
  54. package/dist/types.json +3222 -3222
  55. package/package.json +4 -4
  56. package/dist/chunks/1371.4d56b3dc.js +0 -2
  57. package/dist/chunks/2416.1dd136d0.js +0 -2
  58. package/dist/chunks/3489.e0ce6106.js +0 -3
  59. package/dist/chunks/3933.e4f7efe6.js +0 -2
  60. package/dist/chunks/4017.2680d65a.js +0 -3
  61. package/dist/chunks/4837.ac3853bb.js +0 -2
  62. package/dist/chunks/6314.d82ad8ed.js +0 -2
  63. package/dist/chunks/7218.3cc8b20d.js +0 -2
  64. package/dist/chunks/799.0d07ef57.js +0 -3
  65. package/dist/chunks/799.0d07ef57.js.map +0 -1
  66. package/dist/chunks/eo-display-canvas.e43ca2e5.js +0 -2
  67. package/dist/chunks/eo-draw-canvas.91b46e0d.js +0 -2
  68. package/dist/chunks/main.4e79d4df.js +0 -2
  69. package/dist/chunks/main.4e79d4df.js.map +0 -1
  70. package/dist/index.4a8ba3c2.js +0 -2
  71. package/dist/index.4a8ba3c2.js.map +0 -1
  72. /package/dist/chunks/{3489.e0ce6106.js.LICENSE.txt → 3489.c2223b1c.js.LICENSE.txt} +0 -0
  73. /package/dist/chunks/{4017.2680d65a.js.LICENSE.txt → 4017.c7b74992.js.LICENSE.txt} +0 -0
  74. /package/dist/chunks/{799.0d07ef57.js.LICENSE.txt → 799.5e6749ba.js.LICENSE.txt} +0 -0
  75. /package/dist/chunks/{editable-label.a3d1d983.js.LICENSE.txt → editable-label.e65ba20e.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/diagram",
3
- "version": "0.42.11",
3
+ "version": "0.42.12",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/diagram",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,11 +35,11 @@
35
35
  "postpublish": "mv package.json.bak package.json"
36
36
  },
37
37
  "devDependencies": {
38
- "@next-core/build-next-bricks": "^1.23.0",
39
- "@next-core/test-next": "^1.1.5"
38
+ "@next-core/build-next-bricks": "^1.23.1",
39
+ "@next-core/test-next": "^1.1.6"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@next-bricks/basic": "*"
43
43
  },
44
- "gitHead": "335feb47aaac064bae50636ca4e212006965d018"
44
+ "gitHead": "0642c59fb82dea2ec52c5d8e42e1e0a116aab961"
45
45
  }
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[1371],{3739:(e,t,n)=>{n.d(t,{c:()=>i});var o=n(8769),r=n.n(o);function i(e){let t,{id:n,type:o,strokeColor:i}=e;switch(o){case"0..1":t=l;break;case"0..N":t=c;break;default:t=a}return r().createElement(t,{id:n,strokeColor:i})}function a(e){let{id:t,strokeColor:n}=e;return r().createElement("marker",{id:t,viewBox:"0 0 6 6",refX:5,refY:3,markerWidth:6,markerHeight:6,orient:"auto-start-reverse",strokeLinejoin:"round"},r().createElement("path",{d:"M 0.5 0.5 L 5.5 3 L 0.5 5.5 z",stroke:n,strokeWidth:1,fill:n}))}function l(e){let{id:t,strokeColor:n}=e;return r().createElement("marker",{id:t,viewBox:"0 0 21 11",refX:.5,refY:5.5,markerWidth:21,markerHeight:11,orient:"auto-start-reverse"},r().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:n,strokeWidth:1,fill:"none"}))}function c(e){let{id:t,strokeColor:n}=e;return r().createElement("marker",{id:t,viewBox:"0 0 21 11",refX:.5,refY:5.5,markerWidth:21,markerHeight:11,orient:"auto-start-reverse"},r().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:n,strokeWidth:1,fill:"none"}))}},3188:(e,t,n)=>{n.d(t,{h:()=>r});var o=n(733);function r(e,t,n){if(e===t||(0,o.w)(e,t,0,0))return null;let r,a,l=0,c=0;if(n){const o=t.x-e.x,r=t.y-e.y,i=Math.atan2(r,o);l=n/2*Math.cos(i+Math.PI/2),c=n/2*Math.sin(i+Math.PI/2)}const s=[[e.x+l,e.y+c],[t.x+l,t.y+c]],d=i(e,s),u=i(t,s);return r=d.length>0?d[0]:[e.x,e.y],a=u.length>0?u[0]:[t.x,t.y],[{x:r[0],y:r[1]},{x:a[0],y:a[1]}]}function i(e,t){const n=[[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]],o=[];for(let e=0;e<4;e++)o.push([n[e],n[(e+1)%4]]);const r=[];for(const e of o){const n=a(t[0],t[1],e[0],e[1]);n&&r.push(n)}return r}function a(e,t,n,o){let[r,i]=e,[a,l]=t,[c,s]=n,[d,u]=o;if(r===a&&i===l||c===d&&s===u)return null;const h=(u-s)*(a-r)-(d-c)*(l-i);if(0===h)return null;const f=((d-c)*(i-s)-(u-s)*(r-c))/h,v=((a-r)*(i-s)-(l-i)*(r-c))/h;return f<0||f>1||v<0||v>1?null:[r+f*(a-r),i+f*(l-i)]}},733:(e,t,n)=>{function o(e,t,n,o){const i=n?r(e,n):e,a=o?r(t,o):t,l=Math.min(i.x-i.width/2,a.x-a.width/2),c=Math.max(i.x+i.width/2,a.x+a.width/2),s=Math.min(i.y-i.height/2,a.y-a.height/2),d=Math.max(i.y+i.height/2,a.y+a.height/2);return c-l<i.width+a.width&&d-s<i.height+a.height}function r(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}}n.d(t,{w:()=>o})},8802:(e,t,n)=>{function o(e){if(Array.isArray(e)){const t=e[0],n=e.length>1?e[1]:t;return[t,n,e.length>2?e[2]:t,e.length>3?e[3]:n]}return new Array(4).fill(e)}n.d(t,{D:()=>o})},2140:(e,t,n)=>{n.d(t,{m:()=>T});var o=n(8769),r=n.n(o),i=n(3373),a=n.n(i),l=n(531),c=n(3188),s=n(3033);function d(e,t){return e.find((e=>(0,l.o6)(e)&&e.id===t))}function u(e){var t,n;let{edge:i,cells:u,lineConfMap:f}=e;const v=(0,o.useRef)(null),g=(0,o.useMemo)((()=>d(u,i.source)),[u,i.source]),m=(0,o.useMemo)((()=>d(u,i.target)),[u,i.target]),w=(0,o.useMemo)((()=>f.get(i)),[i,f]),p=(0,o.useMemo)((()=>u.some((e=>(0,l.WW)(e)&&e.source===i.target&&e.target===i.source))?w.parallelGap:0),[u,i,w.parallelGap]),y=(0,o.useMemo)((()=>g&&m&&null!=g.view.x&&null!=m.view.x?(0,c.h)(h(g.view,5),h(m.view,5),p):null),[p,g,m]);if(!y)return null;const x=`M${y[0].x} ${y[0].y}L${y[1].x} ${y[1].y}`;return r().createElement(r().Fragment,null,r().createElement("path",{d:x,fill:"none",stroke:"transparent",strokeWidth:w.interactStrokeWidth}),r().createElement("path",{ref:v,className:a()("line",{dashed:w.dashed,[(w.dashed?"dashed":"solid")+"-animation"]:w.animate.useAnimate}),style:{"--time":`${w.animate.duration??s.Be}s`,"--solid-length":null===(t=v.current)||void 0===t||null===(n=t.getTotalLength)||void 0===n?void 0:n.call(t)},d:x,fill:"none",stroke:w.strokeColor,strokeWidth:w.strokeWidth,markerStart:w.showStartArrow?w.markerArrow:"",markerEnd:w.showEndArrow?w.markerArrow:""}),r().createElement("path",{className:"line-active-bg",d:x,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 f=n(6e3),v=n(184),g=n(1030),m=n(9126);function w(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,v.checkIfByTransform)(e,c))))||void 0===e?void 0:e.useBrick)}),[n,s,a,c]),h=(0,o.useMemo)((()=>n?String(v.__secret_internals.legacyDoTransform(c,i??"<% DATA.node.id %>")):""),[n,i,c]),w=(0,o.useCallback)((e=>{const n=d.current;n&&(n.disconnect(),d.current=null),e?setTimeout((()=>{const n=new m.A((()=>{l(t.id,[e.offsetWidth,e.offsetHeight])}));n.observe(e),d.current=n})):l(t.id,null)}),[t.id,l]),p=(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(f.ReactUseBrick,{useBrick:u,data:c,refCallback:w})):n?r().createElement("g",{className:"degraded",ref:p},r().createElement("circle",{cx:8,cy:8,r:8}),r().createElement("text",{x:8,y:32},h)):null}var p=n(9386),y=n(4197);function x(e,t){let{action:n,cell:o,scale:r,layout:i,activeTarget:a,cells:c,onCellsMoving:s,onCellsMoved:d,onCellResizing:u,onCellResized:h,onSwitchActiveTarget:f}=t;e.stopPropagation(),"resize"!==n&&(0,y.Q)(o,a)||null==f||f((0,p.P)(o));const v="force"===i||"dagre"===i;if((0,l.WW)(o))return;const g=[];("multi"===(null==a?void 0:a.type)&&"move"===n?c.filter((e=>(0,y.Q)(e,a))):[o]).forEach((e=>{g.push(e),(0,l.t2)(e)&&"move"===n&&g.push(...c.filter((t=>(0,l.N)(t)&&t.containerId===e.id)))}));const m=g.filter((e=>(0,l.N)(e)&&!v||(0,l.mH)(e)));if(0===m.length)return;const w=[e.clientX,e.clientY],x=m.map((e=>({cell:e,position:"move"===n?[e.view.x,e.view.y]:[e.view.width,e.view.height]})));let k=!1;const E=(e,t)=>{const i=function(e){return[(e.clientX-w[0])/r,(e.clientY-w[1])/r]}(e);if(k||(k=i[0]**2+i[1]**2>=9),k)if("move"===n){var a;const e=x.map((e=>{let{cell:t,position:n}=e;return{type:t.type,id:t.id,x:n[0]+i[0],y:n[1]+i[1],width:t.view.width,height:t.view.height,decorator:(0,l.mH)(t)?t.decorator:void 0}}));null===(a=t?d:s)||void 0===a||a(e)}else{var c;null===(c=t?h:u)||void 0===c||c({type:o.type,id:o.id,width:x[0].position[0]+i[0],height:x[0].position[1]+i[1]})}},b=e=>{E(e)},C=e=>{E(e,!0),k=!1,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",C)};document.addEventListener("mousemove",b),document.addEventListener("mouseup",C)}function k(e){let{cell:t,transform:n,readOnly:i,activeTarget:a,cells:l,onCellResizing:c,onCellResized:s,onSwitchActiveTarget:d}=e;const u=r().useRef(null);return(0,o.useEffect)((()=>{const e=u.current;if(!e||i)return;const o=e=>{x(e,{action:"resize",cell:t,scale:n.k,activeTarget:a,cells:l,onCellResizing:c,onCellResized:s,onSwitchActiveTarget:d})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[a,t,l,s,c,d,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:u,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 E(e){let{cell:t,readOnly:n,onDecoratorTextEditing:i,onDecoratorTextChange:l}=e;const c=t.view.text??"",[s,d]=(0,o.useState)(c),[u,h]=(0,o.useState)(!1),f=(0,o.useRef)(!1),[v,g]=(0,o.useState)(!1),m=(0,o.useRef)(null),w=(0,o.useCallback)((e=>{n||(e.preventDefault(),e.stopPropagation(),h(!0))}),[n]);(0,o.useEffect)((()=>{const e=m.current;e&&e.textContent!==s&&(e.textContent=s)}),[s]),(0,o.useEffect)((()=>{var e;const n=null===(e=m.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&&m.current&&(m.current.focus(),b(m.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 p=(0,o.useCallback)((e=>{n||d(e.target.textContent)}),[n]),y=(0,o.useCallback)((()=>{n||(h(!1),g(!0))}),[n]);return(0,o.useEffect)((()=>{v&&(null==l||l({id:t.id,view:{...t.view,text:s}}),g(!1))}),[t,s,l,v]),r().createElement("foreignObject",{className:"decorator-text"},r().createElement("div",{className:a()("text-container",{editing:u}),onDoubleClick:w},r().createElement("div",{className:"text",contentEditable:u,ref:m,onInput:p,onBlur:y})))}function b(e){const t=document.createRange();t.selectNodeContents(e);const n=window.getSelection();n.removeAllRanges(),n.addRange(t)}var C=n(9068);function z(e){let{cell:t,transform:n,readOnly:i,layout:c,view:s,activeTarget:d,cells:u,onCellResizing:h,onCellResized:f,onSwitchActiveTarget:v,onDecoratorTextEditing:m,onDecoratorTextChange:w}=e;const p=(0,g.get)(t.view,"text",""),y=(0,g.get)(t.view,"direction","top"),k=(0,o.useRef)(null),E=r().useRef(null),[z,M]=(0,o.useState)(!1),[N,A]=(0,o.useState)(p),[T,R]=(0,o.useState)(!1),[L,S]=(0,o.useState)(),[W,D]=(0,o.useState)({x:0,y:0,width:t.view.width,height:t.view.height}),P=(0,o.useCallback)((e=>{i||(e.preventDefault(),e.stopPropagation(),M(!0))}),[i]),H=(0,o.useCallback)((e=>{i||A(e.target.textContent)}),[i]),B=(0,o.useCallback)((()=>{i||(M(!1),R(!0),S((0,C.uuidV4)()))}),[i]);return(0,o.useEffect)((()=>{A(p)}),[p]),(0,o.useEffect)((()=>{const e=k.current;e&&e.textContent!==N&&(e.textContent=N)}),[N]),(0,o.useEffect)((()=>{var e;const t=null===(e=k.current)||void 0===e?void 0:e.parentElement;if(t){const{clientWidth:e,clientHeight:n}=t;if(["left","right"].includes(y)){const t={width:e,height:s.height,x:"left"===y?-e:s.width,y:0};D(t)}else{const e={width:s.width,height:n,x:0,y:"top"===y?-n:s.height};D(e)}}}),[s,N,y,L]),(0,o.useEffect)((()=>{z&&k.current&&(k.current.focus(),b(k.current)),null==m||m({id:t.id,editing:z})}),[t.id,z,m]),(0,o.useEffect)((()=>{T&&(null==w||w({id:t.id,view:{...s,text:N}}),R(!1))}),[t,s,N,w,T]),(0,o.useEffect)((()=>{const e=E.current;if(!e||i)return;const o=e=>{x(e,{action:"resize",cell:t,scale:n.k,activeTarget:d,cells:u,onCellResizing:h,onCellResized:f,onSwitchActiveTarget:v})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[d,t,u,f,h,v,i,n.k]),r().createElement("g",{className:"decorator-container"},r().createElement("foreignObject",W,r().createElement("div",{className:a()("text-container",{editing:z,[["left","right"].includes(y)?"vertical":"horizontal"]:!0}),onDoubleClick:P},r().createElement("div",{className:"text",contentEditable:z,ref:k,onInput:H,onBlur:B}))),r().createElement("rect",{width:s.width,height:s.height,className:"container"}),!i&&!(0,l.OD)(c)&&r().createElement("g",{ref:E,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 M(e){let t,{cell:n,view:o,transform:i,readOnly:a,layout:l,activeTarget:c,cells:s,onCellResizing:d,onCellResized:u,onSwitchActiveTarget:h,onDecoratorTextEditing:f,onDecoratorTextChange:v}=e;switch(n.decorator){case"container":t=z;break;case"area":t=k;break;case"text":t=E;break;default:return console.error(`Unknown decorator: ${n.decorator}`),null}return r().createElement(t,{cell:n,view:o,transform:i,readOnly:a,layout:l,activeTarget:c,cells:s,onCellResizing:d,onCellResized:u,onSwitchActiveTarget:h,onDecoratorTextEditing:f,onDecoratorTextChange:v})}var N=n(8185);function A(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 T(e){let{layout:t,cell:n,cells:i,degraded:c,degradedNodeLabel:s,defaultNodeBricks:d,lineConfMap:h,activeTarget:f,dragNodeToContainerActive:v,readOnly:m,transform:k,unrelatedCells:E,onCellsMoving:b,onCellsMoved:C,onCellResizing:z,onCellResized:T,onSwitchActiveTarget:R,onCellContextMenu:L,onCellClick:S,onDecoratorTextEditing:W,onDecoratorTextChange:D,onNodeBrickResize:P,onCellMouseEnter:H,onCellMouseLeave:B}=e;const V=(0,o.useRef)(null),O=(0,o.useMemo)((()=>E.some((e=>(0,N.c)(e,n)))),[n,E]),I=(0,o.useMemo)((()=>{if((0,l.t2)(n)&&(0,l.OD)(t)){const e=i.filter((e=>(0,l.N)(e)&&e.containerId===n.id)),t={...n.view,...A(e)};return n.view=t,t}return(0,g.get)(n,"view",{x:0,y:0,width:0,height:0})}),[t,n,i]);(0,o.useEffect)((()=>{const e=V.current;if(!e)return;const o=e=>{m||(0,l.t2)(n)&&(0,l.OD)(t)?e.stopPropagation():x(e,{layout:t,action:"move",cell:n,scale:k.k,activeTarget:f,cells:i,onCellsMoving:b,onCellsMoved:C,onSwitchActiveTarget:R})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[t,n,f,i,C,b,R,m,k.k]);const Y=(0,o.useCallback)((e=>{m&&"decorator"===n.type||(e.preventDefault(),R((0,p.P)(n)),L({cell:n,clientX:e.clientX,clientY:e.clientY}))}),[n,L,R,m]),$=(0,o.useCallback)((e=>{S&&"decorator"!==n.type&&S({cell:n,clientX:e.clientX,clientY:e.clientY})}),[n,S]),X=(0,o.useCallback)((()=>{null==H||H(n)}),[n,H]),_=(0,o.useCallback)((()=>{null==B||B(n)}),[n,B]);return r().createElement("g",{className:a()("cell",{active:(0,y.Q)(n,f),faded:O,"read-only":m,"container-active":v}),ref:V,transform:"edge"===n.type||null==n.view.x?void 0:`translate(${I.x} ${I.y})`,onContextMenu:Y,onClick:$,onMouseEnter:X,onMouseLeave:_},(0,l.N)(n)?r().createElement(w,{node:n,degraded:c,degradedNodeLabel:s,defaultNodeBricks:d,onResize:P}):(0,l.WW)(n)?r().createElement(u,{edge:n,cells:i,lineConfMap:h}):(0,l.mH)(n)?r().createElement(M,{cell:n,view:I,transform:k,readOnly:m,layout:t,activeTarget:f,cells:i,onCellResizing:z,onCellResized:T,onSwitchActiveTarget:R,onDecoratorTextEditing:W,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=>{s([(e.clientX-n.x-t.offset[0])/n.k,(e.clientY-n.y-t.offset[1])/n.k])},o=e=>{e.stopPropagation()},r=e=>{e.stopPropagation(),i(),l(t,[(e.clientX-n.x-t.offset[0])/n.k,(e.clientY-n.y-t.offset[1])/n.k])},i=()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mousedown",o,{capture:!0}),document.removeEventListener("click",r,{capture:!0}),s(null)};return document.addEventListener("mousemove",e),document.addEventListener("mousedown",o,{capture:!0}),document.addEventListener("click",r,{capture:!0}),i}}),[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})`})}},3033:(e,t,n)=>{n.d(t,{Be:()=>m,CV:()=>o,HP:()=>i,Ie:()=>f,N8:()=>l,Ub:()=>g,VO:()=>h,XV:()=>v,Yt:()=>d,mF:()=>u,pC:()=>w,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",h=1,f=15,v=!1,g=!0,m=1,w=500},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){return"decorator"===e.type&&"text"===e.decorator}function d(e){return"decorator"===e.type&&"container"===e.decorator}function u(e){return!["manual",void 0].includes(e)}n.d(t,{Hs:()=>s,N:()=>o,OD:()=>u,WW:()=>a,mH:()=>r,nv:()=>l,o6:()=>c,t2:()=>d,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)},h=e=>{d(e,!0),s=!1,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",h)};document.addEventListener("mousemove",u),document.addEventListener("mouseup",h)}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,h=s-l,f=i&&!d&&(u>n||h>r)?Math.max(Math.min(n/u,r/h,i[1]),i[0]):1;return{x:d?0:(n-u*f)/2-a*f,y:d?0:(r-h*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:h,canvasWidth:f,canvasHeight:v,scaleRange:g,transform:m,reason:w,parent:p,allowEdgeToArea:y}=e;const x="force"!==n&&"dagre"!==n,k=(0,a.C)(t,{defaultNodeSize:h}),E=[];let b=!1;const C=new Map;let z=!1;for(const e of u)(0,i.mH)(e)?z=!0:(0,i.N)(e)&&(z=!0,e[r.CV]&&C.set(e.id,e));const M=new Map;for(const e of k)if((0,i.N)(e)){M.set(e.id,e);const t=C.get(e.id);t&&(e.view.width=t.view.width,e.view.height=t.view.height,e[r.CV]=!0)}let N=!1;if("add-related-nodes"===w&&p){const e=new Set;for(const t of k)(0,i.WW)(t)&&t.source===p&&t.target!==p&&e.add(t.target);const t=M.get(p);if(void 0!==(null==t?void 0:t.view.x)&&void 0!==t.view.y){if(N=!0,x)for(const t of k)((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=>M.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):E.push(e);if(E.length>0&&x){let e,n;if(o)e=o.view.x+o.view.width+r.sz,n=o.view.y;else{const o=E.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 E)t.view.x=e,t.view.y=n,e+=t.view.width+r.sz}}}if(!N){let e=h[0],t=h[1];const n=[];let r=!1;for(const o of k)(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?E.push(o):n.push(o)):(0,i.mH)(o)&&(r=!0);if(x){let e;z||(m=(0,l.r)((0,o.without)(k,...E),{canvasWidth:f,canvasHeight:v,scaleRange:g})),0===n.length||1===n.length&&!r?(E.push(...n),({getNodeView:e}=(0,s.C)({cells:k,allowEdgeToArea:y})),b=0===u.length||u.length===k.length&&u.every(((e,t)=>(0,d.c)(e,k[t])))):({getNodeView:e}=(0,c.k)({cells:k,fixedPosition:!0,allowEdgeToArea:y,center:[(f/2-m.x)/m.k,(v/2-m.y)/m.k]}));for(const t of k)if((0,i.N)(t)){const n=e(t.id);t.view.x=n.x,t.view.y=n.y}}}return{cells:k,updated:E,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":return i(e,t.payload,(e=>"edge"===e.type||"decorator"===e.type&&"area"===e.decorator));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:()=>v});var o=n(8769),r=n.n(o),i=n(2588),a=n(6768),l=n(6308),c=n(6257),s=n(6e3),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"})),h=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 v(e){let{shadowRoot:t,scale:n,scaleRange:d,onZoomChange:v,onReCenter:g}=e;const m=(0,s.useCurrentTheme)(),w=(0,o.useMemo)((()=>(0,c.VC)()),[]),p=(0,o.useRef)(null),y=100*d[0],x=100*d[1],k=100*n,E=(0,o.useMemo)((()=>({formatter:e=>`${e}%`,placement:"left",getPopupContainer:()=>p.current})),[]),b=(0,o.useCallback)((()=>{v(Math.min(k+5,x))}),[x,v,k]),C=(0,o.useCallback)((()=>{v(Math.max(k-5,y))}),[y,v,k]);return r().createElement(i.Ay,{theme:{algorithm:"dark-v2"===m?a.A.darkAlgorithm:a.A.defaultAlgorithm}},r().createElement(c.N7,{container:t,autoClear:!0,cache:w,hashPriority:"high"},r().createElement("div",{className:"zoom-bar",ref:p},r().createElement("div",{className:"center-button",onClick:g,role:"button"},r().createElement(u,null)),r().createElement("div",{className:"zoom-slider"},r().createElement("div",{className:"zoom-button",role:"button",onClick:b},r().createElement(h,null)),r().createElement(l.A,{min:y,max:x,value:k,step:5,vertical:!0,included:!1,tooltip:E,onChange:v}),r().createElement("div",{className:"zoom-button",role:"button",onClick:C},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:()=>h});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 h(e){let{cells:t,layoutOptions:n,center:h,fixedPosition:f,allowEdgeToArea:v}=e;const{nodePadding:g,collide:m}={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}},w=(0,u.D)(g),p=[],y=[],x=new Map;for(const e of t)if(v&&(0,d.o6)(e)||(0,d.N)(e)){const t={id:e.id,width:e.view.width+w[1]+w[3],height:e.view.height+w[0]+w[2],...f?{fx:e.view.x,fy:e.view.y}:null};p.push(t),x.set(t.id,t)}else(0,d.WW)(e)&&y.push({source:e.source,target:e.target});const k=(0,r.A)(y).id((e=>e.id)),E=(0,i.A)(p).force("link",k).force("x",(0,a.A)(null==h?void 0:h[0])).force("y",(0,l.A)(null==h?void 0:h[1])).force("charge",(0,c.A)());return m&&E.force("collide",(0,s.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:w}}},1819:(e,t,n)=>{n.d(t,{J:()=>i});var o=n(8769),r=n(8185);function i(e){let{cellsRef: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 h(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:v,zoomer:g,scaleRange:m,layoutKey:w,allowEdgeToArea:p,dispatch:y}=e;const[x,k]=(0,o.useState)("force"!==t&&"dagre"!==t),E=(0,o.useRef)(w),b=(0,o.useCallback)((()=>++E.current),[]),[C,z]=function(e){let{rootRef:t,cells:n,layoutInitialized:s,zoomable:d,zoomer:u,scaleRange:h}=e;const[f,v]=(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:g,y:m}=(0,c.r)(n,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:d?h:void 0});u.transform((0,r.A)(e),new i.uV(o,g,m)),v(!0)}),[n,f,s,t,h,d,u]),(0,o.useEffect)((()=>{n.some((e=>(0,l.N)(e)||(0,l.mH)(e)))||v(!1)}),[n]),[f,v]}({rootRef:u,layoutInitialized:x,cells:f,zoomable:v,zoomer:g,scaleRange:m}),M=(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 k(!0);if(E.current!==w||(e=M.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:p}):(0,d.C)({cells:f,layoutOptions:n,allowEdgeToArea:p}));const c=function(e){const t=e??[.5,.5];return[h(t[0],"x"),h(t[1],"y")]}(null==n?void 0:n.alignOrigin),u=f.map((e=>{if(p&&(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}));M.current=u.filter(l.nv),y({type:"update-cells",payload:u}),k(!0)}),[f,y,t,w,n]),{centered:C,setCentered:z,getNextLayoutKey:b}}},7531:(e,t,n)=>{n.d(t,{d:()=>c});var o=n(8769),r=n(184),i=n(1030),a=n(531),l=n(3033);function c(e){let{cells:t,defaultEdgeLines:n,markerPrefix:c}=e;return(0,o.useMemo)((()=>{const e=[{strokeColor:l.mF}],o=new WeakMap;for(const d of t)if((0,a.WW)(d)){const t=r.__secret_internals.legacyDoTransform({edge:d},null==n?void 0:n.find((e=>(0,r.checkIfByTransform)(e,{edge:d}))))??{},a={dashed:!1,strokeColor:l.mF,strokeWidth:l.VO,interactStrokeWidth:l.Ie,showStartArrow:l.XV,showEndArrow:l.Ub,animate:{useAnimate:!1,duration:l.Be},...(0,i.omitBy)(t,i.isUndefined)};void 0===a.parallelGap&&(a.parallelGap=a.interactStrokeWidth);const u=s({strokeColor:a.strokeColor},e);a.markerArrow=`url(#${c}${u})`,o.set(d,a)}return[o,e]}),[t,n,c])}function s(e,t){let n=(0,i.findIndex)(t,e);return-1===n&&(n=t.push(e)-1),n}},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:h}=e;const[f,v]=(0,o.useState)(!1),[g,m]=(0,o.useState)({k:1,x:0,y:0}),w=(0,o.useMemo)((()=>u??[a.sS,a.Yt]),[u]),p=(0,o.useMemo)((()=>(0,i.s_)()),[]);return(0,o.useEffect)((()=>{let e=!1;p.scaleExtent(n?w:[1,1]).on("start",(()=>{e=!1,v(!0)})).on("zoom",(t=>{e=!0,m(t.transform)})).on("end",(()=>{v(!1),e||null==h||h(null)})).filter((e=>("wheel"===e.type||(d?s||e.ctrlKey:!e.ctrlKey))&&!e.button))}),[h,w,n,p,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(),p.translateBy(o,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),o.call(p).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,p]),{grabbing:f,transform:g,zoomer:p,scaleRange:w}}},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-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,\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}.line.dashed{stroke-dasharray:var(--dasharray)}.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%}.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}.decorator-container .vertical .text{min-width:var(--defaultSize)}",""]);const l=a.toString()}}]);
2
- //# sourceMappingURL=1371.4d56b3dc.js.map
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[2416],{6671:(e,t,n)=>{n.d(t,{w:()=>s});var o=n(8769),a=n.n(o),i=n(3373),r=n.n(i),l=n(3739);function s(e){let{connectLineState:t,connectLineTo:n,markerPrefix:o}=e;return a().createElement("svg",{width:"100%",height:"100%",className:r()("connect-line",{connecting:!!t&&(n[0]-t.from[0])**2+(n[1]-t.from[1])**2>25})},a().createElement("defs",null,a().createElement(l.c,{type:"arrow",id:`${o}connect-line`,strokeColor:null==t?void 0:t.options.strokeColor})),a().createElement("path",{d:t?`M${t.from.join(" ")}L${n.join(" ")}`:"",fill:"none",stroke:null==t?void 0:t.options.strokeColor,strokeWidth:null==t?void 0:t.options.strokeWidth,markerEnd:null!=t&&t.options.arrow?`url(#${o}connect-line)`:void 0}))}},1803:(e,t,n)=>{n.d(t,{m:()=>l});var o=n(8769),a=n.n(o),i=n(3373),r=n.n(i);function l(e){var t,n;let{line:{line:o,edge:i,d:l,markers:s},linePaths:d,lineMaskRects:c,maskPrefix:u,markerPrefix:f,activeLineMarkerPrefix:p,active:m,activeRelated:h,onLineClick:g,onLineDoubleClick:y}=e;const v=c.has(o.$id)?`url(#${u}${o.$id})`:void 0,{strokeColor:k,strokeWidth:b,interactStrokeWidth:x}={...o,...m?null===(t=o.overrides)||void 0===t?void 0:t.active:h?null===(n=o.overrides)||void 0===n?void 0:n.activeRelated:null},w=m?"active":h?"active-related":"default";let M,R;for(const e of s)e.variant===w&&("start"===e.placement?M=`url(#${f}${e.index})`:R=`url(#${f}${e.index})`);return a().createElement("g",{className:r()("line",{interactable:o.interactable,active:m,"active-related":h}),onClick:o.interactable?()=>{null==g||g({id:o.$id,edge:i})}:void 0,onDoubleClick:o.interactable?e=>{e.preventDefault(),e.stopPropagation(),null==y||y({id:o.$id,edge:i})}:void 0,style:{cursor:o.cursor}},o.interactable&&a().createElement("path",{d:l,fill:"none",stroke:"transparent",strokeWidth:x}),a().createElement("path",{ref:e=>d.set(o.$id,e),stroke:k,strokeWidth:b,d:l,fill:"none",markerStart:M,markerEnd:R,mask:v}),a().createElement("path",{stroke:"var(--palette-blue-3)",strokeWidth:b,d:l,fill:"none",className:"active-bg",markerStart:`url(#${p}start)`,markerEnd:`url(#${p}end)`,mask:v}))}},2547:(e,t,n)=>{n.d(t,{d2:()=>l});var o=n(8769),a=n.n(o),i=n(6e3),r=n(184);function l(e){let{labels:t,onRendered:n}=e;const[i,r]=(0,o.useState)(!1),[l,c]=(0,o.useState)([]),u=(0,o.useMemo)((()=>new Map),[]),f=(0,o.useCallback)(((e,t)=>{t&&u.set(e,t),c((t=>t.includes(e)?t:t.concat(e)))}),[u]),p=(0,o.useCallback)((e=>{c((t=>{const n=t.indexOf(e);return-1===n?t:t.slice(0,n).concat(t.slice(n+1))})),u.delete(e)}),[u]);return(0,o.useEffect)((()=>{r(!(null!=t&&t.some((e=>!l.includes(e.id)))))}),[t,l]),(0,o.useEffect)((()=>{null==n||n(i?u:null)}),[u,i]),a().createElement(a().Fragment,null,null==t?void 0:t.map((e=>{let{text:t,label:n,id:o,edge:i}=e;return n?a().createElement("div",{key:o,className:"line-label"},a().createElement(d,{id:o,edge:i,label:n,onRendered:f,onUnmount:p})):a().createElement(s,{key:o,id:o,text:t,onRendered:f})})))}function s(e){let{id:t,text:n,onRendered:i}=e;const r=(0,o.useCallback)((e=>{null==i||i(t,e)}),[t,i]);return a().createElement("div",{className:"line-label",ref:r,style:n.style},n.content)}function d(e){let{id:t,edge:n,label:l,onRendered:s,onUnmount:d}=e;const c=(0,o.useMemo)((()=>(0,r.checkIfByTransform)(l,{edge:n})?l.useBrick:null),[n,l]),u=(0,o.useMemo)((()=>({edge:n})),[n]);(0,o.useEffect)((()=>{c||setTimeout((()=>{null==s||s(t,null)}))}),[t,s,c]),(0,o.useEffect)((()=>()=>{null==d||d(t)}),[]);const f=(0,o.useCallback)((e=>{e&&setTimeout((()=>{null==s||s(t,e.parentElement)}))}),[t,s]),p=(0,o.useCallback)((()=>{setTimeout((()=>{null==s||s(t,null)}))}),[t,s]);return c?a().createElement(i.ReactUseBrick,{refCallback:f,ignoredCallback:p,useBrick:c,data:u}):null}},9191:(e,t,n)=>{n.d(t,{y:()=>i});var o=n(8769),a=n.n(o);function i(e){let{lineId:t,rects:n,maskPrefix:o,renderedLineLabels:i}=e;const r=i.find((e=>e.lineId===t&&"center"===e.placement));if(!r)return null;const{lineRect:l}=r,s=(c=1e3,{left:(d=l).left-c,top:d.top-c,width:d.width+2e3,height:d.height+2e3});var d,c;return a().createElement("mask",{id:`${o}${t}`,x:s.left,y:s.top,width:s.width,height:s.height},a().createElement("rect",{x:s.left,y:s.top,width:s.width,height:s.height,fill:"white"}),n.map(((e,t)=>a().createElement("rect",{key:t,x:e.left,y:e.top,width:e.width,height:e.height,fill:"black"}))))}},8892:(e,t,n)=>{n.d(t,{p:()=>l});var o=n(8769),a=n.n(o),i=n(6e3),r=n(184);function l(e){let{nodes:t,nodeBricks:n,onRendered:i}=e;const[r,l]=(0,o.useState)(!1),[d,c]=(0,o.useState)([]),u=(0,o.useMemo)((()=>new Map),[]),f=(0,o.useCallback)(((e,t)=>{t&&u.set(e,t),c((t=>t.includes(e)?t:t.concat(e)))}),[u]),p=(0,o.useCallback)((e=>{c((t=>{const n=t.indexOf(e);return-1===n?t:t.slice(0,n).concat(t.slice(n+1))})),u.delete(e)}),[u]);return(0,o.useEffect)((()=>{l(!(null!=t&&t.some((e=>!d.includes(e.id)))))}),[t,d]),(0,o.useEffect)((()=>{null==i||i(r?u:null)}),[u,r]),a().createElement(a().Fragment,null,null==t?void 0:t.map((e=>a().createElement("div",{key:e.id,className:"node"},a().createElement(s,{nodeBricks:n,node:e,onRendered:f,onUnmount:p})))))}function s(e){let{node:t,nodeBricks:n,onRendered:l,onUnmount:s}=e;const d=(0,o.useMemo)((()=>{var e;return null===(e=function(e,t){return null==t?void 0:t.find((t=>t.nodeType?[].concat(t.nodeType).includes(e.type):(0,r.checkIfByTransform)(t,{node:e})))}(t,n))||void 0===e?void 0:e.useBrick}),[t,n]),c=(0,o.useMemo)((()=>({node:t})),[t]);(0,o.useEffect)((()=>{d||setTimeout((()=>{null==l||l(t.id,null)}))}),[t.id,l,d]),(0,o.useEffect)((()=>()=>{null==s||s(t.id)}),[]);const u=(0,o.useCallback)((e=>{e&&setTimeout((()=>{null==l||l(t.id,e)}))}),[t.id,l]),f=(0,o.useCallback)((()=>{setTimeout((()=>{null==l||l(t.id,null)}))}),[t.id,l]);return d?a().createElement(i.ReactUseBrick,{refCallback:u,ignoredCallback:f,useBrick:d,data:c}):null}},8657:(e,t,n)=>{n.d(t,{Ie:()=>r,KP:()=>i,VO:()=>a,Yt:()=>s,mF:()=>o,sS:()=>l});const o="var(--palette-gray-5)",a=1,i="curveBasis",r=20,l=.5,s=2},8069:(e,t,n)=>{n.d(t,{o:()=>k});var o=n(8769),a=n(7586),i=n.n(a),r=n(1030);function l(e,t,n){for(const o of e){const e=t.get(o.id);o.width=Math.max((null==e?void 0:e.offsetWidth)??0,10)+n[1]+n[3],o.height=Math.max((null==e?void 0:e.offsetHeight)??0,10)+n[0]+n[2]}}function s(e,t,n){for(const a of e){var o;const e=a.x-a.width/2+n[3],i=a.y-a.height/2+n[0],r=null===(o=t.get(a.id))||void 0===o?void 0:o.parentElement;r&&(r.style.left=`${e}px`,r.style.top=`${i}px`,r.style.visibility="visible")}}var d=n(8802),c=n(6149),u=n(4842),f=n(1945),p=n(9418),m=n(3854),h=n(7931);function g(e,t){let{normalizedLinesMap:n,lineLabelsRefRepository:o}=t;return(null==e?void 0:e.map((e=>{const t=n.get(e),a={};if(t)for(const e of["start","end"]){const n=o.get(`${t}-${e}`);n&&(a[e]=[n.offsetWidth,n.offsetHeight])}return{data:e,labelSize:a}})))??[]}function y(e,t){return new Array(t).fill(null).map(((t,n)=>({dummy:!0,id:`$dummy-${e.source}-${e.target}-${n}`})))}function v(e,t){return new Array(t+1).fill(null).map(((n,o)=>({dummy:!0,source:0===o?e.source:`$dummy-${e.source}-${e.target}-${o-1}`,target:o===t?e.target:`$dummy-${e.source}-${e.target}-${o}`})))}function k(e){let{layout:t,nodes:n,edges:a,manualLayoutStatus:k,userViewReady:b,userViewNodesMap:x,nodeMovement:w,nodesRefRepository:M,lineLabelsRefRepository:R,normalizedLinesMap:E,nodesRenderId:L,lineLabelsRenderId:$,layoutOptions:C}=e;const P="initial"===k?t:"manual",[S,I]=(0,o.useState)(null),[T,N]=(0,o.useState)({nodes:[],edges:[]});return(0,o.useEffect)((()=>{b&&I((e=>"dagre"===P?function(e,t,n,o){const{nodePadding:a,...c}={nodePadding:0,rankdir:"TB",ranksep:50,edgesep:10,nodesep:50,...(0,r.pick)(o,["nodePadding","rankdir","ranksep","edgesep","nodesep","align"])},u=(0,d.D)(a),f=new(i().graphlib.Graph);f.setGraph(c),f.setDefaultEdgeLabel((function(){return{}}));for(const n of t??[]){const t=null==e?void 0:e.getNode(n.id);f.setNode(n.id,(null==t?void 0:t.data)===n?t:{id:n.id,data:n})}for(const e of n??[])f.setEdge(e.source,e.target,{data:e});return{layout:"dagre",getNode:e=>f.node(e),applyLayout(e){let{nodesRefRepository:t,lineLabelsRefRepository:n,normalizedLinesMap:o}=e;const a=[];for(const e of f.nodes()){const t=f.node(e);t?a.push(t):console.error("Diagram node not found: %s",e)}if(0===a.length)return null;l(a,t,u);const r=f.edges().map((e=>f.edge(e)));for(const e of r){const t=o.get(e.data);if(t)for(const o of["center","start","end"]){const a=n.get(`${t}-${o}`);if(a){const{offsetWidth:t,offsetHeight:n}=a;"center"===o&&(e.labelpos="c",e.width=t,e.height=n),e.labelSize??(e.labelSize={}),e.labelSize[o]=[t,n]}}}return i().layout(f),s(a,t,u),{nodes:a,edges:r}}}}(e,n,a,C):"force"===P?function(e,t,n,o,a){const{nodePadding:i,dummyNodesOnEdges:k,collide:b}={nodePadding:0,dummyNodesOnEdges:0,...(0,r.pick)(a,["nodePadding","dummyNodesOnEdges"]),collide:!1!==(null==a?void 0:a.collide)&&{dummyRadius:1,radiusDiff:5,strength:1,iterations:1,...!0===(null==a?void 0:a.collide)?null:null==a?void 0:a.collide}},x=(0,d.D)(i),w=[];for(const n of t??[]){const t=null==e?void 0:e.getNode(n.id);if((null==t?void 0:t.data)===n)w.push(t);else{const e={id:n.id,data:n},t=null==o?void 0:o.get(n.id);t&&(e.fx=t.x,e.fy=t.y),w.push(e)}}return{layout:"force",getNode:function(e){return w.find((t=>t.data.id===e))},applyLayout(e){let{nodesRefRepository:t,lineLabelsRefRepository:o,normalizedLinesMap:a}=e;if(0===w.length)return null;l(w,t,x);const i=w.slice(),r=[];for(const e of n??[])r.push({...e}),k>0&&(i.push(...y(e,k)),r.push(...v(e,k)));const d=(0,c.A)(r).id((e=>e.id));k>0&&d.distance((e=>e.dummy?30/(k+1):30)).strength((e=>e.dummy?.5:1));const M=(0,u.A)(i).force("link",d).force("x",(0,f.A)()).force("y",(0,p.A)()).force("charge",(0,m.A)());b&&M.force("collide",(0,h.A)().radius((e=>e.dummy?b.dummyRadius:Math.sqrt(e.width**2+e.height**2)/2+b.radiusDiff)).strength(b.strength).iterations(b.iterations)),M.stop(),function(e){e.tick(Math.ceil(Math.log(e.alphaMin())/Math.log(1-e.alphaDecay())))}(M),s(w,t,x);const R=g(n,{normalizedLinesMap:a,lineLabelsRefRepository:o});return{nodes:w,edges:R}}}}(e,n,a,x,C):"manual"===P?function(e,t,n,o){const{nodePadding:a}={nodePadding:0,...(0,r.pick)(o,["nodePadding"])},i=(0,d.D)(a),c=[];for(const n of t??[]){const t=null==e?void 0:e.getNode(n.id);(null==t?void 0:t.data)===n?(c.push(t),t.x0=t.x,t.y0=t.y):c.push({id:n.id,data:n})}let u;return{layout:"manual",getNode:function(e){return c.find((t=>t.data.id===e))},applyLayout(e){let{manualLayoutStatus:t,nodesRefRepository:o,lineLabelsRefRepository:a,normalizedLinesMap:r,nodeMovement:d}=e;if(0===c.length)return null;l(c,o,i),d&&(u=c.find((e=>e.id===d.id)),u&&(u.x=(u.x0??0)+d.move[0],u.y=(u.y0??0)+d.move[1])),"finished"===t&&u&&(u.x0=u.x,u.y0=u.y),s(c,o,i);const f=g(n,{normalizedLinesMap:r,lineLabelsRefRepository:a});return{nodes:c,edges:f}}}}(e,n,a,C):null))}),[a,n,P,C,b,x]),(0,o.useEffect)((()=>{if(!M||!R||P!==(null==S?void 0:S.layout))return;const e=null==S?void 0:S.applyLayout({manualLayoutStatus:k,nodesRefRepository:M,lineLabelsRefRepository:R,normalizedLinesMap:E,nodeMovement:w});e&&N(e)}),[P,k,S,w,M,R,L,$,E]),T}},9741:(e,t,n)=>{n.d(t,{_:()=>d});var o=n(8769),a=n(184),i=n(8406),r=n(6841),l=n(780);const s="GRAPH_USER_VIEW@EASYOPS";function d(e){const[t,n]=(0,o.useState)(!e),d=(0,o.useRef)(),[c,u]=(0,o.useState)(null),f=(0,o.useMemo)((()=>function(){let e=!1;const t=[];return async function(n){if(t.push(n),!e){let n;for(e=!0;n=t.shift();)try{await n()}catch(e){console.error(e)}e=!1}}}()),[]);return(0,o.useEffect)((()=>{!async function(){if(!e)return void n(!0);const{namespace:t,key:o}=e;if(!t||!o)return console.error("Namespace and key are required to save graph user view"),void n(!0);try{const e=(await(0,i.y)(s,{fields:["nodes"],query:{namespace:{$eq:t},key:{$eq:o}},page:1,page_size:30})).list;if(e.length>0){var r;const t=e[0],n=new Map(null===(r=t.nodes)||void 0===r?void 0:r.map((e=>[e.id,e])));d.current=t.instanceId,u(n)}else u(null)}catch(e){(0,a.handleHttpError)(e)}finally{n(!0)}}()}),[e]),{userViewReady:t,userViewNodesMap:c,saveUserView:(0,o.useCallback)((t=>{const{namespace:n,key:o}=e??{};n&&o&&f((async()=>{const e={namespace:n,key:o,nodes:t};try{if(d.current)await(0,r.x)(s,d.current,e,{interceptorParams:{ignoreLoadingBar:!0}});else{const t=await(0,l._)(s,e,{interceptorParams:{ignoreLoadingBar:!0}});d.current=t.instanceId}}catch(e){(0,a.handleHttpError)(e)}}))}),[e,f])}}},1324:(e,t,n)=>{function o(e,t){for(const{id:n,position:o,placement:a,angle:i,size:r}of e){const e=t.get(n);if(e&&(e.style.left=`${o[0]}px`,e.style.top=`${o[1]}px`,e.style.visibility="visible","center"!==a&&void 0!==i)){const[t,n]=r??[0,0],o=Math.floor((i<0?2*Math.PI+i:i)/Math.PI*4),l="start"===a?o:(o+4)%8,s=Math.tan(i),d=i+("start"===a?1:-1)*Math.PI/2,c=2,u=Math.sin(d)*c,f=Math.cos(d)*c;let p;switch(l){case 0:p=`translate(0,${t*s+u}px)`;break;case 1:p=`translate(${n/s-f}px,0)`;break;case 2:p=`translate(calc(${n/s+f}px - 100%),0)`;break;case 3:p=`translate(-100%,${-t*s-u}px)`;break;case 4:p=`translate(-100%,calc(${-t*s+u}px - 100%))`;break;case 5:p=`translate(calc(${-n/s-f}px - 100%),-100%)`;break;case 6:p=`translate(${-n/s+f}px,-100%)`;break;default:p=`translate(0,calc(${t*s-u}px - 100%))`}e.style.transform=p}}}n.d(t,{F:()=>o})},5987:(e,t,n)=>{function o(e,t){const n=new Map;for(const{id:o,lineId:a,placement:i}of e){if(!t||"center"!==i)continue;const e=t.get(o);if(!e)continue;const{offsetWidth:r,offsetHeight:l}=e;if(0===r||0===l)continue;const s=3;n.set(a,[{left:e.offsetLeft-r/2-s,top:e.offsetTop-l/2-s,width:r+2*s,height:l+2*s}])}return n}n.d(t,{G:()=>o})},8060:(e,t,n)=>{function o(e,t,n){return 0===e.length&&0===t.length?e:t.flatMap((e=>{let{line:{text:t,label:o,$id:a},edge:i,labelSize:r,angle:l}=e;const s=n.get(a);if(!t&&!o||!s||!s.getAttribute("d"))return[];let d,c;o?(d="label",c=[].concat(o)):(d="text",c=[].concat(t));const{x:u,y:f,width:p,height:m}=s.getBBox(),h=s.getTotalLength();return c.map((e=>{const t=e.placement??"center",n=s.getPointAtLength("start"===t?Math.min(0,h/2):"end"===t?Math.max(h-0,h/2):h/2);return{[d]:e,edge:i,position:[n.x,n.y],lineRect:{left:u,top:f,width:p,height:m},id:`${a}-${t}`,lineId:a,placement:t,angle:l,size:null==r?void 0:r[t]}}))}))}n.d(t,{z:()=>o})},9576:(e,t,n)=>{n.d(t,{R:()=>m});var o=n(482),a=n(4643),i=n(3488),r=n(6066),l=n(4993),s=n(3269);function d(e,t,n,d){if(!Array.isArray(e))return"";let u;switch(t){case"curveLinear":u=o.A;break;case"curveBumpX":u=a.dJ;break;case"curveBumpY":u=a.kl;break;case"curveMonotoneX":u=i.G;break;case"curveMonotoneY":u=i.N;break;case"curveNatural":u=r.A;break;default:u=l.Ay}const f=c(e[1],e[0],n),p=c(e[e.length-2],e[e.length-1],d);return(0,s.A)().x(((t,n)=>t.x-(0===n?f.x:n===e.length-1?p.x:0))).y(((t,n)=>t.y-(0===n?f.y:n===e.length-1?p.y:0))).curve(u)(e)}function c(e,t,n){if(!n)return{x:0,y:0};const{x:o,y:a}=e,{x:i,y:r}=t,l=n/Math.sqrt(Math.pow(i-o,2)+Math.pow(r-a,2));return{x:(i-o)*l,y:(r-a)*l}}var u=n(3188);function f(e,t,n){const{x:o,y:a,width:i,height:r}=e;switch(t){case"top":return{x:o-i/2+i*n,y:a-r/2};case"bottom":return{x:o-i/2+i*n,y:a+r/2};case"left":return{x:o-i/2,y:a-r/2+r*n};case"right":return{x:o+i/2,y:a-r/2+r*n}}}var p=n(733);function m(e,t,n){const o=new WeakMap,a=new Map,i=new Map;for(const e of t)a.set(e.id,e);for(const t of e){const{data:e}=t;o.set(e,t)}let r=!1;return n.map((t=>{var n,l;let{line:s,edge:c,markers:m,...y}=t;const v=o.get(c);if(!v)return;const k=(null===(n=m.find((e=>"default"===e.variant&&"start"===e.placement)))||void 0===n?void 0:n.offset)??0,b=(null===(l=m.find((e=>"default"===e.variant&&"end"===e.placement)))||void 0===l?void 0:l.offset)??0;let x,{points:w}=v;if(!w){const t=a.get(c.source),n=a.get(c.target);if(t&&n&&t!==n){if("polyline"===s.type){if(!(0,p.w)(t,n,k,b)){(()=>{if(r)return;r=!0;const t=(e,t)=>{let n=i.get(e);n||i.set(e,n=new Set);const o=a.get(t);o&&n.add(o)};for(const{data:{source:n,target:o}}of e)n!==o&&(t(n,o),t(o,n))})();const o=h(t,n,k),l=h(n,t,b),s=g(i.get(c.source)??[],t,o,k),d=g(i.get(c.target)??[],n,l,b);w=function(e,t,n,o,a,i){const r=f(e,n,a),l=f(t,o,i);let s,d;switch(n){case"top":case"bottom":s={x:r.x,y:(r.y+l.y)/2},d={x:l.x,y:s.y};break;default:s={x:(r.x+l.x)/2,y:r.y},d={x:s.x,y:l.y}}return[r,s,d,l]}(t,n,o,l,(s.indexOf(n)+1)/(s.length+1),(d.indexOf(t)+1)/(d.length+1))}}else w=(0,u.h)(t,n);if(w){const e=w[0],t=w[w.length-1];x=Math.atan2(t.y-e.y,t.x-e.x)}}}return{...y,markers:m,line:s,edge:c,d:d(w,s.curveType,k,b),angle:x,labelSize:v.labelSize}})).filter(Boolean)}function h(e,t,n){const o=Math.atan2(e.height+2*n,e.width+2*n),{x:a,y:i}=e,{x:r,y:l}=t,s=Math.atan2(l-i,r-a),d=s<0?2*Math.PI+s:s;switch(Math.floor(d/Math.PI*2)){case 0:return d<o?"right":"bottom";case 1:return d<Math.PI-o?"bottom":"left";case 2:return d<Math.PI+o?"left":"top";default:return d<2*Math.PI-o?"top":"right"}}function g(e,t,n,o){return[...e].filter((e=>h(t,e,o)===n)).sort(((e,t)=>{const{x:o,y:a}=e,{x:i,y:r}=t;return"top"===n||"bottom"===n?o-i:a-r}))}},5157:(e,t,n)=>{n.d(t,{a:()=>a});var o=n(1030);function a(e,t){let{renderedNodes:n,activeTarget:o}=t;const a="node"===(null==o?void 0:o.type)?n.find((e=>e.id===o.nodeId)):void 0,r="edge"===(null==o?void 0:o.type)?o.edge:void 0;if(!a&&!r)return;const l=e.key||e.keyCode||e.which;let s,d,c;switch(l){case"Backspace":case 8:case"Delete":case 46:a?(s="delete-node",d=a):(s="delete-edge",c=r);break;default:if(!a)return;switch(l){case"ArrowLeft":case 37:d=i("x",n,a,-1),s="switch-active-node";break;case"ArrowUp":case 38:d=i("y",n,a,-1),s="switch-active-node";break;case"ArrowRight":case 39:d=i("x",n,a,1),s="switch-active-node";break;case"ArrowDown":case 40:d=i("y",n,a,1),s="switch-active-node"}}var u;return s?(e.preventDefault(),e.stopPropagation(),{action:s,node:null===(u=d)||void 0===u?void 0:u.data,edge:c}):void 0}function i(e,t,n,a){const i="x"===e?"y":"x";let r;const l=t.filter((t=>t!==n&&(r=(t[e]-n[e])*a,r>0)&&r>Math.abs(n[i]-t[i])));return(0,o.minBy)(l,(t=>(n[i]-t[i])**2+(n[e]-t[e])**2))}},2448:(e,t,n)=>{n.d(t,{P:()=>i});var o=n(184),a=n(8657);function i(e,t){let{nodes:n,nodesRefRepository:i,connectNodes:r,dragNodes:l,scale:s,setConnectLineState:d,setConnectLineTo:c,setManualLayoutStatus:u,setNodeMovement:f,onSwitchActiveTarget:p,onNodesConnect:m}=t;function h(e){if(i)for(const[t,o]of i)if(e(o))return null==n?void 0:n.find((e=>e.id===t))}if(!r&&!l)return;const g=h((t=>t.contains(e.target)));if(!g)return;if(!function(e,t){return e.sourceType?[].concat(e.sourceType).includes(t.type):(0,o.checkIfByTransform)(e,{source:t})}(r||l,g))return;e.stopPropagation();const y=[e.clientX,e.clientY];if(r){d({from:y,options:{strokeColor:a.mF,strokeWidth:a.VO,...o.__secret_internals.legacyDoTransform({source:g},r)}}),c(y),null==p||p({type:"node",nodeId:g.id});const e=e=>{c([e.clientX,e.clientY])},t=n=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t),d(null);const o=n.composedPath(),a=h((e=>o.includes(e)));a&&g!==a&&(null==m||m({source:g,target:a}))};return document.addEventListener("mousemove",e),void document.addEventListener("mouseup",t)}null==p||p({type:"node",nodeId:g.id});let v=!1;const k=e=>{const t=[(e.clientX-y[0])/s,(e.clientY-y[1])/s];v||(v=t[0]**2+t[1]**2>=9,v&&u("started")),v&&f({id:g.id,move:t})},b=()=>{v=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",b),f(null),u("finished")};document.addEventListener("mousemove",k),document.addEventListener("mouseup",b)}},9137:(e,t,n)=>{n.d(t,{t:()=>l});var o=n(1030),a=n(184);function i(e,t){return!!t&&(t.edgeType?[].concat(t.edgeType).includes(e.type):(0,a.checkIfByTransform)(t,{edge:e}))}var r=n(8657);function l(e,t){const n=[],l=new WeakMap,d=[];for(const f of e??[]){const{label:e,...p}=(null==t?void 0:t.find((e=>i(f,e))))??{},m=a.__secret_internals.legacyDoTransform({edge:f},p);if(!1===(null==m?void 0:m.draw))continue;const h=(0,o.uniqueId)("line-"),g={strokeColor:r.mF,strokeWidth:r.VO,curveType:"polyline"===(null==m?void 0:m.type)?"curveLinear":r.KP,interactStrokeWidth:r.Ie,type:"auto",...m,label:e,$id:h};l.set(f,h);const y=[],v=g.markers??(g.arrow?[{placement:"end",type:"arrow"}]:[]);for(const e of v){var c,u;const{placement:t,type:n}=e,o=t??"end";let a,i;switch(n){case"0..1":case"0..N":i=21,a=n;break;default:i=1,a="arrow"}const r=i*g.strokeWidth,l=s({type:a,strokeColor:g.strokeColor},d);y.push({index:l,placement:o,type:a,variant:"default",offset:r});const f=s({type:a,strokeColor:(null===(c=g.overrides)||void 0===c||null===(c=c.active)||void 0===c?void 0:c.strokeColor)??g.strokeColor},d);y.push({index:f,placement:o,type:a,variant:"active",offset:r});const p=s({type:a,strokeColor:(null===(u=g.overrides)||void 0===u||null===(u=u.activeRelated)||void 0===u?void 0:u.strokeColor)??g.strokeColor},d);y.push({index:p,placement:o,type:a,variant:"active-related",offset:r})}n.push({line:g,markers:y,edge:f})}return{normalizedLines:n,normalizedLinesMap:l,markers:d}}function s(e,t){let n=(0,o.findIndex)(t,e);return-1===n&&(n=t.push(e)-1),n}},2673:(e,t,n)=>{function o(e,t){return e?!!t&&e.type===t.type&&("node"===e.type?e.nodeId===t.nodeId:e.edge.source===t.edge.source&&e.edge.target===t.edge.target):!t}n.d(t,{c:()=>o})},8308:(e,t,n)=>{function o(e,t){let{canvasWidth:n,canvasHeight:o,scaleRange:a}=t,i=1/0,r=1/0,l=-1/0,s=-1/0;for(const t of e){const e=t.width/2,n=t.height/2,o=t.x-e,a=t.x+e,d=t.y-n,c=t.y+n;o<i&&(i=o),a>l&&(l=a),d<r&&(r=d),c>s&&(s=c)}const d=l-i,c=s-r,u=a&&(d>n||c>o)?Math.max(Math.min(n/d,o/c,a[1]),a[0]):1;return{x:(n-d*u)/2-i*u,y:(o-c*u)/2-r*u,k:u}}n.d(t,{r:()=>o})},821:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(6758),a=n.n(o),i=n(935),r=n.n(i)()(a());r.push([e.id,":host{display:block;width:100%;height:100%;overflow:hidden}:host([hidden]){display:none}*{box-sizing:border-box}.diagram{width:100%;height:100%;position:relative;opacity:0}.diagram:focus{outline:none}.lines,\n.line-labels,\n.nodes{position:absolute;top:0;left:0}.line-labels{opacity:0}.ready{opacity:1}.diagram.ready.pannable{cursor:grab}.diagram.pannable.grabbing{cursor:grabbing}.nodes,\n.lines{transform-origin:0 0}.node,\n.line-label{position:absolute;visibility:hidden}.line-label{transform:translate(-50%,-50%);white-space:pre-line;width:max-content;text-align:center;line-height:1}.lines{pointer-events:none}.line.interactable{pointer-events:auto;cursor:default}.connect-line{position:fixed;top:0;left:0;right:0;bottom:0;pointer-events:none}.connect-line:not(.connecting){display:none}.line:not(.active) .active-bg{display:none}",""]);const l=r.toString()}}]);
2
- //# sourceMappingURL=2416.1dd136d0.js.map
@@ -1,3 +0,0 @@
1
- /*! For license information please see 3489.e0ce6106.js.LICENSE.txt */
2
- (globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[3489,2052],{7586:(t,e,n)=>{t.exports={graphlib:n(4678),layout:n(8870),debug:n(1665),util:{time:n(6856).time,notime:n(6856).notime},version:n(898)}},8642:(t,e,n)=>{"use strict";let r=n(6635),i=n(6856).uniqueId;t.exports={run:function(t){("greedy"===t.graph().acyclicer?r(t,function(t){return e=>t.edge(e).weight}(t)):function(t){let e=[],n={},r={};return t.nodes().forEach((function i(o){r.hasOwnProperty(o)||(r[o]=!0,n[o]=!0,t.outEdges(o).forEach((t=>{n.hasOwnProperty(t.w)?e.push(t):i(t.w)})),delete n[o])})),e}(t)).forEach((e=>{let n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,i("rev"))}))},undo:function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.reversed){t.removeEdge(e);let r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},6883:(t,e,n)=>{let r=n(6856);function i(t,e,n,i,o,a){let s={width:0,height:0,rank:a,borderType:e},u=o[e][a-1],h=r.addDummyNode(t,"border",s,n);o[e][a]=h,t.setParent(h,i),u&&t.setEdge(u,h,{weight:1})}t.exports=function(t){t.children().forEach((function e(n){let r=t.children(n),o=t.node(n);if(r.length&&r.forEach(e),o.hasOwnProperty("minRank")){o.borderLeft=[],o.borderRight=[];for(let e=o.minRank,r=o.maxRank+1;e<r;++e)i(t,"borderLeft","_bl",n,o,e),i(t,"borderRight","_br",n,o,e)}}))}},5574:t=>{"use strict";function e(t){t.nodes().forEach((e=>n(t.node(e)))),t.edges().forEach((e=>n(t.edge(e))))}function n(t){let e=t.width;t.width=t.height,t.height=e}function r(t){t.y=-t.y}function i(t){let e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){let n=t.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||e(t)},undo:function(t){let n=t.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(t){t.nodes().forEach((e=>r(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.points.forEach(r),n.hasOwnProperty("y")&&r(n)}))}(t),"lr"!==n&&"rl"!==n||(function(t){t.nodes().forEach((e=>i(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.points.forEach(i),n.hasOwnProperty("x")&&i(n)}))}(t),e(t))}}},1983:t=>{function e(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function n(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return e(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&e(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){let t=[],e=this._sentinel,r=e._prev;for(;r!==e;)t.push(JSON.stringify(r,n)),r=r._prev;return"["+t.join(", ")+"]"}}},1665:(t,e,n)=>{let r=n(6856),i=n(4678).Graph;t.exports={debugOrdering:function(t){let e=r.buildLayerMatrix(t),n=new i({compound:!0,multigraph:!0}).setGraph({});return t.nodes().forEach((e=>{n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),t.edges().forEach((t=>n.setEdge(t.v,t.w,{},t.name))),e.forEach(((t,e)=>{let r="layer"+e;n.setNode(r,{rank:"same"}),t.reduce(((t,e)=>(n.setEdge(t,e,{style:"invis"}),e)))})),n}}},6635:(t,e,n)=>{let r=n(4678).Graph,i=n(1983);t.exports=function(t,e){if(t.nodeCount()<=1)return[];let n=function(t,e){let n=new r,o=0,a=0;t.nodes().forEach((t=>{n.setNode(t,{v:t,in:0,out:0})})),t.edges().forEach((t=>{let r=n.edge(t.v,t.w)||0,i=e(t),s=r+i;n.setEdge(t.v,t.w,s),a=Math.max(a,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i)}));let u=function(t){const e=[];for(let n=0;n<t;n++)e.push(n);return e}(a+o+3).map((()=>new i)),h=o+1;return n.nodes().forEach((t=>{s(u,h,n.node(t))})),{graph:n,buckets:u,zeroIdx:h}}(t,e||o);return function(t,e,n){let r,i=[],o=e[e.length-1],s=e[0];for(;t.nodeCount();){for(;r=s.dequeue();)a(t,e,n,r);for(;r=o.dequeue();)a(t,e,n,r);if(t.nodeCount())for(let o=e.length-2;o>0;--o)if(r=e[o].dequeue(),r){i=i.concat(a(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx).flatMap((e=>t.outEdges(e.v,e.w)))};let o=()=>1;function a(t,e,n,r,i){let o=i?[]:void 0;return t.inEdges(r.v).forEach((r=>{let a=t.edge(r),u=t.node(r.v);i&&o.push({v:r.v,w:r.w}),u.out-=a,s(e,n,u)})),t.outEdges(r.v).forEach((r=>{let i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,s(e,n,a)})),t.removeNode(r.v),o}function s(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},8870:(t,e,n)=>{"use strict";let r=n(8642),i=n(1293),o=n(3045),a=n(6856).normalizeRanks,s=n(2488),u=n(6856).removeEmptyRanks,h=n(9885),c=n(6883),l=n(5574),f=n(5577),d=n(8924),p=n(6856),g=n(4678).Graph;t.exports=function(t,e){let n=e&&e.debugTiming?p.time:p.notime;n("layout",(()=>{let A=n(" buildLayoutGraph",(()=>function(t){let e=new g({multigraph:!0,compound:!0}),n=N(t.graph());return e.setGraph(Object.assign({},y,k(n,v),p.pick(n,m))),t.nodes().forEach((n=>{const r=k(N(t.node(n)),_);Object.keys(w).forEach((t=>{void 0===r[t]&&(r[t]=w[t])})),e.setNode(n,r),e.setParent(n,t.parent(n))})),t.edges().forEach((n=>{let r=N(t.edge(n));e.setEdge(n,Object.assign({},x,k(r,b),p.pick(r,E)))})),e}(t)));n(" runLayout",(()=>function(t,e,n){e(" makeSpaceForEdgeLabels",(()=>function(t){let e=t.graph();e.ranksep/=2,t.edges().forEach((n=>{let r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t))),e(" removeSelfEdges",(()=>function(t){t.edges().forEach((e=>{if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}}))}(t))),e(" acyclic",(()=>r.run(t))),e(" nestingGraph.run",(()=>h.run(t))),e(" rank",(()=>o(p.asNonCompoundGraph(t)))),e(" injectEdgeLabelProxies",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.width&&n.height){let n=t.node(e.v),r={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e};p.addDummyNode(t,"edge-proxy",r,"_ep")}}))}(t))),e(" removeEmptyRanks",(()=>u(t))),e(" nestingGraph.cleanup",(()=>h.cleanup(t))),e(" normalizeRanks",(()=>a(t))),e(" assignRankMinMax",(()=>function(t){let e=0;t.nodes().forEach((n=>{let r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=Math.max(e,r.maxRank))})),t.graph().maxRank=e}(t))),e(" removeEdgeLabelProxies",(()=>function(t){t.nodes().forEach((e=>{let n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t))),e(" normalize.run",(()=>i.run(t))),e(" parentDummyChains",(()=>s(t))),e(" addBorderSegments",(()=>c(t))),e(" order",(()=>f(t,n))),e(" insertSelfEdges",(()=>function(t){p.buildLayerMatrix(t).forEach((e=>{var n=0;e.forEach(((e,r)=>{var i=t.node(e);i.order=r+n,(i.selfEdges||[]).forEach((e=>{p.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")})),delete i.selfEdges}))}))}(t))),e(" adjustCoordinateSystem",(()=>l.adjust(t))),e(" position",(()=>d(t))),e(" positionSelfEdges",(()=>function(t){t.nodes().forEach((e=>{var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(t))),e(" removeBorderNodes",(()=>function(t){t.nodes().forEach((e=>{if(t.children(e).length){let n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),o=t.node(n.borderLeft[n.borderLeft.length-1]),a=t.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(a.x-o.x),n.height=Math.abs(i.y-r.y),n.x=o.x+n.width/2,n.y=r.y+n.height/2}})),t.nodes().forEach((e=>{"border"===t.node(e).dummy&&t.removeNode(e)}))}(t))),e(" normalize.undo",(()=>i.undo(t))),e(" fixupEdgeLabelCoords",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.hasOwnProperty("x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t))),e(" undoCoordinateSystem",(()=>l.undo(t))),e(" translateGraph",(()=>function(t){let e=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,o=t.graph(),a=o.marginx||0,s=o.marginy||0;function u(t){let o=t.x,a=t.y,s=t.width,u=t.height;e=Math.min(e,o-s/2),n=Math.max(n,o+s/2),r=Math.min(r,a-u/2),i=Math.max(i,a+u/2)}t.nodes().forEach((e=>u(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.hasOwnProperty("x")&&u(n)})),e-=a,r-=s,t.nodes().forEach((n=>{let i=t.node(n);i.x-=e,i.y-=r})),t.edges().forEach((n=>{let i=t.edge(n);i.points.forEach((t=>{t.x-=e,t.y-=r})),i.hasOwnProperty("x")&&(i.x-=e),i.hasOwnProperty("y")&&(i.y-=r)})),o.width=n-e+a,o.height=i-r+s}(t))),e(" assignNodeIntersects",(()=>function(t){t.edges().forEach((e=>{let n,r,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(p.intersectRect(o,n)),i.points.push(p.intersectRect(a,r))}))}(t))),e(" reversePoints",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);n.reversed&&n.points.reverse()}))}(t))),e(" acyclic.undo",(()=>r.undo(t)))}(A,n,e))),n(" updateInputGraph",(()=>function(t,e){t.nodes().forEach((n=>{let r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,e.children(n).length&&(r.width=i.width,r.height=i.height))})),t.edges().forEach((n=>{let r=t.edge(n),i=e.edge(n);r.points=i.points,i.hasOwnProperty("x")&&(r.x=i.x,r.y=i.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,A)))}))};let v=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},m=["acyclicer","ranker","rankdir","align"],_=["width","height"],w={width:0,height:0},b=["minlen","weight","width","height","labeloffset"],x={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function k(t,e){return p.mapValues(p.pick(t,e),Number)}function N(t){var e={};return t&&Object.entries(t).forEach((([t,n])=>{"string"==typeof t&&(t=t.toLowerCase()),e[t]=n})),e}},9885:(t,e,n)=>{let r=n(6856);function i(t,e,n,o,a,s,u){let h=t.children(u);if(!h.length)return void(u!==e&&t.setEdge(e,u,{weight:0,minlen:n}));let c=r.addBorderNode(t,"_bt"),l=r.addBorderNode(t,"_bb"),f=t.node(u);t.setParent(c,u),f.borderTop=c,t.setParent(l,u),f.borderBottom=l,h.forEach((r=>{i(t,e,n,o,a,s,r);let h=t.node(r),f=h.borderTop?h.borderTop:r,d=h.borderBottom?h.borderBottom:r,p=h.borderTop?o:2*o,g=f!==d?1:a-s[u]+1;t.setEdge(c,f,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,l,{weight:p,minlen:g,nestingEdge:!0})})),t.parent(u)||t.setEdge(e,c,{weight:0,minlen:a+s[u]})}t.exports={run:function(t){let e=r.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(r,i){var o=t.children(r);o&&o.length&&o.forEach((t=>n(t,i+1))),e[r]=i}return t.children().forEach((t=>n(t,1))),e}(t),o=Math.max(...Object.values(n))-1,a=2*o+1;t.graph().nestingRoot=e,t.edges().forEach((e=>t.edge(e).minlen*=a));let s=function(t){return t.edges().reduce(((e,n)=>e+t.edge(n).weight),0)}(t)+1;t.children().forEach((r=>i(t,e,a,s,o,n,r))),t.graph().nodeRankFactor=a},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,t.edges().forEach((e=>{t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},1293:(t,e,n)=>{"use strict";let r=n(6856);t.exports={run:function(t){t.graph().dummyChains=[],t.edges().forEach((e=>function(t,e){let n,i,o,a=e.v,s=t.node(a).rank,u=e.w,h=t.node(u).rank,c=e.name,l=t.edge(e),f=l.labelRank;if(h!==s+1){for(t.removeEdge(e),o=0,++s;s<h;++o,++s)l.points=[],i={width:0,height:0,edgeLabel:l,edgeObj:e,rank:s},n=r.addDummyNode(t,"edge",i,"_d"),s===f&&(i.width=l.width,i.height=l.height,i.dummy="edge-label",i.labelpos=l.labelpos),t.setEdge(a,n,{weight:l.weight},c),0===o&&t.graph().dummyChains.push(n),a=n;t.setEdge(a,u,{weight:l.weight},c)}}(t,e)))},undo:function(t){t.graph().dummyChains.forEach((e=>{let n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},7508:t=>{t.exports=function(t,e,n){let r,i={};n.forEach((n=>{let o,a,s=t.parent(n);for(;s;){if(o=t.parent(s),o?(a=i[o],i[o]=s):(a=r,r=s),a&&a!==s)return void e.setEdge(a,s);s=o}}))}},4592:t=>{t.exports=function(t,e=[]){return e.map((e=>{let n=t.inEdges(e);if(n.length){let r=n.reduce(((e,n)=>{let r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:r.sum/r.weight,weight:r.weight}}return{v:e}}))}},4600:(t,e,n)=>{let r=n(4678).Graph,i=n(6856);t.exports=function(t,e,n){let o=function(t){for(var e;t.hasNode(e=i.uniqueId("_root")););return e}(t),a=new r({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((e=>t.node(e)));return t.nodes().forEach((r=>{let i=t.node(r),s=t.parent(r);(i.rank===e||i.minRank<=e&&e<=i.maxRank)&&(a.setNode(r),a.setParent(r,s||o),t[n](r).forEach((e=>{let n=e.v===r?e.w:e.v,i=a.edge(n,r),o=void 0!==i?i.weight:0;a.setEdge(n,r,{weight:t.edge(e).weight+o})})),i.hasOwnProperty("minRank")&&a.setNode(r,{borderLeft:i.borderLeft[e],borderRight:i.borderRight[e]}))})),a}},835:(t,e,n)=>{"use strict";let r=n(6856).zipObject;function i(t,e,n){let i=r(n,n.map(((t,e)=>e))),o=e.flatMap((e=>t.outEdges(e).map((e=>({pos:i[e.w],weight:t.edge(e).weight}))).sort(((t,e)=>t.pos-e.pos)))),a=1;for(;a<n.length;)a<<=1;let s=2*a-1;a-=1;let u=new Array(s).fill(0),h=0;return o.forEach((t=>{let e=t.pos+a;u[e]+=t.weight;let n=0;for(;e>0;)e%2&&(n+=u[e+1]),e=e-1>>1,u[e]+=t.weight;h+=t.weight*n})),h}t.exports=function(t,e){let n=0;for(let r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},5577:(t,e,n)=>{"use strict";let r=n(6498),i=n(835),o=n(2804),a=n(4600),s=n(7508),u=n(4678).Graph,h=n(6856);function c(t,e,n){return e.map((function(e){return a(t,e,n)}))}function l(t,e){let n=new u;t.forEach((function(t){let r=t.graph().root,i=o(t,r,n,e);i.vs.forEach(((e,n)=>t.node(e).order=n)),s(t,n,i.vs)}))}function f(t,e){Object.values(e).forEach((e=>e.forEach(((e,n)=>t.node(e).order=n))))}t.exports=function t(e,n){if(n&&"function"==typeof n.customOrder)return void n.customOrder(e,t);let o=h.maxRank(e),a=c(e,h.range(1,o+1),"inEdges"),s=c(e,h.range(o-1,-1,-1),"outEdges"),u=r(e);if(f(e,u),n&&n.disableOptimalOrderHeuristic)return;let d,p=Number.POSITIVE_INFINITY;for(let t=0,n=0;n<4;++t,++n){l(t%2?a:s,t%4>=2),u=h.buildLayerMatrix(e);let r=i(e,u);r<p&&(n=0,d=Object.assign({},u),p=r)}f(e,d)}},6498:(t,e,n)=>{"use strict";let r=n(6856);t.exports=function(t){let e={},n=t.nodes().filter((e=>!t.children(e).length)),i=Math.max(...n.map((e=>t.node(e).rank))),o=r.range(i+1).map((()=>[]));return n.sort(((e,n)=>t.node(e).rank-t.node(n).rank)).forEach((function n(r){if(e[r])return;e[r]=!0;let i=t.node(r);o[i.rank].push(r),t.successors(r).forEach(n)})),o}},2635:(t,e,n)=>{"use strict";let r=n(6856);t.exports=function(t,e){let n={};return t.forEach(((t,e)=>{let r=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};void 0!==t.barycenter&&(r.barycenter=t.barycenter,r.weight=t.weight)})),e.edges().forEach((t=>{let e=n[t.v],r=n[t.w];void 0!==e&&void 0!==r&&(r.indegree++,e.out.push(n[t.w]))})),function(t){let e=[];function n(t){return e=>{e.merged||(void 0===e.barycenter||void 0===t.barycenter||e.barycenter>=t.barycenter)&&function(t,e){let n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return n=>{n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){let r=t.pop();e.push(r),r.in.reverse().forEach(n(r)),r.out.forEach(i(r))}return e.filter((t=>!t.merged)).map((t=>r.pick(t,["vs","i","barycenter","weight"])))}(Object.values(n).filter((t=>!t.indegree)))}},2804:(t,e,n)=>{let r=n(4592),i=n(2635),o=n(5437);t.exports=function t(e,n,a,s){let u=e.children(n),h=e.node(n),c=h?h.borderLeft:void 0,l=h?h.borderRight:void 0,f={};c&&(u=u.filter((t=>t!==c&&t!==l)));let d=r(e,u);d.forEach((n=>{if(e.children(n.v).length){let o=t(e,n.v,a,s);f[n.v]=o,o.hasOwnProperty("barycenter")&&(i=o,void 0!==(r=n).barycenter?(r.barycenter=(r.barycenter*r.weight+i.barycenter*i.weight)/(r.weight+i.weight),r.weight+=i.weight):(r.barycenter=i.barycenter,r.weight=i.weight))}var r,i}));let p=i(d,a);!function(t,e){t.forEach((t=>{t.vs=t.vs.flatMap((t=>e[t]?e[t].vs:t))}))}(p,f);let g=o(p,s);if(c&&(g.vs=[c,g.vs,l].flat(!0),e.predecessors(c).length)){let t=e.node(e.predecessors(c)[0]),n=e.node(e.predecessors(l)[0]);g.hasOwnProperty("barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+t.order+n.order)/(g.weight+2),g.weight+=2}return g}},5437:(t,e,n)=>{let r=n(6856);function i(t,e,n){let r;for(;e.length&&(r=e[e.length-1]).i<=n;)e.pop(),t.push(r.vs),n++;return n}t.exports=function(t,e){let n=r.partition(t,(t=>t.hasOwnProperty("barycenter"))),o=n.lhs,a=n.rhs.sort(((t,e)=>e.i-t.i)),s=[],u=0,h=0,c=0;var l;o.sort((l=!!e,(t,e)=>t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:l?e.i-t.i:t.i-e.i)),c=i(s,a,c),o.forEach((t=>{c+=t.vs.length,s.push(t.vs),u+=t.barycenter*t.weight,h+=t.weight,c=i(s,a,c)}));let f={vs:s.flat(!0)};return h&&(f.barycenter=u/h,f.weight=h),f}},2488:t=>{t.exports=function(t){let e=function(t){let e={},n=0;return t.children().forEach((function r(i){let o=n;t.children(i).forEach(r),e[i]={low:o,lim:n++}})),e}(t);t.graph().dummyChains.forEach((n=>{let r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){let i,o,a=[],s=[],u=Math.min(e[n].low,e[r].low),h=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>u||h>e[i].lim));for(o=i,i=r;(i=t.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,s=o.lca,u=0,h=a[u],c=!0;for(;n!==i.w;){if(r=t.node(n),c){for(;(h=a[u])!==s&&t.node(h).maxRank<r.rank;)u++;h===s&&(c=!1)}if(!c){for(;u<a.length-1&&t.node(h=a[u+1]).minRank<=r.rank;)u++;h=a[u]}t.setParent(n,h),n=t.successors(n)[0]}}))}},8121:(t,e,n)=>{"use strict";let r=n(4678).Graph,i=n(6856);function o(t,e){let n={};return e.length&&e.reduce((function(e,r){let i=0,o=0,a=e.length,u=r[r.length-1];return r.forEach(((e,h)=>{let c=function(t,e){if(t.node(e).dummy)return t.predecessors(e).find((e=>t.node(e).dummy))}(t,e),l=c?t.node(c).order:a;(c||e===u)&&(r.slice(o,h+1).forEach((e=>{t.predecessors(e).forEach((r=>{let o=t.node(r),a=o.order;!(a<i||l<a)||o.dummy&&t.node(e).dummy||s(n,r,e)}))})),o=h+1,i=l)})),r})),n}function a(t,e){let n={};function r(e,r,o,a,u){let h;i.range(r,o).forEach((r=>{h=e[r],t.node(h).dummy&&t.predecessors(h).forEach((e=>{let r=t.node(e);r.dummy&&(r.order<a||r.order>u)&&s(n,e,h)}))}))}return e.length&&e.reduce((function(e,n){let i,o=-1,a=0;return n.forEach(((s,u)=>{if("border"===t.node(s).dummy){let e=t.predecessors(s);e.length&&(i=t.node(e[0]).order,r(n,a,u,o,i),a=u,o=i)}r(n,a,n.length,i,e.length)})),n})),n}function s(t,e,n){if(e>n){let t=e;e=n,n=t}let r=t[e];r||(t[e]=r={}),r[n]=!0}function u(t,e,n){if(e>n){let t=e;e=n,n=t}return!!t[e]&&t[e].hasOwnProperty(n)}function h(t,e,n,r){let i={},o={},a={};return e.forEach((t=>{t.forEach(((t,e)=>{i[t]=t,o[t]=t,a[t]=e}))})),e.forEach((t=>{let e=-1;t.forEach((t=>{let s=r(t);if(s.length){s=s.sort(((t,e)=>a[t]-a[e]));let r=(s.length-1)/2;for(let h=Math.floor(r),c=Math.ceil(r);h<=c;++h){let r=s[h];o[t]===t&&e<a[r]&&!u(n,t,r)&&(o[r]=t,o[t]=i[t]=i[r],e=a[r])}}}))})),{root:i,align:o}}function c(t,e,n,i,o){let a={},s=function(t,e,n,i){let o=new r,a=t.graph(),s=function(t,e,n){return(r,i,o)=>{let a,s=r.node(i),u=r.node(o),h=0;if(h+=s.width/2,s.hasOwnProperty("labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2}if(a&&(h+=n?a:-a),a=0,h+=(s.dummy?e:t)/2,h+=(u.dummy?e:t)/2,h+=u.width/2,u.hasOwnProperty("labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=u.width/2;break;case"r":a=-u.width/2}return a&&(h+=n?a:-a),a=0,h}}(a.nodesep,a.edgesep,i);return e.forEach((e=>{let r;e.forEach((e=>{let i=n[e];if(o.setNode(i),r){var a=n[r],u=o.edge(a,i);o.setEdge(a,i,Math.max(s(t,e,r),u||0))}r=e}))})),o}(t,e,n,o),u=o?"borderLeft":"borderRight";function h(t,e){let n=s.nodes(),r=n.pop(),i={};for(;r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return h((function(t){a[t]=s.inEdges(t).reduce(((t,e)=>Math.max(t,a[e.v]+s.edge(e))),0)}),s.predecessors.bind(s)),h((function(e){let n=s.outEdges(e).reduce(((t,e)=>Math.min(t,a[e.w]-s.edge(e))),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(a[e]=Math.max(a[e],n))}),s.successors.bind(s)),Object.keys(i).forEach((t=>a[t]=a[n[t]])),a}function l(t,e){return Object.values(e).reduce(((e,n)=>{let r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(n).forEach((([e,n])=>{let o=function(t,e){return t.node(e).width}(t,e)/2;r=Math.max(n+o,r),i=Math.min(n-o,i)}));const o=r-i;return o<e[0]&&(e=[o,n]),e}),[Number.POSITIVE_INFINITY,null])[1]}function f(t,e){let n=Object.values(e),r=Math.min(...n),o=Math.max(...n);["u","d"].forEach((n=>{["l","r"].forEach((a=>{let s=n+a,u=t[s];if(u===e)return;let h=Object.values(u),c=r-Math.min(...h);"l"!==a&&(c=o-Math.max(...h)),c&&(t[s]=i.mapValues(u,(t=>t+c)))}))}))}function d(t,e){return i.mapValues(t.ul,((n,r)=>{if(e)return t[e.toLowerCase()][r];{let e=Object.values(t).map((t=>t[r])).sort(((t,e)=>t-e));return(e[1]+e[2])/2}}))}t.exports={positionX:function(t){let e,n=i.buildLayerMatrix(t),r=Object.assign(o(t,n),a(t,n)),s={};["u","d"].forEach((o=>{e="u"===o?n:Object.values(n).reverse(),["l","r"].forEach((n=>{"r"===n&&(e=e.map((t=>Object.values(t).reverse())));let a=("u"===o?t.predecessors:t.successors).bind(t),u=h(0,e,r,a),l=c(t,e,u.root,u.align,"r"===n);"r"===n&&(l=i.mapValues(l,(t=>-t))),s[o+n]=l}))}));let u=l(t,s);return f(s,u),d(s,t.graph().align)},findType1Conflicts:o,findType2Conflicts:a,addConflict:s,hasConflict:u,verticalAlignment:h,horizontalCompaction:c,alignCoordinates:f,findSmallestWidthAlignment:l,balance:d}},8924:(t,e,n)=>{"use strict";let r=n(6856),i=n(8121).positionX;t.exports=function(t){(function(t){let e=r.buildLayerMatrix(t),n=t.graph().ranksep,i=0;e.forEach((e=>{const r=e.reduce(((e,n)=>{const r=t.node(n).height;return e>r?e:r}),0);e.forEach((e=>t.node(e).y=i+r/2)),i+=r+n}))})(t=r.asNonCompoundGraph(t)),Object.entries(i(t)).forEach((([e,n])=>t.node(e).x=n))}},7885:(t,e,n)=>{"use strict";var r=n(4678).Graph,i=n(4389).slack;function o(t,e){return t.nodes().forEach((function n(r){e.nodeEdges(r).forEach((o=>{var a=o.v,s=r===a?o.w:a;t.hasNode(s)||i(e,o)||(t.setNode(s,{}),t.setEdge(r,s,{}),n(s))}))})),t.nodeCount()}function a(t,e){return e.edges().reduce(((n,r)=>{let o=Number.POSITIVE_INFINITY;return t.hasNode(r.v)!==t.hasNode(r.w)&&(o=i(e,r)),o<n[0]?[o,r]:n}),[Number.POSITIVE_INFINITY,null])[1]}function s(t,e,n){t.nodes().forEach((t=>e.node(t).rank+=n))}t.exports=function(t){var e,n,u=new r({directed:!1}),h=t.nodes()[0],c=t.nodeCount();for(u.setNode(h,{});o(u,t)<c;)e=a(u,t),n=u.hasNode(e.v)?i(t,e):-i(t,e),s(u,t,n);return u}},3045:(t,e,n)=>{"use strict";var r=n(4389).longestPath,i=n(7885),o=n(7520);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":default:!function(t){o(t)}(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":a(t)}};var a=r},7520:(t,e,n)=>{"use strict";var r=n(7885),i=n(4389).slack,o=n(4389).longestPath,a=n(4678).alg.preorder,s=n(4678).alg.postorder,u=n(6856).simplify;function h(t){t=u(t),o(t);var e,n=r(t);for(f(n),c(n,t);e=p(n);)v(n,t,e,g(n,t,e))}function c(t,e){var n=s(t,t.nodes());(n=n.slice(0,n.length-1)).forEach((n=>function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=l(t,e,n)}(t,e,n)))}function l(t,e,n){var r=t.node(n).parent,i=!0,o=e.edge(n,r),a=0;return o||(i=!1,o=e.edge(r,n)),a=o.weight,e.nodeEdges(n).forEach((o=>{var s,u,h=o.v===n,c=h?o.w:o.v;if(c!==r){var l=h===i,f=e.edge(o).weight;if(a+=l?f:-f,s=n,u=c,t.hasEdge(s,u)){var d=t.edge(n,c).cutvalue;a+=l?-d:d}}})),a}function f(t,e){arguments.length<2&&(e=t.nodes()[0]),d(t,{},1,e)}function d(t,e,n,r,i){var o=n,a=t.node(r);return e[r]=!0,t.neighbors(r).forEach((i=>{e.hasOwnProperty(i)||(n=d(t,e,n,i,r))})),a.low=o,a.lim=n++,i?a.parent=i:delete a.parent,n}function p(t){return t.edges().find((e=>t.edge(e).cutvalue<0))}function g(t,e,n){var r=n.v,o=n.w;e.hasEdge(r,o)||(r=n.w,o=n.v);var a=t.node(r),s=t.node(o),u=a,h=!1;a.lim>s.lim&&(u=s,h=!0);var c=e.edges().filter((e=>h===y(0,t.node(e.v),u)&&h!==y(0,t.node(e.w),u)));return c.reduce(((t,n)=>i(e,n)<i(e,t)?n:t))}function v(t,e,n,r){var i=n.v,o=n.w;t.removeEdge(i,o),t.setEdge(r.v,r.w,{}),f(t),c(t,e),function(t,e){var n=t.nodes().find((t=>!e.node(t).parent)),r=a(t,n);(r=r.slice(1)).forEach((n=>{var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)}))}(t,e)}function y(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=h,h.initLowLimValues=f,h.initCutValues=c,h.calcCutValue=l,h.leaveEdge=p,h.enterEdge=g,h.exchangeEdges=v},4389:t=>{"use strict";t.exports={longestPath:function(t){var e={};t.sources().forEach((function n(r){var i=t.node(r);if(e.hasOwnProperty(r))return i.rank;e[r]=!0;var o=Math.min(...t.outEdges(r).map((e=>null==e?Number.POSITIVE_INFINITY:n(e.w)-t.edge(e).minlen)));return o===Number.POSITIVE_INFINITY&&(o=0),i.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},6856:(t,e,n)=>{"use strict";let r=n(4678).Graph;function i(t,e,n,r){let i;do{i=s(r)}while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function o(t){return Math.max(...t.nodes().map((e=>{let n=t.node(e).rank;return void 0===n?Number.MIN_VALUE:n})))}t.exports={addBorderNode:function(t,e,n,r){let o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),i(t,"border",o,e)},addDummyNode:i,asNonCompoundGraph:function(t){let e=new r({multigraph:t.isMultigraph()}).setGraph(t.graph());return t.nodes().forEach((n=>{t.children(n).length||e.setNode(n,t.node(n))})),t.edges().forEach((n=>{e.setEdge(n,t.edge(n))})),e},buildLayerMatrix:function(t){let e=u(o(t)+1).map((()=>[]));return t.nodes().forEach((n=>{let r=t.node(n),i=r.rank;void 0!==i&&(e[i][r.order]=n)})),e},intersectRect:function(t,e){let n,r,i=t.x,o=t.y,a=e.x-i,s=e.y-o,u=t.width/2,h=t.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(a)*h?(s<0&&(h=-h),n=h*a/s,r=h):(a<0&&(u=-u),n=u,r=u*s/a),{x:i+n,y:o+r}},mapValues:function(t,e){let n=e;return"string"==typeof e&&(n=t=>t[e]),Object.entries(t).reduce(((t,[e,r])=>(t[e]=n(r,e),t)),{})},maxRank:o,normalizeRanks:function(t){let e=Math.min(...t.nodes().map((e=>{let n=t.node(e).rank;return void 0===n?Number.MAX_VALUE:n})));t.nodes().forEach((n=>{let r=t.node(n);r.hasOwnProperty("rank")&&(r.rank-=e)}))},notime:function(t,e){return e()},partition:function(t,e){let n={lhs:[],rhs:[]};return t.forEach((t=>{e(t)?n.lhs.push(t):n.rhs.push(t)})),n},pick:function(t,e){const n={};for(const r of e)void 0!==t[r]&&(n[r]=t[r]);return n},predecessorWeights:function(t){let e=t.nodes().map((e=>{let n={};return t.inEdges(e).forEach((e=>{n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return h(t.nodes(),e)},range:u,removeEmptyRanks:function(t){let e=Math.min(...t.nodes().map((e=>t.node(e).rank))),n=[];t.nodes().forEach((r=>{let i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));let r=0,i=t.graph().nodeRankFactor;Array.from(n).forEach(((e,n)=>{void 0===e&&n%i!=0?--r:void 0!==e&&r&&e.forEach((e=>t.node(e).rank+=r))}))},simplify:function(t){let e=(new r).setGraph(t.graph());return t.nodes().forEach((n=>e.setNode(n,t.node(n)))),t.edges().forEach((n=>{let r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},successorWeights:function(t){let e=t.nodes().map((e=>{let n={};return t.outEdges(e).forEach((e=>{n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return h(t.nodes(),e)},time:function(t,e){let n=Date.now();try{return e()}finally{console.log(t+" time: "+(Date.now()-n)+"ms")}},uniqueId:s,zipObject:h};let a=0;function s(t){var e=++a;return toString(t)+e}function u(t,e,n=1){null==e&&(e=t,t=0);let r=t=>t<e;n<0&&(r=t=>e<t);const i=[];for(let e=t;r(e);e+=n)i.push(e);return i}function h(t,e){return t.reduce(((t,n,r)=>(t[n]=e[r],t)),{})}},898:t=>{t.exports="1.1.3"},4678:(t,e,n)=>{var r=n(2314);t.exports={Graph:r.Graph,json:n(2258),alg:n(6311),version:r.version}},2335:t=>{t.exports=function(t){var e,n={},r=[];function i(r){n.hasOwnProperty(r)||(n[r]=!0,e.push(r),t.successors(r).forEach(i),t.predecessors(r).forEach(i))}return t.nodes().forEach((function(t){e=[],i(t),e.length&&r.push(e)})),r}},6248:t=>{function e(t,e,n,i){for(var o=[[t,!1]];o.length>0;){var a=o.pop();a[1]?i.push(a[0]):n.hasOwnProperty(a[0])||(n[a[0]]=!0,o.push([a[0],!0]),r(e(a[0]),(t=>o.push([t,!1]))))}}function n(t,e,n,i){for(var o=[t];o.length>0;){var a=o.pop();n.hasOwnProperty(a)||(n[a]=!0,i.push(a),r(e(a),(t=>o.push(t))))}}function r(t,e){for(var n=t.length;n--;)e(t[n],n,t);return t}t.exports=function(t,r,i){Array.isArray(r)||(r=[r]);var o=t.isDirected()?e=>t.successors(e):e=>t.neighbors(e),a="post"===i?e:n,s=[],u={};return r.forEach((e=>{if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);a(e,o,u,s)})),s}},3651:(t,e,n)=>{var r=n(4237);t.exports=function(t,e,n){return t.nodes().reduce((function(i,o){return i[o]=r(t,o,e,n),i}),{})}},4237:(t,e,n)=>{var r=n(1997);t.exports=function(t,e,n,o){return function(t,e,n,i){var o,a,s={},u=new r,h=function(t){var e=t.v!==o?t.v:t.w,r=s[e],i=n(t),h=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);h<r.distance&&(r.distance=h,r.predecessor=o,u.decrease(e,h))};for(t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},u.add(t,n)}));u.size()>0&&(o=u.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)i(o).forEach(h);return s}(t,String(e),n||i,o||function(e){return t.outEdges(e)})};var i=()=>1},402:(t,e,n)=>{var r=n(3911);t.exports=function(t){return r(t).filter((function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},3242:t=>{t.exports=function(t,n,r){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[t],i=e[n],a=o[n],s=r.distance+i.distance;s<a.distance&&(a.distance=s,a.predecessor=i.predecessor)}))}))})),r}(t,n||e,r||function(e){return t.outEdges(e)})};var e=()=>1},6311:(t,e,n)=>{t.exports={components:n(2335),dijkstra:n(4237),dijkstraAll:n(3651),findCycles:n(402),floydWarshall:n(3242),isAcyclic:n(1158),postorder:n(9289),preorder:n(1924),prim:n(9763),tarjan:n(3911),topsort:n(1964)}},1158:(t,e,n)=>{var r=n(1964);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},9289:(t,e,n)=>{var r=n(6248);t.exports=function(t,e){return r(t,e,"post")}},1924:(t,e,n)=>{var r=n(6248);t.exports=function(t,e){return r(t,e,"pre")}},9763:(t,e,n)=>{var r=n(8114),i=n(1997);t.exports=function(t,e){var n,o=new r,a={},s=new i;function u(t){var r=t.v===n?t.w:t.v,i=s.priority(r);if(void 0!==i){var o=e(t);o<i&&(a[r]=n,s.decrease(r,o))}}if(0===t.nodeCount())return o;t.nodes().forEach((function(t){s.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),s.decrease(t.nodes()[0],0);for(var h=!1;s.size()>0;){if(n=s.removeMin(),a.hasOwnProperty(n))o.setEdge(n,a[n]);else{if(h)throw new Error("Input graph is not connected: "+t);h=!0}t.nodeEdges(n).forEach(u)}return o}},3911:t=>{t.exports=function(t){var e=0,n=[],r={},i=[];function o(a){var s=r[a]={onStack:!0,lowlink:e,index:e++};if(n.push(a),t.successors(a).forEach((function(t){r.hasOwnProperty(t)?r[t].onStack&&(s.lowlink=Math.min(s.lowlink,r[t].index)):(o(t),s.lowlink=Math.min(s.lowlink,r[t].lowlink))})),s.lowlink===s.index){var u,h=[];do{u=n.pop(),r[u].onStack=!1,h.push(u)}while(a!==u);i.push(h)}}return t.nodes().forEach((function(t){r.hasOwnProperty(t)||o(t)})),i}},1964:t=>{function e(t){var e={},r={},i=[];if(t.sinks().forEach((function o(a){if(r.hasOwnProperty(a))throw new n;e.hasOwnProperty(a)||(r[a]=!0,e[a]=!0,t.predecessors(a).forEach(o),delete r[a],i.push(a))})),Object.keys(e).length!==t.nodeCount())throw new n;return i}class n extends Error{constructor(){super(...arguments)}}t.exports=e,e.CycleException=n},1997:t=>{t.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map((function(t){return t.key}))}has(t){return this._keyIndices.hasOwnProperty(t)}priority(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(t,e){var n=this._keyIndices;if(t=String(t),!n.hasOwnProperty(t)){var r=this._arr,i=r.length;return n[t]=i,r.push({key:t,priority:e}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)}_heapify(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))}_decrease(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e}_swap(t,e){var n=this._arr,r=this._keyIndices,i=n[t],o=n[e];n[t]=o,n[e]=i,r[o.key]=t,r[i.key]=e}}},8114:t=>{"use strict";var e="\0",n="\0",r="";function i(t,e){t[e]?t[e]++:t[e]=1}function o(t,e){--t[e]||delete t[e]}function a(t,n,i,o){var a=""+n,s=""+i;if(!t&&a>s){var u=a;a=s,s=u}return a+r+s+r+(void 0===o?e:o)}function s(t,e){return a(t,e.v,e.w,e.name)}t.exports=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(t){t&&(this._isDirected=!t.hasOwnProperty("directed")||t.directed,this._isMultigraph=!!t.hasOwnProperty("multigraph")&&t.multigraph,this._isCompound=!!t.hasOwnProperty("compound")&&t.compound),this._isCompound&&(this._parent={},this._children={},this._children[n]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,"function"!=typeof t&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter((e=>0===Object.keys(t._in[e]).length))}sinks(){var t=this;return this.nodes().filter((e=>0===Object.keys(t._out[e]).length))}setNodes(t,e){var n=arguments,r=this;return t.forEach((function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this}setNode(t,e){return this._nodes.hasOwnProperty(t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=n,this._children[t]={},this._children[n][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return this._nodes.hasOwnProperty(t)}removeNode(t){var e=this;if(this._nodes.hasOwnProperty(t)){var n=t=>e.removeEdge(e._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach((function(t){e.setParent(t)})),delete this._children[t]),Object.keys(this._in[t]).forEach(n),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===e)e=n;else{for(var r=e+="";void 0!==r;r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==n)return e}}children(t=n){if(this._isCompound){var e=this._children[t];if(e)return Object.keys(e)}else{if(t===n)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return Object.keys(e)}successors(t){var e=this._sucs[t];if(e)return Object.keys(e)}neighbors(t){var e=this.predecessors(t);if(e){const r=new Set(e);for(var n of this.successors(t))r.add(n);return Array.from(r.values())}}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach((function([n,r]){t(n)&&e.setNode(n,r)})),Object.values(this._edgeObjs).forEach((function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function i(t){var o=n.parent(t);return void 0===o||e.hasNode(o)?(r[t]=o,o):o in r?r[o]:i(o)}return this._isCompound&&e.nodes().forEach((t=>e.setParent(t,i(t)))),e}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,"function"!=typeof t&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,e){var n=this,r=arguments;return t.reduce((function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this}setEdge(){var t,e,n,r,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(r=arguments[1],o=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),t=""+t,e=""+e,void 0!==n&&(n=""+n);var u=a(this._isDirected,t,e,n);if(this._edgeLabels.hasOwnProperty(u))return o&&(this._edgeLabels[u]=r),this;if(void 0!==n&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[u]=o?r:this._defaultEdgeLabelFn(t,e,n);var h=function(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}(this._isDirected,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[u]=h,i(this._preds[e],t),i(this._sucs[t],e),this._in[e][u]=h,this._out[t][u]=h,this._edgeCount++,this}edge(t,e,n){var r=1===arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return this._edgeLabels[r]}edgeAsObj(){const t=this.edge(...arguments);return"object"!=typeof t?{label:t}:t}hasEdge(t,e,n){var r=1===arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return this._edgeLabels.hasOwnProperty(r)}removeEdge(t,e,n){var r=1===arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],o(this._preds[e],t),o(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this}inEdges(t,e){var n=this._in[t];if(n){var r=Object.values(n);return e?r.filter((t=>t.v===e)):r}}outEdges(t,e){var n=this._out[t];if(n){var r=Object.values(n);return e?r.filter((t=>t.w===e)):r}}nodeEdges(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}}},2314:(t,e,n)=>{t.exports={Graph:n(8114),version:n(1166)}},2258:(t,e,n)=>{var r=n(8114);function i(t){return t.nodes().map((function(e){var n=t.node(e),r=t.parent(e),i={v:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.parent=r),i}))}function o(t){return t.edges().map((function(e){var n=t.edge(e),r={v:e.v,w:e.w};return void 0!==e.name&&(r.name=e.name),void 0!==n&&(r.value=n),r}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:i(t),edges:o(t)};return void 0!==t.graph()&&(e.value=structuredClone(t.graph())),e},read:function(t){var e=new r(t.options).setGraph(t.value);return t.nodes.forEach((function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),t.edges.forEach((function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},1166:t=>{t.exports="2.2.2"},935:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var u=this[s][0];null!=u&&(a[u]=!0)}for(var h=0;h<t.length;h++){var c=[].concat(t[h]);r&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},6758:t=>{"use strict";t.exports=function(t){return t[1]}},9126:(t,e,n)=>{"use strict";n.d(e,{A:()=>E});var r=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),i="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,o=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),a="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},s=["top","right","bottom","left","width","height","size","weight"],u="undefined"!=typeof MutationObserver,h=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&u()}function s(){a(o)}function u(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,e);i=t}return u}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),c=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},l=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||o},f=y(0,0,0,0);function d(t){return parseFloat(t)||0}function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+d(t["border-"+n+"-width"])}),0)}var g="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof l(t).SVGGraphicsElement}:function(t){return t instanceof l(t).SVGElement&&"function"==typeof t.getBBox};function v(t){return i?g(t)?function(t){var e=t.getBBox();return y(0,0,e.width,e.height)}(t):function(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return f;var r=l(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=d(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=d(r.width),u=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=p(r,"left","right")+o),Math.round(u+a)!==n&&(u-=p(r,"top","bottom")+a)),!function(t){return t===l(t).document.documentElement}(t)){var h=Math.round(s+o)-e,c=Math.round(u+a)-n;1!==Math.abs(h)&&(s-=h),1!==Math.abs(c)&&(u-=c)}return y(i.left,i.top,s,u)}(t):f}function y(t,e,n,r){return{x:t,y:e,width:n,height:r}}var m=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=y(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=v(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),_=function(t,e){var n,r,i,o,a,s,u,h=(r=(n=e).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),c(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);c(this,{target:t,contentRect:h})},w=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new r,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new m(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new _(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),b="undefined"!=typeof WeakMap?new WeakMap:new r,x=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=h.getInstance(),r=new w(e,n,this);b.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){x.prototype[t]=function(){var e;return(e=b.get(this))[t].apply(e,arguments)}}));const E=void 0!==o.ResizeObserver?o.ResizeObserver:x},3373:(t,e)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=a(t,o(n)))}return t}function o(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return i.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)r.call(t,n)&&t[n]&&(e=a(e,n));return e}function a(t,e){return e?t?t+" "+e:t+e:t}t.exports?(i.default=i,t.exports=i):void 0===(n=function(){return i}.apply(e,[]))||(t.exports=n)}()},2740:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(7545),i=n(6902);function o(t,e,n){"symbol"==(0,r.A)(e)&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}var a=n(1369);function s(t,e,n,s,u,h){var c,l,f,d,p,g,v,y=Symbol.metadata||Symbol.for("Symbol.metadata"),m=Object.defineProperty,_=Object.create,w=[_(null),_(null)],b=e.length;function x(e,n,r){return function(i,o){n&&(o=i,i=t);for(var a=0;a<e.length;a++)o=e[a].apply(i,r?[o]:[]);return r?o:i}}function E(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw new TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function k(t,e,n,i,a,s,u,h,f,d,p){function g(t){if(!p(t))throw new TypeError("Attempted to access private element on non-instance")}var v=[].concat(e[0]),y=e[3],_=!u,b=1===a,k=3===a,N=4===a,A=2===a;function M(e,n,r){return function(i,o){return n&&(o=i,i=t),r&&r(i),O[e].call(i,o)}}if(!_){var O={},I=[],P=k?"get":N||b?"set":"value";if(f?(d||b?O={get:o((function(){return y(this)}),i,"get"),set:function(t){e[4](this,t)}}:O[P]=y,d||o(O[P],i,A?"":P)):d||(O=Object.getOwnPropertyDescriptor(t,i)),!d&&!f){if((l=w[+h][i])&&7!=(l^a))throw Error("Decorating two elements with the same name ("+O[P].name+") is not supported yet");w[+h][i]=a<3?1:a}}for(var T=t,j=v.length-1;j>=0;j-=n?2:1){var C=E(v[j],"A decorator","be",!0),S=n?v[j-1]:void 0,$={},z={kind:["field","accessor","method","getter","setter","class"][a],name:i,metadata:c,addInitializer:function(t,e){if(t.v)throw Error("attempted to call addInitializer after decoration was finished");E(e,"An initializer","be",!0),s.push(e)}.bind(null,$)};if(_)l=C.call(S,T,z),$.v=1,E(l,"class decorators","return")&&(T=l);else if(z.static=h,z.private=f,l=z.access={has:f?p.bind():function(t){return i in t}},N||(l.get=f?A?function(t){return g(t),O.value}:M("get",0,g):function(t){return t[i]}),A||k||(l.set=f?M("set",0,g):function(t,e){t[i]=e}),T=C.call(S,b?{get:O.get,set:O.set}:O[P],z),$.v=1,b){if("object"==(0,r.A)(T)&&T)(l=E(T.get,"accessor.get"))&&(O.get=l),(l=E(T.set,"accessor.set"))&&(O.set=l),(l=E(T.init,"accessor.init"))&&I.unshift(l);else if(void 0!==T)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else E(T,(d?"field":"method")+" decorators","return")&&(d?I.unshift(T):O[P]=T)}return a<2&&u.push(x(I,h,1),x(s,h,0)),d||_||(f?b?u.splice(-1,0,M("get",h),M("set",h)):u.push(A?O[P]:E.call.bind(O[P])):m(t,i,O)),T}function N(t){return m(t,y,{configurable:!0,enumerable:!0,value:c})}return void 0!==h&&(c=h[y]),c=_(null==c?null:c),p=[],g=function(t){t&&p.push(x(t))},v=function(e,r){for(var o=0;o<n.length;o++){var s=n[o],h=s[1],c=7&h;if((8&h)==e&&!c==r){var l=s[2],g=!!s[3],v=16&h;k(e?t:t.prototype,s,v,g?"#"+l:(0,a.A)(l),c,c<2?[]:e?d=d||[]:f=f||[],p,!!e,g,r,e&&g?function(e){return(0,i.A)(e)===t}:u)}}},v(8,0),v(0,0),v(8,1),v(0,1),g(f),g(d),l=p,b||N(t),{e:l,get c(){var n=[];return b&&[N(t=k(t,[e],s,t.name,5,n)),x(n,1)]}}}},6330:(t,e,n)=>{"use strict";function r(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,u,"next",t)}function u(t){r(a,i,o,s,u,"throw",t)}s(void 0)}))}}n.d(e,{A:()=>i})},6902:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(7545);function i(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?(0,r.A)(t):"null"));return t}},5536:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(2559);function i(t,e,n){return n((0,r.A)(t,e))}},6514:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r={value:()=>{}};function i(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new o(r)}function o(t){this._=t}function a(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function s(t,e,n){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=r,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}o.prototype=i.prototype={constructor:o,on:function(t,e){var n,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),u=-1,h=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++u<h;)if(n=(t=o[u]).type)i[n]=s(i[n],t.name,e);else if(null==e)for(n in i)i[n]=s(i[n],t.name,null);return this}for(;++u<h;)if((n=(t=o[u]).type)&&(n=a(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new o(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};const u=i},7931:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(3968),i=n(1621),o=n(3993);function a(t){return t.x+t.vx}function s(t){return t.y+t.vy}function u(t){var e,n,u,h=1,c=1;function l(){for(var t,i,l,d,p,g,v,y=e.length,m=0;m<c;++m)for(i=(0,r.A)(e,a,s).visitAfter(f),t=0;t<y;++t)l=e[t],g=n[l.index],v=g*g,d=l.x+l.vx,p=l.y+l.vy,i.visit(_);function _(t,e,n,r,i){var a=t.data,s=t.r,c=g+s;if(!a)return e>d+c||r<d-c||n>p+c||i<p-c;if(a.index>l.index){var f=d-a.x-a.vx,y=p-a.y-a.vy,m=f*f+y*y;m<c*c&&(0===f&&(m+=(f=(0,o.A)(u))*f),0===y&&(m+=(y=(0,o.A)(u))*y),m=(c-(m=Math.sqrt(m)))/m*h,l.vx+=(f*=m)*(c=(s*=s)/(v+s)),l.vy+=(y*=m)*c,a.vx-=f*(c=1-c),a.vy-=y*c)}}}function f(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function d(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r<o;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=(0,i.A)(null==t?1:+t)),l.initialize=function(t,n){e=t,u=n,d()},l.iterations=function(t){return arguments.length?(c=+t,l):c},l.strength=function(t){return arguments.length?(h=+t,l):h},l.radius=function(e){return arguments.length?(t="function"==typeof e?e:(0,i.A)(+e),d(),l):t},l}},1621:(t,e,n)=>{"use strict";function r(t){return function(){return t}}n.d(e,{A:()=>r})},3993:(t,e,n)=>{"use strict";function r(t){return 1e-6*(t()-.5)}n.d(e,{A:()=>r})},6149:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(1621),i=n(3993);function o(t){return t.index}function a(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function s(t){var e,n,s,u,h,c,l=o,f=function(t){return 1/Math.min(u[t.source.index],u[t.target.index])},d=(0,r.A)(30),p=1;function g(r){for(var o=0,a=t.length;o<p;++o)for(var s,u,l,f,d,g,v,y=0;y<a;++y)u=(s=t[y]).source,f=(l=s.target).x+l.vx-u.x-u.vx||(0,i.A)(c),d=l.y+l.vy-u.y-u.vy||(0,i.A)(c),f*=g=((g=Math.sqrt(f*f+d*d))-n[y])/g*r*e[y],d*=g,l.vx-=f*(v=h[y]),l.vy-=d*v,u.vx+=f*(v=1-v),u.vy+=d*v}function v(){if(s){var r,i,o=s.length,c=t.length,f=new Map(s.map(((t,e)=>[l(t,e,s),t])));for(r=0,u=new Array(o);r<c;++r)(i=t[r]).index=r,"object"!=typeof i.source&&(i.source=a(f,i.source)),"object"!=typeof i.target&&(i.target=a(f,i.target)),u[i.source.index]=(u[i.source.index]||0)+1,u[i.target.index]=(u[i.target.index]||0)+1;for(r=0,h=new Array(c);r<c;++r)i=t[r],h[r]=u[i.source.index]/(u[i.source.index]+u[i.target.index]);e=new Array(c),y(),n=new Array(c),m()}}function y(){if(s)for(var n=0,r=t.length;n<r;++n)e[n]=+f(t[n],n,t)}function m(){if(s)for(var e=0,r=t.length;e<r;++e)n[e]=+d(t[e],e,t)}return null==t&&(t=[]),g.initialize=function(t,e){s=t,c=e,v()},g.links=function(e){return arguments.length?(t=e,v(),g):t},g.id=function(t){return arguments.length?(l=t,g):l},g.iterations=function(t){return arguments.length?(p=+t,g):p},g.strength=function(t){return arguments.length?(f="function"==typeof t?t:(0,r.A)(+t),y(),g):f},g.distance=function(t){return arguments.length?(d="function"==typeof t?t:(0,r.A)(+t),m(),g):d},g}},3854:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(3968),i=n(1621),o=n(3993),a=n(4842);function s(){var t,e,n,s,u,h=(0,i.A)(-30),c=1,l=1/0,f=.81;function d(n){var i,o=t.length,u=(0,r.A)(t,a.x,a.y).visitAfter(g);for(s=n,i=0;i<o;++i)e=t[i],u.visit(v)}function p(){if(t){var e,n,r=t.length;for(u=new Array(r),e=0;e<r;++e)n=t[e],u[n.index]=+h(n,e,t)}}function g(t){var e,n,r,i,o,a=0,s=0;if(t.length){for(r=i=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(a+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else{(e=t).x=e.data.x,e.y=e.data.y;do{a+=u[e.data.index]}while(e=e.next)}t.value=a}function v(t,r,i,a){if(!t.value)return!0;var h=t.x-e.x,d=t.y-e.y,p=a-r,g=h*h+d*d;if(p*p/f<g)return g<l&&(0===h&&(g+=(h=(0,o.A)(n))*h),0===d&&(g+=(d=(0,o.A)(n))*d),g<c&&(g=Math.sqrt(c*g)),e.vx+=h*t.value*s/g,e.vy+=d*t.value*s/g),!0;if(!(t.length||g>=l)){(t.data!==e||t.next)&&(0===h&&(g+=(h=(0,o.A)(n))*h),0===d&&(g+=(d=(0,o.A)(n))*d),g<c&&(g=Math.sqrt(c*g)));do{t.data!==e&&(p=u[t.data.index]*s/g,e.vx+=h*p,e.vy+=d*p)}while(t=t.next)}}return d.initialize=function(e,r){t=e,n=r,p()},d.strength=function(t){return arguments.length?(h="function"==typeof t?t:(0,i.A)(+t),p(),d):h},d.distanceMin=function(t){return arguments.length?(c=t*t,d):Math.sqrt(c)},d.distanceMax=function(t){return arguments.length?(l=t*t,d):Math.sqrt(l)},d.theta=function(t){return arguments.length?(f=t*t,d):Math.sqrt(f)},d}},4842:(t,e,n)=>{"use strict";n.d(e,{A:()=>f,x:()=>u,y:()=>h});var r=n(6514),i=n(4234);const o=1664525,a=1013904223,s=4294967296;function u(t){return t.x}function h(t){return t.y}var c=10,l=Math.PI*(3-Math.sqrt(5));function f(t){var e,n=1,u=.001,h=1-Math.pow(u,1/300),f=0,d=.6,p=new Map,g=(0,i.O1)(m),v=(0,r.A)("tick","end"),y=function(){let t=1;return()=>(t=(o*t+a)%s)/s}();function m(){_(),v.call("tick",e),n<u&&(g.stop(),v.call("end",e))}function _(r){var i,o,a=t.length;void 0===r&&(r=1);for(var s=0;s<r;++s)for(n+=(f-n)*h,p.forEach((function(t){t(n)})),i=0;i<a;++i)null==(o=t[i]).fx?o.x+=o.vx*=d:(o.x=o.fx,o.vx=0),null==o.fy?o.y+=o.vy*=d:(o.y=o.fy,o.vy=0);return e}function w(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=c*Math.sqrt(.5+n),o=n*l;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function b(e){return e.initialize&&e.initialize(t,y),e}return null==t&&(t=[]),w(),e={tick:_,restart:function(){return g.restart(m),e},stop:function(){return g.stop(),e},nodes:function(n){return arguments.length?(t=n,w(),p.forEach(b),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(u=+t,e):u},alphaDecay:function(t){return arguments.length?(h=+t,e):+h},alphaTarget:function(t){return arguments.length?(f=+t,e):f},velocityDecay:function(t){return arguments.length?(d=1-t,e):1-d},randomSource:function(t){return arguments.length?(y=t,p.forEach(b),e):y},force:function(t,n){return arguments.length>1?(null==n?p.delete(t):p.set(t,b(n)),e):p.get(t)},find:function(e,n,r){var i,o,a,s,u,h=0,c=t.length;for(null==r?r=1/0:r*=r,h=0;h<c;++h)(a=(i=e-(s=t[h]).x)*i+(o=n-s.y)*o)<r&&(u=s,r=a);return u},on:function(t,n){return arguments.length>1?(v.on(t,n),e):v.on(t)}}}},1945:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(1621);function i(t){var e,n,i,o=(0,r.A)(.1);function a(t){for(var r,o=0,a=e.length;o<a;++o)(r=e[o]).vx+=(i[o]-r.x)*n[o]*t}function s(){if(e){var r,a=e.length;for(n=new Array(a),i=new Array(a),r=0;r<a;++r)n[r]=isNaN(i[r]=+t(e[r],r,e))?0:+o(e[r],r,e)}}return"function"!=typeof t&&(t=(0,r.A)(null==t?0:+t)),a.initialize=function(t){e=t,s()},a.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,r.A)(+t),s(),a):o},a.x=function(e){return arguments.length?(t="function"==typeof e?e:(0,r.A)(+e),s(),a):t},a}},9418:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(1621);function i(t){var e,n,i,o=(0,r.A)(.1);function a(t){for(var r,o=0,a=e.length;o<a;++o)(r=e[o]).vy+=(i[o]-r.y)*n[o]*t}function s(){if(e){var r,a=e.length;for(n=new Array(a),i=new Array(a),r=0;r<a;++r)n[r]=isNaN(i[r]=+t(e[r],r,e))?0:+o(e[r],r,e)}}return"function"!=typeof t&&(t=(0,r.A)(null==t?0:+t)),a.initialize=function(t){e=t,s()},a.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,r.A)(+t),s(),a):o},a.y=function(e){return arguments.length?(t="function"==typeof e?e:(0,r.A)(+e),s(),a):t},a}},3968:(t,e,n)=>{"use strict";function r(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,s,u,h,c,l,f,d=t._root,p={data:r},g=t._x0,v=t._y0,y=t._x1,m=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((h=e>=(o=(g+y)/2))?g=o:y=o,(c=n>=(a=(v+m)/2))?v=a:m=a,i=d,!(d=d[l=c<<1|h]))return i[l]=p,t;if(s=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===s&&n===u)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(h=e>=(o=(g+y)/2))?g=o:y=o,(c=n>=(a=(v+m)/2))?v=a:m=a}while((l=c<<1|h)==(f=(u>=a)<<1|s>=o));return i[f]=d,i[l]=p,t}function i(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function o(t){return t[0]}function a(t){return t[1]}function s(t,e,n){var r=new u(null==e?o:e,null==n?a:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function u(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function h(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}n.d(e,{A:()=>s});var c=s.prototype=u.prototype;c.copy=function(){var t,e,n=new u(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=h(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=h(e));return n},c.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return r(this.cover(e,n),e,n,t)},c.addAll=function(t){var e,n,i,o,a=t.length,s=new Array(a),u=new Array(a),h=1/0,c=1/0,l=-1/0,f=-1/0;for(n=0;n<a;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(s[n]=i,u[n]=o,i<h&&(h=i),i>l&&(l=i),o<c&&(c=o),o>f&&(f=o));if(h>l||c>f)return this;for(this.cover(h,c).cover(l,f),n=0;n<a;++n)r(this,s[n],u[n],t[n]);return this},c.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,s,u=i-n||1,h=this._root;n>t||t>=i||r>e||e>=o;)switch(s=(e<r)<<1|t<n,(a=new Array(4))[s]=h,h=a,u*=2,s){case 0:i=n+u,o=r+u;break;case 1:n=i-u,o=r+u;break;case 2:i=n+u,r=o-u;break;case 3:n=i-u,r=o-u}this._root&&this._root.length&&(this._root=h)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},c.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},c.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},c.find=function(t,e,n){var r,o,a,s,u,h,c,l=this._x0,f=this._y0,d=this._x1,p=this._y1,g=[],v=this._root;for(v&&g.push(new i(v,l,f,d,p)),null==n?n=1/0:(l=t-n,f=e-n,d=t+n,p=e+n,n*=n);h=g.pop();)if(!(!(v=h.node)||(o=h.x0)>d||(a=h.y0)>p||(s=h.x1)<l||(u=h.y1)<f))if(v.length){var y=(o+s)/2,m=(a+u)/2;g.push(new i(v[3],y,m,s,u),new i(v[2],o,m,y,u),new i(v[1],y,a,s,m),new i(v[0],o,a,y,m)),(c=(e>=m)<<1|t>=y)&&(h=g[g.length-1],g[g.length-1]=g[g.length-1-c],g[g.length-1-c]=h)}else{var _=t-+this._x.call(null,v.data),w=e-+this._y.call(null,v.data),b=_*_+w*w;if(b<n){var x=Math.sqrt(n=b);l=t-x,f=e-x,d=t+x,p=e+x,r=v.data}}return r},c.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,s,u,h,c,l,f,d=this._root,p=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!d)return this;if(d.length)for(;;){if((h=o>=(s=(p+v)/2))?p=s:v=s,(c=a>=(u=(g+y)/2))?g=u:y=u,e=d,!(d=d[l=c<<1|h]))return this;if(!d.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,f=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[l]=i:delete e[l],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},c.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},c.root=function(){return this._root},c.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},c.visit=function(t){var e,n,r,o,a,s,u=[],h=this._root;for(h&&u.push(new i(h,this._x0,this._y0,this._x1,this._y1));e=u.pop();)if(!t(h=e.node,r=e.x0,o=e.y0,a=e.x1,s=e.y1)&&h.length){var c=(r+a)/2,l=(o+s)/2;(n=h[3])&&u.push(new i(n,c,l,a,s)),(n=h[2])&&u.push(new i(n,r,l,c,s)),(n=h[1])&&u.push(new i(n,c,o,a,l)),(n=h[0])&&u.push(new i(n,r,o,c,l))}return this},c.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var a,s=e.x0,u=e.y0,h=e.x1,c=e.y1,l=(s+h)/2,f=(u+c)/2;(a=o[0])&&n.push(new i(a,s,u,l,f)),(a=o[1])&&n.push(new i(a,l,u,h,f)),(a=o[2])&&n.push(new i(a,s,f,l,c)),(a=o[3])&&n.push(new i(a,l,f,h,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},c.x=function(t){return arguments.length?(this._x=t,this):this._x},c.y=function(t){return arguments.length?(this._y=t,this):this._y}},2474:(t,e,n)=>{"use strict";function r(t){return function(){return this.matches(t)}}function i(t){return function(e){return e.matches(t)}}n.d(e,{A:()=>r,j:()=>i})},5399:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(9538);function i(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),r.A.hasOwnProperty(e)?{space:r.A[e],local:t}:t}},9538:(t,e,n)=>{"use strict";n.d(e,{A:()=>i,g:()=>r});var r="http://www.w3.org/1999/xhtml";const i={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},7566:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(7810);function i(t){return"string"==typeof t?new r.LN([[document.querySelector(t)]],[document.documentElement]):new r.LN([[t]],r.zr)}},7810:(t,e,n)=>{"use strict";n.d(e,{LN:()=>ot,Ay:()=>st,zr:()=>it});var r=n(4715),i=n(3972);var o=n(2474),a=Array.prototype.find;function s(){return this.firstElementChild}var u=Array.prototype.filter;function h(){return Array.from(this.children)}function c(t){return new Array(t.length)}function l(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function f(t,e,n,r,i,o){for(var a,s=0,u=e.length,h=o.length;s<h;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new l(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function d(t,e,n,r,i,o,a){var s,u,h,c=new Map,f=e.length,d=o.length,p=new Array(f);for(s=0;s<f;++s)(u=e[s])&&(p[s]=h=a.call(u,u.__data__,s,e)+"",c.has(h)?i[s]=u:c.set(h,u));for(s=0;s<d;++s)h=a.call(t,o[s],s,o)+"",(u=c.get(h))?(r[s]=u,u.__data__=o[s],c.delete(h)):n[s]=new l(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&c.get(p[s])===u&&(i[s]=u)}function p(t){return t.__data__}function g(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function v(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}l.prototype={constructor:l,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var y=n(5399);function m(t){return function(){this.removeAttribute(t)}}function _(t){return function(){this.removeAttributeNS(t.space,t.local)}}function w(t,e){return function(){this.setAttribute(t,e)}}function b(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function x(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function E(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var k=n(5632);function N(t){return function(){delete this[t]}}function A(t,e){return function(){this[t]=e}}function M(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function O(t){return t.trim().split(/^|\s+/)}function I(t){return t.classList||new P(t)}function P(t){this._node=t,this._names=O(t.getAttribute("class")||"")}function T(t,e){for(var n=I(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function j(t,e){for(var n=I(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function C(t){return function(){T(this,t)}}function S(t){return function(){j(this,t)}}function $(t,e){return function(){(e.apply(this,arguments)?T:j)(this,t)}}function z(){this.textContent=""}function L(t){return function(){this.textContent=t}}function R(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function q(){this.innerHTML=""}function D(t){return function(){this.innerHTML=t}}function V(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function G(){this.nextSibling&&this.parentNode.appendChild(this)}function F(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}P.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Y=n(9538);function B(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Y.g&&e.documentElement.namespaceURI===Y.g?e.createElement(t):e.createElementNS(n,t)}}function X(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function H(t){var e=(0,y.A)(t);return(e.local?X:B)(e)}function W(){return null}function U(){var t=this.parentNode;t&&t.removeChild(this)}function K(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Q(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function J(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Z(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}var tt=n(1382);function et(t,e,n){var r=(0,tt.A)(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function nt(t,e){return function(){return et(this,t,e)}}function rt(t,e){return function(){return et(this,t,e.apply(this,arguments))}}var it=[null];function ot(t,e){this._groups=t,this._parents=e}function at(){return new ot([[document.documentElement]],it)}ot.prototype=at.prototype={constructor:ot,select:function(t){"function"!=typeof t&&(t=(0,r.A)(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var a,s,u=e[o],h=u.length,c=i[o]=new Array(h),l=0;l<h;++l)(a=u[l])&&(s=t.call(a,a.__data__,l,u))&&("__data__"in a&&(s.__data__=a.__data__),c[l]=s);return new ot(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}(t):(0,i.A)(t);for(var e=this._groups,n=e.length,r=[],o=[],a=0;a<n;++a)for(var s,u=e[a],h=u.length,c=0;c<h;++c)(s=u[c])&&(r.push(t.call(s,s.__data__,c,u)),o.push(s));return new ot(r,o)},selectChild:function(t){return this.select(null==t?s:function(t){return function(){return a.call(this.children,t)}}("function"==typeof t?t:(0,o.j)(t)))},selectChildren:function(t){return this.selectAll(null==t?h:function(t){return function(){return u.call(this.children,t)}}("function"==typeof t?t:(0,o.j)(t)))},filter:function(t){"function"!=typeof t&&(t=(0,o.A)(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,s=e[i],u=s.length,h=r[i]=[],c=0;c<u;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&h.push(a);return new ot(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,p);var n,r=e?d:f,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=o.length,s=new Array(a),u=new Array(a),h=new Array(a),c=0;c<a;++c){var l=i[c],v=o[c],y=v.length,m=g(t.call(l,l&&l.__data__,c,i)),_=m.length,w=u[c]=new Array(_),b=s[c]=new Array(_);r(l,v,w,b,h[c]=new Array(y),m,e);for(var x,E,k=0,N=0;k<_;++k)if(x=w[k]){for(k>=N&&(N=k+1);!(E=b[N])&&++N<_;);x._next=E||null}}return(s=new ot(s,i))._enter=u,s._exit=h,s},enter:function(){return new ot(this._enter||this._groups.map(c),this._parents)},exit:function(){return new ot(this._exit||this._groups.map(c),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var h,c=n[u],l=r[u],f=c.length,d=s[u]=new Array(f),p=0;p<f;++p)(h=c[p]||l[p])&&(d[p]=h);for(;u<i;++u)s[u]=n[u];return new ot(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=v);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,h=i[o]=new Array(u),c=0;c<u;++c)(a=s[c])&&(h[c]=a);h.sort(e)}return new ot(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=(0,y.A)(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?_:m:"function"==typeof e?n.local?E:x:n.local?b:w)(n,e))},style:k.A,property:function(t,e){return arguments.length>1?this.each((null==e?N:"function"==typeof e?M:A)(t,e)):this.node()[t]},classed:function(t,e){var n=O(t+"");if(arguments.length<2){for(var r=I(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?$:e?C:S)(n,e))},text:function(t){return arguments.length?this.each(null==t?z:("function"==typeof t?R:L)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?q:("function"==typeof t?V:D)(t)):this.node().innerHTML},raise:function(){return this.each(G)},lower:function(){return this.each(F)},append:function(t){var e="function"==typeof t?t:H(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:H(t),i=null==e?W:"function"==typeof e?e:(0,r.A)(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(U)},clone:function(t){return this.select(t?Q:K)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Z:J,r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,h=0,c=s.length;h<c;++h)for(r=0,u=s[h];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?rt:nt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};const st=at},5632:(t,e,n)=>{"use strict";n.d(e,{A:()=>s,j:()=>u});var r=n(1382);function i(t){return function(){this.style.removeProperty(t)}}function o(t,e,n){return function(){this.style.setProperty(t,e,n)}}function a(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function s(t,e,n){return arguments.length>1?this.each((null==e?i:"function"==typeof e?a:o)(t,e,null==n?"":n)):u(this.node(),t)}function u(t,e){return t.style.getPropertyValue(e)||(0,r.A)(t).getComputedStyle(t,null).getPropertyValue(e)}},4715:(t,e,n)=>{"use strict";function r(){}function i(t){return null==t?r:function(){return this.querySelector(t)}}n.d(e,{A:()=>i})},3972:(t,e,n)=>{"use strict";function r(){return[]}function i(t){return null==t?r:function(){return this.querySelectorAll(t)}}n.d(e,{A:()=>i})},1382:(t,e,n)=>{"use strict";function r(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}n.d(e,{A:()=>r})},4234:(t,e,n)=>{"use strict";n.d(e,{M4:()=>v,O1:()=>y,tB:()=>p});var r,i,o=0,a=0,s=0,u=1e3,h=0,c=0,l=0,f="object"==typeof performance&&performance.now?performance:Date,d="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function p(){return c||(d(g),c=f.now()+l)}function g(){c=0}function v(){this._call=this._time=this._next=null}function y(t,e,n){var r=new v;return r.restart(t,e,n),r}function m(){c=(h=f.now())+l,o=a=0;try{!function(){p(),++o;for(var t,e=r;e;)(t=c-e._time)>=0&&e._call.call(void 0,t),e=e._next;--o}()}finally{o=0,function(){for(var t,e,n=r,o=1/0;n;)n._call?(o>n._time&&(o=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:r=e);i=t,w(o)}(),c=0}}function _(){var t=f.now(),e=t-h;e>u&&(l-=e,h=t)}function w(t){o||(a&&(a=clearTimeout(a)),t-c>24?(t<1/0&&(a=setTimeout(m,t-f.now()-l)),s&&(s=clearInterval(s))):(s||(h=f.now(),s=setInterval(_,u)),o=1,d(m)))}v.prototype=y.prototype={constructor:v,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?p():+n)+(null==e?0:+e),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=n,w()},stop:function(){this._call&&(this._call=null,this._time=1/0,w())}}},9047:(t,e,n)=>{"use strict";n.d(e,{uV:()=>Te,s_:()=>Ve});var r=n(6514),i=n(7566);const o={capture:!0,passive:!1};function a(t){t.preventDefault(),t.stopImmediatePropagation()}function s(t){return((t=Math.exp(t))+1/t)/2}const u=function t(e,n,r){function i(t,i){var o,a,u=t[0],h=t[1],c=t[2],l=i[0],f=i[1],d=i[2],p=l-u,g=f-h,v=p*p+g*g;if(v<1e-12)a=Math.log(d/c)/e,o=function(t){return[u+t*p,h+t*g,c*Math.exp(e*t*a)]};else{var y=Math.sqrt(v),m=(d*d-c*c+r*v)/(2*c*n*y),_=(d*d-c*c-r*v)/(2*d*n*y),w=Math.log(Math.sqrt(m*m+1)-m),b=Math.log(Math.sqrt(_*_+1)-_);a=(b-w)/e,o=function(t){var r,i=t*a,o=s(w),l=c/(n*y)*(o*(r=e*i+w,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(w));return[u+l*p,h+l*g,c*o/s(e*i+w)]}}return o.duration=1e3*a*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function h(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}var c=n(7810),l=n(4234);function f(t,e,n){var r=new l.M4;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}var d=(0,r.A)("start","end","cancel","interrupt"),p=[],g=0,v=2,y=3,m=5,_=6;function w(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var h,c,l,d;if(1!==n.state)return s();for(h in i)if((d=i[h]).name===n.name){if(d.state===y)return f(o);4===d.state?(d.state=_,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[h]):+h<e&&(d.state=_,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[h])}if(f((function(){n.state===y&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=v,n.on.call("start",t,t.__data__,n.index,n.group),n.state===v){for(n.state=y,r=new Array(l=n.tween.length),h=0,c=-1;h<l;++h)(d=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=d);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=m,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);n.state===m&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=_,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=(0,l.O1)((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:d,tween:p,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:g})}function b(t,e){var n=E(t,e);if(n.state>g)throw new Error("too late; already scheduled");return n}function x(t,e){var n=E(t,e);if(n.state>y)throw new Error("too late; already running");return n}function E(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function k(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>v&&n.state<m,n.state=_,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}function N(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var A,M=180/Math.PI,O={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function I(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*M,skewX:Math.atan(u)*M,scaleX:a,scaleY:s}}function P(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:N(t,i)},{i:u-2,x:N(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:N(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:N(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:N(t,n)},{i:s-2,x:N(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var T=P((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?O:I(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),j=P((function(t){return null==t?O:(A||(A=document.createElementNS("http://www.w3.org/2000/svg","g")),A.setAttribute("transform",t),(t=A.transform.baseVal.consolidate())?I((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):O)}),", ",")",")"),C=n(5399);function S(t,e){var n,r;return function(){var i=x(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function $(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=x(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,h=i.length;u<h;++u)if(i[u].name===e){i[u]=s;break}u===h&&i.push(s)}o.tween=i}}function z(t,e,n){var r=t._id;return t.each((function(){var t=x(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return E(t,r).value[e]}}function L(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function R(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function q(){}var D=.7,V=1/D,G="\\s*([+-]?\\d+)\\s*",F="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Y="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",B=/^#([0-9a-f]{3,8})$/,X=new RegExp(`^rgb\\(${G},${G},${G}\\)$`),H=new RegExp(`^rgb\\(${Y},${Y},${Y}\\)$`),W=new RegExp(`^rgba\\(${G},${G},${G},${F}\\)$`),U=new RegExp(`^rgba\\(${Y},${Y},${Y},${F}\\)$`),K=new RegExp(`^hsl\\(${F},${Y},${Y}\\)$`),Q=new RegExp(`^hsla\\(${F},${Y},${Y},${F}\\)$`),J={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Z(){return this.rgb().formatHex()}function tt(){return this.rgb().formatRgb()}function et(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=B.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?nt(e):3===n?new it(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=X.exec(t))?new it(e[1],e[2],e[3],1):(e=H.exec(t))?new it(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=W.exec(t))?rt(e[1],e[2],e[3],e[4]):(e=U.exec(t))?rt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=K.exec(t))?ct(e[1],e[2]/100,e[3]/100,1):(e=Q.exec(t))?ct(e[1],e[2]/100,e[3]/100,e[4]):J.hasOwnProperty(t)?nt(J[t]):"transparent"===t?new it(NaN,NaN,NaN,0):null}function nt(t){return new it(t>>16&255,t>>8&255,255&t,1)}function rt(t,e,n,r){return r<=0&&(t=e=n=NaN),new it(t,e,n,r)}function it(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ot(){return`#${ht(this.r)}${ht(this.g)}${ht(this.b)}`}function at(){const t=st(this.opacity);return`${1===t?"rgb(":"rgba("}${ut(this.r)}, ${ut(this.g)}, ${ut(this.b)}${1===t?")":`, ${t})`}`}function st(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ut(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ht(t){return((t=ut(t))<16?"0":"")+t.toString(16)}function ct(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ft(t,e,n,r)}function lt(t){if(t instanceof ft)return new ft(t.h,t.s,t.l,t.opacity);if(t instanceof q||(t=et(t)),!t)return new ft;if(t instanceof ft)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new ft(a,s,u,t.opacity)}function ft(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function dt(t){return(t=(t||0)%360)<0?t+360:t}function pt(t){return Math.max(0,Math.min(1,t||0))}function gt(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function vt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function yt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function mt(){}L(q,et,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Z,formatHex:Z,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return lt(this).formatHsl()},formatRgb:tt,toString:tt}),L(it,(function(t,e,n,r){return 1===arguments.length?((i=t)instanceof q||(i=et(i)),i?new it((i=i.rgb()).r,i.g,i.b,i.opacity):new it):new it(t,e,n,null==r?1:r);var i}),R(q,{brighter(t){return t=null==t?V:Math.pow(V,t),new it(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?D:Math.pow(D,t),new it(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new it(ut(this.r),ut(this.g),ut(this.b),st(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ot,formatHex:ot,formatHex8:function(){return`#${ht(this.r)}${ht(this.g)}${ht(this.b)}${ht(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:at,toString:at})),L(ft,(function(t,e,n,r){return 1===arguments.length?lt(t):new ft(t,e,n,null==r?1:r)}),R(q,{brighter(t){return t=null==t?V:Math.pow(V,t),new ft(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?D:Math.pow(D,t),new ft(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new it(gt(t>=240?t-240:t+120,i,r),gt(t,i,r),gt(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new ft(dt(this.h),pt(this.s),pt(this.l),st(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=st(this.opacity);return`${1===t?"hsl(":"hsla("}${dt(this.h)}, ${100*pt(this.s)}%, ${100*pt(this.l)}%${1===t?")":`, ${t})`}`}}));var _t=.7,wt=1/_t,bt="\\s*([+-]?\\d+)\\s*",xt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Et="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kt=/^#([0-9a-f]{3,8})$/,Nt=new RegExp(`^rgb\\(${bt},${bt},${bt}\\)$`),At=new RegExp(`^rgb\\(${Et},${Et},${Et}\\)$`),Mt=new RegExp(`^rgba\\(${bt},${bt},${bt},${xt}\\)$`),Ot=new RegExp(`^rgba\\(${Et},${Et},${Et},${xt}\\)$`),It=new RegExp(`^hsl\\(${xt},${Et},${Et}\\)$`),Pt=new RegExp(`^hsla\\(${xt},${Et},${Et},${xt}\\)$`),Tt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function jt(){return this.rgb().formatHex()}function Ct(){return this.rgb().formatRgb()}function St(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=kt.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?$t(e):3===n?new Rt(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?zt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?zt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Nt.exec(t))?new Rt(e[1],e[2],e[3],1):(e=At.exec(t))?new Rt(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Mt.exec(t))?zt(e[1],e[2],e[3],e[4]):(e=Ot.exec(t))?zt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=It.exec(t))?Yt(e[1],e[2]/100,e[3]/100,1):(e=Pt.exec(t))?Yt(e[1],e[2]/100,e[3]/100,e[4]):Tt.hasOwnProperty(t)?$t(Tt[t]):"transparent"===t?new Rt(NaN,NaN,NaN,0):null}function $t(t){return new Rt(t>>16&255,t>>8&255,255&t,1)}function zt(t,e,n,r){return r<=0&&(t=e=n=NaN),new Rt(t,e,n,r)}function Lt(t,e,n,r){return 1===arguments.length?((i=t)instanceof mt||(i=St(i)),i?new Rt((i=i.rgb()).r,i.g,i.b,i.opacity):new Rt):new Rt(t,e,n,null==r?1:r);var i}function Rt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function qt(){return`#${Ft(this.r)}${Ft(this.g)}${Ft(this.b)}`}function Dt(){const t=Vt(this.opacity);return`${1===t?"rgb(":"rgba("}${Gt(this.r)}, ${Gt(this.g)}, ${Gt(this.b)}${1===t?")":`, ${t})`}`}function Vt(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Gt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ft(t){return((t=Gt(t))<16?"0":"")+t.toString(16)}function Yt(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Xt(t,e,n,r)}function Bt(t){if(t instanceof Xt)return new Xt(t.h,t.s,t.l,t.opacity);if(t instanceof mt||(t=St(t)),!t)return new Xt;if(t instanceof Xt)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Xt(a,s,u,t.opacity)}function Xt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ht(t){return(t=(t||0)%360)<0?t+360:t}function Wt(t){return Math.max(0,Math.min(1,t||0))}function Ut(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Kt(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}vt(mt,St,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:jt,formatHex:jt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Bt(this).formatHsl()},formatRgb:Ct,toString:Ct}),vt(Rt,Lt,yt(mt,{brighter(t){return t=null==t?wt:Math.pow(wt,t),new Rt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?_t:Math.pow(_t,t),new Rt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Rt(Gt(this.r),Gt(this.g),Gt(this.b),Vt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:qt,formatHex:qt,formatHex8:function(){return`#${Ft(this.r)}${Ft(this.g)}${Ft(this.b)}${Ft(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Dt,toString:Dt})),vt(Xt,(function(t,e,n,r){return 1===arguments.length?Bt(t):new Xt(t,e,n,null==r?1:r)}),yt(mt,{brighter(t){return t=null==t?wt:Math.pow(wt,t),new Xt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?_t:Math.pow(_t,t),new Xt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Rt(Ut(t>=240?t-240:t+120,i,r),Ut(t,i,r),Ut(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Xt(Ht(this.h),Wt(this.s),Wt(this.l),Vt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Vt(this.opacity);return`${1===t?"hsl(":"hsla("}${Ht(this.h)}, ${100*Wt(this.s)}%, ${100*Wt(this.l)}%${1===t?")":`, ${t})`}`}}));const Qt=t=>()=>t;function Jt(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Qt(isNaN(t)?e:t)}const Zt=function t(e){var n=function(t){return 1==(t=+t)?Jt:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Qt(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Lt(t)).r,(e=Lt(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Jt(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function te(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Lt(e[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=t(o),a=t(a),s=t(s),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=s(t),r+""}}}te((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return Kt((n-r/e)*e,a,i,o,s)}})),te((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return Kt((n-r/e)*e,i,o,a,s)}}));var ee=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ne=new RegExp(ee.source,"g");function re(t,e){var n,r,i,o=ee.lastIndex=ne.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=ee.exec(t))&&(r=ne.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:N(n,r)})),o=ne.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function ie(t,e){var n;return("number"==typeof e?N:e instanceof et?Zt:(n=et(e))?(e=n,Zt):re)(t,e)}function oe(t){return function(){this.removeAttribute(t)}}function ae(t){return function(){this.removeAttributeNS(t.space,t.local)}}function se(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function ue(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function he(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function ce(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function le(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function fe(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function de(t,e){return function(){b(this,t).delay=+e.apply(this,arguments)}}function pe(t,e){return e=+e,function(){b(this,t).delay=e}}function ge(t,e){return function(){x(this,t).duration=+e.apply(this,arguments)}}function ve(t,e){return e=+e,function(){x(this,t).duration=e}}var ye=n(2474),me=n(4715),_e=n(3972),we=c.Ay.prototype.constructor,be=n(5632);function xe(t){return function(){this.style.removeProperty(t)}}var Ee=0;function ke(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ne(){return++Ee}var Ae=c.Ay.prototype;ke.prototype=function(t){return(0,c.Ay)().transition(t)}.prototype={constructor:ke,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=(0,me.A)(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,h=r[a],c=h.length,l=o[a]=new Array(c),f=0;f<c;++f)(s=h[f])&&(u=t.call(s,s.__data__,f,h))&&("__data__"in s&&(u.__data__=s.__data__),l[f]=u,w(l[f],e,n,f,l,E(s,n)));return new ke(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=(0,_e.A)(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,h=r[s],c=h.length,l=0;l<c;++l)if(u=h[l]){for(var f,d=t.call(u,u.__data__,l,h),p=E(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&w(f,e,n,g,d,p);o.push(d),a.push(u)}return new ke(o,a,e,n)},selectChild:Ae.selectChild,selectChildren:Ae.selectChildren,filter:function(t){"function"!=typeof t&&(t=(0,ye.A)(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],h=0;h<s;++h)(o=a[h])&&t.call(o,o.__data__,h,a)&&u.push(o);return new ke(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,h=e[s],c=n[s],l=h.length,f=a[s]=new Array(l),d=0;d<l;++d)(u=h[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new ke(a,this._parents,this._name,this._id)},selection:function(){return new we(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ne(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,h=0;h<u;++h)if(a=s[h]){var c=E(a,e);w(a,t,n,h,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new ke(r,this._parents,t,n)},call:Ae.call,nodes:Ae.nodes,node:Ae.node,size:Ae.size,empty:Ae.empty,each:Ae.each,on:function(t,e){var n=this._id;return arguments.length<2?E(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?b:x;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=(0,C.A)(t),r="transform"===n?j:ie;return this.attrTween(t,"function"==typeof e?(n.local?ce:he)(n,r,z(this,"attr."+t,e)):null==e?(n.local?ae:oe)(n):(n.local?ue:se)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=(0,C.A)(t);return this.tween(n,(r.local?le:fe)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?T:ie;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=(0,be.j)(this,t),a=(this.style.removeProperty(t),(0,be.j)(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,xe(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=(0,be.j)(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=(0,be.j)(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,z(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=x(this,t),h=u.on,c=null==u.value[a]?o||(o=xe(e)):void 0;h===n&&i===c||(r=(n=h).copy()).on(s,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=(0,be.j)(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(z(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=E(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?S:$)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?de:pe)(e,t)):E(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ge:ve)(e,t)):E(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){x(this,t).ease=e}}(e,t)):E(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;x(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=x(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:Ae[Symbol.iterator]};var Me={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Oe(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}c.Ay.prototype.interrupt=function(t){return this.each((function(){k(this,t)}))},c.Ay.prototype.transition=function(t){var e,n;t instanceof ke?(e=t._id,t=t._name):(e=Ne(),(n=Me).time=(0,l.tB)(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,h=0;h<u;++h)(a=s[h])&&w(a,t,e,h,s,n||Oe(a,e));return new ke(r,this._parents,t,e)};const Ie=t=>()=>t;function Pe(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Te(t,e,n){this.k=t,this.x=e,this.y=n}Te.prototype={constructor:Te,scale:function(t){return 1===t?this:new Te(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Te(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var je=new Te(1,0,0);function Ce(t){t.stopImmediatePropagation()}function Se(t){t.preventDefault(),t.stopImmediatePropagation()}function $e(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function ze(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Le(){return this.__zoom||je}function Re(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function qe(){return navigator.maxTouchPoints||"ontouchstart"in this}function De(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Ve(){var t,e,n,s=$e,c=ze,l=De,f=Re,d=qe,p=[0,1/0],g=[[-1/0,-1/0],[1/0,1/0]],v=250,y=u,m=(0,r.A)("start","zoom","end"),_=500,w=150,b=0,x=10;function E(t){t.property("__zoom",Le).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",C).filter(d).on("touchstart.zoom",S).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function N(t,e){return(e=Math.max(p[0],Math.min(p[1],e)))===t.k?t:new Te(e,t.x,t.y)}function A(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new Te(t.k,r,i)}function M(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function O(t,e,n,r){t.on("start.zoom",(function(){I(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){I(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,i=arguments,o=I(t,i).event(r),a=c.apply(t,i),s=null==n?M(a):"function"==typeof n?n.apply(t,i):n,u=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),h=t.__zoom,l="function"==typeof e?e.apply(t,i):e,f=y(h.invert(s).concat(u/h.k),l.invert(s).concat(u/l.k));return function(t){if(1===t)t=l;else{var e=f(t),n=u/e[2];t=new Te(n,s[0]-e[0]*n,s[1]-e[1]*n)}o.zoom(null,t)}}))}function I(t,e,n){return!n&&t.__zooming||new P(t,e)}function P(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=c.apply(t,e),this.taps=0}function T(t,...e){if(s.apply(this,arguments)){var n=I(this,e).event(t),r=this.__zoom,i=Math.max(p[0],Math.min(p[1],r.k*Math.pow(2,f.apply(this,arguments)))),o=h(t);if(n.wheel)n.mouse[0][0]===o[0]&&n.mouse[0][1]===o[1]||(n.mouse[1]=r.invert(n.mouse[0]=o)),clearTimeout(n.wheel);else{if(r.k===i)return;n.mouse=[o,r.invert(o)],k(this),n.start()}Se(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),w),n.zoom("mouse",l(A(N(r,i),n.mouse[0],n.mouse[1]),n.extent,g))}}function j(t,...e){if(!n&&s.apply(this,arguments)){var r=t.currentTarget,u=I(this,e,!0).event(t),c=(0,i.A)(t.view).on("mousemove.zoom",(function(t){if(Se(t),!u.moved){var e=t.clientX-d,n=t.clientY-p;u.moved=e*e+n*n>b}u.event(t).zoom("mouse",l(A(u.that.__zoom,u.mouse[0]=h(t,r),u.mouse[1]),u.extent,g))}),!0).on("mouseup.zoom",(function(t){c.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,r=(0,i.A)(t).on("dragstart.drag",null);e&&(r.on("click.drag",a,o),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,u.moved),Se(t),u.event(t).end()}),!0),f=h(t,r),d=t.clientX,p=t.clientY;!function(t){var e=t.document.documentElement,n=(0,i.A)(t).on("dragstart.drag",a,o);"onselectstart"in e?n.on("selectstart.drag",a,o):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),Ce(t),u.mouse=[f,this.__zoom.invert(f)],k(this),u.start()}}function C(t,...e){if(s.apply(this,arguments)){var n=this.__zoom,r=h(t.changedTouches?t.changedTouches[0]:t,this),o=n.invert(r),a=n.k*(t.shiftKey?.5:2),u=l(A(N(n,a),r,o),c.apply(this,e),g);Se(t),v>0?(0,i.A)(this).transition().duration(v).call(O,u,r,t):(0,i.A)(this).call(E.transform,u,r,t)}}function S(n,...r){if(s.apply(this,arguments)){var i,o,a,u,c=n.touches,l=c.length,f=I(this,r,n.changedTouches.length===l).event(n);for(Ce(n),o=0;o<l;++o)u=[u=h(a=c[o],this),this.__zoom.invert(u),a.identifier],f.touch0?f.touch1||f.touch0[2]===u[2]||(f.touch1=u,f.taps=0):(f.touch0=u,i=!0,f.taps=1+!!t);t&&(t=clearTimeout(t)),i&&(f.taps<2&&(e=u[0],t=setTimeout((function(){t=null}),_)),k(this),f.start())}}function $(t,...e){if(this.__zooming){var n,r,i,o,a=I(this,e).event(t),s=t.changedTouches,u=s.length;for(Se(t),n=0;n<u;++n)i=h(r=s[n],this),a.touch0&&a.touch0[2]===r.identifier?a.touch0[0]=i:a.touch1&&a.touch1[2]===r.identifier&&(a.touch1[0]=i);if(r=a.that.__zoom,a.touch1){var c=a.touch0[0],f=a.touch0[1],d=a.touch1[0],p=a.touch1[1],v=(v=d[0]-c[0])*v+(v=d[1]-c[1])*v,y=(y=p[0]-f[0])*y+(y=p[1]-f[1])*y;r=N(r,Math.sqrt(v/y)),i=[(c[0]+d[0])/2,(c[1]+d[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!a.touch0)return;i=a.touch0[0],o=a.touch0[1]}a.zoom("touch",l(A(r,i,o),a.extent,g))}}function z(t,...r){if(this.__zooming){var o,a,s=I(this,r).event(t),u=t.changedTouches,c=u.length;for(Ce(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),_),o=0;o<c;++o)a=u[o],s.touch0&&s.touch0[2]===a.identifier?delete s.touch0:s.touch1&&s.touch1[2]===a.identifier&&delete s.touch1;if(s.touch1&&!s.touch0&&(s.touch0=s.touch1,delete s.touch1),s.touch0)s.touch0[1]=this.__zoom.invert(s.touch0[0]);else if(s.end(),2===s.taps&&(a=h(a,this),Math.hypot(e[0]-a[0],e[1]-a[1])<x)){var l=(0,i.A)(this).on("dblclick.zoom");l&&l.apply(this,arguments)}}}return E.transform=function(t,e,n,r){var i=t.selection?t.selection():t;i.property("__zoom",Le),t!==i?O(t,e,n,r):i.interrupt().each((function(){I(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},E.scaleBy=function(t,e,n,r){E.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,r)},E.scaleTo=function(t,e,n,r){E.transform(t,(function(){var t=c.apply(this,arguments),r=this.__zoom,i=null==n?M(t):"function"==typeof n?n.apply(this,arguments):n,o=r.invert(i),a="function"==typeof e?e.apply(this,arguments):e;return l(A(N(r,a),i,o),t,g)}),n,r)},E.translateBy=function(t,e,n,r){E.transform(t,(function(){return l(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),c.apply(this,arguments),g)}),null,r)},E.translateTo=function(t,e,n,r,i){E.transform(t,(function(){var t=c.apply(this,arguments),i=this.__zoom,o=null==r?M(t):"function"==typeof r?r.apply(this,arguments):r;return l(je.translate(o[0],o[1]).scale(i.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,g)}),r,i)},P.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=(0,i.A)(this.that).datum();m.call(t,this.that,new Pe(t,{sourceEvent:this.sourceEvent,target:E,type:t,transform:this.that.__zoom,dispatch:m}),e)}},E.wheelDelta=function(t){return arguments.length?(f="function"==typeof t?t:Ie(+t),E):f},E.filter=function(t){return arguments.length?(s="function"==typeof t?t:Ie(!!t),E):s},E.touchable=function(t){return arguments.length?(d="function"==typeof t?t:Ie(!!t),E):d},E.extent=function(t){return arguments.length?(c="function"==typeof t?t:Ie([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),E):c},E.scaleExtent=function(t){return arguments.length?(p[0]=+t[0],p[1]=+t[1],E):[p[0],p[1]]},E.translateExtent=function(t){return arguments.length?(g[0][0]=+t[0][0],g[1][0]=+t[1][0],g[0][1]=+t[0][1],g[1][1]=+t[1][1],E):[[g[0][0],g[0][1]],[g[1][0],g[1][1]]]},E.constrain=function(t){return arguments.length?(l=t,E):l},E.duration=function(t){return arguments.length?(v=+t,E):v},E.interpolate=function(t){return arguments.length?(y=t,E):y},E.on=function(){var t=m.on.apply(m,arguments);return t===m?E:t},E.clickDistance=function(t){return arguments.length?(b=(t=+t)*t,E):Math.sqrt(b)},E.tapDistance=function(t){return arguments.length?(x=+t,E):x},E}Te.prototype}}]);
3
- //# sourceMappingURL=3489.e0ce6106.js.map
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[3933,6314],{3933:(e,t,o)=>{function n(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,s){if("string"==typeof t?r.name===t:t.includes(r.name)){const t=[];for(let i=1;i<=o;i++){const o=s[s.length-i];if("MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key){const s=o.node;s.computed||"Identifier"!==s.property.type?s.computed&&"Literal"===s.property.type&&"string"==typeof s.property.value?t.push(n?`${r.name}.${s.property.value}`:s.property.value):e.hasNonStaticUsage=!0:t.push(n?`${r.name}.${s.property.name}`:s.property.name)}else e.hasNonStaticUsage=!0}t.length===o&&e.usedProperties.add(t.join("."))}}}function r(e,t){return function(o,n,r){if(n.name===e){const e=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?o.usedArgs.add(t.value):o.hasNonStaticUsage=!0}}}}}o.r(t),o.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>s,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>S,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>v,strictCollectMemberUsage:()=>l,track:()=>f,trackAll:()=>y,traverseStoryboardExpressions:()=>u,traverseStoryboardFunction:()=>g,traverseStoryboardFunctions:()=>h,unwrapProvider:()=>c.unwrapProvider});const s=r("APP","getMenu"),i=r("INSTALLED_APPS","has");var a=o(8897),c=o(279);function u(e,t,o){const n=new WeakSet,{matchExpressionString:r,visitNotMatchedExpressionString:s,visitNonExpressionString:i,visitObject:u}="string"==typeof o?{matchExpressionString:e=>e.includes(o)}:o;!function e(o){if("string"==typeof o)if((0,a.isEvaluable)(o))if(r(o))try{(0,a.preevaluate)(o,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,o)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==s||s(o);else null==i||i(o);else if((0,c.isObject)(o)){if(n.has(o))return;n.add(o),null==u||u(o);for(const t of Array.isArray(o)?o:Object.values(o))e(t)}}(e)}function l(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:r,usedProperties:s}=p(e,t,o);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${r}"`);return s}function p(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={usedProperties:new Set,hasNonStaticUsage:!1},s=n(r,t,o);return u(e,((e,t,o)=>{s(e,t),r.hasNonStaticUsage&&(r.nonStaticUsage=o)}),t),r}const d=["CTX","STATE","FORM_STATE"];function f(e,t,o){if(e.includes(t)){const r={usedProperties:new Set,hasNonStaticUsage:!1},{expression:s}=(0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(r,o)}});let i;if("SequenceExpression"===s.type&&(i=s.expressions[0])&&"Literal"===i.type&&i.value===t){if(r.usedProperties.size>0)return r.usedProperties;console.warn(`You are using "${t}" but no \`${o}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function y(e){if(d.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,d,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],o={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,r]=e.split(".");o[n[t]]||(o[n[t]]=[]),o[n[t]].push(r)})),o}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function h(e,t,o){if(Array.isArray(e))for(const n of e)null!=o&&o.matchSource&&!o.matchSource(n.source)||g(n,t)}function g(e,t,o){try{(0,a.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){o||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function S(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&g(e,n(s,t,r),o),s.hasNonStaticUsage&&!o)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return s.usedProperties.delete(e.name),s.usedProperties}const m="PERMISSIONS",b="check";function v(e){const t=new Set,o=k(t),{customTemplates:n,functions:r}=e.meta??{};return u([e.routes,n],o,m),h(r,o,{matchSource:e=>e.includes(m)}),Array.from(t)}function P(e){const t=new Set;return u(e,k(t),m),Array.from(t)}function k(e){return function(t,o){if(t.name===m){const t=o[o.length-1],n=o[o.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===b:"Identifier"===t.node.property.type&&t.node.property.name===b))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}}}]);
2
- //# sourceMappingURL=3933.e4f7efe6.js.map