@getvibeguard/cli 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +5 -7
  2. package/dist/cli.js +22 -5
  3. package/dist/cli.js.map +1 -1
  4. package/{dashboard/dist/assets/arc-CZ1oDkm-.js → dist/dashboard/assets/arc-Zw29NTJs.js} +1 -1
  5. package/{dashboard/dist/assets/blockDiagram-c4efeb88-BLITAZDl.js → dist/dashboard/assets/blockDiagram-c4efeb88-fCn7tMGy.js} +1 -1
  6. package/{dashboard/dist/assets/c4Diagram-c83219d4-DErNj891.js → dist/dashboard/assets/c4Diagram-c83219d4-BHAeFAIO.js} +1 -1
  7. package/dist/dashboard/assets/channel-DE-37r3a.js +1 -0
  8. package/{dashboard/dist/assets/classDiagram-beda092f-Bj8IB6RW.js → dist/dashboard/assets/classDiagram-beda092f-25a2-OWo.js} +1 -1
  9. package/{dashboard/dist/assets/classDiagram-v2-2358418a-BZtd2g5W.js → dist/dashboard/assets/classDiagram-v2-2358418a-D4U9oMuI.js} +1 -1
  10. package/dist/dashboard/assets/clone-CTyp2qDQ.js +1 -0
  11. package/{dashboard/dist/assets/createText-1719965b-DkNrTk-5.js → dist/dashboard/assets/createText-1719965b-D0wnbRTv.js} +1 -1
  12. package/{dashboard/dist/assets/edges-96097737-CYxl0j3g.js → dist/dashboard/assets/edges-96097737-BXnyA0LP.js} +1 -1
  13. package/{dashboard/dist/assets/erDiagram-0228fc6a-ClEp9Atg.js → dist/dashboard/assets/erDiagram-0228fc6a-DlqezdIm.js} +1 -1
  14. package/{dashboard/dist/assets/flowDb-c6c81e3f-ClDJCJwu.js → dist/dashboard/assets/flowDb-c6c81e3f-aroaVbzj.js} +1 -1
  15. package/{dashboard/dist/assets/flowDiagram-50d868cf-DYxwClWS.js → dist/dashboard/assets/flowDiagram-50d868cf-Ch9HfBak.js} +1 -1
  16. package/dist/dashboard/assets/flowDiagram-v2-4f6560a1-CRp13RN3.js +1 -0
  17. package/{dashboard/dist/assets/flowchart-elk-definition-6af322e1-C-wX1mNx.js → dist/dashboard/assets/flowchart-elk-definition-6af322e1-Ed3twmrH.js} +1 -1
  18. package/{dashboard/dist/assets/ganttDiagram-a2739b55-DTeLavAj.js → dist/dashboard/assets/ganttDiagram-a2739b55-DE0GpIYx.js} +1 -1
  19. package/{dashboard/dist/assets/gitGraphDiagram-82fe8481-ClxNoYya.js → dist/dashboard/assets/gitGraphDiagram-82fe8481-C83MyuVG.js} +1 -1
  20. package/{dashboard/dist/assets/graph-CT-F3Got.js → dist/dashboard/assets/graph-BLr4Ffha.js} +1 -1
  21. package/{dashboard/dist/assets/index-5325376f-C-jTCYZA.js → dist/dashboard/assets/index-5325376f-mYkVswj-.js} +1 -1
  22. package/{dashboard/dist/assets/index-CvYvquQR.js → dist/dashboard/assets/index-BfWjS_S_.js} +57 -57
  23. package/dist/dashboard/assets/index-CG33IJy9.css +1 -0
  24. package/{dashboard/dist/assets/infoDiagram-8eee0895-Zljudo5L.js → dist/dashboard/assets/infoDiagram-8eee0895-C1JY6Gz7.js} +1 -1
  25. package/{dashboard/dist/assets/journeyDiagram-c64418c1-DXzTbuum.js → dist/dashboard/assets/journeyDiagram-c64418c1-DIaRkSVl.js} +1 -1
  26. package/{dashboard/dist/assets/layout-CVO3EizT.js → dist/dashboard/assets/layout-rGf_d26b.js} +1 -1
  27. package/{dashboard/dist/assets/line-CIgln-0z.js → dist/dashboard/assets/line-D4Wrs8dE.js} +1 -1
  28. package/{dashboard/dist/assets/linear-bmIUMQqg.js → dist/dashboard/assets/linear-BPuO-XRo.js} +1 -1
  29. package/{dashboard/dist/assets/mindmap-definition-8da855dc-BDLTNZYk.js → dist/dashboard/assets/mindmap-definition-8da855dc-DxHI4ECM.js} +1 -1
  30. package/{dashboard/dist/assets/pieDiagram-a8764435-DtcOKNPc.js → dist/dashboard/assets/pieDiagram-a8764435-I5l7IctA.js} +1 -1
  31. package/{dashboard/dist/assets/quadrantDiagram-1e28029f-zoSI_Ltf.js → dist/dashboard/assets/quadrantDiagram-1e28029f-x44TCREk.js} +1 -1
  32. package/{dashboard/dist/assets/requirementDiagram-08caed73-TsQZ9lTB.js → dist/dashboard/assets/requirementDiagram-08caed73-D9uMHZP-.js} +1 -1
  33. package/{dashboard/dist/assets/sankeyDiagram-a04cb91d-DE5ciDwD.js → dist/dashboard/assets/sankeyDiagram-a04cb91d-xeALgUeC.js} +1 -1
  34. package/{dashboard/dist/assets/sequenceDiagram-c5b8d532-DhabPb2n.js → dist/dashboard/assets/sequenceDiagram-c5b8d532-DaLckDDa.js} +1 -1
  35. package/{dashboard/dist/assets/stateDiagram-1ecb1508-Bg2q_YNx.js → dist/dashboard/assets/stateDiagram-1ecb1508-Dtr7CFOW.js} +1 -1
  36. package/{dashboard/dist/assets/stateDiagram-v2-c2b004d7-Bs5iRjYB.js → dist/dashboard/assets/stateDiagram-v2-c2b004d7-CNqGjdcN.js} +1 -1
  37. package/{dashboard/dist/assets/styles-b4e223ce-DchmAmav.js → dist/dashboard/assets/styles-b4e223ce-Do81yG4g.js} +1 -1
  38. package/{dashboard/dist/assets/styles-ca3715f6-Bu5zjaDx.js → dist/dashboard/assets/styles-ca3715f6-gBFM298f.js} +1 -1
  39. package/{dashboard/dist/assets/styles-d45a18b0-jCaD8baR.js → dist/dashboard/assets/styles-d45a18b0-CWp-U-WB.js} +1 -1
  40. package/{dashboard/dist/assets/svgDrawCommon-b86b1483-BrYVGY4c.js → dist/dashboard/assets/svgDrawCommon-b86b1483-CHCfcnJ8.js} +1 -1
  41. package/{dashboard/dist/assets/timeline-definition-faaaa080--sq0bTHe.js → dist/dashboard/assets/timeline-definition-faaaa080-Ceiehx9T.js} +1 -1
  42. package/dist/dashboard/assets/vibeguard-shield-logo-B9fXT9Ll.png +0 -0
  43. package/{dashboard/dist/assets/xychartDiagram-f5964ef8-ByvzN0uj.js → dist/dashboard/assets/xychartDiagram-f5964ef8-CkICfNgr.js} +1 -1
  44. package/{dashboard/dist → dist/dashboard}/index.html +8 -2
  45. package/dist/index.js +18 -3
  46. package/dist/index.js.map +1 -1
  47. package/dist/librarian/initializer.d.ts +1 -0
  48. package/dist/librarian/initializer.d.ts.map +1 -1
  49. package/dist/librarian/initializer.js +86 -23
  50. package/dist/librarian/initializer.js.map +1 -1
  51. package/dist/librarian/memory-manager.d.ts +1 -0
  52. package/dist/librarian/memory-manager.d.ts.map +1 -1
  53. package/dist/librarian/memory-manager.js +17 -4
  54. package/dist/librarian/memory-manager.js.map +1 -1
  55. package/dist/librarian/oracle.d.ts +1 -0
  56. package/dist/librarian/oracle.d.ts.map +1 -1
  57. package/dist/librarian/oracle.js +14 -4
  58. package/dist/librarian/oracle.js.map +1 -1
  59. package/dist/librarian/summarizer.d.ts.map +1 -1
  60. package/dist/librarian/summarizer.js +1 -2
  61. package/dist/librarian/summarizer.js.map +1 -1
  62. package/dist/librarian/watcher.d.ts.map +1 -1
  63. package/dist/librarian/watcher.js +4 -0
  64. package/dist/librarian/watcher.js.map +1 -1
  65. package/dist/utils/git.d.ts +11 -1
  66. package/dist/utils/git.d.ts.map +1 -1
  67. package/dist/utils/git.js +64 -6
  68. package/dist/utils/git.js.map +1 -1
  69. package/dist/utils/llm.d.ts +3 -0
  70. package/dist/utils/llm.d.ts.map +1 -1
  71. package/dist/utils/llm.js +39 -3
  72. package/dist/utils/llm.js.map +1 -1
  73. package/package.json +6 -6
  74. package/dashboard/dist/assets/channel-sWBGOq9p.js +0 -1
  75. package/dashboard/dist/assets/clone-DtEyH3ya.js +0 -1
  76. package/dashboard/dist/assets/flowDiagram-v2-4f6560a1-D7vEnO1T.js +0 -1
  77. package/dashboard/dist/assets/index-n43poL1x.css +0 -1
  78. /package/{dashboard/dist → dist/dashboard}/assets/Tableau10-B-NsZVaP.js +0 -0
  79. /package/{dashboard/dist → dist/dashboard}/assets/array-BKyUJesY.js +0 -0
  80. /package/{dashboard/dist → dist/dashboard}/assets/init-Gi6I4Gst.js +0 -0
  81. /package/{dashboard/dist → dist/dashboard}/assets/katex-Cu_Erd72.js +0 -0
  82. /package/{dashboard/dist → dist/dashboard}/assets/ordinal-Cboi1Yqb.js +0 -0
  83. /package/{dashboard/dist → dist/dashboard}/assets/path-CbwjOpE9.js +0 -0
