@next-bricks/diagram 0.42.10 → 0.42.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/bricks.json +3 -3
  2. package/dist/chunks/{1122.97ee7474.js → 1122.dea87200.js} +2 -2
  3. package/dist/chunks/{1122.97ee7474.js.map → 1122.dea87200.js.map} +1 -1
  4. package/dist/chunks/{114.9d0b78d2.js → 114.d27688d7.js} +2 -2
  5. package/dist/chunks/{114.9d0b78d2.js.map → 114.d27688d7.js.map} +1 -1
  6. package/dist/chunks/{1371.218524fa.js → 1371.226b7bfe.js} +2 -2
  7. package/dist/chunks/{1371.218524fa.js.map → 1371.226b7bfe.js.map} +1 -1
  8. package/dist/chunks/{1940.3fa9b819.js → 1940.e1fdb1c6.js} +2 -2
  9. package/dist/chunks/{1940.3fa9b819.js.map → 1940.e1fdb1c6.js.map} +1 -1
  10. package/dist/chunks/{2277.642aada3.js → 2277.0b3548af.js} +2 -2
  11. package/dist/chunks/{2277.642aada3.js.map → 2277.0b3548af.js.map} +1 -1
  12. package/dist/chunks/{2416.eaefd889.js → 2416.f25f772b.js} +2 -2
  13. package/dist/chunks/{2416.eaefd889.js.map → 2416.f25f772b.js.map} +1 -1
  14. package/dist/chunks/{3171.9a74d0e1.js → 3171.633b30e8.js} +2 -2
  15. package/dist/chunks/{3171.9a74d0e1.js.map → 3171.633b30e8.js.map} +1 -1
  16. package/dist/chunks/3489.c2223b1c.js +3 -0
  17. package/dist/chunks/{3489.e0ce6106.js.map → 3489.c2223b1c.js.map} +1 -1
  18. package/dist/chunks/3933.fca8ae82.js +2 -0
  19. package/dist/chunks/{3933.e4f7efe6.js.map → 3933.fca8ae82.js.map} +1 -1
  20. package/dist/chunks/4017.c7b74992.js +3 -0
  21. package/dist/chunks/{4017.2680d65a.js.map → 4017.c7b74992.js.map} +1 -1
  22. package/dist/chunks/{4658.ff7efb11.js → 4658.d4d0115b.js} +2 -2
  23. package/dist/chunks/{4658.ff7efb11.js.map → 4658.d4d0115b.js.map} +1 -1
  24. package/dist/chunks/{4837.a685aa89.js → 4837.44f22425.js} +2 -2
  25. package/dist/chunks/{7218.96746625.js.map → 4837.44f22425.js.map} +1 -1
  26. package/dist/chunks/{5552.69fe3835.js → 5552.ad11237e.js} +2 -2
  27. package/dist/chunks/{5552.69fe3835.js.map → 5552.ad11237e.js.map} +1 -1
  28. package/dist/chunks/6314.f35cc928.js +2 -0
  29. package/dist/chunks/{6314.d82ad8ed.js.map → 6314.f35cc928.js.map} +1 -1
  30. package/dist/chunks/{7218.96746625.js → 7218.6822e904.js} +2 -2
  31. package/dist/chunks/{4837.a685aa89.js.map → 7218.6822e904.js.map} +1 -1
  32. package/dist/chunks/{7733.a27200f8.js → 7733.e752ca8f.js} +2 -2
  33. package/dist/chunks/{7733.a27200f8.js.map → 7733.e752ca8f.js.map} +1 -1
  34. package/dist/chunks/799.5e6749ba.js +3 -0
  35. package/dist/chunks/799.5e6749ba.js.map +1 -0
  36. package/dist/chunks/{9559.436645e2.js → 9559.1cd5e0b2.js} +2 -2
  37. package/dist/chunks/{9559.436645e2.js.map → 9559.1cd5e0b2.js.map} +1 -1
  38. package/dist/chunks/{editable-label.a3d1d983.js → editable-label.e65ba20e.js} +3 -3
  39. package/dist/chunks/{editable-label.a3d1d983.js.map → editable-label.e65ba20e.js.map} +1 -1
  40. package/dist/chunks/{eo-diagram.261eb2d9.js → eo-diagram.e353ce7a.js} +2 -2
  41. package/dist/chunks/{eo-diagram.261eb2d9.js.map → eo-diagram.e353ce7a.js.map} +1 -1
  42. package/dist/chunks/eo-display-canvas.ccd2cce0.js +2 -0
  43. package/dist/chunks/{eo-display-canvas.e43ca2e5.js.map → eo-display-canvas.ccd2cce0.js.map} +1 -1
  44. package/dist/chunks/eo-draw-canvas.5d50938b.js +2 -0
  45. package/dist/chunks/{eo-draw-canvas.91b46e0d.js.map → eo-draw-canvas.5d50938b.js.map} +1 -1
  46. package/dist/chunks/{experimental-node.c9bb5135.js → experimental-node.ff43315f.js} +2 -2
  47. package/dist/chunks/{experimental-node.c9bb5135.js.map → experimental-node.ff43315f.js.map} +1 -1
  48. package/dist/chunks/main.5cfa7eee.js +2 -0
  49. package/dist/chunks/main.5cfa7eee.js.map +1 -0
  50. package/dist/examples.json +3 -3
  51. package/dist/index.820bfcb6.js +2 -0
  52. package/dist/index.820bfcb6.js.map +1 -0
  53. package/dist/manifest.json +145 -145
  54. package/dist/types.json +3222 -3222
  55. package/package.json +4 -4
  56. package/dist/chunks/3489.e0ce6106.js +0 -3
  57. package/dist/chunks/3933.e4f7efe6.js +0 -2
  58. package/dist/chunks/4017.2680d65a.js +0 -3
  59. package/dist/chunks/6314.d82ad8ed.js +0 -2
  60. package/dist/chunks/799.68fd97c4.js +0 -3
  61. package/dist/chunks/799.68fd97c4.js.map +0 -1
  62. package/dist/chunks/eo-display-canvas.e43ca2e5.js +0 -2
  63. package/dist/chunks/eo-draw-canvas.91b46e0d.js +0 -2
  64. package/dist/chunks/main.30b4fffd.js +0 -2
  65. package/dist/chunks/main.30b4fffd.js.map +0 -1
  66. package/dist/index.36ae90a9.js +0 -2
  67. package/dist/index.36ae90a9.js.map +0 -1
  68. /package/dist/chunks/{3489.e0ce6106.js.LICENSE.txt → 3489.c2223b1c.js.LICENSE.txt} +0 -0
  69. /package/dist/chunks/{4017.2680d65a.js.LICENSE.txt → 4017.c7b74992.js.LICENSE.txt} +0 -0
  70. /package/dist/chunks/{799.68fd97c4.js.LICENSE.txt → 799.5e6749ba.js.LICENSE.txt} +0 -0
  71. /package/dist/chunks/{editable-label.a3d1d983.js.LICENSE.txt → editable-label.e65ba20e.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/diagram",
3
- "version": "0.42.10",
3
+ "version": "0.42.12",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/diagram",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,11 +35,11 @@
35
35
  "postpublish": "mv package.json.bak package.json"
36
36
  },
37
37
  "devDependencies": {
38
- "@next-core/build-next-bricks": "^1.23.0",
39
- "@next-core/test-next": "^1.1.5"
38
+ "@next-core/build-next-bricks": "^1.23.1",
39
+ "@next-core/test-next": "^1.1.6"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@next-bricks/basic": "*"
43
43
  },
44
- "gitHead": "952a787773d97b38cfc54bf42d429ba9de84eb36"
44
+ "gitHead": "0642c59fb82dea2ec52c5d8e42e1e0a116aab961"
45
45
  }
