@next-bricks/diagram 0.37.12 → 0.37.14

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 (93) hide show
  1. package/dist/bricks.json +3 -3
  2. package/dist/chunks/{1094.866a0229.js → 1094.373374c3.js} +3 -3
  3. package/dist/chunks/{1094.866a0229.js.map → 1094.373374c3.js.map} +1 -1
  4. package/dist/chunks/1122.01926999.js +2 -0
  5. package/dist/chunks/1122.01926999.js.map +1 -0
  6. package/dist/chunks/{114.a9c5060c.js → 114.75d133cd.js} +2 -2
  7. package/dist/chunks/{114.a9c5060c.js.map → 114.75d133cd.js.map} +1 -1
  8. package/dist/chunks/{1940.779fd8e9.js → 1940.82d7d631.js} +2 -2
  9. package/dist/chunks/{1940.779fd8e9.js.map → 1940.82d7d631.js.map} +1 -1
  10. package/dist/chunks/2272.c201099b.js +2 -0
  11. package/dist/chunks/{2272.25e1a5b4.js.map → 2272.c201099b.js.map} +1 -1
  12. package/dist/chunks/{2277.15bfaf8c.js → 2277.3b3178c0.js} +2 -2
  13. package/dist/chunks/{2277.15bfaf8c.js.map → 2277.3b3178c0.js.map} +1 -1
  14. package/dist/chunks/2416.1d80ac71.js +2 -0
  15. package/dist/chunks/{2416.ac83873e.js.map → 2416.1d80ac71.js.map} +1 -1
  16. package/dist/chunks/{3171.8ee6cc61.js → 3171.c81e338d.js} +2 -2
  17. package/dist/chunks/{3171.8ee6cc61.js.map → 3171.c81e338d.js.map} +1 -1
  18. package/dist/chunks/{3933.42e0e086.js → 3933.31423ab2.js} +2 -2
  19. package/dist/chunks/{6314.c78fd934.js.map → 3933.31423ab2.js.map} +1 -1
  20. package/dist/chunks/4090.a468d624.js +3 -0
  21. package/dist/chunks/{4090.3ffe04dc.js.map → 4090.a468d624.js.map} +1 -1
  22. package/dist/chunks/{4658.3d723f7a.js → 4658.cf7a3a4c.js} +2 -2
  23. package/dist/chunks/{4658.3d723f7a.js.map → 4658.cf7a3a4c.js.map} +1 -1
  24. package/dist/chunks/{4837.2619a231.js → 4837.6b2b2a4c.js} +2 -2
  25. package/dist/chunks/{4837.2619a231.js.map → 4837.6b2b2a4c.js.map} +1 -1
  26. package/dist/chunks/{4937.fd9c2a63.js → 4937.1ce6a553.js} +3 -3
  27. package/dist/chunks/{4937.fd9c2a63.js.map → 4937.1ce6a553.js.map} +1 -1
  28. package/dist/chunks/4947.c70c4c34.js +3 -0
  29. package/dist/chunks/4947.c70c4c34.js.map +1 -0
  30. package/dist/chunks/5399.b0a1369b.js +2 -0
  31. package/dist/chunks/5399.b0a1369b.js.map +1 -0
  32. package/dist/chunks/{5552.bb309dc4.js → 5552.9b3a0202.js} +2 -2
  33. package/dist/chunks/{5552.bb309dc4.js.map → 5552.9b3a0202.js.map} +1 -1
  34. package/dist/chunks/{6314.c78fd934.js → 6314.745fea7d.js} +2 -2
  35. package/dist/chunks/{3933.42e0e086.js.map → 6314.745fea7d.js.map} +1 -1
  36. package/dist/chunks/{7218.d0db630a.js → 7218.ddb2bda3.js} +2 -2
  37. package/dist/chunks/{7218.d0db630a.js.map → 7218.ddb2bda3.js.map} +1 -1
  38. package/dist/chunks/{7733.1034e172.js → 7733.80404918.js} +2 -2
  39. package/dist/chunks/{7733.1034e172.js.map → 7733.80404918.js.map} +1 -1
  40. package/dist/chunks/{9559.325daf5c.js → 9559.f63dbf90.js} +2 -2
  41. package/dist/chunks/{9559.325daf5c.js.map → 9559.f63dbf90.js.map} +1 -1
  42. package/dist/chunks/{editable-label.acff710b.js → editable-label.c775eb3d.js} +3 -3
  43. package/dist/chunks/{editable-label.acff710b.js.map → editable-label.c775eb3d.js.map} +1 -1
  44. package/dist/chunks/{eo-diagram.f5711214.js → eo-diagram.94659286.js} +2 -2
  45. package/dist/chunks/{eo-diagram.f5711214.js.map → eo-diagram.94659286.js.map} +1 -1
  46. package/dist/chunks/{eo-display-canvas.4eb810f6.js → eo-display-canvas.23df1d2d.js} +2 -2
  47. package/dist/chunks/{eo-display-canvas.4eb810f6.js.map → eo-display-canvas.23df1d2d.js.map} +1 -1
  48. package/dist/chunks/{eo-draw-canvas.59ef988e.js → eo-draw-canvas.032879b3.js} +2 -2
  49. package/dist/chunks/{eo-draw-canvas.59ef988e.js.map → eo-draw-canvas.032879b3.js.map} +1 -1
  50. package/dist/chunks/{experimental-node.ff3d2c8c.js → experimental-node.de8fe3db.js} +2 -2
  51. package/dist/chunks/{experimental-node.ff3d2c8c.js.map → experimental-node.de8fe3db.js.map} +1 -1
  52. package/dist/chunks/main.ee078519.js +2 -0
  53. package/dist/chunks/main.ee078519.js.map +1 -0
  54. package/dist/examples.json +3 -3
  55. package/dist/index.9811c7f6.js +2 -0
  56. package/dist/index.9811c7f6.js.map +1 -0
  57. package/dist/manifest.json +145 -145
  58. package/dist/types.json +3136 -3136
  59. package/dist-types/diagram/ConnectLineComponent.d.ts +0 -1
  60. package/dist-types/diagram/LineComponent.d.ts +0 -1
  61. package/dist-types/diagram/LineLabelComponent.d.ts +0 -1
  62. package/dist-types/diagram/LineMaskComponent.d.ts +0 -1
  63. package/dist-types/diagram/MarkerComponent.d.ts +0 -1
  64. package/dist-types/diagram/NodeComponent.d.ts +0 -1
  65. package/dist-types/diagram/interfaces.d.ts +0 -1
  66. package/dist-types/draw-canvas/CellComponent.d.ts +0 -1
  67. package/dist-types/draw-canvas/ConnectLineComponent.d.ts +0 -1
  68. package/dist-types/draw-canvas/EdgeComponent.d.ts +0 -1
  69. package/dist-types/draw-canvas/NodeComponent.d.ts +0 -1
  70. package/dist-types/draw-canvas/decorators/DecoratorArea.d.ts +0 -1
  71. package/dist-types/draw-canvas/decorators/DecoratorText.d.ts +0 -1
  72. package/dist-types/draw-canvas/decorators/index.d.ts +0 -1
  73. package/dist-types/shared/canvas/ZoomBarComponent.d.ts +0 -1
  74. package/dist-types/shared/canvas/useLayout.d.ts +0 -1
  75. package/package.json +4 -4
  76. package/dist/chunks/1122.da9a8118.js +0 -2
  77. package/dist/chunks/1122.da9a8118.js.map +0 -1
  78. package/dist/chunks/2272.25e1a5b4.js +0 -2
  79. package/dist/chunks/2416.ac83873e.js +0 -2
  80. package/dist/chunks/4090.3ffe04dc.js +0 -3
  81. package/dist/chunks/4947.74478519.js +0 -3
  82. package/dist/chunks/4947.74478519.js.map +0 -1
  83. package/dist/chunks/5399.aa4bf5e6.js +0 -2
  84. package/dist/chunks/5399.aa4bf5e6.js.map +0 -1
  85. package/dist/chunks/main.2afbaec0.js +0 -2
  86. package/dist/chunks/main.2afbaec0.js.map +0 -1
  87. package/dist/index.3c7385ed.js +0 -2
  88. package/dist/index.3c7385ed.js.map +0 -1
  89. /package/dist/chunks/{1094.866a0229.js.LICENSE.txt → 1094.373374c3.js.LICENSE.txt} +0 -0
  90. /package/dist/chunks/{4090.3ffe04dc.js.LICENSE.txt → 4090.a468d624.js.LICENSE.txt} +0 -0
  91. /package/dist/chunks/{4937.fd9c2a63.js.LICENSE.txt → 4937.1ce6a553.js.LICENSE.txt} +0 -0
  92. /package/dist/chunks/{4947.74478519.js.LICENSE.txt → 4947.c70c4c34.js.LICENSE.txt} +0 -0
  93. /package/dist/chunks/{editable-label.acff710b.js.LICENSE.txt → editable-label.c775eb3d.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[2272],{3739:(e,t,n)=>{n.d(t,{c:()=>a});var o=n(8769),r=n.n(o);function a(e){let t,{id:n,type:o,strokeColor:a}=e;switch(o){case"0..1":t=l;break;case"0..N":t=s;break;default:t=i}return r().createElement(t,{id:n,strokeColor:a})}function i(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 s(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,i,l=0,s=0;if(n){const o=t.x-e.x,r=t.y-e.y,a=Math.atan2(r,o);l=n/2*Math.cos(a+Math.PI/2),s=n/2*Math.sin(a+Math.PI/2)}const d=[[e.x+l,e.y+s],[t.x+l,t.y+s]],c=a(e,d),u=a(t,d);return r=c.length>0?c[0]:[e.x,e.y],i=u.length>0?u[0]:[t.x,t.y],[{x:r[0],y:r[1]},{x:i[0],y:i[1]}]}function a(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=i(t[0],t[1],e[0],e[1]);n&&r.push(n)}return r}function i(e,t,n,o){let[r,a]=e,[i,l]=t,[s,d]=n,[c,u]=o;if(r===i&&a===l||s===c&&d===u)return null;const h=(u-d)*(i-r)-(c-s)*(l-a);if(0===h)return null;const f=((c-s)*(a-d)-(u-d)*(r-s))/h,g=((i-r)*(a-d)-(l-a)*(r-s))/h;return f<0||f>1||g<0||g>1?null:[r+f*(i-r),a+f*(l-a)]}},733:(e,t,n)=>{function o(e,t,n,o){const a=n?r(e,n):e,i=o?r(t,o):t,l=Math.min(a.x-a.width/2,i.x-i.width/2),s=Math.max(a.x+a.width/2,i.x+i.width/2),d=Math.min(a.y-a.height/2,i.y-i.height/2),c=Math.max(a.y+a.height/2,i.y+i.height/2);return s-l<a.width+i.width&&c-d<a.height+i.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})},908:(e,t,n)=>{n.d(t,{m:()=>z});var o=n(8769),r=n.n(o),a=n(3373),i=n.n(a),l=n(531),s=n(3188),d=n(3033);function c(e,t){return e.find((e=>(0,l.o6)(e)&&e.id===t))}function u(e){var t,n;let{edge:a,cells:u,lineConfMap:f}=e;const g=(0,o.useRef)(null),v=(0,o.useMemo)((()=>c(u,a.source)),[u,a.source]),m=(0,o.useMemo)((()=>c(u,a.target)),[u,a.target]),p=(0,o.useMemo)((()=>f.get(a)),[a,f]),w=(0,o.useMemo)((()=>u.some((e=>(0,l.WW)(e)&&e.source===a.target&&e.target===a.source))?p.parallelGap:0),[u,a,p.parallelGap]),y=(0,o.useMemo)((()=>v&&m&&null!=v.view.x&&null!=m.view.x?(0,s.h)(h(v.view,5),h(m.view,5),w):null),[w,v,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:p.interactStrokeWidth}),r().createElement("path",{ref:g,className:i()("line",{dashed:p.dashed,[(p.dashed?"dashed":"solid")+"-animation"]:p.animate.useAnimate}),style:{"--time":`${p.animate.duration??d.Be}s`,"--solid-length":null===(t=g.current)||void 0===t||null===(n=t.getTotalLength)||void 0===n?void 0:n.call(t)},d:x,fill:"none",stroke:p.strokeColor,strokeWidth:p.strokeWidth,markerStart:p.showStartArrow?p.markerArrow:"",markerEnd:p.showEndArrow?p.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(965),g=n(936),v=n(1030),m=n(9126);function p(e){let{node:t,degraded:n,degradedNodeLabel:a,defaultNodeBricks:i,onResize:l}=e;const s=function(e){const[t,n]=(0,o.useState)(e);return(0,o.useEffect)((()=>{n((t=>(0,v.isEqual)(t,e)?t:e))}),[e]),t}({node:{id:t.id,data:t.data}}),d=t.useBrick,c=(0,o.useRef)(null),u=(0,o.useMemo)((()=>{var e;return n?null:d??(null==i||null===(e=i.find((e=>(0,g.checkIfByTransform)(e,s))))||void 0===e?void 0:e.useBrick)}),[n,d,i,s]),h=(0,o.useMemo)((()=>n?String(g.__secret_internals.legacyDoTransform(s,a??"<% DATA.node.id %>")):""),[n,a,s]),p=(0,o.useCallback)((e=>{const n=c.current;n&&(n.disconnect(),c.current=null),e?setTimeout((()=>{const n=new m.A((()=>{l(t.id,[e.offsetWidth,e.offsetHeight])}));n.observe(e),c.current=n})):l(t.id,null)}),[t.id,l]),w=(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:s,refCallback:p})):n?r().createElement("g",{className:"degraded",ref:w},r().createElement("circle",{cx:8,cy:8,r:8}),r().createElement("text",{x:8,y:32},h)):null}var w=n(9386),y=n(4197);function x(e,t){let{action:n,cell:o,scale:r,layout:a,activeTarget:i,cells:s,onCellsMoving:d,onCellsMoved:c,onCellResizing:u,onCellResized:h,onSwitchActiveTarget:f}=t;e.stopPropagation(),"resize"!==n&&(0,y.Q)(o,i)||null==f||f((0,w.P)(o));const g="force"===a||"dagre"===a;if((0,l.WW)(o))return;const v=("multi"===(null==i?void 0:i.type)&&"move"===n?s.filter((e=>(0,y.Q)(e,i))):[o]).filter((e=>(0,l.N)(e)&&!g||(0,l.mH)(e)));if(0===v.length)return;const m=[e.clientX,e.clientY],p=v.map((e=>({cell:e,position:"move"===n?[e.view.x,e.view.y]:[e.view.width,e.view.height]})));let x=!1;const k=(e,t)=>{const a=function(e){return[(e.clientX-m[0])/r,(e.clientY-m[1])/r]}(e);if(x||(x=a[0]**2+a[1]**2>=9),x)if("move"===n){var i;const e=p.map((e=>{let{cell:t,position:n}=e;return{type:t.type,id:t.id,x:n[0]+a[0],y:n[1]+a[1]}}));null===(i=t?c:d)||void 0===i||i(e)}else{var l;null===(l=t?h:u)||void 0===l||l({type:o.type,id:o.id,width:p[0].position[0]+a[0],height:p[0].position[1]+a[1]})}},b=e=>{k(e)},E=e=>{k(e,!0),x=!1,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",E)};document.addEventListener("mousemove",b),document.addEventListener("mouseup",E)}function k(e){let{cell:t,transform:n,readOnly:a,activeTarget:i,cells:l,onCellResizing:s,onCellResized:d,onSwitchActiveTarget:c}=e;const u=r().useRef(null);return(0,o.useEffect)((()=>{const e=u.current;if(!e||a)return;const o=e=>{x(e,{action:"resize",cell:t,scale:n.k,activeTarget:i,cells:l,onCellResizing:s,onCellResized:d,onSwitchActiveTarget:c})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[i,t,l,d,s,c,a,n.k]),r().createElement("g",{className:"decorator-area"},r().createElement("rect",{width:t.view.width,height:t.view.height,className:"area"}),!a&&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 b(e){let{cell:t,readOnly:n,onDecoratorTextEditing:a,onDecoratorTextChange:l}=e;const s=t.view.text??"",[d,c]=(0,o.useState)(s),[u,h]=(0,o.useState)(!1),f=(0,o.useRef)(!1),[g,v]=(0,o.useState)(!1),m=(0,o.useRef)(null),p=(0,o.useCallback)((e=>{n||(e.preventDefault(),e.stopPropagation(),h(!0))}),[n]);(0,o.useEffect)((()=>{const e=m.current;e&&e.textContent!==d&&(e.textContent=d)}),[d]),(0,o.useEffect)((()=>{u&&m.current&&(m.current.focus(),function(e){const t=document.createRange();t.selectNodeContents(e);const n=window.getSelection();n.removeAllRanges(),n.addRange(t)}(m.current)),null==a||a({id:t.id,editing:u})}),[t.id,u,a]),(0,o.useEffect)((()=>{f.current?null==a||a({id:t.id,editing:u}):f.current=!0}),[t.id,u,a]);const w=(0,o.useCallback)((e=>{n||c(e.target.textContent)}),[n]),y=(0,o.useCallback)((()=>{n||(h(!1),v(!0))}),[n]);return(0,o.useEffect)((()=>{g&&(null==l||l({id:t.id,view:{...t.view,text:d}}),v(!1))}),[t,d,l,g]),r().createElement("foreignObject",{className:"decorator-text"},r().createElement("div",{className:i()("text-container",{editing:u}),onDoubleClick:p},r().createElement("div",{className:"text",contentEditable:u,ref:m,onInput:w,onBlur:y})))}function E(e){let t,{cell:n,transform:o,readOnly:a,activeTarget:i,cells:l,onCellResizing:s,onCellResized:d,onSwitchActiveTarget:c,onDecoratorTextEditing:u,onDecoratorTextChange:h}=e;switch(n.decorator){case"area":t=k;break;case"text":t=b;break;default:return console.error(`Unknown decorator: ${n.decorator}`),null}return r().createElement(t,{cell:n,transform:o,readOnly:a,activeTarget:i,cells:l,onCellResizing:s,onCellResized:d,onSwitchActiveTarget:c,onDecoratorTextEditing:u,onDecoratorTextChange:h})}var C=n(8185);function z(e){let{layout:t,cell:n,cells:a,degraded:s,degradedNodeLabel:d,defaultNodeBricks:c,lineConfMap:h,activeTarget:f,readOnly:g,transform:v,unrelatedCells:m,onCellsMoving:k,onCellsMoved:b,onCellResizing:z,onCellResized:M,onSwitchActiveTarget:A,onCellContextMenu:N,onCellClick:R,onDecoratorTextEditing:T,onDecoratorTextChange:S,onNodeBrickResize:W,onCellMouseEnter:L,onCellMouseLeave:D}=e;const B=(0,o.useRef)(null),P=(0,o.useMemo)((()=>m.some((e=>(0,C.c)(e,n)))),[n,m]);(0,o.useEffect)((()=>{const e=B.current;if(!e)return;const o=e=>{g?e.stopPropagation():x(e,{layout:t,action:"move",cell:n,scale:v.k,activeTarget:f,cells:a,onCellsMoving:k,onCellsMoved:b,onSwitchActiveTarget:A})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[t,n,f,a,b,k,A,g,v.k]);const V=(0,o.useCallback)((e=>{g&&"decorator"===n.type||(e.preventDefault(),A((0,w.P)(n)),N({cell:n,clientX:e.clientX,clientY:e.clientY}))}),[n,N,A,g]),H=(0,o.useCallback)((e=>{R&&"decorator"!==n.type&&R({cell:n,clientX:e.clientX,clientY:e.clientY})}),[n,R]),O=(0,o.useCallback)((()=>{null==L||L(n)}),[n,L]),I=(0,o.useCallback)((()=>{null==D||D(n)}),[n,D]);return r().createElement("g",{className:i()("cell",{active:(0,y.Q)(n,f),faded:P,"read-only":g}),ref:B,transform:"edge"===n.type||null==n.view.x?void 0:`translate(${n.view.x} ${n.view.y})`,onContextMenu:V,onClick:H,onMouseEnter:O,onMouseLeave:I},(0,l.N)(n)?r().createElement(p,{node:n,degraded:s,degradedNodeLabel:d,defaultNodeBricks:c,onResize:W}):(0,l.WW)(n)?r().createElement(u,{edge:n,cells:a,lineConfMap:h}):(0,l.mH)(n)?r().createElement(E,{cell:n,transform:v,readOnly:g,activeTarget:f,cells:a,onCellResizing:z,onCellResized:M,onSwitchActiveTarget:A,onDecoratorTextEditing:T,onDecoratorTextChange:S}):null)}},3033:(e,t,n)=>{n.d(t,{Be:()=>m,CV:()=>o,HP:()=>a,Ie:()=>f,N8:()=>l,Ub:()=>v,VO:()=>h,XV:()=>g,Yt:()=>c,mF:()=>u,pC:()=>p,sS:()=>d,sz:()=>i,w1:()=>s,xc:()=>r});const o=Symbol.for("size-initialized"),r=Symbol.for("layout-initialized"),a=20,i=36,l=100,s=60,d=.5,c=2,u="gray",h=1,f=15,g=!1,v=!0,m=1,p=500},531:(e,t,n)=>{function o(e){return"node"===e.type}function r(e){return"decorator"===e.type}function a(e){return"node"===e.type}function i(e){return"edge"===e.type}function l(e){return"node"===e.type||"edge"===e.type}function s(e){return"node"===e.type||"decorator"===e.type&&"area"===e.decorator}n.d(t,{N:()=>o,WW:()=>i,mH:()=>r,nv:()=>l,o6:()=>s,vC:()=>a})},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 a=[];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)&&a.push(t);break;case"decorator":r&&"text"!=t.decorator&&!n.has(t.id)||a.push(t);break;default:a.push(t)}}else switch(null==n?void 0:n.type){case"multi":{const t=new Map,r=new Set,i=new Set;for(const e of n.targets)"node"===e.type&&(r.add(e.id),i.add(e.id));for(const l of e)"node"===l.type?t.set(l.id,l):"edge"===l.type?r.has(l.source)?i.add(l.target):r.has(l.target)?i.add(l.source):(0,o.Q)(l,n)||a.push(l):(0,o.Q)(l,n)||a.push(l);for(const[e,n]of t)i.has(e)||a.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):a.push(r):a.push(r);for(const[e,n]of t)o.has(e)||a.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))||a.push(t)}return a}},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)))}},8527:(e,t,n)=>{n.d(t,{r:()=>r});var o=n(531);function r(e,t){let{canvasWidth:n,canvasHeight:r,scaleRange:a}=t,i=1/0,l=1/0,s=-1/0,d=-1/0,c=!0;for(const t of e)if(!(0,o.WW)(t)){c=!1;const{view:e}=t,n=e.x+e.width,o=e.y+e.height;e.x<i&&(i=e.x),n>s&&(s=n),e.y<l&&(l=e.y),o>d&&(d=o)}const u=s-i,h=d-l,f=a&&!c&&(u>n||h>r)?Math.max(Math.min(n/u,r/h,a[1]),a[0]):1;return{x:c?0:(n-u*f)/2-i*f,y:c?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),a=n(531),i=n(3783),l=n(8527),s=n(6170),d=n(9127),c=n(8185);function u(e){let{cells:t,layout:n,previousCells:u,defaultNodeSize:h,canvasWidth:f,canvasHeight:g,scaleRange:v,transform:m,reason:p,parent:w,allowEdgeToArea:y}=e;const x="force"!==n&&"dagre"!==n,k=(0,i.C)(t,{defaultNodeSize:h}),b=[];let E=!1;const C=new Map;let z=!1;for(const e of u)(0,a.mH)(e)?z=!0:(0,a.N)(e)&&(z=!0,e[r.CV]&&C.set(e.id,e));const M=new Map;for(const e of k)if((0,a.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 A=!1;if("add-related-nodes"===p&&w){const e=new Set;for(const t of k)(0,a.WW)(t)&&t.source===w&&t.target!==w&&e.add(t.target);const t=M.get(w);if(void 0!==(null==t?void 0:t.view.x)&&void 0!==t.view.y){if(A=!0,x)for(const t of k)((0,a.N)(t)&&void 0===t.view.x||(0,a.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):b.push(e);if(b.length>0&&x){let e,n;if(o)e=o.view.x+o.view.width+r.sz,n=o.view.y;else{const o=b.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 b)t.view.x=e,t.view.y=n,e+=t.view.width+r.sz}}}if(!A){let e=h[0],t=h[1];const n=[];let r=!1;for(const o of k)(0,a.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?b.push(o):n.push(o)):(0,a.mH)(o)&&(r=!0);if(x){let e;z||(m=(0,l.r)((0,o.without)(k,...b),{canvasWidth:f,canvasHeight:g,scaleRange:v})),0===n.length||1===n.length&&!r?(b.push(...n),({getNodeView:e}=(0,d.C)({cells:k,allowEdgeToArea:y})),E=0===u.length||u.length===k.length&&u.every(((e,t)=>(0,c.c)(e,k[t])))):({getNodeView:e}=(0,s.k)({cells:k,fixedPosition:!0,allowEdgeToArea:y,center:[(f/2-m.x)/m.k,(g/2-m.y)/m.k]}));for(const t of k)if((0,a.N)(t)){const n=e(t.id);t.view.x=n.x,t.view.y=n.y}}}return{cells:k,updated:b,shouldReCenter:E}}},5748:(e,t,n)=>{n.d(t,{d:()=>i});var o=n(531),r=n(3033);function a(e,t,n){const o=e.findLastIndex(n)+1;return[...e.slice(0,o),t,...e.slice(o)]}const i=(l={cells:(e,t)=>{switch(t.type){case"drop-node":return a(e,t.payload,(e=>!("decorator"===e.type&&"text"===e.decorator)));case"drop-decorator":return"text"===t.payload.decorator?[...e,t.payload]:a(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 a(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:a}=t.payload,i=e.findIndex((e=>e.type===n&&e.id===o));if(-1!==i){const t=e[i];return[...e.slice(0,i),{...t,view:{...t.view,width:r,height:a}},...e.slice(i+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:()=>g});var o=n(8769),r=n.n(o),a=n(2657),i=n(6768),l=n(7507),s=n(8621),d=n(965),c=n(9575);const u=e=>o.createElement("svg",(0,c.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,c.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,c.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 g(e){let{shadowRoot:t,scale:n,scaleRange:c,onZoomChange:g,onReCenter:v}=e;const m=(0,d.useCurrentTheme)(),p=(0,o.useMemo)((()=>(0,s.VC)()),[]),w=(0,o.useRef)(null),y=100*c[0],x=100*c[1],k=100*n,b=(0,o.useMemo)((()=>({formatter:e=>`${e}%`,placement:"left",getPopupContainer:()=>w.current})),[]),E=(0,o.useCallback)((()=>{g(Math.min(k+5,x))}),[x,g,k]),C=(0,o.useCallback)((()=>{g(Math.max(k-5,y))}),[y,g,k]);return r().createElement(a.Ay,{theme:{algorithm:"dark-v2"===m?i.A.darkAlgorithm:i.A.defaultAlgorithm}},r().createElement(s.N7,{container:t,autoClear:!0,cache:p,hashPriority:"high"},r().createElement("div",{className:"zoom-bar",ref:w},r().createElement("div",{className:"center-button",onClick:v,role:"button"},r().createElement(u,null)),r().createElement("div",{className:"zoom-slider"},r().createElement("div",{className:"zoom-button",role:"button",onClick:E},r().createElement(h,null)),r().createElement(l.A,{min:y,max:x,value:k,step:5,vertical:!0,included:!1,tooltip:b,onChange:g}),r().createElement("div",{className:"zoom-button",role:"button",onClick:C},r().createElement(f,null))))))}},9127:(e,t,n)=>{n.d(t,{C:()=>s});var o=n(1030),r=n(7586),a=n.n(r),i=n(8802),l=n(531);function s(e){let{cells:t,layoutOptions:n,allowEdgeToArea:r}=e;const{nodePadding:s,...d}={nodePadding:0,rankdir:"TB",ranksep:50,edgesep:10,nodesep:50,...(0,o.pick)(n,["nodePadding","rankdir","ranksep","edgesep","nodesep","align"])},c=(0,i.D)(s);if(!t.some(l.N))return{getNodeView:()=>null,nodePaddings:c};const u=new(a().graphlib.Graph);u.setGraph(d),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+c[1]+c[3],height:e.view.height+c[0]+c[2]}):(0,l.WW)(e)&&u.setEdge(e.source,e.target);return a().layout(u),{getNodeView:e=>u.node(e),nodePaddings:c}}},6170:(e,t,n)=>{n.d(t,{k:()=>h});var o=n(1030),r=n(6149),a=n(4842),i=n(1945),l=n(9418),s=n(3854),d=n(7931),c=n(531),u=n(8802);function h(e){let{cells:t,layoutOptions:n,center:h,fixedPosition:f,allowEdgeToArea:g}=e;const{nodePadding:v,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}},p=(0,u.D)(v),w=[],y=[],x=new Map;for(const e of t)if(g&&(0,c.o6)(e)||(0,c.N)(e)){const t={id:e.id,width:e.view.width+p[1]+p[3],height:e.view.height+p[0]+p[2],...f?{fx:e.view.x,fy:e.view.y}:null};w.push(t),x.set(t.id,t)}else(0,c.WW)(e)&&y.push({source:e.source,target:e.target});const k=(0,r.A)(y).id((e=>e.id)),b=(0,a.A)(w).force("link",k).force("x",(0,i.A)(null==h?void 0:h[0])).force("y",(0,l.A)(null==h?void 0:h[1])).force("charge",(0,s.A)());return m&&b.force("collide",(0,d.A)().radius((e=>Math.sqrt(e.width**2+e.height**2)/2+m.radiusDiff)).strength(m.strength).iterations(m.iterations)),b.stop(),function(e){e.tick(Math.ceil(Math.log(e.alphaMin())/Math.log(1-e.alphaDecay())))}(b),{getNodeView:e=>x.get(e),nodePaddings:p}}},1819:(e,t,n)=>{n.d(t,{J:()=>a});var o=n(8769),r=n(8185);function a(e){let{cellsRef:t,activeTarget:n,onActiveTargetChange:a}=e;const i=n??null,[l,s]=(0,o.useState)(i);(0,o.useEffect)((()=>{s((e=>(0,r.c)(e,i)?e:i))}),[i]);const d=(0,o.useRef)(!1);return(0,o.useEffect)((()=>{d.current?a(l):d.current=!0}),[l,a]),(0,o.useEffect)((()=>{if(!l)return;const e=e=>{e.composedPath().indexOf(t.current)<=0&&s(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),a=n(1517),i=n(3033),l=n(531),s=n(8527),d=n(6170),c=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:g,zoomer:v,scaleRange:m,layoutKey:p,allowEdgeToArea:w,dispatch:y}=e;const[x,k]=(0,o.useState)("force"!==t&&"dagre"!==t),b=(0,o.useRef)(p),E=(0,o.useCallback)((()=>++b.current),[]),[C,z]=function(e){let{rootRef:t,cells:n,layoutInitialized:d,zoomable:c,zoomer:u,scaleRange:h}=e;const[f,g]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{const e=t.current;if(!e||!d||f||!n.some((e=>(0,l.N)(e)||(0,l.mH)(e)))||n.some((e=>(0,l.N)(e)&&!e[i.CV])))return;const{k:o,x:v,y:m}=(0,s.r)(n,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:c?h:void 0});u.transform((0,r.A)(e),new a.uV(o,v,m)),g(!0)}),[n,f,d,t,h,c,u]),(0,o.useEffect)((()=>{n.some((e=>(0,l.N)(e)||(0,l.mH)(e)))||g(!1)}),[n]),[f,g]}({rootRef:u,layoutInitialized:x,cells:f,zoomable:g,zoomer:v,scaleRange:m}),M=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(f.some((e=>(0,l.N)(e)&&!e[i.CV]))||0===f.length)return;if("force"!==t&&"dagre"!==t)return void k(!0);if(b.current!==p||(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,a;({getNodeView:r,nodePaddings:a}="force"===t?(0,d.k)({cells:f,layoutOptions:n,allowEdgeToArea:w}):(0,c.C)({cells:f,layoutOptions:n,allowEdgeToArea:w}));const s=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(w&&(0,l.o6)(e)||(0,l.N)(e)){const t=r(e.id);return{...e,view:{...e.view,x:t.x-t.width*s[0]+a[3],y:t.y-t.height*s[1]+a[0]},[i.xc]:!0}}return e}));M.current=u.filter(l.nv),y({type:"update-cells",payload:u}),k(!0)}),[f,y,t,p,n]),{centered:C,setCentered:z,getNextLayoutKey:E}}},7531:(e,t,n)=>{n.d(t,{d:()=>s});var o=n(8769),r=n(936),a=n(1030),i=n(531),l=n(3033);function s(e){let{cells:t,defaultEdgeLines:n,markerPrefix:s}=e;return(0,o.useMemo)((()=>{const e=[{strokeColor:l.mF}],o=new WeakMap;for(const c of t)if((0,i.WW)(c)){const t=r.__secret_internals.legacyDoTransform({edge:c},null==n?void 0:n.find((e=>(0,r.checkIfByTransform)(e,{edge:c}))))??{},i={dashed:!1,strokeColor:l.mF,strokeWidth:l.VO,interactStrokeWidth:l.Ie,showStartArrow:l.XV,showEndArrow:l.Ub,animate:{useAnimate:!1,duration:l.Be},...(0,a.omitBy)(t,a.isUndefined)};void 0===i.parallelGap&&(i.parallelGap=i.interactStrokeWidth);const u=d({strokeColor:i.strokeColor},e);i.markerArrow=`url(#${s}${u})`,o.set(c,i)}return[o,e]}),[t,n,s])}function d(e,t){let n=(0,a.findIndex)(t,e);return-1===n&&(n=t.push(e)-1),n}},8197:(e,t,n)=>{n.d(t,{H:()=>i});var o=n(8769),r=n(531),a=n(3033);function i(e){let{cells:t,layout:n,centered:i}=e;return(0,o.useMemo)((()=>i&&t.every((e=>!(0,r.N)(e)||e[a.CV]&&("force"!==n&&"dagre"!==n||e[a.xc])))),[t,i,n])}},8091:(e,t,n)=>{n.d(t,{f:()=>l});var o=n(8769),r=n(7566),a=n(1517),i=n(3033);function l(e){let{rootRef:t,zoomable:n,scrollable:l,pannable:s,draggable:d,ctrlDraggable:c,scaleRange:u,onSwitchActiveTarget:h}=e;const[f,g]=(0,o.useState)(!1),[v,m]=(0,o.useState)({k:1,x:0,y:0}),p=(0,o.useMemo)((()=>u??[i.sS,i.Yt]),[u]),w=(0,o.useMemo)((()=>(0,a.s_)()),[]);return(0,o.useEffect)((()=>{let e=!1;w.scaleExtent(n?p:[1,1]).on("start",(()=>{e=!1,g(!0)})).on("zoom",(t=>{e=!0,m(t.transform)})).on("end",(()=>{g(!1),e||null==h||h(null)})).filter((e=>("wheel"===e.type||(c?d||e.ctrlKey:!e.ctrlKey))&&!e.button))}),[h,p,n,w,c,d]),(0,o.useEffect)((()=>{if(c){const e=e=>{e.ctrlKey&&e.preventDefault()};return document.addEventListener("contextmenu",e,!0),()=>{document.removeEventListener("contextmenu",e,!0)}}}),[c]),(0,o.useEffect)((()=>{const e=t.current;if(!e)return;const o=(0,r.A)(e),a=()=>{o.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(n||l||s)return(n||l)&&o.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),l&&(e.preventDefault(),w.translateBy(o,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),o.call(w).on("wheel",(e=>{e.preventDefault()})).on("dblclick.zoom",null),(d||c)&&s||o.on("mousedown.zoom",null),s||o.on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),a;a()}),[c,d,s,t,l,n,w]),{grabbing:f,transform:v,zoomer:w,scaleRange:p}}},6237:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(6758),r=n.n(o),a=n(935),i=n.n(a)()(r());i.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=i.toString()},3012:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(6758),r=n.n(o),a=n(935),i=n.n(a)()(r());i.push([e.id,"*{box-sizing:border-box}:host{display:block;position:relative;overflow:hidden;--animation-dasharray:48;--stroke-dashoffset:96;--dasharray:4}:host,\n.root{width:100%;height:100%}:host([hidden]){display:none}.root{opacity:0}.root.ready{opacity:1}.root:focus{outline:none}@keyframes dashedAnimation{0%{stroke-dashoffset:var(--stroke-dashoffset)}to{stroke-dashoffset:0}}@keyframes solidAnimation{to{stroke-dashoffset:0}}.solid-animation{stroke-dasharray:var(--solid-length);stroke-dashoffset:var(--solid-length);animation:solidAnimation var(--time) linear infinite}.dashed-animation{animation:dashedAnimation var(--time) linear infinite}.decorator-area .area{fill:rgba(119,141,195,0.1);stroke:none;stroke-width:0}.node,\n.decorator-text{overflow:visible}.cell.active .decorator-area .area,\n.allowEdgeToArea .decorator-area .area:hover,\n.cell.active .line-active-bg{stroke:var(--palette-blue-5);stroke-dasharray:var(--dasharray);stroke-width:1}.cell:not(.read-only){-webkit-user-select:none;user-select:none}.resize-handle{cursor:nwse-resize;opacity:0}.resize-handle rect{fill:transparent;stroke:none}.resize-handle path{fill:none;stroke:var(--palette-gray-5);stroke-width:1.5}.cell.active .decorator-area .resize-handle,\n.decorator-area:hover .resize-handle{opacity:1}.connect-line{pointer-events:none}.connect-line:not(.connecting){display:none}.line.dashed{stroke-dasharray:var(--dasharray)}.cell.active .decorator-text .text-container{outline:1px dashed var(--palette-blue-5)}.decorator-text .text-container{width:max-content;padding:0.5em}.decorator-text .text:focus{outline:none}.cell.faded{opacity:0.3}.cell .node{pointer-events:none}.cell .node > *{pointer-events:auto}.degraded{pointer-events:bounding-box}.degraded circle{fill:rgb(119,141,195)}.degraded text{text-anchor:middle;fill:var(--antd-text-color)}.cell.active .degraded circle,\n.cell.active .degraded text,\n.degraded:hover circle,\n.degraded:hover text{fill:var(--color-brand)}",""]);const l=i.toString()}}]);
2
- //# sourceMappingURL=2272.25e1a5b4.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(965),r=n(936);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(965),r=n(936);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(936),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(936),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(936);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.ac83873e.js.map
@@ -1,3 +0,0 @@
1
- /*! For license information please see 4090.3ffe04dc.js.LICENSE.txt */
2
- (globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[4090,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,s){let a={width:0,height:0,rank:s,borderType:e},u=o[e][s-1],h=r.addDummyNode(t,"border",a,n);o[e][s]=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,s=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),a=r+i;n.setEdge(t.v,t.w,a),s=Math.max(s,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}(s+o+3).map((()=>new i)),h=o+1;return n.nodes().forEach((t=>{a(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],a=e[0];for(;t.nodeCount();){for(;r=a.dequeue();)s(t,e,n,r);for(;r=o.dequeue();)s(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(s(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 s(t,e,n,r,i){let o=i?[]:void 0;return t.inEdges(r.v).forEach((r=>{let s=t.edge(r),u=t.node(r.v);i&&o.push({v:r.v,w:r.w}),u.out-=s,a(e,n,u)})),t.outEdges(r.v).forEach((r=>{let i=t.edge(r),o=r.w,s=t.node(o);s.in-=i,a(e,n,s)})),t.removeNode(r.v),o}function a(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),s=n(6856).normalizeRanks,a=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 e=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)),w);Object.keys(_).forEach((t=>{void 0===r[t]&&(r[t]=_[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){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",(()=>s(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",(()=>a(t))),e(" addBorderSegments",(()=>c(t))),e(" order",(()=>f(t))),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,s=n.x-i,a=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*s/3,y:o-a},{x:i+5*s/6,y:o-a},{x:i+s,y:o},{x:i+5*s/6,y:o+a},{x:i+2*s/3,y:o+a}],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]),s=t.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(s.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(),s=o.marginx||0,a=o.marginy||0;function u(t){let o=t.x,s=t.y,a=t.width,u=t.height;e=Math.min(e,o-a/2),n=Math.max(n,o+a/2),r=Math.min(r,s-u/2),i=Math.max(i,s+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-=s,r-=a,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+s,o.height=i-r+a}(t))),e(" assignNodeIntersects",(()=>function(t){t.edges().forEach((e=>{let n,r,i=t.edge(e),o=t.node(e.v),s=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=s,r=o),i.points.unshift(p.intersectRect(o,n)),i.points.push(p.intersectRect(s,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)))}(e,n))),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,e)))}))};let v=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},m=["acyclicer","ranker","rankdir","align"],w=["width","height"],_={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,s,a,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,s,a,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:s-a[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:s+a[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,s=2*o+1;t.graph().nestingRoot=e,t.edges().forEach((e=>t.edge(e).minlen*=s));let a=function(t){return t.edges().reduce(((e,n)=>e+t.edge(n).weight),0)}(t)+1;t.children().forEach((r=>i(t,e,s,a,o,n,r))),t.graph().nodeRankFactor=s},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,s=e.v,a=t.node(s).rank,u=e.w,h=t.node(u).rank,c=e.name,l=t.edge(e),f=l.labelRank;if(h!==a+1){for(t.removeEdge(e),o=0,++a;a<h;++o,++a)l.points=[],i={width:0,height:0,edgeLabel:l,edgeObj:e,rank:a},n=r.addDummyNode(t,"edge",i,"_d"),a===f&&(i.width=l.width,i.height=l.height,i.dummy="edge-label",i.labelpos=l.labelpos),t.setEdge(s,n,{weight:l.weight},c),0===o&&t.graph().dummyChains.push(n),s=n;t.setEdge(s,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,s,a=t.parent(n);for(;a;){if(o=t.parent(a),o?(s=i[o],i[o]=a):(s=r,r=a),s&&s!==a)return void e.setEdge(s,a);a=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),s=new r({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((e=>t.node(e)));return t.nodes().forEach((r=>{let i=t.node(r),a=t.parent(r);(i.rank===e||i.minRank<=e&&e<=i.maxRank)&&(s.setNode(r),s.setParent(r,a||o),t[n](r).forEach((e=>{let n=e.v===r?e.w:e.v,i=s.edge(n,r),o=void 0!==i?i.weight:0;s.setEdge(n,r,{weight:t.edge(e).weight+o})})),i.hasOwnProperty("minRank")&&s.setNode(r,{borderLeft:i.borderLeft[e],borderRight:i.borderRight[e]}))})),s}},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)))),s=1;for(;s<n.length;)s<<=1;let a=2*s-1;s-=1;let u=new Array(a).fill(0),h=0;return o.forEach((t=>{let e=t.pos+s;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),s=n(4600),a=n(7508),u=n(4678).Graph,h=n(6856);function c(t,e,n){return e.map((function(e){return s(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)),a(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){let e=h.maxRank(t),n=c(t,h.range(1,e+1),"inEdges"),o=c(t,h.range(e-1,-1,-1),"outEdges"),s=r(t);f(t,s);let a,u=Number.POSITIVE_INFINITY;for(let e=0,r=0;r<4;++e,++r){l(e%2?n:o,e%4>=2),s=h.buildLayerMatrix(t);let c=i(t,s);c<u&&(r=0,a=Object.assign({},s),u=c)}f(t,a)}},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,s,a){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,s,a);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,s);!function(t,e){t.forEach((t=>{t.vs=t.vs.flatMap((t=>e[t]?e[t].vs:t))}))}(p,f);let g=o(p,a);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,s=n.rhs.sort(((t,e)=>e.i-t.i)),a=[],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(a,s,c),o.forEach((t=>{c+=t.vs.length,a.push(t.vs),u+=t.barycenter*t.weight,h+=t.weight,c=i(a,s,c)}));let f={vs:a.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,s=[],a=[],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),s.push(i)}while(i&&(e[i].low>u||h>e[i].lim));for(o=i,i=r;(i=t.parent(i))!==o;)a.push(i);return{path:s.concat(a.reverse()),lca:o}}(t,e,i.v,i.w),s=o.path,a=o.lca,u=0,h=s[u],c=!0;for(;n!==i.w;){if(r=t.node(n),c){for(;(h=s[u])!==a&&t.node(h).maxRank<r.rank;)u++;h===a&&(c=!1)}if(!c){for(;u<s.length-1&&t.node(h=s[u+1]).minRank<=r.rank;)u++;h=s[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.reduce((function(e,r){let i=0,o=0,s=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:s;(c||e===u)&&(r.slice(o,h+1).forEach((e=>{t.predecessors(e).forEach((r=>{let o=t.node(r),s=o.order;!(s<i||l<s)||o.dummy&&t.node(e).dummy||a(n,r,e)}))})),o=h+1,i=l)})),r})),n}function s(t,e){let n={};function r(e,r,o,s,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<s||r.order>u)&&a(n,e,h)}))}))}return e.reduce((function(e,n){let i,o=-1,s=0;return n.forEach(((a,u)=>{if("border"===t.node(a).dummy){let e=t.predecessors(a);e.length&&(i=t.node(e[0]).order,r(n,s,u,o,i),s=u,o=i)}r(n,s,n.length,i,e.length)})),n})),n}function a(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={},s={};return e.forEach((t=>{t.forEach(((t,e)=>{i[t]=t,o[t]=t,s[t]=e}))})),e.forEach((t=>{let e=-1;t.forEach((t=>{let a=r(t);if(a.length){a=a.sort(((t,e)=>s[t]-s[e]));let r=(a.length-1)/2;for(let h=Math.floor(r),c=Math.ceil(r);h<=c;++h){let r=a[h];o[t]===t&&e<s[r]&&!u(n,t,r)&&(o[r]=t,o[t]=i[t]=i[r],e=s[r])}}}))})),{root:i,align:o}}function c(t,e,n,i,o){let s={},a=function(t,e,n,i){let o=new r,s=t.graph(),a=function(t,e,n){return(r,i,o)=>{let s,a=r.node(i),u=r.node(o),h=0;if(h+=a.width/2,a.hasOwnProperty("labelpos"))switch(a.labelpos.toLowerCase()){case"l":s=-a.width/2;break;case"r":s=a.width/2}if(s&&(h+=n?s:-s),s=0,h+=(a.dummy?e:t)/2,h+=(u.dummy?e:t)/2,h+=u.width/2,u.hasOwnProperty("labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(h+=n?s:-s),s=0,h}}(s.nodesep,s.edgesep,i);return e.forEach((e=>{let r;e.forEach((e=>{let i=n[e];if(o.setNode(i),r){var s=n[r],u=o.edge(s,i);o.setEdge(s,i,Math.max(a(t,e,r),u||0))}r=e}))})),o}(t,e,n,o),u=o?"borderLeft":"borderRight";function h(t,e){let n=a.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){s[t]=a.inEdges(t).reduce(((t,e)=>Math.max(t,s[e.v]+a.edge(e))),0)}),a.predecessors.bind(a)),h((function(e){let n=a.outEdges(e).reduce(((t,e)=>Math.min(t,s[e.w]-a.edge(e))),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[e]=Math.max(s[e],n))}),a.successors.bind(a)),Object.keys(i).forEach((t=>s[t]=s[n[t]])),s}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((s=>{let a=n+s,u=t[a];if(u===e)return;let h=Object.values(u),c=r-Math.min(...h);"l"!==s&&(c=o-Math.max(...h)),c&&(t[a]=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),s(t,n)),a={};["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 s=("u"===o?t.predecessors:t.successors).bind(t),u=h(0,e,r,s),l=c(t,e,u.root,u.align,"r"===n);"r"===n&&(l=i.mapValues(l,(t=>-t))),a[o+n]=l}))}));let u=l(t,a);return f(a,u),d(a,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:a,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 s=o.v,a=r===s?o.w:s;t.hasNode(a)||i(e,o)||(t.setNode(a,{}),t.setEdge(r,a,{}),n(a))}))})),t.nodeCount()}function s(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 a(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=s(u,t),n=u.hasNode(e.v)?i(t,e):-i(t,e),a(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":s(t)}};var s=r},7520:(t,e,n)=>{"use strict";var r=n(7885),i=n(4389).slack,o=n(4389).longestPath,s=n(4678).alg.preorder,a=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=a(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),s=0;return o||(i=!1,o=e.edge(r,n)),s=o.weight,e.nodeEdges(n).forEach((o=>{var a,u,h=o.v===n,c=h?o.w:o.v;if(c!==r){var l=h===i,f=e.edge(o).weight;if(s+=l?f:-f,a=n,u=c,t.hasEdge(a,u)){var d=t.edge(n,c).cutvalue;s+=l?-d:d}}})),s}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,s=t.node(r);return e[r]=!0,t.neighbors(r).forEach((i=>{e.hasOwnProperty(i)||(n=d(t,e,n,i,r))})),s.low=o,s.lim=n++,i?s.parent=i:delete s.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 s=t.node(r),a=t.node(o),u=s,h=!1;s.lim>a.lim&&(u=a,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=s(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=a(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,s=e.x-i,a=e.y-o,u=t.width/2,h=t.height/2;if(!s&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*u>Math.abs(s)*h?(a<0&&(h=-h),n=h*s/a,r=h):(s<0&&(u=-u),n=u,r=u*a/s),{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:a,zipObject:h};let s=0;function a(t){var e=++s;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.0.4"},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 s=o.pop();s[1]?i.push(s[0]):n.hasOwnProperty(s[0])||(n[s[0]]=!0,o.push([s[0],!0]),r(e(s[0]),(t=>o.push([t,!1]))))}}function n(t,e,n,i){for(var o=[t];o.length>0;){var s=o.pop();n.hasOwnProperty(s)||(n[s]=!0,i.push(s),r(e(s),(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),s="post"===i?e:n,a=[],u={};return r.forEach((e=>{if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);s(e,o,u,a)})),a}},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,s,a={},u=new r,h=function(t){var e=t.v!==o?t.v:t.w,r=a[e],i=n(t),h=s.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;a[t]={distance:n},u.add(t,n)}));u.size()>0&&(o=u.removeMin(),(s=a[o]).distance!==Number.POSITIVE_INFINITY);)i(o).forEach(h);return a}(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])}))}},861: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],s=o[n],a=r.distance+i.distance;a<s.distance&&(s.distance=a,s.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(861),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,s={},a=new i;function u(t){var r=t.v===n?t.w:t.v,i=a.priority(r);if(void 0!==i){var o=e(t);o<i&&(s[r]=n,a.decrease(r,o))}}if(0===t.nodeCount())return o;t.nodes().forEach((function(t){a.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),a.decrease(t.nodes()[0],0);for(var h=!1;a.size()>0;){if(n=a.removeMin(),s.hasOwnProperty(n))o.setEdge(n,s[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(s){var a=r[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.hasOwnProperty(t)?r[t].onStack&&(a.lowlink=Math.min(a.lowlink,r[t].index)):(o(t),a.lowlink=Math.min(a.lowlink,r[t].lowlink))})),a.lowlink===a.index){var u,h=[];do{u=n.pop(),r[u].onStack=!1,h.push(u)}while(s!==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(s){if(r.hasOwnProperty(s))throw new n;e.hasOwnProperty(s)||(r[s]=!0,e[s]=!0,t.predecessors(s).forEach(o),delete r[s],i.push(s))})),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{#t=[];#e={};size(){return this.#t.length}keys(){return this.#t.map((function(t){return t.key}))}has(t){return this.#e.hasOwnProperty(t)}priority(t){var e=this.#e[t];if(void 0!==e)return this.#t[e].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this.#t[0].key}add(t,e){var n=this.#e;if(t=String(t),!n.hasOwnProperty(t)){var r=this.#t,i=r.length;return n[t]=i,r.push({key:t,priority:e}),this.#n(i),!0}return!1}removeMin(){this.#r(0,this.#t.length-1);var t=this.#t.pop();return delete this.#e[t.key],this.#i(0),t.key}decrease(t,e){var n=this.#e[t];if(e>this.#t[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this.#t[n].priority+" New: "+e);this.#t[n].priority=e,this.#n(n)}#i(t){var e=this.#t,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.#r(t,i),this.#i(i)))}#n(t){for(var e,n=this.#t,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this.#r(t,e),t=e}#r(t,e){var n=this.#t,r=this.#e,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 s(t,n,i,o){var s=""+n,a=""+i;if(!t&&s>a){var u=s;s=a,a=u}return s+r+a+r+(void 0===o?e:o)}function a(t,e){return s(t,e.v,e.w,e.name)}t.exports=class{#o=!0;#s=!1;#a=!1;#u;#h=()=>{};#c=()=>{};#l={};#f={};#d={};#p={};#g={};#v={};#y={};#m=0;#w=0;#_;#b;constructor(t){t&&(this.#o=!t.hasOwnProperty("directed")||t.directed,this.#s=!!t.hasOwnProperty("multigraph")&&t.multigraph,this.#a=!!t.hasOwnProperty("compound")&&t.compound),this.#a&&(this.#_={},this.#b={},this.#b[n]={})}isDirected(){return this.#o}isMultigraph(){return this.#s}isCompound(){return this.#a}setGraph(t){return this.#u=t,this}graph(){return this.#u}setDefaultNodeLabel(t){return this.#h=t,"function"!=typeof t&&(this.#h=()=>t),this}nodeCount(){return this.#m}nodes(){return Object.keys(this.#l)}sources(){var t=this;return this.nodes().filter((e=>0===Object.keys(t.#f[e]).length))}sinks(){var t=this;return this.nodes().filter((e=>0===Object.keys(t.#p[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.#l.hasOwnProperty(t)?(arguments.length>1&&(this.#l[t]=e),this):(this.#l[t]=arguments.length>1?e:this.#h(t),this.#a&&(this.#_[t]=n,this.#b[t]={},this.#b[n][t]=!0),this.#f[t]={},this.#d[t]={},this.#p[t]={},this.#g[t]={},++this.#m,this)}node(t){return this.#l[t]}hasNode(t){return this.#l.hasOwnProperty(t)}removeNode(t){var e=this;if(this.#l.hasOwnProperty(t)){var n=t=>e.removeEdge(e.#v[t]);delete this.#l[t],this.#a&&(this.#x(t),delete this.#_[t],this.children(t).forEach((function(t){e.setParent(t)})),delete this.#b[t]),Object.keys(this.#f[t]).forEach(n),delete this.#f[t],delete this.#d[t],Object.keys(this.#p[t]).forEach(n),delete this.#p[t],delete this.#g[t],--this.#m}return this}setParent(t,e){if(!this.#a)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.#x(t),this.#_[t]=e,this.#b[e][t]=!0,this}#x(t){delete this.#b[this.#_[t]][t]}parent(t){if(this.#a){var e=this.#_[t];if(e!==n)return e}}children(t=n){if(this.#a){var e=this.#b[t];if(e)return Object.keys(e)}else{if(t===n)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this.#d[t];if(e)return Object.keys(e)}successors(t){var e=this.#g[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.#o,multigraph:this.#s,compound:this.#a});e.setGraph(this.graph());var n=this;Object.entries(this.#l).forEach((function([n,r]){t(n)&&e.setNode(n,r)})),Object.values(this.#v).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.#a&&e.nodes().forEach((t=>e.setParent(t,i(t)))),e}setDefaultEdgeLabel(t){return this.#c=t,"function"!=typeof t&&(this.#c=()=>t),this}edgeCount(){return this.#w}edges(){return Object.values(this.#v)}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,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,n=a.name,2===arguments.length&&(r=arguments[1],o=!0)):(t=a,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=s(this.#o,t,e,n);if(this.#y.hasOwnProperty(u))return o&&(this.#y[u]=r),this;if(void 0!==n&&!this.#s)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this.#y[u]=o?r:this.#c(t,e,n);var h=function(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var s=i;i=o,o=s}var a={v:i,w:o};return r&&(a.name=r),a}(this.#o,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this.#v[u]=h,i(this.#d[e],t),i(this.#g[t],e),this.#f[e][u]=h,this.#p[t][u]=h,this.#w++,this}edge(t,e,n){var r=1===arguments.length?a(this.#o,arguments[0]):s(this.#o,t,e,n);return this.#y[r]}edgeAsObj(){const t=this.edge(...arguments);return"object"!=typeof t?{label:t}:t}hasEdge(t,e,n){var r=1===arguments.length?a(this.#o,arguments[0]):s(this.#o,t,e,n);return this.#y.hasOwnProperty(r)}removeEdge(t,e,n){var r=1===arguments.length?a(this.#o,arguments[0]):s(this.#o,t,e,n),i=this.#v[r];return i&&(t=i.v,e=i.w,delete this.#y[r],delete this.#v[r],o(this.#d[e],t),o(this.#g[t],e),delete this.#f[e][r],delete this.#p[t][r],this.#w--),this}inEdges(t,e){var n=this.#f[t];if(n){var r=Object.values(n);return e?r.filter((t=>t.v===e)):r}}outEdges(t,e){var n=this.#p[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.1.13"},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 s={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(s[u]=!0)}for(var h=0;h<t.length;h++){var c=[].concat(t[h]);r&&s[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")(),s="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},a=["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 a(){s(o)}function u(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,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;a.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,s=i.top+i.bottom,a=d(r.width),u=d(r.height);if("border-box"===r.boxSizing&&(Math.round(a+o)!==e&&(a-=p(r,"left","right")+o),Math.round(u+s)!==n&&(u-=p(r,"top","bottom")+s)),!function(t){return t===l(t).document.documentElement}(t)){var h=Math.round(a+o)-e,c=Math.round(u+s)-n;1!==Math.abs(h)&&(a-=h),1!==Math.abs(c)&&(u-=c)}return y(i.left,i.top,a,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}(),w=function(t,e){var n,r,i,o,s,a,u,h=(r=(n=e).x,i=n.y,o=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(a.prototype),c(u,{x:r,y:i,width:o,height:s,top:i,right:r+o,bottom:s+i,left:r}),u);c(this,{target:t,contentRect:h})},_=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 w(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 _(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=s(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=s(e,n));return e}function s(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:()=>a});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 s=n(1369);function a(t,e,n,a,u,h){var c,l,f,d,p,g,v,y=Symbol.metadata||Symbol.for("Symbol.metadata"),m=Object.defineProperty,w=Object.create,_=[w(null),w(null)],b=e.length;function x(e,n,r){return function(i,o){n&&(o=i,i=t);for(var s=0;s<e.length;s++)o=e[s].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,s,a,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],w=!u,b=1===s,k=3===s,N=4===s,A=2===s;function M(e,n,r){return function(i,o){return n&&(o=i,i=t),r&&r(i),O[e].call(i,o)}}if(!w){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=_[+h][i])&&7!=(l^s))throw Error("Decorating two elements with the same name ("+O[P].name+") is not supported yet");_[+h][i]=s<3?1:s}}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={},L={kind:["field","accessor","method","getter","setter","class"][s],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),a.push(e)}.bind(null,z)};if(w)l=C.call(S,T,L),z.v=1,E(l,"class decorators","return")&&(T=l);else if(L.static=h,L.private=f,l=L.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],L),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 s<2&&u.push(x(I,h,1),x(a,h,0)),d||w||(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=w(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 a=n[o],h=a[1],c=7&h;if((8&h)==e&&!c==r){var l=a[2],g=!!a[3],v=16&h;k(e?t:t.prototype,a,v,g?"#"+l:(0,s.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],a,t.name,5,n)),x(n,1)]}}}},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 s(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function a(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]=a(i[n],t.name,e);else if(null==e)for(n in i)i[n]=a(i[n],t.name,null);return this}for(;++u<h;)if((n=(t=o[u]).type)&&(n=s(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 s(t){return t.x+t.vx}function a(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,s,a).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(w);function w(t,e,n,r,i){var s=t.data,a=t.r,c=g+a;if(!s)return e>d+c||r<d-c||n>p+c||i<p-c;if(s.index>l.index){var f=d-s.x-s.vx,y=p-s.y-s.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=(a*=a)/(v+a)),l.vy+=(y*=m)*c,s.vx-=f*(c=1-c),s.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:()=>a});var r=n(1621),i=n(3993);function o(t){return t.index}function s(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function a(t){var e,n,a,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,s=t.length;o<p;++o)for(var a,u,l,f,d,g,v,y=0;y<s;++y)u=(a=t[y]).source,f=(l=a.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(a){var r,i,o=a.length,c=t.length,f=new Map(a.map(((t,e)=>[l(t,e,a),t])));for(r=0,u=new Array(o);r<c;++r)(i=t[r]).index=r,"object"!=typeof i.source&&(i.source=s(f,i.source)),"object"!=typeof i.target&&(i.target=s(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(a)for(var n=0,r=t.length;n<r;++n)e[n]=+f(t[n],n,t)}function m(){if(a)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){a=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:()=>a});var r=n(3968),i=n(1621),o=n(3993),s=n(4842);function a(){var t,e,n,a,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,s.x,s.y).visitAfter(g);for(a=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,s=0,a=0;if(t.length){for(r=i=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,a+=n,r+=n*e.x,i+=n*e.y);t.x=r/a,t.y=i/a}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=u[e.data.index]}while(e=e.next)}t.value=s}function v(t,r,i,s){if(!t.value)return!0;var h=t.x-e.x,d=t.y-e.y,p=s-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*a/g,e.vy+=d*t.value*a/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]*a/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,s=1013904223,a=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+s)%a)/a}();function m(){w(),v.call("tick",e),n<u&&(g.stop(),v.call("end",e))}function w(r){var i,o,s=t.length;void 0===r&&(r=1);for(var a=0;a<r;++a)for(n+=(f-n)*h,p.forEach((function(t){t(n)})),i=0;i<s;++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 _(){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=[]),_(),e={tick:w,restart:function(){return g.restart(m),e},stop:function(){return g.stop(),e},nodes:function(n){return arguments.length?(t=n,_(),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,s,a,u,h=0,c=t.length;for(null==r?r=1/0:r*=r,h=0;h<c;++h)(s=(i=e-(a=t[h]).x)*i+(o=n-a.y)*o)<r&&(u=a,r=s);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 s(t){for(var r,o=0,s=e.length;o<s;++o)(r=e[o]).vx+=(i[o]-r.x)*n[o]*t}function a(){if(e){var r,s=e.length;for(n=new Array(s),i=new Array(s),r=0;r<s;++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)),s.initialize=function(t){e=t,a()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,r.A)(+t),a(),s):o},s.x=function(e){return arguments.length?(t="function"==typeof e?e:(0,r.A)(+e),a(),s):t},s}},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 s(t){for(var r,o=0,s=e.length;o<s;++o)(r=e[o]).vy+=(i[o]-r.y)*n[o]*t}function a(){if(e){var r,s=e.length;for(n=new Array(s),i=new Array(s),r=0;r<s;++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)),s.initialize=function(t){e=t,a()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,r.A)(+t),a(),s):o},s.y=function(e){return arguments.length?(t="function"==typeof e?e:(0,r.A)(+e),a(),s):t},s}},3968:(t,e,n)=>{"use strict";function r(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,s,a,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>=(s=(v+m)/2))?v=s:m=s,i=d,!(d=d[l=c<<1|h]))return i[l]=p,t;if(a=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===a&&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>=(s=(v+m)/2))?v=s:m=s}while((l=c<<1|h)==(f=(u>=s)<<1|a>=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 s(t){return t[1]}function a(t,e,n){var r=new u(null==e?o:e,null==n?s: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:()=>a});var c=a.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,s=t.length,a=new Array(s),u=new Array(s),h=1/0,c=1/0,l=-1/0,f=-1/0;for(n=0;n<s;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[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<s;++n)r(this,a[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 s,a,u=i-n||1,h=this._root;n>t||t>=i||r>e||e>=o;)switch(a=(e<r)<<1|t<n,(s=new Array(4))[a]=h,h=s,u*=2,a){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,s,a,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||(s=h.y0)>p||(a=h.x1)<l||(u=h.y1)<f))if(v.length){var y=(o+a)/2,m=(s+u)/2;g.push(new i(v[3],y,m,a,u),new i(v[2],o,m,y,u),new i(v[1],y,s,a,m),new i(v[0],o,s,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 w=t-+this._x.call(null,v.data),_=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(s=+this._y.call(null,t)))return this;var e,n,r,i,o,s,a,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>=(a=(p+v)/2))?p=a:v=a,(c=s>=(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,s,a,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,s=e.x1,a=e.y1)&&h.length){var c=(r+s)/2,l=(o+a)/2;(n=h[3])&&u.push(new i(n,c,l,s,a)),(n=h[2])&&u.push(new i(n,r,l,c,a)),(n=h[1])&&u.push(new i(n,c,o,s,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 s,a=e.x0,u=e.y0,h=e.x1,c=e.y1,l=(a+h)/2,f=(u+c)/2;(s=o[0])&&n.push(new i(s,a,u,l,f)),(s=o[1])&&n.push(new i(s,l,u,h,f)),(s=o[2])&&n.push(new i(s,a,f,l,c)),(s=o[3])&&n.push(new i(s,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:()=>at,zr:()=>it});var r=n(4715),i=n(3972);var o=n(2474),s=Array.prototype.find;function a(){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 s,a=0,u=e.length,h=o.length;a<h;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new l(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function d(t,e,n,r,i,o,s){var a,u,h,c=new Map,f=e.length,d=o.length,p=new Array(f);for(a=0;a<f;++a)(u=e[a])&&(p[a]=h=s.call(u,u.__data__,a,e)+"",c.has(h)?i[a]=u:c.set(h,u));for(a=0;a<d;++a)h=s.call(t,o[a],a,o)+"",(u=c.get(h))?(r[a]=u,u.__data__=o[a],c.delete(h)):n[a]=new l(t,o[a]);for(a=0;a<f;++a)(u=e[a])&&c.get(p[a])===u&&(i[a]=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 w(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _(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 z(t,e){return function(){(e.apply(this,arguments)?T:j)(this,t)}}function L(){this.textContent=""}function R(t){return function(){this.textContent=t}}function D(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function q(){this.innerHTML=""}function $(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 s=0,a=i.length;s<a;++s)if((r=i[s]).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 st(){return new ot([[document.documentElement]],it)}ot.prototype=st.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 s,a,u=e[o],h=u.length,c=i[o]=new Array(h),l=0;l<h;++l)(s=u[l])&&(a=t.call(s,s.__data__,l,u))&&("__data__"in s&&(a.__data__=s.__data__),c[l]=a);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=[],s=0;s<n;++s)for(var a,u=e[s],h=u.length,c=0;c<h;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),o.push(a));return new ot(r,o)},selectChild:function(t){return this.select(null==t?a:function(t){return function(){return s.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 s,a=e[i],u=a.length,h=r[i]=[],c=0;c<u;++c)(s=a[c])&&t.call(s,s.__data__,c,a)&&h.push(s);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 s=o.length,a=new Array(s),u=new Array(s),h=new Array(s),c=0;c<s;++c){var l=i[c],v=o[c],y=v.length,m=g(t.call(l,l&&l.__data__,c,i)),w=m.length,_=u[c]=new Array(w),b=a[c]=new Array(w);r(l,v,_,b,h[c]=new Array(y),m,e);for(var x,E,k=0,N=0;k<w;++k)if(x=_[k]){for(k>=N&&(N=k+1);!(E=b[N])&&++N<w;);x._next=E||null}}return(a=new ot(a,i))._enter=u,a._exit=h,a},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,s=Math.min(i,o),a=new Array(i),u=0;u<s;++u)for(var h,c=n[u],l=r[u],f=c.length,d=a[u]=new Array(f),p=0;p<f;++p)(h=c[p]||l[p])&&(d[p]=h);for(;u<i;++u)a[u]=n[u];return new ot(a,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,s=i[o];--o>=0;)(r=i[o])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=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 s,a=n[o],u=a.length,h=i[o]=new Array(u),c=0;c<u;++c)(s=a[c])&&(h[c]=s);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 s=r[i];if(s)return s}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],s=0,a=o.length;s<a;++s)(i=o[s])&&t.call(i,i.__data__,s,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?w:m:"function"==typeof e?n.local?E:x:n.local?b:_)(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?z:e?C:S)(n,e))},text:function(t){return arguments.length?this.each(null==t?L:("function"==typeof t?D:R)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?q:("function"==typeof t?V:$)(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+""),s=o.length;if(!(arguments.length<2)){for(a=e?Z:J,r=0;r<s;++r)this.each(a(o[r],e,n));return this}var a=this.node().__on;if(a)for(var u,h=0,c=a.length;h<c;++h)for(r=0,u=a[h];r<s;++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,s=i.length;o<s;++o)(r=i[o])&&(yield r)}};const at=st},5632:(t,e,n)=>{"use strict";n.d(e,{A:()=>a,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 s(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function a(t,e,n){return arguments.length>1?this.each((null==e?i:"function"==typeof e?s: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,s=0,a=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=s=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,_(o)}(),c=0}}function w(){var t=f.now(),e=t-h;e>u&&(l-=e,h=t)}function _(t){o||(s&&(s=clearTimeout(s)),t-c>24?(t<1/0&&(s=setTimeout(m,t-f.now()-l)),a&&(a=clearInterval(a))):(a||(h=f.now(),a=setInterval(w,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,_()},stop:function(){this._call&&(this._call=null,this._time=1/0,_())}}},1517:(t,e,n)=>{"use strict";n.d(e,{uV:()=>Jt,s_:()=>ue});var r=n(6514),i=n(7566);const o={capture:!0,passive:!1};function s(t){t.preventDefault(),t.stopImmediatePropagation()}function a(t){return((t=Math.exp(t))+1/t)/2}const u=function t(e,n,r){function i(t,i){var o,s,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)s=Math.log(d/c)/e,o=function(t){return[u+t*p,h+t*g,c*Math.exp(e*t*s)]};else{var y=Math.sqrt(v),m=(d*d-c*c+r*v)/(2*c*n*y),w=(d*d-c*c-r*v)/(2*d*n*y),_=Math.log(Math.sqrt(m*m+1)-m),b=Math.log(Math.sqrt(w*w+1)-w);s=(b-_)/e,o=function(t){var r,i=t*s,o=a(_),l=c/(n*y)*(o*(r=e*i+_,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(_));return[u+l*p,h+l*g,c*o/a(e*i+_)]}}return o.duration=1e3*s*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,w=6;function _(t,e,n,r,i,o){var s=t.__transition;if(s){if(n in s)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 a();for(h in i)if((d=i[h]).name===n.name){if(d.state===y)return f(o);4===d.state?(d.state=w,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[h]):+h<e&&(d.state=w,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(s,n.delay,n.time),s(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 s(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(a),n.state=m,1),o=-1,s=r.length;++o<s;)r[o].call(t,i);n.state===m&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){for(var r in n.state=w,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,s=!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=w,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):s=!1;s&&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 s,a,u;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,u/=a),t*r<e*n&&(t=-t,e=-e,u=-u,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*M,skewX:Math.atan(u)*M,scaleX:s,scaleY:a}}function P(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,s){var a=[],u=[];return o=t(o),s=t(s),function(t,r,i,o,s,a){if(t!==i||r!==o){var u=s.push("translate(",null,e,null,n);a.push({i:u-4,x:N(t,i)},{i:u-2,x:N(r,o)})}else(i||o)&&s.push("translate("+i+e+o+n)}(o.translateX,o.translateY,s.translateX,s.translateY,a,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,s.rotate,a,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,s.skewX,a,u),function(t,e,n,r,o,s){if(t!==n||e!==r){var a=o.push(i(o)+"scale(",null,",",null,")");s.push({i:a-4,x:N(t,n)},{i:a-2,x:N(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,u),o=s=null,function(t){for(var e,n=-1,r=u.length;++n<r;)a[(e=u[n]).i]=e.x(t);return a.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 s=0,a=(r=n=o).length;s<a;++s)if(r[s].name===e){(r=r.slice()).splice(s,1);break}i.tween=r}}function z(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=x(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:e,value:n},u=0,h=i.length;u<h;++u)if(i[u].name===e){i[u]=a;break}u===h&&i.push(a)}o.tween=i}}function L(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 R(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function D(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function q(){}var $=.7,V=1/$,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 ot(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 ot(e[1],e[2],e[3],1):(e=H.exec(t))?new ot(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))?lt(e[1],e[2]/100,e[3]/100,1):(e=Q.exec(t))?lt(e[1],e[2]/100,e[3]/100,e[4]):J.hasOwnProperty(t)?nt(J[t]):"transparent"===t?new ot(NaN,NaN,NaN,0):null}function nt(t){return new ot(t>>16&255,t>>8&255,255&t,1)}function rt(t,e,n,r){return r<=0&&(t=e=n=NaN),new ot(t,e,n,r)}function it(t,e,n,r){return 1===arguments.length?((i=t)instanceof q||(i=et(i)),i?new ot((i=i.rgb()).r,i.g,i.b,i.opacity):new ot):new ot(t,e,n,null==r?1:r);var i}function ot(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function st(){return`#${ct(this.r)}${ct(this.g)}${ct(this.b)}`}function at(){const t=ut(this.opacity);return`${1===t?"rgb(":"rgba("}${ht(this.r)}, ${ht(this.g)}, ${ht(this.b)}${1===t?")":`, ${t})`}`}function ut(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ht(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ct(t){return((t=ht(t))<16?"0":"")+t.toString(16)}function lt(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new dt(t,e,n,r)}function ft(t){if(t instanceof dt)return new dt(t.h,t.s,t.l,t.opacity);if(t instanceof q||(t=et(t)),!t)return new dt;if(t instanceof dt)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),s=NaN,a=o-i,u=(o+i)/2;return a?(s=e===o?(n-r)/a+6*(n<r):n===o?(r-e)/a+2:(e-n)/a+4,a/=u<.5?o+i:2-o-i,s*=60):a=u>0&&u<1?0:s,new dt(s,a,u,t.opacity)}function dt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function pt(t){return(t=(t||0)%360)<0?t+360:t}function gt(t){return Math.max(0,Math.min(1,t||0))}function vt(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 yt(t,e,n,r,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*r+s*i)/6}R(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 ft(this).formatHsl()},formatRgb:tt,toString:tt}),R(ot,it,D(q,{brighter(t){return t=null==t?V:Math.pow(V,t),new ot(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?$:Math.pow($,t),new ot(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ot(ht(this.r),ht(this.g),ht(this.b),ut(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:st,formatHex:st,formatHex8:function(){return`#${ct(this.r)}${ct(this.g)}${ct(this.b)}${ct(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:at,toString:at})),R(dt,(function(t,e,n,r){return 1===arguments.length?ft(t):new dt(t,e,n,null==r?1:r)}),D(q,{brighter(t){return t=null==t?V:Math.pow(V,t),new dt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?$:Math.pow($,t),new dt(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 ot(vt(t>=240?t-240:t+120,i,r),vt(t,i,r),vt(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new dt(pt(this.h),gt(this.s),gt(this.l),ut(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=ut(this.opacity);return`${1===t?"hsl(":"hsla("}${pt(this.h)}, ${100*gt(this.s)}%, ${100*gt(this.l)}%${1===t?")":`, ${t})`}`}}));const mt=t=>()=>t;function wt(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):mt(isNaN(t)?e:t)}const _t=function t(e){var n=function(t){return 1==(t=+t)?wt: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):mt(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=it(t)).r,(e=it(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),s=wt(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=s(e),t+""}}return r.gamma=t,r}(1);function bt(t){return function(e){var n,r,i=e.length,o=new Array(i),s=new Array(i),a=new Array(i);for(n=0;n<i;++n)r=it(e[n]),o[n]=r.r||0,s[n]=r.g||0,a[n]=r.b||0;return o=t(o),s=t(s),a=t(a),r.opacity=1,function(t){return r.r=o(t),r.g=s(t),r.b=a(t),r+""}}}bt((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],s=r>0?t[r-1]:2*i-o,a=r<e-1?t[r+2]:2*o-i;return yt((n-r/e)*e,s,i,o,a)}})),bt((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],s=t[(r+1)%e],a=t[(r+2)%e];return yt((n-r/e)*e,i,o,s,a)}}));var xt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Et=new RegExp(xt.source,"g");function kt(t,e){var n,r,i,o=xt.lastIndex=Et.lastIndex=0,s=-1,a=[],u=[];for(t+="",e+="";(n=xt.exec(t))&&(r=Et.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),a[s]?a[s]+=i:a[++s]=i),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,u.push({i:s,x:N(n,r)})),o=Et.lastIndex;return o<e.length&&(i=e.slice(o),a[s]?a[s]+=i:a[++s]=i),a.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)a[(n=u[r]).i]=n.x(t);return a.join("")})}function Nt(t,e){var n;return("number"==typeof e?N:e instanceof et?_t:(n=et(e))?(e=n,_t):kt)(t,e)}function At(t){return function(){this.removeAttribute(t)}}function Mt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ot(t,e,n){var r,i,o=n+"";return function(){var s=this.getAttribute(t);return s===o?null:s===r?i:i=e(r=s,n)}}function It(t,e,n){var r,i,o=n+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===o?null:s===r?i:i=e(r=s,n)}}function Pt(t,e,n){var r,i,o;return function(){var s,a,u=n(this);if(null!=u)return(s=this.getAttribute(t))===(a=u+"")?null:s===r&&a===i?o:(i=a,o=e(r=s,u));this.removeAttribute(t)}}function Tt(t,e,n){var r,i,o;return function(){var s,a,u=n(this);if(null!=u)return(s=this.getAttributeNS(t.space,t.local))===(a=u+"")?null:s===r&&a===i?o:(i=a,o=e(r=s,u));this.removeAttributeNS(t.space,t.local)}}function jt(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 Ct(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 St(t,e){return function(){b(this,t).delay=+e.apply(this,arguments)}}function zt(t,e){return e=+e,function(){b(this,t).delay=e}}function Lt(t,e){return function(){x(this,t).duration=+e.apply(this,arguments)}}function Rt(t,e){return e=+e,function(){x(this,t).duration=e}}var Dt=n(2474),qt=n(4715),$t=n(3972),Vt=c.Ay.prototype.constructor,Gt=n(5632);function Ft(t){return function(){this.style.removeProperty(t)}}var Yt=0;function Bt(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Xt(){return++Yt}var Ht=c.Ay.prototype;Bt.prototype=function(t){return(0,c.Ay)().transition(t)}.prototype={constructor:Bt,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=(0,qt.A)(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a,u,h=r[s],c=h.length,l=o[s]=new Array(c),f=0;f<c;++f)(a=h[f])&&(u=t.call(a,a.__data__,f,h))&&("__data__"in a&&(u.__data__=a.__data__),l[f]=u,_(l[f],e,n,f,l,E(a,n)));return new Bt(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=(0,$t.A)(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var u,h=r[a],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])&&_(f,e,n,g,d,p);o.push(d),s.push(u)}return new Bt(o,s,e,n)},selectChild:Ht.selectChild,selectChildren:Ht.selectChildren,filter:function(t){"function"!=typeof t&&(t=(0,Dt.A)(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,s=e[i],a=s.length,u=r[i]=[],h=0;h<a;++h)(o=s[h])&&t.call(o,o.__data__,h,s)&&u.push(o);return new Bt(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),s=new Array(r),a=0;a<o;++a)for(var u,h=e[a],c=n[a],l=h.length,f=s[a]=new Array(l),d=0;d<l;++d)(u=h[d]||c[d])&&(f[d]=u);for(;a<r;++a)s[a]=e[a];return new Bt(s,this._parents,this._name,this._id)},selection:function(){return new Vt(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Xt(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s,a=r[o],u=a.length,h=0;h<u;++h)if(s=a[h]){var c=E(s,e);_(s,t,n,h,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Bt(r,this._parents,t,n)},call:Ht.call,nodes:Ht.nodes,node:Ht.node,size:Ht.size,empty:Ht.empty,each:Ht.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 s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}(n,t,e))},attr:function(t,e){var n=(0,C.A)(t),r="transform"===n?j:Nt;return this.attrTween(t,"function"==typeof e?(n.local?Tt:Pt)(n,r,L(this,"attr."+t,e)):null==e?(n.local?Mt:At)(n):(n.local?It:Ot)(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?jt:Ct)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?T:Nt;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=(0,Gt.j)(this,t),s=(this.style.removeProperty(t),(0,Gt.j)(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}(t,r)).on("end.style."+t,Ft(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var s=(0,Gt.j)(this,t),a=n(this),u=a+"";return null==a&&(this.style.removeProperty(t),u=a=(0,Gt.j)(this,t)),s===u?null:s===r&&u===i?o:(i=u,o=e(r=s,a))}}(t,r,L(this,"style."+t,e))).each(function(t,e){var n,r,i,o,s="style."+e,a="end."+s;return function(){var u=x(this,t),h=u.on,c=null==u.value[s]?o||(o=Ft(e)):void 0;h===n&&i===c||(r=(n=h).copy()).on(a,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var s=(0,Gt.j)(this,t);return s===o?null:s===r?i:i=e(r=s,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}}(L(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,s=i.length;o<s;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?S:z)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?St:zt)(e,t)):E(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Lt:Rt)(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,s){var a={value:s},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(a),e._.interrupt.push(a),e._.end.push(u)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:Ht[Symbol.iterator]};var Wt={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ut(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 Bt?(e=t._id,t=t._name):(e=Xt(),(n=Wt).time=(0,l.tB)(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s,a=r[o],u=a.length,h=0;h<u;++h)(s=a[h])&&_(s,t,e,h,a,n||Ut(s,e));return new Bt(r,this._parents,t,e)};const Kt=t=>()=>t;function Qt(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 Jt(t,e,n){this.k=t,this.x=e,this.y=n}Jt.prototype={constructor:Jt,scale:function(t){return 1===t?this:new Jt(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Jt(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 Zt=new Jt(1,0,0);function te(t){t.stopImmediatePropagation()}function ee(t){t.preventDefault(),t.stopImmediatePropagation()}function ne(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function re(){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 ie(){return this.__zoom||Zt}function oe(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function se(){return navigator.maxTouchPoints||"ontouchstart"in this}function ae(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],s=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function ue(){var t,e,n,a=ne,c=re,l=ae,f=oe,d=se,p=[0,1/0],g=[[-1/0,-1/0],[1/0,1/0]],v=250,y=u,m=(0,r.A)("start","zoom","end"),w=500,_=150,b=0,x=10;function E(t){t.property("__zoom",ie).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",C).filter(d).on("touchstart.zoom",S).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",L).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 Jt(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 Jt(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),s=c.apply(t,i),a=null==n?M(s):"function"==typeof n?n.apply(t,i):n,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),h=t.__zoom,l="function"==typeof e?e.apply(t,i):e,f=y(h.invert(a).concat(u/h.k),l.invert(a).concat(u/l.k));return function(t){if(1===t)t=l;else{var e=f(t),n=u/e[2];t=new Jt(n,a[0]-e[0]*n,a[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(a.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()}ee(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),_),n.zoom("mouse",l(A(N(r,i),n.mouse[0],n.mouse[1]),n.extent,g))}}function j(t,...e){if(!n&&a.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(ee(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",s,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),ee(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",s,o);"onselectstart"in e?n.on("selectstart.drag",s,o):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),te(t),u.mouse=[f,this.__zoom.invert(f)],k(this),u.start()}}function C(t,...e){if(a.apply(this,arguments)){var n=this.__zoom,r=h(t.changedTouches?t.changedTouches[0]:t,this),o=n.invert(r),s=n.k*(t.shiftKey?.5:2),u=l(A(N(n,s),r,o),c.apply(this,e),g);ee(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(a.apply(this,arguments)){var i,o,s,u,c=n.touches,l=c.length,f=I(this,r,n.changedTouches.length===l).event(n);for(te(n),o=0;o<l;++o)u=[u=h(s=c[o],this),this.__zoom.invert(u),s.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}),w)),k(this),f.start())}}function z(t,...e){if(this.__zooming){var n,r,i,o,s=I(this,e).event(t),a=t.changedTouches,u=a.length;for(ee(t),n=0;n<u;++n)i=h(r=a[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=i);if(r=s.that.__zoom,s.touch1){var c=s.touch0[0],f=s.touch0[1],d=s.touch1[0],p=s.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(!s.touch0)return;i=s.touch0[0],o=s.touch0[1]}s.zoom("touch",l(A(r,i,o),s.extent,g))}}function L(t,...r){if(this.__zooming){var o,s,a=I(this,r).event(t),u=t.changedTouches,c=u.length;for(te(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),w),o=0;o<c;++o)s=u[o],a.touch0&&a.touch0[2]===s.identifier?delete a.touch0:a.touch1&&a.touch1[2]===s.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(s=h(s,this),Math.hypot(e[0]-s[0],e[1]-s[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",ie),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),s="function"==typeof e?e.apply(this,arguments):e;return l(A(N(r,s),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(Zt.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 Qt(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:Kt(+t),E):f},E.filter=function(t){return arguments.length?(a="function"==typeof t?t:Kt(!!t),E):a},E.touchable=function(t){return arguments.length?(d="function"==typeof t?t:Kt(!!t),E):d},E.extent=function(t){return arguments.length?(c="function"==typeof t?t:Kt([[+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}Jt.prototype}}]);
3
- //# sourceMappingURL=4090.3ffe04dc.js.map