@@ -0,0 +1 @@
1
+ @import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap";@import"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,-apple-system,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,Fira Code,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.oracle-glow{box-shadow:0 0 20px #6366f133;border-color:#6366f14d}.oracle-glow-active{animation:oracleGlow 2s ease-in-out infinite}.text-gradient{background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);-webkit-background-clip:text;background-clip:text;color:transparent}.bento-card{border-radius:.375rem;border-width:1px;border-color:#ffffff14;background-color:#ffffff08;padding:1.5rem;--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.bento-card:hover{border-color:#ffffff1f;background-color:#ffffff0d}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-4{top:1rem;right:1rem;bottom:1rem;left:1rem}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.col-span-12{grid-column:span 12 / span 12}.m-0{margin:0}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-60{margin-left:15rem}.ml-8{margin-left:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.h-10{height:2.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-\[calc\(100\%-60px\)\]{height:calc(100% - 60px)}.h-full{height:100%}.max-h-\[400px\]{max-height:400px}.max-h-\[600px\]{max-height:600px}.min-h-\[400px\]{min-height:400px}.min-h-screen{min-height:100vh}.w-0\.5{width:.125rem}.w-10{width:2.5rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-8{width:2rem}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-6xl{max-width:72rem}.max-w-\[200px\]{max-width:200px}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-vg-error\/20{border-color:#ef444433}.border-vg-error\/30{border-color:#ef44444d}.border-vg-indigo\/20{border-color:#6366f133}.border-vg-success\/20{border-color:#10b98133}.border-vg-violet\/20{border-color:#8b5cf633}.border-vg-warning\/20{border-color:#f59e0b33}.border-vg-warning\/30{border-color:#f59e0b4d}.border-white\/\[0\.04\]{border-color:#ffffff0a}.border-white\/\[0\.06\]{border-color:#ffffff0f}.border-white\/\[0\.08\]{border-color:#ffffff14}.bg-black\/20{background-color:#0003}.bg-black\/30{background-color:#0000004d}.bg-vg-bg{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity, 1))}.bg-vg-bg\/90{background-color:#09090be6}.bg-vg-errorMuted{background-color:#ef444426}.bg-vg-success{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-vg-success\/20{background-color:#10b98133}.bg-vg-successMuted{background-color:#10b98126}.bg-vg-textDim{--tw-bg-opacity: 1;background-color:rgb(82 82 91 / var(--tw-bg-opacity, 1))}.bg-vg-violet\/10{background-color:#8b5cf61a}.bg-vg-warningMuted{background-color:#f59e0b26}.bg-white\/\[0\.02\]{background-color:#ffffff05}.bg-white\/\[0\.03\]{background-color:#ffffff08}.bg-white\/\[0\.05\]{background-color:#ffffff0d}.bg-white\/\[0\.06\]{background-color:#ffffff0f}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-vg-bg{--tw-gradient-from: #09090b var(--tw-gradient-from-position);--tw-gradient-to: rgb(9 9 11 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-vg-indigo{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-vg-indigo\/50{--tw-gradient-from: rgb(99 102 241 / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-vg-violet{--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position)}.to-vg-violet\/30{--tw-gradient-to: rgb(139 92 246 / .3) var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.pl-3{padding-left:.75rem}.pr-2{padding-right:.5rem}.pt-3{padding-top:.75rem}.text-center{text-align:center}.font-mono{font-family:JetBrains Mono,Fira Code,monospace}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-vg-cyan{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-vg-error{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-vg-indigo{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity, 1))}.text-vg-success{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-vg-text{--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity, 1))}.text-vg-textDim{--tw-text-opacity: 1;color:rgb(82 82 91 / var(--tw-text-opacity, 1))}.text-vg-textMuted{--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity, 1))}.text-vg-textSecondary{--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity, 1))}.text-vg-violet{--tw-text-opacity: 1;color:rgb(139 92 246 / var(--tw-text-opacity, 1))}.text-vg-warning{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-75{opacity:.75}.opacity-\[0\.02\]{opacity:.02}.shadow-glow-error{--tw-shadow: 0 0 15px rgba(239, 68, 68, .25);--tw-shadow-colored: 0 0 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-glow-success{--tw-shadow: 0 0 15px rgba(16, 185, 129, .25);--tw-shadow-colored: 0 0 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-glow-violet{--tw-shadow: 0 0 20px rgba(139, 92, 246, .3);--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-glow-warning{--tw-shadow: 0 0 15px rgba(245, 158, 11, .25);--tw-shadow-colored: 0 0 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-2xl{--tw-backdrop-blur: blur(40px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}:root{--vg-bg: #09090b;--vg-indigo: #6366f1;--vg-violet: #8b5cf6}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,system-ui,-apple-system,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--vg-bg);color:#fafafa;font-feature-settings:"cv02","cv03","cv04","cv11"}code,pre{font-family:JetBrains Mono,Fira Code,monospace}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#ffffff1a;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#ffffff26}::-moz-selection{background:#6366f14d;color:#fafafa}::selection{background:#6366f14d;color:#fafafa}@keyframes oracleGlow{0%,to{box-shadow:0 0 20px #6366f133;border-color:#6366f14d}50%{box-shadow:0 0 40px #6366f159;border-color:#6366f180}}.noise-overlay:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");opacity:.02;pointer-events:none;z-index:0}.gradient-mesh{background:radial-gradient(ellipse at 20% 0%,rgba(99,102,241,.08) 0%,transparent 50%),radial-gradient(ellipse at 80% 100%,rgba(139,92,246,.06) 0%,transparent 50%),radial-gradient(ellipse at 0% 50%,rgba(34,211,238,.04) 0%,transparent 40%)}@keyframes statusPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(1.1)}}.status-pulse{animation:statusPulse 2s ease-in-out infinite}.prose-vg{color:#a1a1aa;font-size:.875rem;line-height:1.7}.prose-vg h1,.prose-vg h2,.prose-vg h3,.prose-vg h4{color:#fafafa;font-weight:600;margin-top:1.5rem;margin-bottom:.75rem}.prose-vg h1{font-size:1.5rem;background:linear-gradient(90deg,#6366f1,#8b5cf6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;border-bottom:1px solid rgba(255,255,255,.08);padding-bottom:.5rem}.prose-vg h2{font-size:1.125rem;color:#e4e4e7}.prose-vg h3{font-size:1rem;color:#d4d4d8}.prose-vg code{background:#0006;color:#22d3ee;padding:.15rem .4rem;border-radius:.25rem;font-size:.8em;font-family:JetBrains Mono,monospace}.prose-vg pre{background:#00000080;border:1px solid rgba(255,255,255,.06);border-radius:.375rem;padding:1rem;overflow-x:auto;margin:1rem 0}.prose-vg pre code{background:transparent;padding:0;color:#10b981}.prose-vg a{color:#6366f1;text-decoration:none;transition:color .2s}.prose-vg a:hover{color:#818cf8}.prose-vg ul,.prose-vg ol{margin-left:1.25rem;margin-top:.5rem;margin-bottom:.5rem}.prose-vg li{margin:.375rem 0}.prose-vg strong{color:#fafafa;font-weight:600}.prose-vg blockquote{border-left:2px solid rgba(99,102,241,.5);padding-left:1rem;margin:1rem 0;color:#71717a;font-style:italic}.hover\:border-white\/\[0\.15\]:hover{border-color:#ffffff26}.hover\:bg-white\/\[0\.03\]:hover{background-color:#ffffff08}.hover\:bg-white\/\[0\.04\]:hover{background-color:#ffffff0a}.hover\:bg-white\/\[0\.05\]:hover{background-color:#ffffff0d}.hover\:text-vg-text:hover{--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity, 1))}.hover\:shadow-oracle:hover{--tw-shadow: 0 0 20px rgba(99, 102, 241, .2);--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:text-vg-indigoLight{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width: 768px){.md\:col-span-6{grid-column:span 6 / span 6}}@media (min-width: 1024px){.lg\:col-span-4{grid-column:span 4 / span 4}.lg\:col-span-8{grid-column:span 8 / span 8}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:p-8{padding:2rem}}
@@ -1,4 +1,4 @@
1
- import{l as Y,U as D,e as M}from"./index-CvYvquQR.js";var O=function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",v=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},b,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(b in d[g])this.terminals_[b]&&b>N&&S.push("'"+this.terminals_[b]+"'");o.showPosition?A="Parse error on line "+(v+1)+`:
1
+ import{l as Y,U as D,e as M}from"./index-BfWjS_S_.js";var O=function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",v=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},b,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(b in d[g])this.terminals_[b]&&b>N&&S.push("'"+this.terminals_[b]+"'");o.showPosition?A="Parse error on line "+(v+1)+`:
2
2
  `+o.showPosition()+`
3
3
  Expecting `+S.join(", ")+", got '"+(this.terminals_[l]||l)+"'":A="Parse error on line "+(v+1)+": Unexpected "+(l==T?"end of input":"'"+(this.terminals_[l]||l)+"'"),this.parseError(A,{text:o.match,token:this.terminals_[l]||l,line:o.yylineno,loc:I,expected:S})}if(h[0]instanceof Array&&h.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+l);switch(h[0]){case 1:n.push(l),r.push(o.yytext),i.push(o.yylloc),n.push(h[1]),l=null,L=o.yyleng,P=o.yytext,v=o.yylineno,I=o.yylloc;break;case 2:if(c=this.productions_[h[1]][1],_.$=r[r.length-c],_._$={first_line:i[i.length-(c||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(c||1)].first_column,last_column:i[i.length-1].last_column},z&&(_._$.range=[i[i.length-(c||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(_,[P,L,v,p.yy,h[1],r,i].concat(R)),typeof w<"u")return w;c&&(n=n.slice(0,-1*c*2),r=r.slice(0,-1*c),i=i.slice(0,-1*c)),n.push(this.productions_[h[1]][0]),r.push(_.$),i.push(_._$),F=d[n[n.length-2]][n[n.length-1]],n.push(F);break;case 3:return!0}}return!0}},k=function(){var u={EOF:1,parseError:function(e,n){if(this.yy.parser)this.yy.parser.parseError(e,n);else throw new Error(e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{a as yt,s as ft,b as dt,c as pt,C as gt,D as mt,g as C,d as W,e as xt,E as kt}from"./index-CvYvquQR.js";import{a as _t,g as it,f as bt,d as vt}from"./svgDrawCommon-b86b1483-BrYVGY4c.js";import{a as Q}from"./arc-CZ1oDkm-.js";import"./path-CbwjOpE9.js";var G=function(){var t=function(p,s,r,a){for(r=r||{},a=p.length;a--;r[p[a]]=s);return r},e=[6,8,10,11,12,14,16,17,18],i=[1,9],o=[1,10],n=[1,11],h=[1,12],c=[1,13],f=[1,14],y={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:function(s,r,a,u,d,l,w){var k=l.length-1;switch(d){case 1:return l[k-1];case 2:this.$=[];break;case 3:l[k-1].push(l[k]),this.$=l[k-1];break;case 4:case 5:this.$=l[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(l[k].substr(6)),this.$=l[k].substr(6);break;case 9:this.$=l[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=l[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(l[k].substr(8)),this.$=l[k].substr(8);break;case 13:u.addTask(l[k-1],l[k]),this.$="task";break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:o,14:n,16:h,17:c,18:f},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:i,12:o,14:n,16:h,17:c,18:f},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:function(s,r){if(r.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=r,a}},parse:function(s){var r=this,a=[0],u=[],d=[null],l=[],w=this.table,k="",R=0,Z=0,ot=2,J=1,ct=l.slice.call(arguments,1),x=Object.create(this.lexer),S={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(S.yy[z]=this.yy[z]);x.setInput(s,S.yy),S.yy.lexer=x,S.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var Y=x.yylloc;l.push(Y);var ht=x.options&&x.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ut(){var T;return T=u.pop()||x.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=r.symbols_[T]||T),T}for(var _,E,b,O,I={},N,$,K,B;;){if(E=a[a.length-1],this.defaultActions[E]?b=this.defaultActions[E]:((_===null||typeof _>"u")&&(_=ut()),b=w[E]&&w[E][_]),typeof b>"u"||!b.length||!b[0]){var q="";B=[];for(N in w[E])this.terminals_[N]&&N>ot&&B.push("'"+this.terminals_[N]+"'");x.showPosition?q="Parse error on line "+(R+1)+`:
1
+ import{a as yt,s as ft,b as dt,c as pt,C as gt,D as mt,g as C,d as W,e as xt,E as kt}from"./index-BfWjS_S_.js";import{a as _t,g as it,f as bt,d as vt}from"./svgDrawCommon-b86b1483-CHCfcnJ8.js";import{a as Q}from"./arc-Zw29NTJs.js";import"./path-CbwjOpE9.js";var G=function(){var t=function(p,s,r,a){for(r=r||{},a=p.length;a--;r[p[a]]=s);return r},e=[6,8,10,11,12,14,16,17,18],i=[1,9],o=[1,10],n=[1,11],h=[1,12],c=[1,13],f=[1,14],y={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:function(s,r,a,u,d,l,w){var k=l.length-1;switch(d){case 1:return l[k-1];case 2:this.$=[];break;case 3:l[k-1].push(l[k]),this.$=l[k-1];break;case 4:case 5:this.$=l[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(l[k].substr(6)),this.$=l[k].substr(6);break;case 9:this.$=l[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=l[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(l[k].substr(8)),this.$=l[k].substr(8);break;case 13:u.addTask(l[k-1],l[k]),this.$="task";break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:o,14:n,16:h,17:c,18:f},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:i,12:o,14:n,16:h,17:c,18:f},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:function(s,r){if(r.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=r,a}},parse:function(s){var r=this,a=[0],u=[],d=[null],l=[],w=this.table,k="",R=0,Z=0,ot=2,J=1,ct=l.slice.call(arguments,1),x=Object.create(this.lexer),S={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(S.yy[z]=this.yy[z]);x.setInput(s,S.yy),S.yy.lexer=x,S.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var Y=x.yylloc;l.push(Y);var ht=x.options&&x.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ut(){var T;return T=u.pop()||x.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=r.symbols_[T]||T),T}for(var _,E,b,O,I={},N,$,K,B;;){if(E=a[a.length-1],this.defaultActions[E]?b=this.defaultActions[E]:((_===null||typeof _>"u")&&(_=ut()),b=w[E]&&w[E][_]),typeof b>"u"||!b.length||!b[0]){var q="";B=[];for(N in w[E])this.terminals_[N]&&N>ot&&B.push("'"+this.terminals_[N]+"'");x.showPosition?q="Parse error on line "+(R+1)+`:
2
2
  `+x.showPosition()+`
3
3
  Expecting `+B.join(", ")+", got '"+(this.terminals_[_]||_)+"'":q="Parse error on line "+(R+1)+": Unexpected "+(_==J?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(q,{text:x.match,token:this.terminals_[_]||_,line:x.yylineno,loc:Y,expected:B})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(b[0]){case 1:a.push(_),d.push(x.yytext),l.push(x.yylloc),a.push(b[1]),_=null,Z=x.yyleng,k=x.yytext,R=x.yylineno,Y=x.yylloc;break;case 2:if($=this.productions_[b[1]][1],I.$=d[d.length-$],I._$={first_line:l[l.length-($||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-($||1)].first_column,last_column:l[l.length-1].last_column},ht&&(I._$.range=[l[l.length-($||1)].range[0],l[l.length-1].range[1]]),O=this.performAction.apply(I,[k,Z,R,S.yy,b[1],d,l].concat(ct)),typeof O<"u")return O;$&&(a=a.slice(0,-1*$*2),d=d.slice(0,-1*$),l=l.slice(0,-1*$)),a.push(this.productions_[b[1]][0]),d.push(I.$),l.push(I._$),K=w[a[a.length-2]][a[a.length-1]],a.push(K);break;case 3:return!0}}return!0}},m=function(){var p={EOF:1,parseError:function(r,a){if(this.yy.parser)this.yy.parser.parseError(r,a);else throw new Error(r)},setInput:function(s,r){return this.yy=r||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var r=s.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var r=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===u.length?this.yylloc.first_column:0)+u[u.length-a.length].length-a[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),r=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{a as S,b as be,c as qe,d as O,k as We,e as ze,f as Xe,g as T,h as me,j as ge,l as He,m as ye,t as Ue,n as xe,o as Je,p as Ke,G as g,q as s,i as m,r as I,v as E,s as G}from"./graph-CT-F3Got.js";import{a8 as F,a9 as Ze,aa as Qe,ab as Ee,ac as A,ad as ke,ae as en,af as Oe,ag as U,ah as nn,ai as rn,aj as J,ak as tn,al as Ne,am as an,an as on,ao as X}from"./index-CvYvquQR.js";var un=/\s/;function dn(e){for(var n=e.length;n--&&un.test(e.charAt(n)););return n}var fn=/^\s+/;function sn(e){return e&&e.slice(0,dn(e)+1).replace(fn,"")}var ae=NaN,cn=/^[-+]0x[0-9a-f]+$/i,ln=/^0b[01]+$/i,hn=/^0o[0-7]+$/i,vn=parseInt;function pn(e){if(typeof e=="number")return e;if(S(e))return ae;if(F(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=F(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=sn(e);var r=ln.test(e);return r||hn.test(e)?vn(e.slice(2),r?2:8):cn.test(e)?ae:+e}var oe=1/0,wn=17976931348623157e292;function M(e){if(!e)return e===0?e:0;if(e=pn(e),e===oe||e===-oe){var n=e<0?-1:1;return n*wn}return e===e?e:0}function bn(e){var n=M(e),r=n%1;return n===n?r?n-r:n:0}function N(e){var n=e==null?0:e.length;return n?be(e):[]}function mn(e){return Ze(Qe(e,void 0,N),e+"")}var gn=1,yn=4;function xn(e){return qe(e,gn|yn)}var Le=Object.prototype,En=Le.hasOwnProperty,kn=Ee(function(e,n){e=Object(e);var r=-1,t=n.length,i=t>2?n[2]:void 0;for(i&&A(n[0],n[1],i)&&(t=1);++r<t;)for(var o=n[r],a=ke(o),u=-1,d=a.length;++u<d;){var f=a[u],c=e[f];(c===void 0||en(c,Le[f])&&!En.call(e,f))&&(e[f]=o[f])}return e});function j(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function On(e){return function(n,r,t){var i=Object(n);if(!Oe(n)){var o=O(r);n=We(n),r=function(u){return o(i[u],u,i)}}var a=e(n,r,t);return a>-1?i[o?n[a]:a]:void 0}}var Nn=Math.max;function Ln(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:bn(r);return i<0&&(i=Nn(t+i,0)),ze(e,O(n),i)}var K=On(Ln);function Pe(e,n){var r=-1,t=Oe(e)?Array(e.length):[];return Xe(e,function(i,o,a){t[++r]=n(i,o,a)}),t}function w(e,n){var r=U(e)?T:Pe;return r(e,O(n))}function Pn(e,n){return e==null?e:nn(e,me(n),ke)}function _n(e,n){return e&&ge(e,me(n))}function Cn(e,n){return e>n}var In=Object.prototype,Rn=In.hasOwnProperty;function Tn(e,n){return e!=null&&Rn.call(e,n)}function _e(e,n){return e!=null&&He(e,n,Tn)}function Ce(e,n){return e<n}function V(e,n){var r={};return n=O(n),ge(e,function(t,i,o){rn(r,i,n(t,i,o))}),r}function Z(e,n,r){for(var t=-1,i=e.length;++t<i;){var o=e[t],a=n(o);if(a!=null&&(u===void 0?a===a&&!S(a):r(a,u)))var u=a,d=o}return d}function y(e){return e&&e.length?Z(e,J,Cn):void 0}function _(e){return e&&e.length?Z(e,J,Ce):void 0}function Q(e,n){return e&&e.length?Z(e,O(n),Ce):void 0}function Mn(e,n,r,t){if(!F(e))return e;n=ye(n,e);for(var i=-1,o=n.length,a=o-1,u=e;u!=null&&++i<o;){var d=Ue(n[i]),f=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(i!=a){var c=u[d];f=void 0,f===void 0&&(f=F(c)?c:tn(n[i+1])?[]:{})}Ne(u,d,f),u=u[d]}return e}function Sn(e,n,r){for(var t=-1,i=n.length,o={};++t<i;){var a=n[t],u=xe(e,a);r(u,a)&&Mn(o,ye(a,e),u)}return o}function Fn(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function An(e,n){if(e!==n){var r=e!==void 0,t=e===null,i=e===e,o=S(e),a=n!==void 0,u=n===null,d=n===n,f=S(n);if(!u&&!f&&!o&&e>n||o&&a&&d&&!u&&!f||t&&a&&d||!r&&d||!i)return 1;if(!t&&!o&&!f&&e<n||f&&r&&i&&!t&&!o||u&&r&&i||!a&&i||!d)return-1}return 0}function jn(e,n,r){for(var t=-1,i=e.criteria,o=n.criteria,a=i.length,u=r.length;++t<a;){var d=An(i[t],o[t]);if(d){if(t>=u)return d;var f=r[t];return d*(f=="desc"?-1:1)}}return e.index-n.index}function Bn(e,n,r){n.length?n=T(n,function(o){return U(o)?function(a){return xe(a,o.length===1?o[0]:o)}:o}):n=[J];var t=-1;n=T(n,an(O));var i=Pe(e,function(o,a,u){var d=T(n,function(f){return f(o)});return{criteria:d,index:++t,value:o}});return Fn(i,function(o,a){return jn(o,a,r)})}function Gn(e,n){return Sn(e,n,function(r,t){return Je(e,t)})}var B=mn(function(e,n){return e==null?{}:Gn(e,n)}),Vn=Math.ceil,Yn=Math.max;function $n(e,n,r,t){for(var i=-1,o=Yn(Vn((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function Dn(e){return function(n,r,t){return t&&typeof t!="number"&&A(n,r,t)&&(r=t=void 0),n=M(n),r===void 0?(r=n,n=0):r=M(r),t=t===void 0?n<r?1:-1:M(t),$n(n,r,t)}}var k=Dn(),R=Ee(function(e,n){if(e==null)return[];var r=n.length;return r>1&&A(e,n[0],n[1])?n=[]:r>2&&A(n[0],n[1],n[2])&&(n=[n[0]]),Bn(e,be(n),[])}),qn=0;function ee(e){var n=++qn;return Ke(e)+n}function Wn(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t<i;){var u=t<o?n[t]:void 0;r(a,e[t],u)}return a}function zn(e,n){return Wn(e||[],n||[],Ne)}class Xn{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return ue(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&ue(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,Hn)),t=t._prev;return"["+n.join(", ")+"]"}}function ue(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Hn(e,n){if(e!=="_next"&&e!=="_prev")return n}var Un=on(1);function Jn(e,n){if(e.nodeCount()<=1)return[];var r=Zn(e,n||Un),t=Kn(r.graph,r.buckets,r.zeroIdx);return N(w(t,function(i){return e.outEdges(i.v,i.w)}))}function Kn(e,n,r){for(var t=[],i=n[n.length-1],o=n[0],a;e.nodeCount();){for(;a=o.dequeue();)$(e,n,r,a);for(;a=i.dequeue();)$(e,n,r,a);if(e.nodeCount()){for(var u=n.length-2;u>0;--u)if(a=n[u].dequeue(),a){t=t.concat($(e,n,r,a,!0));break}}}return t}function $(e,n,r,t,i){var o=i?[]:void 0;return s(e.inEdges(t.v),function(a){var u=e.edge(a),d=e.node(a.v);i&&o.push({v:a.v,w:a.w}),d.out-=u,H(n,r,d)}),s(e.outEdges(t.v),function(a){var u=e.edge(a),d=a.w,f=e.node(d);f.in-=u,H(n,r,f)}),e.removeNode(t.v),o}function Zn(e,n){var r=new g,t=0,i=0;s(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),s(e.edges(),function(u){var d=r.edge(u.v,u.w)||0,f=n(u),c=d+f;r.setEdge(u.v,u.w,c),i=Math.max(i,r.node(u.v).out+=f),t=Math.max(t,r.node(u.w).in+=f)});var o=k(i+t+3).map(function(){return new Xn}),a=t+1;return s(r.nodes(),function(u){H(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function H(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Qn(e){var n=e.graph().acyclicer==="greedy"?Jn(e,r(e)):er(e);s(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,ee("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function er(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,s(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return s(e.nodes(),i),n}function nr(e){s(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function L(e,n,r,t){var i;do i=ee(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function rr(e){var n=new g().setGraph(e.graph());return s(e.nodes(),function(r){n.setNode(r,e.node(r))}),s(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function Ie(e){var n=new g({multigraph:e.isMultigraph()}).setGraph(e.graph());return s(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),s(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function de(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,f;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),d=u*i/o,f=u):(i<0&&(a=-a),d=a,f=a*o/i),{x:r+d,y:t+f}}function Y(e){var n=w(k(Re(e)+1),function(){return[]});return s(e.nodes(),function(r){var t=e.node(r),i=t.rank;m(i)||(n[i][t.order]=r)}),n}function tr(e){var n=_(w(e.nodes(),function(r){return e.node(r).rank}));s(e.nodes(),function(r){var t=e.node(r);_e(t,"rank")&&(t.rank-=n)})}function ir(e){var n=_(w(e.nodes(),function(o){return e.node(o).rank})),r=[];s(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;s(r,function(o,a){m(o)&&a%i!==0?--t:t&&s(o,function(u){e.node(u).rank+=t})})}function fe(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),L(e,"border",i,n)}function Re(e){return y(w(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function ar(e,n){var r={lhs:[],rhs:[]};return s(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function or(e,n){return n()}function ur(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&s(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)se(e,"borderLeft","_bl",r,i,o),se(e,"borderRight","_br",r,i,o)}}s(e.children(),n)}function se(e,n,r,t,i,o){var a={width:0,height:0,rank:o,borderType:n},u=i[n][o-1],d=L(e,"border",a,r);i[n][o]=d,e.setParent(d,t),u&&e.setEdge(u,d,{weight:1})}function dr(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&Te(e)}function fr(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&sr(e),(n==="lr"||n==="rl")&&(cr(e),Te(e))}function Te(e){s(e.nodes(),function(n){ce(e.node(n))}),s(e.edges(),function(n){ce(e.edge(n))})}function ce(e){var n=e.width;e.width=e.height,e.height=n}function sr(e){s(e.nodes(),function(n){D(e.node(n))}),s(e.edges(),function(n){var r=e.edge(n);s(r.points,D),Object.prototype.hasOwnProperty.call(r,"y")&&D(r)})}function D(e){e.y=-e.y}function cr(e){s(e.nodes(),function(n){q(e.node(n))}),s(e.edges(),function(n){var r=e.edge(n);s(r.points,q),Object.prototype.hasOwnProperty.call(r,"x")&&q(r)})}function q(e){var n=e.x;e.x=e.y,e.y=n}function lr(e){e.graph().dummyChains=[],s(e.edges(),function(n){hr(e,n)})}function hr(e,n){var r=n.v,t=e.node(r).rank,i=n.w,o=e.node(i).rank,a=n.name,u=e.edge(n),d=u.labelRank;if(o!==t+1){e.removeEdge(n);var f=void 0,c,l;for(l=0,++t;t<o;++l,++t)u.points=[],f={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},c=L(e,"edge",f,"_d"),t===d&&(f.width=u.width,f.height=u.height,f.dummy="edge-label",f.labelpos=u.labelpos),e.setEdge(r,c,{weight:u.weight},a),l===0&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,i,{weight:u.weight},a)}}function vr(e){s(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,i;for(e.setEdge(r.edgeObj,t);r.dummy;)i=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=i,r=e.node(n)})}function ne(e){var n={};function r(t){var i=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return i.rank;n[t]=!0;var o=_(w(e.outEdges(t),function(a){return r(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}s(e.sources(),r)}function C(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Me(e){var n=new g({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var i,o;pr(n,e)<t;)i=wr(n,e),o=n.hasNode(i.v)?C(e,i):-C(e,i),br(n,e,o);return n}function pr(e,n){function r(t){s(n.nodeEdges(t),function(i){var o=i.v,a=t===o?i.w:o;!e.hasNode(a)&&!C(n,i)&&(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}return s(e.nodes(),r),e.nodeCount()}function wr(e,n){return Q(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return C(n,r)})}function br(e,n,r){s(e.nodes(),function(t){n.node(t).rank+=r})}function mr(){}mr.prototype=new Error;function Se(e,n,r){U(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return s(n,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);Fe(e,a,r==="post",o,t,i)}),i}function Fe(e,n,r,t,i,o){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||o.push(n),s(i(n),function(a){Fe(e,a,r,t,i,o)}),r&&o.push(n))}function gr(e,n){return Se(e,n,"post")}function yr(e,n){return Se(e,n,"pre")}x.initLowLimValues=te;x.initCutValues=re;x.calcCutValue=Ae;x.leaveEdge=Be;x.enterEdge=Ge;x.exchangeEdges=Ve;function x(e){e=rr(e),ne(e);var n=Me(e);te(n),re(n,e);for(var r,t;r=Be(n);)t=Ge(n,e,r),Ve(n,e,r,t)}function re(e,n){var r=gr(e,e.nodes());r=r.slice(0,r.length-1),s(r,function(t){xr(e,n,t)})}function xr(e,n,r){var t=e.node(r),i=t.parent;e.edge(r,i).cutvalue=Ae(e,n,r)}function Ae(e,n,r){var t=e.node(r),i=t.parent,o=!0,a=n.edge(r,i),u=0;return a||(o=!1,a=n.edge(i,r)),u=a.weight,s(n.nodeEdges(r),function(d){var f=d.v===r,c=f?d.w:d.v;if(c!==i){var l=f===o,h=n.edge(d).weight;if(u+=l?h:-h,kr(e,r,c)){var v=e.edge(r,c).cutvalue;u+=l?-v:v}}}),u}function te(e,n){arguments.length<2&&(n=e.nodes()[0]),je(e,{},1,n)}function je(e,n,r,t,i){var o=r,a=e.node(t);return n[t]=!0,s(e.neighbors(t),function(u){Object.prototype.hasOwnProperty.call(n,u)||(r=je(e,n,r,u,t))}),a.low=o,a.lim=r++,i?a.parent=i:delete a.parent,r}function Be(e){return K(e.edges(),function(n){return e.edge(n).cutvalue<0})}function Ge(e,n,r){var t=r.v,i=r.w;n.hasEdge(t,i)||(t=r.w,i=r.v);var o=e.node(t),a=e.node(i),u=o,d=!1;o.lim>a.lim&&(u=a,d=!0);var f=I(n.edges(),function(c){return d===le(e,e.node(c.v),u)&&d!==le(e,e.node(c.w),u)});return Q(f,function(c){return C(n,c)})}function Ve(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),te(e),re(e,n),Er(e,n)}function Er(e,n){var r=K(e.nodes(),function(i){return!n.node(i).parent}),t=yr(e,r);t=t.slice(1),s(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function kr(e,n,r){return e.hasEdge(n,r)}function le(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function Or(e){switch(e.graph().ranker){case"network-simplex":he(e);break;case"tight-tree":Lr(e);break;case"longest-path":Nr(e);break;default:he(e)}}var Nr=ne;function Lr(e){ne(e),Me(e)}function he(e){x(e)}function Pr(e){var n=L(e,"root",{},"_root"),r=_r(e),t=y(E(r))-1,i=2*t+1;e.graph().nestingRoot=n,s(e.edges(),function(a){e.edge(a).minlen*=i});var o=Cr(e)+1;s(e.children(),function(a){Ye(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function Ye(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var d=fe(e,"_bt"),f=fe(e,"_bb"),c=e.node(a);e.setParent(d,a),c.borderTop=d,e.setParent(f,a),c.borderBottom=f,s(u,function(l){Ye(e,n,r,t,i,o,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,b=h.borderTop?t:2*t,P=v!==p?1:i-o[a]+1;e.setEdge(d,v,{weight:b,minlen:P,nestingEdge:!0}),e.setEdge(p,f,{weight:b,minlen:P,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+o[a]})}function _r(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&s(o,function(a){r(a,i+1)}),n[t]=i}return s(e.children(),function(t){r(t,1)}),n}function Cr(e){return G(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Ir(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,s(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Rr(e,n,r){var t={},i;s(r,function(o){for(var a=e.parent(o),u,d;a;){if(u=e.parent(a),u?(d=t[u],t[u]=a):(d=i,i=a),d&&d!==a){n.setEdge(d,a);return}a=u}})}function Tr(e,n,r){var t=Mr(e),i=new g({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return s(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),s(e[r](o),function(d){var f=d.v===o?d.w:d.v,c=i.edge(f,o),l=m(c)?0:c.weight;i.setEdge(f,o,{weight:e.edge(d).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function Mr(e){for(var n;e.hasNode(n=ee("_root")););return n}function Sr(e,n){for(var r=0,t=1;t<n.length;++t)r+=Fr(e,n[t-1],n[t]);return r}function Fr(e,n,r){for(var t=zn(r,w(r,function(f,c){return c})),i=N(w(n,function(f){return R(w(e.outEdges(f),function(c){return{pos:t[c.w],weight:e.edge(c).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var u=w(new Array(a),function(){return 0}),d=0;return s(i.forEach(function(f){var c=f.pos+o;u[c]+=f.weight;for(var l=0;c>0;)c%2&&(l+=u[c+1]),c=c-1>>1,u[c]+=f.weight;d+=f.weight*l})),d}function Ar(e){var n={},r=I(e.nodes(),function(u){return!e.children(u).length}),t=y(w(r,function(u){return e.node(u).rank})),i=w(k(t+1),function(){return[]});function o(u){if(!_e(n,u)){n[u]=!0;var d=e.node(u);i[d.rank].push(u),s(e.successors(u),o)}}var a=R(r,function(u){return e.node(u).rank});return s(a,o),i}function jr(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var i=G(t,function(o,a){var u=e.edge(a),d=e.node(a.v);return{sum:o.sum+u.weight*d.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Br(e,n){var r={};s(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};m(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),s(n.edges(),function(i){var o=r[i.v],a=r[i.w];!m(o)&&!m(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=I(r,function(i){return!i.indegree});return Gr(t)}function Gr(e){var n=[];function r(o){return function(a){a.merged||(m(a.barycenter)||m(o.barycenter)||a.barycenter>=o.barycenter)&&Vr(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),s(i.in.reverse(),r(i)),s(i.out,t(i))}return w(I(n,function(o){return!o.merged}),function(o){return B(o,["vs","i","barycenter","weight"])})}function Vr(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function Yr(e,n){var r=ar(e,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=r.lhs,i=R(r.rhs,function(c){return-c.i}),o=[],a=0,u=0,d=0;t.sort($r(!!n)),d=ve(o,i,d),s(t,function(c){d+=c.vs.length,o.push(c.vs),a+=c.barycenter*c.weight,u+=c.weight,d=ve(o,i,d)});var f={vs:N(o)};return u&&(f.barycenter=a/u,f.weight=u),f}function ve(e,n,r){for(var t;n.length&&(t=j(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function $r(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function $e(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,d={};a&&(i=I(i,function(p){return p!==a&&p!==u}));var f=jr(e,i);s(f,function(p){if(e.children(p.v).length){var b=$e(e,p.v,r,t);d[p.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter")&&qr(p,b)}});var c=Br(f,r);Dr(c,d);var l=Yr(c,t);if(a&&(l.vs=N([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),v=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function Dr(e,n){s(e,function(r){r.vs=N(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function qr(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function Wr(e){var n=Re(e),r=pe(e,k(1,n+1),"inEdges"),t=pe(e,k(n-1,-1,-1),"outEdges"),i=Ar(e);we(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,d=0;d<4;++u,++d){zr(u%2?r:t,u%4>=2),i=Y(e);var f=Sr(e,i);f<o&&(d=0,a=xn(i),o=f)}we(e,a)}function pe(e,n,r){return w(n,function(t){return Tr(e,t,r)})}function zr(e,n){var r=new g;s(e,function(t){var i=t.graph().root,o=$e(t,i,r,n);s(o.vs,function(a,u){t.node(a).order=u}),Rr(t,r,o.vs)})}function we(e,n){s(n,function(r){s(r,function(t,i){e.node(t).order=i})})}function Xr(e){var n=Ur(e);s(e.graph().dummyChains,function(r){for(var t=e.node(r),i=t.edgeObj,o=Hr(e,n,i.v,i.w),a=o.path,u=o.lca,d=0,f=a[d],c=!0;r!==i.w;){if(t=e.node(r),c){for(;(f=a[d])!==u&&e.node(f).maxRank<t.rank;)d++;f===u&&(c=!1)}if(!c){for(;d<a.length-1&&e.node(f=a[d+1]).minRank<=t.rank;)d++;f=a[d]}e.setParent(r,f),r=e.successors(r)[0]}})}function Hr(e,n,r,t){var i=[],o=[],a=Math.min(n[r].low,n[t].low),u=Math.max(n[r].lim,n[t].lim),d,f;d=r;do d=e.parent(d),i.push(d);while(d&&(n[d].low>a||u>n[d].lim));for(f=d,d=t;(d=e.parent(d))!==f;)o.push(d);return{path:i.concat(o.reverse()),lca:f}}function Ur(e){var n={},r=0;function t(i){var o=r;s(e.children(i),t),n[i]={low:o,lim:r++}}return s(e.children(),t),n}function Jr(e,n){var r={};function t(i,o){var a=0,u=0,d=i.length,f=j(o);return s(o,function(c,l){var h=Zr(e,c),v=h?e.node(h).order:d;(h||c===f)&&(s(o.slice(u,l+1),function(p){s(e.predecessors(p),function(b){var P=e.node(b),ie=P.order;(ie<a||v<ie)&&!(P.dummy&&e.node(p).dummy)&&De(r,b,p)})}),u=l+1,a=v)}),o}return G(n,t),r}function Kr(e,n){var r={};function t(o,a,u,d,f){var c;s(k(a,u),function(l){c=o[l],e.node(c).dummy&&s(e.predecessors(c),function(h){var v=e.node(h);v.dummy&&(v.order<d||v.order>f)&&De(r,h,c)})})}function i(o,a){var u=-1,d,f=0;return s(a,function(c,l){if(e.node(c).dummy==="border"){var h=e.predecessors(c);h.length&&(d=e.node(h[0]).order,t(a,f,l,u,d),f=l,u=d)}t(a,f,a.length,d,o.length)}),a}return G(n,i),r}function Zr(e,n){if(e.node(n).dummy)return K(e.predecessors(n),function(r){return e.node(r).dummy})}function De(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Qr(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function et(e,n,r,t){var i={},o={},a={};return s(n,function(u){s(u,function(d,f){i[d]=d,o[d]=d,a[d]=f})}),s(n,function(u){var d=-1;s(u,function(f){var c=t(f);if(c.length){c=R(c,function(b){return a[b]});for(var l=(c.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=c[h];o[f]===f&&d<a[p]&&!Qr(r,f,p)&&(o[p]=f,o[f]=i[f]=i[p],d=a[p])}}})}),{root:i,align:o}}function nt(e,n,r,t,i){var o={},a=rt(e,n,r,i),u=i?"borderLeft":"borderRight";function d(l,h){for(var v=a.nodes(),p=v.pop(),b={};p;)b[p]?l(p):(b[p]=!0,v.push(p),v=v.concat(h(p))),p=v.pop()}function f(l){o[l]=a.inEdges(l).reduce(function(h,v){return Math.max(h,o[v.v]+a.edge(v))},0)}function c(l){var h=a.outEdges(l).reduce(function(p,b){return Math.min(p,o[b.w]-a.edge(b))},Number.POSITIVE_INFINITY),v=e.node(l);h!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(o[l]=Math.max(o[l],h))}return d(f,a.predecessors.bind(a)),d(c,a.successors.bind(a)),s(t,function(l){o[l]=o[r[l]]}),o}function rt(e,n,r,t){var i=new g,o=e.graph(),a=ut(o.nodesep,o.edgesep,t);return s(n,function(u){var d;s(u,function(f){var c=r[f];if(i.setNode(c),d){var l=r[d],h=i.edge(l,c);i.setEdge(l,c,Math.max(a(e,f,d),h||0))}d=f})}),i}function tt(e,n){return Q(E(n),function(r){var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Pn(r,function(o,a){var u=dt(e,a)/2;t=Math.max(o+u,t),i=Math.min(o-u,i)}),t-i})}function it(e,n){var r=E(n),t=_(r),i=y(r);s(["u","d"],function(o){s(["l","r"],function(a){var u=o+a,d=e[u],f;if(d!==n){var c=E(d);f=a==="l"?t-_(c):i-y(c),f&&(e[u]=V(d,function(l){return l+f}))}})})}function at(e,n){return V(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var i=R(w(e,t));return(i[1]+i[2])/2})}function ot(e){var n=Y(e),r=X(Jr(e,n),Kr(e,n)),t={},i;s(["u","d"],function(a){i=a==="u"?n:E(n).reverse(),s(["l","r"],function(u){u==="r"&&(i=w(i,function(l){return E(l).reverse()}));var d=(a==="u"?e.predecessors:e.successors).bind(e),f=et(e,i,r,d),c=nt(e,i,f.root,f.align,u==="r");u==="r"&&(c=V(c,function(l){return-l})),t[a+u]=c})});var o=tt(e,t);return it(t,o),at(t,e.graph().align)}function ut(e,n,r){return function(t,i,o){var a=t.node(i),u=t.node(o),d=0,f;if(d+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":f=-a.width/2;break;case"r":f=a.width/2;break}if(f&&(d+=r?f:-f),f=0,d+=(a.dummy?n:e)/2,d+=(u.dummy?n:e)/2,d+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":f=u.width/2;break;case"r":f=-u.width/2;break}return f&&(d+=r?f:-f),f=0,d}}function dt(e,n){return e.node(n).width}function ft(e){e=Ie(e),st(e),_n(ot(e),function(n,r){e.node(r).x=n})}function st(e){var n=Y(e),r=e.graph().ranksep,t=0;s(n,function(i){var o=y(w(i,function(a){return e.node(a).height}));s(i,function(a){e.node(a).y=t+o/2}),t+=o+r})}function At(e,n){var r=or;r("layout",()=>{var t=r(" buildLayoutGraph",()=>xt(e));r(" runLayout",()=>ct(t,r)),r(" updateInputGraph",()=>lt(e,t))})}function ct(e,n){n(" makeSpaceForEdgeLabels",()=>Et(e)),n(" removeSelfEdges",()=>Rt(e)),n(" acyclic",()=>Qn(e)),n(" nestingGraph.run",()=>Pr(e)),n(" rank",()=>Or(Ie(e))),n(" injectEdgeLabelProxies",()=>kt(e)),n(" removeEmptyRanks",()=>ir(e)),n(" nestingGraph.cleanup",()=>Ir(e)),n(" normalizeRanks",()=>tr(e)),n(" assignRankMinMax",()=>Ot(e)),n(" removeEdgeLabelProxies",()=>Nt(e)),n(" normalize.run",()=>lr(e)),n(" parentDummyChains",()=>Xr(e)),n(" addBorderSegments",()=>ur(e)),n(" order",()=>Wr(e)),n(" insertSelfEdges",()=>Tt(e)),n(" adjustCoordinateSystem",()=>dr(e)),n(" position",()=>ft(e)),n(" positionSelfEdges",()=>Mt(e)),n(" removeBorderNodes",()=>It(e)),n(" normalize.undo",()=>vr(e)),n(" fixupEdgeLabelCoords",()=>_t(e)),n(" undoCoordinateSystem",()=>fr(e)),n(" translateGraph",()=>Lt(e)),n(" assignNodeIntersects",()=>Pt(e)),n(" reversePoints",()=>Ct(e)),n(" acyclic.undo",()=>nr(e))}function lt(e,n){s(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),s(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var ht=["nodesep","edgesep","ranksep","marginx","marginy"],vt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},pt=["acyclicer","ranker","rankdir","align"],wt=["width","height"],bt={width:0,height:0},mt=["minlen","weight","width","height","labeloffset"],gt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},yt=["labelpos"];function xt(e){var n=new g({multigraph:!0,compound:!0}),r=z(e.graph());return n.setGraph(X({},vt,W(r,ht),B(r,pt))),s(e.nodes(),function(t){var i=z(e.node(t));n.setNode(t,kn(W(i,wt),bt)),n.setParent(t,e.parent(t))}),s(e.edges(),function(t){var i=z(e.edge(t));n.setEdge(t,X({},gt,W(i,mt),B(i,yt)))}),n}function Et(e){var n=e.graph();n.ranksep/=2,s(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function kt(e){s(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};L(e,"edge-proxy",o,"_ep")}})}function Ot(e){var n=0;s(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=y(n,t.maxRank))}),e.graph().maxRank=n}function Nt(e){s(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Lt(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function d(f){var c=f.x,l=f.y,h=f.width,v=f.height;n=Math.min(n,c-h/2),r=Math.max(r,c+h/2),t=Math.min(t,l-v/2),i=Math.max(i,l+v/2)}s(e.nodes(),function(f){d(e.node(f))}),s(e.edges(),function(f){var c=e.edge(f);Object.prototype.hasOwnProperty.call(c,"x")&&d(c)}),n-=a,t-=u,s(e.nodes(),function(f){var c=e.node(f);c.x-=n,c.y-=t}),s(e.edges(),function(f){var c=e.edge(f);s(c.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(c,"x")&&(c.x-=n),Object.prototype.hasOwnProperty.call(c,"y")&&(c.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Pt(e){s(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(de(t,o)),r.points.push(de(i,a))})}function _t(e){s(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Ct(e){s(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function It(e){s(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(j(r.borderLeft)),a=e.node(j(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),s(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Rt(e){s(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function Tt(e){var n=Y(e);s(n,function(r){var t=0;s(r,function(i,o){var a=e.node(i);a.order=o+t,s(a.selfEdges,function(u){L(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function Mt(e){s(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function W(e,n){return V(B(e,n),Number)}function z(e){var n={};return s(e,function(r,t){n[t.toLowerCase()]=r}),n}export{kn as d,At as l,w as m,B as p,k as r,ee as u};
1
+ import{a as S,b as be,c as qe,d as O,k as We,e as ze,f as Xe,g as T,h as me,j as ge,l as He,m as ye,t as Ue,n as xe,o as Je,p as Ke,G as g,q as s,i as m,r as I,v as E,s as G}from"./graph-BLr4Ffha.js";import{a8 as F,a9 as Ze,aa as Qe,ab as Ee,ac as A,ad as ke,ae as en,af as Oe,ag as U,ah as nn,ai as rn,aj as J,ak as tn,al as Ne,am as an,an as on,ao as X}from"./index-BfWjS_S_.js";var un=/\s/;function dn(e){for(var n=e.length;n--&&un.test(e.charAt(n)););return n}var fn=/^\s+/;function sn(e){return e&&e.slice(0,dn(e)+1).replace(fn,"")}var ae=NaN,cn=/^[-+]0x[0-9a-f]+$/i,ln=/^0b[01]+$/i,hn=/^0o[0-7]+$/i,vn=parseInt;function pn(e){if(typeof e=="number")return e;if(S(e))return ae;if(F(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=F(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=sn(e);var r=ln.test(e);return r||hn.test(e)?vn(e.slice(2),r?2:8):cn.test(e)?ae:+e}var oe=1/0,wn=17976931348623157e292;function M(e){if(!e)return e===0?e:0;if(e=pn(e),e===oe||e===-oe){var n=e<0?-1:1;return n*wn}return e===e?e:0}function bn(e){var n=M(e),r=n%1;return n===n?r?n-r:n:0}function N(e){var n=e==null?0:e.length;return n?be(e):[]}function mn(e){return Ze(Qe(e,void 0,N),e+"")}var gn=1,yn=4;function xn(e){return qe(e,gn|yn)}var Le=Object.prototype,En=Le.hasOwnProperty,kn=Ee(function(e,n){e=Object(e);var r=-1,t=n.length,i=t>2?n[2]:void 0;for(i&&A(n[0],n[1],i)&&(t=1);++r<t;)for(var o=n[r],a=ke(o),u=-1,d=a.length;++u<d;){var f=a[u],c=e[f];(c===void 0||en(c,Le[f])&&!En.call(e,f))&&(e[f]=o[f])}return e});function j(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function On(e){return function(n,r,t){var i=Object(n);if(!Oe(n)){var o=O(r);n=We(n),r=function(u){return o(i[u],u,i)}}var a=e(n,r,t);return a>-1?i[o?n[a]:a]:void 0}}var Nn=Math.max;function Ln(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:bn(r);return i<0&&(i=Nn(t+i,0)),ze(e,O(n),i)}var K=On(Ln);function Pe(e,n){var r=-1,t=Oe(e)?Array(e.length):[];return Xe(e,function(i,o,a){t[++r]=n(i,o,a)}),t}function w(e,n){var r=U(e)?T:Pe;return r(e,O(n))}function Pn(e,n){return e==null?e:nn(e,me(n),ke)}function _n(e,n){return e&&ge(e,me(n))}function Cn(e,n){return e>n}var In=Object.prototype,Rn=In.hasOwnProperty;function Tn(e,n){return e!=null&&Rn.call(e,n)}function _e(e,n){return e!=null&&He(e,n,Tn)}function Ce(e,n){return e<n}function V(e,n){var r={};return n=O(n),ge(e,function(t,i,o){rn(r,i,n(t,i,o))}),r}function Z(e,n,r){for(var t=-1,i=e.length;++t<i;){var o=e[t],a=n(o);if(a!=null&&(u===void 0?a===a&&!S(a):r(a,u)))var u=a,d=o}return d}function y(e){return e&&e.length?Z(e,J,Cn):void 0}function _(e){return e&&e.length?Z(e,J,Ce):void 0}function Q(e,n){return e&&e.length?Z(e,O(n),Ce):void 0}function Mn(e,n,r,t){if(!F(e))return e;n=ye(n,e);for(var i=-1,o=n.length,a=o-1,u=e;u!=null&&++i<o;){var d=Ue(n[i]),f=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(i!=a){var c=u[d];f=void 0,f===void 0&&(f=F(c)?c:tn(n[i+1])?[]:{})}Ne(u,d,f),u=u[d]}return e}function Sn(e,n,r){for(var t=-1,i=n.length,o={};++t<i;){var a=n[t],u=xe(e,a);r(u,a)&&Mn(o,ye(a,e),u)}return o}function Fn(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function An(e,n){if(e!==n){var r=e!==void 0,t=e===null,i=e===e,o=S(e),a=n!==void 0,u=n===null,d=n===n,f=S(n);if(!u&&!f&&!o&&e>n||o&&a&&d&&!u&&!f||t&&a&&d||!r&&d||!i)return 1;if(!t&&!o&&!f&&e<n||f&&r&&i&&!t&&!o||u&&r&&i||!a&&i||!d)return-1}return 0}function jn(e,n,r){for(var t=-1,i=e.criteria,o=n.criteria,a=i.length,u=r.length;++t<a;){var d=An(i[t],o[t]);if(d){if(t>=u)return d;var f=r[t];return d*(f=="desc"?-1:1)}}return e.index-n.index}function Bn(e,n,r){n.length?n=T(n,function(o){return U(o)?function(a){return xe(a,o.length===1?o[0]:o)}:o}):n=[J];var t=-1;n=T(n,an(O));var i=Pe(e,function(o,a,u){var d=T(n,function(f){return f(o)});return{criteria:d,index:++t,value:o}});return Fn(i,function(o,a){return jn(o,a,r)})}function Gn(e,n){return Sn(e,n,function(r,t){return Je(e,t)})}var B=mn(function(e,n){return e==null?{}:Gn(e,n)}),Vn=Math.ceil,Yn=Math.max;function $n(e,n,r,t){for(var i=-1,o=Yn(Vn((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function Dn(e){return function(n,r,t){return t&&typeof t!="number"&&A(n,r,t)&&(r=t=void 0),n=M(n),r===void 0?(r=n,n=0):r=M(r),t=t===void 0?n<r?1:-1:M(t),$n(n,r,t)}}var k=Dn(),R=Ee(function(e,n){if(e==null)return[];var r=n.length;return r>1&&A(e,n[0],n[1])?n=[]:r>2&&A(n[0],n[1],n[2])&&(n=[n[0]]),Bn(e,be(n),[])}),qn=0;function ee(e){var n=++qn;return Ke(e)+n}function Wn(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t<i;){var u=t<o?n[t]:void 0;r(a,e[t],u)}return a}function zn(e,n){return Wn(e||[],n||[],Ne)}class Xn{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return ue(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&ue(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,Hn)),t=t._prev;return"["+n.join(", ")+"]"}}function ue(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Hn(e,n){if(e!=="_next"&&e!=="_prev")return n}var Un=on(1);function Jn(e,n){if(e.nodeCount()<=1)return[];var r=Zn(e,n||Un),t=Kn(r.graph,r.buckets,r.zeroIdx);return N(w(t,function(i){return e.outEdges(i.v,i.w)}))}function Kn(e,n,r){for(var t=[],i=n[n.length-1],o=n[0],a;e.nodeCount();){for(;a=o.dequeue();)$(e,n,r,a);for(;a=i.dequeue();)$(e,n,r,a);if(e.nodeCount()){for(var u=n.length-2;u>0;--u)if(a=n[u].dequeue(),a){t=t.concat($(e,n,r,a,!0));break}}}return t}function $(e,n,r,t,i){var o=i?[]:void 0;return s(e.inEdges(t.v),function(a){var u=e.edge(a),d=e.node(a.v);i&&o.push({v:a.v,w:a.w}),d.out-=u,H(n,r,d)}),s(e.outEdges(t.v),function(a){var u=e.edge(a),d=a.w,f=e.node(d);f.in-=u,H(n,r,f)}),e.removeNode(t.v),o}function Zn(e,n){var r=new g,t=0,i=0;s(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),s(e.edges(),function(u){var d=r.edge(u.v,u.w)||0,f=n(u),c=d+f;r.setEdge(u.v,u.w,c),i=Math.max(i,r.node(u.v).out+=f),t=Math.max(t,r.node(u.w).in+=f)});var o=k(i+t+3).map(function(){return new Xn}),a=t+1;return s(r.nodes(),function(u){H(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function H(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Qn(e){var n=e.graph().acyclicer==="greedy"?Jn(e,r(e)):er(e);s(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,ee("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function er(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,s(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return s(e.nodes(),i),n}function nr(e){s(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function L(e,n,r,t){var i;do i=ee(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function rr(e){var n=new g().setGraph(e.graph());return s(e.nodes(),function(r){n.setNode(r,e.node(r))}),s(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function Ie(e){var n=new g({multigraph:e.isMultigraph()}).setGraph(e.graph());return s(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),s(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function de(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,f;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),d=u*i/o,f=u):(i<0&&(a=-a),d=a,f=a*o/i),{x:r+d,y:t+f}}function Y(e){var n=w(k(Re(e)+1),function(){return[]});return s(e.nodes(),function(r){var t=e.node(r),i=t.rank;m(i)||(n[i][t.order]=r)}),n}function tr(e){var n=_(w(e.nodes(),function(r){return e.node(r).rank}));s(e.nodes(),function(r){var t=e.node(r);_e(t,"rank")&&(t.rank-=n)})}function ir(e){var n=_(w(e.nodes(),function(o){return e.node(o).rank})),r=[];s(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;s(r,function(o,a){m(o)&&a%i!==0?--t:t&&s(o,function(u){e.node(u).rank+=t})})}function fe(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),L(e,"border",i,n)}function Re(e){return y(w(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function ar(e,n){var r={lhs:[],rhs:[]};return s(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function or(e,n){return n()}function ur(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&s(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)se(e,"borderLeft","_bl",r,i,o),se(e,"borderRight","_br",r,i,o)}}s(e.children(),n)}function se(e,n,r,t,i,o){var a={width:0,height:0,rank:o,borderType:n},u=i[n][o-1],d=L(e,"border",a,r);i[n][o]=d,e.setParent(d,t),u&&e.setEdge(u,d,{weight:1})}function dr(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&Te(e)}function fr(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&sr(e),(n==="lr"||n==="rl")&&(cr(e),Te(e))}function Te(e){s(e.nodes(),function(n){ce(e.node(n))}),s(e.edges(),function(n){ce(e.edge(n))})}function ce(e){var n=e.width;e.width=e.height,e.height=n}function sr(e){s(e.nodes(),function(n){D(e.node(n))}),s(e.edges(),function(n){var r=e.edge(n);s(r.points,D),Object.prototype.hasOwnProperty.call(r,"y")&&D(r)})}function D(e){e.y=-e.y}function cr(e){s(e.nodes(),function(n){q(e.node(n))}),s(e.edges(),function(n){var r=e.edge(n);s(r.points,q),Object.prototype.hasOwnProperty.call(r,"x")&&q(r)})}function q(e){var n=e.x;e.x=e.y,e.y=n}function lr(e){e.graph().dummyChains=[],s(e.edges(),function(n){hr(e,n)})}function hr(e,n){var r=n.v,t=e.node(r).rank,i=n.w,o=e.node(i).rank,a=n.name,u=e.edge(n),d=u.labelRank;if(o!==t+1){e.removeEdge(n);var f=void 0,c,l;for(l=0,++t;t<o;++l,++t)u.points=[],f={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},c=L(e,"edge",f,"_d"),t===d&&(f.width=u.width,f.height=u.height,f.dummy="edge-label",f.labelpos=u.labelpos),e.setEdge(r,c,{weight:u.weight},a),l===0&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,i,{weight:u.weight},a)}}function vr(e){s(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,i;for(e.setEdge(r.edgeObj,t);r.dummy;)i=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=i,r=e.node(n)})}function ne(e){var n={};function r(t){var i=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return i.rank;n[t]=!0;var o=_(w(e.outEdges(t),function(a){return r(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}s(e.sources(),r)}function C(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Me(e){var n=new g({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var i,o;pr(n,e)<t;)i=wr(n,e),o=n.hasNode(i.v)?C(e,i):-C(e,i),br(n,e,o);return n}function pr(e,n){function r(t){s(n.nodeEdges(t),function(i){var o=i.v,a=t===o?i.w:o;!e.hasNode(a)&&!C(n,i)&&(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}return s(e.nodes(),r),e.nodeCount()}function wr(e,n){return Q(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return C(n,r)})}function br(e,n,r){s(e.nodes(),function(t){n.node(t).rank+=r})}function mr(){}mr.prototype=new Error;function Se(e,n,r){U(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return s(n,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);Fe(e,a,r==="post",o,t,i)}),i}function Fe(e,n,r,t,i,o){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||o.push(n),s(i(n),function(a){Fe(e,a,r,t,i,o)}),r&&o.push(n))}function gr(e,n){return Se(e,n,"post")}function yr(e,n){return Se(e,n,"pre")}x.initLowLimValues=te;x.initCutValues=re;x.calcCutValue=Ae;x.leaveEdge=Be;x.enterEdge=Ge;x.exchangeEdges=Ve;function x(e){e=rr(e),ne(e);var n=Me(e);te(n),re(n,e);for(var r,t;r=Be(n);)t=Ge(n,e,r),Ve(n,e,r,t)}function re(e,n){var r=gr(e,e.nodes());r=r.slice(0,r.length-1),s(r,function(t){xr(e,n,t)})}function xr(e,n,r){var t=e.node(r),i=t.parent;e.edge(r,i).cutvalue=Ae(e,n,r)}function Ae(e,n,r){var t=e.node(r),i=t.parent,o=!0,a=n.edge(r,i),u=0;return a||(o=!1,a=n.edge(i,r)),u=a.weight,s(n.nodeEdges(r),function(d){var f=d.v===r,c=f?d.w:d.v;if(c!==i){var l=f===o,h=n.edge(d).weight;if(u+=l?h:-h,kr(e,r,c)){var v=e.edge(r,c).cutvalue;u+=l?-v:v}}}),u}function te(e,n){arguments.length<2&&(n=e.nodes()[0]),je(e,{},1,n)}function je(e,n,r,t,i){var o=r,a=e.node(t);return n[t]=!0,s(e.neighbors(t),function(u){Object.prototype.hasOwnProperty.call(n,u)||(r=je(e,n,r,u,t))}),a.low=o,a.lim=r++,i?a.parent=i:delete a.parent,r}function Be(e){return K(e.edges(),function(n){return e.edge(n).cutvalue<0})}function Ge(e,n,r){var t=r.v,i=r.w;n.hasEdge(t,i)||(t=r.w,i=r.v);var o=e.node(t),a=e.node(i),u=o,d=!1;o.lim>a.lim&&(u=a,d=!0);var f=I(n.edges(),function(c){return d===le(e,e.node(c.v),u)&&d!==le(e,e.node(c.w),u)});return Q(f,function(c){return C(n,c)})}function Ve(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),te(e),re(e,n),Er(e,n)}function Er(e,n){var r=K(e.nodes(),function(i){return!n.node(i).parent}),t=yr(e,r);t=t.slice(1),s(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function kr(e,n,r){return e.hasEdge(n,r)}function le(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function Or(e){switch(e.graph().ranker){case"network-simplex":he(e);break;case"tight-tree":Lr(e);break;case"longest-path":Nr(e);break;default:he(e)}}var Nr=ne;function Lr(e){ne(e),Me(e)}function he(e){x(e)}function Pr(e){var n=L(e,"root",{},"_root"),r=_r(e),t=y(E(r))-1,i=2*t+1;e.graph().nestingRoot=n,s(e.edges(),function(a){e.edge(a).minlen*=i});var o=Cr(e)+1;s(e.children(),function(a){Ye(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function Ye(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var d=fe(e,"_bt"),f=fe(e,"_bb"),c=e.node(a);e.setParent(d,a),c.borderTop=d,e.setParent(f,a),c.borderBottom=f,s(u,function(l){Ye(e,n,r,t,i,o,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,b=h.borderTop?t:2*t,P=v!==p?1:i-o[a]+1;e.setEdge(d,v,{weight:b,minlen:P,nestingEdge:!0}),e.setEdge(p,f,{weight:b,minlen:P,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+o[a]})}function _r(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&s(o,function(a){r(a,i+1)}),n[t]=i}return s(e.children(),function(t){r(t,1)}),n}function Cr(e){return G(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Ir(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,s(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Rr(e,n,r){var t={},i;s(r,function(o){for(var a=e.parent(o),u,d;a;){if(u=e.parent(a),u?(d=t[u],t[u]=a):(d=i,i=a),d&&d!==a){n.setEdge(d,a);return}a=u}})}function Tr(e,n,r){var t=Mr(e),i=new g({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return s(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),s(e[r](o),function(d){var f=d.v===o?d.w:d.v,c=i.edge(f,o),l=m(c)?0:c.weight;i.setEdge(f,o,{weight:e.edge(d).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function Mr(e){for(var n;e.hasNode(n=ee("_root")););return n}function Sr(e,n){for(var r=0,t=1;t<n.length;++t)r+=Fr(e,n[t-1],n[t]);return r}function Fr(e,n,r){for(var t=zn(r,w(r,function(f,c){return c})),i=N(w(n,function(f){return R(w(e.outEdges(f),function(c){return{pos:t[c.w],weight:e.edge(c).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var u=w(new Array(a),function(){return 0}),d=0;return s(i.forEach(function(f){var c=f.pos+o;u[c]+=f.weight;for(var l=0;c>0;)c%2&&(l+=u[c+1]),c=c-1>>1,u[c]+=f.weight;d+=f.weight*l})),d}function Ar(e){var n={},r=I(e.nodes(),function(u){return!e.children(u).length}),t=y(w(r,function(u){return e.node(u).rank})),i=w(k(t+1),function(){return[]});function o(u){if(!_e(n,u)){n[u]=!0;var d=e.node(u);i[d.rank].push(u),s(e.successors(u),o)}}var a=R(r,function(u){return e.node(u).rank});return s(a,o),i}function jr(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var i=G(t,function(o,a){var u=e.edge(a),d=e.node(a.v);return{sum:o.sum+u.weight*d.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Br(e,n){var r={};s(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};m(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),s(n.edges(),function(i){var o=r[i.v],a=r[i.w];!m(o)&&!m(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=I(r,function(i){return!i.indegree});return Gr(t)}function Gr(e){var n=[];function r(o){return function(a){a.merged||(m(a.barycenter)||m(o.barycenter)||a.barycenter>=o.barycenter)&&Vr(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),s(i.in.reverse(),r(i)),s(i.out,t(i))}return w(I(n,function(o){return!o.merged}),function(o){return B(o,["vs","i","barycenter","weight"])})}function Vr(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function Yr(e,n){var r=ar(e,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=r.lhs,i=R(r.rhs,function(c){return-c.i}),o=[],a=0,u=0,d=0;t.sort($r(!!n)),d=ve(o,i,d),s(t,function(c){d+=c.vs.length,o.push(c.vs),a+=c.barycenter*c.weight,u+=c.weight,d=ve(o,i,d)});var f={vs:N(o)};return u&&(f.barycenter=a/u,f.weight=u),f}function ve(e,n,r){for(var t;n.length&&(t=j(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function $r(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function $e(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,d={};a&&(i=I(i,function(p){return p!==a&&p!==u}));var f=jr(e,i);s(f,function(p){if(e.children(p.v).length){var b=$e(e,p.v,r,t);d[p.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter")&&qr(p,b)}});var c=Br(f,r);Dr(c,d);var l=Yr(c,t);if(a&&(l.vs=N([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),v=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function Dr(e,n){s(e,function(r){r.vs=N(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function qr(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function Wr(e){var n=Re(e),r=pe(e,k(1,n+1),"inEdges"),t=pe(e,k(n-1,-1,-1),"outEdges"),i=Ar(e);we(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,d=0;d<4;++u,++d){zr(u%2?r:t,u%4>=2),i=Y(e);var f=Sr(e,i);f<o&&(d=0,a=xn(i),o=f)}we(e,a)}function pe(e,n,r){return w(n,function(t){return Tr(e,t,r)})}function zr(e,n){var r=new g;s(e,function(t){var i=t.graph().root,o=$e(t,i,r,n);s(o.vs,function(a,u){t.node(a).order=u}),Rr(t,r,o.vs)})}function we(e,n){s(n,function(r){s(r,function(t,i){e.node(t).order=i})})}function Xr(e){var n=Ur(e);s(e.graph().dummyChains,function(r){for(var t=e.node(r),i=t.edgeObj,o=Hr(e,n,i.v,i.w),a=o.path,u=o.lca,d=0,f=a[d],c=!0;r!==i.w;){if(t=e.node(r),c){for(;(f=a[d])!==u&&e.node(f).maxRank<t.rank;)d++;f===u&&(c=!1)}if(!c){for(;d<a.length-1&&e.node(f=a[d+1]).minRank<=t.rank;)d++;f=a[d]}e.setParent(r,f),r=e.successors(r)[0]}})}function Hr(e,n,r,t){var i=[],o=[],a=Math.min(n[r].low,n[t].low),u=Math.max(n[r].lim,n[t].lim),d,f;d=r;do d=e.parent(d),i.push(d);while(d&&(n[d].low>a||u>n[d].lim));for(f=d,d=t;(d=e.parent(d))!==f;)o.push(d);return{path:i.concat(o.reverse()),lca:f}}function Ur(e){var n={},r=0;function t(i){var o=r;s(e.children(i),t),n[i]={low:o,lim:r++}}return s(e.children(),t),n}function Jr(e,n){var r={};function t(i,o){var a=0,u=0,d=i.length,f=j(o);return s(o,function(c,l){var h=Zr(e,c),v=h?e.node(h).order:d;(h||c===f)&&(s(o.slice(u,l+1),function(p){s(e.predecessors(p),function(b){var P=e.node(b),ie=P.order;(ie<a||v<ie)&&!(P.dummy&&e.node(p).dummy)&&De(r,b,p)})}),u=l+1,a=v)}),o}return G(n,t),r}function Kr(e,n){var r={};function t(o,a,u,d,f){var c;s(k(a,u),function(l){c=o[l],e.node(c).dummy&&s(e.predecessors(c),function(h){var v=e.node(h);v.dummy&&(v.order<d||v.order>f)&&De(r,h,c)})})}function i(o,a){var u=-1,d,f=0;return s(a,function(c,l){if(e.node(c).dummy==="border"){var h=e.predecessors(c);h.length&&(d=e.node(h[0]).order,t(a,f,l,u,d),f=l,u=d)}t(a,f,a.length,d,o.length)}),a}return G(n,i),r}function Zr(e,n){if(e.node(n).dummy)return K(e.predecessors(n),function(r){return e.node(r).dummy})}function De(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Qr(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function et(e,n,r,t){var i={},o={},a={};return s(n,function(u){s(u,function(d,f){i[d]=d,o[d]=d,a[d]=f})}),s(n,function(u){var d=-1;s(u,function(f){var c=t(f);if(c.length){c=R(c,function(b){return a[b]});for(var l=(c.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=c[h];o[f]===f&&d<a[p]&&!Qr(r,f,p)&&(o[p]=f,o[f]=i[f]=i[p],d=a[p])}}})}),{root:i,align:o}}function nt(e,n,r,t,i){var o={},a=rt(e,n,r,i),u=i?"borderLeft":"borderRight";function d(l,h){for(var v=a.nodes(),p=v.pop(),b={};p;)b[p]?l(p):(b[p]=!0,v.push(p),v=v.concat(h(p))),p=v.pop()}function f(l){o[l]=a.inEdges(l).reduce(function(h,v){return Math.max(h,o[v.v]+a.edge(v))},0)}function c(l){var h=a.outEdges(l).reduce(function(p,b){return Math.min(p,o[b.w]-a.edge(b))},Number.POSITIVE_INFINITY),v=e.node(l);h!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(o[l]=Math.max(o[l],h))}return d(f,a.predecessors.bind(a)),d(c,a.successors.bind(a)),s(t,function(l){o[l]=o[r[l]]}),o}function rt(e,n,r,t){var i=new g,o=e.graph(),a=ut(o.nodesep,o.edgesep,t);return s(n,function(u){var d;s(u,function(f){var c=r[f];if(i.setNode(c),d){var l=r[d],h=i.edge(l,c);i.setEdge(l,c,Math.max(a(e,f,d),h||0))}d=f})}),i}function tt(e,n){return Q(E(n),function(r){var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Pn(r,function(o,a){var u=dt(e,a)/2;t=Math.max(o+u,t),i=Math.min(o-u,i)}),t-i})}function it(e,n){var r=E(n),t=_(r),i=y(r);s(["u","d"],function(o){s(["l","r"],function(a){var u=o+a,d=e[u],f;if(d!==n){var c=E(d);f=a==="l"?t-_(c):i-y(c),f&&(e[u]=V(d,function(l){return l+f}))}})})}function at(e,n){return V(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var i=R(w(e,t));return(i[1]+i[2])/2})}function ot(e){var n=Y(e),r=X(Jr(e,n),Kr(e,n)),t={},i;s(["u","d"],function(a){i=a==="u"?n:E(n).reverse(),s(["l","r"],function(u){u==="r"&&(i=w(i,function(l){return E(l).reverse()}));var d=(a==="u"?e.predecessors:e.successors).bind(e),f=et(e,i,r,d),c=nt(e,i,f.root,f.align,u==="r");u==="r"&&(c=V(c,function(l){return-l})),t[a+u]=c})});var o=tt(e,t);return it(t,o),at(t,e.graph().align)}function ut(e,n,r){return function(t,i,o){var a=t.node(i),u=t.node(o),d=0,f;if(d+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":f=-a.width/2;break;case"r":f=a.width/2;break}if(f&&(d+=r?f:-f),f=0,d+=(a.dummy?n:e)/2,d+=(u.dummy?n:e)/2,d+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":f=u.width/2;break;case"r":f=-u.width/2;break}return f&&(d+=r?f:-f),f=0,d}}function dt(e,n){return e.node(n).width}function ft(e){e=Ie(e),st(e),_n(ot(e),function(n,r){e.node(r).x=n})}function st(e){var n=Y(e),r=e.graph().ranksep,t=0;s(n,function(i){var o=y(w(i,function(a){return e.node(a).height}));s(i,function(a){e.node(a).y=t+o/2}),t+=o+r})}function At(e,n){var r=or;r("layout",()=>{var t=r(" buildLayoutGraph",()=>xt(e));r(" runLayout",()=>ct(t,r)),r(" updateInputGraph",()=>lt(e,t))})}function ct(e,n){n(" makeSpaceForEdgeLabels",()=>Et(e)),n(" removeSelfEdges",()=>Rt(e)),n(" acyclic",()=>Qn(e)),n(" nestingGraph.run",()=>Pr(e)),n(" rank",()=>Or(Ie(e))),n(" injectEdgeLabelProxies",()=>kt(e)),n(" removeEmptyRanks",()=>ir(e)),n(" nestingGraph.cleanup",()=>Ir(e)),n(" normalizeRanks",()=>tr(e)),n(" assignRankMinMax",()=>Ot(e)),n(" removeEdgeLabelProxies",()=>Nt(e)),n(" normalize.run",()=>lr(e)),n(" parentDummyChains",()=>Xr(e)),n(" addBorderSegments",()=>ur(e)),n(" order",()=>Wr(e)),n(" insertSelfEdges",()=>Tt(e)),n(" adjustCoordinateSystem",()=>dr(e)),n(" position",()=>ft(e)),n(" positionSelfEdges",()=>Mt(e)),n(" removeBorderNodes",()=>It(e)),n(" normalize.undo",()=>vr(e)),n(" fixupEdgeLabelCoords",()=>_t(e)),n(" undoCoordinateSystem",()=>fr(e)),n(" translateGraph",()=>Lt(e)),n(" assignNodeIntersects",()=>Pt(e)),n(" reversePoints",()=>Ct(e)),n(" acyclic.undo",()=>nr(e))}function lt(e,n){s(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),s(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var ht=["nodesep","edgesep","ranksep","marginx","marginy"],vt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},pt=["acyclicer","ranker","rankdir","align"],wt=["width","height"],bt={width:0,height:0},mt=["minlen","weight","width","height","labeloffset"],gt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},yt=["labelpos"];function xt(e){var n=new g({multigraph:!0,compound:!0}),r=z(e.graph());return n.setGraph(X({},vt,W(r,ht),B(r,pt))),s(e.nodes(),function(t){var i=z(e.node(t));n.setNode(t,kn(W(i,wt),bt)),n.setParent(t,e.parent(t))}),s(e.edges(),function(t){var i=z(e.edge(t));n.setEdge(t,X({},gt,W(i,mt),B(i,yt)))}),n}function Et(e){var n=e.graph();n.ranksep/=2,s(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function kt(e){s(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};L(e,"edge-proxy",o,"_ep")}})}function Ot(e){var n=0;s(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=y(n,t.maxRank))}),e.graph().maxRank=n}function Nt(e){s(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Lt(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function d(f){var c=f.x,l=f.y,h=f.width,v=f.height;n=Math.min(n,c-h/2),r=Math.max(r,c+h/2),t=Math.min(t,l-v/2),i=Math.max(i,l+v/2)}s(e.nodes(),function(f){d(e.node(f))}),s(e.edges(),function(f){var c=e.edge(f);Object.prototype.hasOwnProperty.call(c,"x")&&d(c)}),n-=a,t-=u,s(e.nodes(),function(f){var c=e.node(f);c.x-=n,c.y-=t}),s(e.edges(),function(f){var c=e.edge(f);s(c.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(c,"x")&&(c.x-=n),Object.prototype.hasOwnProperty.call(c,"y")&&(c.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Pt(e){s(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(de(t,o)),r.points.push(de(i,a))})}function _t(e){s(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Ct(e){s(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function It(e){s(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(j(r.borderLeft)),a=e.node(j(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),s(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Rt(e){s(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function Tt(e){var n=Y(e);s(n,function(r){var t=0;s(r,function(i,o){var a=e.node(i);a.order=o+t,s(a.selfEdges,function(u){L(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function Mt(e){s(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function W(e,n){return V(B(e,n),Number)}function z(e){var n={};return s(e,function(r,t){n[t.toLowerCase()]=r}),n}export{kn as d,At as l,w as m,B as p,k as r,ee as u};
@@ -1 +1 @@
1
- import{a as h}from"./array-BKyUJesY.js";import{w as d,c as o}from"./path-CbwjOpE9.js";import{n as v}from"./index-CvYvquQR.js";function w(t){return t[0]}function b(t){return t[1]}function P(t,u){var s=o(!0),i=null,l=v,r=null,m=d(e);t=typeof t=="function"?t:t===void 0?w:o(t),u=typeof u=="function"?u:u===void 0?b:o(u);function e(n){var f,g=(n=h(n)).length,p,c=!1,a;for(i==null&&(r=l(a=m())),f=0;f<=g;++f)!(f<g&&s(p=n[f],f,n))===c&&((c=!c)?r.lineStart():r.lineEnd()),c&&r.point(+t(p,f,n),+u(p,f,n));if(a)return r=null,a+""||null}return e.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),e):t},e.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),e):u},e.defined=function(n){return arguments.length?(s=typeof n=="function"?n:o(!!n),e):s},e.curve=function(n){return arguments.length?(l=n,i!=null&&(r=l(i)),e):l},e.context=function(n){return arguments.length?(n==null?i=r=null:r=l(i=n),e):i},e}export{P as l};
1
+ import{a as h}from"./array-BKyUJesY.js";import{w as d,c as o}from"./path-CbwjOpE9.js";import{n as v}from"./index-BfWjS_S_.js";function w(t){return t[0]}function b(t){return t[1]}function P(t,u){var s=o(!0),i=null,l=v,r=null,m=d(e);t=typeof t=="function"?t:t===void 0?w:o(t),u=typeof u=="function"?u:u===void 0?b:o(u);function e(n){var f,g=(n=h(n)).length,p,c=!1,a;for(i==null&&(r=l(a=m())),f=0;f<=g;++f)!(f<g&&s(p=n[f],f,n))===c&&((c=!c)?r.lineStart():r.lineEnd()),c&&r.point(+t(p,f,n),+u(p,f,n));if(a)return r=null,a+""||null}return e.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),e):t},e.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),e):u},e.defined=function(n){return arguments.length?(s=typeof n=="function"?n:o(!!n),e):s},e.curve=function(n){return arguments.length?(l=n,i!=null&&(r=l(i)),e):l},e.context=function(n){return arguments.length?(n==null?i=r=null:r=l(i=n),e):i},e}export{P as l};
@@ -1 +1 @@
1
- import{$ as fn,a0 as q,a1 as Z,a2 as cn,a3 as H}from"./index-CvYvquQR.js";import{i as hn}from"./init-Gi6I4Gst.js";function F(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function mn(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function rn(n){let r,e,t;n.length!==2?(r=F,e=(o,c)=>F(n(o),c),t=(o,c)=>n(o)-c):(r=n===F||n===mn?n:sn,e=n,t=n);function i(o,c,u=0,l=o.length){if(u<l){if(r(c,c)!==0)return l;do{const h=u+l>>>1;e(o[h],c)<0?u=h+1:l=h}while(u<l)}return u}function f(o,c,u=0,l=o.length){if(u<l){if(r(c,c)!==0)return l;do{const h=u+l>>>1;e(o[h],c)<=0?u=h+1:l=h}while(u<l)}return u}function a(o,c,u=0,l=o.length){const h=i(o,c,u,l-1);return h>u&&t(o[h-1],c)>-t(o[h],c)?h-1:h}return{left:i,center:a,right:f}}function sn(){return 0}function ln(n){return n===null?NaN:+n}const dn=rn(F),gn=dn.right;rn(ln).center;const yn=Math.sqrt(50),Mn=Math.sqrt(10),pn=Math.sqrt(2);function R(n,r,e){const t=(r-n)/Math.max(0,e),i=Math.floor(Math.log10(t)),f=t/Math.pow(10,i),a=f>=yn?10:f>=Mn?5:f>=pn?2:1;let o,c,u;return i<0?(u=Math.pow(10,-i)/a,o=Math.round(n*u),c=Math.round(r*u),o/u<n&&++o,c/u>r&&--c,u=-u):(u=Math.pow(10,i)*a,o=Math.round(n/u),c=Math.round(r/u),o*u<n&&++o,c*u>r&&--c),c<o&&.5<=e&&e<2?R(n,r,e*2):[o,c,u]}function wn(n,r,e){if(r=+r,n=+n,e=+e,!(e>0))return[];if(n===r)return[n];const t=r<n,[i,f,a]=t?R(r,n,e):R(n,r,e);if(!(f>=i))return[];const o=f-i+1,c=new Array(o);if(t)if(a<0)for(let u=0;u<o;++u)c[u]=(f-u)/-a;else for(let u=0;u<o;++u)c[u]=(f-u)*a;else if(a<0)for(let u=0;u<o;++u)c[u]=(i+u)/-a;else for(let u=0;u<o;++u)c[u]=(i+u)*a;return c}function C(n,r,e){return r=+r,n=+n,e=+e,R(n,r,e)[2]}function Nn(n,r,e){r=+r,n=+n,e=+e;const t=r<n,i=t?C(r,n,e):C(n,r,e);return(t?-1:1)*(i<0?1/-i:i)}function kn(n,r){r||(r=[]);var e=n?Math.min(r.length,n.length):0,t=r.slice(),i;return function(f){for(i=0;i<e;++i)t[i]=n[i]*(1-f)+r[i]*f;return t}}function xn(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function An(n,r){var e=r?r.length:0,t=n?Math.min(e,n.length):0,i=new Array(t),f=new Array(e),a;for(a=0;a<t;++a)i[a]=G(n[a],r[a]);for(;a<e;++a)f[a]=r[a];return function(o){for(a=0;a<t;++a)f[a]=i[a](o);return f}}function vn(n,r){var e=new Date;return n=+n,r=+r,function(t){return e.setTime(n*(1-t)+r*t),e}}function Sn(n,r){var e={},t={},i;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(i in r)i in n?e[i]=G(n[i],r[i]):t[i]=r[i];return function(f){for(i in e)t[i]=e[i](f);return t}}function G(n,r){var e=typeof r,t;return r==null||e==="boolean"?fn(r):(e==="number"?q:e==="string"?(t=H(r))?(r=t,Z):cn:r instanceof H?Z:r instanceof Date?vn:xn(r)?kn:Array.isArray(r)?An:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Sn:q)(n,r)}function bn(n,r){return n=+n,r=+r,function(e){return Math.round(n*(1-e)+r*e)}}function Pn(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,r){if(!isFinite(n)||n===0)return null;var e=(n=r?n.toExponential(r-1):n.toExponential()).indexOf("e"),t=n.slice(0,e);return[t.length>1?t[0]+t.slice(2):t,+n.slice(e+1)]}function A(n){return n=E(Math.abs(n)),n?n[1]:NaN}function jn(n,r){return function(e,t){for(var i=e.length,f=[],a=0,o=n[0],c=0;i>0&&o>0&&(c+o+1>t&&(o=Math.max(1,t-c)),f.push(e.substring(i-=o,i+o)),!((c+=o+1)>t));)o=n[a=(a+1)%n.length];return f.reverse().join(r)}}function zn(n){return function(r){return r.replace(/[0-9]/g,function(e){return n[+e]})}}var $n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(r=$n.exec(n)))throw new Error("invalid format: "+n);var r;return new O({fill:r[1],align:r[2],sign:r[3],symbol:r[4],zero:r[5],width:r[6],comma:r[7],precision:r[8]&&r[8].slice(1),trim:r[9],type:r[10]})}D.prototype=O.prototype;function O(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}O.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Fn(n){n:for(var r=n.length,e=1,t=-1,i;e<r;++e)switch(n[e]){case".":t=i=e;break;case"0":t===0&&(t=e),i=e;break;default:if(!+n[e])break n;t>0&&(t=0);break}return t>0?n.slice(0,t)+n.slice(i+1):n}var T;function Rn(n,r){var e=E(n,r);if(!e)return T=void 0,n.toPrecision(r);var t=e[0],i=e[1],f=i-(T=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=t.length;return f===a?t:f>a?t+new Array(f-a+1).join("0"):f>0?t.slice(0,f)+"."+t.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,r+f-1))[0]}function J(n,r){var e=E(n,r);if(!e)return n+"";var t=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+t:t.length>i+1?t.slice(0,i+1)+"."+t.slice(i+1):t+new Array(i-t.length+2).join("0")}const K={"%":(n,r)=>(n*100).toFixed(r),b:n=>Math.round(n).toString(2),c:n=>n+"",d:Pn,e:(n,r)=>n.toExponential(r),f:(n,r)=>n.toFixed(r),g:(n,r)=>n.toPrecision(r),o:n=>Math.round(n).toString(8),p:(n,r)=>J(n*100,r),r:J,s:Rn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function Q(n){return n}var W=Array.prototype.map,_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function En(n){var r=n.grouping===void 0||n.thousands===void 0?Q:jn(W.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",t=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?Q:zn(W.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",o=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function u(h,s){h=D(h);var p=h.fill,v=h.align,y=h.sign,S=h.symbol,b=h.zero,I=h.width,L=h.comma,w=h.precision,V=h.trim,d=h.type;d==="n"?(L=!0,d="g"):K[d]||(w===void 0&&(w=12),V=!0,d="g"),(b||p==="0"&&v==="=")&&(b=!0,p="0",v="=");var un=(s&&s.prefix!==void 0?s.prefix:"")+(S==="$"?e:S==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():""),an=(S==="$"?t:/[%p]/.test(d)?a:"")+(s&&s.suffix!==void 0?s.suffix:""),X=K[d],on=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function U(m){var N=un,g=an,k,Y,P;if(d==="c")g=X(m)+g,m="";else{m=+m;var j=m<0||1/m<0;if(m=isNaN(m)?c:X(Math.abs(m),w),V&&(m=Fn(m)),j&&+m==0&&y!=="+"&&(j=!1),N=(j?y==="("?y:o:y==="-"||y==="("?"":y)+N,g=(d==="s"&&!isNaN(m)&&T!==void 0?_[8+T/3]:"")+g+(j&&y==="("?")":""),on){for(k=-1,Y=m.length;++k<Y;)if(P=m.charCodeAt(k),48>P||P>57){g=(P===46?i+m.slice(k+1):m.slice(k))+g,m=m.slice(0,k);break}}}L&&!b&&(m=r(m,1/0));var z=N.length+m.length+g.length,M=z<I?new Array(I-z+1).join(p):"";switch(L&&b&&(m=r(M+m,M.length?I-g.length:1/0),M=""),v){case"<":m=N+m+g+M;break;case"=":m=N+M+m+g;break;case"^":m=M.slice(0,z=M.length>>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return U.toString=function(){return h+""},U}function l(h,s){var p=Math.max(-8,Math.min(8,Math.floor(A(s)/3)))*3,v=Math.pow(10,-p),y=u((h=D(h),h.type="f",h),{suffix:_[8+p/3]});return function(S){return y(v*S)}}return{format:u,formatPrefix:l}}var $,tn,en;Dn({thousands:",",grouping:[3],currency:["$",""]});function Dn(n){return $=En(n),tn=$.format,en=$.formatPrefix,$}function Tn(n){return Math.max(0,-A(Math.abs(n)))}function In(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(A(r)/3)))*3-A(Math.abs(n)))}function Ln(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,A(r)-A(n))+1}function qn(n){return function(){return n}}function Cn(n){return+n}var nn=[0,1];function x(n){return n}function B(n,r){return(r-=n=+n)?function(e){return(e-n)/r}:qn(isNaN(r)?NaN:.5)}function Bn(n,r){var e;return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Gn(n,r,e){var t=n[0],i=n[1],f=r[0],a=r[1];return i<t?(t=B(i,t),f=e(a,f)):(t=B(t,i),f=e(f,a)),function(o){return f(t(o))}}function On(n,r,e){var t=Math.min(n.length,r.length)-1,i=new Array(t),f=new Array(t),a=-1;for(n[t]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<t;)i[a]=B(n[a],n[a+1]),f[a]=e(r[a],r[a+1]);return function(o){var c=gn(n,o,1,t)-1;return f[c](i[c](o))}}function Vn(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Xn(){var n=nn,r=nn,e=G,t,i,f,a=x,o,c,u;function l(){var s=Math.min(n.length,r.length);return a!==x&&(a=Bn(n[0],n[s-1])),o=s>2?On:Gn,c=u=null,h}function h(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(t),r,e)))(t(a(s)))}return h.invert=function(s){return a(i((u||(u=o(r,n.map(t),q)))(s)))},h.domain=function(s){return arguments.length?(n=Array.from(s,Cn),l()):n.slice()},h.range=function(s){return arguments.length?(r=Array.from(s),l()):r.slice()},h.rangeRound=function(s){return r=Array.from(s),e=bn,l()},h.clamp=function(s){return arguments.length?(a=s?!0:x,l()):a!==x},h.interpolate=function(s){return arguments.length?(e=s,l()):e},h.unknown=function(s){return arguments.length?(f=s,h):f},function(s,p){return t=s,i=p,l()}}function Un(){return Xn()(x,x)}function Yn(n,r,e,t){var i=Nn(n,r,e),f;switch(t=D(t??",f"),t.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return t.precision==null&&!isNaN(f=In(i,a))&&(t.precision=f),en(t,a)}case"":case"e":case"g":case"p":case"r":{t.precision==null&&!isNaN(f=Ln(i,Math.max(Math.abs(n),Math.abs(r))))&&(t.precision=f-(t.type==="e"));break}case"f":case"%":{t.precision==null&&!isNaN(f=Tn(i))&&(t.precision=f-(t.type==="%")*2);break}}return tn(t)}function Zn(n){var r=n.domain;return n.ticks=function(e){var t=r();return wn(t[0],t[t.length-1],e??10)},n.tickFormat=function(e,t){var i=r();return Yn(i[0],i[i.length-1],e??10,t)},n.nice=function(e){e==null&&(e=10);var t=r(),i=0,f=t.length-1,a=t[i],o=t[f],c,u,l=10;for(o<a&&(u=a,a=o,o=u,u=i,i=f,f=u);l-- >0;){if(u=C(a,o,e),u===c)return t[i]=a,t[f]=o,r(t);if(u>0)a=Math.floor(a/u)*u,o=Math.ceil(o/u)*u;else if(u<0)a=Math.ceil(a*u)/u,o=Math.floor(o*u)/u;else break;c=u}return n},n}function Hn(){var n=Un();return n.copy=function(){return Vn(n,Hn())},hn.apply(n,arguments),Zn(n)}export{Vn as a,rn as b,Un as c,Hn as l,Nn as t};
1
+ import{$ as fn,a0 as q,a1 as Z,a2 as cn,a3 as H}from"./index-BfWjS_S_.js";import{i as hn}from"./init-Gi6I4Gst.js";function F(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function mn(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function rn(n){let r,e,t;n.length!==2?(r=F,e=(o,c)=>F(n(o),c),t=(o,c)=>n(o)-c):(r=n===F||n===mn?n:sn,e=n,t=n);function i(o,c,u=0,l=o.length){if(u<l){if(r(c,c)!==0)return l;do{const h=u+l>>>1;e(o[h],c)<0?u=h+1:l=h}while(u<l)}return u}function f(o,c,u=0,l=o.length){if(u<l){if(r(c,c)!==0)return l;do{const h=u+l>>>1;e(o[h],c)<=0?u=h+1:l=h}while(u<l)}return u}function a(o,c,u=0,l=o.length){const h=i(o,c,u,l-1);return h>u&&t(o[h-1],c)>-t(o[h],c)?h-1:h}return{left:i,center:a,right:f}}function sn(){return 0}function ln(n){return n===null?NaN:+n}const dn=rn(F),gn=dn.right;rn(ln).center;const yn=Math.sqrt(50),Mn=Math.sqrt(10),pn=Math.sqrt(2);function R(n,r,e){const t=(r-n)/Math.max(0,e),i=Math.floor(Math.log10(t)),f=t/Math.pow(10,i),a=f>=yn?10:f>=Mn?5:f>=pn?2:1;let o,c,u;return i<0?(u=Math.pow(10,-i)/a,o=Math.round(n*u),c=Math.round(r*u),o/u<n&&++o,c/u>r&&--c,u=-u):(u=Math.pow(10,i)*a,o=Math.round(n/u),c=Math.round(r/u),o*u<n&&++o,c*u>r&&--c),c<o&&.5<=e&&e<2?R(n,r,e*2):[o,c,u]}function wn(n,r,e){if(r=+r,n=+n,e=+e,!(e>0))return[];if(n===r)return[n];const t=r<n,[i,f,a]=t?R(r,n,e):R(n,r,e);if(!(f>=i))return[];const o=f-i+1,c=new Array(o);if(t)if(a<0)for(let u=0;u<o;++u)c[u]=(f-u)/-a;else for(let u=0;u<o;++u)c[u]=(f-u)*a;else if(a<0)for(let u=0;u<o;++u)c[u]=(i+u)/-a;else for(let u=0;u<o;++u)c[u]=(i+u)*a;return c}function C(n,r,e){return r=+r,n=+n,e=+e,R(n,r,e)[2]}function Nn(n,r,e){r=+r,n=+n,e=+e;const t=r<n,i=t?C(r,n,e):C(n,r,e);return(t?-1:1)*(i<0?1/-i:i)}function kn(n,r){r||(r=[]);var e=n?Math.min(r.length,n.length):0,t=r.slice(),i;return function(f){for(i=0;i<e;++i)t[i]=n[i]*(1-f)+r[i]*f;return t}}function xn(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function An(n,r){var e=r?r.length:0,t=n?Math.min(e,n.length):0,i=new Array(t),f=new Array(e),a;for(a=0;a<t;++a)i[a]=G(n[a],r[a]);for(;a<e;++a)f[a]=r[a];return function(o){for(a=0;a<t;++a)f[a]=i[a](o);return f}}function vn(n,r){var e=new Date;return n=+n,r=+r,function(t){return e.setTime(n*(1-t)+r*t),e}}function Sn(n,r){var e={},t={},i;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(i in r)i in n?e[i]=G(n[i],r[i]):t[i]=r[i];return function(f){for(i in e)t[i]=e[i](f);return t}}function G(n,r){var e=typeof r,t;return r==null||e==="boolean"?fn(r):(e==="number"?q:e==="string"?(t=H(r))?(r=t,Z):cn:r instanceof H?Z:r instanceof Date?vn:xn(r)?kn:Array.isArray(r)?An:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Sn:q)(n,r)}function bn(n,r){return n=+n,r=+r,function(e){return Math.round(n*(1-e)+r*e)}}function Pn(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,r){if(!isFinite(n)||n===0)return null;var e=(n=r?n.toExponential(r-1):n.toExponential()).indexOf("e"),t=n.slice(0,e);return[t.length>1?t[0]+t.slice(2):t,+n.slice(e+1)]}function A(n){return n=E(Math.abs(n)),n?n[1]:NaN}function jn(n,r){return function(e,t){for(var i=e.length,f=[],a=0,o=n[0],c=0;i>0&&o>0&&(c+o+1>t&&(o=Math.max(1,t-c)),f.push(e.substring(i-=o,i+o)),!((c+=o+1)>t));)o=n[a=(a+1)%n.length];return f.reverse().join(r)}}function zn(n){return function(r){return r.replace(/[0-9]/g,function(e){return n[+e]})}}var $n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(r=$n.exec(n)))throw new Error("invalid format: "+n);var r;return new O({fill:r[1],align:r[2],sign:r[3],symbol:r[4],zero:r[5],width:r[6],comma:r[7],precision:r[8]&&r[8].slice(1),trim:r[9],type:r[10]})}D.prototype=O.prototype;function O(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}O.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Fn(n){n:for(var r=n.length,e=1,t=-1,i;e<r;++e)switch(n[e]){case".":t=i=e;break;case"0":t===0&&(t=e),i=e;break;default:if(!+n[e])break n;t>0&&(t=0);break}return t>0?n.slice(0,t)+n.slice(i+1):n}var T;function Rn(n,r){var e=E(n,r);if(!e)return T=void 0,n.toPrecision(r);var t=e[0],i=e[1],f=i-(T=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=t.length;return f===a?t:f>a?t+new Array(f-a+1).join("0"):f>0?t.slice(0,f)+"."+t.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,r+f-1))[0]}function J(n,r){var e=E(n,r);if(!e)return n+"";var t=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+t:t.length>i+1?t.slice(0,i+1)+"."+t.slice(i+1):t+new Array(i-t.length+2).join("0")}const K={"%":(n,r)=>(n*100).toFixed(r),b:n=>Math.round(n).toString(2),c:n=>n+"",d:Pn,e:(n,r)=>n.toExponential(r),f:(n,r)=>n.toFixed(r),g:(n,r)=>n.toPrecision(r),o:n=>Math.round(n).toString(8),p:(n,r)=>J(n*100,r),r:J,s:Rn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function Q(n){return n}var W=Array.prototype.map,_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function En(n){var r=n.grouping===void 0||n.thousands===void 0?Q:jn(W.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",t=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?Q:zn(W.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",o=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function u(h,s){h=D(h);var p=h.fill,v=h.align,y=h.sign,S=h.symbol,b=h.zero,I=h.width,L=h.comma,w=h.precision,V=h.trim,d=h.type;d==="n"?(L=!0,d="g"):K[d]||(w===void 0&&(w=12),V=!0,d="g"),(b||p==="0"&&v==="=")&&(b=!0,p="0",v="=");var un=(s&&s.prefix!==void 0?s.prefix:"")+(S==="$"?e:S==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():""),an=(S==="$"?t:/[%p]/.test(d)?a:"")+(s&&s.suffix!==void 0?s.suffix:""),X=K[d],on=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function U(m){var N=un,g=an,k,Y,P;if(d==="c")g=X(m)+g,m="";else{m=+m;var j=m<0||1/m<0;if(m=isNaN(m)?c:X(Math.abs(m),w),V&&(m=Fn(m)),j&&+m==0&&y!=="+"&&(j=!1),N=(j?y==="("?y:o:y==="-"||y==="("?"":y)+N,g=(d==="s"&&!isNaN(m)&&T!==void 0?_[8+T/3]:"")+g+(j&&y==="("?")":""),on){for(k=-1,Y=m.length;++k<Y;)if(P=m.charCodeAt(k),48>P||P>57){g=(P===46?i+m.slice(k+1):m.slice(k))+g,m=m.slice(0,k);break}}}L&&!b&&(m=r(m,1/0));var z=N.length+m.length+g.length,M=z<I?new Array(I-z+1).join(p):"";switch(L&&b&&(m=r(M+m,M.length?I-g.length:1/0),M=""),v){case"<":m=N+m+g+M;break;case"=":m=N+M+m+g;break;case"^":m=M.slice(0,z=M.length>>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return U.toString=function(){return h+""},U}function l(h,s){var p=Math.max(-8,Math.min(8,Math.floor(A(s)/3)))*3,v=Math.pow(10,-p),y=u((h=D(h),h.type="f",h),{suffix:_[8+p/3]});return function(S){return y(v*S)}}return{format:u,formatPrefix:l}}var $,tn,en;Dn({thousands:",",grouping:[3],currency:["$",""]});function Dn(n){return $=En(n),tn=$.format,en=$.formatPrefix,$}function Tn(n){return Math.max(0,-A(Math.abs(n)))}function In(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(A(r)/3)))*3-A(Math.abs(n)))}function Ln(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,A(r)-A(n))+1}function qn(n){return function(){return n}}function Cn(n){return+n}var nn=[0,1];function x(n){return n}function B(n,r){return(r-=n=+n)?function(e){return(e-n)/r}:qn(isNaN(r)?NaN:.5)}function Bn(n,r){var e;return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Gn(n,r,e){var t=n[0],i=n[1],f=r[0],a=r[1];return i<t?(t=B(i,t),f=e(a,f)):(t=B(t,i),f=e(f,a)),function(o){return f(t(o))}}function On(n,r,e){var t=Math.min(n.length,r.length)-1,i=new Array(t),f=new Array(t),a=-1;for(n[t]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<t;)i[a]=B(n[a],n[a+1]),f[a]=e(r[a],r[a+1]);return function(o){var c=gn(n,o,1,t)-1;return f[c](i[c](o))}}function Vn(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Xn(){var n=nn,r=nn,e=G,t,i,f,a=x,o,c,u;function l(){var s=Math.min(n.length,r.length);return a!==x&&(a=Bn(n[0],n[s-1])),o=s>2?On:Gn,c=u=null,h}function h(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(t),r,e)))(t(a(s)))}return h.invert=function(s){return a(i((u||(u=o(r,n.map(t),q)))(s)))},h.domain=function(s){return arguments.length?(n=Array.from(s,Cn),l()):n.slice()},h.range=function(s){return arguments.length?(r=Array.from(s),l()):r.slice()},h.rangeRound=function(s){return r=Array.from(s),e=bn,l()},h.clamp=function(s){return arguments.length?(a=s?!0:x,l()):a!==x},h.interpolate=function(s){return arguments.length?(e=s,l()):e},h.unknown=function(s){return arguments.length?(f=s,h):f},function(s,p){return t=s,i=p,l()}}function Un(){return Xn()(x,x)}function Yn(n,r,e,t){var i=Nn(n,r,e),f;switch(t=D(t??",f"),t.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return t.precision==null&&!isNaN(f=In(i,a))&&(t.precision=f),en(t,a)}case"":case"e":case"g":case"p":case"r":{t.precision==null&&!isNaN(f=Ln(i,Math.max(Math.abs(n),Math.abs(r))))&&(t.precision=f-(t.type==="e"));break}case"f":case"%":{t.precision==null&&!isNaN(f=Tn(i))&&(t.precision=f-(t.type==="%")*2);break}}return tn(t)}function Zn(n){var r=n.domain;return n.ticks=function(e){var t=r();return wn(t[0],t[t.length-1],e??10)},n.tickFormat=function(e,t){var i=r();return Yn(i[0],i[i.length-1],e??10,t)},n.nice=function(e){e==null&&(e=10);var t=r(),i=0,f=t.length-1,a=t[i],o=t[f],c,u,l=10;for(o<a&&(u=a,a=o,o=u,u=i,i=f,f=u);l-- >0;){if(u=C(a,o,e),u===c)return t[i]=a,t[f]=o,r(t);if(u>0)a=Math.floor(a/u)*u,o=Math.ceil(o/u)*u;else if(u<0)a=Math.ceil(a*u)/u,o=Math.floor(o*u)/u;else break;c=u}return n},n}function Hn(){var n=Un();return n.copy=function(){return Vn(n,Hn())},hn.apply(n,arguments),Zn(n)}export{Vn as a,rn as b,Un as c,Hn as l,Nn as t};
@@ -1,4 +1,4 @@
1
- import{P as ro,Q as yv,l as Nr,ar as mv,as as bv,at as wv,g as ao,U as Ev,o as xv,Y as En,i as xn,d as Tv,X as Cv}from"./index-CvYvquQR.js";import{a as Dv}from"./createText-1719965b-DkNrTk-5.js";function Ns(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}function Sv(t){if(Array.isArray(t))return t}function Av(t){if(Array.isArray(t))return Ns(t)}function yr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lv(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,hf(a.key),a)}}function mr(t,e,r){return e&&Lv(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function At(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=no(t))||e){r&&(t=r);var a=0,n=function(){};return{s:n,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1
+ import{P as ro,Q as yv,l as Nr,ar as mv,as as bv,at as wv,g as ao,U as Ev,o as xv,Y as En,i as xn,d as Tv,X as Cv}from"./index-BfWjS_S_.js";import{a as Dv}from"./createText-1719965b-D0wnbRTv.js";function Ns(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}function Sv(t){if(Array.isArray(t))return t}function Av(t){if(Array.isArray(t))return Ns(t)}function yr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lv(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,hf(a.key),a)}}function mr(t,e,r){return e&&Lv(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function At(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=no(t))||e){r&&(t=r);var a=0,n=function(){};return{s:n,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var u=r.next();return s=u.done,u},e:function(u){o=!0,i=u},f:function(){try{s||r.return==null||r.return()}finally{if(o)throw i}}}}function vf(t,e,r){return(e=hf(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rv(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Pv(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a,n,i,s,o=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(a=i.call(r)).done)&&(o.push(a.value),o.length!==e);u=!0);}catch(f){l=!0,n=f}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw n}}return o}}function Iv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mv(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Je(t,e){return Sv(t)||Pv(t,e)||no(t,e)||Iv()}function Tn(t){return Av(t)||Rv(t)||no(t)||Mv()}function Ov(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function hf(t){var e=Ov(t,"string");return typeof e=="symbol"?e:e+""}function nt(t){"@babel/helpers - typeof";return nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nt(t)}function no(t,e){if(t){if(typeof t=="string")return Ns(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ns(t,e):void 0}}var tt=typeof window>"u"?null:window,No=tt?tt.navigator:null;tt&&tt.document;var kv=nt(""),df=nt({}),Nv=nt(function(){}),Bv=typeof HTMLElement>"u"?"undefined":nt(HTMLElement),Ba=function(e){return e&&e.instanceString&&He(e.instanceString)?e.instanceString():null},ge=function(e){return e!=null&&nt(e)==kv},He=function(e){return e!=null&&nt(e)===Nv},Ve=function(e){return!Lt(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Oe=function(e){return e!=null&&nt(e)===df&&!Ve(e)&&e.constructor===Object},Fv=function(e){return e!=null&&nt(e)===df},ne=function(e){return e!=null&&nt(e)===nt(1)&&!isNaN(e)},_v=function(e){return ne(e)&&Math.floor(e)===e},Cn=function(e){if(Bv!=="undefined")return e!=null&&e instanceof HTMLElement},Lt=function(e){return Fa(e)||gf(e)},Fa=function(e){return Ba(e)==="collection"&&e._private.single},gf=function(e){return Ba(e)==="collection"&&!e._private.single},io=function(e){return Ba(e)==="core"},pf=function(e){return Ba(e)==="stylesheet"},Gv=function(e){return Ba(e)==="event"},fr=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},zv=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Vv=function(e){return Oe(e)&&ne(e.x1)&&ne(e.x2)&&ne(e.y1)&&ne(e.y2)},Uv=function(e){return Fv(e)&&He(e.then)},qv=function(){return No&&No.userAgent.match(/msie|trident|edge/i)},ta=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);return i.join("$")});var a=function(){var i=this,s=arguments,o,u=r.apply(i,s),l=a.cache;return(o=l[u])||(o=l[u]=e.apply(i,s)),o};return a.cache={},a},so=ta(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),Fn=ta(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),yf=ta(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),Bo=function(e){return fr(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},ir=function(e,r){return e.slice(-1*r.length)===r},at="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",$v="rgb[a]?\\(("+at+"[%]?)\\s*,\\s*("+at+"[%]?)\\s*,\\s*("+at+"[%]?)(?:\\s*,\\s*("+at+"))?\\)",Yv="rgb[a]?\\((?:"+at+"[%]?)\\s*,\\s*(?:"+at+"[%]?)\\s*,\\s*(?:"+at+"[%]?)(?:\\s*,\\s*(?:"+at+"))?\\)",Hv="hsl[a]?\\(("+at+")\\s*,\\s*("+at+"[%])\\s*,\\s*("+at+"[%])(?:\\s*,\\s*("+at+"))?\\)",Xv="hsl[a]?\\((?:"+at+")\\s*,\\s*(?:"+at+"[%])\\s*,\\s*(?:"+at+"[%])(?:\\s*,\\s*(?:"+at+"))?\\)",Wv="\\#[0-9a-fA-F]{3}",Kv="\\#[0-9a-fA-F]{6}",mf=function(e,r){return e<r?-1:e>r?1:0},Zv=function(e,r){return-1*mf(e,r)},be=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var a=e[r];if(a!=null)for(var n=Object.keys(a),i=0;i<n.length;i++){var s=n[i];t[s]=a[s]}}return t},Qv=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,a,n,i,s=16;return r?(a=parseInt(e[1]+e[1],s),n=parseInt(e[2]+e[2],s),i=parseInt(e[3]+e[3],s)):(a=parseInt(e[1]+e[2],s),n=parseInt(e[3]+e[4],s),i=parseInt(e[5]+e[6],s)),[a,n,i]}},Jv=function(e){var r,a,n,i,s,o,u,l;function f(d,p,g){return g<0&&(g+=1),g>1&&(g-=1),g<1/6?d+(p-d)*6*g:g<1/2?p:g<2/3?d+(p-d)*(2/3-g)*6:d}var c=new RegExp("^"+Hv+"$").exec(e);if(c){if(a=parseInt(c[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(c[2]),n<0||n>100||(n=n/100,i=parseFloat(c[3]),i<0||i>100)||(i=i/100,s=c[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=u=l=Math.round(i*255);else{var v=i<.5?i*(1+n):i+n-i*n,h=2*i-v;o=Math.round(255*f(h,v,a+1/3)),u=Math.round(255*f(h,v,a)),l=Math.round(255*f(h,v,a-1/3))}r=[o,u,l,s]}return r},jv=function(e){var r,a=new RegExp("^"+$v+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=n[1]||n[2]||n[3],u=n[1]&&n[2]&&n[3];if(o&&!u)return;var l=a[4];if(l!==void 0){if(l=parseFloat(l),l<0||l>1)return;r.push(l)}}return r},eh=function(e){return th[e.toLowerCase()]},bf=function(e){return(Ve(e)?e:null)||eh(e)||Qv(e)||jv(e)||Jv(e)},th={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},wf=function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i<n;i++){var s=a[i];if(Oe(s))throw Error("Tried to set map with object key");i<a.length-1?(r[s]==null&&(r[s]={}),r=r[s]):r[s]=e.value}},Ef=function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i<n;i++){var s=a[i];if(Oe(s))throw Error("Tried to get map with object key");if(r=r[s],r==null)return r}return r},Za=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _a(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ai,Fo;function Ga(){if(Fo)return ai;Fo=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return ai=t,ai}var ni,_o;function rh(){if(_o)return ni;_o=1;var t=typeof Za=="object"&&Za&&Za.Object===Object&&Za;return ni=t,ni}var ii,Go;function _n(){if(Go)return ii;Go=1;var t=rh(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return ii=r,ii}var si,zo;function ah(){if(zo)return si;zo=1;var t=_n(),e=function(){return t.Date.now()};return si=e,si}var oi,Vo;function nh(){if(Vo)return oi;Vo=1;var t=/\s/;function e(r){for(var a=r.length;a--&&t.test(r.charAt(a)););return a}return oi=e,oi}var ui,Uo;function ih(){if(Uo)return ui;Uo=1;var t=nh(),e=/^\s+/;function r(a){return a&&a.slice(0,t(a)+1).replace(e,"")}return ui=r,ui}var li,qo;function oo(){if(qo)return li;qo=1;var t=_n(),e=t.Symbol;return li=e,li}var fi,$o;function sh(){if($o)return fi;$o=1;var t=oo(),e=Object.prototype,r=e.hasOwnProperty,a=e.toString,n=t?t.toStringTag:void 0;function i(s){var o=r.call(s,n),u=s[n];try{s[n]=void 0;var l=!0}catch{}var f=a.call(s);return l&&(o?s[n]=u:delete s[n]),f}return fi=i,fi}var ci,Yo;function oh(){if(Yo)return ci;Yo=1;var t=Object.prototype,e=t.toString;function r(a){return e.call(a)}return ci=r,ci}var vi,Ho;function xf(){if(Ho)return vi;Ho=1;var t=oo(),e=sh(),r=oh(),a="[object Null]",n="[object Undefined]",i=t?t.toStringTag:void 0;function s(o){return o==null?o===void 0?n:a:i&&i in Object(o)?e(o):r(o)}return vi=s,vi}var hi,Xo;function uh(){if(Xo)return hi;Xo=1;function t(e){return e!=null&&typeof e=="object"}return hi=t,hi}var di,Wo;function za(){if(Wo)return di;Wo=1;var t=xf(),e=uh(),r="[object Symbol]";function a(n){return typeof n=="symbol"||e(n)&&t(n)==r}return di=a,di}var gi,Ko;function lh(){if(Ko)return gi;Ko=1;var t=ih(),e=Ga(),r=za(),a=NaN,n=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function u(l){if(typeof l=="number")return l;if(r(l))return a;if(e(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=e(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=t(l);var c=i.test(l);return c||s.test(l)?o(l.slice(2),c?2:8):n.test(l)?a:+l}return gi=u,gi}var pi,Zo;function fh(){if(Zo)return pi;Zo=1;var t=Ga(),e=ah(),r=lh(),a="Expected a function",n=Math.max,i=Math.min;function s(o,u,l){var f,c,v,h,d,p,g=0,y=!1,b=!1,m=!0;if(typeof o!="function")throw new TypeError(a);u=r(u)||0,t(l)&&(y=!!l.leading,b="maxWait"in l,v=b?n(r(l.maxWait)||0,u):v,m="trailing"in l?!!l.trailing:m);function E(R){var P=f,M=c;return f=c=void 0,g=R,h=o.apply(M,P),h}function T(R){return g=R,d=setTimeout(x,u),y?E(R):h}function S(R){var P=R-p,M=R-g,N=u-P;return b?i(N,v-M):N}function w(R){var P=R-p,M=R-g;return p===void 0||P>=u||P<0||b&&M>=v}function x(){var R=e();if(w(R))return C(R);d=setTimeout(x,S(R))}function C(R){return d=void 0,m&&f?E(R):(f=c=void 0,h)}function D(){d!==void 0&&clearTimeout(d),g=0,f=p=c=d=void 0}function A(){return d===void 0?h:C(e())}function L(){var R=e(),P=w(R);if(f=arguments,c=this,p=R,P){if(d===void 0)return T(p);if(b)return clearTimeout(d),d=setTimeout(x,u),E(p)}return d===void 0&&(d=setTimeout(x,u)),h}return L.cancel=D,L.flush=A,L}return pi=s,pi}var ch=fh(),Va=_a(ch),yi=tt?tt.performance:null,Tf=yi&&yi.now?function(){return yi.now()}:function(){return Date.now()},vh=function(){if(tt){if(tt.requestAnimationFrame)return function(t){tt.requestAnimationFrame(t)};if(tt.mozRequestAnimationFrame)return function(t){tt.mozRequestAnimationFrame(t)};if(tt.webkitRequestAnimationFrame)return function(t){tt.webkitRequestAnimationFrame(t)};if(tt.msRequestAnimationFrame)return function(t){tt.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(Tf())},1e3/60)}}(),Dn=function(e){return vh(e)},Qt=Tf,Ar=9261,Cf=65599,Xr=5381,Df=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ar,a=r,n;n=e.next(),!n.done;)a=a*Cf+n.value|0;return a},Sa=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ar;return r*Cf+e|0},Aa=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xr;return(r<<5)+r+e|0},hh=function(e,r){return e*2097152+r},rr=function(e){return e[0]*2097152+e[1]},Qa=function(e,r){return[Sa(e[0],r[0]),Aa(e[1],r[1])]},Qo=function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n<i?a.value=e[n++]:a.done=!0,a}};return Df(s,r)},Pr=function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n<i?a.value=e.charCodeAt(n++):a.done=!0,a}};return Df(s,r)},Sf=function(){return dh(arguments)},dh=function(e){for(var r,a=0;a<e.length;a++){var n=e[a];a===0?r=Pr(n):r=Pr(n,r)}return r};function gh(t,e,r,a,n){var i=n*Math.PI/180,s=Math.cos(i)*(t-r)-Math.sin(i)*(e-a)+r,o=Math.sin(i)*(t-r)+Math.cos(i)*(e-a)+a;return{x:s,y:o}}var ph=function(e,r,a,n,i,s){return{x:(e-a)*i+a,y:(r-n)*s+n}};function yh(t,e,r){if(r===0)return t;var a=(e.x1+e.x2)/2,n=(e.y1+e.y2)/2,i=e.w/e.h,s=1/i,o=gh(t.x,t.y,a,n,r),u=ph(o.x,o.y,a,n,i,s);return{x:u.x,y:u.y}}var Jo=!0,mh=console.warn!=null,bh=console.trace!=null,uo=Number.MAX_SAFE_INTEGER||9007199254740991,Af=function(){return!0},Sn=function(){return!1},jo=function(){return 0},lo=function(){},Ye=function(e){throw new Error(e)},Lf=function(e){if(e!==void 0)Jo=!!e;else return Jo},Ge=function(e){Lf()&&(mh?console.warn(e):(console.log(e),bh&&console.trace()))},wh=function(e){return be({},e)},Ut=function(e){return e==null?e:Ve(e)?e.slice():Oe(e)?wh(e):e},Eh=function(e){return e.slice()},Rf=function(e,r){for(r=e="";e++<36;r+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return r},xh={},Pf=function(){return xh},ht=function(e){var r=Object.keys(e);return function(a){for(var n={},i=0;i<r.length;i++){var s=r[i],o=a==null?void 0:a[s];n[s]=o===void 0?e[s]:o}return n}},cr=function(e,r,a){for(var n=e.length-1;n>=0;n--)e[n]===r&&e.splice(n,1)},fo=function(e){e.splice(0,e.length)},Th=function(e,r){for(var a=0;a<r.length;a++){var n=r[a];e.push(n)}},Dt=function(e,r,a){return a&&(r=yf(a,r)),e[r]},Kt=function(e,r,a,n){a&&(r=yf(a,r)),e[r]=n},Ch=function(){function t(){yr(this,t),this._obj={}}return mr(t,[{key:"set",value:function(r,a){return this._obj[r]=a,this}},{key:"delete",value:function(r){return this._obj[r]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(r){return this._obj[r]!==void 0}},{key:"get",value:function(r){return this._obj[r]}}])}(),Zt=typeof Map<"u"?Map:Ch,Dh="undefined",Sh=function(){function t(e){if(yr(this,t),this._obj=Object.create(null),this.size=0,e!=null){var r;e.instanceString!=null&&e.instanceString()===this.instanceString()?r=e.toArray():r=e;for(var a=0;a<r.length;a++)this.add(r[a])}}return mr(t,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(r){var a=this._obj;a[r]!==1&&(a[r]=1,this.size++)}},{key:"delete",value:function(r){var a=this._obj;a[r]===1&&(a[r]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(r){return this._obj[r]===1}},{key:"toArray",value:function(){var r=this;return Object.keys(this._obj).filter(function(a){return r.has(a)})}},{key:"forEach",value:function(r,a){return this.toArray().forEach(r,a)}}])}(),na=(typeof Set>"u"?"undefined":nt(Set))!==Dh?Set:Sh,Gn=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!io(e)){Ye("An element must have a core reference and parameters set");return}var n=r.group;if(n==null&&(r.data&&r.data.source!=null&&r.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){Ye("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?n==="edges":!!r.pannable,active:!1,classes:new na,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),u=e.zoom();i.position={x:(s.x-o.x)/u,y:(s.y-o.y)/u}}var l=[];Ve(r.classes)?l=r.classes:ge(r.classes)&&(l=r.classes.split(/\s+/));for(var f=0,c=l.length;f<c;f++){var v=l[f];!v||v===""||i.classes.add(v)}this.createEmitter(),(a===void 0||a)&&this.restore();var h=r.style||r.css;h&&(Ge("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(h))},eu=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(a,n,i){var s;Oe(a)&&!Lt(a)&&(s=a,a=s.roots||s.root,n=s.visit,i=s.directed),i=arguments.length===2&&!He(n)?n:i,n=He(n)?n:function(){};for(var o=this._private.cy,u=a=ge(a)?this.filter(a):a,l=[],f=[],c={},v={},h={},d=0,p,g=this.byGroup(),y=g.nodes,b=g.edges,m=0;m<u.length;m++){var E=u[m],T=E.id();E.isNode()&&(l.unshift(E),e.bfs&&(h[T]=!0,f.push(E)),v[T]=0)}for(var S=function(){var R=e.bfs?l.shift():l.pop(),P=R.id();if(e.dfs){if(h[P])return 0;h[P]=!0,f.push(R)}var M=v[P],N=c[P],O=N!=null?N.source():null,k=N!=null?N.target():null,B=N==null?void 0:R.same(O)?k[0]:O[0],_;if(_=n(R,N,B,d++,M),_===!0)return p=R,1;if(_===!1)return 1;for(var F=R.connectedEdges().filter(function(W){return(!i||W.source().same(R))&&b.has(W)}),G=0;G<F.length;G++){var Y=F[G],$=Y.connectedNodes().filter(function(W){return!W.same(R)&&y.has(W)}),H=$.id();$.length!==0&&!h[H]&&($=$[0],l.push($),e.bfs&&(h[H]=!0,f.push($)),c[H]=Y,v[H]=v[P]+1)}},w;l.length!==0&&(w=S(),!(w!==0&&w===1)););for(var x=o.collection(),C=0;C<f.length;C++){var D=f[C],A=c[D.id()];A!=null&&x.push(A),x.push(D)}return{path:o.collection(x),found:o.collection(p)}}},La={breadthFirstSearch:eu({bfs:!0}),depthFirstSearch:eu({dfs:!0})};La.bfs=La.breadthFirstSearch;La.dfs=La.depthFirstSearch;var fn={exports:{}},Ah=fn.exports,tu;function Lh(){return tu||(tu=1,function(t,e){(function(){var r,a,n,i,s,o,u,l,f,c,v,h,d,p,g;n=Math.floor,c=Math.min,a=function(y,b){return y<b?-1:y>b?1:0},f=function(y,b,m,E,T){var S;if(m==null&&(m=0),T==null&&(T=a),m<0)throw new Error("lo must be non-negative");for(E==null&&(E=y.length);m<E;)S=n((m+E)/2),T(b,y[S])<0?E=S:m=S+1;return[].splice.apply(y,[m,m-m].concat(b)),b},o=function(y,b,m){return m==null&&(m=a),y.push(b),p(y,0,y.length-1,m)},s=function(y,b){var m,E;return b==null&&(b=a),m=y.pop(),y.length?(E=y[0],y[0]=m,g(y,0,b)):E=m,E},l=function(y,b,m){var E;return m==null&&(m=a),E=y[0],y[0]=b,g(y,0,m),E},u=function(y,b,m){var E;return m==null&&(m=a),y.length&&m(y[0],b)<0&&(E=[y[0],b],b=E[0],y[0]=E[1],g(y,0,m)),b},i=function(y,b){var m,E,T,S,w,x;for(b==null&&(b=a),S=(function(){x=[];for(var C=0,D=n(y.length/2);0<=D?C<D:C>D;0<=D?C++:C--)x.push(C);return x}).apply(this).reverse(),w=[],E=0,T=S.length;E<T;E++)m=S[E],w.push(g(y,m,b));return w},d=function(y,b,m){var E;if(m==null&&(m=a),E=y.indexOf(b),E!==-1)return p(y,0,E,m),g(y,E,m)},v=function(y,b,m){var E,T,S,w,x;if(m==null&&(m=a),T=y.slice(0,b),!T.length)return T;for(i(T,m),x=y.slice(b),S=0,w=x.length;S<w;S++)E=x[S],u(T,E,m);return T.sort(m).reverse()},h=function(y,b,m){var E,T,S,w,x,C,D,A,L;if(m==null&&(m=a),b*10<=y.length){if(S=y.slice(0,b).sort(m),!S.length)return S;for(T=S[S.length-1],D=y.slice(b),w=0,C=D.length;w<C;w++)E=D[w],m(E,T)<0&&(f(S,E,0,null,m),S.pop(),T=S[S.length-1]);return S}for(i(y,m),L=[],x=0,A=c(b,y.length);0<=A?x<A:x>A;0<=A?++x:--x)L.push(s(y,m));return L},p=function(y,b,m,E){var T,S,w;for(E==null&&(E=a),T=y[m];m>b;){if(w=m-1>>1,S=y[w],E(T,S)<0){y[m]=S,m=w;continue}break}return y[m]=T},g=function(y,b,m){var E,T,S,w,x;for(m==null&&(m=a),T=y.length,x=b,S=y[b],E=2*b+1;E<T;)w=E+1,w<T&&!(m(y[E],y[w])<0)&&(E=w),y[b]=y[E],b=E,E=2*b+1;return y[b]=S,p(y,x,b,m)},r=function(){y.push=o,y.pop=s,y.replace=l,y.pushpop=u,y.heapify=i,y.updateItem=d,y.nlargest=v,y.nsmallest=h;function y(b){this.cmp=b??a,this.nodes=[]}return y.prototype.push=function(b){return o(this.nodes,b,this.cmp)},y.prototype.pop=function(){return s(this.nodes,this.cmp)},y.prototype.peek=function(){return this.nodes[0]},y.prototype.contains=function(b){return this.nodes.indexOf(b)!==-1},y.prototype.replace=function(b){return l(this.nodes,b,this.cmp)},y.prototype.pushpop=function(b){return u(this.nodes,b,this.cmp)},y.prototype.heapify=function(){return i(this.nodes,this.cmp)},y.prototype.updateItem=function(b){return d(this.nodes,b,this.cmp)},y.prototype.clear=function(){return this.nodes=[]},y.prototype.empty=function(){return this.nodes.length===0},y.prototype.size=function(){return this.nodes.length},y.prototype.clone=function(){var b;return b=new y,b.nodes=this.nodes.slice(0),b},y.prototype.toArray=function(){return this.nodes.slice(0)},y.prototype.insert=y.prototype.push,y.prototype.top=y.prototype.peek,y.prototype.front=y.prototype.peek,y.prototype.has=y.prototype.contains,y.prototype.copy=y.prototype.clone,y}(),function(y,b){return t.exports=b()}(this,function(){return r})}).call(Ah)}(fn)),fn.exports}var mi,ru;function Rh(){return ru||(ru=1,mi=Lh()),mi}var Ph=Rh(),Ua=_a(Ph),Ih=ht({root:null,weight:function(e){return 1},directed:!1}),Mh={dijkstra:function(e){if(!Oe(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]}}var a=Ih(e),n=a.root,i=a.weight,s=a.directed,o=this,u=i,l=ge(n)?this.filter(n)[0]:n[0],f={},c={},v={},h=this.byGroup(),d=h.nodes,p=h.edges;p.unmergeBy(function(M){return M.isLoop()});for(var g=function(N){return f[N.id()]},y=function(N,O){f[N.id()]=O,b.updateItem(N)},b=new Ua(function(M,N){return g(M)-g(N)}),m=0;m<d.length;m++){var E=d[m];f[E.id()]=E.same(l)?0:1/0,b.push(E)}for(var T=function(N,O){for(var k=(s?N.edgesTo(O):N.edgesWith(O)).intersect(p),B=1/0,_,F=0;F<k.length;F++){var G=k[F],Y=u(G);(Y<B||!_)&&(B=Y,_=G)}return{edge:_,dist:B}};b.size()>0;){var S=b.pop(),w=g(S),x=S.id();if(v[x]=w,w!==1/0)for(var C=S.neighborhood().intersect(d),D=0;D<C.length;D++){var A=C[D],L=A.id(),R=T(S,A),P=w+R.dist;P<g(A)&&(y(A,P),c[L]={node:S,edge:R.edge})}}return{distanceTo:function(N){var O=ge(N)?d.filter(N)[0]:N[0];return v[O.id()]},pathTo:function(N){var O=ge(N)?d.filter(N)[0]:N[0],k=[],B=O,_=B.id();if(O.length>0)for(k.unshift(O);c[_];){var F=c[_];k.unshift(F.edge),k.unshift(F.node),B=F.node,_=B.id()}return o.spawn(k)}}}},Oh={kruskal:function(e){e=e||function(m){return 1};for(var r=this.byGroup(),a=r.nodes,n=r.edges,i=a.length,s=new Array(i),o=a,u=function(E){for(var T=0;T<s.length;T++){var S=s[T];if(S.has(E))return T}},l=0;l<i;l++)s[l]=this.spawn(a[l]);for(var f=n.sort(function(m,E){return e(m)-e(E)}),c=0;c<f.length;c++){var v=f[c],h=v.source()[0],d=v.target()[0],p=u(h),g=u(d),y=s[p],b=s[g];p!==g&&(o.merge(v),y.merge(b),s.splice(g,1))}return o}},kh=ht({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),Nh={aStar:function(e){var r=this.cy(),a=kh(e),n=a.root,i=a.goal,s=a.heuristic,o=a.directed,u=a.weight;n=r.collection(n)[0],i=r.collection(i)[0];var l=n.id(),f=i.id(),c={},v={},h={},d=new Ua(function(_,F){return v[_.id()]-v[F.id()]}),p=new na,g={},y={},b=function(F,G){d.push(F),p.add(G)},m,E,T=function(){m=d.pop(),E=m.id(),p.delete(E)},S=function(F){return p.has(F)};b(n,l),c[l]=0,v[l]=s(n);for(var w=0;d.size()>0;){if(T(),w++,E===f){for(var x=[],C=i,D=f,A=y[D];x.unshift(C),A!=null&&x.unshift(A),C=g[D],C!=null;)D=C.id(),A=y[D];return{found:!0,distance:c[E],path:this.spawn(x),steps:w}}h[E]=!0;for(var L=m._private.edges,R=0;R<L.length;R++){var P=L[R];if(this.hasElementWithId(P.id())&&!(o&&P.data("source")!==E)){var M=P.source(),N=P.target(),O=M.id()!==E?M:N,k=O.id();if(this.hasElementWithId(k)&&!h[k]){var B=c[E]+u(P);if(!S(k)){c[k]=B,v[k]=B+s(O),b(O,k),g[k]=m,y[k]=P;continue}B<c[k]&&(c[k]=B,v[k]=B+s(O),g[k]=m,y[k]=P)}}}}return{found:!1,distance:void 0,path:void 0,steps:w}}},Bh=ht({weight:function(e){return 1},directed:!1}),Fh={floydWarshall:function(e){for(var r=this.cy(),a=Bh(e),n=a.weight,i=a.directed,s=n,o=this.byGroup(),u=o.nodes,l=o.edges,f=u.length,c=f*f,v=function(Y){return u.indexOf(Y)},h=function(Y){return u[Y]},d=new Array(c),p=0;p<c;p++){var g=p%f,y=(p-g)/f;y===g?d[p]=0:d[p]=1/0}for(var b=new Array(c),m=new Array(c),E=0;E<l.length;E++){var T=l[E],S=T.source()[0],w=T.target()[0];if(S!==w){var x=v(S),C=v(w),D=x*f+C,A=s(T);if(d[D]>A&&(d[D]=A,b[D]=C,m[D]=T),!i){var L=C*f+x;!i&&d[L]>A&&(d[L]=A,b[L]=x,m[L]=T)}}}for(var R=0;R<f;R++)for(var P=0;P<f;P++)for(var M=P*f+R,N=0;N<f;N++){var O=P*f+N,k=R*f+N;d[M]+d[k]<d[O]&&(d[O]=d[M]+d[k],b[O]=b[M])}var B=function(Y){return(ge(Y)?r.filter(Y):Y)[0]},_=function(Y){return v(B(Y))},F={distance:function(Y,$){var H=_(Y),W=_($);return d[H*f+W]},path:function(Y,$){var H=_(Y),W=_($),ee=h(H);if(H===W)return ee.collection();if(b[H*f+W]==null)return r.collection();var ae=r.collection(),J=H,z;for(ae.merge(ee);H!==W;)J=H,H=b[H*f+W],z=m[J*f+H],ae.merge(z),ae.merge(h(H));return ae}};return F}},_h=ht({weight:function(e){return 1},directed:!1,root:null}),Gh={bellmanFord:function(e){var r=this,a=_h(e),n=a.weight,i=a.directed,s=a.root,o=n,u=this,l=this.cy(),f=this.byGroup(),c=f.edges,v=f.nodes,h=v.length,d=new Zt,p=!1,g=[];s=l.collection(s)[0],c.unmergeBy(function(Te){return Te.isLoop()});for(var y=c.length,b=function(we){var ye=d.get(we.id());return ye||(ye={},d.set(we.id(),ye)),ye},m=function(we){return(ge(we)?l.$(we):we)[0]},E=function(we){return b(m(we)).dist},T=function(we){for(var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s,ie=m(we),he=[],de=ie;;){if(de==null)return r.spawn();var xe=b(de),pe=xe.edge,De=xe.pred;if(he.unshift(de[0]),de.same(ye)&&he.length>0)break;pe!=null&&he.unshift(pe),de=De}return u.spawn(he)},S=0;S<h;S++){var w=v[S],x=b(w);w.same(s)?x.dist=0:x.dist=1/0,x.pred=null,x.edge=null}for(var C=!1,D=function(we,ye,ie,he,de,xe){var pe=he.dist+xe;pe<de.dist&&!ie.same(he.edge)&&(de.dist=pe,de.pred=we,de.edge=ie,C=!0)},A=1;A<h;A++){C=!1;for(var L=0;L<y;L++){var R=c[L],P=R.source(),M=R.target(),N=o(R),O=b(P),k=b(M);D(P,M,R,O,k,N),i||D(M,P,R,k,O,N)}if(!C)break}if(C)for(var B=[],_=0;_<y;_++){var F=c[_],G=F.source(),Y=F.target(),$=o(F),H=b(G).dist,W=b(Y).dist;if(H+$<W||!i&&W+$<H)if(p||(Ge("Graph contains a negative weight cycle for Bellman-Ford"),p=!0),e.findNegativeWeightCycles!==!1){var ee=[];H+$<W&&ee.push(G),!i&&W+$<H&&ee.push(Y);for(var ae=ee.length,J=0;J<ae;J++){var z=ee[J],V=[z];V.push(b(z).edge);for(var q=b(z).pred;V.indexOf(q)===-1;)V.push(q),V.push(b(q).edge),q=b(q).pred;V=V.slice(V.indexOf(q));for(var Z=V[0].id(),re=0,ve=2;ve<V.length;ve+=2)V[ve].id()<Z&&(Z=V[ve].id(),re=ve);V=V.slice(re).concat(V.slice(0,re)),V.push(V[0]);var Pe=V.map(function(Te){return Te.id()}).join(",");B.indexOf(Pe)===-1&&(g.push(u.spawn(V)),B.push(Pe))}}else break}return{distanceTo:E,pathTo:T,hasNegativeWeightCycle:p,negativeWeightCycles:g}}},zh=Math.sqrt(2),Vh=function(e,r,a){a.length===0&&Ye("Karger-Stein must be run on a connected (sub)graph");for(var n=a[e],i=n[1],s=n[2],o=r[i],u=r[s],l=a,f=l.length-1;f>=0;f--){var c=l[f],v=c[1],h=c[2];(r[v]===o&&r[h]===u||r[v]===u&&r[h]===o)&&l.splice(f,1)}for(var d=0;d<l.length;d++){var p=l[d];p[1]===u?(l[d]=p.slice(),l[d][1]=o):p[2]===u&&(l[d]=p.slice(),l[d][2]=o)}for(var g=0;g<r.length;g++)r[g]===u&&(r[g]=o);return l},bi=function(e,r,a,n){for(;a>n;){var i=Math.floor(Math.random()*r.length);r=Vh(i,e,r),a--}return r},Uh={kargerStein:function(){var e=this,r=this.byGroup(),a=r.nodes,n=r.edges;n.unmergeBy(function(k){return k.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),u=Math.floor(i/zh);if(i<2){Ye("At least 2 nodes are required for Karger-Stein algorithm");return}for(var l=[],f=0;f<s;f++){var c=n[f];l.push([f,a.indexOf(c.source()),a.indexOf(c.target())])}for(var v=1/0,h=[],d=new Array(i),p=new Array(i),g=new Array(i),y=function(B,_){for(var F=0;F<i;F++)_[F]=B[F]},b=0;b<=o;b++){for(var m=0;m<i;m++)p[m]=m;var E=bi(p,l.slice(),i,u),T=E.slice();y(p,g);var S=bi(p,E,u,2),w=bi(g,T,u,2);S.length<=w.length&&S.length<v?(v=S.length,h=S,y(p,d)):w.length<=S.length&&w.length<v&&(v=w.length,h=w,y(g,d))}for(var x=this.spawn(h.map(function(k){return n[k[0]]})),C=this.spawn(),D=this.spawn(),A=d[0],L=0;L<d.length;L++){var R=d[L],P=a[L];R===A?C.merge(P):D.merge(P)}var M=function(B){var _=e.spawn();return B.forEach(function(F){_.merge(F),F.connectedEdges().forEach(function(G){e.contains(G)&&!x.contains(G)&&_.merge(G)})}),_},N=[M(C),M(D)],O={cut:x,components:N,partition1:C,partition2:D};return O}},wi,qh=function(e){return{x:e.x,y:e.y}},zn=function(e,r,a){return{x:e.x*r+a.x,y:e.y*r+a.y}},If=function(e,r,a){return{x:(e.x-a.x)/r,y:(e.y-a.y)/r}},Wr=function(e){return{x:e[0],y:e[1]}},$h=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=r;i<a;i++){var s=e[i];isFinite(s)&&(n=Math.min(s,n))}return n},Yh=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=r;i<a;i++){var s=e[i];isFinite(s)&&(n=Math.max(s,n))}return n},Hh=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=r;s<a;s++){var o=e[s];isFinite(o)&&(n+=o,i++)}return n/i},Xh=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(r,a):(a<e.length&&e.splice(a,e.length-a),r>0&&e.splice(0,r));for(var o=0,u=e.length-1;u>=0;u--){var l=e[u];s?isFinite(l)||(e[u]=-1/0,o++):e.splice(u,1)}i&&e.sort(function(v,h){return v-h});var f=e.length,c=Math.floor(f/2);return f%2!==0?e[c+1+o]:(e[c-1+o]+e[c+o])/2},Wh=function(e){return Math.PI*e/180},Ja=function(e,r){return Math.atan2(r,e)-Math.PI/2},co=Math.log2||function(t){return Math.log(t)/Math.log(2)},vo=function(e){return e>0?1:e<0?-1:0},Ir=function(e,r){return Math.sqrt(Dr(e,r))},Dr=function(e,r){var a=r.x-e.x,n=r.y-e.y;return a*a+n*n},Kh=function(e){for(var r=e.length,a=0,n=0;n<r;n++)a+=e[n];for(var i=0;i<r;i++)e[i]=e[i]/a;return e},ot=function(e,r,a,n){return(1-n)*(1-n)*e+2*(1-n)*n*r+n*n*a},Qr=function(e,r,a,n){return{x:ot(e.x,r.x,a.x,n),y:ot(e.y,r.y,a.y,n)}},Zh=function(e,r,a,n){var i={x:r.x-e.x,y:r.y-e.y},s=Ir(e,r),o={x:i.x/s,y:i.y/s};return a=a??0,n=n??a*s,{x:e.x+o.x*n,y:e.y+o.y*n}},Ra=function(e,r,a){return Math.max(e,Math.min(a,r))},Et=function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Qh=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},Jh=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},jh=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},Mf=function(e,r,a){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},cn=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},vn=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(r.length===1)a=n=i=s=r[0];else if(r.length===2)a=i=r[0],s=n=r[1];else if(r.length===4){var o=Je(r,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},au=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},ho=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2<r.x1||r.x2<e.x1||e.y2<r.y1||r.y2<e.y1||e.y1>r.y2||r.y1>e.y2)},sr=function(e,r,a){return e.x1<=r&&r<=e.x2&&e.y1<=a&&a<=e.y2},nu=function(e,r){return sr(e,r.x,r.y)},Of=function(e,r){return sr(e,r.x1,r.y1)&&sr(e,r.x2,r.y2)},ed=(wi=Math.hypot)!==null&&wi!==void 0?wi:function(t,e){return Math.sqrt(t*t+e*e)};function td(t,e){if(t.length<3)throw new Error("Need at least 3 vertices");var r=function(x,C){return{x:x.x+C.x,y:x.y+C.y}},a=function(x,C){return{x:x.x-C.x,y:x.y-C.y}},n=function(x,C){return{x:x.x*C,y:x.y*C}},i=function(x,C){return x.x*C.y-x.y*C.x},s=function(x){var C=ed(x.x,x.y);return C===0?{x:0,y:0}:{x:x.x/C,y:x.y/C}},o=function(x){for(var C=0,D=0;D<x.length;D++){var A=x[D],L=x[(D+1)%x.length];C+=A.x*L.y-L.x*A.y}return C/2},u=function(x,C,D,A){var L=a(C,x),R=a(A,D),P=i(L,R);if(Math.abs(P)<1e-9)return r(x,n(L,.5));var M=i(a(D,x),R)/P;return r(x,n(L,M))},l=t.map(function(w){return{x:w.x,y:w.y}});o(l)<0&&l.reverse();for(var f=l.length,c=[],v=0;v<f;v++){var h=l[v],d=l[(v+1)%f],p=a(d,h),g=s({x:p.y,y:-p.x});c.push(g)}for(var y=c.map(function(w,x){var C=r(l[x],n(w,e)),D=r(l[(x+1)%f],n(w,e));return{p1:C,p2:D}}),b=[],m=0;m<f;m++){var E=y[(m-1+f)%f],T=y[m],S=u(E.p1,E.p2,T.p1,T.p2);b.push(S)}return b}function rd(t,e,r,a,n,i){var s=cd(t,e,r,a,n),o=td(s,i),u=Et();return o.forEach(function(l){return Mf(u,l.x,l.y)}),u}var kf=function(e,r,a,n,i,s,o){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",l=u==="auto"?vr(i,s):u,f=i/2,c=s/2;l=Math.min(l,f,c);var v=l!==f,h=l!==c,d;if(v){var p=a-f+l-o,g=n-c-o,y=a+f-l+o,b=g;if(d=or(e,r,a,n,p,g,y,b,!1),d.length>0)return d}if(h){var m=a+f+o,E=n-c+l-o,T=m,S=n+c-l+o;if(d=or(e,r,a,n,m,E,T,S,!1),d.length>0)return d}if(v){var w=a-f+l-o,x=n+c+o,C=a+f-l+o,D=x;if(d=or(e,r,a,n,w,x,C,D,!1),d.length>0)return d}if(h){var A=a-f-o,L=n-c+l-o,R=A,P=n+c-l+o;if(d=or(e,r,a,n,A,L,R,P,!1),d.length>0)return d}var M;{var N=a-f+l,O=n-c+l;if(M=wa(e,r,a,n,N,O,l+o),M.length>0&&M[0]<=N&&M[1]<=O)return[M[0],M[1]]}{var k=a+f-l,B=n-c+l;if(M=wa(e,r,a,n,k,B,l+o),M.length>0&&M[0]>=k&&M[1]<=B)return[M[0],M[1]]}{var _=a+f-l,F=n+c-l;if(M=wa(e,r,a,n,_,F,l+o),M.length>0&&M[0]>=_&&M[1]>=F)return[M[0],M[1]]}{var G=a-f+l,Y=n+c-l;if(M=wa(e,r,a,n,G,Y,l+o),M.length>0&&M[0]<=G&&M[1]>=Y)return[M[0],M[1]]}return[]},ad=function(e,r,a,n,i,s,o){var u=o,l=Math.min(a,i),f=Math.max(a,i),c=Math.min(n,s),v=Math.max(n,s);return l-u<=e&&e<=f+u&&c-u<=r&&r<=v+u},nd=function(e,r,a,n,i,s,o,u,l){var f={x1:Math.min(a,o,i)-l,x2:Math.max(a,o,i)+l,y1:Math.min(n,u,s)-l,y2:Math.max(n,u,s)+l};return!(e<f.x1||e>f.x2||r<f.y1||r>f.y2)},id=function(e,r,a,n){a-=n;var i=r*r-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,u=(-r+s)/o,l=(-r-s)/o;return[u,l]},sd=function(e,r,a,n,i){var s=1e-5;e===0&&(e=s),r/=e,a/=e,n/=e;var o,u,l,f,c,v,h,d;if(u=(3*a-r*r)/9,l=-(27*n)+r*(9*a-2*(r*r)),l/=54,o=u*u*u+l*l,i[1]=0,h=r/3,o>0){c=l+Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),v=l-Math.sqrt(o),v=v<0?-Math.pow(-v,1/3):Math.pow(v,1/3),i[0]=-h+c+v,h+=(c+v)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-v+c)/2,i[3]=h,i[5]=-h;return}if(i[5]=i[3]=0,o===0){d=l<0?-Math.pow(-l,1/3):Math.pow(l,1/3),i[0]=-h+2*d,i[4]=i[2]=-(d+h);return}u=-u,f=u*u*u,f=Math.acos(l/Math.sqrt(f)),d=2*Math.sqrt(u),i[0]=-h+d*Math.cos(f/3),i[2]=-h+d*Math.cos((f+2*Math.PI)/3),i[4]=-h+d*Math.cos((f+4*Math.PI)/3)},od=function(e,r,a,n,i,s,o,u){var l=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*u+4*s*s-4*s*u+u*u,f=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*u-6*s*s+3*s*u,c=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*u-n*r+2*s*s+2*s*r-u*r,v=1*a*i-a*a+a*e-i*e+n*s-n*n+n*r-s*r,h=[];sd(l,f,c,v,h);for(var d=1e-7,p=[],g=0;g<6;g+=2)Math.abs(h[g+1])<d&&h[g]>=0&&h[g]<=1&&p.push(h[g]);p.push(1),p.push(0);for(var y=-1,b,m,E,T=0;T<p.length;T++)b=Math.pow(1-p[T],2)*a+2*(1-p[T])*p[T]*i+p[T]*p[T]*o,m=Math.pow(1-p[T],2)*n+2*(1-p[T])*p[T]*s+p[T]*p[T]*u,E=Math.pow(b-e,2)+Math.pow(m-r,2),y>=0?E<y&&(y=E):y=E;return y},ud=function(e,r,a,n,i,s){var o=[e-a,r-n],u=[i-a,s-n],l=u[0]*u[0]+u[1]*u[1],f=o[0]*o[0]+o[1]*o[1],c=o[0]*u[0]+o[1]*u[1],v=c*c/l;return c<0?f:v>l?(e-i)*(e-i)+(r-s)*(r-s):f-v},St=function(e,r,a){for(var n,i,s,o,u,l=0,f=0;f<a.length/2;f++)if(n=a[f*2],i=a[f*2+1],f+1<a.length/2?(s=a[(f+1)*2],o=a[(f+1)*2+1]):(s=a[(f+1-a.length/2)*2],o=a[(f+1-a.length/2)*2+1]),!(n==e&&s==e))if(n>=e&&e>=s||n<=e&&e<=s)u=(e-n)/(s-n)*(o-i)+i,u>r&&l++;else continue;return l%2!==0},Jt=function(e,r,a,n,i,s,o,u,l){var f=new Array(a.length),c;u[0]!=null?(c=Math.atan(u[1]/u[0]),u[0]<0?c=c+Math.PI/2:c=-c-Math.PI/2):c=u;for(var v=Math.cos(-c),h=Math.sin(-c),d=0;d<f.length/2;d++)f[d*2]=s/2*(a[d*2]*v-a[d*2+1]*h),f[d*2+1]=o/2*(a[d*2+1]*v+a[d*2]*h),f[d*2]+=n,f[d*2+1]+=i;var p;if(l>0){var g=Ln(f,-l);p=An(g)}else p=f;return St(e,r,p)},ld=function(e,r,a,n,i,s,o,u){for(var l=new Array(a.length*2),f=0;f<u.length;f++){var c=u[f];l[f*4+0]=c.startX,l[f*4+1]=c.startY,l[f*4+2]=c.stopX,l[f*4+3]=c.stopY;var v=Math.pow(c.cx-e,2)+Math.pow(c.cy-r,2);if(v<=Math.pow(c.radius,2))return!0}return St(e,r,l)},An=function(e){for(var r=new Array(e.length/2),a,n,i,s,o,u,l,f,c=0;c<e.length/4;c++){a=e[c*4],n=e[c*4+1],i=e[c*4+2],s=e[c*4+3],c<e.length/4-1?(o=e[(c+1)*4],u=e[(c+1)*4+1],l=e[(c+1)*4+2],f=e[(c+1)*4+3]):(o=e[0],u=e[1],l=e[2],f=e[3]);var v=or(a,n,i,s,o,u,l,f,!0);r[c*2]=v[0],r[c*2+1]=v[1]}return r},Ln=function(e,r){for(var a=new Array(e.length*2),n,i,s,o,u=0;u<e.length/2;u++){n=e[u*2],i=e[u*2+1],u<e.length/2-1?(s=e[(u+1)*2],o=e[(u+1)*2+1]):(s=e[0],o=e[1]);var l=o-i,f=-(s-n),c=Math.sqrt(l*l+f*f),v=l/c,h=f/c;a[u*4]=n+v*r,a[u*4+1]=i+h*r,a[u*4+2]=s+v*r,a[u*4+3]=o+h*r}return a},fd=function(e,r,a,n,i,s){var o=a-e,u=n-r;o/=i,u/=s;var l=Math.sqrt(o*o+u*u),f=l-1;if(f<0)return[];var c=f/l;return[(a-e)*c+e,(n-r)*c+r]},Rr=function(e,r,a,n,i,s,o){return e-=i,r-=s,e/=a/2+o,r/=n/2+o,e*e+r*r<=1},wa=function(e,r,a,n,i,s,o){var u=[a-e,n-r],l=[e-i,r-s],f=u[0]*u[0]+u[1]*u[1],c=2*(l[0]*u[0]+l[1]*u[1]),v=l[0]*l[0]+l[1]*l[1]-o*o,h=c*c-4*f*v;if(h<0)return[];var d=(-c+Math.sqrt(h))/(2*f),p=(-c-Math.sqrt(h))/(2*f),g=Math.min(d,p),y=Math.max(d,p),b=[];if(g>=0&&g<=1&&b.push(g),y>=0&&y<=1&&b.push(y),b.length===0)return[];var m=b[0]*u[0]+e,E=b[0]*u[1]+r;if(b.length>1){if(b[0]==b[1])return[m,E];var T=b[1]*u[0]+e,S=b[1]*u[1]+r;return[m,E,T,S]}else return[m,E]},Ei=function(e,r,a){return r<=e&&e<=a||a<=e&&e<=r?e:e<=r&&r<=a||a<=r&&r<=e?r:a},or=function(e,r,a,n,i,s,o,u,l){var f=e-i,c=a-e,v=o-i,h=r-s,d=n-r,p=u-s,g=v*h-p*f,y=c*h-d*f,b=p*c-v*d;if(b!==0){var m=g/b,E=y/b,T=.001,S=0-T,w=1+T;return S<=m&&m<=w&&S<=E&&E<=w?[e+m*c,r+m*d]:l?[e+m*c,r+m*d]:[]}else return g===0||y===0?Ei(e,a,o)===o?[o,u]:Ei(e,a,i)===i?[i,s]:Ei(i,o,a)===a?[a,n]:[]:[]},cd=function(e,r,a,n,i){var s=[],o=n/2,u=i/2,l=r,f=a;s.push({x:l+o*e[0],y:f+u*e[1]});for(var c=1;c<e.length/2;c++)s.push({x:l+o*e[c*2],y:f+u*e[c*2+1]});return s},Pa=function(e,r,a,n,i,s,o,u){var l=[],f,c=new Array(a.length),v=!0;s==null&&(v=!1);var h;if(v){for(var d=0;d<c.length/2;d++)c[d*2]=a[d*2]*s+n,c[d*2+1]=a[d*2+1]*o+i;if(u>0){var p=Ln(c,-u);h=An(p)}else h=c}else h=a;for(var g,y,b,m,E=0;E<h.length/2;E++)g=h[E*2],y=h[E*2+1],E<h.length/2-1?(b=h[(E+1)*2],m=h[(E+1)*2+1]):(b=h[0],m=h[1]),f=or(e,r,n,i,g,y,b,m),f.length!==0&&l.push(f[0],f[1]);return l},vd=function(e,r,a,n,i,s,o,u,l){var f=[],c,v=new Array(a.length*2);l.forEach(function(b,m){m===0?(v[v.length-2]=b.startX,v[v.length-1]=b.startY):(v[m*4-2]=b.startX,v[m*4-1]=b.startY),v[m*4]=b.stopX,v[m*4+1]=b.stopY,c=wa(e,r,n,i,b.cx,b.cy,b.radius),c.length!==0&&f.push(c[0],c[1])});for(var h=0;h<v.length/4;h++)c=or(e,r,n,i,v[h*4],v[h*4+1],v[h*4+2],v[h*4+3],!1),c.length!==0&&f.push(c[0],c[1]);if(f.length>2){for(var d=[f[0],f[1]],p=Math.pow(d[0]-e,2)+Math.pow(d[1]-r,2),g=1;g<f.length/2;g++){var y=Math.pow(f[g*2]-e,2)+Math.pow(f[g*2+1]-r,2);y<=p&&(d[0]=f[g*2],d[1]=f[g*2+1],p=y)}return d}return f},ja=function(e,r,a){var n=[e[0]-r[0],e[1]-r[1]],i=Math.sqrt(n[0]*n[0]+n[1]*n[1]),s=(i-a)/i;return s<0&&(s=1e-5),[r[0]+s*n[0],r[1]+s*n[1]]},wt=function(e,r){var a=Bs(e,r);return a=Nf(a),a},Nf=function(e){for(var r,a,n=e.length/2,i=1/0,s=1/0,o=-1/0,u=-1/0,l=0;l<n;l++)r=e[2*l],a=e[2*l+1],i=Math.min(i,r),o=Math.max(o,r),s=Math.min(s,a),u=Math.max(u,a);for(var f=2/(o-i),c=2/(u-s),v=0;v<n;v++)r=e[2*v]=e[2*v]*f,a=e[2*v+1]=e[2*v+1]*c,i=Math.min(i,r),o=Math.max(o,r),s=Math.min(s,a),u=Math.max(u,a);if(s<-1)for(var h=0;h<n;h++)a=e[2*h+1]=e[2*h+1]+(-1-s);return e},Bs=function(e,r){var a=1/e*2*Math.PI,n=e%2===0?Math.PI/2+a/2:Math.PI/2;n+=r;for(var i=new Array(e*2),s,o=0;o<e;o++)s=o*a+n,i[2*o]=Math.cos(s),i[2*o+1]=Math.sin(-s);return i},vr=function(e,r){return Math.min(e/4,r/4,8)},Bf=function(e,r){return Math.min(e/10,r/10,8)},go=function(){return 8},hd=function(e,r,a){return[e-2*r+a,2*(r-e),e]},Fs=function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}};function xi(t,e){function r(c){for(var v=[],h=0;h<c.length;h++){var d=c[h],p=c[(h+1)%c.length],g={x:p.x-d.x,y:p.y-d.y},y={x:-g.y,y:g.x},b=Math.sqrt(y.x*y.x+y.y*y.y);v.push({x:y.x/b,y:y.y/b})}return v}function a(c,v){var h=1/0,d=-1/0,p=At(c),g;try{for(p.s();!(g=p.n()).done;){var y=g.value,b=y.x*v.x+y.y*v.y;h=Math.min(h,b),d=Math.max(d,b)}}catch(m){p.e(m)}finally{p.f()}return{min:h,max:d}}function n(c,v){return!(c.max<v.min||v.max<c.min)}var i=[].concat(Tn(r(t)),Tn(r(e))),s=At(i),o;try{for(s.s();!(o=s.n()).done;){var u=o.value,l=a(t,u),f=a(e,u);if(!n(l,f))return!1}}catch(c){s.e(c)}finally{s.f()}return!0}var dd=ht({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),gd={pageRank:function(e){for(var r=dd(e),a=r.dampingFactor,n=r.precision,i=r.iterations,s=r.weight,o=this._private.cy,u=this.byGroup(),l=u.nodes,f=u.edges,c=l.length,v=c*c,h=f.length,d=new Array(v),p=new Array(c),g=(1-a)/c,y=0;y<c;y++){for(var b=0;b<c;b++){var m=y*c+b;d[m]=0}p[y]=0}for(var E=0;E<h;E++){var T=f[E],S=T.data("source"),w=T.data("target");if(S!==w){var x=l.indexOfId(S),C=l.indexOfId(w),D=s(T),A=C*c+x;d[A]+=D,p[x]+=D}}for(var L=1/c+g,R=0;R<c;R++)if(p[R]===0)for(var P=0;P<c;P++){var M=P*c+R;d[M]=L}else for(var N=0;N<c;N++){var O=N*c+R;d[O]=d[O]/p[R]+g}for(var k=new Array(c),B=new Array(c),_,F=0;F<c;F++)k[F]=1;for(var G=0;G<i;G++){for(var Y=0;Y<c;Y++)B[Y]=0;for(var $=0;$<c;$++)for(var H=0;H<c;H++){var W=$*c+H;B[$]+=d[W]*k[H]}Kh(B),_=k,k=B,B=_;for(var ee=0,ae=0;ae<c;ae++){var J=_[ae]-k[ae];ee+=J*J}if(ee<n)break}var z={rank:function(q){return q=o.collection(q)[0],k[l.indexOf(q)]}};return z}},iu=ht({root:null,weight:function(e){return 1},directed:!1,alpha:0}),Jr={degreeCentralityNormalized:function(e){e=iu(e);var r=this.cy(),a=this.nodes(),n=a.length;if(e.directed){for(var f={},c={},v=0,h=0,d=0;d<n;d++){var p=a[d],g=p.id();e.root=p;var y=this.degreeCentrality(e);v<y.indegree&&(v=y.indegree),h<y.outdegree&&(h=y.outdegree),f[g]=y.indegree,c[g]=y.outdegree}return{indegree:function(m){return v==0?0:(ge(m)&&(m=r.filter(m)),f[m.id()]/v)},outdegree:function(m){return h===0?0:(ge(m)&&(m=r.filter(m)),c[m.id()]/h)}}}else{for(var i={},s=0,o=0;o<n;o++){var u=a[o];e.root=u;var l=this.degreeCentrality(e);s<l.degree&&(s=l.degree),i[u.id()]=l.degree}return{degree:function(m){return s===0?0:(ge(m)&&(m=r.filter(m)),i[m.id()]/s)}}}},degreeCentrality:function(e){e=iu(e);var r=this.cy(),a=this,n=e,i=n.root,s=n.weight,o=n.directed,u=n.alpha;if(i=r.collection(i)[0],o){for(var h=i.connectedEdges(),d=h.filter(function(S){return S.target().same(i)&&a.has(S)}),p=h.filter(function(S){return S.source().same(i)&&a.has(S)}),g=d.length,y=p.length,b=0,m=0,E=0;E<d.length;E++)b+=s(d[E]);for(var T=0;T<p.length;T++)m+=s(p[T]);return{indegree:Math.pow(g,1-u)*Math.pow(b,u),outdegree:Math.pow(y,1-u)*Math.pow(m,u)}}else{for(var l=i.connectedEdges().intersection(a),f=l.length,c=0,v=0;v<l.length;v++)c+=s(l[v]);return{degree:Math.pow(f,1-u)*Math.pow(c,u)}}}};Jr.dc=Jr.degreeCentrality;Jr.dcn=Jr.degreeCentralityNormalised=Jr.degreeCentralityNormalized;var su=ht({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),jr={closenessCentralityNormalized:function(e){for(var r=su(e),a=r.harmonic,n=r.weight,i=r.directed,s=this.cy(),o={},u=0,l=this.nodes(),f=this.floydWarshall({weight:n,directed:i}),c=0;c<l.length;c++){for(var v=0,h=l[c],d=0;d<l.length;d++)if(c!==d){var p=f.distance(h,l[d]);a?v+=1/p:v+=p}a||(v=1/v),u<v&&(u=v),o[h.id()]=v}return{closeness:function(y){return u==0?0:(ge(y)?y=s.filter(y)[0].id():y=y.id(),o[y]/u)}}},closenessCentrality:function(e){var r=su(e),a=r.root,n=r.weight,i=r.directed,s=r.harmonic;a=this.filter(a)[0];for(var o=this.dijkstra({root:a,weight:n,directed:i}),u=0,l=this.nodes(),f=0;f<l.length;f++){var c=l[f];if(!c.same(a)){var v=o.distanceTo(c);s?u+=1/v:u+=v}}return s?u:1/u}};jr.cc=jr.closenessCentrality;jr.ccn=jr.closenessCentralityNormalised=jr.closenessCentralityNormalized;var pd=ht({weight:null,directed:!1}),_s={betweennessCentrality:function(e){for(var r=pd(e),a=r.directed,n=r.weight,i=n!=null,s=this.cy(),o=this.nodes(),u={},l={},f=0,c={set:function(m,E){l[m]=E,E>f&&(f=E)},get:function(m){return l[m]}},v=0;v<o.length;v++){var h=o[v],d=h.id();a?u[d]=h.outgoers().nodes():u[d]=h.openNeighborhood().nodes(),c.set(d,0)}for(var p=function(){for(var m=o[g].id(),E=[],T={},S={},w={},x=new Ua(function($,H){return w[$]-w[H]}),C=0;C<o.length;C++){var D=o[C].id();T[D]=[],S[D]=0,w[D]=1/0}for(S[m]=1,w[m]=0,x.push(m);!x.empty();){var A=x.pop();if(E.push(A),i)for(var L=0;L<u[A].length;L++){var R=u[A][L],P=s.getElementById(A),M=void 0;P.edgesTo(R).length>0?M=P.edgesTo(R)[0]:M=R.edgesTo(P)[0];var N=n(M);R=R.id(),w[R]>w[A]+N&&(w[R]=w[A]+N,x.nodes.indexOf(R)<0?x.push(R):x.updateItem(R),S[R]=0,T[R]=[]),w[R]==w[A]+N&&(S[R]=S[R]+S[A],T[R].push(A))}else for(var O=0;O<u[A].length;O++){var k=u[A][O].id();w[k]==1/0&&(x.push(k),w[k]=w[A]+1),w[k]==w[A]+1&&(S[k]=S[k]+S[A],T[k].push(A))}}for(var B={},_=0;_<o.length;_++)B[o[_].id()]=0;for(;E.length>0;){for(var F=E.pop(),G=0;G<T[F].length;G++){var Y=T[F][G];B[Y]=B[Y]+S[Y]/S[F]*(1+B[F])}F!=o[g].id()&&c.set(F,c.get(F)+B[F])}},g=0;g<o.length;g++)p();var y={betweenness:function(m){var E=s.collection(m).id();return c.get(E)},betweennessNormalized:function(m){if(f==0)return 0;var E=s.collection(m).id();return c.get(E)/f}};return y.betweennessNormalised=y.betweennessNormalized,y}};_s.bc=_s.betweennessCentrality;var yd=ht({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),md=function(e){return yd(e)},bd=function(e,r){for(var a=0,n=0;n<r.length;n++)a+=r[n](e);return a},wd=function(e,r,a){for(var n=0;n<r;n++)e[n*r+n]=a},Ff=function(e,r){for(var a,n=0;n<r;n++){a=0;for(var i=0;i<r;i++)a+=e[i*r+n];for(var s=0;s<r;s++)e[s*r+n]=e[s*r+n]/a}},Ed=function(e,r,a){for(var n=new Array(a*a),i=0;i<a;i++){for(var s=0;s<a;s++)n[i*a+s]=0;for(var o=0;o<a;o++)for(var u=0;u<a;u++)n[i*a+u]+=e[i*a+o]*r[o*a+u]}return n},xd=function(e,r,a){for(var n=e.slice(0),i=1;i<a;i++)e=Ed(e,n,r);return e},Td=function(e,r,a){for(var n=new Array(r*r),i=0;i<r*r;i++)n[i]=Math.pow(e[i],a);return Ff(n,r),n},Cd=function(e,r,a,n){for(var i=0;i<a;i++){var s=Math.round(e[i]*Math.pow(10,n))/Math.pow(10,n),o=Math.round(r[i]*Math.pow(10,n))/Math.pow(10,n);if(s!==o)return!1}return!0},Dd=function(e,r,a,n){for(var i=[],s=0;s<r;s++){for(var o=[],u=0;u<r;u++)Math.round(e[s*r+u]*1e3)/1e3>0&&o.push(a[u]);o.length!==0&&i.push(n.collection(o))}return i},Sd=function(e,r){for(var a=0;a<e.length;a++)if(!r[a]||e[a].id()!==r[a].id())return!1;return!0},Ad=function(e){for(var r=0;r<e.length;r++)for(var a=0;a<e.length;a++)r!=a&&Sd(e[r],e[a])&&e.splice(a,1);return e},ou=function(e){for(var r=this.nodes(),a=this.edges(),n=this.cy(),i=md(e),s={},o=0;o<r.length;o++)s[r[o].id()]=o;for(var u=r.length,l=u*u,f=new Array(l),c,v=0;v<l;v++)f[v]=0;for(var h=0;h<a.length;h++){var d=a[h],p=s[d.source().id()],g=s[d.target().id()],y=bd(d,i.attributes);f[p*u+g]+=y,f[g*u+p]+=y}wd(f,u,i.multFactor),Ff(f,u);for(var b=!0,m=0;b&&m<i.maxIterations;)b=!1,c=xd(f,u,i.expandFactor),f=Td(c,u,i.inflateFactor),Cd(f,c,l,4)||(b=!0),m++;var E=Dd(f,u,r,n);return E=Ad(E),E},Ld={markovClustering:ou,mcl:ou},Rd=function(e){return e},_f=function(e,r){return Math.abs(r-e)},uu=function(e,r,a){return e+_f(r,a)},lu=function(e,r,a){return e+Math.pow(a-r,2)},Pd=function(e){return Math.sqrt(e)},Id=function(e,r,a){return Math.max(e,_f(r,a))},ha=function(e,r,a,n,i){for(var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Rd,o=n,u,l,f=0;f<e;f++)u=r(f),l=a(f),o=i(o,u,l);return s(o)},ra={euclidean:function(e,r,a){return e>=2?ha(e,r,a,0,lu,Pd):ha(e,r,a,0,uu)},squaredEuclidean:function(e,r,a){return ha(e,r,a,0,lu)},manhattan:function(e,r,a){return ha(e,r,a,0,uu)},max:function(e,r,a){return ha(e,r,a,-1/0,Id)}};ra["squared-euclidean"]=ra.squaredEuclidean;ra.squaredeuclidean=ra.squaredEuclidean;function Vn(t,e,r,a,n,i){var s;return He(t)?s=t:s=ra[t]||ra.euclidean,e===0&&He(t)?s(n,i):s(e,r,a,n,i)}var Md=ht({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),po=function(e){return Md(e)},Rn=function(e,r,a,n,i){var s=i!=="kMedoids",o=s?function(c){return a[c]}:function(c){return n[c](a)},u=function(v){return n[v](r)},l=a,f=r;return Vn(e,n.length,o,u,l,f)},Ti=function(e,r,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(r),u=null,l=0;l<n;l++)i[l]=e.min(a[l]).value,s[l]=e.max(a[l]).value;for(var f=0;f<r;f++){u=[];for(var c=0;c<n;c++)u[c]=Math.random()*(s[c]-i[c])+i[c];o[f]=u}return o},Gf=function(e,r,a,n,i){for(var s=1/0,o=0,u=0;u<r.length;u++){var l=Rn(a,e,r[u],n,i);l<s&&(s=l,o=u)}return o},zf=function(e,r,a){for(var n=[],i=null,s=0;s<r.length;s++)i=r[s],a[i.id()]===e&&n.push(i);return n},Od=function(e,r,a){return Math.abs(r-e)<=a},kd=function(e,r,a){for(var n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++){var s=Math.abs(e[n][i]-r[n][i]);if(s>a)return!1}return!0},Nd=function(e,r,a){for(var n=0;n<a;n++)if(e===r[n])return!0;return!1},fu=function(e,r){var a=new Array(r);if(e.length<50)for(var n=0;n<r;n++){for(var i=e[Math.floor(Math.random()*e.length)];Nd(i,a,n);)i=e[Math.floor(Math.random()*e.length)];a[n]=i}else for(var s=0;s<r;s++)a[s]=e[Math.floor(Math.random()*e.length)];return a},cu=function(e,r,a){for(var n=0,i=0;i<r.length;i++)n+=Rn("manhattan",r[i],e,a,"kMedoids");return n},Bd=function(e){var r=this.cy(),a=this.nodes(),n=null,i=po(e),s=new Array(i.k),o={},u;i.testMode?typeof i.testCentroids=="number"?(i.testCentroids,u=Ti(a,i.k,i.attributes)):nt(i.testCentroids)==="object"?u=i.testCentroids:u=Ti(a,i.k,i.attributes):u=Ti(a,i.k,i.attributes);for(var l=!0,f=0;l&&f<i.maxIterations;){for(var c=0;c<a.length;c++)n=a[c],o[n.id()]=Gf(n,u,i.distance,i.attributes,"kMeans");l=!1;for(var v=0;v<i.k;v++){var h=zf(v,a,o);if(h.length!==0){for(var d=i.attributes.length,p=u[v],g=new Array(d),y=new Array(d),b=0;b<d;b++){y[b]=0;for(var m=0;m<h.length;m++)n=h[m],y[b]+=i.attributes[b](n);g[b]=y[b]/h.length,Od(g[b],p[b],i.sensitivityThreshold)||(l=!0)}u[v]=g,s[v]=r.collection(h)}}f++}return s},Fd=function(e){var r=this.cy(),a=this.nodes(),n=null,i=po(e),s=new Array(i.k),o,u={},l,f=new Array(i.k);i.testMode?typeof i.testCentroids=="number"||(nt(i.testCentroids)==="object"?o=i.testCentroids:o=fu(a,i.k)):o=fu(a,i.k);for(var c=!0,v=0;c&&v<i.maxIterations;){for(var h=0;h<a.length;h++)n=a[h],u[n.id()]=Gf(n,o,i.distance,i.attributes,"kMedoids");c=!1;for(var d=0;d<o.length;d++){var p=zf(d,a,u);if(p.length!==0){f[d]=cu(o[d],p,i.attributes);for(var g=0;g<p.length;g++)l=cu(p[g],p,i.attributes),l<f[d]&&(f[d]=l,o[d]=p[g],c=!0);s[d]=r.collection(p)}}v++}return s},_d=function(e,r,a,n,i){for(var s,o,u=0;u<r.length;u++)for(var l=0;l<e.length;l++)n[u][l]=Math.pow(a[u][l],i.m);for(var f=0;f<e.length;f++)for(var c=0;c<i.attributes.length;c++){s=0,o=0;for(var v=0;v<r.length;v++)s+=n[v][f]*i.attributes[c](r[v]),o+=n[v][f];e[f][c]=s/o}},Gd=function(e,r,a,n,i){for(var s=0;s<e.length;s++)r[s]=e[s].slice();for(var o,u,l,f=2/(i.m-1),c=0;c<a.length;c++)for(var v=0;v<n.length;v++){o=0;for(var h=0;h<a.length;h++)u=Rn(i.distance,n[v],a[c],i.attributes,"cmeans"),l=Rn(i.distance,n[v],a[h],i.attributes,"cmeans"),o+=Math.pow(u/l,f);e[v][c]=1/o}},zd=function(e,r,a,n){for(var i=new Array(a.k),s=0;s<i.length;s++)i[s]=[];for(var o,u,l=0;l<r.length;l++){o=-1/0,u=-1;for(var f=0;f<r[0].length;f++)r[l][f]>o&&(o=r[l][f],u=f);i[u].push(e[l])}for(var c=0;c<i.length;c++)i[c]=n.collection(i[c]);return i},vu=function(e){var r=this.cy(),a=this.nodes(),n=po(e),i,s,o,u,l;u=new Array(a.length);for(var f=0;f<a.length;f++)u[f]=new Array(n.k);o=new Array(a.length);for(var c=0;c<a.length;c++)o[c]=new Array(n.k);for(var v=0;v<a.length;v++){for(var h=0,d=0;d<n.k;d++)o[v][d]=Math.random(),h+=o[v][d];for(var p=0;p<n.k;p++)o[v][p]=o[v][p]/h}s=new Array(n.k);for(var g=0;g<n.k;g++)s[g]=new Array(n.attributes.length);l=new Array(a.length);for(var y=0;y<a.length;y++)l[y]=new Array(n.k);for(var b=!0,m=0;b&&m<n.maxIterations;)b=!1,_d(s,a,o,l,n),Gd(o,u,s,a,n),kd(o,u,n.sensitivityThreshold)||(b=!0),m++;return i=zd(a,o,n,r),{clusters:i,degreeOfMembership:o}},Vd={kMeans:Bd,kMedoids:Fd,fuzzyCMeans:vu,fcm:vu},Ud=ht({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),qd={single:"min",complete:"max"},$d=function(e){var r=Ud(e),a=qd[r.linkage];return a!=null&&(r.linkage=a),r},hu=function(e,r,a,n,i){for(var s=0,o=1/0,u,l=i.attributes,f=function(C,D){return Vn(i.distance,l.length,function(A){return l[A](C)},function(A){return l[A](D)},C,D)},c=0;c<e.length;c++){var v=e[c].key,h=a[v][n[v]];h<o&&(s=v,o=h)}if(i.mode==="threshold"&&o>=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var d=r[s],p=r[n[s]],g;i.mode==="dendrogram"?g={left:d,right:p,key:d.key}:g={value:d.value.concat(p.value),key:d.key},e[d.index]=g,e.splice(p.index,1),r[d.key]=g;for(var y=0;y<e.length;y++){var b=e[y];d.key===b.key?u=1/0:i.linkage==="min"?(u=a[d.key][b.key],a[d.key][b.key]>a[p.key][b.key]&&(u=a[p.key][b.key])):i.linkage==="max"?(u=a[d.key][b.key],a[d.key][b.key]<a[p.key][b.key]&&(u=a[p.key][b.key])):i.linkage==="mean"?u=(a[d.key][b.key]*d.size+a[p.key][b.key]*p.size)/(d.size+p.size):i.mode==="dendrogram"?u=f(b.value,d.value):u=f(b.value[0],d.value[0]),a[d.key][b.key]=a[b.key][d.key]=u}for(var m=0;m<e.length;m++){var E=e[m].key;if(n[E]===d.key||n[E]===p.key){for(var T=E,S=0;S<e.length;S++){var w=e[S].key;a[E][w]<a[E][T]&&(T=w)}n[E]=T}e[m].index=m}return d.key=p.key=d.index=p.index=null,!0},Kr=function(e,r,a){e&&(e.value?r.push(e.value):(e.left&&Kr(e.left,r),e.right&&Kr(e.right,r)))},Gs=function(e,r){if(!e)return"";if(e.left&&e.right){var a=Gs(e.left,r),n=Gs(e.right,r),i=r.add({group:"nodes",data:{id:a+","+n}});return r.add({group:"edges",data:{source:a,target:i.id()}}),r.add({group:"edges",data:{source:n,target:i.id()}}),i.id()}else if(e.value)return e.value.id()},zs=function(e,r,a){if(!e)return[];var n=[],i=[],s=[];return r===0?(e.left&&Kr(e.left,n),e.right&&Kr(e.right,i),s=n.concat(i),[a.collection(s)]):r===1?e.value?[a.collection(e.value)]:(e.left&&Kr(e.left,n),e.right&&Kr(e.right,i),[a.collection(n),a.collection(i)]):e.value?[a.collection(e.value)]:(e.left&&(n=zs(e.left,r-1,a)),e.right&&(i=zs(e.right,r-1,a)),n.concat(i))},du=function(e){for(var r=this.cy(),a=this.nodes(),n=$d(e),i=n.attributes,s=function(m,E){return Vn(n.distance,i.length,function(T){return i[T](m)},function(T){return i[T](E)},m,E)},o=[],u=[],l=[],f=[],c=0;c<a.length;c++){var v={value:n.mode==="dendrogram"?a[c]:[a[c]],key:c,index:c};o[c]=v,f[c]=v,u[c]=[],l[c]=0}for(var h=0;h<o.length;h++)for(var d=0;d<=h;d++){var p=void 0;n.mode==="dendrogram"?p=h===d?1/0:s(o[h].value,o[d].value):p=h===d?1/0:s(o[h].value[0],o[d].value[0]),u[h][d]=p,u[d][h]=p,p<u[h][l[h]]&&(l[h]=d)}for(var g=hu(o,f,u,l,n);g;)g=hu(o,f,u,l,n);var y;return n.mode==="dendrogram"?(y=zs(o[0],n.dendrogramDepth,r),n.addDendrogram&&Gs(o[0],r)):(y=new Array(o.length),o.forEach(function(b,m){b.key=b.index=null,y[m]=r.collection(b.value)})),y},Yd={hierarchicalClustering:du,hca:du},Hd=ht({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),Xd=function(e){var r=e.damping,a=e.preference;.5<=r&&r<1||Ye("Damping must range on [0.5, 1). Got: ".concat(r));var n=["median","mean","min","max"];return n.some(function(i){return i===a})||ne(a)||Ye("Preference must be one of [".concat(n.map(function(i){return"'".concat(i,"'")}).join(", "),"] or a number. Got: ").concat(a)),Hd(e)},Wd=function(e,r,a,n){var i=function(o,u){return n[u](o)};return-Vn(e,n.length,function(s){return i(r,s)},function(s){return i(a,s)},r,a)},Kd=function(e,r){var a=null;return r==="median"?a=Xh(e):r==="mean"?a=Hh(e):r==="min"?a=$h(e):r==="max"?a=Yh(e):a=r,a},Zd=function(e,r,a){for(var n=[],i=0;i<e;i++)r[i*e+i]+a[i*e+i]>0&&n.push(i);return n},gu=function(e,r,a){for(var n=[],i=0;i<e;i++){for(var s=-1,o=-1/0,u=0;u<a.length;u++){var l=a[u];r[i*e+l]>o&&(s=l,o=r[i*e+l])}s>0&&n.push(s)}for(var f=0;f<a.length;f++)n[a[f]]=a[f];return n},Qd=function(e,r,a){for(var n=gu(e,r,a),i=0;i<a.length;i++){for(var s=[],o=0;o<n.length;o++)n[o]===a[i]&&s.push(o);for(var u=-1,l=-1/0,f=0;f<s.length;f++){for(var c=0,v=0;v<s.length;v++)c+=r[s[v]*e+s[f]];c>l&&(u=f,l=c)}a[i]=s[u]}return n=gu(e,r,a),n},pu=function(e){for(var r=this.cy(),a=this.nodes(),n=Xd(e),i={},s=0;s<a.length;s++)i[a[s].id()]=s;var o,u,l,f,c,v;o=a.length,u=o*o,l=new Array(u);for(var h=0;h<u;h++)l[h]=-1/0;for(var d=0;d<o;d++)for(var p=0;p<o;p++)d!==p&&(l[d*o+p]=Wd(n.distance,a[d],a[p],n.attributes));f=Kd(l,n.preference);for(var g=0;g<o;g++)l[g*o+g]=f;c=new Array(u);for(var y=0;y<u;y++)c[y]=0;v=new Array(u);for(var b=0;b<u;b++)v[b]=0;for(var m=new Array(o),E=new Array(o),T=new Array(o),S=0;S<o;S++)m[S]=0,E[S]=0,T[S]=0;for(var w=new Array(o*n.minIterations),x=0;x<w.length;x++)w[x]=0;var C;for(C=0;C<n.maxIterations;C++){for(var D=0;D<o;D++){for(var A=-1/0,L=-1/0,R=-1,P=0,M=0;M<o;M++)m[M]=c[D*o+M],P=v[D*o+M]+l[D*o+M],P>=A?(L=A,A=P,R=M):P>L&&(L=P);for(var N=0;N<o;N++)c[D*o+N]=(1-n.damping)*(l[D*o+N]-A)+n.damping*m[N];c[D*o+R]=(1-n.damping)*(l[D*o+R]-L)+n.damping*m[R]}for(var O=0;O<o;O++){for(var k=0,B=0;B<o;B++)m[B]=v[B*o+O],E[B]=Math.max(0,c[B*o+O]),k+=E[B];k-=E[O],E[O]=c[O*o+O],k+=E[O];for(var _=0;_<o;_++)v[_*o+O]=(1-n.damping)*Math.min(0,k-E[_])+n.damping*m[_];v[O*o+O]=(1-n.damping)*(k-E[O])+n.damping*m[O]}for(var F=0,G=0;G<o;G++){var Y=v[G*o+G]+c[G*o+G]>0?1:0;w[C%n.minIterations*o+G]=Y,F+=Y}if(F>0&&(C>=n.minIterations-1||C==n.maxIterations-1)){for(var $=0,H=0;H<o;H++){T[H]=0;for(var W=0;W<n.minIterations;W++)T[H]+=w[W*o+H];(T[H]===0||T[H]===n.minIterations)&&$++}if($===o)break}}for(var ee=Zd(o,c,v),ae=Qd(o,l,ee),J={},z=0;z<ee.length;z++)J[ee[z]]=[];for(var V=0;V<a.length;V++){var q=i[a[V].id()],Z=ae[q];Z!=null&&J[Z].push(a[V])}for(var re=new Array(ee.length),ve=0;ve<ee.length;ve++)re[ve]=r.collection(J[ee[ve]]);return re},Jd={affinityPropagation:pu,ap:pu},jd=ht({root:void 0,directed:!1}),eg={hierholzer:function(e){if(!Oe(e)){var r=arguments;e={root:r[0],directed:r[1]}}var a=jd(e),n=a.root,i=a.directed,s=this,o=!1,u,l,f;n&&(f=ge(n)?this.filter(n)[0].id():n[0].id());var c={},v={};i?s.forEach(function(b){var m=b.id();if(b.isNode()){var E=b.indegree(!0),T=b.outdegree(!0),S=E-T,w=T-E;S==1?u?o=!0:u=m:w==1?l?o=!0:l=m:(w>1||S>1)&&(o=!0),c[m]=[],b.outgoers().forEach(function(x){x.isEdge()&&c[m].push(x.id())})}else v[m]=[void 0,b.target().id()]}):s.forEach(function(b){var m=b.id();if(b.isNode()){var E=b.degree(!0);E%2&&(u?l?o=!0:l=m:u=m),c[m]=[],b.connectedEdges().forEach(function(T){return c[m].push(T.id())})}else v[m]=[b.source().id(),b.target().id()]});var h={found:!1,trail:void 0};if(o)return h;if(l&&u)if(i){if(f&&l!=f)return h;f=l}else{if(f&&l!=f&&u!=f)return h;f||(f=l)}else f||(f=s[0].id());var d=function(m){for(var E=m,T=[m],S,w,x;c[E].length;)S=c[E].shift(),w=v[S][0],x=v[S][1],E!=x?(c[x]=c[x].filter(function(C){return C!=S}),E=x):!i&&E!=w&&(c[w]=c[w].filter(function(C){return C!=S}),E=w),T.unshift(S),T.unshift(E);return T},p=[],g=[];for(g=d(f);g.length!=1;)c[g[0]].length==0?(p.unshift(s.getElementById(g.shift())),p.unshift(s.getElementById(g.shift()))):g=d(g.shift()).concat(g);p.unshift(s.getElementById(g.shift()));for(var y in c)if(c[y].length)return h;return h.found=!0,h.trail=this.spawn(p,!0),h}},en=function(){var e=this,r={},a=0,n=0,i=[],s=[],o={},u=function(v,h){for(var d=s.length-1,p=[],g=e.spawn();s[d].x!=v||s[d].y!=h;)p.push(s.pop().edge),d--;p.push(s.pop().edge),p.forEach(function(y){var b=y.connectedNodes().intersection(e);g.merge(y),b.forEach(function(m){var E=m.id(),T=m.connectedEdges().intersection(e);g.merge(m),r[E].cutVertex?g.merge(T.filter(function(S){return S.isLoop()})):g.merge(T)})}),i.push(g)},l=function(v,h,d){v===d&&(n+=1),r[h]={id:a,low:a++,cutVertex:!1};var p=e.getElementById(h).connectedEdges().intersection(e);if(p.size()===0)i.push(e.spawn(e.getElementById(h)));else{var g,y,b,m;p.forEach(function(E){g=E.source().id(),y=E.target().id(),b=g===h?y:g,b!==d&&(m=E.id(),o[m]||(o[m]=!0,s.push({x:h,y:b,edge:E})),b in r?r[h].low=Math.min(r[h].low,r[b].id):(l(v,b,h),r[h].low=Math.min(r[h].low,r[b].low),r[h].id<=r[b].low&&(r[h].cutVertex=!0,u(h,b))))})}};e.forEach(function(c){if(c.isNode()){var v=c.id();v in r||(n=0,l(v,v),r[v].cutVertex=n>1)}});var f=Object.keys(r).filter(function(c){return r[c].cutVertex}).map(function(c){return e.getElementById(c)});return{cut:e.spawn(f),components:i}},tg={hopcroftTarjanBiconnected:en,htbc:en,htb:en,hopcroftTarjanBiconnectedComponents:en},tn=function(){var e=this,r={},a=0,n=[],i=[],s=e.spawn(e),o=function(l){i.push(l),r[l]={index:a,low:a++,explored:!1};var f=e.getElementById(l).connectedEdges().intersection(e);if(f.forEach(function(p){var g=p.target().id();g!==l&&(g in r||o(g),r[g].explored||(r[l].low=Math.min(r[l].low,r[g].low)))}),r[l].index===r[l].low){for(var c=e.spawn();;){var v=i.pop();if(c.merge(e.getElementById(v)),r[v].low=r[l].index,r[v].explored=!0,v===l)break}var h=c.edgesWith(c),d=c.merge(h);n.push(d),s=s.difference(d)}};return e.forEach(function(u){if(u.isNode()){var l=u.id();l in r||o(l)}}),{cut:s,components:n}},rg={tarjanStronglyConnected:tn,tsc:tn,tscc:tn,tarjanStronglyConnectedComponents:tn},Vf={};[La,Mh,Oh,Nh,Fh,Gh,Uh,gd,Jr,jr,_s,Ld,Vd,Yd,Jd,eg,tg,rg].forEach(function(t){be(Vf,t)});/*!
@@ -1,4 +1,4 @@
1
- import{V as H,a as rt,s as at,b as lt,c as ot,C as ct,D as ht,l as et,g as it,W as ut,U as yt,X as ft,e as pt,i as gt,E as dt,Y as mt}from"./index-CvYvquQR.js";import{a as tt}from"./arc-CZ1oDkm-.js";import{o as _t}from"./ordinal-Cboi1Yqb.js";import{a as xt}from"./array-BKyUJesY.js";import{c as F}from"./path-CbwjOpE9.js";import"./init-Gi6I4Gst.js";function kt(e,u){return u<e?-1:u>e?1:u>=e?0:NaN}function vt(e){return e}function bt(){var e=vt,u=kt,$=null,p=F(0),g=F(H),E=F(0);function y(a){var l,d=(a=xt(a)).length,k,I,T=0,m=new Array(d),v=new Array(d),c=+p.apply(this,arguments),A=Math.min(H,Math.max(-H,g.apply(this,arguments)-c)),O,w=Math.min(Math.abs(A)/d,E.apply(this,arguments)),b=w*(A<0?-1:1),t;for(l=0;l<d;++l)(t=v[m[l]=l]=+e(a[l],l,a))>0&&(T+=t);for(u!=null?m.sort(function(i,n){return u(v[i],v[n])}):$!=null&&m.sort(function(i,n){return $(a[i],a[n])}),l=0,I=T?(A-d*b)/T:0;l<d;++l,c=O)k=m[l],t=v[k],O=c+(t>0?t*I:0)+b,v[k]={data:a[k],index:l,value:t,startAngle:c,endAngle:O,padAngle:w};return v}return y.value=function(a){return arguments.length?(e=typeof a=="function"?a:F(+a),y):e},y.sortValues=function(a){return arguments.length?(u=a,$=null,y):u},y.sort=function(a){return arguments.length?($=a,u=null,y):$},y.startAngle=function(a){return arguments.length?(p=typeof a=="function"?a:F(+a),y):p},y.endAngle=function(a){return arguments.length?(g=typeof a=="function"?a:F(+a),y):g},y.padAngle=function(a){return arguments.length?(E=typeof a=="function"?a:F(+a),y):E},y}var J=function(){var e=function(b,t,i,n){for(i=i||{},n=b.length;n--;i[b[n]]=t);return i},u=[1,3],$=[1,4],p=[1,5],g=[1,6],E=[1,10,12,14,16,18,19,20,21,22],y=[2,4],a=[1,5,10,12,14,16,18,19,20,21,22],l=[20,21,22],d=[2,7],k=[1,12],I=[1,13],T=[1,14],m=[1,15],v=[1,16],c=[1,17],A={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,PIE:5,document:6,showData:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,section:19,NEWLINE:20,";":21,EOF:22,$accept:0,$end:1},terminals_:{2:"error",5:"PIE",7:"showData",10:"txt",11:"value",12:"title",13:"title_value",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"section",20:"NEWLINE",21:";",22:"EOF"},productions_:[0,[3,2],[3,2],[3,3],[6,0],[6,2],[8,2],[9,0],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[4,1],[4,1],[4,1]],performAction:function(t,i,n,r,o,s,V){var _=s.length-1;switch(o){case 3:r.setShowData(!0);break;case 6:this.$=s[_-1];break;case 8:r.addSection(s[_-1],r.cleanupValue(s[_]));break;case 9:this.$=s[_].trim(),r.setDiagramTitle(this.$);break;case 10:this.$=s[_].trim(),r.setAccTitle(this.$);break;case 11:case 12:this.$=s[_].trim(),r.setAccDescription(this.$);break;case 13:r.addSection(s[_].substr(8)),this.$=s[_].substr(8);break}},table:[{3:1,4:2,5:u,20:$,21:p,22:g},{1:[3]},{3:7,4:2,5:u,20:$,21:p,22:g},e(E,y,{6:8,7:[1,9]}),e(a,[2,14]),e(a,[2,15]),e(a,[2,16]),{1:[2,1]},e(l,d,{8:10,9:11,1:[2,2],10:k,12:I,14:T,16:m,18:v,19:c}),e(E,y,{6:18}),e(E,[2,5]),{4:19,20:$,21:p,22:g},{11:[1,20]},{13:[1,21]},{15:[1,22]},{17:[1,23]},e(l,[2,12]),e(l,[2,13]),e(l,d,{8:10,9:11,1:[2,3],10:k,12:I,14:T,16:m,18:v,19:c}),e(E,[2,6]),e(l,[2,8]),e(l,[2,9]),e(l,[2,10]),e(l,[2,11])],defaultActions:{7:[2,1]},parseError:function(t,i){if(i.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=i,n}},parse:function(t){var i=this,n=[0],r=[],o=[null],s=[],V=this.table,_="",f=0,P=0,R=2,M=1,Y=s.slice.call(arguments,1),h=Object.create(this.lexer),N={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(N.yy[B]=this.yy[B]);h.setInput(t,N.yy),N.yy.lexer=h,N.yy.parser=this,typeof h.yylloc>"u"&&(h.yylloc={});var X=h.yylloc;s.push(X);var nt=h.options&&h.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(){var C;return C=r.pop()||h.lex()||M,typeof C!="number"&&(C instanceof Array&&(r=C,C=r.pop()),C=i.symbols_[C]||C),C}for(var x,L,S,Z,z={},W,D,Q,j;;){if(L=n[n.length-1],this.defaultActions[L]?S=this.defaultActions[L]:((x===null||typeof x>"u")&&(x=st()),S=V[L]&&V[L][x]),typeof S>"u"||!S.length||!S[0]){var q="";j=[];for(W in V[L])this.terminals_[W]&&W>R&&j.push("'"+this.terminals_[W]+"'");h.showPosition?q="Parse error on line "+(f+1)+`:
1
+ import{V as H,a as rt,s as at,b as lt,c as ot,C as ct,D as ht,l as et,g as it,W as ut,U as yt,X as ft,e as pt,i as gt,E as dt,Y as mt}from"./index-BfWjS_S_.js";import{a as tt}from"./arc-Zw29NTJs.js";import{o as _t}from"./ordinal-Cboi1Yqb.js";import{a as xt}from"./array-BKyUJesY.js";import{c as F}from"./path-CbwjOpE9.js";import"./init-Gi6I4Gst.js";function kt(e,u){return u<e?-1:u>e?1:u>=e?0:NaN}function vt(e){return e}function bt(){var e=vt,u=kt,$=null,p=F(0),g=F(H),E=F(0);function y(a){var l,d=(a=xt(a)).length,k,I,T=0,m=new Array(d),v=new Array(d),c=+p.apply(this,arguments),A=Math.min(H,Math.max(-H,g.apply(this,arguments)-c)),O,w=Math.min(Math.abs(A)/d,E.apply(this,arguments)),b=w*(A<0?-1:1),t;for(l=0;l<d;++l)(t=v[m[l]=l]=+e(a[l],l,a))>0&&(T+=t);for(u!=null?m.sort(function(i,n){return u(v[i],v[n])}):$!=null&&m.sort(function(i,n){return $(a[i],a[n])}),l=0,I=T?(A-d*b)/T:0;l<d;++l,c=O)k=m[l],t=v[k],O=c+(t>0?t*I:0)+b,v[k]={data:a[k],index:l,value:t,startAngle:c,endAngle:O,padAngle:w};return v}return y.value=function(a){return arguments.length?(e=typeof a=="function"?a:F(+a),y):e},y.sortValues=function(a){return arguments.length?(u=a,$=null,y):u},y.sort=function(a){return arguments.length?($=a,u=null,y):$},y.startAngle=function(a){return arguments.length?(p=typeof a=="function"?a:F(+a),y):p},y.endAngle=function(a){return arguments.length?(g=typeof a=="function"?a:F(+a),y):g},y.padAngle=function(a){return arguments.length?(E=typeof a=="function"?a:F(+a),y):E},y}var J=function(){var e=function(b,t,i,n){for(i=i||{},n=b.length;n--;i[b[n]]=t);return i},u=[1,3],$=[1,4],p=[1,5],g=[1,6],E=[1,10,12,14,16,18,19,20,21,22],y=[2,4],a=[1,5,10,12,14,16,18,19,20,21,22],l=[20,21,22],d=[2,7],k=[1,12],I=[1,13],T=[1,14],m=[1,15],v=[1,16],c=[1,17],A={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,PIE:5,document:6,showData:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,section:19,NEWLINE:20,";":21,EOF:22,$accept:0,$end:1},terminals_:{2:"error",5:"PIE",7:"showData",10:"txt",11:"value",12:"title",13:"title_value",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"section",20:"NEWLINE",21:";",22:"EOF"},productions_:[0,[3,2],[3,2],[3,3],[6,0],[6,2],[8,2],[9,0],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[4,1],[4,1],[4,1]],performAction:function(t,i,n,r,o,s,V){var _=s.length-1;switch(o){case 3:r.setShowData(!0);break;case 6:this.$=s[_-1];break;case 8:r.addSection(s[_-1],r.cleanupValue(s[_]));break;case 9:this.$=s[_].trim(),r.setDiagramTitle(this.$);break;case 10:this.$=s[_].trim(),r.setAccTitle(this.$);break;case 11:case 12:this.$=s[_].trim(),r.setAccDescription(this.$);break;case 13:r.addSection(s[_].substr(8)),this.$=s[_].substr(8);break}},table:[{3:1,4:2,5:u,20:$,21:p,22:g},{1:[3]},{3:7,4:2,5:u,20:$,21:p,22:g},e(E,y,{6:8,7:[1,9]}),e(a,[2,14]),e(a,[2,15]),e(a,[2,16]),{1:[2,1]},e(l,d,{8:10,9:11,1:[2,2],10:k,12:I,14:T,16:m,18:v,19:c}),e(E,y,{6:18}),e(E,[2,5]),{4:19,20:$,21:p,22:g},{11:[1,20]},{13:[1,21]},{15:[1,22]},{17:[1,23]},e(l,[2,12]),e(l,[2,13]),e(l,d,{8:10,9:11,1:[2,3],10:k,12:I,14:T,16:m,18:v,19:c}),e(E,[2,6]),e(l,[2,8]),e(l,[2,9]),e(l,[2,10]),e(l,[2,11])],defaultActions:{7:[2,1]},parseError:function(t,i){if(i.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=i,n}},parse:function(t){var i=this,n=[0],r=[],o=[null],s=[],V=this.table,_="",f=0,P=0,R=2,M=1,Y=s.slice.call(arguments,1),h=Object.create(this.lexer),N={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(N.yy[B]=this.yy[B]);h.setInput(t,N.yy),N.yy.lexer=h,N.yy.parser=this,typeof h.yylloc>"u"&&(h.yylloc={});var X=h.yylloc;s.push(X);var nt=h.options&&h.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(){var C;return C=r.pop()||h.lex()||M,typeof C!="number"&&(C instanceof Array&&(r=C,C=r.pop()),C=i.symbols_[C]||C),C}for(var x,L,S,Z,z={},W,D,Q,j;;){if(L=n[n.length-1],this.defaultActions[L]?S=this.defaultActions[L]:((x===null||typeof x>"u")&&(x=st()),S=V[L]&&V[L][x]),typeof S>"u"||!S.length||!S[0]){var q="";j=[];for(W in V[L])this.terminals_[W]&&W>R&&j.push("'"+this.terminals_[W]+"'");h.showPosition?q="Parse error on line "+(f+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(", ")+", got '"+(this.terminals_[x]||x)+"'":q="Parse error on line "+(f+1)+": Unexpected "+(x==M?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(q,{text:h.match,token:this.terminals_[x]||x,line:h.yylineno,loc:X,expected:j})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+x);switch(S[0]){case 1:n.push(x),o.push(h.yytext),s.push(h.yylloc),n.push(S[1]),x=null,P=h.yyleng,_=h.yytext,f=h.yylineno,X=h.yylloc;break;case 2:if(D=this.productions_[S[1]][1],z.$=o[o.length-D],z._$={first_line:s[s.length-(D||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(D||1)].first_column,last_column:s[s.length-1].last_column},nt&&(z._$.range=[s[s.length-(D||1)].range[0],s[s.length-1].range[1]]),Z=this.performAction.apply(z,[_,P,f,N.yy,S[1],o,s].concat(Y)),typeof Z<"u")return Z;D&&(n=n.slice(0,-1*D*2),o=o.slice(0,-1*D),s=s.slice(0,-1*D)),n.push(this.productions_[S[1]][0]),o.push(z.$),s.push(z._$),Q=V[n[n.length-2]][n[n.length-1]],n.push(Q);break;case 3:return!0}}return!0}},O=function(){var b={EOF:1,parseError:function(i,n){if(this.yy.parser)this.yy.parser.parseError(i,n);else throw new Error(i)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var i=t.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+`