@@ -1,3 +0,0 @@
1
- /*! For license information please see 3489.e0ce6106.js.LICENSE.txt */
2
- (globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[3489,2052],{7586:(t,e,n)=>{t.exports={graphlib:n(4678),layout:n(8870),debug:n(1665),util:{time:n(6856).time,notime:n(6856).notime},version:n(898)}},8642:(t,e,n)=>{"use strict";let r=n(6635),i=n(6856).uniqueId;t.exports={run:function(t){("greedy"===t.graph().acyclicer?r(t,function(t){return e=>t.edge(e).weight}(t)):function(t){let e=[],n={},r={};return t.nodes().forEach((function i(o){r.hasOwnProperty(o)||(r[o]=!0,n[o]=!0,t.outEdges(o).forEach((t=>{n.hasOwnProperty(t.w)?e.push(t):i(t.w)})),delete n[o])})),e}(t)).forEach((e=>{let n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,i("rev"))}))},undo:function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.reversed){t.removeEdge(e);let r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},6883:(t,e,n)=>{let r=n(6856);function i(t,e,n,i,o,a){let s={width:0,height:0,rank:a,borderType:e},u=o[e][a-1],h=r.addDummyNode(t,"border",s,n);o[e][a]=h,t.setParent(h,i),u&&t.setEdge(u,h,{weight:1})}t.exports=function(t){t.children().forEach((function e(n){let r=t.children(n),o=t.node(n);if(r.length&&r.forEach(e),o.hasOwnProperty("minRank")){o.borderLeft=[],o.borderRight=[];for(let e=o.minRank,r=o.maxRank+1;e<r;++e)i(t,"borderLeft","_bl",n,o,e),i(t,"borderRight","_br",n,o,e)}}))}},5574:t=>{"use strict";function e(t){t.nodes().forEach((e=>n(t.node(e)))),t.edges().forEach((e=>n(t.edge(e))))}function n(t){let e=t.width;t.width=t.height,t.height=e}function r(t){t.y=-t.y}function i(t){let e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){let n=t.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||e(t)},undo:function(t){let n=t.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(t){t.nodes().forEach((e=>r(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.points.forEach(r),n.hasOwnProperty("y")&&r(n)}))}(t),"lr"!==n&&"rl"!==n||(function(t){t.nodes().forEach((e=>i(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.points.forEach(i),n.hasOwnProperty("x")&&i(n)}))}(t),e(t))}}},1983:t=>{function e(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function n(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return e(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&e(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){let t=[],e=this._sentinel,r=e._prev;for(;r!==e;)t.push(JSON.stringify(r,n)),r=r._prev;return"["+t.join(", ")+"]"}}},1665:(t,e,n)=>{let r=n(6856),i=n(4678).Graph;t.exports={debugOrdering:function(t){let e=r.buildLayerMatrix(t),n=new i({compound:!0,multigraph:!0}).setGraph({});return t.nodes().forEach((e=>{n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),t.edges().forEach((t=>n.setEdge(t.v,t.w,{},t.name))),e.forEach(((t,e)=>{let r="layer"+e;n.setNode(r,{rank:"same"}),t.reduce(((t,e)=>(n.setEdge(t,e,{style:"invis"}),e)))})),n}}},6635:(t,e,n)=>{let r=n(4678).Graph,i=n(1983);t.exports=function(t,e){if(t.nodeCount()<=1)return[];let n=function(t,e){let n=new r,o=0,a=0;t.nodes().forEach((t=>{n.setNode(t,{v:t,in:0,out:0})})),t.edges().forEach((t=>{let r=n.edge(t.v,t.w)||0,i=e(t),s=r+i;n.setEdge(t.v,t.w,s),a=Math.max(a,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i)}));let u=function(t){const e=[];for(let n=0;n<t;n++)e.push(n);return e}(a+o+3).map((()=>new i)),h=o+1;return n.nodes().forEach((t=>{s(u,h,n.node(t))})),{graph:n,buckets:u,zeroIdx:h}}(t,e||o);return function(t,e,n){let r,i=[],o=e[e.length-1],s=e[0];for(;t.nodeCount();){for(;r=s.dequeue();)a(t,e,n,r);for(;r=o.dequeue();)a(t,e,n,r);if(t.nodeCount())for(let o=e.length-2;o>0;--o)if(r=e[o].dequeue(),r){i=i.concat(a(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx).flatMap((e=>t.outEdges(e.v,e.w)))};let o=()=>1;function a(t,e,n,r,i){let o=i?[]:void 0;return t.inEdges(r.v).forEach((r=>{let a=t.edge(r),u=t.node(r.v);i&&o.push({v:r.v,w:r.w}),u.out-=a,s(e,n,u)})),t.outEdges(r.v).forEach((r=>{let i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,s(e,n,a)})),t.removeNode(r.v),o}function s(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},8870:(t,e,n)=>{"use strict";let r=n(8642),i=n(1293),o=n(3045),a=n(6856).normalizeRanks,s=n(2488),u=n(6856).removeEmptyRanks,h=n(9885),c=n(6883),l=n(5574),f=n(5577),d=n(8924),p=n(6856),g=n(4678).Graph;t.exports=function(t,e){let n=e&&e.debugTiming?p.time:p.notime;n("layout",(()=>{let A=n(" buildLayoutGraph",(()=>function(t){let e=new g({multigraph:!0,compound:!0}),n=N(t.graph());return e.setGraph(Object.assign({},y,k(n,v),p.pick(n,m))),t.nodes().forEach((n=>{const r=k(N(t.node(n)),_);Object.keys(w).forEach((t=>{void 0===r[t]&&(r[t]=w[t])})),e.setNode(n,r),e.setParent(n,t.parent(n))})),t.edges().forEach((n=>{let r=N(t.edge(n));e.setEdge(n,Object.assign({},x,k(r,b),p.pick(r,E)))})),e}(t)));n(" runLayout",(()=>function(t,e,n){e(" makeSpaceForEdgeLabels",(()=>function(t){let e=t.graph();e.ranksep/=2,t.edges().forEach((n=>{let r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t))),e(" removeSelfEdges",(()=>function(t){t.edges().forEach((e=>{if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}}))}(t))),e(" acyclic",(()=>r.run(t))),e(" nestingGraph.run",(()=>h.run(t))),e(" rank",(()=>o(p.asNonCompoundGraph(t)))),e(" injectEdgeLabelProxies",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.width&&n.height){let n=t.node(e.v),r={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e};p.addDummyNode(t,"edge-proxy",r,"_ep")}}))}(t))),e(" removeEmptyRanks",(()=>u(t))),e(" nestingGraph.cleanup",(()=>h.cleanup(t))),e(" normalizeRanks",(()=>a(t))),e(" assignRankMinMax",(()=>function(t){let e=0;t.nodes().forEach((n=>{let r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=Math.max(e,r.maxRank))})),t.graph().maxRank=e}(t))),e(" removeEdgeLabelProxies",(()=>function(t){t.nodes().forEach((e=>{let n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t))),e(" normalize.run",(()=>i.run(t))),e(" parentDummyChains",(()=>s(t))),e(" addBorderSegments",(()=>c(t))),e(" order",(()=>f(t,n))),e(" insertSelfEdges",(()=>function(t){p.buildLayerMatrix(t).forEach((e=>{var n=0;e.forEach(((e,r)=>{var i=t.node(e);i.order=r+n,(i.selfEdges||[]).forEach((e=>{p.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")})),delete i.selfEdges}))}))}(t))),e(" adjustCoordinateSystem",(()=>l.adjust(t))),e(" position",(()=>d(t))),e(" positionSelfEdges",(()=>function(t){t.nodes().forEach((e=>{var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(t))),e(" removeBorderNodes",(()=>function(t){t.nodes().forEach((e=>{if(t.children(e).length){let n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),o=t.node(n.borderLeft[n.borderLeft.length-1]),a=t.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(a.x-o.x),n.height=Math.abs(i.y-r.y),n.x=o.x+n.width/2,n.y=r.y+n.height/2}})),t.nodes().forEach((e=>{"border"===t.node(e).dummy&&t.removeNode(e)}))}(t))),e(" normalize.undo",(()=>i.undo(t))),e(" fixupEdgeLabelCoords",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);if(n.hasOwnProperty("x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t))),e(" undoCoordinateSystem",(()=>l.undo(t))),e(" translateGraph",(()=>function(t){let e=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,o=t.graph(),a=o.marginx||0,s=o.marginy||0;function u(t){let o=t.x,a=t.y,s=t.width,u=t.height;e=Math.min(e,o-s/2),n=Math.max(n,o+s/2),r=Math.min(r,a-u/2),i=Math.max(i,a+u/2)}t.nodes().forEach((e=>u(t.node(e)))),t.edges().forEach((e=>{let n=t.edge(e);n.hasOwnProperty("x")&&u(n)})),e-=a,r-=s,t.nodes().forEach((n=>{let i=t.node(n);i.x-=e,i.y-=r})),t.edges().forEach((n=>{let i=t.edge(n);i.points.forEach((t=>{t.x-=e,t.y-=r})),i.hasOwnProperty("x")&&(i.x-=e),i.hasOwnProperty("y")&&(i.y-=r)})),o.width=n-e+a,o.height=i-r+s}(t))),e(" assignNodeIntersects",(()=>function(t){t.edges().forEach((e=>{let n,r,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(p.intersectRect(o,n)),i.points.push(p.intersectRect(a,r))}))}(t))),e(" reversePoints",(()=>function(t){t.edges().forEach((e=>{let n=t.edge(e);n.reversed&&n.points.reverse()}))}(t))),e(" acyclic.undo",(()=>r.undo(t)))}(A,n,e))),n(" updateInputGraph",(()=>function(t,e){t.nodes().forEach((n=>{let r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,e.children(n).length&&(r.width=i.width,r.height=i.height))})),t.edges().forEach((n=>{let r=t.edge(n),i=e.edge(n);r.points=i.points,i.hasOwnProperty("x")&&(r.x=i.x,r.y=i.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,A)))}))};let v=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},m=["acyclicer","ranker","rankdir","align"],_=["width","height"],w={width:0,height:0},b=["minlen","weight","width","height","labeloffset"],x={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function k(t,e){return p.mapValues(p.pick(t,e),Number)}function N(t){var e={};return t&&Object.entries(t).forEach((([t,n])=>{"string"==typeof t&&(t=t.toLowerCase()),e[t]=n})),e}},9885:(t,e,n)=>{let r=n(6856);function i(t,e,n,o,a,s,u){let h=t.children(u);if(!h.length)return void(u!==e&&t.setEdge(e,u,{weight:0,minlen:n}));let c=r.addBorderNode(t,"_bt"),l=r.addBorderNode(t,"_bb"),f=t.node(u);t.setParent(c,u),f.borderTop=c,t.setParent(l,u),f.borderBottom=l,h.forEach((r=>{i(t,e,n,o,a,s,r);let h=t.node(r),f=h.borderTop?h.borderTop:r,d=h.borderBottom?h.borderBottom:r,p=h.borderTop?o:2*o,g=f!==d?1:a-s[u]+1;t.setEdge(c,f,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,l,{weight:p,minlen:g,nestingEdge:!0})})),t.parent(u)||t.setEdge(e,c,{weight:0,minlen:a+s[u]})}t.exports={run:function(t){let e=r.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(r,i){var o=t.children(r);o&&o.length&&o.forEach((t=>n(t,i+1))),e[r]=i}return t.children().forEach((t=>n(t,1))),e}(t),o=Math.max(...Object.values(n))-1,a=2*o+1;t.graph().nestingRoot=e,t.edges().forEach((e=>t.edge(e).minlen*=a));let s=function(t){return t.edges().reduce(((e,n)=>e+t.edge(n).weight),0)}(t)+1;t.children().forEach((r=>i(t,e,a,s,o,n,r))),t.graph().nodeRankFactor=a},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,t.edges().forEach((e=>{t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},1293:(t,e,n)=>{"use strict";let r=n(6856);t.exports={run:function(t){t.graph().dummyChains=[],t.edges().forEach((e=>function(t,e){let n,i,o,a=e.v,s=t.node(a).rank,u=e.w,h=t.node(u).rank,c=e.name,l=t.edge(e),f=l.labelRank;if(h!==s+1){for(t.removeEdge(e),o=0,++s;s<h;++o,++s)l.points=[],i={width:0,height:0,edgeLabel:l,edgeObj:e,rank:s},n=r.addDummyNode(t,"edge",i,"_d"),s===f&&(i.width=l.width,i.height=l.height,i.dummy="edge-label",i.labelpos=l.labelpos),t.setEdge(a,n,{weight:l.weight},c),0===o&&t.graph().dummyChains.push(n),a=n;t.setEdge(a,u,{weight:l.weight},c)}}(t,e)))},undo:function(t){t.graph().dummyChains.forEach((e=>{let n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},7508:t=>{t.exports=function(t,e,n){let r,i={};n.forEach((n=>{let o,a,s=t.parent(n);for(;s;){if(o=t.parent(s),o?(a=i[o],i[o]=s):(a=r,r=s),a&&a!==s)return void e.setEdge(a,s);s=o}}))}},4592:t=>{t.exports=function(t,e=[]){return e.map((e=>{let n=t.inEdges(e);if(n.length){let r=n.reduce(((e,n)=>{let r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:r.sum/r.weight,weight:r.weight}}return{v:e}}))}},4600:(t,e,n)=>{let r=n(4678).Graph,i=n(6856);t.exports=function(t,e,n){let o=function(t){for(var e;t.hasNode(e=i.uniqueId("_root")););return e}(t),a=new r({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((e=>t.node(e)));return t.nodes().forEach((r=>{let i=t.node(r),s=t.parent(r);(i.rank===e||i.minRank<=e&&e<=i.maxRank)&&(a.setNode(r),a.setParent(r,s||o),t[n](r).forEach((e=>{let n=e.v===r?e.w:e.v,i=a.edge(n,r),o=void 0!==i?i.weight:0;a.setEdge(n,r,{weight:t.edge(e).weight+o})})),i.hasOwnProperty("minRank")&&a.setNode(r,{borderLeft:i.borderLeft[e],borderRight:i.borderRight[e]}))})),a}},835:(t,e,n)=>{"use strict";let r=n(6856).zipObject;function i(t,e,n){let i=r(n,n.map(((t,e)=>e))),o=e.flatMap((e=>t.outEdges(e).map((e=>({pos:i[e.w],weight:t.edge(e).weight}))).sort(((t,e)=>t.pos-e.pos)))),a=1;for(;a<n.length;)a<<=1;let s=2*a-1;a-=1;let u=new Array(s).fill(0),h=0;return o.forEach((t=>{let e=t.pos+a;u[e]+=t.weight;let n=0;for(;e>0;)e%2&&(n+=u[e+1]),e=e-1>>1,u[e]+=t.weight;h+=t.weight*n})),h}t.exports=function(t,e){let n=0;for(let r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},5577:(t,e,n)=>{"use strict";let r=n(6498),i=n(835),o=n(2804),a=n(4600),s=n(7508),u=n(4678).Graph,h=n(6856);function c(t,e,n){return e.map((function(e){return a(t,e,n)}))}function l(t,e){let n=new u;t.forEach((function(t){let r=t.graph().root,i=o(t,r,n,e);i.vs.forEach(((e,n)=>t.node(e).order=n)),s(t,n,i.vs)}))}function f(t,e){Object.values(e).forEach((e=>e.forEach(((e,n)=>t.node(e).order=n))))}t.exports=function t(e,n){if(n&&"function"==typeof n.customOrder)return void n.customOrder(e,t);let o=h.maxRank(e),a=c(e,h.range(1,o+1),"inEdges"),s=c(e,h.range(o-1,-1,-1),"outEdges"),u=r(e);if(f(e,u),n&&n.disableOptimalOrderHeuristic)return;let d,p=Number.POSITIVE_INFINITY;for(let t=0,n=0;n<4;++t,++n){l(t%2?a:s,t%4>=2),u=h.buildLayerMatrix(e);let r=i(e,u);r<p&&(n=0,d=Object.assign({},u),p=r)}f(e,d)}},6498:(t,e,n)=>{"use strict";let r=n(6856);t.exports=function(t){let e={},n=t.nodes().filter((e=>!t.children(e).length)),i=Math.max(...n.map((e=>t.node(e).rank))),o=r.range(i+1).map((()=>[]));return n.sort(((e,n)=>t.node(e).rank-t.node(n).rank)).forEach((function n(r){if(e[r])return;e[r]=!0;let i=t.node(r);o[i.rank].push(r),t.successors(r).forEach(n)})),o}},2635:(t,e,n)=>{"use strict";let r=n(6856);t.exports=function(t,e){let n={};return t.forEach(((t,e)=>{let r=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};void 0!==t.barycenter&&(r.barycenter=t.barycenter,r.weight=t.weight)})),e.edges().forEach((t=>{let e=n[t.v],r=n[t.w];void 0!==e&&void 0!==r&&(r.indegree++,e.out.push(n[t.w]))})),function(t){let e=[];function n(t){return e=>{e.merged||(void 0===e.barycenter||void 0===t.barycenter||e.barycenter>=t.barycenter)&&function(t,e){let n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return n=>{n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){let r=t.pop();e.push(r),r.in.reverse().forEach(n(r)),r.out.forEach(i(r))}return e.filter((t=>!t.merged)).map((t=>r.pick(t,["vs","i","barycenter","weight"])))}(Object.values(n).filter((t=>!t.indegree)))}},2804:(t,e,n)=>{let r=n(4592),i=n(2635),o=n(5437);t.exports=function t(e,n,a,s){let u=e.children(n),h=e.node(n),c=h?h.borderLeft:void 0,l=h?h.borderRight:void 0,f={};c&&(u=u.filter((t=>t!==c&&t!==l)));let d=r(e,u);d.forEach((n=>{if(e.children(n.v).length){let o=t(e,n.v,a,s);f[n.v]=o,o.hasOwnProperty("barycenter")&&(i=o,void 0!==(r=n).barycenter?(r.barycenter=(r.barycenter*r.weight+i.barycenter*i.weight)/(r.weight+i.weight),r.weight+=i.weight):(r.barycenter=i.barycenter,r.weight=i.weight))}var r,i}));let p=i(d,a);!function(t,e){t.forEach((t=>{t.vs=t.vs.flatMap((t=>e[t]?e[t].vs:t))}))}(p,f);let g=o(p,s);if(c&&(g.vs=[c,g.vs,l].flat(!0),e.predecessors(c).length)){let t=e.node(e.predecessors(c)[0]),n=e.node(e.predecessors(l)[0]);g.hasOwnProperty("barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+t.order+n.order)/(g.weight+2),g.weight+=2}return g}},5437:(t,e,n)=>{let r=n(6856);function i(t,e,n){let r;for(;e.length&&(r=e[e.length-1]).i<=n;)e.pop(),t.push(r.vs),n++;return n}t.exports=function(t,e){let n=r.partition(t,(t=>t.hasOwnProperty("barycenter"))),o=n.lhs,a=n.rhs.sort(((t,e)=>e.i-t.i)),s=[],u=0,h=0,c=0;var l;o.sort((l=!!e,(t,e)=>t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:l?e.i-t.i:t.i-e.i)),c=i(s,a,c),o.forEach((t=>{c+=t.vs.length,s.push(t.vs),u+=t.barycenter*t.weight,h+=t.weight,c=i(s,a,c)}));let f={vs:s.flat(!0)};return h&&(f.barycenter=u/h,f.weight=h),f}},2488:t=>{t.exports=function(t){let e=function(t){let e={},n=0;return t.children().forEach((function r(i){let o=n;t.children(i).forEach(r),e[i]={low:o,lim:n++}})),e}(t);t.graph().dummyChains.forEach((n=>{let r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){let i,o,a=[],s=[],u=Math.min(e[n].low,e[r].low),h=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>u||h>e[i].lim));for(o=i,i=r;(i=t.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,s=o.lca,u=0,h=a[u],c=!0;for(;n!==i.w;){if(r=t.node(n),c){for(;(h=a[u])!==s&&t.node(h).maxRank<r.rank;)u++;h===s&&(c=!1)}if(!c){for(;u<a.length-1&&t.node(h=a[u+1]).minRank<=r.rank;)u++;h=a[u]}t.setParent(n,h),n=t.successors(n)[0]}}))}},8121:(t,e,n)=>{"use strict";let r=n(4678).Graph,i=n(6856);function o(t,e){let n={};return e.length&&e.reduce((function(e,r){let i=0,o=0,a=e.length,u=r[r.length-1];return r.forEach(((e,h)=>{let c=function(t,e){if(t.node(e).dummy)return t.predecessors(e).find((e=>t.node(e).dummy))}(t,e),l=c?t.node(c).order:a;(c||e===u)&&(r.slice(o,h+1).forEach((e=>{t.predecessors(e).forEach((r=>{let o=t.node(r),a=o.order;!(a<i||l<a)||o.dummy&&t.node(e).dummy||s(n,r,e)}))})),o=h+1,i=l)})),r})),n}function a(t,e){let n={};function r(e,r,o,a,u){let h;i.range(r,o).forEach((r=>{h=e[r],t.node(h).dummy&&t.predecessors(h).forEach((e=>{let r=t.node(e);r.dummy&&(r.order<a||r.order>u)&&s(n,e,h)}))}))}return e.length&&e.reduce((function(e,n){let i,o=-1,a=0;return n.forEach(((s,u)=>{if("border"===t.node(s).dummy){let e=t.predecessors(s);e.length&&(i=t.node(e[0]).order,r(n,a,u,o,i),a=u,o=i)}r(n,a,n.length,i,e.length)})),n})),n}function s(t,e,n){if(e>n){let t=e;e=n,n=t}let r=t[e];r||(t[e]=r={}),r[n]=!0}function u(t,e,n){if(e>n){let t=e;e=n,n=t}return!!t[e]&&t[e].hasOwnProperty(n)}function h(t,e,n,r){let i={},o={},a={};return e.forEach((t=>{t.forEach(((t,e)=>{i[t]=t,o[t]=t,a[t]=e}))})),e.forEach((t=>{let e=-1;t.forEach((t=>{let s=r(t);if(s.length){s=s.sort(((t,e)=>a[t]-a[e]));let r=(s.length-1)/2;for(let h=Math.floor(r),c=Math.ceil(r);h<=c;++h){let r=s[h];o[t]===t&&e<a[r]&&!u(n,t,r)&&(o[r]=t,o[t]=i[t]=i[r],e=a[r])}}}))})),{root:i,align:o}}function c(t,e,n,i,o){let a={},s=function(t,e,n,i){let o=new r,a=t.graph(),s=function(t,e,n){return(r,i,o)=>{let a,s=r.node(i),u=r.node(o),h=0;if(h+=s.width/2,s.hasOwnProperty("labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2}if(a&&(h+=n?a:-a),a=0,h+=(s.dummy?e:t)/2,h+=(u.dummy?e:t)/2,h+=u.width/2,u.hasOwnProperty("labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=u.width/2;break;case"r":a=-u.width/2}return a&&(h+=n?a:-a),a=0,h}}(a.nodesep,a.edgesep,i);return e.forEach((e=>{let r;e.forEach((e=>{let i=n[e];if(o.setNode(i),r){var a=n[r],u=o.edge(a,i);o.setEdge(a,i,Math.max(s(t,e,r),u||0))}r=e}))})),o}(t,e,n,o),u=o?"borderLeft":"borderRight";function h(t,e){let n=s.nodes(),r=n.pop(),i={};for(;r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return h((function(t){a[t]=s.inEdges(t).reduce(((t,e)=>Math.max(t,a[e.v]+s.edge(e))),0)}),s.predecessors.bind(s)),h((function(e){let n=s.outEdges(e).reduce(((t,e)=>Math.min(t,a[e.w]-s.edge(e))),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(a[e]=Math.max(a[e],n))}),s.successors.bind(s)),Object.keys(i).forEach((t=>a[t]=a[n[t]])),a}function l(t,e){return Object.values(e).reduce(((e,n)=>{let r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(n).forEach((([e,n])=>{let o=function(t,e){return t.node(e).width}(t,e)/2;r=Math.max(n+o,r),i=Math.min(n-o,i)}));const o=r-i;return o<e[0]&&(e=[o,n]),e}),[Number.POSITIVE_INFINITY,null])[1]}function f(t,e){let n=Object.values(e),r=Math.min(...n),o=Math.max(...n);["u","d"].forEach((n=>{["l","r"].forEach((a=>{let s=n+a,u=t[s];if(u===e)return;let h=Object.values(u),c=r-Math.min(...h);"l"!==a&&(c=o-Math.max(...h)),c&&(t[s]=i.mapValues(u,(t=>t+c)))}))}))}function d(t,e){return i.mapValues(t.ul,((n,r)=>{if(e)return t[e.toLowerCase()][r];{let e=Object.values(t).map((t=>t[r])).sort(((t,e)=>t-e));return(e[1]+e[2])/2}}))}t.exports={positionX:function(t){let e,n=i.buildLayerMatrix(t),r=Object.assign(o(t,n),a(t,n)),s={};["u","d"].forEach((o=>{e="u"===o?n:Object.values(n).reverse(),["l","r"].forEach((n=>{"r"===n&&(e=e.map((t=>Object.values(t).reverse())));let a=("u"===o?t.predecessors:t.successors).bind(t),u=h(0,e,r,a),l=c(t,e,u.root,u.align,"r"===n);"r"===n&&(l=i.mapValues(l,(t=>-t))),s[o+n]=l}))}));let u=l(t,s);return f(s,u),d(s,t.graph().align)},findType1Conflicts:o,findType2Conflicts:a,addConflict:s,hasConflict:u,verticalAlignment:h,horizontalCompaction:c,alignCoordinates:f,findSmallestWidthAlignment:l,balance:d}},8924:(t,e,n)=>{"use strict";let r=n(6856),i=n(8121).positionX;t.exports=function(t){(function(t){let e=r.buildLayerMatrix(t),n=t.graph().ranksep,i=0;e.forEach((e=>{const r=e.reduce(((e,n)=>{const r=t.node(n).height;return e>r?e:r}),0);e.forEach((e=>t.node(e).y=i+r/2)),i+=r+n}))})(t=r.asNonCompoundGraph(t)),Object.entries(i(t)).forEach((([e,n])=>t.node(e).x=n))}},7885:(t,e,n)=>{"use strict";var r=n(4678).Graph,i=n(4389).slack;function o(t,e){return t.nodes().forEach((function n(r){e.nodeEdges(r).forEach((o=>{var a=o.v,s=r===a?o.w:a;t.hasNode(s)||i(e,o)||(t.setNode(s,{}),t.setEdge(r,s,{}),n(s))}))})),t.nodeCount()}function a(t,e){return e.edges().reduce(((n,r)=>{let o=Number.POSITIVE_INFINITY;return t.hasNode(r.v)!==t.hasNode(r.w)&&(o=i(e,r)),o<n[0]?[o,r]:n}),[Number.POSITIVE_INFINITY,null])[1]}function s(t,e,n){t.nodes().forEach((t=>e.node(t).rank+=n))}t.exports=function(t){var e,n,u=new r({directed:!1}),h=t.nodes()[0],c=t.nodeCount();for(u.setNode(h,{});o(u,t)<c;)e=a(u,t),n=u.hasNode(e.v)?i(t,e):-i(t,e),s(u,t,n);return u}},3045:(t,e,n)=>{"use strict";var r=n(4389).longestPath,i=n(7885),o=n(7520);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":default:!function(t){o(t)}(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":a(t)}};var a=r},7520:(t,e,n)=>{"use strict";var r=n(7885),i=n(4389).slack,o=n(4389).longestPath,a=n(4678).alg.preorder,s=n(4678).alg.postorder,u=n(6856).simplify;function h(t){t=u(t),o(t);var e,n=r(t);for(f(n),c(n,t);e=p(n);)v(n,t,e,g(n,t,e))}function c(t,e){var n=s(t,t.nodes());(n=n.slice(0,n.length-1)).forEach((n=>function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=l(t,e,n)}(t,e,n)))}function l(t,e,n){var r=t.node(n).parent,i=!0,o=e.edge(n,r),a=0;return o||(i=!1,o=e.edge(r,n)),a=o.weight,e.nodeEdges(n).forEach((o=>{var s,u,h=o.v===n,c=h?o.w:o.v;if(c!==r){var l=h===i,f=e.edge(o).weight;if(a+=l?f:-f,s=n,u=c,t.hasEdge(s,u)){var d=t.edge(n,c).cutvalue;a+=l?-d:d}}})),a}function f(t,e){arguments.length<2&&(e=t.nodes()[0]),d(t,{},1,e)}function d(t,e,n,r,i){var o=n,a=t.node(r);return e[r]=!0,t.neighbors(r).forEach((i=>{e.hasOwnProperty(i)||(n=d(t,e,n,i,r))})),a.low=o,a.lim=n++,i?a.parent=i:delete a.parent,n}function p(t){return t.edges().find((e=>t.edge(e).cutvalue<0))}function g(t,e,n){var r=n.v,o=n.w;e.hasEdge(r,o)||(r=n.w,o=n.v);var a=t.node(r),s=t.node(o),u=a,h=!1;a.lim>s.lim&&(u=s,h=!0);var c=e.edges().filter((e=>h===y(0,t.node(e.v),u)&&h!==y(0,t.node(e.w),u)));return c.reduce(((t,n)=>i(e,n)<i(e,t)?n:t))}function v(t,e,n,r){var i=n.v,o=n.w;t.removeEdge(i,o),t.setEdge(r.v,r.w,{}),f(t),c(t,e),function(t,e){var n=t.nodes().find((t=>!e.node(t).parent)),r=a(t,n);(r=r.slice(1)).forEach((n=>{var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)}))}(t,e)}function y(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=h,h.initLowLimValues=f,h.initCutValues=c,h.calcCutValue=l,h.leaveEdge=p,h.enterEdge=g,h.exchangeEdges=v},4389:t=>{"use strict";t.exports={longestPath:function(t){var e={};t.sources().forEach((function n(r){var i=t.node(r);if(e.hasOwnProperty(r))return i.rank;e[r]=!0;var o=Math.min(...t.outEdges(r).map((e=>null==e?Number.POSITIVE_INFINITY:n(e.w)-t.edge(e).minlen)));return o===Number.POSITIVE_INFINITY&&(o=0),i.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},6856:(t,e,n)=>{"use strict";let r=n(4678).Graph;function i(t,e,n,r){let i;do{i=s(r)}while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function o(t){return Math.max(...t.nodes().map((e=>{let n=t.node(e).rank;return void 0===n?Number.MIN_VALUE:n})))}t.exports={addBorderNode:function(t,e,n,r){let o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),i(t,"border",o,e)},addDummyNode:i,asNonCompoundGraph:function(t){let e=new r({multigraph:t.isMultigraph()}).setGraph(t.graph());return t.nodes().forEach((n=>{t.children(n).length||e.setNode(n,t.node(n))})),t.edges().forEach((n=>{e.setEdge(n,t.edge(n))})),e},buildLayerMatrix:function(t){let e=u(o(t)+1).map((()=>[]));return t.nodes().forEach((n=>{let r=t.node(n),i=r.rank;void 0!==i&&(e[i][r.order]=n)})),e},intersectRect:function(t,e){let n,r,i=t.x,o=t.y,a=e.x-i,s=e.y-o,u=t.width/2,h=t.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(a)*h?(s<0&&(h=-h),n=h*a/s,r=h):(a<0&&(u=-u),n=u,r=u*s/a),{x:i+n,y:o+r}},mapValues:function(t,e){let n=e;return"string"==typeof e&&(n=t=>t[e]),Object.entries(t).reduce(((t,[e,r])=>(t[e]=n(r,e),t)),{})},maxRank:o,normalizeRanks:function(t){let e=Math.min(...t.nodes().map((e=>{let n=t.node(e).rank;return void 0===n?Number.MAX_VALUE:n})));t.nodes().forEach((n=>{let r=t.node(n);r.hasOwnProperty("rank")&&(r.rank-=e)}))},notime:function(t,e){return e()},partition:function(t,e){let n={lhs:[],rhs:[]};return t.forEach((t=>{e(t)?n.lhs.push(t):n.rhs.push(t)})),n},pick:function(t,e){const n={};for(const r of e)void 0!==t[r]&&(n[r]=t[r]);return n},predecessorWeights:function(t){let e=t.nodes().map((e=>{let n={};return t.inEdges(e).forEach((e=>{n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return h(t.nodes(),e)},range:u,removeEmptyRanks:function(t){let e=Math.min(...t.nodes().map((e=>t.node(e).rank))),n=[];t.nodes().forEach((r=>{let i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));let r=0,i=t.graph().nodeRankFactor;Array.from(n).forEach(((e,n)=>{void 0===e&&n%i!=0?--r:void 0!==e&&r&&e.forEach((e=>t.node(e).rank+=r))}))},simplify:function(t){let e=(new r).setGraph(t.graph());return t.nodes().forEach((n=>e.setNode(n,t.node(n)))),t.edges().forEach((n=>{let r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},successorWeights:function(t){let e=t.nodes().map((e=>{let n={};return t.outEdges(e).forEach((e=>{n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return h(t.nodes(),e)},time:function(t,e){let n=Date.now();try{return e()}finally{console.log(t+" time: "+(Date.now()-n)+"ms")}},uniqueId:s,zipObject:h};let a=0;function s(t){var e=++a;return toString(t)+e}function u(t,e,n=1){null==e&&(e=t,t=0);let r=t=>t<e;n<0&&(r=t=>e<t);const i=[];for(let e=t;r(e);e+=n)i.push(e);return i}function h(t,e){return t.reduce(((t,n,r)=>(t[n]=e[r],t)),{})}},898:t=>{t.exports="1.1.3"},4678:(t,e,n)=>{var r=n(2314);t.exports={Graph:r.Graph,json:n(2258),alg:n(6311),version:r.version}},2335:t=>{t.exports=function(t){var e,n={},r=[];function i(r){n.hasOwnProperty(r)||(n[r]=!0,e.push(r),t.successors(r).forEach(i),t.predecessors(r).forEach(i))}return t.nodes().forEach((function(t){e=[],i(t),e.length&&r.push(e)})),r}},6248:t=>{function e(t,e,n,i){for(var o=[[t,!1]];o.length>0;){var a=o.pop();a[1]?i.push(a[0]):n.hasOwnProperty(a[0])||(n[a[0]]=!0,o.push([a[0],!0]),r(e(a[0]),(t=>o.push([t,!1]))))}}function n(t,e,n,i){for(var o=[t];o.length>0;){var a=o.pop();n.hasOwnProperty(a)||(n[a]=!0,i.push(a),r(e(a),(t=>o.push(t))))}}function r(t,e){for(var n=t.length;n--;)e(t[n],n,t);return t}t.exports=function(t,r,i){Array.isArray(r)||(r=[r]);var o=t.isDirected()?e=>t.successors(e):e=>t.neighbors(e),a="post"===i?e:n,s=[],u={};return r.forEach((e=>{if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);a(e,o,u,s)})),s}},3651:(t,e,n)=>{var r=n(4237);t.exports=function(t,e,n){return t.nodes().reduce((function(i,o){return i[o]=r(t,o,e,n),i}),{})}},4237:(t,e,n)=>{var r=n(1997);t.exports=function(t,e,n,o){return function(t,e,n,i){var o,a,s={},u=new r,h=function(t){var e=t.v!==o?t.v:t.w,r=s[e],i=n(t),h=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);h<r.distance&&(r.distance=h,r.predecessor=o,u.decrease(e,h))};for(t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},u.add(t,n)}));u.size()>0&&(o=u.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)i(o).forEach(h);return s}(t,String(e),n||i,o||function(e){return t.outEdges(e)})};var i=()=>1},402:(t,e,n)=>{var r=n(3911);t.exports=function(t){return r(t).filter((function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},3242:t=>{t.exports=function(t,n,r){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[t],i=e[n],a=o[n],s=r.distance+i.distance;s<a.distance&&(a.distance=s,a.predecessor=i.predecessor)}))}))})),r}(t,n||e,r||function(e){return t.outEdges(e)})};var e=()=>1},6311:(t,e,n)=>{t.exports={components:n(2335),dijkstra:n(4237),dijkstraAll:n(3651),findCycles:n(402),floydWarshall:n(3242),isAcyclic:n(1158),postorder:n(9289),preorder:n(1924),prim:n(9763),tarjan:n(3911),topsort:n(1964)}},1158:(t,e,n)=>{var r=n(1964);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},9289:(t,e,n)=>{var r=n(6248);t.exports=function(t,e){return r(t,e,"post")}},1924:(t,e,n)=>{var r=n(6248);t.exports=function(t,e){return r(t,e,"pre")}},9763:(t,e,n)=>{var r=n(8114),i=n(1997);t.exports=function(t,e){var n,o=new r,a={},s=new i;function u(t){var r=t.v===n?t.w:t.v,i=s.priority(r);if(void 0!==i){var o=e(t);o<i&&(a[r]=n,s.decrease(r,o))}}if(0===t.nodeCount())return o;t.nodes().forEach((function(t){s.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),s.decrease(t.nodes()[0],0);for(var h=!1;s.size()>0;){if(n=s.removeMin(),a.hasOwnProperty(n))o.setEdge(n,a[n]);else{if(h)throw new Error("Input graph is not connected: "+t);h=!0}t.nodeEdges(n).forEach(u)}return o}},3911:t=>{t.exports=function(t){var e=0,n=[],r={},i=[];function o(a){var s=r[a]={onStack:!0,lowlink:e,index:e++};if(n.push(a),t.successors(a).forEach((function(t){r.hasOwnProperty(t)?r[t].onStack&&(s.lowlink=Math.min(s.lowlink,r[t].index)):(o(t),s.lowlink=Math.min(s.lowlink,r[t].lowlink))})),s.lowlink===s.index){var u,h=[];do{u=n.pop(),r[u].onStack=!1,h.push(u)}while(a!==u);i.push(h)}}return t.nodes().forEach((function(t){r.hasOwnProperty(t)||o(t)})),i}},1964:t=>{function e(t){var e={},r={},i=[];if(t.sinks().forEach((function o(a){if(r.hasOwnProperty(a))throw new n;e.hasOwnProperty(a)||(r[a]=!0,e[a]=!0,t.predecessors(a).forEach(o),delete r[a],i.push(a))})),Object.keys(e).length!==t.nodeCount())throw new n;return i}class n extends Error{constructor(){super(...arguments)}}t.exports=e,e.CycleException=n},1997:t=>{t.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map((function(t){return t.key}))}has(t){return this._keyIndices.hasOwnProperty(t)}priority(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(t,e){var n=this._keyIndices;if(t=String(t),!n.hasOwnProperty(t)){var r=this._arr,i=r.length;return n[t]=i,r.push({key:t,priority:e}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)}_heapify(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))}_decrease(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e}_swap(t,e){var n=this._arr,r=this._keyIndices,i=n[t],o=n[e];n[t]=o,n[e]=i,r[o.key]=t,r[i.key]=e}}},8114:t=>{"use strict";var e="\0",n="\0",r="";function i(t,e){t[e]?t[e]++:t[e]=1}function o(t,e){--t[e]||delete t[e]}function a(t,n,i,o){var a=""+n,s=""+i;if(!t&&a>s){var u=a;a=s,s=u}return a+r+s+r+(void 0===o?e:o)}function s(t,e){return a(t,e.v,e.w,e.name)}t.exports=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(t){t&&(this._isDirected=!t.hasOwnProperty("directed")||t.directed,this._isMultigraph=!!t.hasOwnProperty("multigraph")&&t.multigraph,this._isCompound=!!t.hasOwnProperty("compound")&&t.compound),this._isCompound&&(this._parent={},this._children={},this._children[n]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,"function"!=typeof t&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter((e=>0===Object.keys(t._in[e]).length))}sinks(){var t=this;return this.nodes().filter((e=>0===Object.keys(t._out[e]).length))}setNodes(t,e){var n=arguments,r=this;return t.forEach((function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this}setNode(t,e){return this._nodes.hasOwnProperty(t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=n,this._children[t]={},this._children[n][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return this._nodes.hasOwnProperty(t)}removeNode(t){var e=this;if(this._nodes.hasOwnProperty(t)){var n=t=>e.removeEdge(e._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach((function(t){e.setParent(t)})),delete this._children[t]),Object.keys(this._in[t]).forEach(n),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===e)e=n;else{for(var r=e+="";void 0!==r;r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==n)return e}}children(t=n){if(this._isCompound){var e=this._children[t];if(e)return Object.keys(e)}else{if(t===n)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return Object.keys(e)}successors(t){var e=this._sucs[t];if(e)return Object.keys(e)}neighbors(t){var e=this.predecessors(t);if(e){const r=new Set(e);for(var n of this.successors(t))r.add(n);return Array.from(r.values())}}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach((function([n,r]){t(n)&&e.setNode(n,r)})),Object.values(this._edgeObjs).forEach((function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function i(t){var o=n.parent(t);return void 0===o||e.hasNode(o)?(r[t]=o,o):o in r?r[o]:i(o)}return this._isCompound&&e.nodes().forEach((t=>e.setParent(t,i(t)))),e}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,"function"!=typeof t&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,e){var n=this,r=arguments;return t.reduce((function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this}setEdge(){var t,e,n,r,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(r=arguments[1],o=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),t=""+t,e=""+e,void 0!==n&&(n=""+n);var u=a(this._isDirected,t,e,n);if(this._edgeLabels.hasOwnProperty(u))return o&&(this._edgeLabels[u]=r),this;if(void 0!==n&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[u]=o?r:this._defaultEdgeLabelFn(t,e,n);var h=function(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}(this._isDirected,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[u]=h,i(this._preds[e],t),i(this._sucs[t],e),this._in[e][u]=h,this._out[t][u]=h,this._edgeCount++,this}edge(t,e,n){var r=1===arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return this._edgeLabels[r]}edgeAsObj(){const t=this.edge(...arguments);return"object"!=typeof t?{label:t}:t}hasEdge(t,e,n){var r=1===arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return this._edgeLabels.hasOwnProperty(r)}removeEdge(t,e,n){var r=1===arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],o(this._preds[e],t),o(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this}inEdges(t,e){var n=this._in[t];if(n){var r=Object.values(n);return e?r.filter((t=>t.v===e)):r}}outEdges(t,e){var n=this._out[t];if(n){var r=Object.values(n);return e?r.filter((t=>t.w===e)):r}}nodeEdges(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}}},2314:(t,e,n)=>{t.exports={Graph:n(8114),version:n(1166)}},2258:(t,e,n)=>{var r=n(8114);function i(t){return t.nodes().map((function(e){var n=t.node(e),r=t.parent(e),i={v:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.parent=r),i}))}function o(t){return t.edges().map((function(e){var n=t.edge(e),r={v:e.v,w:e.w};return void 0!==e.name&&(r.name=e.name),void 0!==n&&(r.value=n),r}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:i(t),edges:o(t)};return void 0!==t.graph()&&(e.value=structuredClone(t.graph())),e},read:function(t){var e=new r(t.options).setGraph(t.value);return t.nodes.forEach((function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),t.edges.forEach((function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},1166:t=>{t.exports="2.2.2"},935:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var u=this[s][0];null!=u&&(a[u]=!0)}for(var h=0;h<t.length;h++){var c=[].concat(t[h]);r&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},6758:t=>{"use strict";t.exports=function(t){return t[1]}},9126:(t,e,n)=>{"use strict";n.d(e,{A:()=>E});var r=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),i="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,o=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),a="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},s=["top","right","bottom","left","width","height","size","weight"],u="undefined"!=typeof MutationObserver,h=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&u()}function s(){a(o)}function u(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,e);i=t}return u}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),c=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},l=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||o},f=y(0,0,0,0);function d(t){return parseFloat(t)||0}function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+d(t["border-"+n+"-width"])}),0)}var g="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof l(t).SVGGraphicsElement}:function(t){return t instanceof l(t).SVGElement&&"function"==typeof t.getBBox};function v(t){return i?g(t)?function(t){var e=t.getBBox();return y(0,0,e.width,e.height)}(t):function(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return f;var r=l(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=d(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=d(r.width),u=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=p(r,"left","right")+o),Math.round(u+a)!==n&&(u-=p(r,"top","bottom")+a)),!function(t){return t===l(t).document.documentElement}(t)){var h=Math.round(s+o)-e,c=Math.round(u+a)-n;1!==Math.abs(h)&&(s-=h),1!==Math.abs(c)&&(u-=c)}return y(i.left,i.top,s,u)}(t):f}function y(t,e,n,r){return{x:t,y:e,width:n,height:r}}var m=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=y(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=v(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),_=function(t,e){var n,r,i,o,a,s,u,h=(r=(n=e).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),c(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);c(this,{target:t,contentRect:h})},w=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new r,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new m(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new _(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),b="undefined"!=typeof WeakMap?new WeakMap:new r,x=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=h.getInstance(),r=new w(e,n,this);b.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){x.prototype[t]=function(){var e;return(e=b.get(this))[t].apply(e,arguments)}}));const E=void 0!==o.ResizeObserver?o.ResizeObserver:x},3373:(t,e)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=a(t,o(n)))}return t}function o(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return i.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)r.call(t,n)&&t[n]&&(e=a(e,n));return e}function a(t,e){return e?t?t+" "+e:t+e:t}t.exports?(i.default=i,t.exports=i):void 0===(n=function(){return i}.apply(e,[]))||(t.exports=n)}()},2740:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(7545),i=n(6902);function o(t,e,n){"symbol"==(0,r.A)(e)&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}var a=n(1369);function s(t,e,n,s,u,h){var c,l,f,d,p,g,v,y=Symbol.metadata||Symbol.for("Symbol.metadata"),m=Object.defineProperty,_=Object.create,w=[_(null),_(null)],b=e.length;function x(e,n,r){return function(i,o){n&&(o=i,i=t);for(var a=0;a<e.length;a++)o=e[a].apply(i,r?[o]:[]);return r?o:i}}function E(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw new TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function k(t,e,n,i,a,s,u,h,f,d,p){function g(t){if(!p(t))throw new TypeError("Attempted to access private element on non-instance")}var v=[].concat(e[0]),y=e[3],_=!u,b=1===a,k=3===a,N=4===a,A=2===a;function M(e,n,r){return function(i,o){return n&&(o=i,i=t),r&&r(i),O[e].call(i,o)}}if(!_){var O={},I=[],P=k?"get":N||b?"set":"value";if(f?(d||b?O={get:o((function(){return y(this)}),i,"get"),set:function(t){e[4](this,t)}}:O[P]=y,d||o(O[P],i,A?"":P)):d||(O=Object.getOwnPropertyDescriptor(t,i)),!d&&!f){if((l=w[+h][i])&&7!=(l^a))throw Error("Decorating two elements with the same name ("+O[P].name+") is not supported yet");w[+h][i]=a<3?1:a}}for(var T=t,j=v.length-1;j>=0;j-=n?2:1){var C=E(v[j],"A decorator","be",!0),S=n?v[j-1]:void 0,$={},z={kind:["field","accessor","method","getter","setter","class"][a],name:i,metadata:c,addInitializer:function(t,e){if(t.v)throw Error("attempted to call addInitializer after decoration was finished");E(e,"An initializer","be",!0),s.push(e)}.bind(null,$)};if(_)l=C.call(S,T,z),$.v=1,E(l,"class decorators","return")&&(T=l);else if(z.static=h,z.private=f,l=z.access={has:f?p.bind():function(t){return i in t}},N||(l.get=f?A?function(t){return g(t),O.value}:M("get",0,g):function(t){return t[i]}),A||k||(l.set=f?M("set",0,g):function(t,e){t[i]=e}),T=C.call(S,b?{get:O.get,set:O.set}:O[P],z),$.v=1,b){if("object"==(0,r.A)(T)&&T)(l=E(T.get,"accessor.get"))&&(O.get=l),(l=E(T.set,"accessor.set"))&&(O.set=l),(l=E(T.init,"accessor.init"))&&I.unshift(l);else if(void 0!==T)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else E(T,(d?"field":"method")+" decorators","return")&&(d?I.unshift(T):O[P]=T)}return a<2&&u.push(x(I,h,1),x(s,h,0)),d||_||(f?b?u.splice(-1,0,M("get",h),M("set",h)):u.push(A?O[P]:E.call.bind(O[P])):m(t,i,O)),T}function N(t){return m(t,y,{configurable:!0,enumerable:!0,value:c})}return void 0!==h&&(c=h[y]),c=_(null==c?null:c),p=[],g=function(t){t&&p.push(x(t))},v=function(e,r){for(var o=0;o<n.length;o++){var s=n[o],h=s[1],c=7&h;if((8&h)==e&&!c==r){var l=s[2],g=!!s[3],v=16&h;k(e?t:t.prototype,s,v,g?"#"+l:(0,a.A)(l),c,c<2?[]:e?d=d||[]:f=f||[],p,!!e,g,r,e&&g?function(e){return(0,i.A)(e)===t}:u)}}},v(8,0),v(0,0),v(8,1),v(0,1),g(f),g(d),l=p,b||N(t),{e:l,get c(){var n=[];return b&&[N(t=k(t,[e],s,t.name,5,n)),x(n,1)]}}}},6330:(t,e,n)=>{"use strict";function r(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,u,"next",t)}function u(t){r(a,i,o,s,u,"throw",t)}s(void 0)}))}}n.d(e,{A:()=>i})},6902:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(7545);function i(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?(0,r.A)(t):"null"));return t}},5536:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(2559);function i(t,e,n){return n((0,r.A)(t,e))}},6514:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r={value:()=>{}};function i(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new o(r)}function o(t){this._=t}function a(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function s(t,e,n){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=r,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}o.prototype=i.prototype={constructor:o,on:function(t,e){var n,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),u=-1,h=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++u<h;)if(n=(t=o[u]).type)i[n]=s(i[n],t.name,e);else if(null==e)for(n in i)i[n]=s(i[n],t.name,null);return this}for(;++u<h;)if((n=(t=o[u]).type)&&(n=a(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new o(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};const u=i},7931:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(3968),i=n(1621),o=n(3993);function a(t){return t.x+t.vx}function s(t){return t.y+t.vy}function u(t){var e,n,u,h=1,c=1;function l(){for(var t,i,l,d,p,g,v,y=e.length,m=0;m<c;++m)for(i=(0,r.A)(e,a,s).visitAfter(f),t=0;t<y;++t)l=e[t],g=n[l.index],v=g*g,d=l.x+l.vx,p=l.y+l.vy,i.visit(_);function _(t,e,n,r,i){var a=t.data,s=t.r,c=g+s;if(!a)return e>d+c||r<d-c||n>p+c||i<p-c;if(a.index>l.index){var f=d-a.x-a.vx,y=p-a.y-a.vy,m=f*f+y*y;m<c*c&&(0===f&&(m+=(f=(0,o.A)(u))*f),0===y&&(m+=(y=(0,o.A)(u))*y),m=(c-(m=Math.sqrt(m)))/m*h,l.vx+=(f*=m)*(c=(s*=s)/(v+s)),l.vy+=(y*=m)*c,a.vx-=f*(c=1-c),a.vy-=y*c)}}}function f(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function d(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r<o;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=(0,i.A)(null==t?1:+t)),l.initialize=function(t,n){e=t,u=n,d()},l.iterations=function(t){return arguments.length?(c=+t,l):c},l.strength=function(t){return arguments.length?(h=+t,l):h},l.radius=function(e){return arguments.length?(t="function"==typeof e?e:(0,i.A)(+e),d(),l):t},l}},1621:(t,e,n)=>{"use strict";function r(t){return function(){return t}}n.d(e,{A:()=>r})},3993:(t,e,n)=>{"use strict";function r(t){return 1e-6*(t()-.5)}n.d(e,{A:()=>r})},6149:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(1621),i=n(3993);function o(t){return t.index}function a(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function s(t){var e,n,s,u,h,c,l=o,f=function(t){return 1/Math.min(u[t.source.index],u[t.target.index])},d=(0,r.A)(30),p=1;function g(r){for(var o=0,a=t.length;o<p;++o)for(var s,u,l,f,d,g,v,y=0;y<a;++y)u=(s=t[y]).source,f=(l=s.target).x+l.vx-u.x-u.vx||(0,i.A)(c),d=l.y+l.vy-u.y-u.vy||(0,i.A)(c),f*=g=((g=Math.sqrt(f*f+d*d))-n[y])/g*r*e[y],d*=g,l.vx-=f*(v=h[y]),l.vy-=d*v,u.vx+=f*(v=1-v),u.vy+=d*v}function v(){if(s){var r,i,o=s.length,c=t.length,f=new Map(s.map(((t,e)=>[l(t,e,s),t])));for(r=0,u=new Array(o);r<c;++r)(i=t[r]).index=r,"object"!=typeof i.source&&(i.source=a(f,i.source)),"object"!=typeof i.target&&(i.target=a(f,i.target)),u[i.source.index]=(u[i.source.index]||0)+1,u[i.target.index]=(u[i.target.index]||0)+1;for(r=0,h=new Array(c);r<c;++r)i=t[r],h[r]=u[i.source.index]/(u[i.source.index]+u[i.target.index]);e=new Array(c),y(),n=new Array(c),m()}}function y(){if(s)for(var n=0,r=t.length;n<r;++n)e[n]=+f(t[n],n,t)}function m(){if(s)for(var e=0,r=t.length;e<r;++e)n[e]=+d(t[e],e,t)}return null==t&&(t=[]),g.initialize=function(t,e){s=t,c=e,v()},g.links=function(e){return arguments.length?(t=e,v(),g):t},g.id=function(t){return arguments.length?(l=t,g):l},g.iterations=function(t){return arguments.length?(p=+t,g):p},g.strength=function(t){return arguments.length?(f="function"==typeof t?t:(0,r.A)(+t),y(),g):f},g.distance=function(t){return arguments.length?(d="function"==typeof t?t:(0,r.A)(+t),m(),g):d},g}},3854:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(3968),i=n(1621),o=n(3993),a=n(4842);function s(){var t,e,n,s,u,h=(0,i.A)(-30),c=1,l=1/0,f=.81;function d(n){var i,o=t.length,u=(0,r.A)(t,a.x,a.y).visitAfter(g);for(s=n,i=0;i<o;++i)e=t[i],u.visit(v)}function p(){if(t){var e,n,r=t.length;for(u=new Array(r),e=0;e<r;++e)n=t[e],u[n.index]=+h(n,e,t)}}function g(t){var e,n,r,i,o,a=0,s=0;if(t.length){for(r=i=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(a+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else{(e=t).x=e.data.x,e.y=e.data.y;do{a+=u[e.data.index]}while(e=e.next)}t.value=a}function v(t,r,i,a){if(!t.value)return!0;var h=t.x-e.x,d=t.y-e.y,p=a-r,g=h*h+d*d;if(p*p/f<g)return g<l&&(0===h&&(g+=(h=(0,o.A)(n))*h),0===d&&(g+=(d=(0,o.A)(n))*d),g<c&&(g=Math.sqrt(c*g)),e.vx+=h*t.value*s/g,e.vy+=d*t.value*s/g),!0;if(!(t.length||g>=l)){(t.data!==e||t.next)&&(0===h&&(g+=(h=(0,o.A)(n))*h),0===d&&(g+=(d=(0,o.A)(n))*d),g<c&&(g=Math.sqrt(c*g)));do{t.data!==e&&(p=u[t.data.index]*s/g,e.vx+=h*p,e.vy+=d*p)}while(t=t.next)}}return d.initialize=function(e,r){t=e,n=r,p()},d.strength=function(t){return arguments.length?(h="function"==typeof t?t:(0,i.A)(+t),p(),d):h},d.distanceMin=function(t){return arguments.length?(c=t*t,d):Math.sqrt(c)},d.distanceMax=function(t){return arguments.length?(l=t*t,d):Math.sqrt(l)},d.theta=function(t){return arguments.length?(f=t*t,d):Math.sqrt(f)},d}},4842:(t,e,n)=>{"use strict";n.d(e,{A:()=>f,x:()=>u,y:()=>h});var r=n(6514),i=n(4234);const o=1664525,a=1013904223,s=4294967296;function u(t){return t.x}function h(t){return t.y}var c=10,l=Math.PI*(3-Math.sqrt(5));function f(t){var e,n=1,u=.001,h=1-Math.pow(u,1/300),f=0,d=.6,p=new Map,g=(0,i.O1)(m),v=(0,r.A)("tick","end"),y=function(){let t=1;return()=>(t=(o*t+a)%s)/s}();function m(){_(),v.call("tick",e),n<u&&(g.stop(),v.call("end",e))}function _(r){var i,o,a=t.length;void 0===r&&(r=1);for(var s=0;s<r;++s)for(n+=(f-n)*h,p.forEach((function(t){t(n)})),i=0;i<a;++i)null==(o=t[i]).fx?o.x+=o.vx*=d:(o.x=o.fx,o.vx=0),null==o.fy?o.y+=o.vy*=d:(o.y=o.fy,o.vy=0);return e}function w(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=c*Math.sqrt(.5+n),o=n*l;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function b(e){return e.initialize&&e.initialize(t,y),e}return null==t&&(t=[]),w(),e={tick:_,restart:function(){return g.restart(m),e},stop:function(){return g.stop(),e},nodes:function(n){return arguments.length?(t=n,w(),p.forEach(b),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(u=+t,e):u},alphaDecay:function(t){return arguments.length?(h=+t,e):+h},alphaTarget:function(t){return arguments.length?(f=+t,e):f},velocityDecay:function(t){return arguments.length?(d=1-t,e):1-d},randomSource:function(t){return arguments.length?(y=t,p.forEach(b),e):y},force:function(t,n){return arguments.length>1?(null==n?p.delete(t):p.set(t,b(n)),e):p.get(t)},find:function(e,n,r){var i,o,a,s,u,h=0,c=t.length;for(null==r?r=1/0:r*=r,h=0;h<c;++h)(a=(i=e-(s=t[h]).x)*i+(o=n-s.y)*o)<r&&(u=s,r=a);return u},on:function(t,n){return arguments.length>1?(v.on(t,n),e):v.on(t)}}}},1945:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(1621);function i(t){var e,n,i,o=(0,r.A)(.1);function a(t){for(var r,o=0,a=e.length;o<a;++o)(r=e[o]).vx+=(i[o]-r.x)*n[o]*t}function s(){if(e){var r,a=e.length;for(n=new Array(a),i=new Array(a),r=0;r<a;++r)n[r]=isNaN(i[r]=+t(e[r],r,e))?0:+o(e[r],r,e)}}return"function"!=typeof t&&(t=(0,r.A)(null==t?0:+t)),a.initialize=function(t){e=t,s()},a.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,r.A)(+t),s(),a):o},a.x=function(e){return arguments.length?(t="function"==typeof e?e:(0,r.A)(+e),s(),a):t},a}},9418:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(1621);function i(t){var e,n,i,o=(0,r.A)(.1);function a(t){for(var r,o=0,a=e.length;o<a;++o)(r=e[o]).vy+=(i[o]-r.y)*n[o]*t}function s(){if(e){var r,a=e.length;for(n=new Array(a),i=new Array(a),r=0;r<a;++r)n[r]=isNaN(i[r]=+t(e[r],r,e))?0:+o(e[r],r,e)}}return"function"!=typeof t&&(t=(0,r.A)(null==t?0:+t)),a.initialize=function(t){e=t,s()},a.strength=function(t){return arguments.length?(o="function"==typeof t?t:(0,r.A)(+t),s(),a):o},a.y=function(e){return arguments.length?(t="function"==typeof e?e:(0,r.A)(+e),s(),a):t},a}},3968:(t,e,n)=>{"use strict";function r(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,s,u,h,c,l,f,d=t._root,p={data:r},g=t._x0,v=t._y0,y=t._x1,m=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((h=e>=(o=(g+y)/2))?g=o:y=o,(c=n>=(a=(v+m)/2))?v=a:m=a,i=d,!(d=d[l=c<<1|h]))return i[l]=p,t;if(s=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===s&&n===u)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(h=e>=(o=(g+y)/2))?g=o:y=o,(c=n>=(a=(v+m)/2))?v=a:m=a}while((l=c<<1|h)==(f=(u>=a)<<1|s>=o));return i[f]=d,i[l]=p,t}function i(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function o(t){return t[0]}function a(t){return t[1]}function s(t,e,n){var r=new u(null==e?o:e,null==n?a:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function u(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function h(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}n.d(e,{A:()=>s});var c=s.prototype=u.prototype;c.copy=function(){var t,e,n=new u(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=h(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=h(e));return n},c.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return r(this.cover(e,n),e,n,t)},c.addAll=function(t){var e,n,i,o,a=t.length,s=new Array(a),u=new Array(a),h=1/0,c=1/0,l=-1/0,f=-1/0;for(n=0;n<a;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(s[n]=i,u[n]=o,i<h&&(h=i),i>l&&(l=i),o<c&&(c=o),o>f&&(f=o));if(h>l||c>f)return this;for(this.cover(h,c).cover(l,f),n=0;n<a;++n)r(this,s[n],u[n],t[n]);return this},c.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,s,u=i-n||1,h=this._root;n>t||t>=i||r>e||e>=o;)switch(s=(e<r)<<1|t<n,(a=new Array(4))[s]=h,h=a,u*=2,s){case 0:i=n+u,o=r+u;break;case 1:n=i-u,o=r+u;break;case 2:i=n+u,r=o-u;break;case 3:n=i-u,r=o-u}this._root&&this._root.length&&(this._root=h)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},c.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},c.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},c.find=function(t,e,n){var r,o,a,s,u,h,c,l=this._x0,f=this._y0,d=this._x1,p=this._y1,g=[],v=this._root;for(v&&g.push(new i(v,l,f,d,p)),null==n?n=1/0:(l=t-n,f=e-n,d=t+n,p=e+n,n*=n);h=g.pop();)if(!(!(v=h.node)||(o=h.x0)>d||(a=h.y0)>p||(s=h.x1)<l||(u=h.y1)<f))if(v.length){var y=(o+s)/2,m=(a+u)/2;g.push(new i(v[3],y,m,s,u),new i(v[2],o,m,y,u),new i(v[1],y,a,s,m),new i(v[0],o,a,y,m)),(c=(e>=m)<<1|t>=y)&&(h=g[g.length-1],g[g.length-1]=g[g.length-1-c],g[g.length-1-c]=h)}else{var _=t-+this._x.call(null,v.data),w=e-+this._y.call(null,v.data),b=_*_+w*w;if(b<n){var x=Math.sqrt(n=b);l=t-x,f=e-x,d=t+x,p=e+x,r=v.data}}return r},c.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,s,u,h,c,l,f,d=this._root,p=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!d)return this;if(d.length)for(;;){if((h=o>=(s=(p+v)/2))?p=s:v=s,(c=a>=(u=(g+y)/2))?g=u:y=u,e=d,!(d=d[l=c<<1|h]))return this;if(!d.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,f=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[l]=i:delete e[l],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},c.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},c.root=function(){return this._root},c.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},c.visit=function(t){var e,n,r,o,a,s,u=[],h=this._root;for(h&&u.push(new i(h,this._x0,this._y0,this._x1,this._y1));e=u.pop();)if(!t(h=e.node,r=e.x0,o=e.y0,a=e.x1,s=e.y1)&&h.length){var c=(r+a)/2,l=(o+s)/2;(n=h[3])&&u.push(new i(n,c,l,a,s)),(n=h[2])&&u.push(new i(n,r,l,c,s)),(n=h[1])&&u.push(new i(n,c,o,a,l)),(n=h[0])&&u.push(new i(n,r,o,c,l))}return this},c.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var a,s=e.x0,u=e.y0,h=e.x1,c=e.y1,l=(s+h)/2,f=(u+c)/2;(a=o[0])&&n.push(new i(a,s,u,l,f)),(a=o[1])&&n.push(new i(a,l,u,h,f)),(a=o[2])&&n.push(new i(a,s,f,l,c)),(a=o[3])&&n.push(new i(a,l,f,h,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},c.x=function(t){return arguments.length?(this._x=t,this):this._x},c.y=function(t){return arguments.length?(this._y=t,this):this._y}},2474:(t,e,n)=>{"use strict";function r(t){return function(){return this.matches(t)}}function i(t){return function(e){return e.matches(t)}}n.d(e,{A:()=>r,j:()=>i})},5399:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(9538);function i(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),r.A.hasOwnProperty(e)?{space:r.A[e],local:t}:t}},9538:(t,e,n)=>{"use strict";n.d(e,{A:()=>i,g:()=>r});var r="http://www.w3.org/1999/xhtml";const i={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},7566:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(7810);function i(t){return"string"==typeof t?new r.LN([[document.querySelector(t)]],[document.documentElement]):new r.LN([[t]],r.zr)}},7810:(t,e,n)=>{"use strict";n.d(e,{LN:()=>ot,Ay:()=>st,zr:()=>it});var r=n(4715),i=n(3972);var o=n(2474),a=Array.prototype.find;function s(){return this.firstElementChild}var u=Array.prototype.filter;function h(){return Array.from(this.children)}function c(t){return new Array(t.length)}function l(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function f(t,e,n,r,i,o){for(var a,s=0,u=e.length,h=o.length;s<h;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new l(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function d(t,e,n,r,i,o,a){var s,u,h,c=new Map,f=e.length,d=o.length,p=new Array(f);for(s=0;s<f;++s)(u=e[s])&&(p[s]=h=a.call(u,u.__data__,s,e)+"",c.has(h)?i[s]=u:c.set(h,u));for(s=0;s<d;++s)h=a.call(t,o[s],s,o)+"",(u=c.get(h))?(r[s]=u,u.__data__=o[s],c.delete(h)):n[s]=new l(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&c.get(p[s])===u&&(i[s]=u)}function p(t){return t.__data__}function g(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function v(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}l.prototype={constructor:l,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var y=n(5399);function m(t){return function(){this.removeAttribute(t)}}function _(t){return function(){this.removeAttributeNS(t.space,t.local)}}function w(t,e){return function(){this.setAttribute(t,e)}}function b(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function x(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function E(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var k=n(5632);function N(t){return function(){delete this[t]}}function A(t,e){return function(){this[t]=e}}function M(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function O(t){return t.trim().split(/^|\s+/)}function I(t){return t.classList||new P(t)}function P(t){this._node=t,this._names=O(t.getAttribute("class")||"")}function T(t,e){for(var n=I(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function j(t,e){for(var n=I(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function C(t){return function(){T(this,t)}}function S(t){return function(){j(this,t)}}function $(t,e){return function(){(e.apply(this,arguments)?T:j)(this,t)}}function z(){this.textContent=""}function L(t){return function(){this.textContent=t}}function R(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function q(){this.innerHTML=""}function D(t){return function(){this.innerHTML=t}}function V(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function G(){this.nextSibling&&this.parentNode.appendChild(this)}function F(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}P.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Y=n(9538);function B(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Y.g&&e.documentElement.namespaceURI===Y.g?e.createElement(t):e.createElementNS(n,t)}}function X(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function H(t){var e=(0,y.A)(t);return(e.local?X:B)(e)}function W(){return null}function U(){var t=this.parentNode;t&&t.removeChild(this)}function K(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Q(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function J(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Z(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}var tt=n(1382);function et(t,e,n){var r=(0,tt.A)(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function nt(t,e){return function(){return et(this,t,e)}}function rt(t,e){return function(){return et(this,t,e.apply(this,arguments))}}var it=[null];function ot(t,e){this._groups=t,this._parents=e}function at(){return new ot([[document.documentElement]],it)}ot.prototype=at.prototype={constructor:ot,select:function(t){"function"!=typeof t&&(t=(0,r.A)(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var a,s,u=e[o],h=u.length,c=i[o]=new Array(h),l=0;l<h;++l)(a=u[l])&&(s=t.call(a,a.__data__,l,u))&&("__data__"in a&&(s.__data__=a.__data__),c[l]=s);return new ot(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}(t):(0,i.A)(t);for(var e=this._groups,n=e.length,r=[],o=[],a=0;a<n;++a)for(var s,u=e[a],h=u.length,c=0;c<h;++c)(s=u[c])&&(r.push(t.call(s,s.__data__,c,u)),o.push(s));return new ot(r,o)},selectChild:function(t){return this.select(null==t?s:function(t){return function(){return a.call(this.children,t)}}("function"==typeof t?t:(0,o.j)(t)))},selectChildren:function(t){return this.selectAll(null==t?h:function(t){return function(){return u.call(this.children,t)}}("function"==typeof t?t:(0,o.j)(t)))},filter:function(t){"function"!=typeof t&&(t=(0,o.A)(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,s=e[i],u=s.length,h=r[i]=[],c=0;c<u;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&h.push(a);return new ot(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,p);var n,r=e?d:f,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=o.length,s=new Array(a),u=new Array(a),h=new Array(a),c=0;c<a;++c){var l=i[c],v=o[c],y=v.length,m=g(t.call(l,l&&l.__data__,c,i)),_=m.length,w=u[c]=new Array(_),b=s[c]=new Array(_);r(l,v,w,b,h[c]=new Array(y),m,e);for(var x,E,k=0,N=0;k<_;++k)if(x=w[k]){for(k>=N&&(N=k+1);!(E=b[N])&&++N<_;);x._next=E||null}}return(s=new ot(s,i))._enter=u,s._exit=h,s},enter:function(){return new ot(this._enter||this._groups.map(c),this._parents)},exit:function(){return new ot(this._exit||this._groups.map(c),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var h,c=n[u],l=r[u],f=c.length,d=s[u]=new Array(f),p=0;p<f;++p)(h=c[p]||l[p])&&(d[p]=h);for(;u<i;++u)s[u]=n[u];return new ot(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=v);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,h=i[o]=new Array(u),c=0;c<u;++c)(a=s[c])&&(h[c]=a);h.sort(e)}return new ot(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=(0,y.A)(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?_:m:"function"==typeof e?n.local?E:x:n.local?b:w)(n,e))},style:k.A,property:function(t,e){return arguments.length>1?this.each((null==e?N:"function"==typeof e?M:A)(t,e)):this.node()[t]},classed:function(t,e){var n=O(t+"");if(arguments.length<2){for(var r=I(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?$:e?C:S)(n,e))},text:function(t){return arguments.length?this.each(null==t?z:("function"==typeof t?R:L)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?q:("function"==typeof t?V:D)(t)):this.node().innerHTML},raise:function(){return this.each(G)},lower:function(){return this.each(F)},append:function(t){var e="function"==typeof t?t:H(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:H(t),i=null==e?W:"function"==typeof e?e:(0,r.A)(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(U)},clone:function(t){return this.select(t?Q:K)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Z:J,r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,h=0,c=s.length;h<c;++h)for(r=0,u=s[h];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?rt:nt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};const st=at},5632:(t,e,n)=>{"use strict";n.d(e,{A:()=>s,j:()=>u});var r=n(1382);function i(t){return function(){this.style.removeProperty(t)}}function o(t,e,n){return function(){this.style.setProperty(t,e,n)}}function a(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function s(t,e,n){return arguments.length>1?this.each((null==e?i:"function"==typeof e?a:o)(t,e,null==n?"":n)):u(this.node(),t)}function u(t,e){return t.style.getPropertyValue(e)||(0,r.A)(t).getComputedStyle(t,null).getPropertyValue(e)}},4715:(t,e,n)=>{"use strict";function r(){}function i(t){return null==t?r:function(){return this.querySelector(t)}}n.d(e,{A:()=>i})},3972:(t,e,n)=>{"use strict";function r(){return[]}function i(t){return null==t?r:function(){return this.querySelectorAll(t)}}n.d(e,{A:()=>i})},1382:(t,e,n)=>{"use strict";function r(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}n.d(e,{A:()=>r})},4234:(t,e,n)=>{"use strict";n.d(e,{M4:()=>v,O1:()=>y,tB:()=>p});var r,i,o=0,a=0,s=0,u=1e3,h=0,c=0,l=0,f="object"==typeof performance&&performance.now?performance:Date,d="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function p(){return c||(d(g),c=f.now()+l)}function g(){c=0}function v(){this._call=this._time=this._next=null}function y(t,e,n){var r=new v;return r.restart(t,e,n),r}function m(){c=(h=f.now())+l,o=a=0;try{!function(){p(),++o;for(var t,e=r;e;)(t=c-e._time)>=0&&e._call.call(void 0,t),e=e._next;--o}()}finally{o=0,function(){for(var t,e,n=r,o=1/0;n;)n._call?(o>n._time&&(o=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:r=e);i=t,w(o)}(),c=0}}function _(){var t=f.now(),e=t-h;e>u&&(l-=e,h=t)}function w(t){o||(a&&(a=clearTimeout(a)),t-c>24?(t<1/0&&(a=setTimeout(m,t-f.now()-l)),s&&(s=clearInterval(s))):(s||(h=f.now(),s=setInterval(_,u)),o=1,d(m)))}v.prototype=y.prototype={constructor:v,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?p():+n)+(null==e?0:+e),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=n,w()},stop:function(){this._call&&(this._call=null,this._time=1/0,w())}}},9047:(t,e,n)=>{"use strict";n.d(e,{uV:()=>Te,s_:()=>Ve});var r=n(6514),i=n(7566);const o={capture:!0,passive:!1};function a(t){t.preventDefault(),t.stopImmediatePropagation()}function s(t){return((t=Math.exp(t))+1/t)/2}const u=function t(e,n,r){function i(t,i){var o,a,u=t[0],h=t[1],c=t[2],l=i[0],f=i[1],d=i[2],p=l-u,g=f-h,v=p*p+g*g;if(v<1e-12)a=Math.log(d/c)/e,o=function(t){return[u+t*p,h+t*g,c*Math.exp(e*t*a)]};else{var y=Math.sqrt(v),m=(d*d-c*c+r*v)/(2*c*n*y),_=(d*d-c*c-r*v)/(2*d*n*y),w=Math.log(Math.sqrt(m*m+1)-m),b=Math.log(Math.sqrt(_*_+1)-_);a=(b-w)/e,o=function(t){var r,i=t*a,o=s(w),l=c/(n*y)*(o*(r=e*i+w,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(w));return[u+l*p,h+l*g,c*o/s(e*i+w)]}}return o.duration=1e3*a*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function h(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}var c=n(7810),l=n(4234);function f(t,e,n){var r=new l.M4;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}var d=(0,r.A)("start","end","cancel","interrupt"),p=[],g=0,v=2,y=3,m=5,_=6;function w(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var h,c,l,d;if(1!==n.state)return s();for(h in i)if((d=i[h]).name===n.name){if(d.state===y)return f(o);4===d.state?(d.state=_,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[h]):+h<e&&(d.state=_,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[h])}if(f((function(){n.state===y&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=v,n.on.call("start",t,t.__data__,n.index,n.group),n.state===v){for(n.state=y,r=new Array(l=n.tween.length),h=0,c=-1;h<l;++h)(d=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=d);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=m,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);n.state===m&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=_,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=(0,l.O1)((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:d,tween:p,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:g})}function b(t,e){var n=E(t,e);if(n.state>g)throw new Error("too late; already scheduled");return n}function x(t,e){var n=E(t,e);if(n.state>y)throw new Error("too late; already running");return n}function E(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function k(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>v&&n.state<m,n.state=_,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}function N(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var A,M=180/Math.PI,O={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function I(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*M,skewX:Math.atan(u)*M,scaleX:a,scaleY:s}}function P(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:N(t,i)},{i:u-2,x:N(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:N(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:N(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:N(t,n)},{i:s-2,x:N(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var T=P((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?O:I(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),j=P((function(t){return null==t?O:(A||(A=document.createElementNS("http://www.w3.org/2000/svg","g")),A.setAttribute("transform",t),(t=A.transform.baseVal.consolidate())?I((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):O)}),", ",")",")"),C=n(5399);function S(t,e){var n,r;return function(){var i=x(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function $(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=x(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,h=i.length;u<h;++u)if(i[u].name===e){i[u]=s;break}u===h&&i.push(s)}o.tween=i}}function z(t,e,n){var r=t._id;return t.each((function(){var t=x(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return E(t,r).value[e]}}function L(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function R(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function q(){}var D=.7,V=1/D,G="\\s*([+-]?\\d+)\\s*",F="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Y="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",B=/^#([0-9a-f]{3,8})$/,X=new RegExp(`^rgb\\(${G},${G},${G}\\)$`),H=new RegExp(`^rgb\\(${Y},${Y},${Y}\\)$`),W=new RegExp(`^rgba\\(${G},${G},${G},${F}\\)$`),U=new RegExp(`^rgba\\(${Y},${Y},${Y},${F}\\)$`),K=new RegExp(`^hsl\\(${F},${Y},${Y}\\)$`),Q=new RegExp(`^hsla\\(${F},${Y},${Y},${F}\\)$`),J={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Z(){return this.rgb().formatHex()}function tt(){return this.rgb().formatRgb()}function et(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=B.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?nt(e):3===n?new it(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=X.exec(t))?new it(e[1],e[2],e[3],1):(e=H.exec(t))?new it(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=W.exec(t))?rt(e[1],e[2],e[3],e[4]):(e=U.exec(t))?rt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=K.exec(t))?ct(e[1],e[2]/100,e[3]/100,1):(e=Q.exec(t))?ct(e[1],e[2]/100,e[3]/100,e[4]):J.hasOwnProperty(t)?nt(J[t]):"transparent"===t?new it(NaN,NaN,NaN,0):null}function nt(t){return new it(t>>16&255,t>>8&255,255&t,1)}function rt(t,e,n,r){return r<=0&&(t=e=n=NaN),new it(t,e,n,r)}function it(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ot(){return`#${ht(this.r)}${ht(this.g)}${ht(this.b)}`}function at(){const t=st(this.opacity);return`${1===t?"rgb(":"rgba("}${ut(this.r)}, ${ut(this.g)}, ${ut(this.b)}${1===t?")":`, ${t})`}`}function st(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ut(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ht(t){return((t=ut(t))<16?"0":"")+t.toString(16)}function ct(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ft(t,e,n,r)}function lt(t){if(t instanceof ft)return new ft(t.h,t.s,t.l,t.opacity);if(t instanceof q||(t=et(t)),!t)return new ft;if(t instanceof ft)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new ft(a,s,u,t.opacity)}function ft(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function dt(t){return(t=(t||0)%360)<0?t+360:t}function pt(t){return Math.max(0,Math.min(1,t||0))}function gt(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function vt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function yt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function mt(){}L(q,et,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Z,formatHex:Z,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return lt(this).formatHsl()},formatRgb:tt,toString:tt}),L(it,(function(t,e,n,r){return 1===arguments.length?((i=t)instanceof q||(i=et(i)),i?new it((i=i.rgb()).r,i.g,i.b,i.opacity):new it):new it(t,e,n,null==r?1:r);var i}),R(q,{brighter(t){return t=null==t?V:Math.pow(V,t),new it(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?D:Math.pow(D,t),new it(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new it(ut(this.r),ut(this.g),ut(this.b),st(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ot,formatHex:ot,formatHex8:function(){return`#${ht(this.r)}${ht(this.g)}${ht(this.b)}${ht(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:at,toString:at})),L(ft,(function(t,e,n,r){return 1===arguments.length?lt(t):new ft(t,e,n,null==r?1:r)}),R(q,{brighter(t){return t=null==t?V:Math.pow(V,t),new ft(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?D:Math.pow(D,t),new ft(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new it(gt(t>=240?t-240:t+120,i,r),gt(t,i,r),gt(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new ft(dt(this.h),pt(this.s),pt(this.l),st(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=st(this.opacity);return`${1===t?"hsl(":"hsla("}${dt(this.h)}, ${100*pt(this.s)}%, ${100*pt(this.l)}%${1===t?")":`, ${t})`}`}}));var _t=.7,wt=1/_t,bt="\\s*([+-]?\\d+)\\s*",xt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Et="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kt=/^#([0-9a-f]{3,8})$/,Nt=new RegExp(`^rgb\\(${bt},${bt},${bt}\\)$`),At=new RegExp(`^rgb\\(${Et},${Et},${Et}\\)$`),Mt=new RegExp(`^rgba\\(${bt},${bt},${bt},${xt}\\)$`),Ot=new RegExp(`^rgba\\(${Et},${Et},${Et},${xt}\\)$`),It=new RegExp(`^hsl\\(${xt},${Et},${Et}\\)$`),Pt=new RegExp(`^hsla\\(${xt},${Et},${Et},${xt}\\)$`),Tt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function jt(){return this.rgb().formatHex()}function Ct(){return this.rgb().formatRgb()}function St(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=kt.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?$t(e):3===n?new Rt(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?zt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?zt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Nt.exec(t))?new Rt(e[1],e[2],e[3],1):(e=At.exec(t))?new Rt(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Mt.exec(t))?zt(e[1],e[2],e[3],e[4]):(e=Ot.exec(t))?zt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=It.exec(t))?Yt(e[1],e[2]/100,e[3]/100,1):(e=Pt.exec(t))?Yt(e[1],e[2]/100,e[3]/100,e[4]):Tt.hasOwnProperty(t)?$t(Tt[t]):"transparent"===t?new Rt(NaN,NaN,NaN,0):null}function $t(t){return new Rt(t>>16&255,t>>8&255,255&t,1)}function zt(t,e,n,r){return r<=0&&(t=e=n=NaN),new Rt(t,e,n,r)}function Lt(t,e,n,r){return 1===arguments.length?((i=t)instanceof mt||(i=St(i)),i?new Rt((i=i.rgb()).r,i.g,i.b,i.opacity):new Rt):new Rt(t,e,n,null==r?1:r);var i}function Rt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function qt(){return`#${Ft(this.r)}${Ft(this.g)}${Ft(this.b)}`}function Dt(){const t=Vt(this.opacity);return`${1===t?"rgb(":"rgba("}${Gt(this.r)}, ${Gt(this.g)}, ${Gt(this.b)}${1===t?")":`, ${t})`}`}function Vt(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Gt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ft(t){return((t=Gt(t))<16?"0":"")+t.toString(16)}function Yt(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Xt(t,e,n,r)}function Bt(t){if(t instanceof Xt)return new Xt(t.h,t.s,t.l,t.opacity);if(t instanceof mt||(t=St(t)),!t)return new Xt;if(t instanceof Xt)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Xt(a,s,u,t.opacity)}function Xt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ht(t){return(t=(t||0)%360)<0?t+360:t}function Wt(t){return Math.max(0,Math.min(1,t||0))}function Ut(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Kt(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}vt(mt,St,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:jt,formatHex:jt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Bt(this).formatHsl()},formatRgb:Ct,toString:Ct}),vt(Rt,Lt,yt(mt,{brighter(t){return t=null==t?wt:Math.pow(wt,t),new Rt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?_t:Math.pow(_t,t),new Rt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Rt(Gt(this.r),Gt(this.g),Gt(this.b),Vt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:qt,formatHex:qt,formatHex8:function(){return`#${Ft(this.r)}${Ft(this.g)}${Ft(this.b)}${Ft(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Dt,toString:Dt})),vt(Xt,(function(t,e,n,r){return 1===arguments.length?Bt(t):new Xt(t,e,n,null==r?1:r)}),yt(mt,{brighter(t){return t=null==t?wt:Math.pow(wt,t),new Xt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?_t:Math.pow(_t,t),new Xt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Rt(Ut(t>=240?t-240:t+120,i,r),Ut(t,i,r),Ut(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Xt(Ht(this.h),Wt(this.s),Wt(this.l),Vt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Vt(this.opacity);return`${1===t?"hsl(":"hsla("}${Ht(this.h)}, ${100*Wt(this.s)}%, ${100*Wt(this.l)}%${1===t?")":`, ${t})`}`}}));const Qt=t=>()=>t;function Jt(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Qt(isNaN(t)?e:t)}const Zt=function t(e){var n=function(t){return 1==(t=+t)?Jt:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Qt(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Lt(t)).r,(e=Lt(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Jt(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function te(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Lt(e[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=t(o),a=t(a),s=t(s),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=s(t),r+""}}}te((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return Kt((n-r/e)*e,a,i,o,s)}})),te((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return Kt((n-r/e)*e,i,o,a,s)}}));var ee=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ne=new RegExp(ee.source,"g");function re(t,e){var n,r,i,o=ee.lastIndex=ne.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=ee.exec(t))&&(r=ne.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:N(n,r)})),o=ne.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function ie(t,e){var n;return("number"==typeof e?N:e instanceof et?Zt:(n=et(e))?(e=n,Zt):re)(t,e)}function oe(t){return function(){this.removeAttribute(t)}}function ae(t){return function(){this.removeAttributeNS(t.space,t.local)}}function se(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function ue(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function he(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function ce(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function le(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function fe(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function de(t,e){return function(){b(this,t).delay=+e.apply(this,arguments)}}function pe(t,e){return e=+e,function(){b(this,t).delay=e}}function ge(t,e){return function(){x(this,t).duration=+e.apply(this,arguments)}}function ve(t,e){return e=+e,function(){x(this,t).duration=e}}var ye=n(2474),me=n(4715),_e=n(3972),we=c.Ay.prototype.constructor,be=n(5632);function xe(t){return function(){this.style.removeProperty(t)}}var Ee=0;function ke(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ne(){return++Ee}var Ae=c.Ay.prototype;ke.prototype=function(t){return(0,c.Ay)().transition(t)}.prototype={constructor:ke,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=(0,me.A)(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,h=r[a],c=h.length,l=o[a]=new Array(c),f=0;f<c;++f)(s=h[f])&&(u=t.call(s,s.__data__,f,h))&&("__data__"in s&&(u.__data__=s.__data__),l[f]=u,w(l[f],e,n,f,l,E(s,n)));return new ke(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=(0,_e.A)(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,h=r[s],c=h.length,l=0;l<c;++l)if(u=h[l]){for(var f,d=t.call(u,u.__data__,l,h),p=E(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&w(f,e,n,g,d,p);o.push(d),a.push(u)}return new ke(o,a,e,n)},selectChild:Ae.selectChild,selectChildren:Ae.selectChildren,filter:function(t){"function"!=typeof t&&(t=(0,ye.A)(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],h=0;h<s;++h)(o=a[h])&&t.call(o,o.__data__,h,a)&&u.push(o);return new ke(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,h=e[s],c=n[s],l=h.length,f=a[s]=new Array(l),d=0;d<l;++d)(u=h[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new ke(a,this._parents,this._name,this._id)},selection:function(){return new we(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ne(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,h=0;h<u;++h)if(a=s[h]){var c=E(a,e);w(a,t,n,h,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new ke(r,this._parents,t,n)},call:Ae.call,nodes:Ae.nodes,node:Ae.node,size:Ae.size,empty:Ae.empty,each:Ae.each,on:function(t,e){var n=this._id;return arguments.length<2?E(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?b:x;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=(0,C.A)(t),r="transform"===n?j:ie;return this.attrTween(t,"function"==typeof e?(n.local?ce:he)(n,r,z(this,"attr."+t,e)):null==e?(n.local?ae:oe)(n):(n.local?ue:se)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=(0,C.A)(t);return this.tween(n,(r.local?le:fe)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?T:ie;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=(0,be.j)(this,t),a=(this.style.removeProperty(t),(0,be.j)(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,xe(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=(0,be.j)(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=(0,be.j)(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,z(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=x(this,t),h=u.on,c=null==u.value[a]?o||(o=xe(e)):void 0;h===n&&i===c||(r=(n=h).copy()).on(s,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=(0,be.j)(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(z(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=E(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?S:$)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?de:pe)(e,t)):E(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ge:ve)(e,t)):E(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){x(this,t).ease=e}}(e,t)):E(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;x(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=x(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:Ae[Symbol.iterator]};var Me={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Oe(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}c.Ay.prototype.interrupt=function(t){return this.each((function(){k(this,t)}))},c.Ay.prototype.transition=function(t){var e,n;t instanceof ke?(e=t._id,t=t._name):(e=Ne(),(n=Me).time=(0,l.tB)(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,h=0;h<u;++h)(a=s[h])&&w(a,t,e,h,s,n||Oe(a,e));return new ke(r,this._parents,t,e)};const Ie=t=>()=>t;function Pe(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Te(t,e,n){this.k=t,this.x=e,this.y=n}Te.prototype={constructor:Te,scale:function(t){return 1===t?this:new Te(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Te(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var je=new Te(1,0,0);function Ce(t){t.stopImmediatePropagation()}function Se(t){t.preventDefault(),t.stopImmediatePropagation()}function $e(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function ze(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Le(){return this.__zoom||je}function Re(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function qe(){return navigator.maxTouchPoints||"ontouchstart"in this}function De(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Ve(){var t,e,n,s=$e,c=ze,l=De,f=Re,d=qe,p=[0,1/0],g=[[-1/0,-1/0],[1/0,1/0]],v=250,y=u,m=(0,r.A)("start","zoom","end"),_=500,w=150,b=0,x=10;function E(t){t.property("__zoom",Le).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",C).filter(d).on("touchstart.zoom",S).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function N(t,e){return(e=Math.max(p[0],Math.min(p[1],e)))===t.k?t:new Te(e,t.x,t.y)}function A(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new Te(t.k,r,i)}function M(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function O(t,e,n,r){t.on("start.zoom",(function(){I(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){I(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,i=arguments,o=I(t,i).event(r),a=c.apply(t,i),s=null==n?M(a):"function"==typeof n?n.apply(t,i):n,u=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),h=t.__zoom,l="function"==typeof e?e.apply(t,i):e,f=y(h.invert(s).concat(u/h.k),l.invert(s).concat(u/l.k));return function(t){if(1===t)t=l;else{var e=f(t),n=u/e[2];t=new Te(n,s[0]-e[0]*n,s[1]-e[1]*n)}o.zoom(null,t)}}))}function I(t,e,n){return!n&&t.__zooming||new P(t,e)}function P(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=c.apply(t,e),this.taps=0}function T(t,...e){if(s.apply(this,arguments)){var n=I(this,e).event(t),r=this.__zoom,i=Math.max(p[0],Math.min(p[1],r.k*Math.pow(2,f.apply(this,arguments)))),o=h(t);if(n.wheel)n.mouse[0][0]===o[0]&&n.mouse[0][1]===o[1]||(n.mouse[1]=r.invert(n.mouse[0]=o)),clearTimeout(n.wheel);else{if(r.k===i)return;n.mouse=[o,r.invert(o)],k(this),n.start()}Se(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),w),n.zoom("mouse",l(A(N(r,i),n.mouse[0],n.mouse[1]),n.extent,g))}}function j(t,...e){if(!n&&s.apply(this,arguments)){var r=t.currentTarget,u=I(this,e,!0).event(t),c=(0,i.A)(t.view).on("mousemove.zoom",(function(t){if(Se(t),!u.moved){var e=t.clientX-d,n=t.clientY-p;u.moved=e*e+n*n>b}u.event(t).zoom("mouse",l(A(u.that.__zoom,u.mouse[0]=h(t,r),u.mouse[1]),u.extent,g))}),!0).on("mouseup.zoom",(function(t){c.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,r=(0,i.A)(t).on("dragstart.drag",null);e&&(r.on("click.drag",a,o),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,u.moved),Se(t),u.event(t).end()}),!0),f=h(t,r),d=t.clientX,p=t.clientY;!function(t){var e=t.document.documentElement,n=(0,i.A)(t).on("dragstart.drag",a,o);"onselectstart"in e?n.on("selectstart.drag",a,o):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),Ce(t),u.mouse=[f,this.__zoom.invert(f)],k(this),u.start()}}function C(t,...e){if(s.apply(this,arguments)){var n=this.__zoom,r=h(t.changedTouches?t.changedTouches[0]:t,this),o=n.invert(r),a=n.k*(t.shiftKey?.5:2),u=l(A(N(n,a),r,o),c.apply(this,e),g);Se(t),v>0?(0,i.A)(this).transition().duration(v).call(O,u,r,t):(0,i.A)(this).call(E.transform,u,r,t)}}function S(n,...r){if(s.apply(this,arguments)){var i,o,a,u,c=n.touches,l=c.length,f=I(this,r,n.changedTouches.length===l).event(n);for(Ce(n),o=0;o<l;++o)u=[u=h(a=c[o],this),this.__zoom.invert(u),a.identifier],f.touch0?f.touch1||f.touch0[2]===u[2]||(f.touch1=u,f.taps=0):(f.touch0=u,i=!0,f.taps=1+!!t);t&&(t=clearTimeout(t)),i&&(f.taps<2&&(e=u[0],t=setTimeout((function(){t=null}),_)),k(this),f.start())}}function $(t,...e){if(this.__zooming){var n,r,i,o,a=I(this,e).event(t),s=t.changedTouches,u=s.length;for(Se(t),n=0;n<u;++n)i=h(r=s[n],this),a.touch0&&a.touch0[2]===r.identifier?a.touch0[0]=i:a.touch1&&a.touch1[2]===r.identifier&&(a.touch1[0]=i);if(r=a.that.__zoom,a.touch1){var c=a.touch0[0],f=a.touch0[1],d=a.touch1[0],p=a.touch1[1],v=(v=d[0]-c[0])*v+(v=d[1]-c[1])*v,y=(y=p[0]-f[0])*y+(y=p[1]-f[1])*y;r=N(r,Math.sqrt(v/y)),i=[(c[0]+d[0])/2,(c[1]+d[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!a.touch0)return;i=a.touch0[0],o=a.touch0[1]}a.zoom("touch",l(A(r,i,o),a.extent,g))}}function z(t,...r){if(this.__zooming){var o,a,s=I(this,r).event(t),u=t.changedTouches,c=u.length;for(Ce(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),_),o=0;o<c;++o)a=u[o],s.touch0&&s.touch0[2]===a.identifier?delete s.touch0:s.touch1&&s.touch1[2]===a.identifier&&delete s.touch1;if(s.touch1&&!s.touch0&&(s.touch0=s.touch1,delete s.touch1),s.touch0)s.touch0[1]=this.__zoom.invert(s.touch0[0]);else if(s.end(),2===s.taps&&(a=h(a,this),Math.hypot(e[0]-a[0],e[1]-a[1])<x)){var l=(0,i.A)(this).on("dblclick.zoom");l&&l.apply(this,arguments)}}}return E.transform=function(t,e,n,r){var i=t.selection?t.selection():t;i.property("__zoom",Le),t!==i?O(t,e,n,r):i.interrupt().each((function(){I(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},E.scaleBy=function(t,e,n,r){E.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,r)},E.scaleTo=function(t,e,n,r){E.transform(t,(function(){var t=c.apply(this,arguments),r=this.__zoom,i=null==n?M(t):"function"==typeof n?n.apply(this,arguments):n,o=r.invert(i),a="function"==typeof e?e.apply(this,arguments):e;return l(A(N(r,a),i,o),t,g)}),n,r)},E.translateBy=function(t,e,n,r){E.transform(t,(function(){return l(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),c.apply(this,arguments),g)}),null,r)},E.translateTo=function(t,e,n,r,i){E.transform(t,(function(){var t=c.apply(this,arguments),i=this.__zoom,o=null==r?M(t):"function"==typeof r?r.apply(this,arguments):r;return l(je.translate(o[0],o[1]).scale(i.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,g)}),r,i)},P.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=(0,i.A)(this.that).datum();m.call(t,this.that,new Pe(t,{sourceEvent:this.sourceEvent,target:E,type:t,transform:this.that.__zoom,dispatch:m}),e)}},E.wheelDelta=function(t){return arguments.length?(f="function"==typeof t?t:Ie(+t),E):f},E.filter=function(t){return arguments.length?(s="function"==typeof t?t:Ie(!!t),E):s},E.touchable=function(t){return arguments.length?(d="function"==typeof t?t:Ie(!!t),E):d},E.extent=function(t){return arguments.length?(c="function"==typeof t?t:Ie([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),E):c},E.scaleExtent=function(t){return arguments.length?(p[0]=+t[0],p[1]=+t[1],E):[p[0],p[1]]},E.translateExtent=function(t){return arguments.length?(g[0][0]=+t[0][0],g[1][0]=+t[1][0],g[0][1]=+t[0][1],g[1][1]=+t[1][1],E):[[g[0][0],g[0][1]],[g[1][0],g[1][1]]]},E.constrain=function(t){return arguments.length?(l=t,E):l},E.duration=function(t){return arguments.length?(v=+t,E):v},E.interpolate=function(t){return arguments.length?(y=t,E):y},E.on=function(){var t=m.on.apply(m,arguments);return t===m?E:t},E.clickDistance=function(t){return arguments.length?(b=(t=+t)*t,E):Math.sqrt(b)},E.tapDistance=function(t){return arguments.length?(x=+t,E):x},E}Te.prototype}}]);
3
- //# sourceMappingURL=3489.e0ce6106.js.map
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[3933,6314],{3933:(e,t,o)=>{function n(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,s){if("string"==typeof t?r.name===t:t.includes(r.name)){const t=[];for(let i=1;i<=o;i++){const o=s[s.length-i];if("MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key){const s=o.node;s.computed||"Identifier"!==s.property.type?s.computed&&"Literal"===s.property.type&&"string"==typeof s.property.value?t.push(n?`${r.name}.${s.property.value}`:s.property.value):e.hasNonStaticUsage=!0:t.push(n?`${r.name}.${s.property.name}`:s.property.name)}else e.hasNonStaticUsage=!0}t.length===o&&e.usedProperties.add(t.join("."))}}}function r(e,t){return function(o,n,r){if(n.name===e){const e=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?o.usedArgs.add(t.value):o.hasNonStaticUsage=!0}}}}}o.r(t),o.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>s,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>S,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>v,strictCollectMemberUsage:()=>l,track:()=>f,trackAll:()=>y,traverseStoryboardExpressions:()=>u,traverseStoryboardFunction:()=>g,traverseStoryboardFunctions:()=>h,unwrapProvider:()=>c.unwrapProvider});const s=r("APP","getMenu"),i=r("INSTALLED_APPS","has");var a=o(8897),c=o(279);function u(e,t,o){const n=new WeakSet,{matchExpressionString:r,visitNotMatchedExpressionString:s,visitNonExpressionString:i,visitObject:u}="string"==typeof o?{matchExpressionString:e=>e.includes(o)}:o;!function e(o){if("string"==typeof o)if((0,a.isEvaluable)(o))if(r(o))try{(0,a.preevaluate)(o,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,o)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==s||s(o);else null==i||i(o);else if((0,c.isObject)(o)){if(n.has(o))return;n.add(o),null==u||u(o);for(const t of Array.isArray(o)?o:Object.values(o))e(t)}}(e)}function l(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:r,usedProperties:s}=p(e,t,o);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${r}"`);return s}function p(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={usedProperties:new Set,hasNonStaticUsage:!1},s=n(r,t,o);return u(e,((e,t,o)=>{s(e,t),r.hasNonStaticUsage&&(r.nonStaticUsage=o)}),t),r}const d=["CTX","STATE","FORM_STATE"];function f(e,t,o){if(e.includes(t)){const r={usedProperties:new Set,hasNonStaticUsage:!1},{expression:s}=(0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(r,o)}});let i;if("SequenceExpression"===s.type&&(i=s.expressions[0])&&"Literal"===i.type&&i.value===t){if(r.usedProperties.size>0)return r.usedProperties;console.warn(`You are using "${t}" but no \`${o}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function y(e){if(d.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,d,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],o={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,r]=e.split(".");o[n[t]]||(o[n[t]]=[]),o[n[t]].push(r)})),o}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function h(e,t,o){if(Array.isArray(e))for(const n of e)null!=o&&o.matchSource&&!o.matchSource(n.source)||g(n,t)}function g(e,t,o){try{(0,a.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){o||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function S(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&g(e,n(s,t,r),o),s.hasNonStaticUsage&&!o)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return s.usedProperties.delete(e.name),s.usedProperties}const m="PERMISSIONS",b="check";function v(e){const t=new Set,o=k(t),{customTemplates:n,functions:r}=e.meta??{};return u([e.routes,n],o,m),h(r,o,{matchSource:e=>e.includes(m)}),Array.from(t)}function P(e){const t=new Set;return u(e,k(t),m),Array.from(t)}function k(e){return function(t,o){if(t.name===m){const t=o[o.length-1],n=o[o.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===b:"Identifier"===t.node.property.type&&t.node.property.name===b))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}}}]);
2
- //# sourceMappingURL=3933.e4f7efe6.js.map
@@ -1,3 +0,0 @@
1
- /*! For license information please see 4017.2680d65a.js.LICENSE.txt */
2
- "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[4017,8939],{9711:(e,t,n)=>{n.r(t);var a,i=n(4635),s=n(918),l=n(6902),o=n(5536),r=n(6121),h=n(829),c=n(2740),d=n(8769),u=n.n(d),p=n(4782),g=n(1389),A=(n(6477),n(7566)),f=n(9047),y=n(3373),v=n.n(y),b=n(1030),m=n(9126),k=n(8892),w=n(5157),_=n(8308),x=n(9576),M=n(9137),C=n(2547),E=n(1803),N=n(3739),W=n(9191),T=n(6671),R=n(8060),S=n(2448),z=n(8657),$=n(8069),L=n(1324),B=n(821),D=n(9741),P=n(2673),O=n(5987);let H,I,K,U,Y,V,j,X,q,F,Z,J,G,Q,ee,te,ne,ae,ie,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe;const{defineElement:He,property:Ie,event:Ke,method:Ue}=(0,p.createDecorators)(),Ye=(0,d.forwardRef)(wt);let Ve;var je=new WeakMap,Xe=new WeakMap,qe=new WeakMap,Fe=new WeakMap,Ze=new WeakMap,Je=new WeakMap,Ge=new WeakMap,Qe=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,at=new WeakMap,it=new WeakMap,st=new WeakMap,lt=new WeakMap,ot=new WeakSet,rt=new WeakMap,ht=new WeakMap,ct=new WeakMap,dt=new WeakMap,ut=new WeakMap,pt=new WeakMap,gt=new WeakMap,At=new WeakMap,ft=new WeakMap,yt=new WeakMap,vt=new WeakMap,bt=new WeakMap,mt=new WeakMap;class kt extends g.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,ot),(0,s.A)(this,je,(H(this),K(this))),(0,s.A)(this,Xe,(U(this),Y(this))),(0,s.A)(this,qe,(V(this),j(this))),(0,s.A)(this,Fe,(X(this),q(this))),(0,s.A)(this,Ze,(F(this),Z(this))),(0,s.A)(this,Je,(J(this),G(this))),(0,s.A)(this,Ge,(Q(this),ee(this))),(0,s.A)(this,Qe,(te(this),ne(this))),(0,s.A)(this,et,(ae(this),ie(this))),(0,s.A)(this,tt,(se(this),le(this))),(0,s.A)(this,nt,(oe(this),re(this,!0))),(0,s.A)(this,at,(he(this),ce(this,!0))),(0,s.A)(this,it,(de(this),ue(this,!0))),(0,s.A)(this,st,(pe(this),ge(this))),(0,s.A)(this,lt,(Ae(this),fe(this))),(0,s.A)(this,rt,(be(this),e=>{(0,o.A)(ot,this,ye).emit(e)})),(0,s.A)(this,ht,me(this)),(0,s.A)(this,ct,(_e(this),e=>{(0,o.A)(ot,this,ke).emit(e)})),(0,s.A)(this,dt,xe(this)),(0,s.A)(this,ut,(Ee(this),e=>{(0,o.A)(ot,this,Me).emit(e)})),(0,s.A)(this,pt,Ne(this)),(0,s.A)(this,gt,(Re(this),e=>{(0,o.A)(ot,this,We).emit(e)})),(0,s.A)(this,At,Se(this)),(0,s.A)(this,ft,(Le(this),e=>{(0,o.A)(ot,this,ze).emit(e)})),(0,s.A)(this,yt,Be(this)),(0,s.A)(this,vt,(Oe(this),e=>{(0,o.A)(ot,this,De).emit(e)})),(0,s.A)(this,bt,(e=>{(0,P.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,s.A)(this,mt,(0,d.createRef)())}get layout(){return(0,h.A)(je,this)}set layout(e){(0,r.A)(je,this,e)}get nodes(){return(0,h.A)(Xe,this)}set nodes(e){(0,r.A)(Xe,this,e)}get edges(){return(0,h.A)(qe,this)}set edges(e){(0,r.A)(qe,this,e)}get nodeBricks(){return(0,h.A)(Fe,this)}set nodeBricks(e){(0,r.A)(Fe,this,e)}get lines(){return(0,h.A)(Ze,this)}set lines(e){(0,r.A)(Ze,this,e)}get layoutOptions(){return(0,h.A)(Je,this)}set layoutOptions(e){(0,r.A)(Je,this,e)}get activeTarget(){return(0,h.A)(Ge,this)}set activeTarget(e){(0,r.A)(Ge,this,e)}get disableKeyboardAction(){return(0,h.A)(Qe,this)}set disableKeyboardAction(e){(0,r.A)(Qe,this,e)}get connectNodes(){return(0,h.A)(et,this)}set connectNodes(e){(0,r.A)(et,this,e)}get dragNodes(){return(0,h.A)(tt,this)}set dragNodes(e){(0,r.A)(tt,this,e)}get zoomable(){return(0,h.A)(nt,this)}set zoomable(e){(0,r.A)(nt,this,e)}get scrollable(){return(0,h.A)(at,this)}set scrollable(e){(0,r.A)(at,this,e)}get pannable(){return(0,h.A)(it,this)}set pannable(e){(0,r.A)(it,this,e)}get scaleRange(){return(0,h.A)(st,this)}set scaleRange(e){(0,r.A)(st,this,e)}callOnLineLabel(e,t){for(var n,a=arguments.length,i=new Array(a>2?a-2:0),s=2;s<a;s++)i[s-2]=arguments[s];null===(n=(0,h.A)(mt,this).current)||void 0===n||n.callOnLineLabel(e,t,...i)}render(){return u().createElement(Ye,{ref:(0,h.A)(mt,this),layout:this.layout,nodes:this.nodes,edges:this.edges,nodeBricks:this.nodeBricks,lines:this.lines,layoutOptions:this.layoutOptions,connectNodes:this.connectNodes,dragNodes:this.dragNodes,activeTarget:this.activeTarget,disableKeyboardAction:this.disableKeyboardAction,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:(0,h.A)(rt,this),onSwitchActiveTarget:(0,h.A)(bt,this),onNodeDelete:(0,h.A)(ct,this),onEdgeDelete:(0,h.A)(ut,this),onLineClick:(0,h.A)(gt,this),onLineDoubleClick:(0,h.A)(ft,this),onNodesConnect:(0,h.A)(vt,this)})}}function wt(e,t){let{layout:n,nodes:a,edges:i,nodeBricks:s,lines:l,layoutOptions:o,connectNodes:r,dragNodes:h,activeTarget:c,disableKeyboardAction:p,zoomable:g,scrollable:y,pannable:B,scaleRange:H,onActiveTargetChange:I,onSwitchActiveTarget:K,onNodeDelete:U,onEdgeDelete:Y,onLineClick:V,onLineDoubleClick:j,onNodesConnect:X}=e;const[q,F]=(0,d.useState)(!1),[Z,J]=(0,d.useState)(0),[G,Q]=(0,d.useState)(null),[ee,te]=(0,d.useState)(!1),[ne,ae]=(0,d.useState)(0),[ie,se]=(0,d.useState)(null),[le,oe]=(0,d.useState)([]),[re,he]=(0,d.useState)(!1),[ce,de]=(0,d.useState)({k:1,x:0,y:0}),ue=(0,d.useRef)(new Map),pe=(0,d.useRef)(null),ge=(0,d.useRef)(null),[Ae,fe]=(0,d.useState)(!1),{userViewReady:ye,userViewNodesMap:ve,saveUserView:be}=(0,D._)(null==h?void 0:h.save),[me,ke]=(0,d.useState)([0,0]),[we,_e]=(0,d.useState)(null),[xe,Me]=(0,d.useState)("initial"),[Ce,Ee]=(0,d.useState)(null);(0,d.useImperativeHandle)(t,(()=>({callOnLineLabel(e,t){for(var n,a=arguments.length,i=new Array(a>2?a-2:0),s=2;s<a;s++)i[s-2]=arguments[s];null==ie||null===(n=ie.get(e))||void 0===n||null===(n=n.firstElementChild)||void 0===n||n[t](...i)}}))),(0,d.useEffect)((()=>{const e=e=>{(0,S.P)(e,{nodes:a,nodesRefRepository:G,connectNodes:r,dragNodes:h,scale:ce.k,setConnectLineState:_e,setConnectLineTo:ke,setManualLayoutStatus:Me,setNodeMovement:Ee,onSwitchActiveTarget:K,onNodesConnect:X})},t=ge.current;return null==t||t.addEventListener("mousedown",e),()=>{null==t||t.removeEventListener("mousedown",e)}}),[a,r,h,ce.k,G,X,K]);const{normalizedLines:Ne,normalizedLinesMap:We,markers:Te}=(0,d.useMemo)((()=>(0,M.t)(i,l)),[i,l]),Re=(0,d.useMemo)((()=>Ne.flatMap((e=>{let t,n,{line:{text:a,label:i,$id:s},edge:l}=e;return a||i?(i?(t="label",n=[].concat(i)):(t="text",n=[].concat(a)),n.map((e=>({[t]:e,id:`${s}-${e.placement??"center"}`,edge:l})))):[]}))),[Ne]),{nodes:Se,edges:ze}=(0,$.o)({layout:n,nodes:a,edges:i,manualLayoutStatus:xe,userViewReady:ye,userViewNodesMap:ve,nodeMovement:Ce,nodesRefRepository:G,lineLabelsRefRepository:ie,normalizedLinesMap:We,layoutOptions:o,nodesRenderId:Z,lineLabelsRenderId:ne});(0,d.useEffect)((()=>{"finished"===xe&&be(Se.map((e=>({id:e.id,x:e.x,y:e.y}))))}),[xe]);const $e=(0,d.useMemo)((()=>(0,x.R)(ze,Se,Ne)),[Ne,Se,ze]),Le=c??null,[Be,De]=(0,d.useState)(Le);(0,d.useEffect)((()=>{De((e=>(0,P.c)(e,Le)?e:Le))}),[Le]);const Pe=(0,d.useRef)(!1);(0,d.useEffect)((()=>{Pe.current?null==I||I(Be):Pe.current=!0}),[Be,I]),(0,d.useEffect)((()=>{const e=pe.current;if(!e||p)return;const t=e=>{const t=(0,w.a)(e,{renderedNodes:Se,activeTarget:Be});"delete-node"===(null==t?void 0:t.action)?null==U||U(t.node):"delete-edge"===(null==t?void 0:t.action)?null==Y||Y(t.edge):"switch-active-node"===(null==t?void 0:t.action)&&t.node&&(null==K||K({type:"node",nodeId:t.node.id}))};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[Be,Se,p,K,U,Y]);const Oe=(0,d.useCallback)((e=>{e&&(J((e=>e+1)),Q(e)),F((t=>t||!!e))}),[]),He=(0,d.useCallback)((e=>{e&&(ae((e=>e+1)),se(e)),te((t=>t||!!e))}),[]),Ie=(0,d.useMemo)((()=>H??[z.sS,z.Yt]),[H]),Ke=(0,d.useMemo)((()=>(0,f.s_)()),[]);(0,d.useEffect)((()=>{let e=!1;Ke.scaleExtent(g?Ie:[1,1]).on("start",(()=>{e=!1,he(!0)})).on("zoom",(t=>{e=!0,de(t.transform)})).on("end",(()=>{he(!1),e||null==K||K(null)}))}),[K,Ie,g,Ke]),(0,d.useEffect)((()=>{const e=pe.current;if(!e)return;const t=(0,A.A)(e),n=()=>{t.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(g||y||B)return(g||y)&&t.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),y&&(e.preventDefault(),Ke.translateBy(t,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),t.call(Ke).on("wheel",(e=>e.preventDefault())).on("dblclick.zoom",null),B||t.on("mousedown.zoom",null).on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),n;n()}),[B,y,g,Ke]),(0,d.useEffect)((()=>{const e=pe.current;if(0===Se.length||!e||Ae)return;const{k:t,x:n,y:a}=(0,_.r)(Se,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:g?Ie:void 0});Ke.transform((0,A.A)(e),new f.uV(t,n,a)),fe(!0)}),[Ae,Se,Ie,g,Ke]);const Ue=(0,d.useMemo)((()=>`${(0,b.uniqueId)("diagram-")}-`),[]),Ye=`${Ue}line-arrow-`,Ve=`${Ue}mask-`,je=`${Ue}active-line-`;(0,d.useEffect)((()=>{oe((e=>(0,R.z)(e,$e,ue.current)))}),[$e]);const[Xe,qe]=u().useState(new Map);return(0,d.useEffect)((()=>{if(!ie)return;(0,L.F)(le,ie);const e=new m.A((()=>{qe((0,O.G)(le,ie))}));for(const t of ie.values())e.observe(t);return()=>{e.disconnect()}}),[ne,ie,le]),"dagre"!==n&&"force"!==n?u().createElement("div",null,`Diagram layout not supported: "${n}"`):u().createElement("div",{className:v()("diagram",{ready:q&&Ae,grabbing:re,pannable:B}),tabIndex:-1,ref:pe},u().createElement("svg",{width:"100%",height:"100%",className:"lines"},u().createElement("defs",null,Te.map(((e,t)=>{let{type:n,strokeColor:a}=e;return u().createElement(N.c,{key:t,id:`${Ye}${t}`,type:n,strokeColor:a})})),[...Xe].map((e=>{let[t,n]=e;return u().createElement(W.y,{key:t,lineId:t,rects:n,maskPrefix:Ve,renderedLineLabels:le})})),u().createElement("marker",{id:`${je}start`,viewBox:"0 0 8 8",refX:4,refY:4,markerWidth:8,markerHeight:8,orient:"auto"},u().createElement("path",{d:"M 0.5 0.5 H 7.5 V 7.5 H 0.5 Z",stroke:"var(--palette-gray-7)",strokeWidth:1,fill:"var(--palette-gray-1)"})),u().createElement("marker",{id:`${je}end`,viewBox:"0 0 14 8",refX:3,refY:4,markerWidth:14,markerHeight:8,orient:"auto"},u().createElement("path",{d:"M 0.5 1.5 L 5.5 4 L 0.5 6.5 z",stroke:"var(--palette-blue-3)",strokeWidth:1,fill:"var(--palette-blue-3)"}),u().createElement("path",{d:"M 6.5 0.5 H 13.5 V 7.5 H 6.5 Z",stroke:"var(--palette-gray-7)",strokeWidth:1,fill:"var(--palette-gray-1)"}))),u().createElement("g",{transform:`translate(${ce.x} ${ce.y}) scale(${ce.k})`},$e.map((e=>u().createElement(E.m,{key:e.line.$id,line:e,linePaths:ue.current,lineMaskRects:Xe,maskPrefix:Ve,markerPrefix:Ye,activeLineMarkerPrefix:je,active:"edge"===(null==Be?void 0:Be.type)&&Be.edge.source===e.edge.source&&Be.edge.target===e.edge.target,activeRelated:"node"===(null==Be?void 0:Be.type)&&(e.edge.source===Be.nodeId||e.edge.target===Be.nodeId),onLineClick:V,onLineDoubleClick:j}))))),u().createElement("div",{className:v()("line-labels",{ready:ee}),style:{left:ce.x,top:ce.y,transform:`scale(${ce.k})`}},u().createElement(C.d2,{labels:Re,onRendered:He})),u().createElement("div",{className:"nodes",ref:ge,style:{left:ce.x,top:ce.y,transform:`scale(${ce.k})`}},u().createElement(k.p,{nodes:a,nodeBricks:s,onRendered:Oe})),u().createElement(T.w,{connectLineState:we,connectLineTo:me,markerPrefix:Ye}))}a=kt,({e:[K,U,Y,V,j,X,q,F,Z,J,G,Q,ee,te,ne,ae,ie,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe,H],c:[Ve,I]}=(0,c.A)(a,[He("eo-diagram",{styleTexts:[B.A]})],[[Ie({type:String}),1,"layout"],[Ie({attribute:!1}),1,"nodes"],[Ie({attribute:!1}),1,"edges"],[Ie({attribute:!1}),1,"nodeBricks"],[Ie({attribute:!1}),1,"lines"],[Ie({attribute:!1}),1,"layoutOptions"],[Ie({attribute:!1}),1,"activeTarget"],[Ie({type:Boolean}),1,"disableKeyboardAction"],[Ie({attribute:!1}),1,"connectNodes"],[Ie({attribute:!1}),1,"dragNodes"],[Ie({type:Boolean}),1,"zoomable"],[Ie({type:Boolean}),1,"scrollable"],[Ie({type:Boolean}),1,"pannable"],[Ie({attribute:!1}),1,"scaleRange"],[Ke({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,h.A)(lt,e),(e,t)=>(0,r.A)(lt,e,t)],[Ke({type:"node.delete"}),1,"nodeDelete",e=>(0,h.A)(ht,e),(e,t)=>(0,r.A)(ht,e,t)],[Ke({type:"edge.delete"}),1,"edgeDelete",e=>(0,h.A)(dt,e),(e,t)=>(0,r.A)(dt,e,t)],[Ke({type:"line.click"}),1,"lineClick",e=>(0,h.A)(pt,e),(e,t)=>(0,r.A)(pt,e,t)],[Ke({type:"line.dblclick"}),1,"lineDoubleClick",e=>(0,h.A)(At,e),(e,t)=>(0,r.A)(At,e,t)],[Ke({type:"nodes.connect"}),1,"connectNodes",e=>(0,h.A)(yt,e),(e,t)=>(0,r.A)(yt,e,t)],[Ue(),2,"callOnLineLabel"]],0,(e=>mt.has((0,l.A)(e))),g.ReactNextElement)),I();var _t,xt=n(3971);let Mt,Ct,Et,Nt,Wt,Tt,Rt,St,zt,$t,Lt,Bt,Dt,Pt;const{defineElement:Ot,property:Ht,event:It,method:Kt}=(0,p.createDecorators)(),Ut=(0,d.forwardRef)(en);let Yt;var Vt=new WeakMap,jt=new WeakMap,Xt=new WeakMap,qt=new WeakSet,Ft=new WeakMap,Zt=new WeakMap,Jt=new WeakMap,Gt=new WeakMap;class Qt extends g.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,qt),(0,s.A)(this,Vt,(Mt(this),Et(this))),(0,s.A)(this,jt,(Nt(this),Wt(this))),(0,s.A)(this,Xt,(Tt(this),Rt(this))),(0,s.A)(this,Ft,($t(this),e=>{(0,o.A)(qt,this,St).emit(e)})),(0,s.A)(this,Zt,Lt(this)),(0,s.A)(this,Jt,(Pt(this),e=>{(0,o.A)(qt,this,Bt).emit(e)})),(0,s.A)(this,Gt,(0,d.createRef)())}get label(){return(0,h.A)(Vt,this)}set label(e){(0,r.A)(Vt,this,e)}get type(){return(0,h.A)(jt,this)}set type(e){(0,r.A)(jt,this,e)}enableEditing(){var e;null===(e=(0,h.A)(Gt,this).current)||void 0===e||e.enableEditing()}render(){return u().createElement(Ut,{ref:(0,h.A)(Gt,this),label:this.label,onLabelEditingChange:(0,h.A)(Ft,this),onLabelChange:(0,h.A)(Jt,this)})}}function en(e,t){let{label:n,onLabelChange:a,onLabelEditingChange:i}=e;const s=n??"",[l,o]=(0,d.useState)(s),[r,h]=(0,d.useState)(!1),c=(0,d.useRef)(!1),[p,g]=(0,d.useState)(!1),A=(0,d.useRef)(null);(0,d.useImperativeHandle)(t,(()=>({enableEditing(){h(!0)}}))),(0,d.useEffect)((()=>{o(s)}),[s]);const f=(0,d.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),h(!0)}),[]);(0,d.useEffect)((()=>{var e,t;r&&(null===(e=A.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=A.current)||void 0===t||t.select())}),[r]),(0,d.useEffect)((()=>{c.current?null==i||i(r):c.current=!0}),[r,i]);const y=(0,d.useCallback)((e=>{o(e.target.value)}),[]),b=(0,d.useCallback)((e=>{const t=e.key||e.keyCode||e.which;var n;"Enter"!==t&&13!==t||null===(n=A.current)||void 0===n||n.blur()}),[]),m=(0,d.useCallback)((()=>{h(!1),g(!0)}),[]);(0,d.useEffect)((()=>{p&&(null==a||a(l),g(!1))}),[l,a,p]);const k=(0,d.useCallback)((e=>{e.stopPropagation()}),[]);return u().createElement("div",{className:v()("label",{editing:r,empty:!l}),onDoubleClick:k,onMouseDown:k},u().createElement("input",{className:"label-input",value:l,ref:A,onChange:y,onKeyDown:b,onBlur:m}),u().createElement("div",{className:"label-text",onDoubleClick:f},l))}_t=Qt,({e:[Et,Nt,Wt,Tt,Rt,St,zt,$t,Lt,Bt,Dt,Pt,Mt],c:[Yt,Ct]}=(0,c.A)(_t,[Ot("diagram.editable-label",{styleTexts:[xt.A]})],[[Ht(),1,"label"],[Ht({render:!1}),1,"type"],[It({type:"label.editing.change"}),1,"labelEditingChange",e=>(0,h.A)(Xt,e),(e,t)=>(0,r.A)(Xt,e,t)],[It({type:"label.change"}),1,"labelChange",e=>(0,h.A)(Zt,e),(e,t)=>(0,r.A)(Zt,e,t)],[Kt(),2,"enableEditing"]],0,(e=>Gt.has((0,l.A)(e))),g.ReactNextElement)),Ct(),n(9068);var tn,nn=n(497);let an,sn,ln,on,rn,hn,cn,dn,un,pn,gn,An,fn,yn,vn,bn,mn,kn,wn;const{defineElement:_n,property:xn,event:Mn}=(0,p.createDecorators)();let Cn;var En=new WeakMap,Nn=new WeakMap,Wn=new WeakMap,Tn=new WeakMap,Rn=new WeakSet,Sn=new WeakMap,zn=new WeakMap,$n=new WeakMap,Ln=new WeakMap,Bn=new WeakMap;class Dn extends g.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Rn),(0,s.A)(this,En,sn(this)),(0,s.A)(this,Nn,(ln(this),on(this))),(0,s.A)(this,Wn,(rn(this),hn(this))),(0,s.A)(this,Tn,(cn(this),dn(this))),(0,s.A)(this,Sn,(gn(this),e=>{(0,o.A)(Rn,this,un).emit(e)})),(0,s.A)(this,zn,An(this)),(0,s.A)(this,$n,(vn(this),e=>{(0,o.A)(Rn,this,fn).emit(e)})),(0,s.A)(this,Ln,bn(this)),(0,s.A)(this,Bn,(wn(this),e=>{(0,o.A)(Rn,this,mn).emit(e)}))}get usage(){return(0,h.A)(En,this)}set usage(e){(0,r.A)(En,this,e)}get status(){return(0,h.A)(Nn,this)}set status(e){(0,r.A)(Nn,this,e)}get decorator(){return(0,h.A)(Wn,this)}set decorator(e){(0,r.A)(Wn,this,e)}render(){return u().createElement(Pn,{usage:this.usage,onDragStart:(0,h.A)(Sn,this),onDragMove:(0,h.A)($n,this),onDragEnd:(0,h.A)(Bn,this)})}}function Pn(e){let{usage:t,onDragStart:n,onDragMove:a,onDragEnd:i}=e;const s=(0,d.useCallback)((e=>{if("library"!==t)return;e.stopPropagation(),e.preventDefault();const s=[e.clientX,e.clientY];let l=!1;const o=e=>{l||(l=(e.clientX-s[0])**2+(e.clientY-s[1])**2>=9,l&&(null==n||n([e.clientX,e.clientY]))),l&&(null==a||a([e.clientX,e.clientY]))},r=e=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r),l&&(null==i||i([e.clientX,e.clientY]))};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}),[i,a,n,t]);return u().createElement("div",{onMouseDown:s},u().createElement("slot",null))}tn=Dn,({e:[sn,ln,on,rn,hn,cn,dn,un,pn,gn,An,fn,yn,vn,bn,mn,kn,wn],c:[Cn,an]}=(0,c.A)(tn,[_n("diagram.experimental-node",{styleTexts:[nn.A]})],[[xn(),1,"usage"],[xn({type:String,render:!1}),1,"status"],[xn({type:String}),1,"decorator"],[Mn({type:"drag.start"}),1,"dragStartEvent",e=>(0,h.A)(Tn,e),(e,t)=>(0,r.A)(Tn,e,t)],[Mn({type:"drag.move"}),1,"dragMoveEvent",e=>(0,h.A)(zn,e),(e,t)=>(0,r.A)(zn,e,t)],[Mn({type:"drag.end"}),1,"dragEndEvent",e=>(0,h.A)(Ln,e),(e,t)=>(0,r.A)(Ln,e,t)]],0,(e=>Bn.has((0,l.A)(e))),g.ReactNextElement)),an();var On,Hn=n(8185),In=n(2140),Kn=n(3783),Un=n(3033),Yn=n(8091),Vn=n(1819),jn=n(5748),Xn=n(227),qn=n(531),Fn=n(7099),Zn=n(1484),Jn=n(8197),Gn=n(7531),Qn=n(2098),ea=n(3012),ta=n(6237);let na,aa,ia,sa,la,oa,ra,ha,ca,da,ua,pa,ga,Aa,fa,ya,va,ba,ma,ka,wa,_a,xa,Ma,Ca,Ea,Na,Wa,Ta,Ra,Sa,za,$a,La,Ba,Da,Pa,Oa,Ha,Ia,Ka;const{defineElement:Ua,property:Ya,event:Va}=(0,p.createDecorators)();let ja;var Xa=new WeakMap,qa=new WeakMap,Fa=new WeakMap,Za=new WeakMap,Ja=new WeakMap,Ga=new WeakMap,Qa=new WeakMap,ei=new WeakMap,ti=new WeakMap,ni=new WeakMap,ai=new WeakMap,ii=new WeakMap,si=new WeakMap,li=new WeakMap,oi=new WeakMap,ri=new WeakSet,hi=new WeakMap,ci=new WeakMap,di=new WeakMap,ui=new WeakMap,pi=new WeakMap,gi=new WeakMap;class Ai extends g.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,ri),(0,s.A)(this,Xa,aa(this)),(0,s.A)(this,qa,(ia(this),sa(this))),(0,s.A)(this,Fa,(la(this),oa(this))),(0,s.A)(this,Za,(ra(this),ha(this,[Un.HP,Un.HP]))),(0,s.A)(this,Ja,(ca(this),da(this))),(0,s.A)(this,Ga,(ua(this),pa(this))),(0,s.A)(this,Qa,(ga(this),Aa(this))),(0,s.A)(this,ei,(fa(this),ya(this))),(0,s.A)(this,ti,(va(this),ba(this))),(0,s.A)(this,ni,(ma(this),ka(this))),(0,s.A)(this,ai,(wa(this),_a(this,!0))),(0,s.A)(this,ii,(xa(this),Ma(this,!0))),(0,s.A)(this,si,(Ca(this),Ea(this,!0))),(0,s.A)(this,li,(Na(this),Wa(this))),(0,s.A)(this,oi,(Ta(this),Ra(this))),(0,s.A)(this,hi,($a(this),e=>{(0,o.A)(ri,this,Sa).emit(e)})),(0,s.A)(this,ci,(e=>{(0,Hn.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,s.A)(this,di,La(this)),(0,s.A)(this,ui,(Pa(this),e=>{(0,o.A)(ri,this,Ba).emit(e)})),(0,s.A)(this,pi,Oa(this)),(0,s.A)(this,gi,(Ka(this),e=>{(0,o.A)(ri,this,Ha).emit(e)}))}get cells(){return(0,h.A)(Xa,this)}set cells(e){(0,r.A)(Xa,this,e)}get layout(){return(0,h.A)(qa,this)}set layout(e){(0,r.A)(qa,this,e)}get layoutOptions(){return(0,h.A)(Fa,this)}set layoutOptions(e){(0,r.A)(Fa,this,e)}get defaultNodeSize(){return(0,h.A)(Za,this)}set defaultNodeSize(e){(0,r.A)(Za,this,e)}get defaultNodeBricks(){return(0,h.A)(Ja,this)}set defaultNodeBricks(e){(0,r.A)(Ja,this,e)}get degradedThreshold(){return(0,h.A)(Ga,this)}set degradedThreshold(e){(0,r.A)(Ga,this,e)}get degradedNodeLabel(){return(0,h.A)(Qa,this)}set degradedNodeLabel(e){(0,r.A)(Qa,this,e)}get defaultEdgeLines(){return(0,h.A)(ei,this)}set defaultEdgeLines(e){(0,r.A)(ei,this,e)}get activeTarget(){return(0,h.A)(ti,this)}set activeTarget(e){(0,r.A)(ti,this,e)}get fadeUnrelatedCells(){return(0,h.A)(ni,this)}set fadeUnrelatedCells(e){(0,r.A)(ni,this,e)}get zoomable(){return(0,h.A)(ai,this)}set zoomable(e){(0,r.A)(ai,this,e)}get scrollable(){return(0,h.A)(ii,this)}set scrollable(e){(0,r.A)(ii,this,e)}get pannable(){return(0,h.A)(si,this)}set pannable(e){(0,r.A)(si,this,e)}get scaleRange(){return(0,h.A)(li,this)}set scaleRange(e){(0,r.A)(li,this,e)}render(){return u().createElement(fi,{shadowRoot:this.shadowRoot,cells:this.cells,layout:this.layout,layoutOptions:this.layoutOptions,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,degradedThreshold:this.degradedThreshold,degradedNodeLabel:this.degradedNodeLabel,activeTarget:this.activeTarget,fadeUnrelatedCells:this.fadeUnrelatedCells,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:(0,h.A)(hi,this),onSwitchActiveTarget:(0,h.A)(ci,this),onCellContextMenu:(0,h.A)(ui,this),onCellClick:(0,h.A)(gi,this)})}}function fi(e){let{shadowRoot:t,cells:n,layout:a,layoutOptions:i,defaultNodeSize:s,defaultNodeBricks:l,defaultEdgeLines:o,degradedThreshold:r,degradedNodeLabel:h,activeTarget:c,fadeUnrelatedCells:p,zoomable:g,scrollable:f,pannable:y,scaleRange:m,onActiveTargetChange:k,onSwitchActiveTarget:w,onCellContextMenu:_,onCellClick:x}=e;const[{cells:M,layoutKey:C},E]=(0,d.useReducer)(jn.d,n,(e=>({cells:(0,Kn.C)(e,{defaultNodeSize:s}),layoutKey:1}))),W=(0,d.useMemo)((()=>M.filter(qn.N).length>=(r??Un.pC)),[M,r]),T=(0,d.useRef)(null),R=(0,d.useRef)(null),{grabbing:S,transform:z,zoomer:$,scaleRange:L}=(0,Yn.f)({rootRef:T,zoomable:g,scrollable:f,pannable:y,draggable:!0,scaleRange:m,onSwitchActiveTarget:w}),{centered:B,setCentered:D,getNextLayoutKey:P}=(0,Zn.g)({layout:a,layoutOptions:i,rootRef:T,cells:M,zoomable:g,zoomer:$,scaleRange:L,layoutKey:C,dispatch:E}),O=(0,d.useCallback)((()=>{D(!1)}),[D]),H=(0,d.useRef)(n);(0,d.useEffect)((()=>{if(n!==H.current){H.current=n;const e=(0,Qn.L)({canvasWidth:t.host.clientWidth,canvasHeight:t.host.clientHeight,defaultNodeSize:s,layout:a,previousCells:M,cells:n,scaleRange:L,transform:z});E({type:"update-cells",payload:e.cells})}}),[M,s,n,a,L,t,z]);const I=(0,Vn.J)({cellsRef:R,activeTarget:c,onActiveTargetChange:k}),K=`${(0,d.useMemo)((()=>`${(0,b.uniqueId)("diagram-")}-`),[])}line-arrow-`,U=(0,d.useCallback)(((e,t)=>{E({type:"update-node-size",payload:{id:e,size:t},layoutKey:P()})}),[P]),[Y,V]=(0,d.useState)(null),j=(0,d.useCallback)((e=>{V(e)}),[]),X=(0,d.useCallback)((e=>{V((t=>t===e?null:t))}),[]),[q,F]=(0,d.useState)([]);(0,d.useEffect)((()=>{const e=p?(0,Xn.Y)(M,null,Y):[];F((t=>0===t.length&&0===e.length?t:e))}),[M,p,Y]);const Z=(0,d.useCallback)((e=>{$.scaleTo((0,A.A)(T.current),e/100)}),[$]),[J,G]=(0,Gn.d)({cells:M,defaultEdgeLines:o,markerPrefix:K}),Q=(0,Jn.H)({cells:M,layout:a,centered:B});return u().createElement(u().Fragment,null,u().createElement("svg",{width:"100%",height:"100%",ref:T,className:v()("root",{grabbing:S,pannable:y,ready:Q}),tabIndex:-1},u().createElement("defs",null,G.map(((e,t)=>u().createElement(N.c,{key:t,id:`${K}${t}`,type:"arrow",strokeColor:e.strokeColor})))),u().createElement("g",{transform:`translate(${z.x} ${z.y}) scale(${z.k})`},u().createElement("g",{className:"cells",ref:R},M.map((e=>u().createElement(In.m,{key:`${e.type}:${(0,qn.WW)(e)?`${e.source}~${e.target}`:e.id}`,layout:a,cell:e,cells:M,degraded:W,degradedNodeLabel:h,defaultNodeBricks:l,lineConfMap:J,transform:z,activeTarget:I,readOnly:!0,unrelatedCells:q,onSwitchActiveTarget:w,onCellContextMenu:_,onCellClick:x,onNodeBrickResize:U,onCellMouseEnter:p&&(0,qn.N)(e)?j:void 0,onCellMouseLeave:p&&(0,qn.N)(e)?X:void 0})))))),u().createElement(Fn.Y,{shadowRoot:t,scale:z.k,scaleRange:L,onZoomChange:Z,onReCenter:O}))}On=Ai,({e:[aa,ia,sa,la,oa,ra,ha,ca,da,ua,pa,ga,Aa,fa,ya,va,ba,ma,ka,wa,_a,xa,Ma,Ca,Ea,Na,Wa,Ta,Ra,Sa,za,$a,La,Ba,Da,Pa,Oa,Ha,Ia,Ka],c:[ja,na]}=(0,c.A)(On,[Ua("eo-display-canvas",{styleTexts:[ea.A,ta.A]})],[[Ya({attribute:!1}),1,"cells"],[Ya({type:String}),1,"layout"],[Ya({attribute:!1}),1,"layoutOptions"],[Ya({attribute:!1}),1,"defaultNodeSize"],[Ya({attribute:!1}),1,"defaultNodeBricks"],[Ya({type:Number}),1,"degradedThreshold"],[Ya({attribute:!1}),1,"degradedNodeLabel"],[Ya({attribute:!1}),1,"defaultEdgeLines"],[Ya({attribute:!1}),1,"activeTarget"],[Ya({type:Boolean}),1,"fadeUnrelatedCells"],[Ya({type:Boolean}),1,"zoomable"],[Ya({type:Boolean}),1,"scrollable"],[Ya({type:Boolean}),1,"pannable"],[Ya({attribute:!1}),1,"scaleRange"],[Va({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,h.A)(oi,e),(e,t)=>(0,r.A)(oi,e,t)],[Va({type:"cell.contextmenu"}),1,"cellContextMenu",e=>(0,h.A)(di,e),(e,t)=>(0,r.A)(di,e,t)],[Va({type:"cell.click"}),1,"cellClick",e=>(0,h.A)(pi,e),(e,t)=>(0,r.A)(pi,e,t)]],0,(e=>gi.has((0,l.A)(e))),g.ReactNextElement)),na()},9068:(e,t,n)=>{n.d(t,{uuidV4:()=>kn});var a,i=n(4635),s=n(918),l=n(6902),o=n(2559),r=n(5536),h=n(6121),c=n(829),d=n(2740),u=n(8769),p=n.n(u),g=n(4782),A=n(1389),f=n(279),y=(n(6477),n(1030)),v=n(3373),b=n.n(v),m=n(7566),k=n(5748),w=n(3739),_=n(531),x=n(8185),M=n(5114),C=n(2140),E=n(3639),N=n(3783),W=n(2098),T=n(227),R=n(3033),S=n(8091),z=n(1819),$=n(7099),L=n(1484),B=n(8197),D=n(7531),P=n(2219),O=n(3012),H=n(6237),I=n(9386),K=n(1991);let U,Y,V,j,X,q,F,Z,J,G,Q,ee,te,ne,ae,ie,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe,He,Ie,Ke,Ue,Ye,Ve,je,Xe,qe,Fe,Ze,Je,Ge,Qe,et,tt,nt,at,it,st,lt,ot,rt,ht,ct,dt,ut,pt,gt,At,ft,yt,vt,bt,mt;const kt=(0,f.unwrapProvider)("basic.lock-body-scroll"),{defineElement:wt,property:_t,method:xt,event:Mt}=(0,g.createDecorators)(),Ct=p().forwardRef(mn);let Et;var Nt=new WeakMap,Wt=new WeakMap,Tt=new WeakMap,Rt=new WeakMap,St=new WeakMap,zt=new WeakMap,$t=new WeakMap,Lt=new WeakMap,Bt=new WeakMap,Dt=new WeakMap,Pt=new WeakMap,Ot=new WeakMap,Ht=new WeakMap,It=new WeakMap,Kt=new WeakMap,Ut=new WeakMap,Yt=new WeakMap,Vt=new WeakMap,jt=new WeakMap,Xt=new WeakSet,qt=new WeakMap,Ft=new WeakMap,Zt=new WeakMap,Jt=new WeakMap,Gt=new WeakMap,Qt=new WeakMap,en=new WeakMap,tn=new WeakMap,nn=new WeakMap,an=new WeakMap,sn=new WeakMap,ln=new WeakMap,on=new WeakMap,rn=new WeakMap,hn=new WeakMap,cn=new WeakMap,dn=new WeakMap,un=new WeakMap,pn=new WeakMap,gn=new WeakMap,An=new WeakMap,fn=new WeakMap,yn=new WeakMap;class vn extends A.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Xt),(0,s.A)(this,Nt,(U(this),V(this))),(0,s.A)(this,Wt,(j(this),X(this))),(0,s.A)(this,Tt,(q(this),F(this))),(0,s.A)(this,Rt,(Z(this),J(this,[R.HP,R.HP]))),(0,s.A)(this,St,(G(this),Q(this))),(0,s.A)(this,zt,(ee(this),te(this))),(0,s.A)(this,$t,(ne(this),ae(this))),(0,s.A)(this,Lt,(ie(this),se(this))),(0,s.A)(this,Bt,(le(this),oe(this))),(0,s.A)(this,Dt,(re(this),he(this))),(0,s.A)(this,Pt,(ce(this),de(this,!0))),(0,s.A)(this,Ot,(ue(this),pe(this,!0))),(0,s.A)(this,Ht,(ge(this),Ae(this,!0))),(0,s.A)(this,It,(fe(this),ye(this,!0))),(0,s.A)(this,Kt,(ve(this),be(this,!1))),(0,s.A)(this,Ut,(me(this),ke(this))),(0,s.A)(this,Yt,(we(this),_e(this))),(0,s.A)(this,Vt,(xe(this),Me(this))),(0,s.A)(this,jt,(Ce(this),Ee(this))),(0,s.A)(this,qt,(Te(this),e=>{(0,r.A)(Xt,this,Ne).emit(e)})),(0,s.A)(this,Ft,(e=>{(0,x.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,s.A)(this,Zt,Re(this)),(0,s.A)(this,Jt,($e(this),Le(this))),(0,s.A)(this,Gt,(Pe(this),e=>{(0,r.A)(Xt,this,Be).emit(e),"node"===e.type&&(0,r.A)(Xt,this,Se).emit(e)})),(0,s.A)(this,Qt,Oe(this)),(0,s.A)(this,en,(Ke(this),e=>{(0,r.A)(Xt,this,He).emit(e)})),(0,s.A)(this,tn,Ue(this)),(0,s.A)(this,nn,(je(this),e=>{(0,r.A)(Xt,this,Ye).emit(e)})),(0,s.A)(this,an,Xe(this)),(0,s.A)(this,sn,(Ze(this),Je(this))),(0,s.A)(this,ln,(et(this),e=>{(0,r.A)(Xt,this,Ge).emit(e),"node"===e.type&&(0,r.A)(Xt,this,qe).emit(e)})),(0,s.A)(this,on,tt(this)),(0,s.A)(this,rn,(it(this),e=>{(0,r.A)(Xt,this,nt).emit(e)})),(0,s.A)(this,hn,st(this)),(0,s.A)(this,cn,(rt(this),e=>{(0,r.A)(Xt,this,lt).emit(e)})),(0,s.A)(this,dn,ht(this)),(0,s.A)(this,un,(ut(this),e=>{(0,r.A)(Xt,this,ct).emit(e)})),(0,s.A)(this,pn,pt(this)),(0,s.A)(this,gn,(ft(this),e=>{(0,r.A)(Xt,this,gt).emit(e)})),(0,s.A)(this,An,yt(this)),(0,s.A)(this,fn,(mt(this),e=>{(0,r.A)(Xt,this,vt).emit(e)})),(0,s.A)(this,yn,(0,u.createRef)())}get cells(){return(0,c.A)(Nt,this)}set cells(e){(0,h.A)(Nt,this,e)}get layout(){return(0,c.A)(Wt,this)}set layout(e){(0,h.A)(Wt,this,e)}get layoutOptions(){return(0,c.A)(Tt,this)}set layoutOptions(e){(0,h.A)(Tt,this,e)}get defaultNodeSize(){return(0,c.A)(Rt,this)}set defaultNodeSize(e){(0,h.A)(Rt,this,e)}get defaultNodeBricks(){return(0,c.A)(St,this)}set defaultNodeBricks(e){(0,h.A)(St,this,e)}get degradedThreshold(){return(0,c.A)(zt,this)}set degradedThreshold(e){(0,h.A)(zt,this,e)}get degradedNodeLabel(){return(0,c.A)($t,this)}set degradedNodeLabel(e){(0,h.A)($t,this,e)}get defaultEdgeLines(){return(0,c.A)(Lt,this)}set defaultEdgeLines(e){(0,h.A)(Lt,this,e)}get activeTarget(){return(0,c.A)(Bt,this)}set activeTarget(e){(0,h.A)(Bt,this,e)}get fadeUnrelatedCells(){return(0,c.A)(Dt,this)}set fadeUnrelatedCells(e){(0,h.A)(Dt,this,e)}get zoomable(){return(0,c.A)(Pt,this)}set zoomable(e){(0,h.A)(Pt,this,e)}get scrollable(){return(0,c.A)(Ot,this)}set scrollable(e){(0,h.A)(Ot,this,e)}get pannable(){return(0,c.A)(Ht,this)}set pannable(e){(0,h.A)(Ht,this,e)}get selectable(){return(0,c.A)(It,this)}set selectable(e){(0,h.A)(It,this,e)}get allowEdgeToArea(){return(0,c.A)(Kt,this)}set allowEdgeToArea(e){(0,h.A)(Kt,this,e)}get dragBehavior(){return(0,c.A)(Ut,this)}set dragBehavior(e){(0,h.A)(Ut,this,e)}get ctrlDragBehavior(){return(0,c.A)(Yt,this)}set ctrlDragBehavior(e){(0,h.A)(Yt,this,e)}get scaleRange(){return(0,c.A)(Vt,this)}set scaleRange(e){(0,h.A)(Vt,this,e)}async dropNode(e){var t,n;let{id:a,position:i,size:s,data:l,useBrick:o}=e;if(null===(t=(n=document).elementsFromPoint)||void 0===t||null===(t=t.call(n,i[0],i[1]))||void 0===t?void 0:t.includes(this)){var r;const e=this.getBoundingClientRect(),t=(0,c.A)(yn,this).current.getTransform(),n={type:"node",id:a,view:{..."force"===this.layout||"dagre"===this.layout?null:{x:(i[0]-e.left-t.x)/t.k,y:(i[1]-e.top-t.y)/t.k},width:(null==s?void 0:s[0])??this.defaultNodeSize[0],height:(null==s?void 0:s[1])??this.defaultNodeSize[0]},data:l,useBrick:o};return null===(r=(0,c.A)(yn,this).current)||void 0===r||r.dropNode(n),n}return null}async dropDecorator(e){var t,n;let{position:a,decorator:i,text:s,direction:l}=e;if(null===(t=(n=document).elementsFromPoint)||void 0===t||null===(t=t.call(n,a[0],a[1]))||void 0===t?void 0:t.includes(this)){var o;const e=this.getBoundingClientRect(),t=(0,c.A)(yn,this).current.getTransform(),n={type:"decorator",decorator:i,id:kn(),view:{x:(a[0]-e.left-t.x)/t.k,y:(a[1]-e.top-t.y)/t.k,width:R.N8,height:R.w1,text:s,direction:l}};return null===(o=(0,c.A)(yn,this).current)||void 0===o||o.dropDecorator(n),n}return null}async addNodes(e){if(0===e.length)return[];const t=e.map((e=>{let{size:t,useBrick:n,id:a,data:i}=e;return{type:"node",id:a,data:i,view:{width:(null==t?void 0:t[0])??this.defaultNodeSize[0],height:(null==t?void 0:t[1])??this.defaultNodeSize[0]},useBrick:n}}));return(0,c.A)(yn,this).current.addNodes(t,{defaultNodeSize:this.defaultNodeSize,canvasWidth:this.clientWidth,canvasHeight:this.clientHeight})}async addEdge(e){var t;let{source:n,target:a,data:i}=e;const s={type:"edge",source:n,target:a,data:i};return null===(t=(0,c.A)(yn,this).current)||void 0===t||t.addEdge(s),s}manuallyConnectNodes(e){return(0,c.A)(yn,this).current.manuallyConnectNodes(e)}async updateCells(e,t){await(0,o.A)(Xt,this,bn).call(this);const{updated:n}=(0,c.A)(yn,this).current.updateCells(e,{...t,defaultNodeSize:this.defaultNodeSize,canvasWidth:this.clientWidth,canvasHeight:this.clientHeight});return{updated:n}}disconnectedCallback(){super.disconnectedCallback(),kt(this,!1)}render(){return p().createElement(Ct,{host:this,ref:(0,c.A)(yn,this),layout:this.layout,layoutOptions:this.layoutOptions,cells:this.cells,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,degradedThreshold:this.degradedThreshold,degradedNodeLabel:this.degradedNodeLabel,activeTarget:this.activeTarget,fadeUnrelatedCells:this.fadeUnrelatedCells,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,dragBehavior:this.dragBehavior,ctrlDragBehavior:this.ctrlDragBehavior,scaleRange:this.scaleRange,allowEdgeToArea:this.allowEdgeToArea,onActiveTargetChange:(0,c.A)(qt,this),onSwitchActiveTarget:(0,c.A)(Ft,this),onCellMove:(0,c.A)(Gt,this),onCellsMove:(0,c.A)(en,this),onCellResize:(0,c.A)(nn,this),onCellDelete:(0,c.A)(ln,this),onCellsDelete:(0,c.A)(rn,this),onCellContextMenu:(0,c.A)(cn,this),onDecoratorTextChange:(0,c.A)(un,this),onContainerContainerChange:(0,c.A)(gn,this),onScaleChange:(0,c.A)(fn,this)})}}function bn(){return new Promise((e=>{const t=()=>{(0,c.A)(yn,this).current?e():setTimeout(t,10)};t()}))}function mn(e,t){let{host:n,layout:a,layoutOptions:i,cells:s,defaultNodeSize:l,defaultNodeBricks:o,defaultEdgeLines:r,degradedThreshold:h,degradedNodeLabel:c,activeTarget:d,fadeUnrelatedCells:g,zoomable:A,scrollable:f,pannable:v,dragBehavior:x,ctrlDragBehavior:O,scaleRange:H,allowEdgeToArea:U,onActiveTargetChange:Y,onSwitchActiveTarget:V,onCellMove:j,onCellResize:X,onCellDelete:q,onCellsMove:F,onCellsDelete:Z,onCellContextMenu:J,onDecoratorTextChange:G,onScaleChange:Q,onContainerContainerChange:ee}=e;const[{cells:te,layoutKey:ne},ae]=(0,u.useReducer)(k.d,s,(e=>({cells:(0,N.C)(e,{defaultNodeSize:l}),layoutKey:0}))),ie=(0,u.useMemo)((()=>te.filter(_.N).length>=(h??R.pC)),[te,h]),se=(0,u.useRef)(null),le=(0,u.useRef)(null),oe=(0,u.useRef)(null),[re,he]=(0,u.useState)([]),[ce,de]=(0,u.useState)([]),{grabbing:ue,transform:pe,zoomer:ge,scaleRange:Ae}=(0,S.f)({rootRef:se,zoomable:A,scrollable:f,pannable:v,draggable:"grab"===x,ctrlDraggable:"grab"===O,scaleRange:H,onSwitchActiveTarget:V});(0,u.useEffect)((()=>{Q(pe.k)}),[Q,pe.k]);const[fe,ye]=(0,u.useState)(null),[ve,be]=(0,u.useState)(null),{centered:me,setCentered:ke,getNextLayoutKey:we}=(0,L.g)({layout:a,layoutOptions:i,rootRef:se,cells:te,zoomable:A,zoomer:ge,scaleRange:Ae,layoutKey:ne,allowEdgeToArea:U,dispatch:ae});(0,u.useImperativeHandle)(t,(()=>({dropNode(e){"dagre"!==a&&"force"!==a&&ke(!0),ae({type:"drop-node",payload:e})},dropDecorator(e){"dagre"!==a&&"force"!==a&&ke(!0),ae({type:"drop-decorator",payload:e})},addNodes(e,t){let{defaultNodeSize:n,canvasWidth:i,canvasHeight:s}=t;const l=te.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1,o=[...te.slice(0,l),...e,...te.slice(l)],{cells:r,updated:h,shouldReCenter:c}=(0,W.L)({cells:o,layout:a,previousCells:te,defaultNodeSize:n,canvasWidth:i,canvasHeight:s,scaleRange:Ae,transform:pe,allowEdgeToArea:U});return c&&ke(!1),ae({type:"update-cells",payload:r}),h.filter((t=>e.includes(t)))},addEdge(e){ae({type:"add-edge",payload:e})},updateCells(e,t){const{shouldReCenter:n,...i}=(0,W.L)({...t,layout:a,previousCells:te,cells:e,scaleRange:Ae,transform:pe,allowEdgeToArea:U});return n&&ke(!1),ae({type:"update-cells",payload:i.cells}),i},getTransform:()=>pe,manuallyConnectNodes(e){const t=te.find((t=>(U&&(0,_.o6)(t)||(0,_.N)(t))&&t.id===e));if(t){const e=se.current.getBoundingClientRect();return be({source:t,from:[t.view.x+t.view.width/2,t.view.y+t.view.height/2],offset:[e.left,e.top]}),new Promise(((e,t)=>{oe.current={resolve:e,reject:t}}))}return Promise.reject(null)}})),[te,a,Ae,ke,pe,U]);const _e=(0,u.useCallback)(((e,t)=>{var n;for(let n=te.length-1;n>=0;n--){const i=te[n];if((U&&(0,_.o6)(i)||(0,_.N)(i))&&i.id!==e.source.id&&i.view.x<t[0]&&i.view.x+i.view.width>t[0]&&i.view.y<t[1]&&i.view.y+i.view.height>t[1]){var a;null===(a=oe.current)||void 0===a||a.resolve({source:e.source,target:i});break}}null===(n=oe.current)||void 0===n||n.reject(null),be(null)}),[te]);(0,u.useEffect)((()=>{kt(n,!(!ve&&!fe))}),[ve,n,fe]);const xe=(0,z.J)({cellsRef:le,activeTarget:d,onActiveTargetChange:Y}),[Me,Ce]=(0,u.useState)([]);(0,u.useEffect)((()=>{const e=g?(0,T.Y)(te,ve,xe,U):[];Ce((t=>0===t.length&&0===e.length?t:e))}),[xe,te,ve,g,U]),(0,u.useEffect)((()=>{const e=se.current;if(!e||re.length>0)return;const t=e=>{const t=(0,M.a)(e,{cells:te,activeTarget:xe});"delete-cells"===(null==t?void 0:t.action)&&(Z(t.cells),1===t.cells.length&&q(t.cells[0]))};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[xe,te,re.length,q,Z]);const Ee=`${(0,u.useMemo)((()=>`${(0,y.uniqueId)("diagram-")}-`),[])}line-arrow-`,Ne=(0,u.useCallback)((e=>{ae({type:"move-cells",payload:e});const t=[];(0,K._)(e,te).forEach((e=>{var n,a;null!==(n=e.containerCell)&&void 0!==n&&n.id&&t.push(null===(a=e.containerCell)||void 0===a?void 0:a.id)})),de(t)}),[te]),We=(0,u.useCallback)((e=>{ae({type:"move-cells",payload:e}),F(e),1===e.length&&j(e[0]),(0,K._)(e,te,ee),de([])}),[j,F,te,ee]),Te=(0,u.useCallback)((e=>{ae({type:"resize-cell",payload:e})}),[]),Re=(0,u.useCallback)((e=>{ae({type:"resize-cell",payload:e}),X(e)}),[X]),Se=(0,u.useCallback)((e=>{let{id:t,editing:n}=e;he(n?e=>e.includes(t)?e:[...e,t]:e=>e.filter((e=>e!==t)))}),[]),ze=(0,u.useCallback)(((e,t)=>{const n=we();ae({type:"update-node-size",payload:{id:e,size:t},layoutKey:n})}),[we]),$e=(0,u.useCallback)((e=>{ge.scaleTo((0,m.A)(se.current),e/100)}),[ge]),Le=(0,u.useCallback)((()=>{ke(!1)}),[ke]),[Be,De]=(0,D.d)({cells:te,defaultEdgeLines:r,markerPrefix:Ee}),Pe=(0,B.H)({cells:te,layout:a,centered:me});return(0,u.useEffect)((()=>{const e=se.current;if(!e||"lasso"!==x)return;const t=e.getBoundingClientRect(),n=e=>{(0,P.F)(e,{transform:pe,offset:[t.left,t.top],onLassoing(e){ye(e)},onLassoed(e){ye(null);const t=[];for(const n of te)if((0,_.t2)(n)||(0,_.o6)(n)||(0,_.Hs)(n)){const a=n.view.x,i=n.view.y;a>=e.x&&a+n.view.width<=e.x+e.width&&i>=e.y&&i+n.view.height<=e.y+e.height&&t.push(n)}null==V||V(t.length>1?{type:"multi",targets:t.map(I.P)}:1===t.length?(0,I.P)(t[0]):null)}})};return e.addEventListener("mousedown",n),()=>{e.removeEventListener("mousedown",n)}}),[pe,te,x,V]),p().createElement(p().Fragment,null,p().createElement("svg",{width:"100%",height:"100%",ref:se,className:b()("root",{grabbing:ue,pannable:v,ready:Pe}),tabIndex:-1},p().createElement("defs",null,De.map(((e,t)=>p().createElement(w.c,{key:t,id:`${Ee}${t}`,type:"arrow",strokeColor:e.strokeColor})))),p().createElement("g",{transform:`translate(${pe.x} ${pe.y}) scale(${pe.k})`},p().createElement("g",{className:b()("cells",{allowEdgeToArea:U}),ref:le},te.map((e=>p().createElement(C.m,{key:`${e.type}:${(0,_.WW)(e)?`${e.source}~${e.target}`:e.id}`,dragNodeToContainerActive:!(0,_.WW)(e)&&ce.includes(e.id),layout:a,cell:e,cells:te,degraded:ie,degradedNodeLabel:c,defaultNodeBricks:o,transform:pe,lineConfMap:Be,activeTarget:xe,unrelatedCells:Me,onCellsMoving:Ne,onCellsMoved:We,onCellResizing:Te,onCellResized:Re,onSwitchActiveTarget:V,onCellContextMenu:J,onDecoratorTextChange:G,onDecoratorTextEditing:Se,onNodeBrickResize:ze})))),p().createElement(E.w,{connectLineState:ve,transform:pe,markerEnd:`${Ee}0`,onConnect:_e}),fe&&p().createElement("rect",{x:fe.x,y:fe.y,width:fe.width,height:fe.height,fill:"var(--palette-gray-5)",fillOpacity:.3,stroke:"var(--palette-gray-5)",strokeDasharray:2}))),p().createElement($.Y,{shadowRoot:n.shadowRoot,scale:pe.k,scaleRange:Ae,onZoomChange:$e,onReCenter:Le}))}function kn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}a=vn,({e:[V,j,X,q,F,Z,J,G,Q,ee,te,ne,ae,ie,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe,He,Ie,Ke,Ue,Ye,Ve,je,Xe,qe,Fe,Ze,Je,Ge,Qe,et,tt,nt,at,it,st,lt,ot,rt,ht,ct,dt,ut,pt,gt,At,ft,yt,vt,bt,mt,U],c:[Et,Y]}=(0,d.A)(a,[wt("eo-draw-canvas",{styleTexts:[O.A,H.A]})],[[_t({attribute:!1}),1,"cells"],[_t({type:String}),1,"layout"],[_t({attribute:!1}),1,"layoutOptions"],[_t({attribute:!1}),1,"defaultNodeSize"],[_t({attribute:!1}),1,"defaultNodeBricks"],[_t({type:Number}),1,"degradedThreshold"],[_t({attribute:!1}),1,"degradedNodeLabel"],[_t({attribute:!1}),1,"defaultEdgeLines"],[_t({attribute:!1}),1,"activeTarget"],[_t({type:Boolean}),1,"fadeUnrelatedCells"],[_t({type:Boolean}),1,"zoomable"],[_t({type:Boolean}),1,"scrollable"],[_t({type:Boolean}),1,"pannable"],[_t({type:Boolean}),1,"selectable"],[_t({type:Boolean}),1,"allowEdgeToArea"],[_t(),1,"dragBehavior"],[_t(),1,"ctrlDragBehavior"],[_t({attribute:!1}),1,"scaleRange"],[Mt({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,c.A)(jt,e),(e,t)=>(0,h.A)(jt,e,t)],[Mt({type:"node.move"}),1,"nodeMoveEvent",e=>(0,c.A)(Zt,e),(e,t)=>(0,h.A)(Zt,e,t)],[Mt({type:"cell.move"}),1,"cellMoveEvent",e=>(0,c.A)(Jt,e),(e,t)=>(0,h.A)(Jt,e,t)],[Mt({type:"cells.move"}),1,"cellsMoveEvent",e=>(0,c.A)(Qt,e),(e,t)=>(0,h.A)(Qt,e,t)],[Mt({type:"cell.resize"}),1,"cellResizeEvent",e=>(0,c.A)(tn,e),(e,t)=>(0,h.A)(tn,e,t)],[Mt({type:"node.delete"}),1,"nodeDelete",e=>(0,c.A)(an,e),(e,t)=>(0,h.A)(an,e,t)],[Mt({type:"cell.delete"}),1,"cellDelete",e=>(0,c.A)(sn,e),(e,t)=>(0,h.A)(sn,e,t)],[Mt({type:"cells.delete"}),1,"cellsDelete",e=>(0,c.A)(on,e),(e,t)=>(0,h.A)(on,e,t)],[Mt({type:"cell.contextmenu"}),1,"cellContextMenu",e=>(0,c.A)(hn,e),(e,t)=>(0,h.A)(hn,e,t)],[Mt({type:"decorator.text.change"}),1,"decoratorTextChange",e=>(0,c.A)(dn,e),(e,t)=>(0,h.A)(dn,e,t)],[Mt({type:"node.container.change"}),1,"containerContainerChange",e=>(0,c.A)(pn,e),(e,t)=>(0,h.A)(pn,e,t)],[Mt({type:"scale.change"}),1,"scaleChange",e=>(0,c.A)(An,e),(e,t)=>(0,h.A)(An,e,t)],[xt(),2,"dropNode"],[xt(),2,"dropDecorator"],[xt(),2,"addNodes"],[xt(),2,"addEdge"],[xt(),2,"manuallyConnectNodes"],[xt(),2,"updateCells"]],0,(e=>yn.has((0,l.A)(e))),A.ReactNextElement)),Y()},3971:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(6758),i=n.n(a),s=n(935),l=n.n(s)()(i());l.push([e.id,':host{display:block;--local-label-line-height:inherit;--local-label-font-size:inherit;--local-label-color:inherit;--local-label-font-weight:inherit}:host([hidden]){display:none}:host([type="line"]){--local-label-line-height:18px;--local-label-font-size:11px;--local-label-color:var(--color-secondary-text);--local-label-font-weight:400}*{box-sizing:border-box}.label{max-width:168px;margin:-3px}.label-text,\n.label-input{width:100%;height:24px;padding:3px;border:none;line-height:var(--local-label-line-height);font-size:var(--local-label-font-size);color:var(--local-label-color);font-weight:var(--local-label-font-weight);text-align:center;font-family:inherit;cursor:text;-webkit-user-select:text;user-select:text}.label-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.label.editing .label-text,\n.label.empty:not(.editing) .label-text,\n.label:not(.editing) .label-input{display:none}',""]);const o=l.toString()},497:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(6758),i=n.n(a),s=n(935),l=n.n(s)()(i());l.push([e.id,'*{box-sizing:border-box}:host{display:block;border:1px solid var(--palette-gray-5);cursor:default;-webkit-user-select:none;user-select:none}:host([hidden]){display:none}:host([usage="dragging"]){opacity:0.75;position:fixed}:host(:not([usage="library"])){background:var(--palette-gray-3);width:60px;height:60px}:host([usage="library"]){width:180px;height:30px;margin-bottom:10px}div{width:100%;height:100%;display:flex;align-items:center;justify-content:center}:host(:not([usage="dragging"]):not([usage="library"]):hover),\n:host([status="highlighted"]){color:var(--palette-blue-5);background:var(--palette-blue-1);border-color:1px solid var(--palette-blue-4)}:host([status="faded"]){opacity:0.3}:host([decorator="area"]){width:100px;height:60px;background:rgba(119,141,195,0.1);border:none}:host([decorator="text"]){width:auto;height:auto;background:none;border:none}',""]);const o=l.toString()},780:(e,t,n)=>{n.d(t,{_:()=>s});var a=n(6330),i=n(3496),s=function(){var e=(0,a.A)((function*(e,t,n){return(yield i.http.post("api/gateway/cmdb.instance.CreateInstance/v2/object/".concat(e,"/instance"),t,n)).data}));return function(t,n,a){return e.apply(this,arguments)}}()},8406:(e,t,n)=>{n.d(t,{y:()=>s});var a=n(6330),i=n(3496),s=function(){var e=(0,a.A)((function*(e,t,n){return(yield i.http.post("api/gateway/cmdb.instance.PostSearchV3/v3/object/".concat(e,"/instance/_search"),t,n)).data}));return function(t,n,a){return e.apply(this,arguments)}}()},6841:(e,t,n)=>{n.d(t,{x:()=>s});var a=n(6330),i=n(3496),s=function(){var e=(0,a.A)((function*(e,t,n,a){return(yield i.http.put("api/gateway/cmdb.instance.UpdateInstanceV2/v2/object/".concat(e,"/instance/").concat(t),n,a)).data}));return function(t,n,a,i){return e.apply(this,arguments)}}()},4993:(e,t,n)=>{function a(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function i(e){this._context=e}function s(e){return new i(e)}n.d(t,{Ay:()=>s}),i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:a(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:a(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}},4643:(e,t,n)=>{n.d(t,{dJ:()=>i,kl:()=>s});class a{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function i(e){return new a(e,!0)}function s(e){return new a(e,!1)}},482:(e,t,n)=>{function a(e){this._context=e}function i(e){return new a(e)}n.d(t,{A:()=>i}),a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}}},3488:(e,t,n)=>{function a(e){return e<0?-1:1}function i(e,t,n){var i=e._x1-e._x0,s=t-e._x1,l=(e._y1-e._y0)/(i||s<0&&-0),o=(n-e._y1)/(s||i<0&&-0),r=(l*s+o*i)/(i+s);return(a(l)+a(o))*Math.min(Math.abs(l),Math.abs(o),.5*Math.abs(r))||0}function s(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function l(e,t,n){var a=e._x0,i=e._y0,s=e._x1,l=e._y1,o=(s-a)/3;e._context.bezierCurveTo(a+o,i+o*t,s-o,l-o*n,s,l)}function o(e){this._context=e}function r(e){this._context=new h(e)}function h(e){this._context=e}function c(e){return new o(e)}function d(e){return new r(e)}n.d(t,{G:()=>c,N:()=>d}),o.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:l(this,this._t0,s(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,l(this,s(this,n=i(this,e,t)),n);break;default:l(this,this._t0,n=i(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(r.prototype=Object.create(o.prototype)).point=function(e,t){o.prototype.point.call(this,t,e)},h.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,a,i,s){this._context.bezierCurveTo(t,e,a,n,s,i)}}},6066:(e,t,n)=>{function a(e){this._context=e}function i(e){var t,n,a=e.length-1,i=new Array(a),s=new Array(a),l=new Array(a);for(i[0]=0,s[0]=2,l[0]=e[0]+2*e[1],t=1;t<a-1;++t)i[t]=1,s[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[a-1]=2,s[a-1]=7,l[a-1]=8*e[a-1]+e[a],t=1;t<a;++t)n=i[t]/s[t-1],s[t]-=n,l[t]-=n*l[t-1];for(i[a-1]=l[a-1]/s[a-1],t=a-2;t>=0;--t)i[t]=(l[t]-i[t+1])/s[t];for(s[a-1]=(e[a]+i[a-1])/2,t=0;t<a-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function s(e){return new a(e)}n.d(t,{A:()=>s}),a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var a=i(e),s=i(t),l=0,o=1;o<n;++l,++o)this._context.bezierCurveTo(a[0][l],s[0][l],a[1][l],s[1][l],e[o],t[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}}},3269:(e,t,n)=>{function a(e){return function(){return e}}n.d(t,{A:()=>p}),Array.prototype.slice;var i=n(482);const s=Math.PI,l=2*s,o=1e-6,r=l-o;function h(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class c{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?h:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return h;const n=10**t;return function(e){this._+=e[0];for(let t=1,a=e.length;t<a;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,a){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,t,n,a,i,s){this._append`C${+e},${+t},${+n},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(e,t,n,a,i){if(e=+e,t=+t,n=+n,a=+a,(i=+i)<0)throw new Error(`negative radius: ${i}`);let l=this._x1,r=this._y1,h=n-e,c=a-t,d=l-e,u=r-t,p=d*d+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(p>o)if(Math.abs(u*h-c*d)>o&&i){let g=n-l,A=a-r,f=h*h+c*c,y=g*g+A*A,v=Math.sqrt(f),b=Math.sqrt(p),m=i*Math.tan((s-Math.acos((f+p-y)/(2*v*b)))/2),k=m/b,w=m/v;Math.abs(k-1)>o&&this._append`L${e+k*d},${t+k*u}`,this._append`A${i},${i},0,0,${+(u*g>d*A)},${this._x1=e+w*h},${this._y1=t+w*c}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,a,i,h){if(e=+e,t=+t,h=!!h,(n=+n)<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(a),d=n*Math.sin(a),u=e+c,p=t+d,g=1^h,A=h?a-i:i-a;null===this._x1?this._append`M${u},${p}`:(Math.abs(this._x1-u)>o||Math.abs(this._y1-p)>o)&&this._append`L${u},${p}`,n&&(A<0&&(A=A%l+l),A>r?this._append`A${n},${n},0,1,${g},${e-c},${t-d}A${n},${n},0,1,${g},${this._x1=u},${this._y1=p}`:A>o&&this._append`A${n},${n},0,${+(A>=s)},${g},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function d(e){return e[0]}function u(e){return e[1]}function p(e,t){var n=a(!0),s=null,l=i.A,o=null,r=function(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new c(t)}(h);function h(a){var i,h,c,d=(a=function(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(a)).length,u=!1;for(null==s&&(o=l(c=r())),i=0;i<=d;++i)!(i<d&&n(h=a[i],i,a))===u&&((u=!u)?o.lineStart():o.lineEnd()),u&&o.point(+e(h,i,a),+t(h,i,a));if(c)return o=null,c+""||null}return e="function"==typeof e?e:void 0===e?d:a(e),t="function"==typeof t?t:void 0===t?u:a(t),h.x=function(t){return arguments.length?(e="function"==typeof t?t:a(+t),h):e},h.y=function(e){return arguments.length?(t="function"==typeof e?e:a(+e),h):t},h.defined=function(e){return arguments.length?(n="function"==typeof e?e:a(!!e),h):n},h.curve=function(e){return arguments.length?(l=e,null!=s&&(o=l(s)),h):l},h.context=function(e){return arguments.length?(null==e?s=o=null:o=l(s=e),h):s},h}c.prototype}}]);
3
- //# sourceMappingURL=4017.2680d65a.js.map
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[6314,3933],{3933:(e,t,o)=>{function n(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,s){if("string"==typeof t?r.name===t:t.includes(r.name)){const t=[];for(let i=1;i<=o;i++){const o=s[s.length-i];if("MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key){const s=o.node;s.computed||"Identifier"!==s.property.type?s.computed&&"Literal"===s.property.type&&"string"==typeof s.property.value?t.push(n?`${r.name}.${s.property.value}`:s.property.value):e.hasNonStaticUsage=!0:t.push(n?`${r.name}.${s.property.name}`:s.property.name)}else e.hasNonStaticUsage=!0}t.length===o&&e.usedProperties.add(t.join("."))}}}function r(e,t){return function(o,n,r){if(n.name===e){const e=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?o.usedArgs.add(t.value):o.hasNonStaticUsage=!0}}}}}o.r(t),o.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>s,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>S,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>v,strictCollectMemberUsage:()=>l,track:()=>f,trackAll:()=>y,traverseStoryboardExpressions:()=>u,traverseStoryboardFunction:()=>g,traverseStoryboardFunctions:()=>h,unwrapProvider:()=>c.unwrapProvider});const s=r("APP","getMenu"),i=r("INSTALLED_APPS","has");var a=o(8897),c=o(279);function u(e,t,o){const n=new WeakSet,{matchExpressionString:r,visitNotMatchedExpressionString:s,visitNonExpressionString:i,visitObject:u}="string"==typeof o?{matchExpressionString:e=>e.includes(o)}:o;!function e(o){if("string"==typeof o)if((0,a.isEvaluable)(o))if(r(o))try{(0,a.preevaluate)(o,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,o)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==s||s(o);else null==i||i(o);else if((0,c.isObject)(o)){if(n.has(o))return;n.add(o),null==u||u(o);for(const t of Array.isArray(o)?o:Object.values(o))e(t)}}(e)}function l(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:r,usedProperties:s}=p(e,t,o);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${r}"`);return s}function p(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={usedProperties:new Set,hasNonStaticUsage:!1},s=n(r,t,o);return u(e,((e,t,o)=>{s(e,t),r.hasNonStaticUsage&&(r.nonStaticUsage=o)}),t),r}const d=["CTX","STATE","FORM_STATE"];function f(e,t,o){if(e.includes(t)){const r={usedProperties:new Set,hasNonStaticUsage:!1},{expression:s}=(0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(r,o)}});let i;if("SequenceExpression"===s.type&&(i=s.expressions[0])&&"Literal"===i.type&&i.value===t){if(r.usedProperties.size>0)return r.usedProperties;console.warn(`You are using "${t}" but no \`${o}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function y(e){if(d.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,d,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],o={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,r]=e.split(".");o[n[t]]||(o[n[t]]=[]),o[n[t]].push(r)})),o}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function h(e,t,o){if(Array.isArray(e))for(const n of e)null!=o&&o.matchSource&&!o.matchSource(n.source)||g(n,t)}function g(e,t,o){try{(0,a.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){o||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function S(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&g(e,n(s,t,r),o),s.hasNonStaticUsage&&!o)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return s.usedProperties.delete(e.name),s.usedProperties}const m="PERMISSIONS",b="check";function v(e){const t=new Set,o=k(t),{customTemplates:n,functions:r}=e.meta??{};return u([e.routes,n],o,m),h(r,o,{matchSource:e=>e.includes(m)}),Array.from(t)}function P(e){const t=new Set;return u(e,k(t),m),Array.from(t)}function k(e){return function(t,o){if(t.name===m){const t=o[o.length-1],n=o[o.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===b:"Identifier"===t.node.property.type&&t.node.property.name===b))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}}}]);
2
- //# sourceMappingURL=6314.d82ad8ed.js.map