import{p as jn,ap as IH,i as CH,aq as lH,ah as y6,m as Yw,aj as NI,ac as b6,ar as w6,d as CC,as as E6,e as S6,o as nr,w as cT,b as nt,c as pr,y as vI,a as nS,t as Mn,u as _e,n as Ko,F as MI,s as kI,q as As,M as O6,A as dH,at as T6,Y as _6,aa as P6,f as R6,au as x6,av as $6,a8 as D6,B as N6,aw as M6,N as k6,a1 as F6,ax as WA}from"./index-iOTou63J.js";/**
 * vis-network
 * https://visjs.github.io/vis-network/
 *
 * A dynamic, browser-based visualization library.
 *
 * @version 10.0.1
 * @date    2025-07-13T08:15:32.270Z
 *
 * @copyright (c) 2011-2017 Almende B.V, http://almende.com
 * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
 *
 * @license
 * vis.js is dual licensed under both
 *
 *   1. The Apache 2.0 License
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *   and
 *
 *   2. The MIT License
 *      http://opensource.org/licenses/MIT
 *
 * vis.js may be distributed under either license.
 */function Ao(n,e){e===void 0&&(e={});var t=e.insertAt;if(!(!n||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",t==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(document.createTextNode(n))}}var B6=`div.vis-network div.vis-manipulation {
  box-sizing: content-box;

  border-width: 0;
  border-bottom: 1px;
  border-style: solid;
  border-color: #d6d9d8;
  background: #ffffff; /* Old browsers */
  background: -moz-linear-gradient(
    top,
    #ffffff 0%,
    #fcfcfc 48%,
    #fafafa 50%,
    #fcfcfc 100%
  ); /* FF3.6+ */
  background: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0%, #ffffff),
    color-stop(48%, #fcfcfc),
    color-stop(50%, #fafafa),
    color-stop(100%, #fcfcfc)
  ); /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(
    top,
    #ffffff 0%,
    #fcfcfc 48%,
    #fafafa 50%,
    #fcfcfc 100%
  ); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(
    top,
    #ffffff 0%,
    #fcfcfc 48%,
    #fafafa 50%,
    #fcfcfc 100%
  ); /* Opera 11.10+ */
  background: -ms-linear-gradient(
    top,
    #ffffff 0%,
    #fcfcfc 48%,
    #fafafa 50%,
    #fcfcfc 100%
  ); /* IE10+ */
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    #fcfcfc 48%,
    #fafafa 50%,
    #fcfcfc 100%
  ); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc',GradientType=0 ); /* IE6-9 */

  padding-top: 4px;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 28px;
}

div.vis-network div.vis-edit-mode,
div.vis-network button.vis-edit-mode {
  position: absolute;
  left: 0;
  top: 5px;
  height: 30px;
}

/* FIXME: shouldn't the vis-close button be a child of the vis-manipulation div? */

div.vis-network button.vis-close {
  position: absolute;
  right: 0;
  top: 0;
  width: 30px;
  height: 30px;

  background-color: transparent;
  background-position: 20px 3px;
  background-repeat: no-repeat;
  background-image: url('data:image/png;base64, ');
  border: none;
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

div.vis-network button.vis-close:hover {
  opacity: 0.6;
}

div.vis-network div.vis-manipulation button.vis-button,
div.vis-network div.vis-edit-mode button.vis-button {
  float: left;
  font-family: verdana;
  font-size: 12px;
  border: none;
  box-sizing: content-box;
  -moz-border-radius: 15px;
  border-radius: 15px;
  background-color: transparent;
  background-position: 0px 0px;
  background-repeat: no-repeat;
  height: 24px;
  margin-left: 10px;
  cursor: pointer;
  padding: 0px 8px 0px 8px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

div.vis-network div.vis-manipulation button.vis-button:hover {
  box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.2);
}

div.vis-network div.vis-manipulation button.vis-button:active {
  box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.5);
}

div.vis-network div.vis-manipulation button.vis-button.vis-back {
  background-image: url('data:image/png;base64, ');
}

div.vis-network div.vis-manipulation div.vis-none:hover {
  box-shadow: 1px 1px 8px rgba(0, 0, 0, 0);
  cursor: default;
}
div.vis-network div.vis-manipulation div.vis-none:active {
  box-shadow: 1px 1px 8px rgba(0, 0, 0, 0);
}
div.vis-network div.vis-manipulation div.vis-none {
  padding: 0px;
  line-height: 23px;
}
div.vis-network div.vis-manipulation div.notification {
  margin: 2px;
  font-weight: bold;
}

div.vis-network div.vis-manipulation button.vis-button.vis-add {
  background-image: url('data:image/png;base64, ');
}

div.vis-network div.vis-manipulation button.vis-button.vis-edit,
div.vis-network div.vis-edit-mode button.vis-button.vis-edit {
  background-image: url('data:image/png;base64, ');
}

div.vis-network div.vis-edit-mode button.vis-button.vis-edit.vis-edit-mode {
  background-color: #fcfcfc;
  border: 1px solid #cccccc;
}

div.vis-network div.vis-manipulation button.vis-button.vis-connect {
  background-image: url('data:image/png;base64, ');
}

div.vis-network div.vis-manipulation button.vis-button.vis-delete {
  background-image: url('data:image/png;base64, ');
}
/* top right bottom left */
div.vis-network div.vis-manipulation div.vis-label,
div.vis-network div.vis-edit-mode div.vis-label {
  margin: 0 0 0 23px;
  line-height: 25px;
}
div.vis-network div.vis-manipulation div.vis-separator-line {
  float: left;
  display: inline-block;
  width: 1px;
  height: 21px;
  background-color: #bdbdbd;
  margin: 0px 7px 0 15px; /*top right bottom left*/
}

/* TODO: is this redundant?
div.network-navigation_wrapper {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}
*/
`;Ao(B6);var q6=`div.vis-network div.vis-navigation div.vis-button {
  width: 34px;
  height: 34px;
  -moz-border-radius: 17px;
  border-radius: 17px;
  position: absolute;
  display: inline-block;
  background-position: 2px 2px;
  background-repeat: no-repeat;
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

div.vis-network div.vis-navigation div.vis-button:hover {
  box-shadow: 0 0 3px 3px rgba(56, 207, 21, 0.3);
}

div.vis-network div.vis-navigation div.vis-button:active {
  box-shadow: 0 0 1px 3px rgba(56, 207, 21, 0.95);
}

div.vis-network div.vis-navigation div.vis-button.vis-up {
  background-image: url('data:image/png;base64, ');
  bottom: 50px;
  left: 55px;
}
div.vis-network div.vis-navigation div.vis-button.vis-down {
  background-image: url('data:image/png;base64, ');
  bottom: 10px;
  left: 55px;
}
div.vis-network div.vis-navigation div.vis-button.vis-left {
  background-image: url('data:image/png;base64, ');
  bottom: 10px;
  left: 15px;
}
div.vis-network div.vis-navigation div.vis-button.vis-right {
  background-image: url('data:image/png;base64, ');
  bottom: 10px;
  left: 95px;
}
div.vis-network div.vis-navigation div.vis-button.vis-zoomIn {
  background-image: url('data:image/png;base64, ');
  bottom: 10px;
  right: 15px;
}
div.vis-network div.vis-navigation div.vis-button.vis-zoomOut {
  background-image: url('data:image/png;base64, ');
  bottom: 10px;
  right: 55px;
}
div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends {
  background-image: url('data:image/png;base64, ');
  bottom: 50px;
  right: 15px;
}
`;Ao(q6);var z6=`.vis-overlay {
  position: absolute;
  top: 0px;
  right: 0px;
  bottom: 0px;
  left: 0px;

  /* Must be displayed above for example selected Timeline items */
  z-index: 10;
}

.vis-active {
  box-shadow: 0 0 10px #86d5f8;
}
`;Ao(z6);var j6=`/* override some bootstrap styles screwing up the timelines css */

.vis [class*="span"] {
  min-height: 0;
  width: auto;
}
`;Ao(j6);var L6=`div.vis-color-picker {
  position: absolute;
  top: 0px;
  left: 30px;
  margin-top: -140px;
  margin-left: 30px;
  width: 310px;
  height: 444px;
  z-index: 1;
  padding: 10px;
  border-radius: 15px;
  background-color: #ffffff;
  display: none;
  box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 10px 0px;
}

div.vis-color-picker div.vis-arrow {
  position: absolute;
  top: 147px;
  left: 5px;
}

div.vis-color-picker div.vis-arrow::after,
div.vis-color-picker div.vis-arrow::before {
  right: 100%;
  top: 50%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}

div.vis-color-picker div.vis-arrow:after {
  border-color: rgba(255, 255, 255, 0);
  border-right-color: #ffffff;
  border-width: 30px;
  margin-top: -30px;
}

div.vis-color-picker div.vis-color {
  position: absolute;
  width: 289px;
  height: 289px;
  cursor: pointer;
}

div.vis-color-picker div.vis-brightness {
  position: absolute;
  top: 313px;
}

div.vis-color-picker div.vis-opacity {
  position: absolute;
  top: 350px;
}

div.vis-color-picker div.vis-selector {
  position: absolute;
  top: 137px;
  left: 137px;
  width: 15px;
  height: 15px;
  border-radius: 15px;
  border: 1px solid #ffffff;
  background: #4c4c4c; /* Old browsers */
  background: -moz-linear-gradient(
    top,
    #4c4c4c 0%,
    #595959 12%,
    #666666 25%,
    #474747 39%,
    #2c2c2c 50%,
    #000000 51%,
    #111111 60%,
    #2b2b2b 76%,
    #1c1c1c 91%,
    #131313 100%
  ); /* FF3.6+ */
  background: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0%, #4c4c4c),
    color-stop(12%, #595959),
    color-stop(25%, #666666),
    color-stop(39%, #474747),
    color-stop(50%, #2c2c2c),
    color-stop(51%, #000000),
    color-stop(60%, #111111),
    color-stop(76%, #2b2b2b),
    color-stop(91%, #1c1c1c),
    color-stop(100%, #131313)
  ); /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(
    top,
    #4c4c4c 0%,
    #595959 12%,
    #666666 25%,
    #474747 39%,
    #2c2c2c 50%,
    #000000 51%,
    #111111 60%,
    #2b2b2b 76%,
    #1c1c1c 91%,
    #131313 100%
  ); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(
    top,
    #4c4c4c 0%,
    #595959 12%,
    #666666 25%,
    #474747 39%,
    #2c2c2c 50%,
    #000000 51%,
    #111111 60%,
    #2b2b2b 76%,
    #1c1c1c 91%,
    #131313 100%
  ); /* Opera 11.10+ */
  background: -ms-linear-gradient(
    top,
    #4c4c4c 0%,
    #595959 12%,
    #666666 25%,
    #474747 39%,
    #2c2c2c 50%,
    #000000 51%,
    #111111 60%,
    #2b2b2b 76%,
    #1c1c1c 91%,
    #131313 100%
  ); /* IE10+ */
  background: linear-gradient(
    to bottom,
    #4c4c4c 0%,
    #595959 12%,
    #666666 25%,
    #474747 39%,
    #2c2c2c 50%,
    #000000 51%,
    #111111 60%,
    #2b2b2b 76%,
    #1c1c1c 91%,
    #131313 100%
  ); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* IE6-9 */
}

div.vis-color-picker div.vis-new-color {
  position: absolute;
  width: 140px;
  height: 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  top: 380px;
  left: 159px;
  text-align: right;
  padding-right: 2px;
  font-size: 10px;
  color: rgba(0, 0, 0, 0.4);
  vertical-align: middle;
  line-height: 20px;
}

div.vis-color-picker div.vis-initial-color {
  position: absolute;
  width: 140px;
  height: 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  top: 380px;
  left: 10px;
  text-align: left;
  padding-left: 2px;
  font-size: 10px;
  color: rgba(0, 0, 0, 0.4);
  vertical-align: middle;
  line-height: 20px;
}

div.vis-color-picker div.vis-label {
  position: absolute;
  width: 300px;
  left: 10px;
}

div.vis-color-picker div.vis-label.vis-brightness {
  top: 300px;
}

div.vis-color-picker div.vis-label.vis-opacity {
  top: 338px;
}

div.vis-color-picker div.vis-button {
  position: absolute;
  width: 68px;
  height: 25px;
  border-radius: 10px;
  vertical-align: middle;
  text-align: center;
  line-height: 25px;
  top: 410px;
  border: 2px solid #d9d9d9;
  background-color: #f7f7f7;
  cursor: pointer;
}

div.vis-color-picker div.vis-button.vis-cancel {
  /*border:2px solid #ff4e33;*/
  /*background-color: #ff7761;*/
  left: 5px;
}
div.vis-color-picker div.vis-button.vis-load {
  /*border:2px solid #a153e6;*/
  /*background-color: #cb8dff;*/
  left: 82px;
}
div.vis-color-picker div.vis-button.vis-apply {
  /*border:2px solid #4588e6;*/
  /*background-color: #82b6ff;*/
  left: 159px;
}
div.vis-color-picker div.vis-button.vis-save {
  /*border:2px solid #45e655;*/
  /*background-color: #6dff7c;*/
  left: 236px;
}

div.vis-color-picker input.vis-range {
  width: 290px;
  height: 20px;
}

/* TODO: is this redundant?
div.vis-color-picker input.vis-range-brightness {
  width: 289px !important;
}


div.vis-color-picker input.vis-saturation-range {
  width: 289px !important;
}*/
`;Ao(L6);var G6=`div.vis-configuration {
  position: relative;
  display: block;
  float: left;
  font-size: 12px;
}

div.vis-configuration-wrapper {
  display: block;
  width: 700px;
}

div.vis-configuration-wrapper::after {
  clear: both;
  content: "";
  display: block;
}

div.vis-configuration.vis-config-option-container {
  display: block;
  width: 495px;
  background-color: #ffffff;
  border: 2px solid #f7f8fa;
  border-radius: 4px;
  margin-top: 20px;
  left: 10px;
  padding-left: 5px;
}

div.vis-configuration.vis-config-button {
  display: block;
  width: 495px;
  height: 25px;
  vertical-align: middle;
  line-height: 25px;
  background-color: #f7f8fa;
  border: 2px solid #ceced0;
  border-radius: 4px;
  margin-top: 20px;
  left: 10px;
  padding-left: 5px;
  cursor: pointer;
  margin-bottom: 30px;
}

div.vis-configuration.vis-config-button.hover {
  background-color: #4588e6;
  border: 2px solid #214373;
  color: #ffffff;
}

div.vis-configuration.vis-config-item {
  display: block;
  float: left;
  width: 495px;
  height: 25px;
  vertical-align: middle;
  line-height: 25px;
}

div.vis-configuration.vis-config-item.vis-config-s2 {
  left: 10px;
  background-color: #f7f8fa;
  padding-left: 5px;
  border-radius: 3px;
}
div.vis-configuration.vis-config-item.vis-config-s3 {
  left: 20px;
  background-color: #e4e9f0;
  padding-left: 5px;
  border-radius: 3px;
}
div.vis-configuration.vis-config-item.vis-config-s4 {
  left: 30px;
  background-color: #cfd8e6;
  padding-left: 5px;
  border-radius: 3px;
}

div.vis-configuration.vis-config-header {
  font-size: 18px;
  font-weight: bold;
}

div.vis-configuration.vis-config-label {
  width: 120px;
  height: 25px;
  line-height: 25px;
}

div.vis-configuration.vis-config-label.vis-config-s3 {
  width: 110px;
}
div.vis-configuration.vis-config-label.vis-config-s4 {
  width: 100px;
}

div.vis-configuration.vis-config-colorBlock {
  top: 1px;
  width: 30px;
  height: 19px;
  border: 1px solid #444444;
  border-radius: 2px;
  padding: 0px;
  margin: 0px;
  cursor: pointer;
}

input.vis-configuration.vis-config-checkbox {
  left: -5px;
}

input.vis-configuration.vis-config-rangeinput {
  position: relative;
  top: -5px;
  width: 60px;
  /*height:13px;*/
  padding: 1px;
  margin: 0;
  pointer-events: none;
}

input.vis-configuration.vis-config-range {
  /*removes default webkit styles*/
  -webkit-appearance: none;

  /*fix for FF unable to apply focus style bug */
  border: 0px solid white;
  background-color: rgba(0, 0, 0, 0);

  /*required for proper track sizing in FF*/
  width: 300px;
  height: 20px;
}
input.vis-configuration.vis-config-range::-webkit-slider-runnable-track {
  width: 300px;
  height: 5px;
  background: #dedede; /* Old browsers */
  background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */
  background: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0%, #dedede),
    color-stop(99%, #c8c8c8)
  ); /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(
    top,
    #dedede 0%,
    #c8c8c8 99%
  ); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(
    top,
    #dedede 0%,
    #c8c8c8 99%
  ); /* Opera 11.10+ */
  background: -ms-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* IE10+ */
  background: linear-gradient(to bottom, #dedede 0%, #c8c8c8 99%); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */

  border: 1px solid #999999;
  box-shadow: #aaaaaa 0px 0px 3px 0px;
  border-radius: 3px;
}
input.vis-configuration.vis-config-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  border: 1px solid #14334b;
  height: 17px;
  width: 17px;
  border-radius: 50%;
  background: #3876c2; /* Old browsers */
  background: -moz-linear-gradient(top, #3876c2 0%, #385380 100%); /* FF3.6+ */
  background: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0%, #3876c2),
    color-stop(100%, #385380)
  ); /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(
    top,
    #3876c2 0%,
    #385380 100%
  ); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(
    top,
    #3876c2 0%,
    #385380 100%
  ); /* Opera 11.10+ */
  background: -ms-linear-gradient(top, #3876c2 0%, #385380 100%); /* IE10+ */
  background: linear-gradient(to bottom, #3876c2 0%, #385380 100%); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380',GradientType=0 ); /* IE6-9 */
  box-shadow: #111927 0px 0px 1px 0px;
  margin-top: -7px;
}
input.vis-configuration.vis-config-range:focus {
  outline: none;
}
input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track {
  background: #9d9d9d; /* Old browsers */
  background: -moz-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* FF3.6+ */
  background: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0%, #9d9d9d),
    color-stop(99%, #c8c8c8)
  ); /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(
    top,
    #9d9d9d 0%,
    #c8c8c8 99%
  ); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(
    top,
    #9d9d9d 0%,
    #c8c8c8 99%
  ); /* Opera 11.10+ */
  background: -ms-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* IE10+ */
  background: linear-gradient(to bottom, #9d9d9d 0%, #c8c8c8 99%); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */
}

input.vis-configuration.vis-config-range::-moz-range-track {
  width: 300px;
  height: 10px;
  background: #dedede; /* Old browsers */
  background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */
  background: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0%, #dedede),
    color-stop(99%, #c8c8c8)
  ); /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(
    top,
    #dedede 0%,
    #c8c8c8 99%
  ); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(
    top,
    #dedede 0%,
    #c8c8c8 99%
  ); /* Opera 11.10+ */
  background: -ms-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* IE10+ */
  background: linear-gradient(to bottom, #dedede 0%, #c8c8c8 99%); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */

  border: 1px solid #999999;
  box-shadow: #aaaaaa 0px 0px 3px 0px;
  border-radius: 3px;
}
input.vis-configuration.vis-config-range::-moz-range-thumb {
  border: none;
  height: 16px;
  width: 16px;

  border-radius: 50%;
  background: #385380;
}

/*hide the outline behind the border*/
input.vis-configuration.vis-config-range:-moz-focusring {
  outline: 1px solid white;
  outline-offset: -1px;
}

input.vis-configuration.vis-config-range::-ms-track {
  width: 300px;
  height: 5px;

  /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
  background: transparent;

  /*leave room for the larger thumb to overflow with a transparent border */
  border-color: transparent;
  border-width: 6px 0;

  /*remove default tick marks*/
  color: transparent;
}
input.vis-configuration.vis-config-range::-ms-fill-lower {
  background: #777;
  border-radius: 10px;
}
input.vis-configuration.vis-config-range::-ms-fill-upper {
  background: #ddd;
  border-radius: 10px;
}
input.vis-configuration.vis-config-range::-ms-thumb {
  border: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: #385380;
}
input.vis-configuration.vis-config-range:focus::-ms-fill-lower {
  background: #888;
}
input.vis-configuration.vis-config-range:focus::-ms-fill-upper {
  background: #ccc;
}

.vis-configuration-popup {
  position: absolute;
  background: rgba(57, 76, 89, 0.85);
  border: 2px solid #f2faff;
  line-height: 30px;
  height: 30px;
  width: 150px;
  text-align: center;
  color: #ffffff;
  font-size: 14px;
  border-radius: 4px;
  -webkit-transition: opacity 0.3s ease-in-out;
  -moz-transition: opacity 0.3s ease-in-out;
  transition: opacity 0.3s ease-in-out;
}
.vis-configuration-popup:after,
.vis-configuration-popup:before {
  left: 100%;
  top: 50%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}

.vis-configuration-popup:after {
  border-color: rgba(136, 183, 213, 0);
  border-left-color: rgba(57, 76, 89, 0.85);
  border-width: 8px;
  margin-top: -8px;
}
.vis-configuration-popup:before {
  border-color: rgba(194, 225, 245, 0);
  border-left-color: #f2faff;
  border-width: 12px;
  margin-top: -12px;
}
`;Ao(G6);var W6=`div.vis-tooltip {
  position: absolute;
  visibility: hidden;
  padding: 5px;
  white-space: nowrap;

  font-family: verdana;
  font-size: 14px;
  color: #000000;
  background-color: #f5f4ed;

  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  border: 1px solid #808074;

  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
  pointer-events: none;

  z-index: 5;
}
`;Ao(W6);var fT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function de(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var pT={},Ga,vT;function We(){if(vT)return Ga;vT=1;var n=function(e){return e&&e.Math===Math&&e};return Ga=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof fT=="object"&&fT)||n(typeof Ga=="object"&&Ga)||(function(){return this})()||Function("return this")(),Ga}var Pl,mT;function me(){return mT||(mT=1,Pl=function(n){try{return!!n()}catch{return!0}}),Pl}var Rl,yT;function Wg(){if(yT)return Rl;yT=1;var n=me();return Rl=!n(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Rl}var xl,bT;function lC(){if(bT)return xl;bT=1;var n=Wg(),e=Function.prototype,t=e.apply,r=e.call;return xl=typeof Reflect=="object"&&Reflect.apply||(n?r.bind(t):function(){return r.apply(t,arguments)}),xl}var $l,wT;function ye(){if(wT)return $l;wT=1;var n=Wg(),e=Function.prototype,t=e.call,r=n&&e.bind.bind(t,t);return $l=n?r:function(i){return function(){return t.apply(i,arguments)}},$l}var Dl,ET;function Ci(){if(ET)return Dl;ET=1;var n=ye(),e=n({}.toString),t=n("".slice);return Dl=function(r){return t(e(r),8,-1)},Dl}var Nl,ST;function oS(){if(ST)return Nl;ST=1;var n=Ci(),e=ye();return Nl=function(t){if(n(t)==="Function")return e(t)},Nl}var Ml,OT;function St(){if(OT)return Ml;OT=1;var n=typeof document=="object"&&document.all;return Ml=typeof n>"u"&&n!==void 0?function(e){return typeof e=="function"||e===n}:function(e){return typeof e=="function"},Ml}var kl={},Fl,TT;function at(){if(TT)return Fl;TT=1;var n=me();return Fl=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Fl}var Bl,_T;function Ir(){if(_T)return Bl;_T=1;var n=Wg(),e=Function.prototype.call;return Bl=n?e.bind(e):function(){return e.apply(e,arguments)},Bl}var ql={},PT;function dC(){if(PT)return ql;PT=1;var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!n.call({1:2},1);return ql.f=t?function(i){var o=e(this,i);return!!o&&o.enumerable}:n,ql}var zl,RT;function Vg(){return RT||(RT=1,zl=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}}),zl}var jl,xT;function uC(){if(xT)return jl;xT=1;var n=ye(),e=me(),t=Ci(),r=Object,i=n("".split);return jl=e(function(){return!r("z").propertyIsEnumerable(0)})?function(o){return t(o)==="String"?i(o,""):r(o)}:r,jl}var Ll,$T;function Vs(){return $T||($T=1,Ll=function(n){return n==null}),Ll}var Gl,DT;function Di(){if(DT)return Gl;DT=1;var n=Vs(),e=TypeError;return Gl=function(t){if(n(t))throw new e("Can't call method on "+t);return t},Gl}var Wl,NT;function Qr(){if(NT)return Wl;NT=1;var n=uC(),e=Di();return Wl=function(t){return n(e(t))},Wl}var Vl,MT;function Ot(){if(MT)return Vl;MT=1;var n=St();return Vl=function(e){return typeof e=="object"?e!==null:n(e)},Vl}var Zl,kT;function Pe(){return kT||(kT=1,Zl={}),Zl}var Hl,FT;function mr(){if(FT)return Hl;FT=1;var n=Pe(),e=We(),t=St(),r=function(i){return t(i)?i:void 0};return Hl=function(i,o){return arguments.length<2?r(n[i])||r(e[i]):n[i]&&n[i][o]||e[i]&&e[i][o]},Hl}var Ul,BT;function ut(){if(BT)return Ul;BT=1;var n=ye();return Ul=n({}.isPrototypeOf),Ul}var Yl,qT;function Zs(){if(qT)return Yl;qT=1;var n=We(),e=n.navigator,t=e&&e.userAgent;return Yl=t?String(t):"",Yl}var Kl,zT;function Zg(){if(zT)return Kl;zT=1;var n=We(),e=Zs(),t=n.process,r=n.Deno,i=t&&t.versions||r&&r.version,o=i&&i.v8,s,a;return o&&(s=o.split("."),a=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!a&&e&&(s=e.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=e.match(/Chrome\/(\d+)/),s&&(a=+s[1]))),Kl=a,Kl}var Xl,jT;function Hs(){if(jT)return Xl;jT=1;var n=Zg(),e=me(),t=We(),r=t.String;return Xl=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!r(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&n&&n<41}),Xl}var Ql,LT;function uH(){if(LT)return Ql;LT=1;var n=Hs();return Ql=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ql}var Jl,GT;function Hg(){if(GT)return Jl;GT=1;var n=mr(),e=St(),t=ut(),r=uH(),i=Object;return Jl=r?function(o){return typeof o=="symbol"}:function(o){var s=n("Symbol");return e(s)&&t(s.prototype,i(o))},Jl}var ed,WT;function Us(){if(WT)return ed;WT=1;var n=String;return ed=function(e){try{return n(e)}catch{return"Object"}},ed}var td,VT;function Ni(){if(VT)return td;VT=1;var n=St(),e=Us(),t=TypeError;return td=function(r){if(n(r))return r;throw new t(e(r)+" is not a function")},td}var rd,ZT;function sS(){if(ZT)return rd;ZT=1;var n=Ni(),e=Vs();return rd=function(t,r){var i=t[r];return e(i)?void 0:n(i)},rd}var id,HT;function V6(){if(HT)return id;HT=1;var n=Ir(),e=St(),t=Ot(),r=TypeError;return id=function(i,o){var s,a;if(o==="string"&&e(s=i.toString)&&!t(a=n(s,i))||e(s=i.valueOf)&&!t(a=n(s,i))||o!=="string"&&e(s=i.toString)&&!t(a=n(s,i)))return a;throw new r("Can't convert object to primitive value")},id}var nd={exports:{}},od,UT;function Ys(){return UT||(UT=1,od=!0),od}var sd,YT;function Z6(){if(YT)return sd;YT=1;var n=We(),e=Object.defineProperty;return sd=function(t,r){try{e(n,t,{value:r,configurable:!0,writable:!0})}catch{n[t]=r}return r},sd}var KT;function aS(){if(KT)return nd.exports;KT=1;var n=Ys(),e=We(),t=Z6(),r="__core-js_shared__",i=nd.exports=e[r]||t(r,{});return(i.versions||(i.versions=[])).push({version:"3.44.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),nd.exports}var ad,XT;function Ks(){if(XT)return ad;XT=1;var n=aS();return ad=function(e,t){return n[e]||(n[e]=t||{})},ad}var gd,QT;function $r(){if(QT)return gd;QT=1;var n=Di(),e=Object;return gd=function(t){return e(n(t))},gd}var Ad,JT;function kt(){if(JT)return Ad;JT=1;var n=ye(),e=$r(),t=n({}.hasOwnProperty);return Ad=Object.hasOwn||function(i,o){return t(e(i),o)},Ad}var Id,e_;function hC(){if(e_)return Id;e_=1;var n=ye(),e=0,t=Math.random(),r=n(1.1.toString);return Id=function(i){return"Symbol("+(i===void 0?"":i)+")_"+r(++e+t,36)},Id}var Cd,t_;function ht(){if(t_)return Cd;t_=1;var n=We(),e=Ks(),t=kt(),r=hC(),i=Hs(),o=uH(),s=n.Symbol,a=e("wks"),g=o?s.for||s:s&&s.withoutSetter||r;return Cd=function(A){return t(a,A)||(a[A]=i&&t(s,A)?s[A]:g("Symbol."+A)),a[A]},Cd}var ld,r_;function hH(){if(r_)return ld;r_=1;var n=Ir(),e=Ot(),t=Hg(),r=sS(),i=V6(),o=ht(),s=TypeError,a=o("toPrimitive");return ld=function(g,A){if(!e(g)||t(g))return g;var I=r(g,a),C;if(I){if(A===void 0&&(A="default"),C=n(I,g,A),!e(C)||t(C))return C;throw new s("Can't convert object to primitive value")}return A===void 0&&(A="number"),i(g,A)},ld}var dd,i_;function gS(){if(i_)return dd;i_=1;var n=hH(),e=Hg();return dd=function(t){var r=n(t,"string");return e(r)?r:r+""},dd}var ud,n_;function cH(){if(n_)return ud;n_=1;var n=We(),e=Ot(),t=n.document,r=e(t)&&e(t.createElement);return ud=function(i){return r?t.createElement(i):{}},ud}var hd,o_;function fH(){if(o_)return hd;o_=1;var n=at(),e=me(),t=cH();return hd=!n&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),hd}var s_;function cC(){if(s_)return kl;s_=1;var n=at(),e=Ir(),t=dC(),r=Vg(),i=Qr(),o=gS(),s=kt(),a=fH(),g=Object.getOwnPropertyDescriptor;return kl.f=n?g:function(I,C){if(I=i(I),C=o(C),a)try{return g(I,C)}catch{}if(s(I,C))return r(!e(t.f,I,C),I[C])},kl}var cd,a_;function H6(){if(a_)return cd;a_=1;var n=me(),e=St(),t=/#|\.prototype\./,r=function(g,A){var I=o[i(g)];return I===a?!0:I===s?!1:e(A)?n(A):!!A},i=r.normalize=function(g){return String(g).replace(t,".").toLowerCase()},o=r.data={},s=r.NATIVE="N",a=r.POLYFILL="P";return cd=r,cd}var fd,g_;function fC(){if(g_)return fd;g_=1;var n=oS(),e=Ni(),t=Wg(),r=n(n.bind);return fd=function(i,o){return e(i),o===void 0?i:t?r(i,o):function(){return i.apply(o,arguments)}},fd}var pd={},vd,A_;function pH(){if(A_)return vd;A_=1;var n=at(),e=me();return vd=n&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),vd}var md,I_;function li(){if(I_)return md;I_=1;var n=Ot(),e=String,t=TypeError;return md=function(r){if(n(r))return r;throw new t(e(r)+" is not an object")},md}var C_;function Dr(){if(C_)return pd;C_=1;var n=at(),e=fH(),t=pH(),r=li(),i=gS(),o=TypeError,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,g="enumerable",A="configurable",I="writable";return pd.f=n?t?function(l,d,u){if(r(l),d=i(d),r(u),typeof l=="function"&&d==="prototype"&&"value"in u&&I in u&&!u[I]){var h=a(l,d);h&&h[I]&&(l[d]=u.value,u={configurable:A in u?u[A]:h[A],enumerable:g in u?u[g]:h[g],writable:!1})}return s(l,d,u)}:s:function(l,d,u){if(r(l),d=i(d),r(u),e)try{return s(l,d,u)}catch{}if("get"in u||"set"in u)throw new o("Accessors not supported");return"value"in u&&(l[d]=u.value),l},pd}var yd,l_;function Xs(){if(l_)return yd;l_=1;var n=at(),e=Dr(),t=Vg();return yd=n?function(r,i,o){return e.f(r,i,t(1,o))}:function(r,i,o){return r[i]=o,r},yd}var bd,d_;function ie(){if(d_)return bd;d_=1;var n=We(),e=lC(),t=oS(),r=St(),i=cC().f,o=H6(),s=Pe(),a=fC(),g=Xs(),A=kt(),I=function(C){var l=function(d,u,h){if(this instanceof l){switch(arguments.length){case 0:return new C;case 1:return new C(d);case 2:return new C(d,u)}return new C(d,u,h)}return e(C,this,arguments)};return l.prototype=C.prototype,l};return bd=function(C,l){var d=C.target,u=C.global,h=C.stat,p=C.proto,f=u?n:h?n[d]:n[d]&&n[d].prototype,c=u?s:s[d]||g(s,d,{})[d],m=c.prototype,v,y,w,S,b,E,O,P,_;for(S in l)v=o(u?S:d+(h?".":"#")+S,C.forced),y=!v&&f&&A(f,S),E=c[S],y&&(C.dontCallGetSet?(_=i(f,S),O=_&&_.value):O=f[S]),b=y&&O?O:l[S],!(!v&&!p&&typeof E==typeof b)&&(C.bind&&y?P=a(b,n):C.wrap&&y?P=I(b):p&&r(b)?P=t(b):P=b,(C.sham||b&&b.sham||E&&E.sham)&&g(P,"sham",!0),g(c,S,P),p&&(w=d+"Prototype",A(s,w)||g(s,w,{}),g(s[w],S,b),C.real&&m&&(v||!m[S])&&g(m,S,b)))},bd}var wd,u_;function U6(){if(u_)return wd;u_=1;var n=Math.ceil,e=Math.floor;return wd=Math.trunc||function(r){var i=+r;return(i>0?e:n)(i)},wd}var Ed,h_;function Qs(){if(h_)return Ed;h_=1;var n=U6();return Ed=function(e){var t=+e;return t!==t||t===0?0:n(t)},Ed}var Sd,c_;function pC(){if(c_)return Sd;c_=1;var n=Qs(),e=Math.max,t=Math.min;return Sd=function(r,i){var o=n(r);return o<0?e(o+i,0):t(o,i)},Sd}var Od,f_;function vH(){if(f_)return Od;f_=1;var n=Qs(),e=Math.min;return Od=function(t){var r=n(t);return r>0?e(r,9007199254740991):0},Od}var Td,p_;function Mi(){if(p_)return Td;p_=1;var n=vH();return Td=function(e){return n(e.length)},Td}var _d,v_;function AS(){if(v_)return _d;v_=1;var n=Qr(),e=pC(),t=Mi(),r=function(i){return function(o,s,a){var g=n(o),A=t(g);if(A===0)return!i&&-1;var I=e(a,A),C;if(i&&s!==s){for(;A>I;)if(C=g[I++],C!==C)return!0}else for(;A>I;I++)if((i||I in g)&&g[I]===s)return i||I||0;return!i&&-1}};return _d={includes:r(!0),indexOf:r(!1)},_d}var Pd,m_;function Ug(){return m_||(m_=1,Pd={}),Pd}var Rd,y_;function mH(){if(y_)return Rd;y_=1;var n=ye(),e=kt(),t=Qr(),r=AS().indexOf,i=Ug(),o=n([].push);return Rd=function(s,a){var g=t(s),A=0,I=[],C;for(C in g)!e(i,C)&&e(g,C)&&o(I,C);for(;a.length>A;)e(g,C=a[A++])&&(~r(I,C)||o(I,C));return I},Rd}var xd,b_;function IS(){return b_||(b_=1,xd=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),xd}var $d,w_;function Yg(){if(w_)return $d;w_=1;var n=mH(),e=IS();return $d=Object.keys||function(r){return n(r,e)},$d}var Dd={},E_;function vC(){return E_||(E_=1,Dd.f=Object.getOwnPropertySymbols),Dd}var Nd,S_;function Y6(){if(S_)return Nd;S_=1;var n=at(),e=ye(),t=Ir(),r=me(),i=Yg(),o=vC(),s=dC(),a=$r(),g=uC(),A=Object.assign,I=Object.defineProperty,C=e([].concat);return Nd=!A||r(function(){if(n&&A({b:1},A(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var l={},d={},u=Symbol("assign detection"),h="abcdefghijklmnopqrst";return l[u]=7,h.split("").forEach(function(p){d[p]=p}),A({},l)[u]!==7||i(A({},d)).join("")!==h})?function(d,u){for(var h=a(d),p=arguments.length,f=1,c=o.f,m=s.f;p>f;)for(var v=g(arguments[f++]),y=c?C(i(v),c(v)):i(v),w=y.length,S=0,b;w>S;)b=y[S++],(!n||t(m,v,b))&&(h[b]=v[b]);return h}:A,Nd}var O_;function K6(){if(O_)return pT;O_=1;var n=ie(),e=Y6();return n({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),pT}var Md,T_;function X6(){if(T_)return Md;T_=1,K6();var n=Pe();return Md=n.Object.assign,Md}var kd,__;function Q6(){if(__)return kd;__=1;var n=X6();return kd=n,kd}var Fd,P_;function J6(){return P_||(P_=1,Fd=Q6()),Fd}var eX=J6(),Nt=de(eX),R_={},Bd,x_;function Js(){if(x_)return Bd;x_=1;var n=ye();return Bd=n([].slice),Bd}var qd,$_;function tX(){if($_)return qd;$_=1;var n=ye(),e=Ni(),t=Ot(),r=kt(),i=Js(),o=Wg(),s=Function,a=n([].concat),g=n([].join),A={},I=function(C,l,d){if(!r(A,l)){for(var u=[],h=0;h<l;h++)u[h]="a["+h+"]";A[l]=s("C,a","return new C("+g(u,",")+")")}return A[l](C,d)};return qd=o?s.bind:function(l){var d=e(this),u=d.prototype,h=i(arguments,1),p=function(){var c=a(h,i(arguments));return this instanceof p?I(d,c.length,c):d.apply(l,c)};return t(u)&&(p.prototype=u),p},qd}var D_;function rX(){if(D_)return R_;D_=1;var n=ie(),e=tX();return n({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e}),R_}var zd,N_;function Ft(){if(N_)return zd;N_=1;var n=We(),e=Pe();return zd=function(t,r){var i=e[t+"Prototype"],o=i&&i[r];if(o)return o;var s=n[t],a=s&&s.prototype;return a&&a[r]},zd}var jd,M_;function iX(){if(M_)return jd;M_=1,rX();var n=Ft();return jd=n("Function","bind"),jd}var Ld,k_;function nX(){if(k_)return Ld;k_=1;var n=ut(),e=iX(),t=Function.prototype;return Ld=function(r){var i=r.bind;return r===t||n(t,r)&&i===t.bind?e:i},Ld}var Gd,F_;function oX(){if(F_)return Gd;F_=1;var n=nX();return Gd=n,Gd}var Wd,B_;function sX(){return B_||(B_=1,Wd=oX()),Wd}var aX=sX(),q=de(aX);function CS(n,e,t,r){n.beginPath(),n.arc(e,t,r,0,2*Math.PI,!1),n.closePath()}function gX(n,e,t,r){n.beginPath(),n.rect(e-r,t-r,r*2,r*2),n.closePath()}function AX(n,e,t,r){n.beginPath(),r*=1.15,t+=.275*r;const i=r*2,o=i/2,s=Math.sqrt(3)/6*i,a=Math.sqrt(i*i-o*o);n.moveTo(e,t-(a-s)),n.lineTo(e+o,t+s),n.lineTo(e-o,t+s),n.lineTo(e,t-(a-s)),n.closePath()}function IX(n,e,t,r){n.beginPath(),r*=1.15,t-=.275*r;const i=r*2,o=i/2,s=Math.sqrt(3)/6*i,a=Math.sqrt(i*i-o*o);n.moveTo(e,t+(a-s)),n.lineTo(e+o,t-s),n.lineTo(e-o,t-s),n.lineTo(e,t+(a-s)),n.closePath()}function CX(n,e,t,r){n.beginPath(),r*=.82,t+=.1*r;for(let i=0;i<10;i++){const o=i%2===0?r*1.3:r*.5;n.lineTo(e+o*Math.sin(i*2*Math.PI/10),t-o*Math.cos(i*2*Math.PI/10))}n.closePath()}function lX(n,e,t,r){n.beginPath(),n.lineTo(e,t+r),n.lineTo(e+r,t),n.lineTo(e,t-r),n.lineTo(e-r,t),n.closePath()}function yH(n,e,t,r,i,o){const s=Math.PI/180;r-2*o<0&&(o=r/2),i-2*o<0&&(o=i/2),n.beginPath(),n.moveTo(e+o,t),n.lineTo(e+r-o,t),n.arc(e+r-o,t+o,o,s*270,s*360,!1),n.lineTo(e+r,t+i-o),n.arc(e+r-o,t+i-o,o,0,s*90,!1),n.lineTo(e+o,t+i),n.arc(e+o,t+i-o,o,s*90,s*180,!1),n.lineTo(e,t+o),n.arc(e+o,t+o,o,s*180,s*270,!1),n.closePath()}function Kw(n,e,t,r,i){const o=.5522848,s=r/2*o,a=i/2*o,g=e+r,A=t+i,I=e+r/2,C=t+i/2;n.beginPath(),n.moveTo(e,C),n.bezierCurveTo(e,C-a,I-s,t,I,t),n.bezierCurveTo(I+s,t,g,C-a,g,C),n.bezierCurveTo(g,C+a,I+s,A,I,A),n.bezierCurveTo(I-s,A,e,C+a,e,C),n.closePath()}function bH(n,e,t,r,i){const o=.3333333333333333,s=r,a=i*o,g=.5522848,A=s/2*g,I=a/2*g,C=e+s,l=t+a,d=e+s/2,u=t+a/2,h=t+(i-a/2),p=t+i;n.beginPath(),n.moveTo(C,u),n.bezierCurveTo(C,u+I,d+A,l,d,l),n.bezierCurveTo(d-A,l,e,u+I,e,u),n.bezierCurveTo(e,u-I,d-A,t,d,t),n.bezierCurveTo(d+A,t,C,u-I,C,u),n.lineTo(C,h),n.bezierCurveTo(C,h+I,d+A,p,d,p),n.bezierCurveTo(d-A,p,e,h+I,e,h),n.lineTo(e,u)}function wH(n,e,t,r,i,o){n.beginPath(),n.moveTo(e,t);const s=o.length,a=r-e,g=i-t,A=g/a;let I=Math.sqrt(a*a+g*g),C=0,l=!0,d=0,u=+o[0];for(;I>=.1;)u=+o[C++%s],u>I&&(u=I),d=Math.sqrt(u*u/(1+A*A)),d=a<0?-d:d,e+=d,t+=A*d,l===!0?n.lineTo(e,t):n.moveTo(e,t),I-=u,l=!l}function dX(n,e,t,r){n.beginPath();const i=6,o=Math.PI*2/i;n.moveTo(e+r,t);for(let s=1;s<i;s++)n.lineTo(e+r*Math.cos(o*s),t+r*Math.sin(o*s));n.closePath()}const q_={circle:CS,dashedLine:wH,database:bH,diamond:lX,ellipse:Kw,ellipse_vis:Kw,hexagon:dX,roundRect:yH,square:gX,star:CX,triangle:AX,triangleDown:IX};function uX(n){return Object.prototype.hasOwnProperty.call(q_,n)?q_[n]:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];CanvasRenderingContext2D.prototype[n].call(e,r)}}var Vd={exports:{}},z_;function hX(){return z_||(z_=1,(function(n){n.exports=e;function e(r){if(r)return t(r)}function t(r){for(var i in e.prototype)r[i]=e.prototype[i];return r}e.prototype.on=e.prototype.addEventListener=function(r,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(i),this},e.prototype.once=function(r,i){function o(){this.off(r,o),i.apply(this,arguments)}return o.fn=i,this.on(r,o),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(r,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var o=this._callbacks["$"+r];if(!o)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var s,a=0;a<o.length;a++)if(s=o[a],s===i||s.fn===i){o.splice(a,1);break}return o.length===0&&delete this._callbacks["$"+r],this},e.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),o=this._callbacks["$"+r],s=1;s<arguments.length;s++)i[s-1]=arguments[s];if(o){o=o.slice(0);for(var s=0,a=o.length;s<a;++s)o[s].apply(this,i)}return this},e.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]},e.prototype.hasListeners=function(r){return!!this.listeners(r).length}})(Vd)),Vd.exports}var cX=hX(),EH=de(cX);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
 * http://naver.github.io/egjs
 *
 * Forked By Naver egjs
 * Copyright (c) hammerjs
 * Licensed under the MIT license */function Yr(){return Yr=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Yr.apply(this,arguments)}function Nr(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}function VA(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}var Xw;typeof Object.assign!="function"?Xw=function(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(i!=null)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:Xw=Object.assign;var Kn=Xw,j_=["","webkit","Moz","MS","ms","o"],fX=typeof document>"u"?{style:{}}:document.createElement("div"),pX="function",Xo=Math.round,Xn=Math.abs,lS=Date.now;function mC(n,e){for(var t,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<j_.length;){if(t=j_[o],r=t?t+i:e,r in n)return r;o++}}var yi;typeof window>"u"?yi={}:yi=window;var SH=mC(fX.style,"touchAction"),OH=SH!==void 0;function vX(){if(!OH)return!1;var n={},e=yi.CSS&&yi.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return n[t]=e?yi.CSS.supports("touch-action",t):!0}),n}var TH="compute",_H="auto",Qw="manipulation",Ln="none",yg="pan-x",bg="pan-y",ZA=vX(),mX=/mobile|tablet|ip(ad|hone|od)|android/i,PH="ontouchstart"in yi,yX=mC(yi,"PointerEvent")!==void 0,bX=PH&&mX.test(navigator.userAgent),Kg="touch",wX="pen",dS="mouse",EX="kinect",SX=25,Kt=1,Io=2,Ct=4,ar=8,FI=1,Xg=2,Qg=4,Jg=8,Ss=16,ai=Xg|Qg,Gn=Jg|Ss,RH=ai|Gn,xH=["x","y"],BI=["clientX","clientY"];function bi(n,e,t){var r;if(n)if(n.forEach)n.forEach(e,t);else if(n.length!==void 0)for(r=0;r<n.length;)e.call(t,n[r],r,n),r++;else for(r in n)n.hasOwnProperty(r)&&e.call(t,n[r],r,n)}function yC(n,e){return typeof n===pX?n.apply(e&&e[0]||void 0,e):n}function kn(n,e){return n.indexOf(e)>-1}function OX(n){if(kn(n,Ln))return Ln;var e=kn(n,yg),t=kn(n,bg);return e&&t?Ln:e||t?e?yg:bg:kn(n,Qw)?Qw:_H}var $H=(function(){function n(t,r){this.manager=t,this.set(r)}var e=n.prototype;return e.set=function(r){r===TH&&(r=this.compute()),OH&&this.manager.element.style&&ZA[r]&&(this.manager.element.style[SH]=r),this.actions=r.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var r=[];return bi(this.manager.recognizers,function(i){yC(i.options.enable,[i])&&(r=r.concat(i.getTouchAction()))}),OX(r.join(" "))},e.preventDefaults=function(r){var i=r.srcEvent,o=r.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var s=this.actions,a=kn(s,Ln)&&!ZA[Ln],g=kn(s,bg)&&!ZA[bg],A=kn(s,yg)&&!ZA[yg];if(a){var I=r.pointers.length===1,C=r.distance<2,l=r.deltaTime<250;if(I&&C&&l)return}if(!(A&&g)&&(a||g&&o&ai||A&&o&Gn))return this.preventSrc(i)},e.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},n})();function uS(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}function DH(n){var e=n.length;if(e===1)return{x:Xo(n[0].clientX),y:Xo(n[0].clientY)};for(var t=0,r=0,i=0;i<e;)t+=n[i].clientX,r+=n[i].clientY,i++;return{x:Xo(t/e),y:Xo(r/e)}}function L_(n){for(var e=[],t=0;t<n.pointers.length;)e[t]={clientX:Xo(n.pointers[t].clientX),clientY:Xo(n.pointers[t].clientY)},t++;return{timeStamp:lS(),pointers:e,center:DH(e),deltaX:n.deltaX,deltaY:n.deltaY}}function qI(n,e,t){t||(t=xH);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.sqrt(r*r+i*i)}function Jw(n,e,t){t||(t=xH);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.atan2(i,r)*180/Math.PI}function NH(n,e){return n===e?FI:Xn(n)>=Xn(e)?n<0?Xg:Qg:e<0?Jg:Ss}function TX(n,e){var t=e.center,r=n.offsetDelta||{},i=n.prevDelta||{},o=n.prevInput||{};(e.eventType===Kt||o.eventType===Ct)&&(i=n.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=n.offsetDelta={x:t.x,y:t.y}),e.deltaX=i.x+(t.x-r.x),e.deltaY=i.y+(t.y-r.y)}function MH(n,e,t){return{x:e/n||0,y:t/n||0}}function _X(n,e){return qI(e[0],e[1],BI)/qI(n[0],n[1],BI)}function PX(n,e){return Jw(e[1],e[0],BI)+Jw(n[1],n[0],BI)}function RX(n,e){var t=n.lastInterval||e,r=e.timeStamp-t.timeStamp,i,o,s,a;if(e.eventType!==ar&&(r>SX||t.velocity===void 0)){var g=e.deltaX-t.deltaX,A=e.deltaY-t.deltaY,I=MH(r,g,A);o=I.x,s=I.y,i=Xn(I.x)>Xn(I.y)?I.x:I.y,a=NH(g,A),n.lastInterval=e}else i=t.velocity,o=t.velocityX,s=t.velocityY,a=t.direction;e.velocity=i,e.velocityX=o,e.velocityY=s,e.direction=a}function xX(n,e){var t=n.session,r=e.pointers,i=r.length;t.firstInput||(t.firstInput=L_(e)),i>1&&!t.firstMultiple?t.firstMultiple=L_(e):i===1&&(t.firstMultiple=!1);var o=t.firstInput,s=t.firstMultiple,a=s?s.center:o.center,g=e.center=DH(r);e.timeStamp=lS(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=Jw(a,g),e.distance=qI(a,g),TX(t,e),e.offsetDirection=NH(e.deltaX,e.deltaY);var A=MH(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=A.x,e.overallVelocityY=A.y,e.overallVelocity=Xn(A.x)>Xn(A.y)?A.x:A.y,e.scale=s?_X(s.pointers,r):1,e.rotation=s?PX(s.pointers,r):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,RX(t,e);var I=n.element,C=e.srcEvent,l;C.composedPath?l=C.composedPath()[0]:C.path?l=C.path[0]:l=C.target,uS(l,I)&&(I=l),e.target=I}function $X(n,e,t){var r=t.pointers.length,i=t.changedPointers.length,o=e&Kt&&r-i===0,s=e&(Ct|ar)&&r-i===0;t.isFirst=!!o,t.isFinal=!!s,o&&(n.session={}),t.eventType=e,xX(n,t),n.emit("hammer.input",t),n.recognize(t),n.session.prevInput=t}function wg(n){return n.trim().split(/\s+/g)}function ig(n,e,t){bi(wg(e),function(r){n.addEventListener(r,t,!1)})}function ng(n,e,t){bi(wg(e),function(r){n.removeEventListener(r,t,!1)})}function G_(n){var e=n.ownerDocument||n;return e.defaultView||e.parentWindow||window}var ea=(function(){function n(t,r){var i=this;this.manager=t,this.callback=r,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(o){yC(t.options.enable,[t])&&i.handler(o)},this.init()}var e=n.prototype;return e.handler=function(){},e.init=function(){this.evEl&&ig(this.element,this.evEl,this.domHandler),this.evTarget&&ig(this.target,this.evTarget,this.domHandler),this.evWin&&ig(G_(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&ng(this.element,this.evEl,this.domHandler),this.evTarget&&ng(this.target,this.evTarget,this.domHandler),this.evWin&&ng(G_(this.element),this.evWin,this.domHandler)},n})();function Qn(n,e,t){if(n.indexOf&&!t)return n.indexOf(e);for(var r=0;r<n.length;){if(t&&n[r][t]==e||!t&&n[r]===e)return r;r++}return-1}var DX={pointerdown:Kt,pointermove:Io,pointerup:Ct,pointercancel:ar,pointerout:ar},NX={2:Kg,3:wX,4:dS,5:EX},kH="pointerdown",FH="pointermove pointerup pointercancel";yi.MSPointerEvent&&!yi.PointerEvent&&(kH="MSPointerDown",FH="MSPointerMove MSPointerUp MSPointerCancel");var BH=(function(n){Nr(e,n);function e(){var r,i=e.prototype;return i.evEl=kH,i.evWin=FH,r=n.apply(this,arguments)||this,r.store=r.manager.session.pointerEvents=[],r}var t=e.prototype;return t.handler=function(i){var o=this.store,s=!1,a=i.type.toLowerCase().replace("ms",""),g=DX[a],A=NX[i.pointerType]||i.pointerType,I=A===Kg,C=Qn(o,i.pointerId,"pointerId");g&Kt&&(i.button===0||I)?C<0&&(o.push(i),C=o.length-1):g&(Ct|ar)&&(s=!0),!(C<0)&&(o[C]=i,this.callback(this.manager,g,{pointers:o,changedPointers:[i],pointerType:A,srcEvent:i}),s&&o.splice(C,1))},e})(ea);function Eg(n){return Array.prototype.slice.call(n,0)}function hS(n,e,t){for(var r=[],i=[],o=0;o<n.length;){var s=e?n[o][e]:n[o];Qn(i,s)<0&&r.push(n[o]),i[o]=s,o++}return t&&(e?r=r.sort(function(a,g){return a[e]>g[e]}):r=r.sort()),r}var MX={touchstart:Kt,touchmove:Io,touchend:Ct,touchcancel:ar},kX="touchstart touchmove touchend touchcancel",cS=(function(n){Nr(e,n);function e(){var r;return e.prototype.evTarget=kX,r=n.apply(this,arguments)||this,r.targetIds={},r}var t=e.prototype;return t.handler=function(i){var o=MX[i.type],s=FX.call(this,i,o);s&&this.callback(this.manager,o,{pointers:s[0],changedPointers:s[1],pointerType:Kg,srcEvent:i})},e})(ea);function FX(n,e){var t=Eg(n.touches),r=this.targetIds;if(e&(Kt|Io)&&t.length===1)return r[t[0].identifier]=!0,[t,t];var i,o,s=Eg(n.changedTouches),a=[],g=this.target;if(o=t.filter(function(A){return uS(A.target,g)}),e===Kt)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<s.length;)r[s[i].identifier]&&a.push(s[i]),e&(Ct|ar)&&delete r[s[i].identifier],i++;if(a.length)return[hS(o.concat(a),"identifier",!0),a]}var BX={mousedown:Kt,mousemove:Io,mouseup:Ct},qX="mousedown",zX="mousemove mouseup",fS=(function(n){Nr(e,n);function e(){var r,i=e.prototype;return i.evEl=qX,i.evWin=zX,r=n.apply(this,arguments)||this,r.pressed=!1,r}var t=e.prototype;return t.handler=function(i){var o=BX[i.type];o&Kt&&i.button===0&&(this.pressed=!0),o&Io&&i.which!==1&&(o=Ct),this.pressed&&(o&Ct&&(this.pressed=!1),this.callback(this.manager,o,{pointers:[i],changedPointers:[i],pointerType:dS,srcEvent:i}))},e})(ea),jX=2500,W_=25;function V_(n){var e=n.changedPointers,t=e[0];if(t.identifier===this.primaryTouch){var r={x:t.clientX,y:t.clientY},i=this.lastTouches;this.lastTouches.push(r);var o=function(){var a=i.indexOf(r);a>-1&&i.splice(a,1)};setTimeout(o,jX)}}function LX(n,e){n&Kt?(this.primaryTouch=e.changedPointers[0].identifier,V_.call(this,e)):n&(Ct|ar)&&V_.call(this,e)}function GX(n){for(var e=n.srcEvent.clientX,t=n.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),s=Math.abs(t-i.y);if(o<=W_&&s<=W_)return!0}return!1}var qH=(function(){var n=(function(e){Nr(t,e);function t(i,o){var s;return s=e.call(this,i,o)||this,s.handler=function(a,g,A){var I=A.pointerType===Kg,C=A.pointerType===dS;if(!(C&&A.sourceCapabilities&&A.sourceCapabilities.firesTouchEvents)){if(I)LX.call(VA(VA(s)),g,A);else if(C&&GX.call(VA(VA(s)),A))return;s.callback(a,g,A)}},s.touch=new cS(s.manager,s.handler),s.mouse=new fS(s.manager,s.handler),s.primaryTouch=null,s.lastTouches=[],s}var r=t.prototype;return r.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t})(ea);return n})();function WX(n){var e,t=n.options.inputClass;return t?e=t:yX?e=BH:bX?e=cS:PH?e=qH:e=fS,new e(n,$X)}function Qo(n,e,t){return Array.isArray(n)?(bi(n,t[e],t),!0):!1}var mI=1,Pr=2,Os=4,Qi=8,wi=Qi,Sg=16,ri=32,VX=1;function ZX(){return VX++}function HA(n,e){var t=e.manager;return t?t.get(n):n}function Z_(n){return n&Sg?"cancel":n&Qi?"end":n&Os?"move":n&Pr?"start":""}var eA=(function(){function n(t){t===void 0&&(t={}),this.options=Yr({enable:!0},t),this.id=ZX(),this.manager=null,this.state=mI,this.simultaneous={},this.requireFail=[]}var e=n.prototype;return e.set=function(r){return Kn(this.options,r),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(r){if(Qo(r,"recognizeWith",this))return this;var i=this.simultaneous;return r=HA(r,this),i[r.id]||(i[r.id]=r,r.recognizeWith(this)),this},e.dropRecognizeWith=function(r){return Qo(r,"dropRecognizeWith",this)?this:(r=HA(r,this),delete this.simultaneous[r.id],this)},e.requireFailure=function(r){if(Qo(r,"requireFailure",this))return this;var i=this.requireFail;return r=HA(r,this),Qn(i,r)===-1&&(i.push(r),r.requireFailure(this)),this},e.dropRequireFailure=function(r){if(Qo(r,"dropRequireFailure",this))return this;r=HA(r,this);var i=Qn(this.requireFail,r);return i>-1&&this.requireFail.splice(i,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(r){return!!this.simultaneous[r.id]},e.emit=function(r){var i=this,o=this.state;function s(a){i.manager.emit(a,r)}o<Qi&&s(i.options.event+Z_(o)),s(i.options.event),r.additionalEvent&&s(r.additionalEvent),o>=Qi&&s(i.options.event+Z_(o))},e.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=ri},e.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(ri|mI)))return!1;r++}return!0},e.recognize=function(r){var i=Kn({},r);if(!yC(this.options.enable,[this,i])){this.reset(),this.state=ri;return}this.state&(wi|Sg|ri)&&(this.state=mI),this.state=this.process(i),this.state&(Pr|Os|Qi|Sg)&&this.tryEmit(i)},e.process=function(r){},e.getTouchAction=function(){},e.reset=function(){},n})(),eE=(function(n){Nr(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,Yr({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},r))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var t=e.prototype;return t.getTouchAction=function(){return[Qw]},t.process=function(i){var o=this,s=this.options,a=i.pointers.length===s.pointers,g=i.distance<s.threshold,A=i.deltaTime<s.time;if(this.reset(),i.eventType&Kt&&this.count===0)return this.failTimeout();if(g&&A&&a){if(i.eventType!==Ct)return this.failTimeout();var I=this.pTime?i.timeStamp-this.pTime<s.interval:!0,C=!this.pCenter||qI(this.pCenter,i.center)<s.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!C||!I?this.count=1:this.count+=1,this._input=i;var l=this.count%s.taps;if(l===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){o.state=wi,o.tryEmit()},s.interval),Pr):wi}return ri},t.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=ri},this.options.interval),ri},t.reset=function(){clearTimeout(this._timer)},t.emit=function(){this.state===wi&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e})(eA),Ts=(function(n){Nr(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Yr({pointers:1},r))||this}var t=e.prototype;return t.attrTest=function(i){var o=this.options.pointers;return o===0||i.pointers.length===o},t.process=function(i){var o=this.state,s=i.eventType,a=o&(Pr|Os),g=this.attrTest(i);return a&&(s&ar||!g)?o|Sg:a||g?s&Ct?o|Qi:o&Pr?o|Os:Pr:ri},e})(eA);function zH(n){return n===Ss?"down":n===Jg?"up":n===Xg?"left":n===Qg?"right":""}var pS=(function(n){Nr(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,Yr({event:"pan",threshold:10,pointers:1,direction:RH},r))||this,i.pX=null,i.pY=null,i}var t=e.prototype;return t.getTouchAction=function(){var i=this.options.direction,o=[];return i&ai&&o.push(bg),i&Gn&&o.push(yg),o},t.directionTest=function(i){var o=this.options,s=!0,a=i.distance,g=i.direction,A=i.deltaX,I=i.deltaY;return g&o.direction||(o.direction&ai?(g=A===0?FI:A<0?Xg:Qg,s=A!==this.pX,a=Math.abs(i.deltaX)):(g=I===0?FI:I<0?Jg:Ss,s=I!==this.pY,a=Math.abs(i.deltaY))),i.direction=g,s&&a>o.threshold&&g&o.direction},t.attrTest=function(i){return Ts.prototype.attrTest.call(this,i)&&(this.state&Pr||!(this.state&Pr)&&this.directionTest(i))},t.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var o=zH(i.direction);o&&(i.additionalEvent=this.options.event+o),n.prototype.emit.call(this,i)},e})(Ts),jH=(function(n){Nr(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Yr({event:"swipe",threshold:10,velocity:.3,direction:ai|Gn,pointers:1},r))||this}var t=e.prototype;return t.getTouchAction=function(){return pS.prototype.getTouchAction.call(this)},t.attrTest=function(i){var o=this.options.direction,s;return o&(ai|Gn)?s=i.overallVelocity:o&ai?s=i.overallVelocityX:o&Gn&&(s=i.overallVelocityY),n.prototype.attrTest.call(this,i)&&o&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&Xn(s)>this.options.velocity&&i.eventType&Ct},t.emit=function(i){var o=zH(i.offsetDirection);o&&this.manager.emit(this.options.event+o,i),this.manager.emit(this.options.event,i)},e})(Ts),LH=(function(n){Nr(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Yr({event:"pinch",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[Ln]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&Pr)},t.emit=function(i){if(i.scale!==1){var o=i.scale<1?"in":"out";i.additionalEvent=this.options.event+o}n.prototype.emit.call(this,i)},e})(Ts),GH=(function(n){Nr(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Yr({event:"rotate",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[Ln]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&Pr)},e})(Ts),WH=(function(n){Nr(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,Yr({event:"press",pointers:1,time:251,threshold:9},r))||this,i._timer=null,i._input=null,i}var t=e.prototype;return t.getTouchAction=function(){return[_H]},t.process=function(i){var o=this,s=this.options,a=i.pointers.length===s.pointers,g=i.distance<s.threshold,A=i.deltaTime>s.time;if(this._input=i,!g||!a||i.eventType&(Ct|ar)&&!A)this.reset();else if(i.eventType&Kt)this.reset(),this._timer=setTimeout(function(){o.state=wi,o.tryEmit()},s.time);else if(i.eventType&Ct)return wi;return ri},t.reset=function(){clearTimeout(this._timer)},t.emit=function(i){this.state===wi&&(i&&i.eventType&Ct?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=lS(),this.manager.emit(this.options.event,this._input)))},e})(eA),VH={domEvents:!1,touchAction:TH,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},H_=[[GH,{enable:!1}],[LH,{enable:!1},["rotate"]],[jH,{direction:ai}],[pS,{direction:ai},["swipe"]],[eE],[eE,{event:"doubletap",taps:2},["tap"]],[WH]],HX=1,U_=2;function Y_(n,e){var t=n.element;if(t.style){var r;bi(n.options.cssProps,function(i,o){r=mC(t.style,o),e?(n.oldCssProps[r]=t.style[r],t.style[r]=i):t.style[r]=n.oldCssProps[r]||""}),e||(n.oldCssProps={})}}function UX(n,e){var t=document.createEvent("Event");t.initEvent(n,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var K_=(function(){function n(t,r){var i=this;this.options=Kn({},VH,r||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=WX(this),this.touchAction=new $H(this,this.options.touchAction),Y_(this,!0),bi(this.options.recognizers,function(o){var s=i.add(new o[0](o[1]));o[2]&&s.recognizeWith(o[2]),o[3]&&s.requireFailure(o[3])},this)}var e=n.prototype;return e.set=function(r){return Kn(this.options,r),r.touchAction&&this.touchAction.update(),r.inputTarget&&(this.input.destroy(),this.input.target=r.inputTarget,this.input.init()),this},e.stop=function(r){this.session.stopped=r?U_:HX},e.recognize=function(r){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(r);var o,s=this.recognizers,a=i.curRecognizer;(!a||a&&a.state&wi)&&(i.curRecognizer=null,a=null);for(var g=0;g<s.length;)o=s[g],i.stopped!==U_&&(!a||o===a||o.canRecognizeWith(a))?o.recognize(r):o.reset(),!a&&o.state&(Pr|Os|Qi)&&(i.curRecognizer=o,a=o),g++}},e.get=function(r){if(r instanceof eA)return r;for(var i=this.recognizers,o=0;o<i.length;o++)if(i[o].options.event===r)return i[o];return null},e.add=function(r){if(Qo(r,"add",this))return this;var i=this.get(r.options.event);return i&&this.remove(i),this.recognizers.push(r),r.manager=this,this.touchAction.update(),r},e.remove=function(r){if(Qo(r,"remove",this))return this;var i=this.get(r);if(r){var o=this.recognizers,s=Qn(o,i);s!==-1&&(o.splice(s,1),this.touchAction.update())}return this},e.on=function(r,i){if(r===void 0||i===void 0)return this;var o=this.handlers;return bi(wg(r),function(s){o[s]=o[s]||[],o[s].push(i)}),this},e.off=function(r,i){if(r===void 0)return this;var o=this.handlers;return bi(wg(r),function(s){i?o[s]&&o[s].splice(Qn(o[s],i),1):delete o[s]}),this},e.emit=function(r,i){this.options.domEvents&&UX(r,i);var o=this.handlers[r]&&this.handlers[r].slice();if(!(!o||!o.length)){i.type=r,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var s=0;s<o.length;)o[s](i),s++}},e.destroy=function(){this.element&&Y_(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},n})(),YX={touchstart:Kt,touchmove:Io,touchend:Ct,touchcancel:ar},KX="touchstart",XX="touchstart touchmove touchend touchcancel",QX=(function(n){Nr(e,n);function e(){var r,i=e.prototype;return i.evTarget=KX,i.evWin=XX,r=n.apply(this,arguments)||this,r.started=!1,r}var t=e.prototype;return t.handler=function(i){var o=YX[i.type];if(o===Kt&&(this.started=!0),!!this.started){var s=JX.call(this,i,o);o&(Ct|ar)&&s[0].length-s[1].length===0&&(this.started=!1),this.callback(this.manager,o,{pointers:s[0],changedPointers:s[1],pointerType:Kg,srcEvent:i})}},e})(ea);function JX(n,e){var t=Eg(n.touches),r=Eg(n.changedTouches);return e&(Ct|ar)&&(t=hS(t.concat(r),"identifier",!0)),[t,r]}function ZH(n,e,t){var r="DEPRECATED METHOD: "+e+`
`+t+` AT 
`;return function(){var i=new Error("get-stack-trace"),o=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=window.console&&(window.console.warn||window.console.log);return s&&s.call(window.console,r,o),n.apply(this,arguments)}}var HH=ZH(function(n,e,t){for(var r=Object.keys(e),i=0;i<r.length;)(!t||t&&n[r[i]]===void 0)&&(n[r[i]]=e[r[i]]),i++;return n},"extend","Use `assign`."),eQ=ZH(function(n,e){return HH(n,e,!0)},"merge","Use `assign`.");function tQ(n,e,t){var r=e.prototype,i;i=n.prototype=Object.create(r),i.constructor=n,i._super=r,t&&Kn(i,t)}function X_(n,e){return function(){return n.apply(e,arguments)}}var UH=(function(){var n=function(t,r){return r===void 0&&(r={}),new K_(t,Yr({recognizers:H_.concat()},r))};return n.VERSION="2.0.17-rc",n.DIRECTION_ALL=RH,n.DIRECTION_DOWN=Ss,n.DIRECTION_LEFT=Xg,n.DIRECTION_RIGHT=Qg,n.DIRECTION_UP=Jg,n.DIRECTION_HORIZONTAL=ai,n.DIRECTION_VERTICAL=Gn,n.DIRECTION_NONE=FI,n.DIRECTION_DOWN=Ss,n.INPUT_START=Kt,n.INPUT_MOVE=Io,n.INPUT_END=Ct,n.INPUT_CANCEL=ar,n.STATE_POSSIBLE=mI,n.STATE_BEGAN=Pr,n.STATE_CHANGED=Os,n.STATE_ENDED=Qi,n.STATE_RECOGNIZED=wi,n.STATE_CANCELLED=Sg,n.STATE_FAILED=ri,n.Manager=K_,n.Input=ea,n.TouchAction=$H,n.TouchInput=cS,n.MouseInput=fS,n.PointerEventInput=BH,n.TouchMouseInput=qH,n.SingleTouchInput=QX,n.Recognizer=eA,n.AttrRecognizer=Ts,n.Tap=eE,n.Pan=pS,n.Swipe=jH,n.Pinch=LH,n.Rotate=GH,n.Press=WH,n.on=ig,n.off=ng,n.each=bi,n.merge=eQ,n.extend=HH,n.bindFn=X_,n.assign=Kn,n.inherit=tQ,n.bindFn=X_,n.prefixed=mC,n.toArray=Eg,n.inArray=Qn,n.uniqueArray=hS,n.splitStr=wg,n.boolOrFn=yC,n.hasParent=uS,n.addEventListeners=ig,n.removeEventListeners=ng,n.defaults=Kn({},VH,{preset:H_}),n})();UH.defaults;/**
 * vis-util
 * https://github.com/visjs/vis-util
 *
 * utilitie collection for visjs
 *
 * @version 6.0.0
 * @date    2025-07-12T18:02:43.836Z
 *
 * @copyright (c) 2011-2017 Almende B.V, http://almende.com
 * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
 *
 * @license
 * vis.js is dual licensed under both
 *
 *   1. The Apache 2.0 License
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *   and
 *
 *   2. The MIT License
 *      http://opensource.org/licenses/MIT
 *
 * vis.js may be distributed under either license.
 */const YH=Symbol("DELETE");function rQ(n,...e){return KH({},n,...e)}function KH(...n){const e=zI(...n);return QH(e),e}function zI(...n){if(n.length<2)return n[0];if(n.length>2)return zI(KH(n[0],n[1]),...n.slice(2));const e=n[0],t=n[1];if(e instanceof Date&&t instanceof Date)return e.setTime(t.getTime()),e;for(const r of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,r)&&(t[r]===YH?delete e[r]:e[r]!==null&&t[r]!==null&&typeof e[r]=="object"&&typeof t[r]=="object"&&!Array.isArray(e[r])&&!Array.isArray(t[r])?e[r]=zI(e[r],t[r]):e[r]=XH(t[r]));return e}function XH(n){return Array.isArray(n)?n.map(e=>XH(e)):typeof n=="object"&&n!==null?n instanceof Date?new Date(n.getTime()):zI({},n):n}function QH(n){for(const e of Object.keys(n))n[e]===YH?delete n[e]:typeof n[e]=="object"&&n[e]!==null&&QH(n[e])}function bC(...n){return iQ(n.length?n:[Date.now()])}function iQ(n){let[e,t,r]=nQ(n),i=1;const o=()=>{const s=2091639*e+i*23283064365386963e-26;return e=t,t=r,r=s-(i=s|0)};return o.uint32=()=>o()*4294967296,o.fract53=()=>o()+(o()*2097152|0)*11102230246251565e-32,o.algorithm="Alea",o.seed=n,o.version="0.9",o}function nQ(...n){const e=oQ();let t=e(" "),r=e(" "),i=e(" ");for(let o=0;o<n.length;o++)t-=e(n[o]),t<0&&(t+=1),r-=e(n[o]),r<0&&(r+=1),i-=e(n[o]),i<0&&(i+=1);return[t,r,i]}function oQ(){let n=4022871197;return function(e){const t=e.toString();for(let r=0;r<t.length;r++){n+=t.charCodeAt(r);let i=.02519603282416938*n;n=i>>>0,i-=n,i*=n,n=i>>>0,i-=n,n+=i*4294967296}return(n>>>0)*23283064365386963e-26}}function sQ(){const n=()=>{};return{on:n,off:n,destroy:n,emit:n,get(){return{set:n}}}}const vS=typeof window<"u"?window.Hammer||UH:function(){return sQ()};function ii(n){this._cleanupQueue=[],this.active=!1,this._dom={container:n,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const e=vS(this._dom.overlay);e.on("tap",this._onTapOverlay.bind(this)),this._cleanupQueue.push(()=>{e.destroy()}),["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(r=>{e.on(r,i=>{i.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=r=>{aQ(r.target,n)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=r=>{("key"in r?r.key==="Escape":r.keyCode===27)&&this.deactivate()}}EH(ii.prototype);ii.current=null;ii.prototype.destroy=function(){this.deactivate();for(const n of this._cleanupQueue.splice(0).reverse())n()};ii.prototype.activate=function(){ii.current&&ii.current.deactivate(),ii.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};ii.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};ii.prototype._onTapOverlay=function(n){this.activate(),n.srcEvent.stopPropagation()};function aQ(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}const gQ=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,AQ=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,IQ=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,CQ=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function Gi(n){if(n)for(;n.hasChildNodes()===!0;){const e=n.firstChild;e&&(Gi(e),n.removeChild(e))}}function Is(n){return n instanceof String||typeof n=="string"}function Q_(n){return typeof n=="object"&&n!==null}function Jn(n,e,t,r){let i=!1;r===!0&&(i=e[t]===null&&n[t]!==void 0),i?delete n[t]:n[t]=e[t]}function JH(n,e,t=!1){for(const r in n)if(e[r]!==void 0)if(e[r]===null||typeof e[r]!="object")Jn(n,e,r,t);else{const i=n[r],o=e[r];Q_(i)&&Q_(o)&&JH(i,o,t)}}function ta(n,e,t,r=!1){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(let i=0;i<n.length;i++){const o=n[i];if(Object.prototype.hasOwnProperty.call(t,o))if(t[o]&&t[o].constructor===Object)e[o]===void 0&&(e[o]={}),e[o].constructor===Object?Me(e[o],t[o],!1,r):Jn(e,t,o,r);else{if(Array.isArray(t[o]))throw new TypeError("Arrays are not supported by deepExtend");Jn(e,t,o,r)}}return e}function jI(n,e,t,r=!1){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&!n.includes(i))if(t[i]&&t[i].constructor===Object)e[i]===void 0&&(e[i]={}),e[i].constructor===Object?Me(e[i],t[i]):Jn(e,t,i,r);else if(Array.isArray(t[i])){e[i]=[];for(let o=0;o<t[i].length;o++)e[i].push(t[i][o])}else Jn(e,t,i,r);return e}function Me(n,e,t=!1,r=!1){for(const i in e)(Object.prototype.hasOwnProperty.call(e,i)||t===!0)&&(typeof e[i]=="object"&&e[i]!==null&&Object.getPrototypeOf(e[i])===Object.prototype?n[i]===void 0?n[i]=Me({},e[i],t):typeof n[i]=="object"&&n[i]!==null&&Object.getPrototypeOf(n[i])===Object.prototype?Me(n[i],e[i],t):Jn(n,e,i,r):Array.isArray(e[i])?n[i]=e[i].slice():Jn(n,e,i,r));return n}function LI(n,e){return[...n,e]}function lQ(n){return n.slice()}function dQ(n){return n.getBoundingClientRect().left}function uQ(n){return n.getBoundingClientRect().top}function pe(n,e){if(Array.isArray(n)){const t=n.length;for(let r=0;r<t;r++)e(n[r],r,n)}else for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e(n[t],t,n)}function mS(n){let e;switch(n.length){case 3:case 4:return e=AQ.exec(n),e?{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16)}:null;case 6:case 7:return e=gQ.exec(n),e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null;default:return null}}function Tr(n,e){if(n.includes("rgba"))return n;if(n.includes("rgb")){const t=n.substr(n.indexOf("(")+1).replace(")","").split(",");return"rgba("+t[0]+","+t[1]+","+t[2]+","+e+")"}else{const t=mS(n);return t==null?n:"rgba("+t.r+","+t.g+","+t.b+","+e+")"}}function e4(n,e,t){return"#"+((1<<24)+(n<<16)+(e<<8)+t).toString(16).slice(1)}function tE(n,e){if(Is(n)){let t=n;if(r4(t)){const r=t.substr(4).substr(0,t.length-5).split(",").map(function(i){return parseInt(i)});t=e4(r[0],r[1],r[2])}if(t4(t)===!0){const r=hQ(t),i={h:r.h,s:r.s*.8,v:Math.min(1,r.v*1.02)},o={h:r.h,s:Math.min(1,r.s*1.25),v:r.v*.8},s=rE(o.h,o.s,o.v),a=rE(i.h,i.s,i.v);return{background:t,border:s,highlight:{background:a,border:s},hover:{background:a,border:s}}}else return{background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else return{background:n.background||void 0,border:n.border||void 0,highlight:Is(n.highlight)?{border:n.highlight,background:n.highlight}:{background:n.highlight&&n.highlight.background||void 0,border:n.highlight&&n.highlight.border||void 0},hover:Is(n.hover)?{border:n.hover,background:n.hover}:{border:n.hover&&n.hover.border||void 0,background:n.hover&&n.hover.background||void 0}}}function Xa(n,e,t){n=n/255,e=e/255,t=t/255;const r=Math.min(n,Math.min(e,t)),i=Math.max(n,Math.max(e,t));if(r===i)return{h:0,s:0,v:r};const o=n===r?e-t:t===r?n-e:t-n,a=60*((n===r?3:t===r?1:5)-o/(i-r))/360,g=(i-r)/i;return{h:a,s:g,v:i}}function yI(n,e,t){let r,i,o;const s=Math.floor(n*6),a=n*6-s,g=t*(1-e),A=t*(1-a*e),I=t*(1-(1-a)*e);switch(s%6){case 0:r=t,i=I,o=g;break;case 1:r=A,i=t,o=g;break;case 2:r=g,i=t,o=I;break;case 3:r=g,i=A,o=t;break;case 4:r=I,i=g,o=t;break;case 5:r=t,i=g,o=A;break}return{r:Math.floor(r*255),g:Math.floor(i*255),b:Math.floor(o*255)}}function rE(n,e,t){const r=yI(n,e,t);return e4(r.r,r.g,r.b)}function hQ(n){const e=mS(n);if(!e)throw new TypeError(`'${n}' is not a valid color.`);return Xa(e.r,e.g,e.b)}function t4(n){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(n)}function r4(n){return IQ.test(n)}function cQ(n){return CQ.test(n)}function Ji(n){if(n===null||typeof n!="object")return null;if(n instanceof Element)return n;const e=Object.create(n);for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&typeof n[t]=="object"&&(e[t]=Ji(n[t]));return e}function Sr(n,e,t,r={}){const i=function(d){return d!=null},o=function(d){return d!==null&&typeof d=="object"},s=function(d){for(const u in d)if(Object.prototype.hasOwnProperty.call(d,u))return!1;return!0};if(!o(n))throw new Error("Parameter mergeTarget must be an object");if(!o(e))throw new Error("Parameter options must be an object");if(!i(t))throw new Error("Parameter option must have a value");if(!o(r))throw new Error("Parameter globalOptions must be an object");const a=function(d,u,h){o(d[h])||(d[h]={});const p=u[h],f=d[h];for(const c in p)Object.prototype.hasOwnProperty.call(p,c)&&(f[c]=p[c])},g=e[t],I=o(r)&&!s(r)?r[t]:void 0,C=I?I.enabled:void 0;if(g===void 0)return;if(typeof g=="boolean"){o(n[t])||(n[t]={}),n[t].enabled=g;return}if(g===null&&!o(n[t]))if(i(I))n[t]=Object.create(I);else return;if(!o(g))return;let l=!0;g.enabled!==void 0?l=g.enabled:C!==void 0&&(l=I.enabled),a(n,e,t),n[t].enabled=l}const fQ={linear(n){return n},easeInQuad(n){return n*n},easeOutQuad(n){return n*(2-n)},easeInOutQuad(n){return n<.5?2*n*n:-1+(4-2*n)*n},easeInCubic(n){return n*n*n},easeOutCubic(n){return--n*n*n+1},easeInOutCubic(n){return n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1},easeInQuart(n){return n*n*n*n},easeOutQuart(n){return 1- --n*n*n*n},easeInOutQuart(n){return n<.5?8*n*n*n*n:1-8*--n*n*n*n},easeInQuint(n){return n*n*n*n*n},easeOutQuint(n){return 1+--n*n*n*n*n},easeInOutQuint(n){return n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n}};function Wi(n,e){let t;Array.isArray(e)||(e=[e]);for(const r of n)if(r){t=r[e[0]];for(let i=1;i<e.length;i++)t&&(t=t[e[i]]);if(typeof t<"u")break}return t}const pQ={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};let vQ=class{constructor(e=1){this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}setCloseCallback(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}_isColorString(e){if(typeof e=="string")return pQ[e]}setColor(e,t=!0){if(e==="none")return;let r;const i=this._isColorString(e);if(i!==void 0&&(e=i),Is(e)===!0){if(r4(e)===!0){const o=e.substr(4).substr(0,e.length-5).split(",");r={r:o[0],g:o[1],b:o[2],a:1}}else if(cQ(e)===!0){const o=e.substr(5).substr(0,e.length-6).split(",");r={r:o[0],g:o[1],b:o[2],a:o[3]}}else if(t4(e)===!0){const o=mS(e);r={r:o.r,g:o.g,b:o.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){const o=e.a!==void 0?e.a:"1.0";r={r:e.r,g:e.g,b:e.b,a:o}}if(r===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+JSON.stringify(e));this._setColor(r,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(e=!0){e===!0&&(this.previousColor=Object.assign({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(e,t=!0){t===!0&&(this.initialColor=Object.assign({},e)),this.color=e;const r=Xa(e.r,e.g,e.b),i=2*Math.PI,o=this.r*r.s,s=this.centerCoordinates.x+o*Math.sin(i*r.h),a=this.centerCoordinates.y+o*Math.cos(i*r.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){const t=Xa(this.color.r,this.color.g,this.color.b);t.v=e/100;const r=yI(t.h,t.s,t.v);r.a=this.color.a,this.color=r,this._updatePicker()}_updatePicker(e=this.color){const t=Xa(e.r,e.g,e.b),r=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1)),r.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const i=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;r.clearRect(0,0,i,o),r.putImageData(this.hueCircle,0,0),r.fillStyle="rgba(0,0,0,"+(1-t.v)+")",r.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),r.fill(),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){const t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(t)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);const e=this;this.opacityRange.onchange=function(){e._setOpacity(this.value)},this.opacityRange.oninput=function(){e._setOpacity(this.value)},this.brightnessRange.onchange=function(){e._setBrightness(this.value)},this.brightnessRange.oninput=function(){e._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new vS(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on("tap",e=>{this._moveSelector(e)}),this.hammer.on("panstart",e=>{this._moveSelector(e)}),this.hammer.on("panmove",e=>{this._moveSelector(e)}),this.hammer.on("panend",e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){const e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const t=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,r);let i,o,s,a;this.centerCoordinates={x:t*.5,y:r*.5},this.r=.49*t;const g=2*Math.PI/360,A=1/360,I=1/this.r;let C;for(s=0;s<360;s++)for(a=0;a<this.r;a++)i=this.centerCoordinates.x+a*Math.sin(g*s),o=this.centerCoordinates.y+a*Math.cos(g*s),C=yI(s*A,a*I,1),e.fillStyle="rgb("+C.r+","+C.g+","+C.b+")",e.fillRect(i-.5,o-.5,2,2);e.strokeStyle="rgba(0,0,0,1)",e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,r)}this.generated=!0}_moveSelector(e){const t=this.colorPickerDiv.getBoundingClientRect(),r=e.center.x-t.left,i=e.center.y-t.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,a=r-s,g=i-o,A=Math.atan2(a,g),I=.98*Math.min(Math.sqrt(a*a+g*g),s),C=Math.cos(A)*I+o,l=Math.sin(A)*I+s;this.colorPickerSelector.style.top=C-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=l-.5*this.colorPickerSelector.clientWidth+"px";let d=A/(2*Math.PI);d=d<0?d+1:d;const u=I/this.r,h=Xa(this.color.r,this.color.g,this.color.b);h.h=d,h.s=u;const p=yI(h.h,h.s,h.v);p.a=this.color.a,this.color=p,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}};function iE(...n){if(n.length<1)throw new TypeError("Invalid arguments.");if(n.length===1)return document.createTextNode(n[0]);{const e=document.createElement(n[0]);return e.appendChild(iE(...n.slice(1))),e}}let mQ=class{constructor(e,t,r,i=1,o=()=>!1){this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=o,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Object.assign(this.options,this.defaultOptions),this.configureOptions=r,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new vQ(i),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e=="string")this.options.filter=e;else if(Array.isArray(e))this.options.filter=e.join();else if(typeof e=="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),e.filter!==void 0&&(this.options.filter=e.filter),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);this.options.filter===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const e=this.options.filter;let t=0,r=!1;for(const i in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,i)&&(this.allowCreation=!1,r=!1,typeof e=="function"?(r=e(i,[]),r=r||this._handleObject(this.configureOptions[i],[i],!0)):(e===!0||e.indexOf(i)!==-1)&&(r=!0),r!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(i),this._handleObject(this.configureOptions[i],[i])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(let e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let t=this.moduleOptions;for(let r=0;r<e.length;r++)if(t[e[r]]!==void 0)t=t[e[r]];else{t=void 0;break}return t}_makeItem(e,...t){if(this.allowCreation===!0){const r=document.createElement("div");return r.className="vis-configuration vis-config-item vis-config-s"+e.length,t.forEach(i=>{r.appendChild(i)}),this.domElements.push(r),this.domElements.length}return 0}_makeHeader(e){const t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}_makeLabel(e,t,r=!1){const i=document.createElement("div");if(i.className="vis-configuration vis-config-label vis-config-s"+t.length,r===!0){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(iE("i","b",e))}else i.innerText=e+":";return i}_makeDropdown(e,t,r){const i=document.createElement("select");i.className="vis-configuration vis-config-select";let o=0;t!==void 0&&e.indexOf(t)!==-1&&(o=e.indexOf(t));for(let g=0;g<e.length;g++){const A=document.createElement("option");A.value=e[g],g===o&&(A.selected="selected"),A.innerText=e[g],i.appendChild(A)}const s=this;i.onchange=function(){s._update(this.value,r)};const a=this._makeLabel(r[r.length-1],r);this._makeItem(r,a,i)}_makeRange(e,t,r){const i=e[0],o=e[1],s=e[2],a=e[3],g=document.createElement("input");g.className="vis-configuration vis-config-range";try{g.type="range",g.min=o,g.max=s}catch{}g.step=a;let A="",I=0;t!==void 0?(t<0&&t*1.2<o?(g.min=Math.ceil(t*1.2),I=g.min,A="range increased"):t/1.2<o&&(g.min=Math.ceil(t/1.2),I=g.min,A="range increased"),t*1.2>s&&s!==1&&(g.max=Math.ceil(t*1.2),I=g.max,A="range increased"),g.value=t):g.value=i;const C=document.createElement("input");C.className="vis-configuration vis-config-rangeinput",C.value=g.value;const l=this;g.onchange=function(){C.value=this.value,l._update(Number(this.value),r)},g.oninput=function(){C.value=this.value};const d=this._makeLabel(r[r.length-1],r),u=this._makeItem(r,d,g,C);A!==""&&this.popupHistory[u]!==I&&(this.popupHistory[u]=I,this._setupPopup(A,u))}_makeButton(){if(this.options.showButton===!0){const e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className="vis-configuration vis-config-button hover"},e.onmouseout=()=>{e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){const r=document.createElement("div");r.id="vis-configuration-popup",r.className="vis-configuration-popup",r.innerText=e,r.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:r,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){const t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=setTimeout(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=setTimeout(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,r){const i=document.createElement("input");i.type="checkbox",i.className="vis-configuration vis-config-checkbox",i.checked=e,t!==void 0&&(i.checked=t,t!==e&&(typeof e=="object"?t!==e.enabled&&this.changedOptions.push({path:r,value:t}):this.changedOptions.push({path:r,value:t})));const o=this;i.onchange=function(){o._update(this.checked,r)};const s=this._makeLabel(r[r.length-1],r);this._makeItem(r,s,i)}_makeTextInput(e,t,r){const i=document.createElement("input");i.type="text",i.className="vis-configuration vis-config-text",i.value=t,t!==e&&this.changedOptions.push({path:r,value:t});const o=this;i.onchange=function(){o._update(this.value,r)};const s=this._makeLabel(r[r.length-1],r);this._makeItem(r,s,i)}_makeColorField(e,t,r){const i=e[1],o=document.createElement("div");t=t===void 0?i:t,t!=="none"?(o.className="vis-configuration vis-config-colorBlock",o.style.backgroundColor=t):o.className="vis-configuration vis-config-colorBlock none",t=t===void 0?i:t,o.onclick=()=>{this._showColorPicker(t,o,r)};const s=this._makeLabel(r[r.length-1],r);this._makeItem(r,s,o)}_showColorPicker(e,t,r){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(i=>{const o="rgba("+i.r+","+i.g+","+i.b+","+i.a+")";t.style.backgroundColor=o,this._update(o,r)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,r)}})}_handleObject(e,t=[],r=!1){let i=!1;const o=this.options.filter;let s=!1;for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){i=!0;const g=e[a],A=LI(t,a);if(typeof o=="function"&&(i=o(a,t),i===!1&&!Array.isArray(g)&&typeof g!="string"&&typeof g!="boolean"&&g instanceof Object&&(this.allowCreation=!1,i=this._handleObject(g,A,!0),this.allowCreation=r===!1)),i!==!1){s=!0;const I=this._getValue(A);if(Array.isArray(g))this._handleArray(g,I,A);else if(typeof g=="string")this._makeTextInput(g,I,A);else if(typeof g=="boolean")this._makeCheckbox(g,I,A);else if(g instanceof Object){if(!this.hideOption(t,a,this.moduleOptions))if(g.enabled!==void 0){const C=LI(A,"enabled"),l=this._getValue(C);if(l===!0){const d=this._makeLabel(a,A,!0);this._makeItem(A,d),s=this._handleObject(g,A)||s}else this._makeCheckbox(g,l,A)}else{const C=this._makeLabel(a,A,!0);this._makeItem(A,C),s=this._handleObject(g,A)||s}}else console.error("dont know how to handle",g,a,A)}}return s}_handleArray(e,t,r){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,r),e[1]!==t&&this.changedOptions.push({path:r,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,r),e[0]!==t&&this.changedOptions.push({path:r,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,r),e[0]!==t&&this.changedOptions.push({path:r,value:Number(t)}))}_update(e,t){const r=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",r),this.initialized=!0,this.parent.setOptions(r)}_constructOptions(e,t,r={}){let i=r;e=e==="true"?!0:e,e=e==="false"?!1:e;for(let o=0;o<t.length;o++)t[o]!=="global"&&(i[t[o]]===void 0&&(i[t[o]]={}),o!==t.length-1?i=i[t[o]]:i[t[o]]=e);return r}_printOptions(){const e=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(iE("pre","const options = "+JSON.stringify(e,null,2)))}getOptions(){const e={};for(let t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},yQ=class{constructor(e,t){this.container=e,this.overflowMethod=t||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}setPosition(e,t){this.x=parseInt(e),this.y=parseInt(t)}setText(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}show(e){if(e===void 0&&(e=!0),e===!0){const t=this.frame.clientHeight,r=this.frame.clientWidth,i=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth;let s=0,a=0;if(this.overflowMethod=="flip"){let g=!1,A=!0;this.y-t<this.padding&&(A=!1),this.x+r>o-this.padding&&(g=!0),g?s=this.x-r:s=this.x,A?a=this.y-t:a=this.y}else a=this.y-t,a+t+this.padding>i&&(a=i-t-this.padding),a<this.padding&&(a=this.padding),s=this.x,s+r+this.padding>o&&(s=o-r-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=a+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}},Wa=!1,J_;const nE="background: #FFeeee; color: #dd0000";let bQ=class Je{static validate(e,t,r){Wa=!1,J_=t;let i=t;return r!==void 0&&(i=t[r]),Je.parse(e,i,[]),Wa}static parse(e,t,r){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&Je.check(i,e,t,r)}static check(e,t,r,i){if(r[e]===void 0&&r.__any__===void 0){Je.getSuggestion(e,r,i);return}let o=e,s=!0;r[e]===void 0&&r.__any__!==void 0&&(o="__any__",s=Je.getType(t[e])==="object");let a=r[o];s&&a.__type__!==void 0&&(a=a.__type__),Je.checkFields(e,t,r,o,a,i)}static checkFields(e,t,r,i,o,s){const a=function(I){console.error("%c"+I+Je.printLocation(s,e),nE)},g=Je.getType(t[e]),A=o[g];A!==void 0?Je.getType(A)==="array"&&A.indexOf(t[e])===-1?(a('Invalid option detected in "'+e+'". Allowed values are:'+Je.print(A)+' not "'+t[e]+'". '),Wa=!0):g==="object"&&i!=="__any__"&&(s=LI(s,e),Je.parse(t[e],r[i],s)):o.any===void 0&&(a('Invalid type received for "'+e+'". Expected: '+Je.print(Object.keys(o))+". Received ["+g+'] "'+t[e]+'"'),Wa=!0)}static getType(e){const t=typeof e;return t==="object"?e===null?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":Array.isArray(e)?"array":e instanceof Date?"date":e.nodeType!==void 0?"dom":e._isAMomentObject===!0?"moment":"object":t==="number"?"number":t==="boolean"?"boolean":t==="string"?"string":t===void 0?"undefined":t}static getSuggestion(e,t,r){const i=Je.findInOptions(e,t,r,!1),o=Je.findInOptions(e,J_,[],!0),s=8,a=4;let g;i.indexMatch!==void 0?g=" in "+Je.printLocation(i.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+i.indexMatch+`"?

`:o.distance<=a&&i.distance>o.distance?g=" in "+Je.printLocation(i.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+Je.printLocation(o.path,o.closestMatch,""):i.distance<=s?g='. Did you mean "'+i.closestMatch+'"?'+Je.printLocation(i.path,e):g=". Did you mean one of these: "+Je.print(Object.keys(t))+Je.printLocation(r,e),console.error('%cUnknown option detected: "'+e+'"'+g,nE),Wa=!0}static findInOptions(e,t,r,i=!1){let o=1e9,s="",a=[];const g=e.toLowerCase();let A;for(const I in t){let C;if(t[I].__type__!==void 0&&i===!0){const l=Je.findInOptions(e,t[I],LI(r,I));o>l.distance&&(s=l.closestMatch,a=l.path,o=l.distance,A=l.indexMatch)}else I.toLowerCase().indexOf(g)!==-1&&(A=I),C=Je.levenshteinDistance(e,I),o>C&&(s=I,a=lQ(r),o=C)}return{closestMatch:s,path:a,distance:o,indexMatch:A}}static printLocation(e,t,r=`Problem value found at: 
`){let i=`

`+r+`options = {
`;for(let o=0;o<e.length;o++){for(let s=0;s<o+1;s++)i+="  ";i+=e[o]+`: {
`}for(let o=0;o<e.length+1;o++)i+="  ";i+=t+`
`;for(let o=0;o<e.length+1;o++){for(let s=0;s<e.length-o;s++)i+="  ";i+=`}
`}return i+`

`}static print(e){return JSON.stringify(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;const r=[];let i;for(i=0;i<=t.length;i++)r[i]=[i];let o;for(o=0;o<=e.length;o++)r[0][o]=o;for(i=1;i<=t.length;i++)for(o=1;o<=e.length;o++)t.charAt(i-1)==e.charAt(o-1)?r[i][o]=r[i-1][o-1]:r[i][o]=Math.min(r[i-1][o-1]+1,Math.min(r[i][o-1]+1,r[i-1][o]+1));return r[t.length][e.length]}};const wQ=ii,EQ=mQ,Cs=vS,SQ=yQ,i4=nE,OQ=bQ;var eP={},Zd={},tP;function yS(){if(tP)return Zd;tP=1;var n=at(),e=pH(),t=Dr(),r=li(),i=Qr(),o=Yg();return Zd.f=n&&!e?Object.defineProperties:function(a,g){r(a);for(var A=i(g),I=o(g),C=I.length,l=0,d;C>l;)t.f(a,d=I[l++],A[d]);return a},Zd}var Hd,rP;function TQ(){if(rP)return Hd;rP=1;var n=mr();return Hd=n("document","documentElement"),Hd}var Ud,iP;function wC(){if(iP)return Ud;iP=1;var n=Ks(),e=hC(),t=n("keys");return Ud=function(r){return t[r]||(t[r]=e(r))},Ud}var Yd,nP;function tA(){if(nP)return Yd;nP=1;var n=li(),e=yS(),t=IS(),r=Ug(),i=TQ(),o=cH(),s=wC(),a=">",g="<",A="prototype",I="script",C=s("IE_PROTO"),l=function(){},d=function(c){return g+I+a+c+g+"/"+I+a},u=function(c){c.write(d("")),c.close();var m=c.parentWindow.Object;return c=null,m},h=function(){var c=o("iframe"),m="java"+I+":",v;return c.style.display="none",i.appendChild(c),c.src=String(m),v=c.contentWindow.document,v.open(),v.write(d("document.F=Object")),v.close(),v.F},p,f=function(){try{p=new ActiveXObject("htmlfile")}catch{}f=typeof document<"u"?document.domain&&p?u(p):h():u(p);for(var c=t.length;c--;)delete f[A][t[c]];return f()};return r[C]=!0,Yd=Object.create||function(m,v){var y;return m!==null?(l[A]=n(m),y=new l,l[A]=null,y[C]=m):y=f(),v===void 0?y:e.f(y,v)},Yd}var oP;function _Q(){if(oP)return eP;oP=1;var n=ie(),e=at(),t=tA();return n({target:"Object",stat:!0,sham:!e},{create:t}),eP}var Kd,sP;function PQ(){if(sP)return Kd;sP=1,_Q();var n=Pe(),e=n.Object;return Kd=function(r,i){return e.create(r,i)},Kd}var Xd,aP;function RQ(){if(aP)return Xd;aP=1;var n=PQ();return Xd=n,Xd}var Qd,gP;function xQ(){return gP||(gP=1,Qd=RQ()),Qd}var $Q=xQ(),og=de($Q),AP={},Jd,IP;function ra(){if(IP)return Jd;IP=1;var n=me();return Jd=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){return 1},1)})},Jd}var CP;function DQ(){if(CP)return AP;CP=1;var n=ie(),e=oS(),t=AS().indexOf,r=ra(),i=e([].indexOf),o=!!i&&1/i([1],1,-0)<0,s=o||!r("indexOf");return n({target:"Array",proto:!0,forced:s},{indexOf:function(g){var A=arguments.length>1?arguments[1]:void 0;return o?i(this,g,A)||0:t(this,g,A)}}),AP}var eu,lP;function NQ(){if(lP)return eu;lP=1,DQ();var n=Ft();return eu=n("Array","indexOf"),eu}var tu,dP;function MQ(){if(dP)return tu;dP=1;var n=ut(),e=NQ(),t=Array.prototype;return tu=function(r){var i=r.indexOf;return r===t||n(t,r)&&i===t.indexOf?e:i},tu}var ru,uP;function kQ(){if(uP)return ru;uP=1;var n=MQ();return ru=n,ru}var iu,hP;function FQ(){return hP||(hP=1,iu=kQ()),iu}var BQ=FQ(),Ue=de(BQ),cP={},nu,fP;function bS(){return fP||(fP=1,nu=function(){}),nu}var pP;function qQ(){if(pP)return cP;pP=1;var n=ie(),e=AS().includes,t=me(),r=bS(),i=t(function(){return!Array(1).includes()});return n({target:"Array",proto:!0,forced:i},{includes:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),r("includes"),cP}var ou,vP;function zQ(){if(vP)return ou;vP=1,qQ();var n=Ft();return ou=n("Array","includes"),ou}var mP={},su,yP;function jQ(){if(yP)return su;yP=1;var n=Ot(),e=Ci(),t=ht(),r=t("match");return su=function(i){var o;return n(i)&&((o=i[r])!==void 0?!!o:e(i)==="RegExp")},su}var au,bP;function LQ(){if(bP)return au;bP=1;var n=jQ(),e=TypeError;return au=function(t){if(n(t))throw new e("The method doesn't accept regular expressions");return t},au}var gu,wP;function wS(){if(wP)return gu;wP=1;var n=ht(),e=n("toStringTag"),t={};return t[e]="z",gu=String(t)==="[object z]",gu}var Au,EP;function ia(){if(EP)return Au;EP=1;var n=wS(),e=St(),t=Ci(),r=ht(),i=r("toStringTag"),o=Object,s=t((function(){return arguments})())==="Arguments",a=function(g,A){try{return g[A]}catch{}};return Au=n?t:function(g){var A,I,C;return g===void 0?"Undefined":g===null?"Null":typeof(I=a(A=o(g),i))=="string"?I:s?t(A):(C=t(A))==="Object"&&e(A.callee)?"Arguments":C},Au}var Iu,SP;function Mr(){if(SP)return Iu;SP=1;var n=ia(),e=String;return Iu=function(t){if(n(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},Iu}var Cu,OP;function GQ(){if(OP)return Cu;OP=1;var n=ht(),e=n("match");return Cu=function(t){var r=/./;try{"/./"[t](r)}catch{try{return r[e]=!1,"/./"[t](r)}catch{}}return!1},Cu}var TP;function WQ(){if(TP)return mP;TP=1;var n=ie(),e=ye(),t=LQ(),r=Di(),i=Mr(),o=GQ(),s=e("".indexOf);return n({target:"String",proto:!0,forced:!o("includes")},{includes:function(g){return!!~s(i(r(this)),i(t(g)),arguments.length>1?arguments[1]:void 0)}}),mP}var lu,_P;function VQ(){if(_P)return lu;_P=1,WQ();var n=Ft();return lu=n("String","includes"),lu}var du,PP;function ZQ(){if(PP)return du;PP=1;var n=ut(),e=zQ(),t=VQ(),r=Array.prototype,i=String.prototype;return du=function(o){var s=o.includes;return o===r||n(r,o)&&s===r.includes?e:typeof o=="string"||o===i||n(i,o)&&s===i.includes?t:s},du}var uu,RP;function HQ(){if(RP)return uu;RP=1;var n=ZQ();return uu=n,uu}var hu,xP;function UQ(){return xP||(xP=1,hu=HQ()),hu}var YQ=UQ(),sg=de(YQ),$P={},cu,DP;function Co(){if(DP)return cu;DP=1;var n=Ci();return cu=Array.isArray||function(t){return n(t)==="Array"},cu}var fu,NP;function KQ(){if(NP)return fu;NP=1;var n=at(),e=Co(),t=TypeError,r=Object.getOwnPropertyDescriptor,i=n&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(o){return o instanceof TypeError}})();return fu=i?function(o,s){if(e(o)&&!r(o,"length").writable)throw new t("Cannot set read only .length");return o.length=s}:function(o,s){return o.length=s},fu}var pu,MP;function n4(){if(MP)return pu;MP=1;var n=TypeError,e=9007199254740991;return pu=function(t){if(t>e)throw n("Maximum allowed index exceeded");return t},pu}var vu,kP;function XQ(){if(kP)return vu;kP=1;var n=ye(),e=St(),t=aS(),r=n(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(i){return r(i)}),vu=t.inspectSource,vu}var mu,FP;function o4(){if(FP)return mu;FP=1;var n=ye(),e=me(),t=St(),r=ia(),i=mr(),o=XQ(),s=function(){},a=i("Reflect","construct"),g=/^\s*(?:class|function)\b/,A=n(g.exec),I=!g.test(s),C=function(u){if(!t(u))return!1;try{return a(s,[],u),!0}catch{return!1}},l=function(u){if(!t(u))return!1;switch(r(u)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return I||!!A(g,o(u))}catch{return!0}};return l.sham=!0,mu=!a||e(function(){var d;return C(C.call)||!C(Object)||!C(function(){d=!0})||d})?l:C,mu}var yu,BP;function QQ(){if(BP)return yu;BP=1;var n=Co(),e=o4(),t=Ot(),r=ht(),i=r("species"),o=Array;return yu=function(s){var a;return n(s)&&(a=s.constructor,e(a)&&(a===o||n(a.prototype))?a=void 0:t(a)&&(a=a[i],a===null&&(a=void 0))),a===void 0?o:a},yu}var bu,qP;function ES(){if(qP)return bu;qP=1;var n=QQ();return bu=function(e,t){return new(n(e))(t===0?0:t)},bu}var wu,zP;function EC(){if(zP)return wu;zP=1;var n=at(),e=Dr(),t=Vg();return wu=function(r,i,o){n?e.f(r,i,t(0,o)):r[i]=o},wu}var Eu,jP;function s4(){if(jP)return Eu;jP=1;var n=Us(),e=TypeError;return Eu=function(t,r){if(!delete t[r])throw new e("Cannot delete property "+n(r)+" of "+n(t))},Eu}var Su,LP;function rA(){if(LP)return Su;LP=1;var n=me(),e=ht(),t=Zg(),r=e("species");return Su=function(i){return t>=51||!n(function(){var o=[],s=o.constructor={};return s[r]=function(){return{foo:1}},o[i](Boolean).foo!==1})},Su}var GP;function JQ(){if(GP)return $P;GP=1;var n=ie(),e=$r(),t=pC(),r=Qs(),i=Mi(),o=KQ(),s=n4(),a=ES(),g=EC(),A=s4(),I=rA(),C=I("splice"),l=Math.max,d=Math.min;return n({target:"Array",proto:!0,forced:!C},{splice:function(h,p){var f=e(this),c=i(f),m=t(h,c),v=arguments.length,y,w,S,b,E,O;for(v===0?y=w=0:v===1?(y=0,w=c-m):(y=v-2,w=d(l(r(p),0),c-m)),s(c+y-w),S=a(f,w),b=0;b<w;b++)E=m+b,E in f&&g(S,b,f[E]);if(S.length=w,y<w){for(b=m;b<c-w;b++)E=b+w,O=b+y,E in f?f[O]=f[E]:A(f,O);for(b=c;b>c-w+y;b--)A(f,b-1)}else if(y>w)for(b=c-w;b>m;b--)E=b+w-1,O=b+y-1,E in f?f[O]=f[E]:A(f,O);for(b=0;b<y;b++)f[b+m]=arguments[b+2];return o(f,c-w+y),S}}),$P}var Ou,WP;function e7(){if(WP)return Ou;WP=1,JQ();var n=Ft();return Ou=n("Array","splice"),Ou}var Tu,VP;function t7(){if(VP)return Tu;VP=1;var n=ut(),e=e7(),t=Array.prototype;return Tu=function(r){var i=r.splice;return r===t||n(t,r)&&i===t.splice?e:i},Tu}var _u,ZP;function r7(){if(ZP)return _u;ZP=1;var n=t7();return _u=n,_u}var Pu,HP;function i7(){return HP||(HP=1,Pu=r7()),Pu}var n7=i7(),en=de(n7),UP={},YP;function o7(){if(YP)return UP;YP=1;var n=ie(),e=Co();return n({target:"Array",stat:!0},{isArray:e}),UP}var Ru,KP;function s7(){if(KP)return Ru;KP=1,o7();var n=Pe();return Ru=n.Array.isArray,Ru}var xu,XP;function a7(){if(XP)return xu;XP=1;var n=s7();return xu=n,xu}var $u,QP;function g7(){return QP||(QP=1,$u=a7()),$u}var A7=g7(),Hr=de(A7),JP={},Du,eR;function cn(){if(eR)return Du;eR=1;var n=fC(),e=ye(),t=uC(),r=$r(),i=Mi(),o=ES(),s=e([].push),a=function(g){var A=g===1,I=g===2,C=g===3,l=g===4,d=g===6,u=g===7,h=g===5||d;return function(p,f,c,m){for(var v=r(p),y=t(v),w=i(y),S=n(f,c),b=0,E=m||o,O=A?E(p,w):I||u?E(p,0):void 0,P,_;w>b;b++)if((h||b in y)&&(P=y[b],_=S(P,b,v),g))if(A)O[b]=_;else if(_)switch(g){case 3:return!0;case 5:return P;case 6:return b;case 2:s(O,P)}else switch(g){case 4:return!1;case 7:s(O,P)}return d?-1:C||l?l:O}};return Du={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Du}var Nu,tR;function I7(){if(tR)return Nu;tR=1;var n=cn().forEach,e=ra(),t=e("forEach");return Nu=t?[].forEach:function(i){return n(this,i,arguments.length>1?arguments[1]:void 0)},Nu}var rR;function C7(){if(rR)return JP;rR=1;var n=ie(),e=I7();return n({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),JP}var Mu,iR;function l7(){if(iR)return Mu;iR=1,C7();var n=Ft();return Mu=n("Array","forEach"),Mu}var ku,nR;function d7(){if(nR)return ku;nR=1;var n=l7();return ku=n,ku}var Fu,oR;function u7(){if(oR)return Fu;oR=1;var n=ia(),e=kt(),t=ut(),r=d7(),i=Array.prototype,o={DOMTokenList:!0,NodeList:!0};return Fu=function(s){var a=s.forEach;return s===i||t(i,s)&&a===i.forEach||e(o,n(s))?r:a},Fu}var Bu,sR;function h7(){return sR||(sR=1,Bu=u7()),Bu}var c7=h7(),ze=de(c7);function f7(n){return Yi=n,y7()}var a4={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},SS=og(a4);SS.color="color.color";SS.style="dashes";var Wt={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},aR={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Yi="",_s=0,he="",Ae="",rr=Wt.NULL;function p7(){_s=0,he=Yi.charAt(0)}function bt(){_s++,he=Yi.charAt(_s)}function Bo(){return Yi.charAt(_s+1)}function gR(n){var e=n.charCodeAt(0);return e<47?e===35||e===46:e<59?e>47:e<91?e>64:e<96?e===95:e<123?e>96:!1}function An(n,e){if(n||(n={}),e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function v7(n,e,t){for(var r=e.split("."),i=n;r.length;){var o=r.shift();r.length?(i[o]||(i[o]={}),i=i[o]):i[o]=t}}function g4(n,e){for(var t,r,i=null,o=[n],s=n;s.parent;)o.push(s.parent),s=s.parent;if(s.nodes){for(t=0,r=s.nodes.length;t<r;t++)if(e.id===s.nodes[t].id){i=s.nodes[t];break}}for(i||(i={id:e.id},n.node&&(i.attr=An(i.attr,n.node))),t=o.length-1;t>=0;t--){var a,g=o[t];g.nodes||(g.nodes=[]),Ue(a=g.nodes).call(a,i)===-1&&g.nodes.push(i)}e.attr&&(i.attr=An(i.attr,e.attr))}function m7(n,e){if(n.edges||(n.edges=[]),n.edges.push(e),n.edge){var t=An({},n.edge);e.attr=An(t,e.attr)}}function A4(n,e,t,r,i){var o={from:e,to:t,type:r};return n.edge&&(o.attr=An({},n.edge)),o.attr=An(o.attr||{},i),i!=null&&i.hasOwnProperty("arrows")&&i.arrows!=null&&(o.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),o}function Fe(){for(rr=Wt.NULL,Ae="";he===" "||he==="	"||he===`
`||he==="\r";)bt();do{var n=!1;if(he==="#"){for(var e=_s-1;Yi.charAt(e)===" "||Yi.charAt(e)==="	";)e--;if(Yi.charAt(e)===`
`||Yi.charAt(e)===""){for(;he!=""&&he!=`
`;)bt();n=!0}}if(he==="/"&&Bo()==="/"){for(;he!=""&&he!=`
`;)bt();n=!0}if(he==="/"&&Bo()==="*"){for(;he!="";)if(he==="*"&&Bo()==="/"){bt(),bt();break}else bt();n=!0}for(;he===" "||he==="	"||he===`
`||he==="\r";)bt()}while(n);if(he===""){rr=Wt.DELIMITER;return}var t=he+Bo();if(aR[t]){rr=Wt.DELIMITER,Ae=t,bt(),bt();return}if(aR[he]){rr=Wt.DELIMITER,Ae=he,bt();return}if(gR(he)||he==="-"){for(Ae+=he,bt();gR(he);)Ae+=he,bt();Ae==="false"?Ae=!1:Ae==="true"?Ae=!0:isNaN(Number(Ae))||(Ae=Number(Ae)),rr=Wt.IDENTIFIER;return}if(he==='"'){for(bt();he!=""&&(he!='"'||he==='"'&&Bo()==='"');)he==='"'?(Ae+=he,bt()):he==="\\"&&Bo()==="n"?(Ae+=`
`,bt()):Ae+=he,bt();if(he!='"')throw Vt('End of string " expected');bt(),rr=Wt.IDENTIFIER;return}for(rr=Wt.UNKNOWN;he!="";)Ae+=he,bt();throw new SyntaxError('Syntax error in part "'+d4(Ae,30)+'"')}function y7(){var n={};if(p7(),Fe(),Ae==="strict"&&(n.strict=!0,Fe()),(Ae==="graph"||Ae==="digraph")&&(n.type=Ae,Fe()),rr===Wt.IDENTIFIER&&(n.id=Ae,Fe()),Ae!="{")throw Vt("Angle bracket { expected");if(Fe(),I4(n),Ae!="}")throw Vt("Angle bracket } expected");if(Fe(),Ae!=="")throw Vt("End of file expected");return Fe(),delete n.node,delete n.edge,delete n.graph,n}function I4(n){for(;Ae!==""&&Ae!="}";)b7(n),Ae===";"&&Fe()}function b7(n){var e=C4(n);if(e){l4(n,e);return}var t=w7(n);if(!t){if(rr!=Wt.IDENTIFIER)throw Vt("Identifier expected");var r=Ae;if(Fe(),Ae==="="){if(Fe(),rr!=Wt.IDENTIFIER)throw Vt("Identifier expected");n[r]=Ae,Fe()}else E7(n,r)}}function C4(n){var e=null;if(Ae==="subgraph"&&(e={},e.type="subgraph",Fe(),rr===Wt.IDENTIFIER&&(e.id=Ae,Fe())),Ae==="{"){if(Fe(),e||(e={}),e.parent=n,e.node=n.node,e.edge=n.edge,e.graph=n.graph,I4(e),Ae!="}")throw Vt("Angle bracket } expected");Fe(),delete e.node,delete e.edge,delete e.graph,delete e.parent,n.subgraphs||(n.subgraphs=[]),n.subgraphs.push(e)}return e}function w7(n){return Ae==="node"?(Fe(),n.node=ag(),"node"):Ae==="edge"?(Fe(),n.edge=ag(),"edge"):Ae==="graph"?(Fe(),n.graph=ag(),"graph"):null}function E7(n,e){var t={id:e},r=ag();r&&(t.attr=r),g4(n,t),l4(n,e)}function l4(n,e){for(;Ae==="->"||Ae==="--";){var t,r=Ae;Fe();var i=C4(n);if(i)t=i;else{if(rr!=Wt.IDENTIFIER)throw Vt("Identifier or subgraph expected");t=Ae,g4(n,{id:t}),Fe()}var o=ag(),s=A4(n,e,t,r,o);m7(n,s),e=t}}function ag(){for(var n,e=null,t={dashed:!0,solid:!1,dotted:[1,5]},r={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},i=new Array,o=new Array;Ae==="[";){for(Fe(),e={};Ae!==""&&Ae!="]";){if(rr!=Wt.IDENTIFIER)throw Vt("Attribute name expected");var s=Ae;if(Fe(),Ae!="=")throw Vt("Equal sign = expected");if(Fe(),rr!=Wt.IDENTIFIER)throw Vt("Attribute value expected");var a=Ae;s==="style"&&(a=t[a]);var g;s==="arrowhead"&&(g=r[a],s="arrows",a={to:{enabled:!0,type:g}}),s==="arrowtail"&&(g=r[a],s="arrows",a={from:{enabled:!0,type:g}}),i.push({attr:e,name:s,value:a}),o.push(s),Fe(),Ae==","&&Fe()}if(Ae!="]")throw Vt("Bracket ] expected");Fe()}if(sg(o).call(o,"dir")){var A={};for(A.arrows={},n=0;n<i.length;n++)if(i[n].name==="arrows")if(i[n].value.to!=null)A.arrows.to=n;else if(i[n].value.from!=null)A.arrows.from=n;else throw Vt("Invalid value of arrows");else i[n].name==="dir"&&(A.dir=n);var I=i[A.dir].value;if(!sg(o).call(o,"arrows"))if(I==="both")i.push({attr:i[A.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),A.arrows.to=i.length-1,i.push({attr:i[A.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),A.arrows.from=i.length-1;else if(I==="forward")i.push({attr:i[A.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),A.arrows.to=i.length-1;else if(I==="back")i.push({attr:i[A.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),A.arrows.from=i.length-1;else if(I==="none")i.push({attr:i[A.dir].attr,name:"arrows",value:""}),A.arrows.to=i.length-1;else throw Vt('Invalid dir type "'+I+'"');var C,l;if(I==="both")A.arrows.to&&A.arrows.from?(l=i[A.arrows.to].value.to.type,C=i[A.arrows.from].value.from.type,i[A.arrows.to]={attr:i[A.arrows.to].attr,name:i[A.arrows.to].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}},en(i).call(i,A.arrows.from,1)):A.arrows.to?(l=i[A.arrows.to].value.to.type,C="arrow",i[A.arrows.to]={attr:i[A.arrows.to].attr,name:i[A.arrows.to].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}):A.arrows.from&&(l="arrow",C=i[A.arrows.from].value.from.type,i[A.arrows.from]={attr:i[A.arrows.from].attr,name:i[A.arrows.from].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}});else if(I==="back")A.arrows.to&&A.arrows.from?(l="",C=i[A.arrows.from].value.from.type,i[A.arrows.from]={attr:i[A.arrows.from].attr,name:i[A.arrows.from].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}):A.arrows.to?(l="",C="arrow",A.arrows.from=A.arrows.to,i[A.arrows.from]={attr:i[A.arrows.from].attr,name:i[A.arrows.from].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}):A.arrows.from&&(l="",C=i[A.arrows.from].value.from.type,i[A.arrows.to]={attr:i[A.arrows.from].attr,name:i[A.arrows.from].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}),i[A.arrows.from]={attr:i[A.arrows.from].attr,name:i[A.arrows.from].name,value:{from:{enabled:!0,type:i[A.arrows.from].value.from.type}}};else if(I==="none"){var d;A.arrows.to?d=A.arrows.to:d=A.arrows.from,i[d]={attr:i[d].attr,name:i[d].name,value:""}}else if(I==="forward")A.arrows.to&&A.arrows.from?(l=i[A.arrows.to].value.to.type,C="",i[A.arrows.to]={attr:i[A.arrows.to].attr,name:i[A.arrows.to].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}):A.arrows.to?(l=i[A.arrows.to].value.to.type,C="",i[A.arrows.to]={attr:i[A.arrows.to].attr,name:i[A.arrows.to].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}):A.arrows.from&&(l="arrow",C="",A.arrows.to=A.arrows.from,i[A.arrows.to]={attr:i[A.arrows.to].attr,name:i[A.arrows.to].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}),i[A.arrows.to]={attr:i[A.arrows.to].attr,name:i[A.arrows.to].name,value:{to:{enabled:!0,type:i[A.arrows.to].value.to.type}}};else throw Vt('Invalid dir type "'+I+'"');en(i).call(i,A.dir,1)}var u;if(sg(o).call(o,"penwidth")){var h=[];for(u=i.length,n=0;n<u;n++)i[n].name!=="width"&&(i[n].name==="penwidth"&&(i[n].name="width"),h.push(i[n]));i=h}for(u=i.length,n=0;n<u;n++)v7(i[n].attr,i[n].name,i[n].value);return e}function Vt(n){return new SyntaxError(n+', got "'+d4(Ae,30)+'" (char '+_s+")")}function d4(n,e){return n.length<=e?n:n.substr(0,27)+"..."}function S7(n,e,t){Hr(n)?ze(n).call(n,function(r){Hr(e)?ze(e).call(e,function(i){t(r,i)}):t(r,e)}):Hr(e)?ze(e).call(e,function(r){t(n,r)}):t(n,e)}function qu(n,e,t){for(var r=e.split("."),i=r.pop(),o=n,s=0;s<r.length;s++){var a=r[s];a in o||(o[a]={}),o=o[a]}return o[i]=t,n}function AR(n,e){var t={};for(var r in n)if(n.hasOwnProperty(r)){var i=e[r];Hr(i)?ze(i).call(i,function(o){qu(t,o,n[r])}):typeof i=="string"?qu(t,i,n[r]):qu(t,r,n[r])}return t}function O7(n){var e=f7(n),t={nodes:[],edges:[],options:{}};if(e.nodes){var r;ze(r=e.nodes).call(r,function(s){var a={id:s.id,label:String(s.label||s.id)};An(a,AR(s.attr,a4)),a.image&&(a.shape="image"),t.nodes.push(a)})}if(e.edges){var i,o=function(s){var a={from:s.from,to:s.to};return An(a,AR(s.attr,SS)),a.arrows==null&&s.type==="->"&&(a.arrows="to"),a};ze(i=e.edges).call(i,function(s){var a,g;if(s.from instanceof Object?a=s.from.nodes:a={id:s.from},s.to instanceof Object?g=s.to.nodes:g={id:s.to},s.from instanceof Object&&s.from.edges){var A;ze(A=s.from.edges).call(A,function(C){var l=o(C);t.edges.push(l)})}if(S7(a,g,function(C,l){var d=A4(t,C.id,l.id,s.type,s.attr),u=o(d);t.edges.push(u)}),s.to instanceof Object&&s.to.edges){var I;ze(I=s.to.edges).call(I,function(C){var l=o(C);t.edges.push(l)})}})}return e.attr&&(t.options=e.attr),t}var IR={},CR;function T7(){if(CR)return IR;CR=1;var n=ie(),e=cn().map,t=rA(),r=t("map");return n({target:"Array",proto:!0,forced:!r},{map:function(o){return e(this,o,arguments.length>1?arguments[1]:void 0)}}),IR}var zu,lR;function _7(){if(lR)return zu;lR=1,T7();var n=Ft();return zu=n("Array","map"),zu}var ju,dR;function P7(){if(dR)return ju;dR=1;var n=ut(),e=_7(),t=Array.prototype;return ju=function(r){var i=r.map;return r===t||n(t,r)&&i===t.map?e:i},ju}var Lu,uR;function R7(){if(uR)return Lu;uR=1;var n=P7();return Lu=n,Lu}var Gu,hR;function x7(){return hR||(hR=1,Gu=R7()),Gu}var $7=x7(),Og=de($7);function D7(n,e){var t;const r={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};e!=null&&(e.fixed!=null&&(r.nodes.fixed=e.fixed),e.parseColor!=null&&(r.nodes.parseColor=e.parseColor),e.inheritColor!=null&&(r.edges.inheritColor=e.inheritColor));const i=n.edges,o=Og(i).call(i,a=>{const g={from:a.source,id:a.id,to:a.target};return a.attributes!=null&&(g.attributes=a.attributes),a.label!=null&&(g.label=a.label),a.attributes!=null&&a.attributes.title!=null&&(g.title=a.attributes.title),a.type==="Directed"&&(g.arrows="to"),a.color&&r.edges.inheritColor===!1&&(g.color=a.color),g});return{nodes:Og(t=n.nodes).call(t,a=>{const g={id:a.id,fixed:r.nodes.fixed&&a.x!=null&&a.y!=null};return a.attributes!=null&&(g.attributes=a.attributes),a.label!=null&&(g.label=a.label),a.size!=null&&(g.size=a.size),a.attributes!=null&&a.attributes.title!=null&&(g.title=a.attributes.title),a.title!=null&&(g.title=a.title),a.x!=null&&(g.x=a.x),a.y!=null&&(g.y=a.y),a.color!=null&&(r.nodes.parseColor===!0?g.color=a.color:g.color={background:a.color,border:a.color,highlight:{background:a.color,border:a.color},hover:{background:a.color,border:a.color}}),g}),edges:o}}const N7={addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},M7={addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},k7={addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},F7={addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},B7={addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},q7={addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},z7={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},j7={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},L7={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},G7={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},W7={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"};var V7=Object.freeze({__proto__:null,cn:j7,cs:W7,de:M7,en:N7,es:k7,fr:G7,it:F7,nl:B7,pt:q7,ru:z7,uk:L7}),cR={},fR;function u4(){if(fR)return cR;fR=1;var n=ie(),e=me(),t=Co(),r=Ot(),i=$r(),o=Mi(),s=n4(),a=EC(),g=ES(),A=rA(),I=ht(),C=Zg(),l=I("isConcatSpreadable"),d=C>=51||!e(function(){var p=[];return p[l]=!1,p.concat()[0]!==p}),u=function(p){if(!r(p))return!1;var f=p[l];return f!==void 0?!!f:t(p)},h=!d||!A("concat");return n({target:"Array",proto:!0,arity:1,forced:h},{concat:function(f){var c=i(this),m=g(c,0),v=0,y,w,S,b,E;for(y=-1,S=arguments.length;y<S;y++)if(E=y===-1?c:arguments[y],u(E))for(b=o(E),s(v+b),w=0;w<b;w++,v++)w in E&&a(m,v,E[w]);else s(v+1),a(m,v++,E);return m.length=v,m}}),cR}var Wu,pR;function Z7(){if(pR)return Wu;pR=1,u4();var n=Ft();return Wu=n("Array","concat"),Wu}var Vu,vR;function H7(){if(vR)return Vu;vR=1;var n=ut(),e=Z7(),t=Array.prototype;return Vu=function(r){var i=r.concat;return r===t||n(t,r)&&i===t.concat?e:i},Vu}var Zu,mR;function U7(){if(mR)return Zu;mR=1;var n=H7();return Zu=n,Zu}var Hu,yR;function Y7(){return yR||(yR=1,Hu=U7()),Hu}var K7=Y7(),X7=de(K7);function Q7(n,e){try{const[r,i]=e.split(/[-_ /]/,2),o=r!=null?r.toLowerCase():null,s=i!=null?i.toUpperCase():null;if(o&&s){const a=o+"-"+s;if(Object.prototype.hasOwnProperty.call(n,a))return a;var t;console.warn(X7(t="Unknown variant ".concat(s," of language ")).call(t,o,"."))}if(o){const a=o;if(Object.prototype.hasOwnProperty.call(n,a))return a;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(e,", falling back to English.")),"en"}catch(r){return console.error(r),console.warn("Unexpected error while normalizing locale ".concat(e,", falling back to English.")),"en"}}let J7=class{constructor(){this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}init(){if(this.initialized())return;this.src=this.image.src;const e=this.image.width,t=this.image.height;this.width=e,this.height=t;const r=Math.floor(t/2),i=Math.floor(t/4),o=Math.floor(t/8),s=Math.floor(t/16),a=Math.floor(e/2),g=Math.floor(e/4),A=Math.floor(e/8),I=Math.floor(e/16);this.canvas.width=3*g,this.canvas.height=r,this.coordinates=[[0,0,a,r],[a,0,g,i],[a,i,A,o],[5*A,i,I,s]],this._fillMipMap()}initialized(){return this.coordinates!==void 0}_fillMipMap(){const e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(let r=1;r<this.NUM_ITERATIONS;r++){const i=this.coordinates[r-1],o=this.coordinates[r];e.drawImage(this.canvas,i[0],i[1],i[2],i[3],o[0],o[1],o[2],o[3])}}drawImageAtPosition(e,t,r,i,o,s){if(this.initialized())if(t>2){t*=.5;let a=0;for(;t>2&&a<this.NUM_ITERATIONS;)t*=.5,a+=1;a>=this.NUM_ITERATIONS&&(a=this.NUM_ITERATIONS-1);const g=this.coordinates[a];e.drawImage(this.canvas,g[0],g[1],g[2],g[3],r,i,o,s)}else e.drawImage(this.image,r,i,o,s)}},eJ=class{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,t,r){if(!(e===void 0||r===void 0)){if(t===void 0){console.warn("No broken url image defined");return}r.image.onerror=()=>{console.error("Could not load brokenImage:",t)},r.image.src=t}}_redrawWithImage(e){this.callback&&this.callback(e)}load(e,t){const r=this.images[e];if(r)return r;const i=new J7;return this.images[e]=i,i.image.onload=()=>{this._fixImageCoordinates(i.image),i.init(),this._redrawWithImage(i)},i.image.onerror=()=>{console.error("Could not load image:",e),this._tryloadBrokenUrl(e,t,i)},i.image.src=e,i}_fixImageCoordinates(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}};var Uu,bR;function na(){return bR||(bR=1,Uu={}),Uu}var Yu,wR;function h4(){if(wR)return Yu;wR=1;var n=We(),e=St(),t=n.WeakMap;return Yu=e(t)&&/native code/.test(String(t)),Yu}var Ku,ER;function lo(){if(ER)return Ku;ER=1;var n=h4(),e=We(),t=Ot(),r=Xs(),i=kt(),o=aS(),s=wC(),a=Ug(),g="Object already initialized",A=e.TypeError,I=e.WeakMap,C,l,d,u=function(c){return d(c)?l(c):C(c,{})},h=function(c){return function(m){var v;if(!t(m)||(v=l(m)).type!==c)throw new A("Incompatible receiver, "+c+" required");return v}};if(n||o.state){var p=o.state||(o.state=new I);p.get=p.get,p.has=p.has,p.set=p.set,C=function(c,m){if(p.has(c))throw new A(g);return m.facade=c,p.set(c,m),m},l=function(c){return p.get(c)||{}},d=function(c){return p.has(c)}}else{var f=s("state");a[f]=!0,C=function(c,m){if(i(c,f))throw new A(g);return m.facade=c,r(c,f,m),m},l=function(c){return i(c,f)?c[f]:{}},d=function(c){return i(c,f)}}return Ku={set:C,get:l,has:d,enforce:u,getterFor:h},Ku}var Xu,SR;function tJ(){if(SR)return Xu;SR=1;var n=at(),e=kt(),t=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,i=e(t,"name"),o=i&&(function(){}).name==="something",s=i&&(!n||n&&r(t,"name").configurable);return Xu={EXISTS:i,PROPER:o,CONFIGURABLE:s},Xu}var Qu,OR;function rJ(){if(OR)return Qu;OR=1;var n=me();return Qu=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Qu}var Ju,TR;function OS(){if(TR)return Ju;TR=1;var n=kt(),e=St(),t=$r(),r=wC(),i=rJ(),o=r("IE_PROTO"),s=Object,a=s.prototype;return Ju=i?s.getPrototypeOf:function(g){var A=t(g);if(n(A,o))return A[o];var I=A.constructor;return e(I)&&A instanceof I?I.prototype:A instanceof s?a:null},Ju}var eh,_R;function iA(){if(_R)return eh;_R=1;var n=Xs();return eh=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e},eh}var th,PR;function c4(){if(PR)return th;PR=1;var n=me(),e=St(),t=Ot(),r=tA(),i=OS(),o=iA(),s=ht(),a=Ys(),g=s("iterator"),A=!1,I,C,l;[].keys&&(l=[].keys(),"next"in l?(C=i(i(l)),C!==Object.prototype&&(I=C)):A=!0);var d=!t(I)||n(function(){var u={};return I[g].call(u)!==u});return d?I={}:a&&(I=r(I)),e(I[g])||o(I,g,function(){return this}),th={IteratorPrototype:I,BUGGY_SAFARI_ITERATORS:A},th}var rh,RR;function iJ(){if(RR)return rh;RR=1;var n=wS(),e=ia();return rh=n?{}.toString:function(){return"[object "+e(this)+"]"},rh}var ih,xR;function uo(){if(xR)return ih;xR=1;var n=wS(),e=Dr().f,t=Xs(),r=kt(),i=iJ(),o=ht(),s=o("toStringTag");return ih=function(a,g,A,I){var C=A?a:a&&a.prototype;C&&(r(C,s)||e(C,s,{configurable:!0,value:g}),I&&!n&&t(C,"toString",i))},ih}var nh,$R;function nJ(){if($R)return nh;$R=1;var n=c4().IteratorPrototype,e=tA(),t=Vg(),r=uo(),i=na(),o=function(){return this};return nh=function(s,a,g,A){var I=a+" Iterator";return s.prototype=e(n,{next:t(+!A,g)}),r(s,I,!1,!0),i[I]=o,s},nh}var oh,DR;function oJ(){if(DR)return oh;DR=1;var n=ye(),e=Ni();return oh=function(t,r,i){try{return n(e(Object.getOwnPropertyDescriptor(t,r)[i]))}catch{}},oh}var sh,NR;function sJ(){if(NR)return sh;NR=1;var n=Ot();return sh=function(e){return n(e)||e===null},sh}var ah,MR;function aJ(){if(MR)return ah;MR=1;var n=sJ(),e=String,t=TypeError;return ah=function(r){if(n(r))return r;throw new t("Can't set "+e(r)+" as a prototype")},ah}var gh,kR;function gJ(){if(kR)return gh;kR=1;var n=oJ(),e=Ot(),t=Di(),r=aJ();return gh=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,o={},s;try{s=n(Object.prototype,"__proto__","set"),s(o,[]),i=o instanceof Array}catch{}return function(g,A){return t(g),r(A),e(g)&&(i?s(g,A):g.__proto__=A),g}})():void 0),gh}var Ah,FR;function TS(){if(FR)return Ah;FR=1;var n=ie(),e=Ir(),t=Ys(),r=tJ(),i=St(),o=nJ(),s=OS(),a=gJ(),g=uo(),A=Xs(),I=iA(),C=ht(),l=na(),d=c4(),u=r.PROPER,h=r.CONFIGURABLE,p=d.IteratorPrototype,f=d.BUGGY_SAFARI_ITERATORS,c=C("iterator"),m="keys",v="values",y="entries",w=function(){return this};return Ah=function(S,b,E,O,P,_,T){o(E,b,O);var R=function($e){if($e===P&&te)return te;if(!f&&$e&&$e in B)return B[$e];switch($e){case m:return function(){return new E(this,$e)};case v:return function(){return new E(this,$e)};case y:return function(){return new E(this,$e)}}return function(){return new E(this)}},D=b+" Iterator",G=!1,B=S.prototype,Q=B[c]||B["@@iterator"]||P&&B[P],te=!f&&Q||R(P),le=b==="Array"&&B.entries||Q,U,fe,xe;if(le&&(U=s(le.call(new S)),U!==Object.prototype&&U.next&&(!t&&s(U)!==p&&(a?a(U,p):i(U[c])||I(U,c,w)),g(U,D,!0,!0),t&&(l[D]=w))),u&&P===v&&Q&&Q.name!==v&&(!t&&h?A(B,"name",v):(G=!0,te=function(){return e(Q,this)})),P)if(fe={values:R(v),keys:_?te:R(m),entries:R(y)},T)for(xe in fe)(f||G||!(xe in B))&&I(B,xe,fe[xe]);else n({target:b,proto:!0,forced:f||G},fe);return(!t||T)&&B[c]!==te&&I(B,c,te,{name:P}),l[b]=te,fe},Ah}var Ih,BR;function _S(){return BR||(BR=1,Ih=function(n,e){return{value:n,done:e}}),Ih}var Ch,qR;function oa(){if(qR)return Ch;qR=1;var n=Qr(),e=bS(),t=na(),r=lo(),i=Dr().f,o=TS(),s=_S(),a=Ys(),g=at(),A="Array Iterator",I=r.set,C=r.getterFor(A);Ch=o(Array,"Array",function(d,u){I(this,{type:A,target:n(d),index:0,kind:u})},function(){var d=C(this),u=d.target,h=d.index++;if(!u||h>=u.length)return d.target=null,s(void 0,!0);switch(d.kind){case"keys":return s(h,!1);case"values":return s(u[h],!1)}return s([h,u[h]],!1)},"values");var l=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&g&&l.name!=="values")try{i(l,"name",{value:"values"})}catch{}return Ch}var zR={},jR={},lh={exports:{}},dh={},LR;function SC(){if(LR)return dh;LR=1;var n=mH(),e=IS(),t=e.concat("length","prototype");return dh.f=Object.getOwnPropertyNames||function(i){return n(i,t)},dh}var uh={},GR;function PS(){if(GR)return uh;GR=1;var n=Ci(),e=Qr(),t=SC().f,r=Js(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(s){try{return t(s)}catch{return r(i)}};return uh.f=function(a){return i&&n(a)==="Window"?o(a):t(e(a))},uh}var hh,WR;function AJ(){if(WR)return hh;WR=1;var n=me();return hh=n(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),hh}var ch,VR;function IJ(){if(VR)return ch;VR=1;var n=me(),e=Ot(),t=Ci(),r=AJ(),i=Object.isExtensible,o=n(function(){});return ch=o||r?function(a){return!e(a)||r&&t(a)==="ArrayBuffer"?!1:i?i(a):!0}:i,ch}var fh,ZR;function f4(){if(ZR)return fh;ZR=1;var n=me();return fh=!n(function(){return Object.isExtensible(Object.preventExtensions({}))}),fh}var HR;function OC(){if(HR)return lh.exports;HR=1;var n=ie(),e=ye(),t=Ug(),r=Ot(),i=kt(),o=Dr().f,s=SC(),a=PS(),g=IJ(),A=hC(),I=f4(),C=!1,l=A("meta"),d=0,u=function(v){o(v,l,{value:{objectID:"O"+d++,weakData:{}}})},h=function(v,y){if(!r(v))return typeof v=="symbol"?v:(typeof v=="string"?"S":"P")+v;if(!i(v,l)){if(!g(v))return"F";if(!y)return"E";u(v)}return v[l].objectID},p=function(v,y){if(!i(v,l)){if(!g(v))return!0;if(!y)return!1;u(v)}return v[l].weakData},f=function(v){return I&&C&&g(v)&&!i(v,l)&&u(v),v},c=function(){m.enable=function(){},C=!0;var v=s.f,y=e([].splice),w={};w[l]=1,v(w).length&&(s.f=function(S){for(var b=v(S),E=0,O=b.length;E<O;E++)if(b[E]===l){y(b,E,1);break}return b},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},m=lh.exports={enable:c,fastKey:h,getWeakData:p,onFreeze:f};return t[l]=!0,lh.exports}var ph,UR;function CJ(){if(UR)return ph;UR=1;var n=ht(),e=na(),t=n("iterator"),r=Array.prototype;return ph=function(i){return i!==void 0&&(e.Array===i||r[t]===i)},ph}var vh,YR;function p4(){if(YR)return vh;YR=1;var n=ia(),e=sS(),t=Vs(),r=na(),i=ht(),o=i("iterator");return vh=function(s){if(!t(s))return e(s,o)||e(s,"@@iterator")||r[n(s)]},vh}var mh,KR;function lJ(){if(KR)return mh;KR=1;var n=Ir(),e=Ni(),t=li(),r=Us(),i=p4(),o=TypeError;return mh=function(s,a){var g=arguments.length<2?i(s):a;if(e(g))return t(n(g,s));throw new o(r(s)+" is not iterable")},mh}var yh,XR;function RS(){if(XR)return yh;XR=1;var n=Ir(),e=li(),t=sS();return yh=function(r,i,o){var s,a;e(r);try{if(s=t(r,"return"),!s){if(i==="throw")throw o;return o}s=n(s,r)}catch(g){a=!0,s=g}if(i==="throw")throw o;if(a)throw s;return e(s),o},yh}var bh,QR;function TC(){if(QR)return bh;QR=1;var n=fC(),e=Ir(),t=li(),r=Us(),i=CJ(),o=Mi(),s=ut(),a=lJ(),g=p4(),A=RS(),I=TypeError,C=function(d,u){this.stopped=d,this.result=u},l=C.prototype;return bh=function(d,u,h){var p=h&&h.that,f=!!(h&&h.AS_ENTRIES),c=!!(h&&h.IS_RECORD),m=!!(h&&h.IS_ITERATOR),v=!!(h&&h.INTERRUPTED),y=n(u,p),w,S,b,E,O,P,_,T=function(D){return w&&A(w,"normal"),new C(!0,D)},R=function(D){return f?(t(D),v?y(D[0],D[1],T):y(D[0],D[1])):v?y(D,T):y(D)};if(c)w=d.iterator;else if(m)w=d;else{if(S=g(d),!S)throw new I(r(d)+" is not iterable");if(i(S)){for(b=0,E=o(d);E>b;b++)if(O=R(d[b]),O&&s(l,O))return O;return new C(!1)}w=a(d,S)}for(P=c?d.next:w.next;!(_=e(P,w)).done;){try{O=R(_.value)}catch(D){A(w,"throw",D)}if(typeof O=="object"&&O&&s(l,O))return O}return new C(!1)},bh}var wh,JR;function xS(){if(JR)return wh;JR=1;var n=ut(),e=TypeError;return wh=function(t,r){if(n(r,t))return t;throw new e("Incorrect invocation")},wh}var Eh,ex;function $S(){if(ex)return Eh;ex=1;var n=ie(),e=We(),t=OC(),r=me(),i=Xs(),o=TC(),s=xS(),a=St(),g=Ot(),A=Vs(),I=uo(),C=Dr().f,l=cn().forEach,d=at(),u=lo(),h=u.set,p=u.getterFor;return Eh=function(f,c,m){var v=f.indexOf("Map")!==-1,y=f.indexOf("Weak")!==-1,w=v?"set":"add",S=e[f],b=S&&S.prototype,E={},O;if(!d||!a(S)||!(y||b.forEach&&!r(function(){new S().entries().next()})))O=m.getConstructor(c,f,v,w),t.enable();else{O=c(function(T,R){h(s(T,P),{type:f,collection:new S}),A(R)||o(R,T[w],{that:T,AS_ENTRIES:v})});var P=O.prototype,_=p(f);l(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(T){var R=T==="add"||T==="set";T in b&&!(y&&T==="clear")&&i(P,T,function(D,G){var B=_(this).collection;if(!R&&y&&!g(D))return T==="get"?void 0:!1;var Q=B[T](D===0?0:D,G);return R?this:Q})}),y||C(P,"size",{configurable:!0,get:function(){return _(this).collection.size}})}return I(O,f,!1,!0),E[f]=O,n({global:!0,forced:!0},E),y||m.setStrong(O,f,v),O},Eh}var Sh,tx;function DS(){if(tx)return Sh;tx=1;var n=Dr();return Sh=function(e,t,r){return n.f(e,t,r)},Sh}var Oh,rx;function NS(){if(rx)return Oh;rx=1;var n=iA();return Oh=function(e,t,r){for(var i in t)r&&r.unsafe&&e[i]?e[i]=t[i]:n(e,i,t[i],r);return e},Oh}var Th,ix;function dJ(){if(ix)return Th;ix=1;var n=mr(),e=DS(),t=ht(),r=at(),i=t("species");return Th=function(o){var s=n(o);r&&s&&!s[i]&&e(s,i,{configurable:!0,get:function(){return this}})},Th}var _h,nx;function v4(){if(nx)return _h;nx=1;var n=tA(),e=DS(),t=NS(),r=fC(),i=xS(),o=Vs(),s=TC(),a=TS(),g=_S(),A=dJ(),I=at(),C=OC().fastKey,l=lo(),d=l.set,u=l.getterFor;return _h={getConstructor:function(h,p,f,c){var m=h(function(b,E){i(b,v),d(b,{type:p,index:n(null),first:null,last:null,size:0}),I||(b.size=0),o(E)||s(E,b[c],{that:b,AS_ENTRIES:f})}),v=m.prototype,y=u(p),w=function(b,E,O){var P=y(b),_=S(b,E),T,R;return _?_.value=O:(P.last=_={index:R=C(E,!0),key:E,value:O,previous:T=P.last,next:null,removed:!1},P.first||(P.first=_),T&&(T.next=_),I?P.size++:b.size++,R!=="F"&&(P.index[R]=_)),b},S=function(b,E){var O=y(b),P=C(E),_;if(P!=="F")return O.index[P];for(_=O.first;_;_=_.next)if(_.key===E)return _};return t(v,{clear:function(){for(var E=this,O=y(E),P=O.first;P;)P.removed=!0,P.previous&&(P.previous=P.previous.next=null),P=P.next;O.first=O.last=null,O.index=n(null),I?O.size=0:E.size=0},delete:function(b){var E=this,O=y(E),P=S(E,b);if(P){var _=P.next,T=P.previous;delete O.index[P.index],P.removed=!0,T&&(T.next=_),_&&(_.previous=T),O.first===P&&(O.first=_),O.last===P&&(O.last=T),I?O.size--:E.size--}return!!P},forEach:function(E){for(var O=y(this),P=r(E,arguments.length>1?arguments[1]:void 0),_;_=_?_.next:O.first;)for(P(_.value,_.key,this);_&&_.removed;)_=_.previous},has:function(E){return!!S(this,E)}}),t(v,f?{get:function(E){var O=S(this,E);return O&&O.value},set:function(E,O){return w(this,E===0?0:E,O)}}:{add:function(E){return w(this,E=E===0?0:E,E)}}),I&&e(v,"size",{configurable:!0,get:function(){return y(this).size}}),m},setStrong:function(h,p,f){var c=p+" Iterator",m=u(p),v=u(c);a(h,p,function(y,w){d(this,{type:c,target:y,state:m(y),kind:w,last:null})},function(){for(var y=v(this),w=y.kind,S=y.last;S&&S.removed;)S=S.previous;return!y.target||!(y.last=S=S?S.next:y.state.first)?(y.target=null,g(void 0,!0)):g(w==="keys"?S.key:w==="values"?S.value:[S.key,S.value],!1)},f?"entries":"values",!f,!0),A(p)}},_h}var ox;function uJ(){if(ox)return jR;ox=1;var n=$S(),e=v4();return n("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),jR}var sx;function hJ(){return sx||(sx=1,uJ()),zR}var ax={},Ph,gx;function m4(){return gx||(gx=1,Ph=function(n,e){return e===1?function(t,r){return t[n](r)}:function(t,r,i){return t[n](r,i)}}),Ph}var Rh,Ax;function cJ(){if(Ax)return Rh;Ax=1;var n=mr(),e=m4(),t=n("Map");return Rh={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},Rh}var Ix;function fJ(){if(Ix)return ax;Ix=1;var n=ie(),e=ye(),t=Ni(),r=Di(),i=TC(),o=cJ(),s=Ys(),a=me(),g=o.Map,A=o.has,I=o.get,C=o.set,l=e([].push),d=s||a(function(){return g.groupBy("ab",function(u){return u}).get("a").length!==1});return n({target:"Map",stat:!0,forced:s||d},{groupBy:function(h,p){r(h),t(p);var f=new g,c=0;return i(h,function(m){var v=p(m,c++);A(f,v)?l(I(f,v),m):C(f,v,[m])}),f}}),ax}var Cx={},xh,lx;function pJ(){if(lx)return xh;lx=1;var n=ye(),e=Qs(),t=Mr(),r=Di(),i=n("".charAt),o=n("".charCodeAt),s=n("".slice),a=function(g){return function(A,I){var C=t(r(A)),l=e(I),d=C.length,u,h;return l<0||l>=d?g?"":void 0:(u=o(C,l),u<55296||u>56319||l+1===d||(h=o(C,l+1))<56320||h>57343?g?i(C,l):u:g?s(C,l,l+2):(u-55296<<10)+(h-56320)+65536)}};return xh={codeAt:a(!1),charAt:a(!0)},xh}var dx;function MS(){if(dx)return Cx;dx=1;var n=pJ().charAt,e=Mr(),t=lo(),r=TS(),i=_S(),o="String Iterator",s=t.set,a=t.getterFor(o);return r(String,"String",function(g){s(this,{type:o,string:e(g),index:0})},function(){var A=a(this),I=A.string,C=A.index,l;return C>=I.length?i(void 0,!0):(l=n(I,C),A.index+=l.length,i(l,!1))}),Cx}var $h,ux;function vJ(){if(ux)return $h;ux=1,oa(),hJ(),fJ(),MS();var n=Pe();return $h=n.Map,$h}var hx={},Dh,cx;function mJ(){return cx||(cx=1,Dh={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),Dh}var fx;function sa(){if(fx)return hx;fx=1,oa();var n=mJ(),e=We(),t=uo(),r=na();for(var i in n)t(e[i],i),r[i]=r.Array;return hx}var Nh,px;function yJ(){if(px)return Nh;px=1;var n=vJ();return sa(),Nh=n,Nh}var Mh,vx;function bJ(){return vx||(vx=1,Mh=yJ()),Mh}var wJ=bJ(),kS=de(wJ);let EJ=class{constructor(){this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},Nt(this.options,this.defaultOptions)}setOptions(e){const t=["useDefaultGroups"];if(e!==void 0){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&Ue(t).call(t,r)===-1){const i=e[r];this.add(r,i)}}}clear(){this._groups=new kS,this._groupNames=[]}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this._groups.get(e);if(r===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){const i=this._groupIndex%this._groupNames.length;++this._groupIndex,r={},r.color=this._groups.get(this._groupNames[i]),this._groups.set(e,r)}else{const i=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,r={},r.color=this._defaultGroups[i],this._groups.set(e,r)}return r}add(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}};var mx={},yx;function SJ(){if(yx)return mx;yx=1;var n=ie();return n({target:"Number",stat:!0},{isNaN:function(t){return t!==t}}),mx}var kh,bx;function OJ(){if(bx)return kh;bx=1,SJ();var n=Pe();return kh=n.Number.isNaN,kh}var Fh,wx;function TJ(){if(wx)return Fh;wx=1;var n=OJ();return Fh=n,Fh}var Bh,Ex;function _J(){return Ex||(Ex=1,Bh=TJ()),Bh}var PJ=_J(),oE=de(PJ),Sx={},qh,Ox;function RJ(){if(Ox)return qh;Ox=1;var n=We(),e=n.isFinite;return qh=Number.isFinite||function(r){return typeof r=="number"&&e(r)},qh}var Tx;function xJ(){if(Tx)return Sx;Tx=1;var n=ie(),e=RJ();return n({target:"Number",stat:!0},{isFinite:e}),Sx}var zh,_x;function $J(){if(_x)return zh;_x=1,xJ();var n=Pe();return zh=n.Number.isFinite,zh}var jh,Px;function DJ(){if(Px)return jh;Px=1;var n=$J();return jh=n,jh}var Lh,Rx;function NJ(){return Rx||(Rx=1,Lh=DJ()),Lh}var MJ=NJ(),Fn=de(MJ),xx={},$x;function kJ(){if($x)return xx;$x=1;var n=ie(),e=$r(),t=Yg(),r=me(),i=r(function(){t(1)});return n({target:"Object",stat:!0,forced:i},{keys:function(s){return t(e(s))}}),xx}var Gh,Dx;function FJ(){if(Dx)return Gh;Dx=1,kJ();var n=Pe();return Gh=n.Object.keys,Gh}var Wh,Nx;function BJ(){if(Nx)return Wh;Nx=1;var n=FJ();return Wh=n,Wh}var Vh,Mx;function qJ(){return Mx||(Mx=1,Vh=BJ()),Vh}var zJ=qJ(),At=de(zJ),kx={},Fx;function jJ(){if(Fx)return kx;Fx=1;var n=ie(),e=cn().some,t=ra(),r=t("some");return n({target:"Array",proto:!0,forced:!r},{some:function(o){return e(this,o,arguments.length>1?arguments[1]:void 0)}}),kx}var Zh,Bx;function LJ(){if(Bx)return Zh;Bx=1,jJ();var n=Ft();return Zh=n("Array","some"),Zh}var Hh,qx;function GJ(){if(qx)return Hh;qx=1;var n=ut(),e=LJ(),t=Array.prototype;return Hh=function(r){var i=r.some;return r===t||n(t,r)&&i===t.some?e:i},Hh}var Uh,zx;function WJ(){if(zx)return Uh;zx=1;var n=GJ();return Uh=n,Uh}var Yh,jx;function VJ(){return jx||(jx=1,Yh=WJ()),Yh}var ZJ=VJ(),HJ=de(ZJ),Lx={},Gx={},Kh,Wx;function y4(){if(Wx)return Kh;Wx=1;var n=We(),e=Zs(),t=Ci(),r=function(i){return e.slice(0,i.length)===i};return Kh=(function(){return r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":n.Bun&&typeof Bun.version=="string"?"BUN":n.Deno&&typeof Deno.version=="object"?"DENO":t(n.process)==="process"?"NODE":n.window&&n.document?"BROWSER":"REST"})(),Kh}var Xh,Vx;function UJ(){if(Vx)return Xh;Vx=1;var n=TypeError;return Xh=function(e,t){if(e<t)throw new n("Not enough arguments");return e},Xh}var Qh,Zx;function b4(){if(Zx)return Qh;Zx=1;var n=We(),e=lC(),t=St(),r=y4(),i=Zs(),o=Js(),s=UJ(),a=n.Function,g=/MSIE .\./.test(i)||r==="BUN"&&(function(){var A=n.Bun.version.split(".");return A.length<3||A[0]==="0"&&(A[1]<3||A[1]==="3"&&A[2]==="0")})();return Qh=function(A,I){var C=I?2:1;return g?function(l,d){var u=s(arguments.length,1)>C,h=t(l)?l:a(l),p=u?o(arguments,C):[],f=u?function(){e(h,this,p)}:h;return I?A(f,d):A(f)}:A},Qh}var Hx;function YJ(){if(Hx)return Gx;Hx=1;var n=ie(),e=We(),t=b4(),r=t(e.setInterval,!0);return n({global:!0,bind:!0,forced:e.setInterval!==r},{setInterval:r}),Gx}var Ux={},Yx;function KJ(){if(Yx)return Ux;Yx=1;var n=ie(),e=We(),t=b4(),r=t(e.setTimeout,!0);return n({global:!0,bind:!0,forced:e.setTimeout!==r},{setTimeout:r}),Ux}var Kx;function w4(){return Kx||(Kx=1,YJ(),KJ()),Lx}var Jh,Xx;function XJ(){if(Xx)return Jh;Xx=1,w4();var n=Pe();return Jh=n.setTimeout,Jh}var ec,Qx;function QJ(){return Qx||(Qx=1,ec=XJ()),ec}var JJ=QJ(),ls=de(JJ);const xt=[];for(let n=0;n<256;++n)xt.push((n+256).toString(16).slice(1));function eee(n,e=0){return(xt[n[e+0]]+xt[n[e+1]]+xt[n[e+2]]+xt[n[e+3]]+"-"+xt[n[e+4]]+xt[n[e+5]]+"-"+xt[n[e+6]]+xt[n[e+7]]+"-"+xt[n[e+8]]+xt[n[e+9]]+"-"+xt[n[e+10]]+xt[n[e+11]]+xt[n[e+12]]+xt[n[e+13]]+xt[n[e+14]]+xt[n[e+15]]).toLowerCase()}let tc;const tee=new Uint8Array(16);function ree(){if(!tc){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");tc=crypto.getRandomValues.bind(crypto)}return tc(tee)}const iee=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Jx={randomUUID:iee};function ds(n,e,t){if(Jx.randomUUID&&!n)return Jx.randomUUID();n=n||{};const r=n.random??n.rng?.()??ree();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,eee(r)}function e$(n){return typeof n=="string"||typeof n=="number"}let nee=class E4{delay;max;_queue=[];_timeout=null;_extended=null;constructor(e){this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&typeof e.delay<"u"&&(this.delay=e.delay),e&&typeof e.max<"u"&&(this.max=e.max),this._flushIfNeeded()}static extend(e,t){const r=new E4(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=()=>{r.flush()};const i=[{name:"flush",original:void 0}];if(t&&t.replace)for(let o=0;o<t.replace.length;o++){const s=t.replace[o];i.push({name:s,original:e[s]}),r.replace(e,s)}return r._extended={object:e,methods:i},r}destroy(){if(this.flush(),this._extended){const e=this._extended.object,t=this._extended.methods;for(let r=0;r<t.length;r++){const i=t[r];i.original?e[i.name]=i.original:delete e[i.name]}this._extended=null}}replace(e,t){const r=this,i=e[t];if(!i)throw new Error("Method "+t+" undefined");e[t]=function(...o){r.queue({args:o,fn:i,context:this})}}queue(e){typeof e=="function"?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}_flushIfNeeded(){this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=setTimeout(()=>{this.flush()},this.delay))}flush(){this._queue.splice(0).forEach(e=>{e.fn.apply(e.context||e.fn,e.args||[])})}},oee=class sE{_subscribers={"*":[],add:[],remove:[],update:[]};_trigger(e,t,r){if(e==="*")throw new Error("Cannot trigger event *");[...this._subscribers[e],...this._subscribers["*"]].forEach(i=>{i(e,t,r??null)})}on(e,t){typeof t=="function"&&this._subscribers[e].push(t)}off(e,t){this._subscribers[e]=this._subscribers[e].filter(r=>r!==t)}subscribe=sE.prototype.on;unsubscribe=sE.prototype.off;get testLeakSubscribers(){return this._subscribers}},t$=class Qa{_pairs;constructor(e){this._pairs=e}*[Symbol.iterator](){for(const[e,t]of this._pairs)yield[e,t]}*entries(){for(const[e,t]of this._pairs)yield[e,t]}*keys(){for(const[e]of this._pairs)yield e}*values(){for(const[,e]of this._pairs)yield e}toIdArray(){return[...this._pairs].map(e=>e[0])}toItemArray(){return[...this._pairs].map(e=>e[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){const e=Object.create(null);for(const[t,r]of this._pairs)e[t]=r;return e}toMap(){return new Map(this._pairs)}toIdSet(){return new Set(this.toIdArray())}toItemSet(){return new Set(this.toItemArray())}cache(){return new Qa([...this._pairs])}distinct(e){const t=new Set;for(const[r,i]of this._pairs)t.add(e(i,r));return t}filter(e){const t=this._pairs;return new Qa({*[Symbol.iterator](){for(const[r,i]of t)e(i,r)&&(yield[r,i])}})}forEach(e){for(const[t,r]of this._pairs)e(r,t)}map(e){const t=this._pairs;return new Qa({*[Symbol.iterator](){for(const[r,i]of t)yield[r,e(i,r)]}})}max(e){const t=this._pairs[Symbol.iterator]();let r=t.next();if(r.done)return null;let i=r.value[1],o=e(r.value[1],r.value[0]);for(;!(r=t.next()).done;){const[s,a]=r.value,g=e(a,s);g>o&&(o=g,i=a)}return i}min(e){const t=this._pairs[Symbol.iterator]();let r=t.next();if(r.done)return null;let i=r.value[1],o=e(r.value[1],r.value[0]);for(;!(r=t.next()).done;){const[s,a]=r.value,g=e(a,s);g<o&&(o=g,i=a)}return i}reduce(e,t){for(const[r,i]of this._pairs)t=e(t,i,r);return t}sort(e){return new Qa({[Symbol.iterator]:()=>[...this._pairs].sort(([t,r],[i,o])=>e(r,o,t,i))[Symbol.iterator]()})}};function see(n,e){return n[e]==null&&(n[e]=ds()),n}let Ps=class extends oee{flush;length;get idProp(){return this._idProp}_options;_data;_idProp;_queue=null;constructor(e,t){super(),e&&!Array.isArray(e)&&(t=e,e=[]),this._options=t||{},this._data=new Map,this.length=0,this._idProp=this._options.fieldId||"id",e&&e.length&&this.add(e),this.setOptions(t)}setOptions(e){e&&e.queue!==void 0&&(e.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=nee.extend(this,{replace:["add","update","remove"]})),e.queue&&typeof e.queue=="object"&&this._queue.setOptions(e.queue)))}add(e,t){const r=[];let i;if(Array.isArray(e)){if(e.map(s=>s[this._idProp]).some(s=>this._data.has(s)))throw new Error("A duplicate id was found in the parameter array.");for(let s=0,a=e.length;s<a;s++)i=this._addItem(e[s]),r.push(i)}else if(e&&typeof e=="object")i=this._addItem(e),r.push(i);else throw new Error("Unknown dataType");return r.length&&this._trigger("add",{items:r},t),r}update(e,t){const r=[],i=[],o=[],s=[],a=this._idProp,g=A=>{const I=A[a];if(I!=null&&this._data.has(I)){const C=A,l=Object.assign({},this._data.get(I)),d=this._updateItem(C);i.push(d),s.push(C),o.push(l)}else{const C=this._addItem(A);r.push(C)}};if(Array.isArray(e))for(let A=0,I=e.length;A<I;A++)e[A]&&typeof e[A]=="object"?g(e[A]):console.warn("Ignoring input item, which is not an object at index "+A);else if(e&&typeof e=="object")g(e);else throw new Error("Unknown dataType");if(r.length&&this._trigger("add",{items:r},t),i.length){const A={items:i,oldData:o,data:s};this._trigger("update",A,t)}return r.concat(i)}updateOnly(e,t){Array.isArray(e)||(e=[e]);const r=e.map(i=>{const o=this._data.get(i[this._idProp]);if(o==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:o,update:i}}).map(({oldData:i,update:o})=>{const s=i[this._idProp],a=rQ(i,o);return this._data.set(s,a),{id:s,oldData:i,updatedData:a}});if(r.length){const i={items:r.map(o=>o.id),oldData:r.map(o=>o.oldData),data:r.map(o=>o.updatedData)};return this._trigger("update",i,t),i.items}else return[]}get(e,t){let r,i,o;e$(e)?(r=e,o=t):Array.isArray(e)?(i=e,o=t):o=e;const s=o&&o.returnType==="Object"?"Object":"Array",a=o&&o.filter,g=[];let A,I,C;if(r!=null)A=this._data.get(r),A&&a&&!a(A)&&(A=void 0);else if(i!=null)for(let l=0,d=i.length;l<d;l++)A=this._data.get(i[l]),A!=null&&(!a||a(A))&&g.push(A);else{I=[...this._data.keys()];for(let l=0,d=I.length;l<d;l++)C=I[l],A=this._data.get(C),A!=null&&(!a||a(A))&&g.push(A)}if(o&&o.order&&r==null&&this._sort(g,o.order),o&&o.fields){const l=o.fields;if(r!=null&&A!=null)A=this._filterFields(A,l);else for(let d=0,u=g.length;d<u;d++)g[d]=this._filterFields(g[d],l)}if(s=="Object"){const l={};for(let d=0,u=g.length;d<u;d++){const h=g[d],p=h[this._idProp];l[p]=h}return l}else return r!=null?A??null:g}getIds(e){const t=this._data,r=e&&e.filter,i=e&&e.order,o=[...t.keys()],s=[];if(r)if(i){const a=[];for(let g=0,A=o.length;g<A;g++){const I=o[g],C=this._data.get(I);C!=null&&r(C)&&a.push(C)}this._sort(a,i);for(let g=0,A=a.length;g<A;g++)s.push(a[g][this._idProp])}else for(let a=0,g=o.length;a<g;a++){const A=o[a],I=this._data.get(A);I!=null&&r(I)&&s.push(I[this._idProp])}else if(i){const a=[];for(let g=0,A=o.length;g<A;g++){const I=o[g];a.push(t.get(I))}this._sort(a,i);for(let g=0,A=a.length;g<A;g++)s.push(a[g][this._idProp])}else for(let a=0,g=o.length;a<g;a++){const A=o[a],I=t.get(A);I!=null&&s.push(I[this._idProp])}return s}getDataSet(){return this}forEach(e,t){const r=t&&t.filter,o=[...this._data.keys()];if(t&&t.order){const s=this.get(t);for(let a=0,g=s.length;a<g;a++){const A=s[a],I=A[this._idProp];e(A,I)}}else for(let s=0,a=o.length;s<a;s++){const g=o[s],A=this._data.get(g);A!=null&&(!r||r(A))&&e(A,g)}}map(e,t){const r=t&&t.filter,i=[],s=[...this._data.keys()];for(let a=0,g=s.length;a<g;a++){const A=s[a],I=this._data.get(A);I!=null&&(!r||r(I))&&i.push(e(I,A))}return t&&t.order&&this._sort(i,t.order),i}_filterFields(e,t){return e&&(Array.isArray(t)?t:Object.keys(t)).reduce((r,i)=>(r[i]=e[i],r),{})}_sort(e,t){if(typeof t=="string"){const r=t;e.sort((i,o)=>{const s=i[r],a=o[r];return s>a?1:s<a?-1:0})}else if(typeof t=="function")e.sort(t);else throw new TypeError("Order must be a function or a string")}remove(e,t){const r=[],i=[],o=Array.isArray(e)?e:[e];for(let s=0,a=o.length;s<a;s++){const g=this._remove(o[s]);if(g){const A=g[this._idProp];A!=null&&(r.push(A),i.push(g))}}return r.length&&this._trigger("remove",{items:r,oldData:i},t),r}_remove(e){let t;if(e$(e)?t=e:e&&typeof e=="object"&&(t=e[this._idProp]),t!=null&&this._data.has(t)){const r=this._data.get(t)||null;return this._data.delete(t),--this.length,r}return null}clear(e){const t=[...this._data.keys()],r=[];for(let i=0,o=t.length;i<o;i++)r.push(this._data.get(t[i]));return this._data.clear(),this.length=0,this._trigger("remove",{items:t,oldData:r},e),t}max(e){let t=null,r=null;for(const i of this._data.values()){const o=i[e];typeof o=="number"&&(r==null||o>r)&&(t=i,r=o)}return t||null}min(e){let t=null,r=null;for(const i of this._data.values()){const o=i[e];typeof o=="number"&&(r==null||o<r)&&(t=i,r=o)}return t||null}distinct(e){const t=this._data,r=[...t.keys()],i=[];let o=0;for(let s=0,a=r.length;s<a;s++){const g=r[s],I=t.get(g)[e];let C=!1;for(let l=0;l<o;l++)if(i[l]==I){C=!0;break}!C&&I!==void 0&&(i[o]=I,o++)}return i}_addItem(e){const t=see(e,this._idProp),r=t[this._idProp];if(this._data.has(r))throw new Error("Cannot add item: item with id "+r+" already exists");return this._data.set(r,t),++this.length,r}_updateItem(e){const t=e[this._idProp];if(t==null)throw new Error("Cannot update item: item has no id (item: "+JSON.stringify(e)+")");const r=this._data.get(t);if(!r)throw new Error("Cannot update item: no item with id "+t+" found");return this._data.set(t,{...r,...e}),t}stream(e){if(e){const t=this._data;return new t$({*[Symbol.iterator](){for(const r of e){const i=t.get(r);i!=null&&(yield[r,i])}}})}else return new t$({[Symbol.iterator]:this._data.entries.bind(this._data)})}get testLeakData(){return this._data}get testLeakIdProp(){return this._idProp}get testLeakOptions(){return this._options}get testLeakQueue(){return this._queue}set testLeakQueue(e){this._queue=e}};function aee(n,e){return typeof e=="object"&&e!==null&&n===e.idProp&&typeof e.add=="function"&&typeof e.clear=="function"&&typeof e.distinct=="function"&&typeof e.forEach=="function"&&typeof e.get=="function"&&typeof e.getDataSet=="function"&&typeof e.getIds=="function"&&typeof e.length=="number"&&typeof e.map=="function"&&typeof e.max=="function"&&typeof e.min=="function"&&typeof e.off=="function"&&typeof e.on=="function"&&typeof e.remove=="function"&&typeof e.setOptions=="function"&&typeof e.stream=="function"&&typeof e.update=="function"&&typeof e.updateOnly=="function"}function S4(n,e){return typeof e=="object"&&e!==null&&n===e.idProp&&typeof e.forEach=="function"&&typeof e.get=="function"&&typeof e.getDataSet=="function"&&typeof e.getIds=="function"&&typeof e.length=="number"&&typeof e.map=="function"&&typeof e.off=="function"&&typeof e.on=="function"&&typeof e.stream=="function"&&aee(n,e.getDataSet())}console.warn("You're running a development build.");var rc={exports:{}},r$={},i$;function gee(){if(i$)return r$;i$=1;var n=ie(),e=at(),t=Dr().f;return n({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),r$}var n$;function Aee(){if(n$)return rc.exports;n$=1,gee();var n=Pe(),e=n.Object,t=rc.exports=function(i,o,s){return e.defineProperty(i,o,s)};return e.defineProperty.sham&&(t.sham=!0),rc.exports}var ic,o$;function O4(){if(o$)return ic;o$=1;var n=Aee();return ic=n,ic}var nc,s$;function Iee(){if(s$)return nc;s$=1;var n=O4();return nc=n,nc}var oc,a$;function Cee(){if(a$)return oc;a$=1;var n=Iee();return oc=n,oc}var sc,g$;function lee(){return g$||(g$=1,sc=Cee()),sc}var dee=lee(),uee=de(dee),A$={},I$={},ac={},C$;function _C(){if(C$)return ac;C$=1;var n=ht();return ac.f=n,ac}var gc,l$;function Ke(){if(l$)return gc;l$=1;var n=Pe(),e=kt(),t=_C(),r=Dr().f;return gc=function(i){var o=n.Symbol||(n.Symbol={});e(o,i)||r(o,i,{value:t.f(i)})},gc}var Ac,d$;function T4(){if(d$)return Ac;d$=1;var n=Ir(),e=mr(),t=ht(),r=iA();return Ac=function(){var i=e("Symbol"),o=i&&i.prototype,s=o&&o.valueOf,a=t("toPrimitive");o&&!o[a]&&r(o,a,function(g){return n(s,this)},{arity:1})},Ac}var u$;function hee(){if(u$)return I$;u$=1;var n=ie(),e=We(),t=Ir(),r=ye(),i=Ys(),o=at(),s=Hs(),a=me(),g=kt(),A=ut(),I=li(),C=Qr(),l=gS(),d=Mr(),u=Vg(),h=tA(),p=Yg(),f=SC(),c=PS(),m=vC(),v=cC(),y=Dr(),w=yS(),S=dC(),b=iA(),E=DS(),O=Ks(),P=wC(),_=Ug(),T=hC(),R=ht(),D=_C(),G=Ke(),B=T4(),Q=uo(),te=lo(),le=cn().forEach,U=P("hidden"),fe="Symbol",xe="prototype",$e=te.set,hr=te.getterFor(fe),Oe=Object[xe],mt=e.Symbol,Lt=mt&&mt[xe],W=e.RangeError,N=e.TypeError,M=e.QObject,Y=v.f,re=y.f,oe=c.f,qe=S.f,it=r([].push),Ee=O("symbols"),yt=O("op-symbols"),Er=O("wks"),Gt=!M||!M[xe]||!M[xe].findChild,Fa=function(ae,V,Z){var H=Y(Oe,V);H&&delete Oe[V],re(ae,V,Z),H&&ae!==Oe&&re(Oe,V,H)},On=o&&a(function(){return h(re({},"a",{get:function(){return re(this,"a",{value:7}).a}})).a!==7})?Fa:re,Tn=function(ae,V){var Z=Ee[ae]=h(Lt);return $e(Z,{type:fe,tag:ae,description:V}),o||(Z.description=V),Z},fi=function(V,Z,H){V===Oe&&fi(yt,Z,H),I(V);var ge=l(Z);return I(H),g(Ee,ge)?(H.enumerable?(g(V,U)&&V[U][ge]&&(V[U][ge]=!1),H=h(H,{enumerable:u(0,!1)})):(g(V,U)||re(V,U,u(1,h(null))),V[U][ge]=!0),On(V,ge,H)):re(V,ge,H)},_n=function(V,Z){I(V);var H=C(Z),ge=p(H).concat(za(H));return le(ge,function(Te){(!o||t(Pn,H,Te))&&fi(V,Te,H[Te])}),V},_l=function(V,Z){return Z===void 0?h(V):_n(h(V),Z)},Pn=function(V){var Z=l(V),H=t(qe,this,Z);return this===Oe&&g(Ee,Z)&&!g(yt,Z)?!1:H||!g(this,Z)||!g(Ee,Z)||g(this,U)&&this[U][Z]?H:!0},Ba=function(V,Z){var H=C(V),ge=l(Z);if(!(H===Oe&&g(Ee,ge)&&!g(yt,ge))){var Te=Y(H,ge);return Te&&g(Ee,ge)&&!(g(H,U)&&H[U][ge])&&(Te.enumerable=!0),Te}},qa=function(V){var Z=oe(C(V)),H=[];return le(Z,function(ge){!g(Ee,ge)&&!g(_,ge)&&it(H,ge)}),H},za=function(ae){var V=ae===Oe,Z=oe(V?yt:C(ae)),H=[];return le(Z,function(ge){g(Ee,ge)&&(!V||g(Oe,ge))&&it(H,Ee[ge])}),H};return s||(mt=function(){if(A(Lt,this))throw new N("Symbol is not a constructor");var V=!arguments.length||arguments[0]===void 0?void 0:d(arguments[0]),Z=T(V),H=function(ge){var Te=this===void 0?e:this;Te===Oe&&t(H,yt,ge),g(Te,U)&&g(Te[U],Z)&&(Te[U][Z]=!1);var ja=u(1,ge);try{On(Te,Z,ja)}catch(La){if(!(La instanceof W))throw La;Fa(Te,Z,ja)}};return o&&Gt&&On(Oe,Z,{configurable:!0,set:H}),Tn(Z,V)},Lt=mt[xe],b(Lt,"toString",function(){return hr(this).tag}),b(mt,"withoutSetter",function(ae){return Tn(T(ae),ae)}),S.f=Pn,y.f=fi,w.f=_n,v.f=Ba,f.f=c.f=qa,m.f=za,D.f=function(ae){return Tn(R(ae),ae)},o&&(E(Lt,"description",{configurable:!0,get:function(){return hr(this).description}}),i||b(Oe,"propertyIsEnumerable",Pn,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:mt}),le(p(Er),function(ae){G(ae)}),n({target:fe,stat:!0,forced:!s},{useSetter:function(){Gt=!0},useSimple:function(){Gt=!1}}),n({target:"Object",stat:!0,forced:!s,sham:!o},{create:_l,defineProperty:fi,defineProperties:_n,getOwnPropertyDescriptor:Ba}),n({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:qa}),B(),Q(mt,fe),_[U]=!0,I$}var h$={},Ic,c$;function _4(){if(c$)return Ic;c$=1;var n=Hs();return Ic=n&&!!Symbol.for&&!!Symbol.keyFor,Ic}var f$;function cee(){if(f$)return h$;f$=1;var n=ie(),e=mr(),t=kt(),r=Mr(),i=Ks(),o=_4(),s=i("string-to-symbol-registry"),a=i("symbol-to-string-registry");return n({target:"Symbol",stat:!0,forced:!o},{for:function(g){var A=r(g);if(t(s,A))return s[A];var I=e("Symbol")(A);return s[A]=I,a[I]=A,I}}),h$}var p$={},v$;function fee(){if(v$)return p$;v$=1;var n=ie(),e=kt(),t=Hg(),r=Us(),i=Ks(),o=_4(),s=i("symbol-to-string-registry");return n({target:"Symbol",stat:!0,forced:!o},{keyFor:function(g){if(!t(g))throw new TypeError(r(g)+" is not a symbol");if(e(s,g))return s[g]}}),p$}var m$={},Cc,y$;function pee(){if(y$)return Cc;y$=1;var n=ye(),e=Co(),t=St(),r=Ci(),i=Mr(),o=n([].push);return Cc=function(s){if(t(s))return s;if(e(s)){for(var a=s.length,g=[],A=0;A<a;A++){var I=s[A];typeof I=="string"?o(g,I):(typeof I=="number"||r(I)==="Number"||r(I)==="String")&&o(g,i(I))}var C=g.length,l=!0;return function(d,u){if(l)return l=!1,u;if(e(this))return u;for(var h=0;h<C;h++)if(g[h]===d)return u}}},Cc}var b$;function P4(){if(b$)return m$;b$=1;var n=ie(),e=mr(),t=lC(),r=Ir(),i=ye(),o=me(),s=St(),a=Hg(),g=Js(),A=pee(),I=Hs(),C=String,l=e("JSON","stringify"),d=i(/./.exec),u=i("".charAt),h=i("".charCodeAt),p=i("".replace),f=i(1.1.toString),c=/[\uD800-\uDFFF]/g,m=/^[\uD800-\uDBFF]$/,v=/^[\uDC00-\uDFFF]$/,y=!I||o(function(){var E=e("Symbol")("stringify detection");return l([E])!=="[null]"||l({a:E})!=="{}"||l(Object(E))!=="{}"}),w=o(function(){return l("\uDF06\uD834")!=='"\\udf06\\ud834"'||l("\uDEAD")!=='"\\udead"'}),S=function(E,O){var P=g(arguments),_=A(O);if(!(!s(_)&&(E===void 0||a(E))))return P[1]=function(T,R){if(s(_)&&(R=r(_,this,C(T),R)),!a(R))return R},t(l,null,P)},b=function(E,O,P){var _=u(P,O-1),T=u(P,O+1);return d(m,E)&&!d(v,T)||d(v,E)&&!d(m,_)?"\\u"+f(h(E,0),16):E};return l&&n({target:"JSON",stat:!0,arity:3,forced:y||w},{stringify:function(O,P,_){var T=g(arguments),R=t(y?S:l,null,T);return w&&typeof R=="string"?p(R,c,b):R}}),m$}var w$={},E$;function vee(){if(E$)return w$;E$=1;var n=ie(),e=Hs(),t=me(),r=vC(),i=$r(),o=!e||t(function(){r.f(1)});return n({target:"Object",stat:!0,forced:o},{getOwnPropertySymbols:function(a){var g=r.f;return g?g(i(a)):[]}}),w$}var S$;function R4(){return S$||(S$=1,hee(),cee(),fee(),P4(),vee()),A$}var O$={},T$;function x4(){if(T$)return O$;T$=1;var n=Ke();return n("asyncDispose"),O$}var _$={},P$;function mee(){if(P$)return _$;P$=1;var n=Ke();return n("asyncIterator"),_$}var R$={},x$;function $4(){if(x$)return R$;x$=1;var n=Ke();return n("dispose"),R$}var $$={},D$;function yee(){if(D$)return $$;D$=1;var n=Ke();return n("hasInstance"),$$}var N$={},M$;function bee(){if(M$)return N$;M$=1;var n=Ke();return n("isConcatSpreadable"),N$}var k$={},F$;function D4(){if(F$)return k$;F$=1;var n=Ke();return n("iterator"),k$}var B$={},q$;function wee(){if(q$)return B$;q$=1;var n=Ke();return n("match"),B$}var z$={},j$;function Eee(){if(j$)return z$;j$=1;var n=Ke();return n("matchAll"),z$}var L$={},G$;function See(){if(G$)return L$;G$=1;var n=Ke();return n("replace"),L$}var W$={},V$;function Oee(){if(V$)return W$;V$=1;var n=Ke();return n("search"),W$}var Z$={},H$;function Tee(){if(H$)return Z$;H$=1;var n=Ke();return n("species"),Z$}var U$={},Y$;function _ee(){if(Y$)return U$;Y$=1;var n=Ke();return n("split"),U$}var K$={},X$;function N4(){if(X$)return K$;X$=1;var n=Ke(),e=T4();return n("toPrimitive"),e(),K$}var Q$={},J$;function Pee(){if(J$)return Q$;J$=1;var n=mr(),e=Ke(),t=uo();return e("toStringTag"),t(n("Symbol"),"Symbol"),Q$}var eD={},tD;function Ree(){if(tD)return eD;tD=1;var n=Ke();return n("unscopables"),eD}var rD={},iD;function xee(){if(iD)return rD;iD=1;var n=We(),e=uo();return e(n.JSON,"JSON",!0),rD}var lc,nD;function $ee(){if(nD)return lc;nD=1,u4(),R4(),x4(),mee(),$4(),yee(),bee(),D4(),wee(),Eee(),See(),Oee(),Tee(),_ee(),N4(),Pee(),Ree(),xee();var n=Pe();return lc=n.Symbol,lc}var dc,oD;function Dee(){if(oD)return dc;oD=1;var n=$ee();return sa(),dc=n,dc}var sD={},aD;function Nee(){if(aD)return sD;aD=1;var n=ht(),e=Dr().f,t=n("metadata"),r=Function.prototype;return r[t]===void 0&&e(r,t,{value:null}),sD}var gD={},AD;function Mee(){return AD||(AD=1,x4()),gD}var ID={},CD;function kee(){return CD||(CD=1,$4()),ID}var lD={},dD;function Fee(){if(dD)return lD;dD=1;var n=Ke();return n("metadata"),lD}var uc,uD;function Bee(){if(uD)return uc;uD=1;var n=Dee();return Nee(),Mee(),kee(),Fee(),uc=n,uc}var hD={},hc,cD;function M4(){if(cD)return hc;cD=1;var n=mr(),e=ye(),t=n("Symbol"),r=t.keyFor,i=e(t.prototype.valueOf);return hc=t.isRegisteredSymbol||function(s){try{return r(i(s))!==void 0}catch{return!1}},hc}var fD;function qee(){if(fD)return hD;fD=1;var n=ie(),e=M4();return n({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),hD}var pD={},cc,vD;function k4(){if(vD)return cc;vD=1;for(var n=Ks(),e=mr(),t=ye(),r=Hg(),i=ht(),o=e("Symbol"),s=o.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),g=t(o.prototype.valueOf),A=n("wks"),I=0,C=a(o),l=C.length;I<l;I++)try{var d=C[I];r(o[d])&&i(d)}catch{}return cc=function(h){if(s&&s(h))return!0;try{for(var p=g(h),f=0,c=a(A),m=c.length;f<m;f++)if(A[c[f]]==p)return!0}catch{}return!1},cc}var mD;function zee(){if(mD)return pD;mD=1;var n=ie(),e=k4();return n({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:e}),pD}var yD={},bD;function jee(){if(bD)return yD;bD=1;var n=Ke();return n("customMatcher"),yD}var wD={},ED;function Lee(){if(ED)return wD;ED=1;var n=Ke();return n("observable"),wD}var SD={},OD;function Gee(){if(OD)return SD;OD=1;var n=ie(),e=M4();return n({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:e}),SD}var TD={},_D;function Wee(){if(_D)return TD;_D=1;var n=ie(),e=k4();return n({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:e}),TD}var PD={},RD;function Vee(){if(RD)return PD;RD=1;var n=Ke();return n("matcher"),PD}var xD={},$D;function Zee(){if($D)return xD;$D=1;var n=Ke();return n("metadataKey"),xD}var DD={},ND;function Hee(){if(ND)return DD;ND=1;var n=Ke();return n("patternMatch"),DD}var MD={},kD;function Uee(){if(kD)return MD;kD=1;var n=Ke();return n("replaceAll"),MD}var fc,FD;function Yee(){if(FD)return fc;FD=1;var n=Bee();return qee(),zee(),jee(),Lee(),Gee(),Wee(),Vee(),Zee(),Hee(),Uee(),fc=n,fc}var pc,BD;function Kee(){return BD||(BD=1,pc=Yee()),pc}var Xee=Kee(),UA=de(Xee),vc,qD;function Qee(){if(qD)return vc;qD=1,oa(),MS(),D4();var n=_C();return vc=n.f("iterator"),vc}var mc,zD;function Jee(){if(zD)return mc;zD=1;var n=Qee();return sa(),mc=n,mc}var yc,jD;function ete(){if(jD)return yc;jD=1;var n=Jee();return yc=n,yc}var bc,LD;function tte(){if(LD)return bc;LD=1;var n=ete();return bc=n,bc}var wc,GD;function rte(){return GD||(GD=1,wc=tte()),wc}var ite=rte(),nte=de(ite);function Tg(n){"@babel/helpers - typeof";return Tg=typeof UA=="function"&&typeof nte=="symbol"?function(e){return typeof e}:function(e){return e&&typeof UA=="function"&&e.constructor===UA&&e!==UA.prototype?"symbol":typeof e},Tg(n)}var Ec,WD;function ote(){if(WD)return Ec;WD=1,N4();var n=_C();return Ec=n.f("toPrimitive"),Ec}var Sc,VD;function ste(){if(VD)return Sc;VD=1;var n=ote();return Sc=n,Sc}var Oc,ZD;function ate(){if(ZD)return Oc;ZD=1;var n=ste();return Oc=n,Oc}var Tc,HD;function gte(){if(HD)return Tc;HD=1;var n=ate();return Tc=n,Tc}var _c,UD;function Ate(){return UD||(UD=1,_c=gte()),_c}var Ite=Ate(),Cte=de(Ite);function lte(n,e){if(Tg(n)!="object"||!n)return n;var t=n[Cte];if(t!==void 0){var r=t.call(n,e);if(Tg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function dte(n){var e=lte(n,"string");return Tg(e)=="symbol"?e:e+""}function pi(n,e,t){return(e=dte(e))in n?uee(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var YD={},Pc,KD;function FS(){return KD||(KD=1,Pc=`	
\v\f\r                　\u2028\u2029\uFEFF`),Pc}var Rc,XD;function F4(){if(XD)return Rc;XD=1;var n=ye(),e=Di(),t=Mr(),r=FS(),i=n("".replace),o=RegExp("^["+r+"]+"),s=RegExp("(^|[^"+r+"])["+r+"]+$"),a=function(g){return function(A){var I=t(e(A));return g&1&&(I=i(I,o,"")),g&2&&(I=i(I,s,"$1")),I}};return Rc={start:a(1),end:a(2),trim:a(3)},Rc}var xc,QD;function ute(){if(QD)return xc;QD=1;var n=We(),e=me(),t=ye(),r=Mr(),i=F4().trim,o=FS(),s=n.parseInt,a=n.Symbol,g=a&&a.iterator,A=/^[+-]?0x/i,I=t(A.exec),C=s(o+"08")!==8||s(o+"0x16")!==22||g&&!e(function(){s(Object(g))});return xc=C?function(d,u){var h=i(r(d));return s(h,u>>>0||(I(A,h)?16:10))}:s,xc}var JD;function hte(){if(JD)return YD;JD=1;var n=ie(),e=ute();return n({global:!0,forced:parseInt!==e},{parseInt:e}),YD}var $c,e2;function cte(){if(e2)return $c;e2=1,hte();var n=Pe();return $c=n.parseInt,$c}var Dc,t2;function fte(){if(t2)return Dc;t2=1;var n=cte();return Dc=n,Dc}var Nc,r2;function pte(){return r2||(r2=1,Nc=fte()),Nc}var vte=pte(),i2=de(vte),n2={},Mc,o2;function mte(){if(o2)return Mc;o2=1;var n=We(),e=me(),t=ye(),r=Mr(),i=F4().trim,o=FS(),s=t("".charAt),a=n.parseFloat,g=n.Symbol,A=g&&g.iterator,I=1/a(o+"-0")!==-1/0||A&&!e(function(){a(Object(A))});return Mc=I?function(l){var d=i(r(l)),u=a(d);return u===0&&s(d,0)==="-"?-0:u}:a,Mc}var s2;function yte(){if(s2)return n2;s2=1;var n=ie(),e=mte();return n({global:!0,forced:parseFloat!==e},{parseFloat:e}),n2}var kc,a2;function bte(){if(a2)return kc;a2=1,yte();var n=Pe();return kc=n.parseFloat,kc}var Fc,g2;function wte(){if(g2)return Fc;g2=1;var n=bte();return Fc=n,Fc}var Bc,A2;function Ete(){return A2||(A2=1,Bc=wte()),Bc}var Ste=Ete(),B4=de(Ste),I2={},C2;function Ote(){if(C2)return I2;C2=1;var n=ie(),e=cn().filter,t=rA(),r=t("filter");return n({target:"Array",proto:!0,forced:!r},{filter:function(o){return e(this,o,arguments.length>1?arguments[1]:void 0)}}),I2}var qc,l2;function Tte(){if(l2)return qc;l2=1,Ote();var n=Ft();return qc=n("Array","filter"),qc}var zc,d2;function _te(){if(d2)return zc;d2=1;var n=ut(),e=Tte(),t=Array.prototype;return zc=function(r){var i=r.filter;return r===t||n(t,r)&&i===t.filter?e:i},zc}var jc,u2;function Pte(){if(u2)return jc;u2=1;var n=_te();return jc=n,jc}var Lc,h2;function Rte(){return h2||(h2=1,Lc=Pte()),Lc}var xte=Rte(),ki=de(xte),c2={},f2;function $te(){if(f2)return c2;f2=1;var n=ie(),e=me(),t=PS().f,r=e(function(){return!Object.getOwnPropertyNames(1)});return n({target:"Object",stat:!0,forced:r},{getOwnPropertyNames:t}),c2}var Gc,p2;function Dte(){if(p2)return Gc;p2=1,$te();var n=Pe(),e=n.Object;return Gc=function(r){return e.getOwnPropertyNames(r)},Gc}var Wc,v2;function Nte(){if(v2)return Wc;v2=1;var n=Dte();return Wc=n,Wc}var Vc,m2;function Mte(){return m2||(m2=1,Vc=Nte()),Vc}var kte=Mte(),Fte=de(kte),Zc,y2;function Bte(){if(y2)return Zc;y2=1,R4();var n=Pe();return Zc=n.Object.getOwnPropertySymbols,Zc}var Hc,b2;function qte(){if(b2)return Hc;b2=1;var n=Bte();return Hc=n,Hc}var Uc,w2;function zte(){return w2||(w2=1,Uc=qte()),Uc}var jte=zte(),In=de(jte),Yc={exports:{}},E2={},S2;function Lte(){if(S2)return E2;S2=1;var n=ie(),e=me(),t=Qr(),r=cC().f,i=at(),o=!i||e(function(){r(1)});return n({target:"Object",stat:!0,forced:o,sham:!i},{getOwnPropertyDescriptor:function(a,g){return r(t(a),g)}}),E2}var O2;function Gte(){if(O2)return Yc.exports;O2=1,Lte();var n=Pe(),e=n.Object,t=Yc.exports=function(i,o){return e.getOwnPropertyDescriptor(i,o)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),Yc.exports}var Kc,T2;function Wte(){if(T2)return Kc;T2=1;var n=Gte();return Kc=n,Kc}var Xc,_2;function Vte(){return _2||(_2=1,Xc=Wte()),Xc}var Zte=Vte(),fn=de(Zte),P2={},Qc,R2;function Hte(){if(R2)return Qc;R2=1;var n=mr(),e=ye(),t=SC(),r=vC(),i=li(),o=e([].concat);return Qc=n("Reflect","ownKeys")||function(a){var g=t.f(i(a)),A=r.f;return A?o(g,A(a)):g},Qc}var x2;function Ute(){if(x2)return P2;x2=1;var n=ie(),e=at(),t=Hte(),r=Qr(),i=cC(),o=EC();return n({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(a){for(var g=r(a),A=i.f,I=t(g),C={},l=0,d,u;I.length>l;)u=A(g,d=I[l++]),u!==void 0&&o(C,d,u);return C}}),P2}var Jc,$2;function Yte(){if($2)return Jc;$2=1,Ute();var n=Pe();return Jc=n.Object.getOwnPropertyDescriptors,Jc}var ef,D2;function Kte(){if(D2)return ef;D2=1;var n=Yte();return ef=n,ef}var tf,N2;function Xte(){return N2||(N2=1,tf=Kte()),tf}var Qte=Xte(),Cn=de(Qte),rf={exports:{}},M2={},k2;function Jte(){if(k2)return M2;k2=1;var n=ie(),e=at(),t=yS().f;return n({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),M2}var F2;function ere(){if(F2)return rf.exports;F2=1,Jte();var n=Pe(),e=n.Object,t=rf.exports=function(i,o){return e.defineProperties(i,o)};return e.defineProperties.sham&&(t.sham=!0),rf.exports}var nf,B2;function tre(){if(B2)return nf;B2=1;var n=ere();return nf=n,nf}var of,q2;function rre(){return q2||(q2=1,of=tre()),of}var ire=rre(),PC=de(ire),sf,z2;function nre(){return z2||(z2=1,sf=O4()),sf}var ore=nre(),RC=de(ore);function BS(n,e){const t=["node","edge","label"];let r=!0;const i=Wi(e,"chosen");if(typeof i=="boolean")r=i;else if(typeof i=="object"){if(Ue(t).call(t,n)===-1)throw new Error("choosify: subOption '"+n+"' should be one of '"+t.join("', '")+"'");const o=Wi(e,["chosen",n]);(typeof o=="boolean"||typeof o=="function")&&(r=o)}return r}function aE(n,e,t){if(n.width<=0||n.height<=0)return!1;if(t!==void 0){const o={x:e.x-t.x,y:e.y-t.y};if(t.angle!==0){const s=-t.angle;e={x:Math.cos(s)*o.x-Math.sin(s)*o.y,y:Math.sin(s)*o.x+Math.cos(s)*o.y}}else e=o}const r=n.x+n.width,i=n.y+n.width;return n.left<e.x&&r>e.x&&n.top<e.y&&i>e.y}function GI(n){return typeof n=="string"&&n!==""}function q4(n,e,t,r){let i=r.x,o=r.y;if(typeof r.distanceToBorder=="function"){const s=r.distanceToBorder(n,e),a=Math.sin(e)*s,g=Math.cos(e)*s;g===s?(i+=s,o=r.y):a===s?(i=r.x,o-=s):(i+=g,o-=a)}else r.shape.width>r.shape.height?(i=r.x+r.shape.width*.5,o=r.y-t):(i=r.x+t,o=r.y-r.shape.height*.5);return{x:i,y:o}}var j2={},L2;function sre(){if(L2)return j2;L2=1;var n=ie(),e=Co(),t=o4(),r=Ot(),i=pC(),o=Mi(),s=Qr(),a=EC(),g=ht(),A=rA(),I=Js(),C=A("slice"),l=g("species"),d=Array,u=Math.max;return n({target:"Array",proto:!0,forced:!C},{slice:function(p,f){var c=s(this),m=o(c),v=i(p,m),y=i(f===void 0?m:f,m),w,S,b;if(e(c)&&(w=c.constructor,t(w)&&(w===d||e(w.prototype))?w=void 0:r(w)&&(w=w[l],w===null&&(w=void 0)),w===d||w===void 0))return I(c,v,y);for(S=new(w===void 0?d:w)(u(y-v,0)),b=0;v<y;v++,b++)v in c&&a(S,b,c[v]);return S.length=b,S}}),j2}var af,G2;function are(){if(G2)return af;G2=1,sre();var n=Ft();return af=n("Array","slice"),af}var gf,W2;function gre(){if(W2)return gf;W2=1;var n=ut(),e=are(),t=Array.prototype;return gf=function(r){var i=r.slice;return r===t||n(t,r)&&i===t.slice?e:i},gf}var Af,V2;function Are(){if(V2)return Af;V2=1;var n=gre();return Af=n,Af}var If,Z2;function Ire(){return Z2||(Z2=1,If=Are()),If}var Cre=Ire(),Uo=de(Cre),Cf,H2;function lre(){if(H2)return Cf;H2=1,oa();var n=Ft();return Cf=n("Array","values"),Cf}var lf,U2;function dre(){if(U2)return lf;U2=1;var n=lre();return lf=n,lf}var df,Y2;function ure(){if(Y2)return df;Y2=1,sa();var n=ia(),e=kt(),t=ut(),r=dre(),i=Array.prototype,o={DOMTokenList:!0,NodeList:!0};return df=function(s){var a=s.values;return s===i||t(i,s)&&a===i.values||e(o,n(s))?r:a},df}var uf,K2;function hre(){return K2||(K2=1,uf=ure()),uf}var cre=hre(),z4=de(cre);let fre=class{constructor(e){this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}_add(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});let i=t;(t===void 0||t==="")&&(i=" ");const o=this.measureText(i,r),s=Nt({},z4(o));s.text=t,s.width=o.width,s.mod=r,(t===void 0||t==="")&&(s.width=0),this.lines[e].blocks.push(s),this.lines[e].width+=s.width}curWidth(){const e=this.lines[this.current];return e===void 0?0:e.width}append(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}newLine(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}determineLineHeights(){for(let e=0;e<this.lines.length;e++){const t=this.lines[e];let r=0;if(t.blocks!==void 0)for(let i=0;i<t.blocks.length;i++){const o=t.blocks[i];r<o.height&&(r=o.height)}t.height=r}}determineLabelSize(){let e=0,t=0;for(let r=0;r<this.lines.length;r++){const i=this.lines[r];i.width>e&&(e=i.width),t+=i.height}this.width=e,this.height=t}removeEmptyBlocks(){const e=[];for(let t=0;t<this.lines.length;t++){const r=this.lines[t];if(r.blocks.length===0||t===this.lines.length-1&&r.width===0)continue;const i={};Nt(i,r),i.blocks=[];let o;const s=[];for(let a=0;a<r.blocks.length;a++){const g=r.blocks[a];g.width!==0?s.push(g):o===void 0&&(o=g)}s.length===0&&o!==void 0&&s.push(o),i.blocks=s,e.push(i)}return e}finalize(){this.determineLineHeights(),this.determineLabelSize();const e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}};const pre={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/};let X2=class{constructor(e){this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}mod(){return this.modStack.length===0?"normal":this.modStack[0]}modName(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}emitBlock(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}add(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}parseWS(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}setTag(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}unsetTag(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}parseStartTag(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const[r,i]=this.prepareRegExp(e),o=r.test(this.text.substr(this.position,i));return o&&t&&(this.position+=i-1),o}parseEndTag(e,t,r){let i=this.mod()===e;return e==="mono"?i=i&&this.mono:i=i&&!this.mono,i&&this.match(t)?(r!==void 0?(this.position===this.text.length-1||this.match(r,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}replace(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}prepareRegExp(e){let t,r;if(e instanceof RegExp)r=e,t=1;else{const i=pre[e];i!==void 0?r=i:r=new RegExp(e),t=e.length}return[r,t]}},vre=class{constructor(e,t,r,i){this.ctx=e,this.parent=t,this.selected=r,this.hover=i;const o=(s,a)=>{if(s===void 0)return 0;const g=this.parent.getFormattingValues(e,r,i,a);let A=0;return s!==""&&(A=this.ctx.measureText(s).width),{width:A,values:g}};this.lines=new fre(o)}process(e){if(!GI(e))return this.lines.finalize();const t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
`),e=e.replace(/\r/g,`
`);const r=String(e).split(`
`),i=r.length;if(t.multi)for(let o=0;o<i;o++){const s=this.splitBlocks(r[o],t.multi);if(s!==void 0){if(s.length===0){this.lines.newLine("");continue}if(t.maxWdt>0)for(let a=0;a<s.length;a++){const g=s[a].mod,A=s[a].text;this.splitStringIntoLines(A,g,!0)}else for(let a=0;a<s.length;a++){const g=s[a].mod,A=s[a].text;this.lines.append(A,g)}this.lines.newLine()}}else if(t.maxWdt>0)for(let o=0;o<i;o++)this.splitStringIntoLines(r[o]);else for(let o=0;o<i;o++)this.lines.newLine(r[o]);return this.lines.finalize()}decodeMarkupSystem(e){let t="none";return e==="markdown"||e==="md"?t="markdown":(e===!0||e==="html")&&(t="html"),t}splitHtmlBlocks(e){const t=new X2(e),r=i=>/&/.test(i)?(t.replace(t.text,"&lt;","<")||t.replace(t.text,"&amp;","&")||t.add("&"),!0):!1;for(;t.position<t.text.length;){const i=t.text.charAt(t.position);t.parseWS(i)||/</.test(i)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||r(i)||t.add(i),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){const t=new X2(e);let r=!0;const i=o=>/\\/.test(o)?(t.position<this.text.length+1&&(t.position++,o=this.text.charAt(t.position),/ \t/.test(o)?t.spacing=!0:(t.add(o),r=!1)),!0):!1;for(;t.position<t.text.length;){const o=t.text.charAt(t.position);t.parseWS(o)||i(o)||(r||t.spacing)&&(t.parseStartTag("bold","*")||t.parseStartTag("ital","_")||t.parseStartTag("mono","`"))||t.parseEndTag("bold","*","afterBold")||t.parseEndTag("ital","_","afterItal")||t.parseEndTag("mono","`","afterMono")||(t.add(o),r=!1),t.position++}return t.emitBlock(),t.blocks}splitBlocks(e,t){const r=this.decodeMarkupSystem(t);if(r==="none")return[{text:e,mod:"normal"}];if(r==="markdown")return this.splitMarkdownBlocks(e);if(r==="html")return this.splitHtmlBlocks(e)}overMaxWidth(e){const t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}getLongestFit(e){let t="",r=0;for(;r<e.length;){const o=t+(t===""?"":" ")+e[r];if(this.overMaxWidth(o))break;t=o,r++}return r}getLongestFitWord(e){let t=0;for(;t<e.length&&!this.overMaxWidth(Uo(e).call(e,0,t));)t++;return t}splitStringIntoLines(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let i=e.split("\r");for(;i.length>0;){let o=this.getLongestFit(i);if(o===0){const s=i[0],a=this.getLongestFitWord(s);this.lines.newLine(Uo(s).call(s,0,a),t),i[0]=Uo(s).call(s,a)}else{let s=o;i[o-1]===" "?o--:i[s]===" "&&s++;const a=Uo(i).call(i,0,o).join("");o==i.length&&r?this.lines.append(a,t):this.lines.newLine(a,t),i=Uo(i).call(i,s)}}}};const Va=["bold","ital","boldital","mono"];let j4=class bI{constructor(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=r}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),GI(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(typeof e.font=="object"){const t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(e){if(pe(Va,t=>{this.fontOptions[t]={}}),bI.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}pe(e,(t,r)=>{t!=null&&typeof t!="object"&&(this.fontOptions[r]=t)})}static parseFontString(e,t){if(!t||typeof t!="string")return!1;const r=t.split(" ");return e.size=+r[0].replace("px",""),e.face=r[1],e.color=r[2],!0}constrain(e){const t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},r=Wi(e,"widthConstraint");if(typeof r=="number")t.maxWdt=Number(r),t.minWdt=Number(r);else if(typeof r=="object"){const o=Wi(e,["widthConstraint","maximum"]);typeof o=="number"&&(t.maxWdt=Number(o));const s=Wi(e,["widthConstraint","minimum"]);typeof s=="number"&&(t.minWdt=Number(s))}const i=Wi(e,"heightConstraint");if(typeof i=="number")t.minHgt=Number(i);else if(typeof i=="object"){const o=Wi(e,["heightConstraint","minimum"]);typeof o=="number"&&(t.minHgt=Number(o));const s=Wi(e,["heightConstraint","valign"]);typeof s=="string"&&(s==="top"||s==="bottom")&&(t.valign=s)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),Me(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=BS("label",t)}adjustSizes(e){const t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);const r=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=r)}addFontOptionsToPile(e,t){for(let r=0;r<t.length;++r)this.addFontToPile(e,t[r])}addFontToPile(e,t){if(t===void 0||t.font===void 0||t.font===null)return;const r=t.font;e.push(r)}getBasicOptions(e){const t={};for(let r=0;r<e.length;++r){let i=e[r];const o={};bI.parseFontString(o,i)&&(i=o),pe(i,(s,a)=>{s!==void 0&&(Object.prototype.hasOwnProperty.call(t,a)||(Ue(Va).call(Va,a)!==-1?t[a]={}:t[a]=s))})}return t}getFontOption(e,t,r){let i;for(let o=0;o<e.length;++o){const s=e[o];if(Object.prototype.hasOwnProperty.call(s,t)){if(i=s[t],i==null)continue;const a={};if(bI.parseFontString(a,i)&&(i=a),Object.prototype.hasOwnProperty.call(i,r))return i[r]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,r))return this.fontOptions[r];throw new Error("Did not find value for multi-font for property: '"+r+"'")}getFontOptions(e,t){const r={},i=["color","size","face","mod","vadjust"];for(let o=0;o<i.length;++o){const s=i[o];r[s]=this.getFontOption(e,t,s)}return r}propagateFonts(e){const t=[];this.addFontOptionsToPile(t,e),this.fontOptions=this.getBasicOptions(t);for(let r=0;r<Va.length;++r){const i=Va[r],o=this.fontOptions[i],s=this.getFontOptions(t,i);pe(s,(a,g)=>{o[g]=a}),o.size=Number(o.size),o.vadjust=Number(o.vadjust)}}draw(e,t,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label===void 0)return;let a=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&a<this.elementOptions.scaling.label.drawThreshold-1||(a>=this.elementOptions.scaling.label.maxVisible&&(a=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,i,o,t,r,s),this._drawBackground(e),this._drawText(e,t,this.size.yLine,s,a))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;const t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}_drawText(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0;[t,r]=this._setAlignment(e,t,r,i),e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(r-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(r+=(this.size.height-this.size.labelHeight)/2));for(let s=0;s<this.lineCount;s++){const a=this.lines[s];if(a&&a.blocks){let g=0;this.isEdgeLabel||this.fontOptions.align==="center"?g+=(this.size.width-a.width)/2:this.fontOptions.align==="right"&&(g+=this.size.width-a.width);for(let A=0;A<a.blocks.length;A++){const I=a.blocks[A];e.font=I.font;const[C,l]=this._getColor(I.color,o,I.strokeColor);I.strokeWidth>0&&(e.lineWidth=I.strokeWidth,e.strokeStyle=l,e.lineJoin="round"),e.fillStyle=C,I.strokeWidth>0&&e.strokeText(I.text,t+g,r+I.vadjust),e.fillText(I.text,t+g,r+I.vadjust),g+=I.width}r+=a.height}}}_setAlignment(e,t,r,i){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,r=0;const o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",r-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",r+=2*o):e.textBaseline="middle"}else e.textBaseline=i;return[t,r]}_getColor(e,t,r){let i=e||"#000000",o=r||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){const s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));i=Tr(i,s),o=Tr(o,s)}return[i,o]}getTextSize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,r),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let t=this.size.left,r=this.size.top-.5*2;if(this.isEdgeLabel){const o=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=o,r=-this.size.height*.5;break;case"top":t=o,r=-(this.size.height+2);break;case"bottom":t=o,r=2;break}}return{left:t,top:r,width:this.size.width,height:this.size.height}}calculateLabelSize(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,r),this.size.left=i-this.size.width*.5,this.size.top=o-this.size.height*.5,this.size.yLine=o+(1-this.lineCount)*.5*this.fontOptions.size,s==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,t,r,i){const o=function(g,A,I){return A==="normal"?I==="mod"?"":g[I]:g[A][I]!==void 0?g[A][I]:g[I]},s={color:o(this.fontOptions,i,"color"),size:o(this.fontOptions,i,"size"),face:o(this.fontOptions,i,"face"),mod:o(this.fontOptions,i,"mod"),vadjust:o(this.fontOptions,i,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||r)&&(i==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,t,r));let a="";return s.mod!==void 0&&s.mod!==""&&(a+=s.mod+" "),a+=s.size+"px "+s.face,e.font=a.replace(/"/g,""),s.font=e.font,s.height=s.size,s}differentState(e,t){return e!==this.selectedState||t!==this.hoverState}_processLabelText(e,t,r,i){return new vre(e,this,t,r).process(i)}_processLabel(e,t,r){if(this.labelDirty===!1&&!this.differentState(t,r))return;const i=this._processLabelText(e,t,r,this.elementOptions.label);this.fontOptions.minWdt>0&&i.width<this.fontOptions.minWdt&&(i.width=this.fontOptions.minWdt),this.size.labelHeight=i.height,this.fontOptions.minHgt>0&&i.height<this.fontOptions.minHgt&&(i.height=this.fontOptions.minHgt),this.lines=i.lines,this.lineCount=i.lines.length,this.size.width=i.width,this.size.height=i.height,this.selectedState=t,this.hoverState=r,this.labelDirty=!1}visible(){return!(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0||this.fontOptions.size*this.body.view.scale<this.elementOptions.scaling.label.drawThreshold-1)}};var Q2={},hf,J2;function mre(){if(J2)return hf;J2=1;var n=$r(),e=pC(),t=Mi();return hf=function(i){for(var o=n(this),s=t(o),a=arguments.length,g=e(a>1?arguments[1]:void 0,s),A=a>2?arguments[2]:void 0,I=A===void 0?s:e(A,s);I>g;)o[g++]=i;return o},hf}var eN;function yre(){if(eN)return Q2;eN=1;var n=ie(),e=mre(),t=bS();return n({target:"Array",proto:!0},{fill:e}),t("fill"),Q2}var cf,tN;function bre(){if(tN)return cf;tN=1,yre();var n=Ft();return cf=n("Array","fill"),cf}var ff,rN;function wre(){if(rN)return ff;rN=1;var n=ut(),e=bre(),t=Array.prototype;return ff=function(r){var i=r.fill;return r===t||n(t,r)&&i===t.fill?e:i},ff}var pf,iN;function Ere(){if(iN)return pf;iN=1;var n=wre();return pf=n,pf}var vf,nN;function Sre(){return nN||(nN=1,vf=Ere()),vf}var Ore=Sre(),xC=de(Ore);let ho=class{constructor(e,t,r){this.body=t,this.labelModule=r,this.setOptions(e),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}setOptions(e){this.options=e}_setMargins(e){this.margin={},this.options.margin&&(typeof this.options.margin=="object"?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),e.adjustSizes(this.margin)}_distanceToBorder(e,t){const r=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+r}enableShadow(e,t){t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}enableBorderDashes(e,t){if(t.borderDashes!==!1)if(e.setLineDash!==void 0){let r=t.borderDashes;r===!0&&(r=[5,15]),e.setLineDash(r)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1}disableBorderDashes(e,t){t.borderDashes!==!1&&(e.setLineDash!==void 0?e.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1))}needsRefresh(e,t){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,t)}initContextForDraw(e,t){const r=t.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,r),e.strokeStyle=t.borderColor,e.fillStyle=t.color}performStroke(e,t){const r=t.borderWidth/this.body.view.scale;e.save(),r>0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}performFill(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),xC(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,t,r,i,o){r!==void 0&&this.resize(r,i,o),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}updateBoundingBox(e,t,r,i,o){this._updateBoundingBox(e,t,r,i,o)}getDimensionsFromLabel(e,t,r){this.textSize=this.labelModule.getTextSize(e,t,r);let i=this.textSize.width,o=this.textSize.height;const s=14;return i===0&&(i=s,o=s),{width:i,height:o}}},Tre=class extends ho{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,r)){const i=this.getDimensionsFromLabel(e,t,r);this.width=i.width+this.margin.right+this.margin.left,this.height=i.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,t,r,i,o,s){this.resize(e,i,o),this.left=t-this.width/2,this.top=r-this.height/2,this.initContextForDraw(e,s),yH(e,this.left,this.top,this.width,this.height,s.borderRadius),this.performFill(e,s),this.updateBoundingBox(t,r,e,i,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,o)}updateBoundingBox(e,t,r,i,o){this._updateBoundingBox(e,t,r,i,o);const s=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(s)}distanceToBorder(e,t){e&&this.resize(e);const r=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+r}},qS=class extends ho{constructor(e,t,r){super(e,t,r),this.labelOffset=0,this.selected=!1}setOptions(e,t,r){this.options=e,t===void 0&&r===void 0||this.setImages(t,r)}setImages(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}switchImages(e){const t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){const r=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=r}}_getImagePadding(){const e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){const t=this.options.imagePadding;typeof t=="object"?(e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left):(e.top=t,e.right=t,e.bottom=t,e.left=t)}return e}_resizeImage(){let e,t;if(this.options.shapeProperties.useImageSize===!1){let r=1,i=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?r=this.imageObj.width/this.imageObj.height:i=this.imageObj.height/this.imageObj.width),e=this.options.size*2*r,t=this.options.size*2*i}else{const r=this._getImagePadding();e=this.imageObj.width+r.left+r.right,t=this.imageObj.height+r.top+r.bottom}this.width=e,this.height=t,this.radius=.5*this.width}_drawRawCircle(e,t,r,i){this.initContextForDraw(e,i),CS(e,t,r,i.size),this.performFill(e,i)}_drawImageAtPosition(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity!==void 0?t.opacity:1,this.enableShadow(e,t);let r=1;this.options.shapeProperties.interpolation===!0&&(r=this.imageObj.width/this.width/this.body.view.scale);const i=this._getImagePadding(),o=this.left+i.left,s=this.top+i.top,a=this.width-i.left-i.right,g=this.height-i.top-i.bottom;this.imageObj.drawImageAtPosition(e,r,o,s,a,g),this.disableShadow(e,t)}}_drawImageLabel(e,t,r,i,o){let s=0;if(this.height!==void 0){s=this.height*.5;const g=this.labelModule.getTextSize(e,i,o);g.lineCount>=1&&(s+=g.height/2)}const a=r+s;this.options.label&&(this.labelOffset=s),this.labelModule.draw(e,t,a,i,o,"hanging")}},_re=class extends qS{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,r)){const i=this.getDimensionsFromLabel(e,t,r),o=Math.max(i.width+this.margin.right+this.margin.left,i.height+this.margin.top+this.margin.bottom);this.options.size=o/2,this.width=o,this.height=o,this.radius=this.width/2}}draw(e,t,r,i,o,s){this.resize(e,i,o),this.left=t-this.width/2,this.top=r-this.height/2,this._drawRawCircle(e,t,r,s),this.updateBoundingBox(t,r),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,r,i,o)}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size}distanceToBorder(e){return e&&this.resize(e),this.width*.5}},Pre=class extends qS{constructor(e,t,r,i,o){super(e,t,r),this.setImages(i,o)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const o=this.options.size*2;this.width=o,this.height=o,this.radius=.5*this.width;return}this.needsRefresh(t,r)&&this._resizeImage()}draw(e,t,r,i,o,s){this.switchImages(i),this.resize();let a=t,g=r;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=r,a+=this.width/2,g+=this.height/2):(this.left=t-this.width/2,this.top=r-this.height/2),this._drawRawCircle(e,a,g,s),e.save(),e.clip(),this._drawImageAtPosition(e,s),e.restore(),this._drawImageLabel(e,a,g,i,o),this.updateBoundingBox(t,r)}updateBoundingBox(e,t){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=t+this.options.size*2):(this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}},pn=class extends ho{constructor(e,t,r){super(e,t,r)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,r)){var o,s;this.labelModule.getTextSize(e,t,r);const a=2*i.size;this.width=(o=this.customSizeWidth)!==null&&o!==void 0?o:a,this.height=(s=this.customSizeHeight)!==null&&s!==void 0?s:a,this.radius=.5*this.width}}_drawShape(e,t,r,i,o,s,a,g){return this.resize(e,s,a,g),this.left=i-this.width/2,this.top=o-this.height/2,this.initContextForDraw(e,g),uX(t)(e,i,o,g.size),this.performFill(e,g),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(s?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",e.fillText(this.options.icon.code,i,o)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,s,a,i,o,"hanging");const A=o+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,i,A,s,a,"hanging")}this.updateBoundingBox(i,o)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}};function oN(n,e){var t=At(n);if(In){var r=In(n);e&&(r=ki(r).call(r,function(i){return fn(n,i).enumerable})),t.push.apply(t,r)}return t}function Rre(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?ze(t=oN(Object(i),!0)).call(t,function(o){pi(n,o,i[o])}):Cn?PC(n,Cn(i)):ze(r=oN(Object(i))).call(r,function(o){RC(n,o,fn(i,o))})}return n}let xre=class extends pn{constructor(e,t,r,i){super(e,t,r,i),this.ctxRenderer=i}draw(e,t,r,i,o,s){this.resize(e,i,o,s),this.left=t-this.width/2,this.top=r-this.height/2,e.save();const a=this.ctxRenderer({ctx:e,id:this.options.id,x:t,y:r,state:{selected:i,hover:o},style:Rre({},s),label:this.options.label});if(a.drawNode!=null&&a.drawNode(),e.restore(),a.drawExternalLabel){const g=a.drawExternalLabel;a.drawExternalLabel=()=>{e.save(),g(),e.restore()}}return a.nodeDimensions&&(this.customSizeWidth=a.nodeDimensions.width,this.customSizeHeight=a.nodeDimensions.height),a}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},$re=class extends ho{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e,t,r){if(this.needsRefresh(t,r)){const o=this.getDimensionsFromLabel(e,t,r).width+this.margin.right+this.margin.left;this.width=o,this.height=o,this.radius=this.width/2}}draw(e,t,r,i,o,s){this.resize(e,i,o),this.left=t-this.width/2,this.top=r-this.height/2,this.initContextForDraw(e,s),bH(e,t-this.width/2,r-this.height/2,this.width,this.height),this.performFill(e,s),this.updateBoundingBox(t,r,e,i,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},Dre=class extends pn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"diamond",4,t,r,i,o,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},Nre=class extends pn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"circle",2,t,r,i,o,s)}distanceToBorder(e){return e&&this.resize(e),this.options.size}},sN=class extends ho{constructor(e,t,r){super(e,t,r)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,r)){const i=this.getDimensionsFromLabel(e,t,r);this.height=i.height*2,this.width=i.width+i.height,this.radius=.5*this.width}}draw(e,t,r,i,o,s){this.resize(e,i,o),this.left=t-this.width*.5,this.top=r-this.height*.5,this.initContextForDraw(e,s),Kw(e,this.left,this.top,this.width,this.height),this.performFill(e,s),this.updateBoundingBox(t,r,e,i,o),this.labelModule.draw(e,t,r,i,o)}distanceToBorder(e,t){e&&this.resize(e);const r=this.width*.5,i=this.height*.5,o=Math.sin(t)*r,s=Math.cos(t)*i;return r*i/Math.sqrt(o*o+s*s)}},Mre=class extends ho{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e,t,r){this.needsRefresh(t,r)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,r,i,o,s){return this.resize(e,i,o),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=r-this.height/2,this._icon(e,t,r,i,o,s),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,r+this.height/2+5,i),this.updateBoundingBox(t,r)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=t+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}_icon(e,t,r,i,o,s){const a=Number(this.options.icon.size);this.options.icon.code!==void 0?(e.font=[this.options.icon.weight!=null?this.options.icon.weight:i?"bold":"",(this.options.icon.weight!=null&&i?5:0)+a+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,s),e.fillText(this.options.icon.code,t,r),this.disableShadow(e,s)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},kre=class extends qS{constructor(e,t,r,i,o){super(e,t,r),this.setImages(i,o)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const o=this.options.size*2;this.width=o,this.height=o;return}this.needsRefresh(t,r)&&this._resizeImage()}draw(e,t,r,i,o,s){e.save(),this.switchImages(i),this.resize();let a=t,g=r;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=r,a+=this.width/2,g+=this.height/2):(this.left=t-this.width/2,this.top=r-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){const A=this.options.borderWidth,I=this.options.borderWidthSelected||2*this.options.borderWidth,C=(i?I:A)/this.body.view.scale;e.lineWidth=Math.min(this.width,C),e.beginPath();let l=i?this.options.color.highlight.border:o?this.options.color.hover.border:this.options.color.border,d=i?this.options.color.highlight.background:o?this.options.color.hover.background:this.options.color.background;s.opacity!==void 0&&(l=Tr(l,s.opacity),d=Tr(d,s.opacity)),e.strokeStyle=l,e.fillStyle=d,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),xC(e).call(e),this.performStroke(e,s),e.closePath()}this._drawImageAtPosition(e,s),this._drawImageLabel(e,a,g,i,o),this.updateBoundingBox(t,r),e.restore()}updateBoundingBox(e,t){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=e,this.top=t):(this.left=e-this.width/2,this.top=t-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},Fre=class extends pn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"square",2,t,r,i,o,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},Bre=class extends pn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"hexagon",4,t,r,i,o,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},qre=class extends pn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"star",4,t,r,i,o,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},zre=class extends ho{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e,t,r){this.needsRefresh(t,r)&&(this.textSize=this.labelModule.getTextSize(e,t,r),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,r,i,o,s){this.resize(e,i,o),this.left=t-this.width/2,this.top=r-this.height/2,this.enableShadow(e,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,o),this.disableShadow(e,s),this.updateBoundingBox(t,r,e,i,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},jre=class extends pn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"triangle",3,t,r,i,o,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},Lre=class extends pn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"triangleDown",3,t,r,i,o,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};function aN(n,e){var t=At(n);if(In){var r=In(n);e&&(r=ki(r).call(r,function(i){return fn(n,i).enumerable})),t.push.apply(t,r)}return t}function gN(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?ze(t=aN(Object(i),!0)).call(t,function(o){pi(n,o,i[o])}):Cn?PC(n,Cn(i)):ze(r=aN(Object(i))).call(r,function(o){RC(n,o,fn(i,o))})}return n}let cr=class Gr{constructor(e,t,r,i,o,s){this.options=Ji(o),this.globalOptions=o,this.defaultOptions=s,this.body=t,this.edges=[],this.id=void 0,this.imagelist=r,this.grouplist=i,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new j4(this.body,this.options,!1),this.setOptions(e)}attachEdge(e){var t;Ue(t=this.edges).call(t,e)===-1&&this.edges.push(e)}detachEdge(e){var t;const r=Ue(t=this.edges).call(t,e);if(r!=-1){var i;en(i=this.edges).call(i,r,1)}}setOptions(e){const t=this.options.shape;if(!e)return;if(typeof e.color<"u"&&(this._localColor=e.color),e.id!==void 0&&(this.id=e.id),this.id===void 0)throw new Error("Node must have an id");Gr.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=i2(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=i2(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=B4(e.value)),Gr.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);const r=[e,this.options,this.defaultOptions];return this.chooser=BS("node",r),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&Gr.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(t),e.hidden!==void 0||e.physics!==void 0}_load_images(){if((this.options.shape==="circularImage"||this.options.shape==="image")&&this.options.image===void 0)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(this.options.image!==void 0){if(this.imagelist===void 0)throw new Error("Internal Error: No images provided");if(typeof this.options.image=="string")this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(this.options.image.unselected===void 0)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.options.image.selected!==void 0?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}static checkOpacity(e){return 0<=e&&e<=1}static checkCoordinateOrigin(e){return e===void 0||e==="center"||e==="top-left"}static updateGroupOptions(e,t,r){var i;if(r===void 0)return;const o=e.group;if(t!==void 0&&t.group!==void 0&&o!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");if(!(typeof o=="number"||typeof o=="string"&&o!=""))return;const a=r.get(o);a.opacity!==void 0&&t.opacity===void 0&&(Gr.checkOpacity(a.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+a.opacity),a.opacity=void 0));const g=ki(i=Fte(t)).call(i,A=>t[A]!=null);g.push("font"),jI(g,e,a),e.color=tE(e.color)}static parseOptions(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0;if(jI(["color","fixed","shadow"],e,t,r),Gr.checkMass(t),e.opacity!==void 0&&(Gr.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(Gr.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!Gr.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),Sr(e,t,"shadow",i),t.color!==void 0&&t.color!==null){const a=tE(t.color);JH(e.color,a)}else r===!0&&t.color===null&&(e.color=Ji(i.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),r===!0&&t.font===null&&(e.font=Ji(i.font)),Gr.updateGroupOptions(e,t,o),t.scaling!==void 0&&Sr(e.scaling,t.scaling,"label",i.scaling)}getFormattingValues(){const e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){const t=this.options.opacity;e.borderColor=Tr(e.borderColor,t),e.color=Tr(e.color,t),e.shadowColor=Tr(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),Gr.updateGroupOptions(this.options,gN(gN({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);const t=this.grouplist.get(this.options.group,!1),r=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,r),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new Tre(this.options,this.body,this.labelModule);break;case"circle":this.shape=new _re(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new Pre(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new xre(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new $re(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Dre(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Nre(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new sN(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Mre(this.options,this.body,this.labelModule);break;case"image":this.shape=new kre(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Fre(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Bre(this.options,this.body,this.labelModule);break;case"star":this.shape=new qre(this.options,this.body,this.labelModule);break;case"text":this.shape=new zre(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new jre(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Lre(this.options,this.body,this.labelModule);break;default:this.shape=new sN(this.options,this.body,this.labelModule);break}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,t){return this.shape.distanceToBorder(e,t)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,t,r){if(this.options.value!==void 0){const i=this.options.scaling.customScalingFunction(e,t,r,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+i*s}this.options.size=this.options.scaling.min+i*o}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){const t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){const t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}getItemsOnPoint(e){const t=[];return this.labelModule.visible()&&aE(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),aE(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}isOverlappingWith(e){return this.shape.left<e.right&&this.shape.left+this.shape.width>e.left&&this.shape.top<e.bottom&&this.shape.top+this.shape.height>e.top}isBoundingBoxOverlappingWith(e){return this.shape.boundingBox.left<e.right&&this.shape.boundingBox.right>e.left&&this.shape.boundingBox.top<e.bottom&&this.shape.boundingBox.bottom>e.top}static checkMass(e,t){if(e.mass!==void 0&&e.mass<=0){let r="";t!==void 0&&(r=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+r+", setting mass to 1.",i4),e.mass=1}}},Gre=class{constructor(e,t,r,i){var o;if(this.body=e,this.images=t,this.groups=r,this.layoutEngine=i,this.body.functions.createNode=q(o=this.create).call(o,this),this.nodesListeners={add:(s,a)=>{this.add(a.items)},update:(s,a)=>{this.update(a.items,a.data,a.oldData)},remove:(s,a)=>{this.remove(a.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,a,g,A){if(a===s)return .5;{const I=1/(a-s);return Math.max(0,(A-s)*I)}}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=Ji(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on("refreshNodes",q(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",q(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",()=>{pe(this.nodesListeners,(r,i)=>{this.body.data.nodes&&this.body.data.nodes.off(i,r)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(cr.parseOptions(this.options,e),e.opacity!==void 0&&(oE(e.opacity)||!Fn(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(const t of At(this.body.nodes))this.body.nodes[t].updateLabelModule(),this.body.nodes[t].needsRefresh();if(e.size!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.body.data.nodes;if(S4("id",e))this.body.data.nodes=e;else if(Hr(e))this.body.data.nodes=new Ps,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new Ps;else throw new TypeError("Array or DataSet expected");if(r&&pe(this.nodesListeners,function(i,o){r.off(o,i)}),this.body.nodes={},this.body.data.nodes){const i=this;pe(this.nodesListeners,function(s,a){i.body.data.nodes.on(a,s)});const o=this.body.data.nodes.getIds();this.add(o,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r;const i=[];for(let o=0;o<e.length;o++){r=e[o];const s=this.body.data.nodes.get(r),a=this.create(s);i.push(a),this.body.nodes[r]=a}this.layoutEngine.positionInitially(i),t===!1&&this.body.emitter.emit("_dataChanged")}update(e,t,r){const i=this.body.nodes;let o=!1;for(let s=0;s<e.length;s++){const a=e[s];let g=i[a];const A=t[s];g!==void 0?g.setOptions(A)&&(o=!0):(o=!0,g=this.create(A),i[a]=g)}!o&&r!==void 0&&(o=HJ(t).call(t,function(s,a){const g=r[a];return g&&g.level!==s.level})),o===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}remove(e){const t=this.body.nodes;for(let r=0;r<e.length;r++){const i=e[r];delete t[i]}this.body.emitter.emit("_dataChanged")}create(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cr;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;pe(this.body.nodes,(t,r)=>{const i=this.body.data.nodes.get(r);i!==void 0&&(e===!0&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(i))})}getPositions(e){const t={};if(e!==void 0){if(Hr(e)===!0){for(let r=0;r<e.length;r++)if(this.body.nodes[e[r]]!==void 0){const i=this.body.nodes[e[r]];t[e[r]]={x:Math.round(i.x),y:Math.round(i.y)}}}else if(this.body.nodes[e]!==void 0){const r=this.body.nodes[e];t[e]={x:Math.round(r.x),y:Math.round(r.y)}}}else for(let r=0;r<this.body.nodeIndices.length;r++){const i=this.body.nodes[this.body.nodeIndices[r]];t[this.body.nodeIndices[r]]={x:Math.round(i.x),y:Math.round(i.y)}}return t}getPosition(e){if(e==null)throw new TypeError("No id was specified for getPosition method.");if(this.body.nodes[e]==null)throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(e));return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}storePositions(){const e=[],t=this.body.data.nodes.getDataSet();for(const r of t.get()){const i=r.id,o=this.body.nodes[i],s=Math.round(o.x),a=Math.round(o.y);(r.x!==s||r.y!==a)&&e.push({id:i,x:s,y:a})}t.update(e)}getBoundingBox(e){if(this.body.nodes[e]!==void 0)return this.body.nodes[e].shape.boundingBox}getConnectedNodes(e,t){const r=[];if(this.body.nodes[e]!==void 0){const i=this.body.nodes[e],o={};for(let s=0;s<i.edges.length;s++){const a=i.edges[s];t!=="to"&&a.toId==i.id?o[a.fromId]===void 0&&(r.push(a.fromId),o[a.fromId]=!0):t!=="from"&&a.fromId==i.id&&o[a.toId]===void 0&&(r.push(a.toId),o[a.toId]=!0)}}return r}getConnectedEdges(e){const t=[];if(this.body.nodes[e]!==void 0){const r=this.body.nodes[e];for(let i=0;i<r.edges.length;i++)t.push(r.edges[i].id)}else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return t}moveNode(e,t,r){this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(r),ls(()=>{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}};var AN={},mf,IN;function Wre(){if(IN)return mf;IN=1;var n=Qs(),e=Mr(),t=Di(),r=RangeError;return mf=function(o){var s=e(t(this)),a="",g=n(o);if(g<0||g===1/0)throw new r("Wrong number of repetitions");for(;g>0;(g>>>=1)&&(s+=s))g&1&&(a+=s);return a},mf}var yf,CN;function Vre(){if(CN)return yf;CN=1;var n=ye(),e=vH(),t=Mr(),r=Wre(),i=Di(),o=n(r),s=n("".slice),a=Math.ceil,g=function(A){return function(I,C,l){var d=t(i(I)),u=e(C),h=d.length,p=l===void 0?" ":t(l),f,c;return u<=h||p===""?d:(f=u-h,c=o(p,a(f/p.length)),c.length>f&&(c=s(c,0,f)),A?d+c:c+d)}};return yf={start:g(!1),end:g(!0)},yf}var bf,lN;function Zre(){if(lN)return bf;lN=1;var n=ye(),e=me(),t=Vre().start,r=RangeError,i=isFinite,o=Math.abs,s=Date.prototype,a=s.toISOString,g=n(s.getTime),A=n(s.getUTCDate),I=n(s.getUTCFullYear),C=n(s.getUTCHours),l=n(s.getUTCMilliseconds),d=n(s.getUTCMinutes),u=n(s.getUTCMonth),h=n(s.getUTCSeconds);return bf=e(function(){return a.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){a.call(new Date(NaN))})?function(){if(!i(g(this)))throw new r("Invalid time value");var f=this,c=I(f),m=l(f),v=c<0?"-":c>9999?"+":"";return v+t(o(c),v?6:4,0)+"-"+t(u(f)+1,2,0)+"-"+t(A(f),2,0)+"T"+t(C(f),2,0)+":"+t(d(f),2,0)+":"+t(h(f),2,0)+"."+t(m,3,0)+"Z"}:a,bf}var dN;function Hre(){if(dN)return AN;dN=1;var n=ie(),e=Ir(),t=$r(),r=hH(),i=Zre(),o=Ci(),s=me(),a=s(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return n({target:"Date",proto:!0,forced:a},{toJSON:function(A){var I=t(this),C=r(I,"number");return typeof C=="number"&&!isFinite(C)?null:!("toISOString"in I)&&o(I)==="Date"?e(i,I):I.toISOString()}}),AN}var wf,uN;function Ure(){if(uN)return wf;uN=1,Hre(),P4();var n=Pe(),e=lC();return n.JSON||(n.JSON={stringify:JSON.stringify}),wf=function(r,i,o){return e(n.JSON.stringify,null,arguments)},wf}var Ef,hN;function Yre(){if(hN)return Ef;hN=1;var n=Ure();return Ef=n,Ef}var Sf,cN;function Kre(){return cN||(cN=1,Sf=Yre()),Sf}var Xre=Kre(),L4=de(Xre),fN={},pN;function Qre(){if(pN)return fN;pN=1;var n=ie(),e=Math.hypot,t=Math.abs,r=Math.sqrt,i=!!e&&e(1/0,NaN)!==1/0;return n({target:"Math",stat:!0,arity:2,forced:i},{hypot:function(s,a){for(var g=0,A=0,I=arguments.length,C=0,l,d;A<I;)l=t(arguments[A++]),C<l?(d=C/l,g=g*d*d+1,C=l):l>0?(d=l/C,g+=d*d):g+=l;return C===1/0?1/0:C*r(g)}}),fN}var Of,vN;function Jre(){if(vN)return Of;vN=1,Qre();var n=Pe();return Of=n.Math.hypot,Of}var Tf,mN;function eie(){if(mN)return Tf;mN=1;var n=Jre();return Tf=n,Tf}var _f,yN;function tie(){return yN||(yN=1,_f=eie()),_f}var rie=tie(),iie=de(rie);let ot=class{static transform(e,t){Hr(e)||(e=[e]);const r=t.point.x,i=t.point.y,o=t.angle,s=t.length;for(let a=0;a<e.length;++a){const g=e[a],A=g.x*Math.cos(o)-g.y*Math.sin(o),I=g.x*Math.sin(o)+g.y*Math.cos(o);g.x=r+s*A,g.y=i+s*I}}static drawPath(e,t){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(let r=1;r<t.length;++r)e.lineTo(t[r].x,t[r].y);e.closePath()}},nie=class extends ot{static draw(e,t){if(t.image){e.save(),e.translate(t.point.x,t.point.y),e.rotate(Math.PI/2+t.angle);const r=t.imageWidth!=null?t.imageWidth:t.image.width,i=t.imageHeight!=null?t.imageHeight:t.image.height;t.image.drawImageAtPosition(e,1,-r/2,0,r,i),e.restore()}return!1}},oie=class extends ot{static draw(e,t){const r=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return ot.transform(r,t),ot.drawPath(e,r),!0}},sie=class{static draw(e,t){const r=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return ot.transform(r,t),ot.drawPath(e,r),!0}},aie=class{static draw(e,t){const r={x:-.4,y:0};ot.transform(r,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";const i=Math.PI,o=t.angle-i/2,s=t.angle+i/2;return e.beginPath(),e.arc(r.x,r.y,t.length*.4,o,s,!1),e.stroke(),!0}},gie=class{static draw(e,t){const r={x:-.3,y:0};ot.transform(r,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";const i=Math.PI,o=t.angle+i/2,s=t.angle+3*i/2;return e.beginPath(),e.arc(r.x,r.y,t.length*.4,o,s,!1),e.stroke(),!0}},Aie=class{static draw(e,t){const r=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return ot.transform(r,t),ot.drawPath(e,r),!0}},Iie=class{static draw(e,t){const r=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return ot.transform(r,t),ot.drawPath(e,r),!0}},Cie=class{static draw(e,t){const r={x:-.4,y:0};return ot.transform(r,t),CS(e,r.x,r.y,t.length*.4),!0}},lie=class{static draw(e,t){const r=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return ot.transform(r,t),ot.drawPath(e,r),!0}},die=class{static draw(e,t){const r=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return ot.transform(r,t),ot.drawPath(e,r),!0}},uie=class{static draw(e,t){const r=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return ot.transform(r,t),ot.drawPath(e,r),!0}},hie=class{static draw(e,t){const r=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return ot.transform(r,t),ot.drawPath(e,r),!0}},G4=class{static draw(e,t){let r;switch(t.type&&(r=t.type.toLowerCase()),r){case"image":return nie.draw(e,t);case"circle":return Cie.draw(e,t);case"box":return die.draw(e,t);case"crow":return sie.draw(e,t);case"curve":return aie.draw(e,t);case"diamond":return uie.draw(e,t);case"inv_curve":return gie.draw(e,t);case"triangle":return Aie.draw(e,t);case"inv_triangle":return Iie.draw(e,t);case"bar":return lie.draw(e,t);case"vee":return hie.draw(e,t);case"arrow":default:return oie.draw(e,t)}}};function bN(n,e){var t=At(n);if(In){var r=In(n);e&&(r=ki(r).call(r,function(i){return fn(n,i).enumerable})),t.push.apply(t,r)}return t}function wN(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?ze(t=bN(Object(i),!0)).call(t,function(o){pi(n,o,i[o])}):Cn?PC(n,Cn(i)):ze(r=bN(Object(i))).call(r,function(o){RC(n,o,fn(i,o))})}return n}let W4=class{constructor(e,t,r){pi(this,"color",{}),pi(this,"colorDirty",!0),pi(this,"hoverWidth",1.5),pi(this,"selectionWidth",2),this._body=t,this._labelModule=r,this.setOptions(e),this.fromPoint=this.from,this.toPoint=this.to}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}cleanup(){return!1}setOptions(e){this.options=e,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}drawLine(e,t,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,o):this._drawLine(e,t,o)}_drawLine(e,t,r,i,o){if(this.from!=this.to)this._line(e,t,r,i,o);else{const[s,a,g]=this._getCircleData(e);this._circle(e,t,s,a,g)}}_drawDashedLine(e,t,r,i,o){e.lineCap="round";const s=Hr(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,r);else{const[a,g,A]=this._getCircleData(e);this._circle(e,t,a,g,A)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)wH(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{const[a,g,A]=this._getCircleData(e);this._circle(e,t,a,g,A)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}findBorderPosition(e,t,r){return this.from!=this.to?this._findBorderPosition(e,t,r):this._findBorderPositionCircle(e,t,r)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var t;const[r,i]=Uo(t=this._getCircleData(e)).call(t,0,2);return{from:this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:.6,high:.8,direction:1})}}}_getCircleData(e){const t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);const r=q4(e,this.options.selfReference.angle,t,this.from);return[r.x,r.y,t]}_pointOnCircle(e,t,r,i){const o=i*2*Math.PI;return{x:e+r*Math.cos(o),y:t-r*Math.sin(o)}}_findBorderPositionCircle(e,t,r){const i=r.x,o=r.y;let s=r.low,a=r.high;const g=r.direction,A=10,I=this.options.selfReference.size,C=.05;let l,d=(s+a)*.5,u=0;this.options.arrowStrikethrough===!0&&(g===-1?u=this.options.endPointOffset.from:g===1&&(u=this.options.endPointOffset.to));let h=0;do{d=(s+a)*.5,l=this._pointOnCircle(i,o,I,d);const p=Math.atan2(e.y-l.y,e.x-l.x),f=e.distanceToBorder(t,p)+u,c=Math.sqrt(Math.pow(l.x-e.x,2)+Math.pow(l.y-e.y,2)),m=f-c;if(Math.abs(m)<C)break;m>0?g>0?s=d:a=d:g>0?a=d:s=d,++h}while(s<=a&&h<A);return wN(wN({},l),{},{t:d})}getLineWidth(e,t){return e===!0?Math.max(this.selectionWidth,.3/this._body.view.scale):t===!0?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}getColor(e,t){if(t.inheritsColor!==!1){if(t.inheritsColor==="both"&&this.from.id!==this.to.id){const r=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y);let i=this.from.options.color.highlight.border,o=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(i=Tr(this.from.options.color.border,t.opacity),o=Tr(this.to.options.color.border,t.opacity)):this.from.selected===!0&&this.to.selected===!1?o=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(i=this.from.options.color.border),r.addColorStop(0,i),r.addColorStop(1,o),r}return t.inheritsColor==="to"?Tr(this.to.options.color.border,t.opacity):Tr(this.from.options.color.border,t.opacity)}else return Tr(t.color,t.opacity)}_circle(e,t,r,i,o){this.enableShadow(e,t);let s=0,a=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){const g=this.options.selfReference.angle,A=this.options.selfReference.angle+Math.PI,I=this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:g,high:A,direction:-1}),C=this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:g,high:A,direction:1});s=Math.atan2(I.y-i,I.x-r),a=Math.atan2(C.y-i,C.x-r)}e.beginPath(),e.arc(r,i,o,s,a,!1),e.stroke(),this.disableShadow(e,t)}getDistanceToEdge(e,t,r,i,o,s){if(this.from!=this.to)return this._getDistanceToEdge(e,t,r,i,o,s);{const[a,g,A]=this._getCircleData(void 0),I=a-o,C=g-s;return Math.abs(Math.sqrt(I*I+C*C)-A)}}_getDistanceToLine(e,t,r,i,o,s){const a=r-e,g=i-t,A=a*a+g*g;let I=((o-e)*a+(s-t)*g)/A;I>1?I=1:I<0&&(I=0);const C=e+I*a,l=t+I*g,d=C-o,u=l-s;return Math.sqrt(d*d+u*u)}getArrowData(e,t,r,i,o,s){let a,g,A,I,C,l,d;const u=s.width;t==="from"?(A=this.from,I=this.to,C=s.fromArrowScale<0,l=Math.abs(s.fromArrowScale),d=s.fromArrowType):t==="to"?(A=this.to,I=this.from,C=s.toArrowScale<0,l=Math.abs(s.toArrowScale),d=s.toArrowType):(A=this.to,I=this.from,C=s.middleArrowScale<0,l=Math.abs(s.middleArrowScale),d=s.middleArrowType);const h=15*l+3*u;if(A!=I){const m=iie(A.x-I.x,A.y-I.y),v=h/m;if(t!=="middle")if(this.options.smooth.enabled===!0){const y=this._findBorderPosition(A,e,{via:r}),w=this.getPoint(y.t+v*(t==="from"?1:-1),r);a=Math.atan2(y.y-w.y,y.x-w.x),g=y}else a=Math.atan2(A.y-I.y,A.x-I.x),g=this._findBorderPosition(A,e);else{const y=(C?-v:v)/2,w=this.getPoint(.5+y,r),S=this.getPoint(.5-y,r);a=Math.atan2(w.y-S.y,w.x-S.x),g=this.getPoint(.5,r)}}else{const[m,v,y]=this._getCircleData(e);if(t==="from"){const w=this.options.selfReference.angle,S=this.options.selfReference.angle+Math.PI,b=this._findBorderPositionCircle(this.from,e,{x:m,y:v,low:w,high:S,direction:-1});a=b.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,g=b}else if(t==="to"){const w=this.options.selfReference.angle,S=this.options.selfReference.angle+Math.PI,b=this._findBorderPositionCircle(this.from,e,{x:m,y:v,low:w,high:S,direction:1});a=b.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,g=b}else{const w=this.options.selfReference.angle/(2*Math.PI);g=this._pointOnCircle(m,v,y,w),a=w*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const p=g.x-h*.9*Math.cos(a),f=g.y-h*.9*Math.sin(a);return{point:g,core:{x:p,y:f},angle:a,length:h,type:d}}drawArrowHead(e,t,r,i,o){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,G4.draw(e,o)&&(this.enableShadow(e,t),xC(e).call(e),this.disableShadow(e,t))}enableShadow(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,t){if(t.background!==!1){const r={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=r.strokeStyle,e.lineWidth=r.lineWidth,e.dashes=r.dashes,this.setStrokeDashed(e,t.dashes)}}setStrokeDashed(e,t){if(t!==!1)if(e.setLineDash!==void 0){const r=Hr(t)?t:[5,5];e.setLineDash(r)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}};function EN(n,e){var t=At(n);if(In){var r=In(n);e&&(r=ki(r).call(r,function(i){return fn(n,i).enumerable})),t.push.apply(t,r)}return t}function SN(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?ze(t=EN(Object(i),!0)).call(t,function(o){pi(n,o,i[o])}):Cn?PC(n,Cn(i)):ze(r=EN(Object(i))).call(r,function(o){RC(n,o,fn(i,o))})}return n}let zS=class extends W4{constructor(e,t,r){super(e,t,r)}_findBorderPositionBezier(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates();const i=10,o=.2;let s=!1,a=1,g=0,A=this.to,I,C,l=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(A=this.from,s=!0,l=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(l=0);let d=0;do{C=(g+a)*.5,I=this.getPoint(C,r);const u=Math.atan2(A.y-I.y,A.x-I.x),h=A.distanceToBorder(t,u)+l,p=Math.sqrt(Math.pow(I.x-A.x,2)+Math.pow(I.y-A.y,2)),f=h-p;if(Math.abs(f)<o)break;f<0?s===!1?g=C:a=C:s===!1?a=C:g=C,++d}while(g<=a&&d<i);return SN(SN({},I),{},{t:C})}_getDistanceToBezierEdge(e,t,r,i,o,s,a){let g=1e9,A,I,C,l,d,u=e,h=t;for(I=1;I<10;I++)C=.1*I,l=Math.pow(1-C,2)*e+2*C*(1-C)*a.x+Math.pow(C,2)*r,d=Math.pow(1-C,2)*t+2*C*(1-C)*a.y+Math.pow(C,2)*i,I>0&&(A=this._getDistanceToLine(u,h,l,d,o,s),g=A<g?A:g),u=l,h=d;return g}_bezierCurve(e,t,r,i){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),r!=null&&r.x!=null?i!=null&&i.x!=null?e.bezierCurveTo(r.x,r.y,i.x,i.y,this.toPoint.x,this.toPoint.y):e.quadraticCurveTo(r.x,r.y,this.toPoint.x,this.toPoint.y):e.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(e,t),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){return this._getViaCoordinates()}},ON=class extends zS{constructor(e,t,r){super(e,t,r),pi(this,"via",this.via),this._boundFunction=()=>{this.positionBezierNode()},this._body.emitter.on("_repositionBezierNodes",this._boundFunction)}setOptions(e){super.setOptions(e);let t=!1;this.options.physics!==e.physics&&(t=!0),this.options=e,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),t===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}setupSupportNode(){if(this.via===void 0){const e="edgeId:"+this.id,t=this._body.functions.createNode({id:e,shape:"circle",physics:!0,hidden:!0});this._body.nodes[e]=t,this.via=t,this.via.parentEdgeId=this.id,this.positionBezierNode()}}positionBezierNode(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}_line(e,t,r){this._bezierCurve(e,t,r)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){const[r,i,o]=this._getCircleData(),s=2*Math.PI*(1-e);return{x:r+o*Math.sin(s),y:i+o-o*(1-Math.cos(s))}}else return{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*t.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*t.y+Math.pow(e,2)*this.toPoint.y}}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t,this.via)}_getDistanceToEdge(e,t,r,i,o,s){return this._getDistanceToBezierEdge(e,t,r,i,o,s,this.via)}},TN=class extends zS{constructor(e,t,r){super(e,t,r)}_line(e,t,r){this._bezierCurve(e,t,r)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){const e=this.options.smooth.roundness,t=this.options.smooth.type;let r=Math.abs(this.from.x-this.to.x),i=Math.abs(this.from.y-this.to.y);if(t==="discrete"||t==="diagonalCross"){let o,s;r<=i?o=s=e*i:o=s=e*r,this.from.x>this.to.x&&(o=-o),this.from.y>=this.to.y&&(s=-s);let a=this.from.x+o,g=this.from.y+s;return t==="discrete"&&(r<=i?a=r<e*i?this.from.x:a:g=i<e*r?this.from.y:g),{x:a,y:g}}else if(t==="straightCross"){let o=(1-e)*r,s=(1-e)*i;return r<=i?(o=0,this.from.y<this.to.y&&(s=-s)):(this.from.x<this.to.x&&(o=-o),s=0),{x:this.to.x+o,y:this.to.y+s}}else if(t==="horizontal"){let o=(1-e)*r;return this.from.x<this.to.x&&(o=-o),{x:this.to.x+o,y:this.from.y}}else if(t==="vertical"){let o=(1-e)*i;return this.from.y<this.to.y&&(o=-o),{x:this.from.x,y:this.to.y+o}}else if(t==="curvedCW"){r=this.to.x-this.from.x,i=this.from.y-this.to.y;const o=Math.sqrt(r*r+i*i),s=Math.PI,g=(Math.atan2(i,r)+(e*.5+.5)*s)%(2*s);return{x:this.from.x+(e*.5+.5)*o*Math.sin(g),y:this.from.y+(e*.5+.5)*o*Math.cos(g)}}else if(t==="curvedCCW"){r=this.to.x-this.from.x,i=this.from.y-this.to.y;const o=Math.sqrt(r*r+i*i),s=Math.PI,g=(Math.atan2(i,r)+(-e*.5+.5)*s)%(2*s);return{x:this.from.x+(e*.5+.5)*o*Math.sin(g),y:this.from.y+(e*.5+.5)*o*Math.cos(g)}}else{let o,s;r<=i?o=s=e*i:o=s=e*r,this.from.x>this.to.x&&(o=-o),this.from.y>=this.to.y&&(s=-s);let a=this.from.x+o,g=this.from.y+s;return r<=i?this.from.x<=this.to.x?a=this.to.x<a?this.to.x:a:a=this.to.x>a?this.to.x:a:this.from.y>=this.to.y?g=this.to.y>g?this.to.y:g:g=this.to.y<g?this.to.y:g,{x:a,y:g}}}_findBorderPosition(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,r.via)}_getDistanceToEdge(e,t,r,i,o,s){let a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,r,i,o,s,a)}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const r=e,i=Math.pow(1-r,2)*this.fromPoint.x+2*r*(1-r)*t.x+Math.pow(r,2)*this.toPoint.x,o=Math.pow(1-r,2)*this.fromPoint.y+2*r*(1-r)*t.y+Math.pow(r,2)*this.toPoint.y;return{x:i,y:o}}},cie=class extends zS{constructor(e,t,r){super(e,t,r)}_getDistanceToBezierEdge2(e,t,r,i,o,s,a,g){let A=1e9,I=e,C=t;const l=[0,0,0,0];for(let d=1;d<10;d++){const u=.1*d;l[0]=Math.pow(1-u,3),l[1]=3*u*Math.pow(1-u,2),l[2]=3*Math.pow(u,2)*(1-u),l[3]=Math.pow(u,3);const h=l[0]*e+l[1]*a.x+l[2]*g.x+l[3]*r,p=l[0]*t+l[1]*a.y+l[2]*g.y+l[3]*i;if(d>0){const f=this._getDistanceToLine(I,C,h,p,o,s);A=f<A?f:A}I=h,C=p}return A}},_N=class extends cie{constructor(e,t,r){super(e,t,r)}_line(e,t,r){const i=r[0],o=r[1];this._bezierCurve(e,t,i,o)}_getViaCoordinates(){const e=this.from.x-this.to.x,t=this.from.y-this.to.y;let r,i,o,s;const a=this.options.smooth.roundness;return(Math.abs(e)>Math.abs(t)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(i=this.from.y,s=this.to.y,r=this.from.x-a*e,o=this.to.x+a*e):(i=this.from.y-a*t,s=this.to.y+a*t,r=this.from.x,o=this.to.x),[{x:r,y:i},{x:o,y:s}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t)}_getDistanceToEdge(e,t,r,i,o,s){let[a,g]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,t,r,i,o,s,a,g)}getPoint(e){let[t,r]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const i=e,o=[Math.pow(1-i,3),3*i*Math.pow(1-i,2),3*Math.pow(i,2)*(1-i),Math.pow(i,3)],s=o[0]*this.fromPoint.x+o[1]*t.x+o[2]*r.x+o[3]*this.toPoint.x,a=o[0]*this.fromPoint.y+o[1]*t.y+o[2]*r.y+o[3]*this.toPoint.y;return{x:s,y:a}}},PN=class extends W4{constructor(e,t,r){super(e,t,r)}_line(e,t){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,t){let r=this.to,i=this.from;e.id===this.from.id&&(r=this.from,i=this.to);const o=Math.atan2(r.y-i.y,r.x-i.x),s=r.x-i.x,a=r.y-i.y,g=Math.sqrt(s*s+a*a),A=e.distanceToBorder(t,o),I=(g-A)/g;return{x:(1-I)*i.x+I*r.x,y:(1-I)*i.y+I*r.y,t:0}}_getDistanceToEdge(e,t,r,i,o,s){return this._getDistanceToLine(e,t,r,i,o,s)}},us=class V4{constructor(e,t,r,i,o){if(t===void 0)throw new Error("No body provided");this.options=Ji(i),this.globalOptions=i,this.defaultOptions=o,this.body=t,this.imagelist=r,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new j4(this.body,this.options,!0),this.setOptions(e)}setOptions(e){if(!e)return;let t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;V4.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=B4(e.value));const r=[e,this.options,this.defaultOptions];return this.chooser=BS("edge",r),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}static parseOptions(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(ta(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,t,r),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(Fn(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=i.endPointOffset.from!==void 0?i.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(Fn(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=i.endPointOffset.to!==void 0?i.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),GI(t.label)?e.label=t.label:GI(e.label)||(e.label=void 0),Sr(e,t,"smooth",i),Sr(e,t,"shadow",i),Sr(e,t,"background",i),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:r===!0&&t.dashes===null&&(e.dashes=og(i.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),Sr(e.scaling,t.scaling,"label",i.scaling)):r===!0&&t.scaling===null&&(e.scaling=og(i.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const a=t.arrows.toLowerCase();e.arrows.to.enabled=Ue(a).call(a,"to")!=-1,e.arrows.middle.enabled=Ue(a).call(a,"middle")!=-1,e.arrows.from.enabled=Ue(a).call(a,"from")!=-1}else if(typeof t.arrows=="object")Sr(e.arrows,t.arrows,"to",i.arrows),Sr(e.arrows,t.arrows,"middle",i.arrows),Sr(e.arrows,t.arrows,"from",i.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+L4(t.arrows));else r===!0&&t.arrows===null&&(e.arrows=og(i.arrows));if(t.color!==void 0&&t.color!==null){const a=Is(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,g=e.color;if(o)Me(g,i.color,!1,r);else for(const A in g)Object.prototype.hasOwnProperty.call(g,A)&&delete g[A];if(Is(g))g.color=g,g.highlight=g,g.hover=g,g.inherit=!1,a.opacity===void 0&&(g.opacity=1);else{let A=!1;a.color!==void 0&&(g.color=a.color,A=!0),a.highlight!==void 0&&(g.highlight=a.highlight,A=!0),a.hover!==void 0&&(g.hover=a.hover,A=!0),a.inherit!==void 0&&(g.inherit=a.inherit),a.opacity!==void 0&&(g.opacity=Math.min(1,Math.max(0,a.opacity))),A===!0?g.inherit=!1:g.inherit===void 0&&(g.inherit="from")}}else r===!0&&t.color===null&&(e.color=Ji(i.color));r===!0&&t.font===null&&(e.font=Ji(i.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}getFormattingValues(){const e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,r=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,i=this.options.color.inherit,o={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:r,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:i?void 0:this.options.color.color,inheritsColor:i,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){const s=this.options.selectionWidth;typeof s=="function"?o.width=s(o.width):typeof s=="number"&&(o.width+=s),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.highlight,o.shadow=this.options.shadow.enabled}else if(this.hover){const s=this.options.hoverWidth;typeof s=="function"?o.width=s(o.width):typeof s=="number"&&(o.width+=s),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(o,this.options.id,this.selected,this.hover),o.color!==void 0&&(o.inheritsColor=!1),o.shadow===!1&&(o.shadowColor!==this.options.shadow.color||o.shadowSize!==this.options.shadow.size||o.shadowX!==this.options.shadow.x||o.shadowY!==this.options.shadow.y)&&(o.shadow=!0));else o.shadow=this.options.shadow.enabled,o.width=Math.max(o.width,.3/this.body.view.scale);return o}updateLabelModule(e){const t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){const e=this.options.smooth;let t=!1,r=!0;return this.edgeType!==void 0&&((this.edgeType instanceof ON&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof _N&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof TN&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof PN&&e.type.enabled===!1)&&(r=!1),r===!0&&(t=this.cleanup())),r===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new ON(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new _N(this.options,this.body,this.labelModule):this.edgeType=new TN(this.options,this.body,this.labelModule):this.edgeType=new PN(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}connect(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}disconnect(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,t,r){if(this.options.value!==void 0){const i=this.options.scaling.customScalingFunction(e,t,r,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+i*s}this.options.width=this.options.scaling.min+i*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}draw(e){const t=this.getFormattingValues();if(t.hidden)return;const r=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,r),this.drawLabel(e,r)}drawArrows(e){const t=this.getFormattingValues();if(t.hidden)return;const r=this.edgeType.getViaNode(),i={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(i.from=this.edgeType.getArrowData(e,"from",r,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=i.from.core),t.fromArrowSrc&&(i.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(i.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(i.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(i.to=this.edgeType.getArrowData(e,"to",r,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=i.to.core),t.toArrowSrc&&(i.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(i.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(i.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(i.middle=this.edgeType.getArrowData(e,"middle",r,this.selected,this.hover,t),t.middleArrowSrc&&(i.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(i.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(i.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,i.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,i.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,i.to)}drawLabel(e,t){if(this.options.label!==void 0){const r=this.from,i=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let o;if(r.id!=i.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,t),e.save();const s=this._getRotation(e);s.angle!=0&&(e.translate(s.x,s.y),e.rotate(s.angle)),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;const s=q4(e,this.options.selfReference.angle,this.options.selfReference.size,r);o=this._pointOnCircle(s.x,s.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}getItemsOnPoint(e){const t=[];if(this.labelModule.visible()){const i=this._getRotation();aE(this.labelModule.getSize(),e,i)&&t.push({edgeId:this.id,labelId:0})}const r={left:e.x,top:e.y};return this.isOverlappingWith(r)&&t.push({edgeId:this.id}),t}isOverlappingWith(e){if(this.connected){const r=this.from.x,i=this.from.y,o=this.to.x,s=this.to.y,a=e.left,g=e.top;return this.edgeType.getDistanceToEdge(r,i,o,s,a,g)<10}else return!1}_getRotation(e){const t=this.edgeType.getViaNode(),r=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,r.x,r.y);const i={x:r.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return i;const o=this.from.y-this.to.y,s=this.from.x-this.to.x;let a=Math.atan2(o,s);return(a<-1&&s<0||a>0&&s<0)&&(a+=Math.PI),i.angle=a,i}_pointOnCircle(e,t,r,i){return{x:e+r*Math.cos(i),y:t-r*Math.sin(i)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}},fie=class{constructor(e,t,r){var i;this.body=e,this.images=t,this.groups=r,this.body.functions.createEdge=q(i=this.create).call(i,this),this.edgesListeners={add:(o,s)=>{this.add(s.items)},update:(o,s)=>{this.update(s.items)},remove:(o,s)=>{this.remove(s.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(o,s,a,g){if(s===o)return .5;{const A=1/(s-o);return Math.max(0,(g-o)*A)}}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},Me(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,t,r;this.body.emitter.on("_forceDisableDynamicCurves",function(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;i==="dynamic"&&(i="continuous");let s=!1;for(const a in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,a)){const g=e.body.edges[a],A=e.body.data.edges.get(a);if(A!=null){const I=A.smooth;I!==void 0&&I.enabled===!0&&I.type==="dynamic"&&(i===void 0?g.setOptions({smooth:!1}):g.setOptions({smooth:{type:i}}),s=!0)}}o===!0&&s===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",()=>{this.reconnectEdges()}),this.body.emitter.on("refreshEdges",q(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",q(r=this.refresh).call(r,this)),this.body.emitter.on("destroy",()=>{pe(this.edgesListeners,(i,o)=>{this.body.data.edges&&this.body.data.edges.off(o,i)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){us.parseOptions(this.options,e,!0,this.defaultOptions,!0);let t=!1;if(e.smooth!==void 0)for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&(t=this.body.edges[r].updateEdgeType()||t);if(e.font!==void 0)for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&this.body.edges[r].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.body.data.edges;if(S4("id",e))this.body.data.edges=e;else if(Hr(e))this.body.data.edges=new Ps,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new Ps;else throw new TypeError("Array or DataSet expected");if(r&&pe(this.edgesListeners,(i,o)=>{r.off(o,i)}),this.body.edges={},this.body.data.edges){pe(this.edgesListeners,(o,s)=>{this.body.data.edges.on(s,o)});const i=this.body.data.edges.getIds();this.add(i,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.body.edges,i=this.body.data.edges;for(let o=0;o<e.length;o++){const s=e[o],a=r[s];a&&a.disconnect();const g=i.get(s,{showInternalIds:!0});r[s]=this.create(g)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}update(e){const t=this.body.edges,r=this.body.data.edges;let i=!1;for(let o=0;o<e.length;o++){const s=e[o],a=r.get(s),g=t[s];g!==void 0?(g.disconnect(),i=g.setOptions(a)||i,g.connect()):(this.body.edges[s]=this.create(a),i=!0)}i===!0?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}remove(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;const r=this.body.edges;pe(e,i=>{const o=r[i];o!==void 0&&o.remove()}),t&&this.body.emitter.emit("_dataChanged")}refresh(){pe(this.body.edges,(e,t)=>{const r=this.body.data.edges.get(t);r!==void 0&&e.setOptions(r)})}create(e){return new us(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e;const t=this.body.nodes,r=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const i=r[e];i.from=null,i.to=null,i.connect()}}getConnectedNodes(e){const t=[];if(this.body.edges[e]!==void 0){const r=this.body.edges[e];r.fromId!==void 0&&t.push(r.fromId),r.toId!==void 0&&t.push(r.toId)}return t}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){const e=[];pe(this.body.edges,(t,r)=>{const i=this.body.nodes[t.toId],o=this.body.nodes[t.fromId];i!==void 0&&i.isCluster===!0||o!==void 0&&o.isCluster===!0||(i===void 0||o===void 0)&&e.push(r)}),this.remove(e,!1)}_addMissingEdges(){const e=this.body.data.edges;if(e==null)return;const t=this.body.edges,r=[];ze(e).call(e,(i,o)=>{t[o]===void 0&&r.push(o)}),this.add(r,!0)}};var RN={},xN;function pie(){if(xN)return RN;xN=1;var n=ie(),e=ye(),t=Date,r=e(t.prototype.getTime);return n({target:"Date",stat:!0},{now:function(){return r(new t)}}),RN}var Pf,$N;function vie(){if($N)return Pf;$N=1,pie();var n=Pe();return Pf=n.Date.now,Pf}var Rf,DN;function mie(){if(DN)return Rf;DN=1;var n=vie();return Rf=n,Rf}var xf,NN;function yie(){return NN||(NN=1,xf=mie()),xf}var bie=yie(),gE=de(bie);let Z4=class{constructor(e,t,r){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(r),this._rng=bC("BARNES HUT SOLVER")}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e;const t=this.body.nodes,r=this.physicsBody.physicsNodeIndices,i=r.length,o=this._formBarnesHutTree(t,r);this.barnesHutTree=o;for(let s=0;s<i;s++)e=t[r[s]],e.options.mass>0&&this._getForceContributions(o.root,e)}}_getForceContributions(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}_getForceContribution(e,t){if(e.childrenCount>0){const r=e.centerOfMass.x-t.x,i=e.centerOfMass.y-t.y,o=Math.sqrt(r*r+i*i);o*e.calcSize>this.thetaInversed?this._calculateForces(o,r,i,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(o,r,i,t,e)}}_calculateForces(e,t,r,i,o){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&i.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));const s=this.options.gravitationalConstant*o.mass*i.options.mass/Math.pow(e,3),a=t*s,g=r*s;this.physicsBody.forces[i.id].x+=a,this.physicsBody.forces[i.id].y+=g}_formBarnesHutTree(e,t){let r;const i=t.length;let o=e[t[0]].x,s=e[t[0]].y,a=e[t[0]].x,g=e[t[0]].y;for(let p=1;p<i;p++){const f=e[t[p]],c=f.x,m=f.y;f.options.mass>0&&(c<o&&(o=c),c>a&&(a=c),m<s&&(s=m),m>g&&(g=m))}const A=Math.abs(a-o)-Math.abs(g-s);A>0?(s-=.5*A,g+=.5*A):(o+=.5*A,a-=.5*A);const C=Math.max(1e-5,Math.abs(a-o)),l=.5*C,d=.5*(o+a),u=.5*(s+g),h={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:d-l,maxX:d+l,minY:u-l,maxY:u+l},size:C,calcSize:1/C,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(h.root);for(let p=0;p<i;p++)r=e[t[p]],r.options.mass>0&&this._placeInTree(h.root,r);return h}_updateBranchMass(e,t){const r=e.centerOfMass,i=e.mass+t.options.mass,o=1/i;r.x=r.x*e.mass+t.x*t.options.mass,r.x*=o,r.y=r.y*e.mass+t.y*t.options.mass,r.y*=o,e.mass=i;const s=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidth<s?s:e.maxWidth}_placeInTree(e,t,r){(r!=!0||r===void 0)&&this._updateBranchMass(e,t);const i=e.children.NW.range;let o;i.maxX>t.x?i.maxY>t.y?o="NW":o="SW":i.maxY>t.y?o="NE":o="SE",this._placeInRegion(e,t,o)}_placeInRegion(e,t,r){const i=e.children[r];switch(i.childrenCount){case 0:i.children.data=t,i.childrenCount=1,this._updateBranchMass(i,t);break;case 1:i.children.data.x===t.x&&i.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(i),this._placeInTree(i,t));break;case 4:this._placeInTree(i,t);break}}_splitBranch(e){let t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),t!=null&&this._placeInTree(e,t)}_insertRegion(e,t){let r,i,o,s;const a=.5*e.size;switch(t){case"NW":r=e.range.minX,i=e.range.minX+a,o=e.range.minY,s=e.range.minY+a;break;case"NE":r=e.range.minX+a,i=e.range.maxX,o=e.range.minY,s=e.range.minY+a;break;case"SW":r=e.range.minX,i=e.range.minX+a,o=e.range.minY+a,s=e.range.maxY;break;case"SE":r=e.range.minX+a,i=e.range.maxX,o=e.range.minY+a,s=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:r,maxX:i,minY:o,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}_drawBranch(e,t,r){r===void 0&&(r="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=r,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}},wie=class{constructor(e,t,r){this._rng=bC("REPULSION SOLVER"),this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e}solve(){let e,t,r,i,o,s,a,g;const A=this.body.nodes,I=this.physicsBody.physicsNodeIndices,C=this.physicsBody.forces,l=this.options.nodeDistance,d=-2/3/l,u=4/3;for(let h=0;h<I.length-1;h++){a=A[I[h]];for(let p=h+1;p<I.length;p++)g=A[I[p]],e=g.x-a.x,t=g.y-a.y,r=Math.sqrt(e*e+t*t),r===0&&(r=.1*this._rng(),e=r),r<2*l&&(r<.5*l?s=1:s=d*r+u,s=s/r,i=e*s,o=t*s,C[a.id].x-=i,C[a.id].y-=o,C[g.id].x+=i,C[g.id].y+=o)}}},Eie=class{constructor(e,t,r){this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}solve(){const e=this.body.nodes,t=this.physicsBody.physicsNodeIndices,r=this.physicsBody.forces,i=this.options.nodeDistance;for(let o=0;o<t.length-1;o++){const s=e[t[o]];for(let a=o+1;a<t.length;a++){const g=e[t[a]];if(s.level===g.level){const A=i+this.overlapAvoidanceFactor*((s.shape.radius||0)/2+(g.shape.radius||0)/2),I=g.x-s.x,C=g.y-s.y,l=Math.sqrt(I*I+C*C),d=.05;let u;l<A?u=-Math.pow(d*l,2)+Math.pow(d*A,2):u=0,l!==0&&(u=u/l);const h=I*u,p=C*u;r[s.id].x-=h,r[s.id].y-=p,r[g.id].x+=h,r[g.id].y+=p}}}}},$f=class{constructor(e,t,r){this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e}solve(){let e,t;const r=this.physicsBody.physicsEdgeIndices,i=this.body.edges;let o,s,a;for(let g=0;g<r.length;g++)t=i[r[g]],t.connected===!0&&t.toId!==t.fromId&&this.body.nodes[t.toId]!==void 0&&this.body.nodes[t.fromId]!==void 0&&(t.edgeType.via!==void 0?(e=t.options.length===void 0?this.options.springLength:t.options.length,o=t.to,s=t.edgeType.via,a=t.from,this._calculateSpringForce(o,s,.5*e),this._calculateSpringForce(s,a,.5*e)):(e=t.options.length===void 0?this.options.springLength*1.5:t.options.length,this._calculateSpringForce(t.from,t.to,e)))}_calculateSpringForce(e,t,r){const i=e.x-t.x,o=e.y-t.y,s=Math.max(Math.sqrt(i*i+o*o),.01),a=this.options.springConstant*(r-s)/s,g=i*a,A=o*a;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=g,this.physicsBody.forces[e.id].y+=A),this.physicsBody.forces[t.id]!==void 0&&(this.physicsBody.forces[t.id].x-=g,this.physicsBody.forces[t.id].y-=A)}},Sie=class{constructor(e,t,r){this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e}solve(){let e,t,r,i,o,s,a,g;const A=this.body.edges,I=.5,C=this.physicsBody.physicsEdgeIndices,l=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces;for(let v=0;v<l.length;v++){const y=l[v];d[y].springFx=0,d[y].springFy=0}for(let v=0;v<C.length;v++)t=A[C[v]],t.connected===!0&&(e=t.options.length===void 0?this.options.springLength:t.options.length,r=t.from.x-t.to.x,i=t.from.y-t.to.y,g=Math.sqrt(r*r+i*i),g=g===0?.01:g,a=this.options.springConstant*(e-g)/g,o=r*a,s=i*a,t.to.level!=t.from.level?(d[t.toId]!==void 0&&(d[t.toId].springFx-=o,d[t.toId].springFy-=s),d[t.fromId]!==void 0&&(d[t.fromId].springFx+=o,d[t.fromId].springFy+=s)):(d[t.toId]!==void 0&&(d[t.toId].x-=I*o,d[t.toId].y-=I*s),d[t.fromId]!==void 0&&(d[t.fromId].x+=I*o,d[t.fromId].y+=I*s)));a=1;let u,h;for(let v=0;v<l.length;v++){const y=l[v];u=Math.min(a,Math.max(-a,d[y].springFx)),h=Math.min(a,Math.max(-a,d[y].springFy)),d[y].x+=u,d[y].y+=h}let p=0,f=0;for(let v=0;v<l.length;v++){const y=l[v];p+=d[y].x,f+=d[y].y}const c=p/l.length,m=f/l.length;for(let v=0;v<l.length;v++){const y=l[v];d[y].x-=c,d[y].y-=m}}},wI=class{constructor(e,t,r){this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e}solve(){let e,t,r,i;const o=this.body.nodes,s=this.physicsBody.physicsNodeIndices,a=this.physicsBody.forces;for(let g=0;g<s.length;g++){const A=s[g];i=o[A],e=-i.x,t=-i.y,r=Math.sqrt(e*e+t*t),this._calculateForces(r,e,t,a,i)}}_calculateForces(e,t,r,i,o){const s=e===0?0:this.options.centralGravity/e;i[o.id].x=t*s,i[o.id].y=r*s}},Oie=class extends Z4{constructor(e,t,r){super(e,t,r),this._rng=bC("FORCE ATLAS 2 BASED REPULSION SOLVER")}_calculateForces(e,t,r,i,o){e===0&&(e=.1*this._rng(),t=e),this.overlapAvoidanceFactor<1&&i.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));const s=i.edges.length+1,a=this.options.gravitationalConstant*o.mass*i.options.mass*s/Math.pow(e,2),g=t*a,A=r*a;this.physicsBody.forces[i.id].x+=g,this.physicsBody.forces[i.id].y+=A}},Tie=class extends wI{constructor(e,t,r){super(e,t,r)}_calculateForces(e,t,r,i,o){if(e>0){const s=o.edges.length+1,a=this.options.centralGravity*s*o.options.mass;i[o.id].x=t*a,i[o.id].y=r*a}}},_ie=class{constructor(e){this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},Nt(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("initPhysics",()=>{this.initPhysics()}),this.body.emitter.on("_layoutFailed",()=>{this.layoutFailed=!0}),this.body.emitter.on("resetPhysics",()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on("disablePhysics",()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on("restorePhysics",()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on("startSimulation",()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on("stopSimulation",()=>{this.stopSimulation()}),this.body.emitter.on("destroy",()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on("_dataChanged",()=>{this.updatePhysicsData()})}setOptions(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,jI(["stabilization"],this.options,e),Sr(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());const t=this.options.wind;t&&((typeof t.x!="number"||oE(t.x))&&(t.x=0),(typeof t.y!="number"||oE(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}init(){let e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new Oie(this.body,this.physicsBody,e),this.edgesSolver=new $f(this.body,this.physicsBody,e),this.gravitySolver=new Tie(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new wie(this.body,this.physicsBody,e),this.edgesSolver=new $f(this.body,this.physicsBody,e),this.gravitySolver=new wI(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new Eie(this.body,this.physicsBody,e),this.edgesSolver=new Sie(this.body,this.physicsBody,e),this.gravitySolver=new wI(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new Z4(this.body,this.physicsBody,e),this.edgesSolver=new $f(this.body,this.physicsBody,e),this.gravitySolver=new wI(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}startSimulation(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=q(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}stopSimulation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}simulationStep(){const e=gE();this.physicsTick(),(gE()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&ls(()=>{this.body.emitter.emit("stabilized",{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){this._evaluateStepQuality()===!0?this.timestep=1.2*this.timestep:this.timestep/1.2<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/1.2))}physicsTick(){this._startStabilizing(),this.stabilized!==!0&&(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0?(this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1):(this.timestep=this.options.timestep,this.physicsStep()),this.stabilized===!0&&this.revert(),this.stabilizationIterations++)}updatePhysicsData(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];const e=this.body.nodes,t=this.body.edges;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&e[r].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[r].id);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&t[r].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(t[r].id);for(let r=0;r<this.physicsBody.physicsNodeIndices.length;r++){const i=this.physicsBody.physicsNodeIndices[r];this.physicsBody.forces[i]={x:0,y:0},this.physicsBody.velocities[i]===void 0&&(this.physicsBody.velocities[i]={x:0,y:0})}for(const r in this.physicsBody.velocities)e[r]===void 0&&delete this.physicsBody.velocities[r]}revert(){const e=At(this.previousStates),t=this.body.nodes,r=this.physicsBody.velocities;this.referenceState={};for(let i=0;i<e.length;i++){const o=e[i];t[o]!==void 0?t[o].options.physics===!0&&(this.referenceState[o]={positions:{x:t[o].x,y:t[o].y}},r[o].x=this.previousStates[o].vx,r[o].y=this.previousStates[o].vy,t[o].x=this.previousStates[o].x,t[o].y=this.previousStates[o].y):delete this.previousStates[o]}}_evaluateStepQuality(){let e,t,r;const i=this.body.nodes,o=this.referenceState,s=.3;for(const a in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,a)&&i[a]!==void 0&&(e=i[a].x-o[a].positions.x,t=i[a].y-o[a].positions.y,r=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),r>s))return!1;return!0}moveNodes(){const e=this.physicsBody.physicsNodeIndices;let t=0,r=0;const i=5;for(let o=0;o<e.length;o++){const s=e[o],a=this._performStep(s);t=Math.max(t,a),r+=a}this.adaptiveTimestepEnabled=r/e.length<i,this.stabilized=t<this.options.minVelocity}calculateComponentVelocity(e,t,r){const i=this.modelOptions.damping*e,o=(t-i)/r;e+=o*this.timestep;const s=this.options.maxVelocity||1e9;return Math.abs(e)>s&&(e=e>0?s:-s),e}_performStep(e){const t=this.body.nodes[e],r=this.physicsBody.forces[e];this.options.wind&&(r.x+=this.options.wind.x,r.y+=this.options.wind.y);const i=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:i.x,vy:i.y},t.options.fixed.x===!1?(i.x=this.calculateComponentVelocity(i.x,r.x,t.options.mass),t.x+=i.x*this.timestep):(r.x=0,i.x=0),t.options.fixed.y===!1?(i.y=this.calculateComponentVelocity(i.y,r.y,t.options.mass),t.y+=i.y*this.timestep):(r.y=0,i.y=0),Math.sqrt(Math.pow(i.x,2)+Math.pow(i.y,2))}_freezeNodes(){const e=this.body.nodes;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){const r=e[t].options.fixed;this.freezeCache[t]={x:r.x,y:r.y},r.x=!0,r.y=!0}}_restoreFrozenNodes(){const e=this.body.nodes;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!="number"&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,ls(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}_stabilizationBatch(){const e=()=>this.stabilized===!1&&this.stabilizationIterations<this.targetIterations,t=()=>{this.body.emitter.emit("stabilizationProgress",{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&t();let r=0;for(;e()&&r<this.options.stabilization.updateInterval;)this.physicsTick(),r++;if(t(),e()){var i;ls(q(i=this._stabilizationBatch).call(i,this),0)}else this._finalizeStabilization()}_finalizeStabilization(){this.body.emitter.emit("_allowRedraw"),this.options.stabilization.fit===!0&&this.body.emitter.emit("fit"),this.options.stabilization.onlyDynamicEdges===!0&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),this.stabilized===!0?this._emitStabilized():this.startSimulation(),this.ready=!0}_drawForces(e){for(let t=0;t<this.physicsBody.physicsNodeIndices.length;t++){const r=this.physicsBody.physicsNodeIndices[t],i=this.body.nodes[r],o=this.physicsBody.forces[r],s=20,a=.03,g=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.x,2)),A=Math.min(Math.max(5,g),15),I=3*A,C=rE((180-Math.min(1,Math.max(0,a*g))*180)/360,1,1),l={x:i.x+s*o.x,y:i.y+s*o.y};e.lineWidth=A,e.strokeStyle=C,e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(l.x,l.y),e.stroke();const d=Math.atan2(o.y,o.x);e.fillStyle=C,G4.draw(e,{type:"arrow",point:l,angle:d,length:I}),xC(e).call(e)}}};var MN={},kN;function Pie(){if(kN)return MN;kN=1;var n=ie(),e=ye(),t=Co(),r=e([].reverse),i=[1,2];return n({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),r(this)}}),MN}var Df,FN;function Rie(){if(FN)return Df;FN=1,Pie();var n=Ft();return Df=n("Array","reverse"),Df}var Nf,BN;function xie(){if(BN)return Nf;BN=1;var n=ut(),e=Rie(),t=Array.prototype;return Nf=function(r){var i=r.reverse;return r===t||n(t,r)&&i===t.reverse?e:i},Nf}var Mf,qN;function $ie(){if(qN)return Mf;qN=1;var n=xie();return Mf=n,Mf}var kf,zN;function Die(){return zN||(zN=1,kf=$ie()),kf}var Nie=Die(),hs=de(Nie);let Ut=class{constructor(){}static getRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=1e9,i=-1e9,o=1e9,s=-1e9,a;if(t.length>0)for(let g=0;g<t.length;g++)a=e[t[g]],o>a.shape.boundingBox.left&&(o=a.shape.boundingBox.left),s<a.shape.boundingBox.right&&(s=a.shape.boundingBox.right),r>a.shape.boundingBox.top&&(r=a.shape.boundingBox.top),i<a.shape.boundingBox.bottom&&(i=a.shape.boundingBox.bottom);return o===1e9&&s===-1e9&&r===1e9&&i===-1e9&&(r=0,i=0,o=0,s=0),{minX:o,maxX:s,minY:r,maxY:i}}static getRangeCore(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=1e9,i=-1e9,o=1e9,s=-1e9,a;if(t.length>0)for(let g=0;g<t.length;g++)a=e[t[g]],o>a.x&&(o=a.x),s<a.x&&(s=a.x),r>a.y&&(r=a.y),i<a.y&&(i=a.y);return o===1e9&&s===-1e9&&r===1e9&&i===-1e9&&(r=0,i=0,o=0,s=0),{minX:o,maxX:s,minY:r,maxY:i}}static findCenter(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}static cloneOptions(e,t){const r={};return t===void 0||t==="node"?(Me(r,e.options,!0),r.x=e.x,r.y=e.y,r.amountOfConnections=e.edges.length):Me(r,e.options,!0),r}},Mie=class extends cr{constructor(e,t,r,i,o,s){super(e,t,r,i,o,s),this.isCluster=!0,this.containedNodes={},this.containedEdges={}}_openChildCluster(e){const t=this.body.nodes[e];if(this.containedNodes[e]===void 0)throw new Error("node with id: "+e+" not in current cluster");if(!t.isCluster)throw new Error("node with id: "+e+" is not a cluster");delete this.containedNodes[e],pe(t.edges,r=>{delete this.containedEdges[r.id]}),pe(t.containedNodes,(r,i)=>{this.containedNodes[i]=r}),t.containedNodes={},pe(t.containedEdges,(r,i)=>{this.containedEdges[i]=r}),t.containedEdges={},pe(t.edges,r=>{pe(this.edges,i=>{var o,s;const a=Ue(o=i.clusteringEdgeReplacingIds).call(o,r.id);a!==-1&&(pe(r.clusteringEdgeReplacingIds,g=>{i.clusteringEdgeReplacingIds.push(g),this.body.edges[g].edgeReplacedById=i.id}),en(s=i.clusteringEdgeReplacingIds).call(s,a,1))})}),t.edges=[]}},kie=class{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Nt(this.options,this.defaultOptions),this.body.emitter.on("_resetData",()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,t){e===void 0?e=this._getHubSize():typeof e=="object"&&(t=this._checkOptions(e),e=this._getHubSize());const r=[];for(let i=0;i<this.body.nodeIndices.length;i++){const o=this.body.nodes[this.body.nodeIndices[i]];o.edges.length>=e&&r.push(o.id)}for(let i=0;i<r.length;i++)this.clusterByConnection(r[i],t,!0);this.body.emitter.emit("_dataChanged")}cluster(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);const r={},i={};pe(this.body.nodes,(o,s)=>{o.options&&e.joinCondition(o.options)===!0&&(r[s]=o,pe(o.edges,a=>{this.clusteredEdges[a.id]===void 0&&(i[a.id]=a)}))}),this._cluster(r,i,e,t)}clusterByEdgeCount(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);const i=[],o={};let s,a,g;for(let A=0;A<this.body.nodeIndices.length;A++){const I={},C={},l=this.body.nodeIndices[A],d=this.body.nodes[l];if(o[l]===void 0){g=0,a=[];for(let u=0;u<d.edges.length;u++)s=d.edges[u],this.clusteredEdges[s.id]===void 0&&(s.toId!==s.fromId&&g++,a.push(s));if(g===e){const u=function(p){if(t.joinCondition===void 0||t.joinCondition===null)return!0;const f=Ut.cloneOptions(p);return t.joinCondition(f)};let h=!0;for(let p=0;p<a.length;p++){s=a[p];const f=this._getConnectedId(s,l);if(u(d))C[s.id]=s,I[l]=d,I[f]=this.body.nodes[f],o[l]=!0;else{h=!1;break}}if(At(I).length>0&&At(C).length>0&&h===!0){const f=function(){for(let c=0;c<i.length;++c)for(const m in I)if(i[c].nodes[m]!==void 0)return i[c]}();if(f!==void 0){for(const c in I)f.nodes[c]===void 0&&(f.nodes[c]=I[c]);for(const c in C)f.edges[c]===void 0&&(f.edges[c]=C[c])}else i.push({nodes:I,edges:C})}}}}for(let A=0;A<i.length;A++)this._cluster(i[A].nodes,i[A].edges,t,!1);r===!0&&this.body.emitter.emit("_dataChanged")}clusterOutliers(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}clusterBridges(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}clusterByConnection(e,t){var r;let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");const o=this.body.nodes[e];t=this._checkOptions(t,o),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=o.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=o.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=o.options.fixed.x,t.clusterNodeProperties.fixed.y=o.options.fixed.y);const s={},a={},g=o.id,A=Ut.cloneOptions(o);s[g]=o;for(let C=0;C<o.edges.length;C++){const l=o.edges[C];if(this.clusteredEdges[l.id]===void 0){const d=this._getConnectedId(l,g);if(this.clusteredNodes[d]===void 0)if(d!==g)if(t.joinCondition===void 0)a[l.id]=l,s[d]=this.body.nodes[d];else{const u=Ut.cloneOptions(this.body.nodes[d]);t.joinCondition(A,u)===!0&&(a[l.id]=l,s[d]=this.body.nodes[d])}else a[l.id]=l}}const I=Og(r=At(s)).call(r,function(C){return s[C].id});for(const C in s){if(!Object.prototype.hasOwnProperty.call(s,C))continue;const l=s[C];for(let d=0;d<l.edges.length;d++){const u=l.edges[d];Ue(I).call(I,this._getConnectedId(u,l.id))>-1&&(a[u.id]=u)}}this._cluster(s,a,t,i)}_createClusterEdges(e,t,r,i){let o,s,a,g,A,I;const C=At(e),l=[];for(let h=0;h<C.length;h++){s=C[h],a=e[s];for(let p=0;p<a.edges.length;p++)o=a.edges[p],this.clusteredEdges[o.id]===void 0&&(o.toId==o.fromId?t[o.id]=o:o.toId==s?(g=r.id,A=o.fromId,I=A):(g=o.toId,A=r.id,I=g),e[I]===void 0&&l.push({edge:o,fromId:A,toId:g}))}const d=[],u=function(h){for(let p=0;p<d.length;p++){const f=d[p],c=h.fromId===f.fromId&&h.toId===f.toId,m=h.fromId===f.toId&&h.toId===f.fromId;if(c||m)return f}return null};for(let h=0;h<l.length;h++){const p=l[h],f=p.edge;let c=u(p);c===null?(c=this._createClusteredEdge(p.fromId,p.toId,f,i),d.push(c)):c.clusteringEdgeReplacingIds.push(f.id),this.body.edges[f.id].edgeReplacedById=c.id,this._backupEdgeOptions(f),f.setOptions({physics:!1})}}_checkOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const o=[];for(const I in e)Object.prototype.hasOwnProperty.call(e,I)&&this.clusteredNodes[I]!==void 0&&o.push(I);for(let I=0;I<o.length;++I)delete e[o[I]];if(At(e).length==0||At(e).length==1&&r.clusterNodeProperties.allowSingleNodeCluster!=!0)return;let s=Me({},r.clusterNodeProperties);if(r.processProperties!==void 0){const I=[];for(const l in e)if(Object.prototype.hasOwnProperty.call(e,l)){const d=Ut.cloneOptions(e[l]);I.push(d)}const C=[];for(const l in t)if(Object.prototype.hasOwnProperty.call(t,l)&&l.substr(0,12)!=="clusterEdge:"){const d=Ut.cloneOptions(t[l],"edge");C.push(d)}if(s=r.processProperties(s,I,C),!s)throw new Error("The processProperties function does not return properties!")}s.id===void 0&&(s.id="cluster:"+ds());const a=s.id;s.label===void 0&&(s.label="cluster");let g;s.x===void 0&&(g=this._getClusterPosition(e),s.x=g.x),s.y===void 0&&(g===void 0&&(g=this._getClusterPosition(e)),s.y=g.y),s.id=a;const A=this.body.functions.createNode(s,Mie);A.containedNodes=e,A.containedEdges=t,A.clusterEdgeProperties=r.clusterEdgeProperties,this.body.nodes[s.id]=A,this._clusterEdges(e,t,s,r.clusterEdgeProperties),s.id=void 0,i===!0&&this.body.emitter.emit("_dataChanged")}_backupEdgeOptions(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}_restoreEdge(e){const t=this.clusteredEdges[e.id];t!==void 0&&(e.setOptions({physics:t.physics}),delete this.clusteredEdges[e.id])}isCluster(e){return this.body.nodes[e]!==void 0?this.body.nodes[e].isCluster===!0:(console.error("Node does not exist."),!1)}_getClusterPosition(e){const t=At(e);let r=e[t[0]].x,i=e[t[0]].x,o=e[t[0]].y,s=e[t[0]].y,a;for(let g=1;g<t.length;g++)a=e[t[g]],r=a.x<r?a.x:r,i=a.x>i?a.x:i,o=a.y<o?a.y:o,s=a.y>s?a.y:s;return{x:.5*(r+i),y:.5*(o+s)}}openCluster(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");const i=this.body.nodes[e];if(i===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(i.isCluster!==!0||i.containedNodes===void 0||i.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");const o=this.findNode(e),s=Ue(o).call(o,e)-1;if(s>=0){const I=o[s];this.body.nodes[I]._openChildCluster(e),delete this.body.nodes[e],r===!0&&this.body.emitter.emit("_dataChanged");return}const a=i.containedNodes,g=i.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){const I={},C={x:i.x,y:i.y};for(const d in a)if(Object.prototype.hasOwnProperty.call(a,d)){const u=this.body.nodes[d];I[d]={x:u.x,y:u.y}}const l=t.releaseFunction(C,I);for(const d in a)if(Object.prototype.hasOwnProperty.call(a,d)){const u=this.body.nodes[d];l[d]!==void 0&&(u.x=l[d].x===void 0?i.x:l[d].x,u.y=l[d].y===void 0?i.y:l[d].y)}}else pe(a,function(I){I.options.fixed.x===!1&&(I.x=i.x),I.options.fixed.y===!1&&(I.y=i.y)});for(const I in a)if(Object.prototype.hasOwnProperty.call(a,I)){const C=this.body.nodes[I];C.vx=i.vx,C.vy=i.vy,C.setOptions({physics:!0}),delete this.clusteredNodes[I]}const A=[];for(let I=0;I<i.edges.length;I++)A.push(i.edges[I]);for(let I=0;I<A.length;I++){const C=A[I],l=this._getConnectedId(C,e),d=this.clusteredNodes[l];for(let u=0;u<C.clusteringEdgeReplacingIds.length;u++){const h=C.clusteringEdgeReplacingIds[u],p=this.body.edges[h];if(p!==void 0)if(d!==void 0){const f=this.body.nodes[d.clusterId];f.containedEdges[p.id]=p,delete g[p.id];let c=p.fromId,m=p.toId;p.toId==l?m=d.clusterId:c=d.clusterId,this._createClusteredEdge(c,m,p,f.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(p)}C.remove()}for(const I in g)Object.prototype.hasOwnProperty.call(g,I)&&this._restoreEdge(g[I]);delete this.body.nodes[e],r===!0&&this.body.emitter.emit("_dataChanged")}getNodesInCluster(e){const t=[];if(this.isCluster(e)===!0){const r=this.body.nodes[e].containedNodes;for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&t.push(this.body.nodes[i].id)}return t}findNode(e){const t=[];let i=0,o;for(;this.clusteredNodes[e]!==void 0&&i<100;){if(o=this.body.nodes[e],o===void 0)return[];t.push(o.id),e=this.clusteredNodes[e].clusterId,i++}return o=this.body.nodes[e],o===void 0?[]:(t.push(o.id),hs(t).call(t),t)}updateClusteredNode(e,t){if(e===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(t===void 0)throw new Error("No newOptions supplied to updateClusteredNode.");if(this.body.nodes[e]===void 0)throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[e].setOptions(t),this.body.emitter.emit("_dataChanged")}updateEdge(e,t){if(e===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(t===void 0)throw new Error("No newOptions supplied to updateEdge.");if(this.body.edges[e]===void 0)throw new Error("The startEdgeId supplied to updateEdge does not exist.");const r=this.getClusteredEdges(e);for(let i=0;i<r.length;i++)this.body.edges[r[i]].setOptions(t);this.body.emitter.emit("_dataChanged")}getClusteredEdges(e){const t=[];let i=0;for(;e!==void 0&&this.body.edges[e]!==void 0&&i<100;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,i++;return hs(t).call(t),t}getBaseEdge(e){return this.getBaseEdges(e)[0]}getBaseEdges(e){const t=[e],r=[],i=[],o=100;let s=0;for(;t.length>0&&s<o;){const a=t.pop();if(a===void 0)continue;const g=this.body.edges[a];if(g===void 0)continue;s++;const A=g.clusteringEdgeReplacingIds;if(A===void 0)i.push(a);else for(let I=0;I<A.length;++I){const C=A[I];Ue(t).call(t,A)!==-1||Ue(r).call(r,A)!==-1||t.push(C)}r.push(a)}return i}_getConnectedId(e,t){return e.toId!=t?e.toId:(e.fromId!=t,e.fromId)}_getHubSize(){let e=0,t=0,r=0,i=0;for(let g=0;g<this.body.nodeIndices.length;g++){const A=this.body.nodes[this.body.nodeIndices[g]];A.edges.length>i&&(i=A.edges.length),e+=A.edges.length,t+=Math.pow(A.edges.length,2),r+=1}e=e/r,t=t/r;const o=t-Math.pow(e,2),s=Math.sqrt(o);let a=Math.floor(e+2*s);return a>i&&(a=i),a}_createClusteredEdge(e,t,r,i,o){const s=Ut.cloneOptions(r,"edge");Me(s,i),s.from=e,s.to=t,s.id="clusterEdge:"+ds(),o!==void 0&&Me(s,o);const a=this.body.functions.createEdge(s);return a.clusteringEdgeReplacingIds=[r.id],a.connect(),this.body.edges[a.id]=a,a}_clusterEdges(e,t,r,i){if(t instanceof us){const o=t,s={};s[o.id]=o,t=s}if(e instanceof cr){const o=e,s={};s[o.id]=o,e=s}if(r==null)throw new Error("_clusterEdges: parameter clusterNode required");i===void 0&&(i=r.clusterEdgeProperties),this._createClusterEdges(e,t,r,i);for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&this.body.edges[o]!==void 0){const s=this.body.edges[o];this._backupEdgeOptions(s),s.setOptions({physics:!1})}for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(this.clusteredNodes[o]={clusterId:r.id,node:this.body.nodes[o]},this.body.nodes[o].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;const t=this.clusteredNodes[e];if(t===void 0)return;const r=t.clusterId;if(r!==void 0)return this.body.nodes[r]}_filter(e,t){const r=[];return pe(e,i=>{t(i)&&r.push(i)}),r}_updateState(){let e;const t=[],r={},i=g=>{pe(this.body.nodes,A=>{A.isCluster===!0&&g(A)})};for(e in this.clusteredNodes){if(!Object.prototype.hasOwnProperty.call(this.clusteredNodes,e))continue;this.body.nodes[e]===void 0&&t.push(e)}i(function(g){for(let A=0;A<t.length;A++)delete g.containedNodes[t[A]]});for(let g=0;g<t.length;g++)delete this.clusteredNodes[t[g]];pe(this.clusteredEdges,g=>{const A=this.body.edges[g];(A===void 0||!A.endPointsValid())&&(r[g]=g)}),i(function(g){pe(g.containedEdges,(A,I)=>{!A.endPointsValid()&&!r[I]&&(r[I]=I)})}),pe(this.body.edges,(g,A)=>{let I=!0;const C=g.clusteringEdgeReplacingIds;if(C!==void 0){let l=0;pe(C,d=>{const u=this.body.edges[d];u!==void 0&&u.endPointsValid()&&(l+=1)}),I=l>0}(!g.endPointsValid()||!I)&&(r[A]=A)}),i(g=>{pe(r,A=>{delete g.containedEdges[A],pe(g.edges,(I,C)=>{if(I.id===A){g.edges[C]=null;return}I.clusteringEdgeReplacingIds=this._filter(I.clusteringEdgeReplacingIds,function(l){return!r[l]})}),g.edges=this._filter(g.edges,function(I){return I!==null})})}),pe(r,g=>{delete this.clusteredEdges[g]}),pe(r,g=>{delete this.body.edges[g]});const o=At(this.body.edges);pe(o,g=>{const A=this.body.edges[g],I=this._isClusteredNode(A.fromId)||this._isClusteredNode(A.toId);if(I!==this._isClusteredEdge(A.id))if(I){const C=this._getClusterNodeForNode(A.fromId);C!==void 0&&this._clusterEdges(this.body.nodes[A.fromId],A,C);const l=this._getClusterNodeForNode(A.toId);l!==void 0&&this._clusterEdges(this.body.nodes[A.toId],A,l)}else delete this._clusterEdges[g],this._restoreEdge(A)});let s=!1,a=!0;for(;a;){const g=[];i(function(A){const I=At(A.containedNodes).length,C=A.options.allowSingleNodeCluster===!0;(C&&I<1||!C&&I<2)&&g.push(A.id)});for(let A=0;A<g.length;++A)this.openCluster(g[A],{},!1);a=g.length>0,s=s||a}s&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}},Fie=class{constructor(e,t){this.body=e,this.canvas=t,this.redrawRequested=!1,this.requestAnimationFrameRequestId=void 0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},Nt(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on("dragStart",()=>{this.dragging=!0}),this.body.emitter.on("dragEnd",()=>{this.dragging=!1}),this.body.emitter.on("zoom",()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=ls(()=>{var t;this.zooming=!1,q(t=this._requestRedraw).call(t,this)()},250)}),this.body.emitter.on("_resizeNodes",()=>{this._resizeNodes()}),this.body.emitter.on("_redraw",()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on("_blockRedraw",()=>{this.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",q(e=this._requestRedraw).call(e,this)),this.body.emitter.on("_startRendering",()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on("_stopRendering",()=>{this.renderRequests-=1,this.renderingActive=this.renderRequests>0,this.requestAnimationFrameRequestId=void 0}),this.body.emitter.on("destroy",()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,window.cancelAnimationFrame(this.requestAnimationFrameRequestId),this.body.emitter.off()})}setOptions(e){e!==void 0&&ta(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(q(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.requestAnimationFrameRequestId=void 0,this._startRendering(),this._redraw())}redraw(){this.body.emitter.emit("setSize"),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,window.requestAnimationFrame(()=>{this._redraw(!1)}))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;const t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();const r=this.canvas.getContext(),i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(r.clearRect(0,0,i,o),this.canvas.frame.clientWidth===0)return;if(r.save(),r.translate(this.body.view.translation.x,this.body.view.translation.y),r.scale(this.body.view.scale,this.body.view.scale),r.beginPath(),this.body.emitter.emit("beforeDrawing",r),r.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(r),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){const{drawExternalLabels:s}=this._drawNodes(r,e);t.drawExternalLabels=s}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(r),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(r),r.beginPath(),this.body.emitter.emit("afterDrawing",r),r.closePath(),r.restore(),e===!0&&r.clearRect(0,0,i,o)}}_resizeNodes(){this.canvas.setTransform();const e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);const t=this.body.nodes;let r;for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r=t[i],r.resize(e),r.updateBoundingBox(e,r.selected));e.restore()}_drawNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.body.nodes,i=this.body.nodeIndices;let o;const s=[],a=[],g=20,A=this.canvas.DOMtoCanvas({x:-g,y:-g}),I=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+g,y:this.canvas.frame.canvas.clientHeight+g}),C={top:A.y,left:A.x,bottom:I.y,right:I.x},l=[];for(let p=0;p<i.length;p++)if(o=r[i[p]],o.hover)a.push(i[p]);else if(o.isSelected())s.push(i[p]);else if(t===!0){const f=o.draw(e);f.drawExternalLabel!=null&&l.push(f.drawExternalLabel)}else if(o.isBoundingBoxOverlappingWith(C)===!0){const f=o.draw(e);f.drawExternalLabel!=null&&l.push(f.drawExternalLabel)}else o.updateBoundingBox(e,o.selected);let d;const u=s.length,h=a.length;for(d=0;d<u;d++){o=r[s[d]];const p=o.draw(e);p.drawExternalLabel!=null&&l.push(p.drawExternalLabel)}for(d=0;d<h;d++){o=r[a[d]];const p=o.draw(e);p.drawExternalLabel!=null&&l.push(p.drawExternalLabel)}return{drawExternalLabels:()=>{for(const p of l)p()}}}_drawEdges(e){const t=this.body.edges,r=this.body.edgeIndices;for(let i=0;i<r.length;i++){const o=t[r[i]];o.connected===!0&&o.draw(e)}}_drawArrows(e){const t=this.body.edges,r=this.body.edgeIndices;for(let i=0;i<r.length;i++){const o=t[r[i]];o.connected===!0&&o.drawArrows(e)}}_drawSelectionBox(e){if(this.body.selectionBox.show){e.beginPath();const t=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,r=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y;e.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,r),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,r),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}};var Ff,jN;function Bie(){if(jN)return Ff;jN=1,w4();var n=Pe();return Ff=n.setInterval,Ff}var Bf,LN;function qie(){return LN||(LN=1,Bf=Bie()),Bf}var zie=qie(),jie=de(zie);function WI(n,e){e.inputHandler=function(t){t.isFirst&&e(t)},n.on("hammer.input",e.inputHandler)}function H4(n,e){return e.inputHandler=function(t){t.isFinal&&e(t)},n.on("hammer.input",e.inputHandler)}let Lie=class{constructor(e){this.body=e,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},Nt(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.once("resize",t=>{t.width!==0&&(this.body.view.translation.x=t.width*.5),t.height!==0&&(this.body.view.translation.y=t.height*.5)}),this.body.emitter.on("setSize",q(e=this.setSize).call(e,this)),this.body.emitter.on("destroy",()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&ta(["width","height","autoResize"],this.options,e),this._cleanUp(),this.options.autoResize===!0){var t;if(window.ResizeObserver){const i=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")}),{frame:o}=this;i.observe(o),this._cleanupCallbacks.push(()=>{i.unobserve(o)})}else{const i=jie(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(i)})}const r=q(t=this._onResize).call(t,this);window.addEventListener("resize",r),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",r)})}}_cleanUp(){var e,t,r;ze(e=hs(t=en(r=this._cleanupCallbacks).call(r,0)).call(t)).call(e,i=>{try{i()}catch(o){console.error(o)}})}_onResize(){this.setSize(),this.body.emitter.emit("_redraw")}_getCameraState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}_setCameraState(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){const e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight;let r=this.cameraState.scale;e!=1&&t!=1?r=this.cameraState.scale*.5*(e+t):e!=1?r=this.cameraState.scale*e:t!=1&&(r=this.cameraState.scale*t),this.body.view.scale=r;const i=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),o={x:i.x-this.cameraState.position.x,y:i.y-this.cameraState.position.y};this.body.view.translation.x+=o.x*this.body.view.scale,this.body.view.translation.y+=o.y*this.body.view.scale}}_prepareValue(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(Ue(e).call(e,"%")!==-1||Ue(e).call(e,"px")!==-1)return e;if(Ue(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}_create(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{const e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new Cs(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Cs.DIRECTION_ALL}),WI(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on("tap",e=>{this.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",e=>{this.body.eventListeners.onHold(e)}),this.hammer.on("panstart",e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on("panend",e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("wheel",e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new Cs(this.frame),H4(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);let r=!1;const i=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},r=!0;else{const a=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),g=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==a||this.frame.canvas.height!==g)&&this._getCameraState(s),this.frame.canvas.width!==a&&(this.frame.canvas.width=a,r=!0),this.frame.canvas.height!==g&&(this.frame.canvas.height=g,r=!0)}return r===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(i/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,r}getContext(){return this.frame.canvas.getContext("2d")}_determinePixelRatio(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");let t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);const r=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/r}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}};function Gie(n,e){const t=Nt({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},n??{});if(!Hr(t.nodes))throw new TypeError("Nodes has to be an array of ids.");if(t.nodes.length===0&&(t.nodes=e),!(typeof t.minZoomLevel=="number"&&t.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof t.maxZoomLevel=="number"&&t.minZoomLevel<=t.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return t}let Wie=class{constructor(e,t){var r,i;this.body=e,this.canvas=t,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",q(r=this.fit).call(r,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",q(i=this.releaseNode).call(i,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=Gie(e,this.body.nodeIndices);const r=this.canvas.frame.canvas.clientWidth,i=this.canvas.frame.canvas.clientHeight;let o,s;if(r===0||i===0)s=1,o=Ut.getRange(this.body.nodes,e.nodes);else if(t===!0){let A=0;for(const l in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,l)&&this.body.nodes[l].predefinedPosition===!0&&(A+=1);if(A>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=Ut.getRange(this.body.nodes,e.nodes),s=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const C=Math.min(r/600,i/600);s*=C}else{this.body.emitter.emit("_resizeNodes"),o=Ut.getRange(this.body.nodes,e.nodes);const A=Math.abs(o.maxX-o.minX)*1.1,I=Math.abs(o.maxY-o.minY)*1.1,C=r/A,l=i/I;s=C<=l?C:l}s>e.maxZoomLevel?s=e.maxZoomLevel:s<e.minZoomLevel&&(s=e.minZoomLevel);const g={position:Ut.findCenter(o),scale:s,animation:e.animation};this.moveTo(g)}focus(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){const r={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=r,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!Fn(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!Fn(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!Fn(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!Fn(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}animateView(e){if(e===void 0)return;this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;const t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),r={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+r.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+r.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var i;this.viewFunction=q(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var o;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=q(o=this._transitionRedraw).call(o,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}_lockedRedraw(){const e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),r={x:t.x-e.x,y:t.y-e.y},i=this.body.view.translation,o={x:i.x+r.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:i.y+r.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;const t=fQ[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var r;this.viewFunction=q(r=this._lockedRedraw).call(r,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}};function GN(n){var e=n&&n.preventDefault||!1,t=n&&n.container||window,r={},i={keydown:{},keyup:{}},o={},s;for(s=97;s<=122;s++)o[String.fromCharCode(s)]={code:65+(s-97),shift:!1};for(s=65;s<=90;s++)o[String.fromCharCode(s)]={code:s,shift:!0};for(s=0;s<=9;s++)o[""+s]={code:48+s,shift:!1};for(s=1;s<=12;s++)o["F"+s]={code:111+s,shift:!1};for(s=0;s<=9;s++)o["num"+s]={code:96+s,shift:!1};o["num*"]={code:106,shift:!1},o["num+"]={code:107,shift:!1},o["num-"]={code:109,shift:!1},o["num/"]={code:111,shift:!1},o["num."]={code:110,shift:!1},o.left={code:37,shift:!1},o.up={code:38,shift:!1},o.right={code:39,shift:!1},o.down={code:40,shift:!1},o.space={code:32,shift:!1},o.enter={code:13,shift:!1},o.shift={code:16,shift:void 0},o.esc={code:27,shift:!1},o.backspace={code:8,shift:!1},o.tab={code:9,shift:!1},o.ctrl={code:17,shift:!1},o.alt={code:18,shift:!1},o.delete={code:46,shift:!1},o.pageup={code:33,shift:!1},o.pagedown={code:34,shift:!1},o["="]={code:187,shift:!1},o["-"]={code:189,shift:!1},o["]"]={code:221,shift:!1},o["["]={code:219,shift:!1};var a=function(I){A(I,"keydown")},g=function(I){A(I,"keyup")},A=function(I,C){if(i[C][I.keyCode]!==void 0){for(var l=i[C][I.keyCode],d=0;d<l.length;d++)(l[d].shift===void 0||l[d].shift==!0&&I.shiftKey==!0||l[d].shift==!1&&I.shiftKey==!1)&&l[d].fn(I);e==!0&&I.preventDefault()}};return r.bind=function(I,C,l){if(l===void 0&&(l="keydown"),o[I]===void 0)throw new Error("unsupported key: "+I);i[l][o[I].code]===void 0&&(i[l][o[I].code]=[]),i[l][o[I].code].push({fn:C,shift:o[I].shift})},r.bindAll=function(I,C){C===void 0&&(C="keydown");for(var l in o)o.hasOwnProperty(l)&&r.bind(l,I,C)},r.getKey=function(I){for(var C in o)if(o.hasOwnProperty(C)){if(I.shiftKey==!0&&o[C].shift==!0&&I.keyCode==o[C].code)return C;if(I.shiftKey==!1&&o[C].shift==!1&&I.keyCode==o[C].code)return C;if(I.keyCode==o[C].code&&C=="shift")return C}return"unknown key, currently not supported"},r.unbind=function(I,C,l){if(l===void 0&&(l="keydown"),o[I]===void 0)throw new Error("unsupported key: "+I);if(C!==void 0){var d=[],u=i[l][o[I].code];if(u!==void 0)for(var h=0;h<u.length;h++)u[h].fn==C&&u[h].shift==o[I].shift||d.push(i[l][o[I].code][h]);i[l][o[I].code]=d}else i[l][o[I].code]=[]},r.reset=function(){i={keydown:{},keyup:{}}},r.destroy=function(){i={keydown:{},keyup:{}},t.removeEventListener("keydown",a,!0),t.removeEventListener("keyup",g,!0)},t.addEventListener("keydown",a,!0),t.addEventListener("keyup",g,!0),r}let Vie=class{constructor(e,t){this.body=e,this.canvas=t,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",()=>{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on("deactivate",()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on("destroy",()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let e=0;e<this.navigationHammers.length;e++)this.navigationHammers[e].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}loadNavigationElements(){this.cleanNavigation(),this.navigationDOM={};const e=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],t=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(let s=0;s<e.length;s++){this.navigationDOM[e[s]]=document.createElement("div"),this.navigationDOM[e[s]].className="vis-button vis-"+e[s],this.navigationDOM.wrapper.appendChild(this.navigationDOM[e[s]]);const a=new Cs(this.navigationDOM[e[s]]);if(t[s]==="_fit"){var r;WI(a,q(r=this._fit).call(r,this))}else{var i;WI(a,q(i=this.bindToRedraw).call(i,this,t[s]))}this.navigationHammers.push(a)}const o=new Cs(this.canvas.frame);H4(o,()=>{this._stopMovement()}),this.navigationHammers.push(o),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=q(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(const e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){const e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),r=this.body.view.translation,i=t/e,o=(1-i)*this.canvas.canvasViewCenter.x+r.x*i,s=(1-i)*this.canvas.canvasViewCenter.y+r.y*i;this.body.view.scale=t,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}_zoomOut(){const e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),r=this.body.view.translation,i=t/e,o=(1-i)*this.canvas.canvasViewCenter.x+r.x*i,s=(1-i)*this.canvas.canvasViewCenter.y+r.y*i;this.body.view.scale=t,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=GN({container:window,preventDefault:!0}):this.keycharm=GN({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,r,i,o,s,a,g,A,I,C,l,d,u,h,p,f,c,m,v,y,w,S,b;q(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),q(t=this.keycharm).call(t,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),q(r=this.keycharm).call(r,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),q(i=this.keycharm).call(i,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),q(o=this.keycharm).call(o,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),q(s=this.keycharm).call(s,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),q(a=this.keycharm).call(a,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),q(g=this.keycharm).call(g,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),q(A=this.keycharm).call(A,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),q(I=this.keycharm).call(I,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),q(C=this.keycharm).call(C,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),q(l=this.keycharm).call(l,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),q(d=this.keycharm).call(d,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),q(u=this.keycharm).call(u,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),q(h=this.keycharm).call(h,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),q(p=this.keycharm).call(p,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),q(f=this.keycharm).call(f,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),q(c=this.keycharm).call(c,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),q(m=this.keycharm).call(m,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),q(v=this.keycharm).call(v,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),q(y=this.keycharm).call(y,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),q(w=this.keycharm).call(w,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),q(S=this.keycharm).call(S,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),q(b=this.keycharm).call(b,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}},Zie=class{constructor(e,t,r){var i,o,s,a,g,A,I,C,l,d,u,h,p;this.body=e,this.canvas=t,this.selectionHandler=r,this.navigationHandler=new Vie(e,t),this.body.eventListeners.onTap=q(i=this.onTap).call(i,this),this.body.eventListeners.onTouch=q(o=this.onTouch).call(o,this),this.body.eventListeners.onDoubleTap=q(s=this.onDoubleTap).call(s,this),this.body.eventListeners.onHold=q(a=this.onHold).call(a,this),this.body.eventListeners.onDragStart=q(g=this.onDragStart).call(g,this),this.body.eventListeners.onDrag=q(A=this.onDrag).call(A,this),this.body.eventListeners.onDragEnd=q(I=this.onDragEnd).call(I,this),this.body.eventListeners.onMouseWheel=q(C=this.onMouseWheel).call(C,this),this.body.eventListeners.onPinch=q(l=this.onPinch).call(l,this),this.body.eventListeners.onMouseMove=q(d=this.onMouseMove).call(d,this),this.body.eventListeners.onRelease=q(u=this.onRelease).call(u,this),this.body.eventListeners.onContext=q(h=this.onContext).call(h,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=q(p=this.getPointer).call(p,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},Nt(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("destroy",()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(jI(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),Sr(this.options,e,"keyboard"),e.tooltip&&(Nt(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=tE(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-dQ(this.canvas.frame.canvas),y:e.y-uQ(this.canvas.frame.canvas)}}onTouch(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}onTap(e){const t=this.getPointer(e.center),r=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,r),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}onDoubleTap(e){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}onHold(e){const t=this.getPointer(e.center),r=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,r),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}onContext(e){const t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,t){const r=function(i,o){const s=[];for(let a=0;a<i.length;a++){const g=i[a];Ue(o).call(o,g)===-1&&s.push(g)}return s};return{nodes:r(e.nodes,t.nodes),edges:r(e.edges,t.edges)}}onDragStart(e){if(this.drag.dragging)return;this.drag.pointer===void 0&&this.onTouch(e);const t=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=Nt({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;const r=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(r.x),y:this.canvas._YconvertDOMtoCanvas(r.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(r.x),y:this.canvas._YconvertDOMtoCanvas(r.y)}}else if(t!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=t.id,t.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[t.id]}),this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer);for(const r of this.selectionHandler.getSelectedNodes()){const i={id:r.id,node:r,x:r.x,y:r.y,xFixed:r.options.fixed.x,yFixed:r.options.fixed.y};r.options.fixed.x=!0,r.options.fixed.y=!0,this.drag.selection.push(i)}}else this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer,void 0,!0)}onDrag(e){if(this.drag.pinched===!0)return;this.body.emitter.emit("unlockNode");const t=this.getPointer(e.center),r=this.drag.selection;if(r&&r.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,t);const i=t.x-this.drag.pointer.x,o=t.y-this.drag.pointer.y;ze(r).call(r,s=>{const a=s.node;s.xFixed===!1&&(a.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(s.x)+i)),s.yFixed===!1&&(a.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(s.y)+o))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}const i=t.x-this.drag.pointer.x,o=t.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+i,y:this.drag.translation.y+o},this.body.emitter.emit("_requestRedraw")}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var t;this.body.selectionBox.show=!1;const r=this.body.selectionBox.position,i={minX:Math.min(r.start.x,r.end.x),minY:Math.min(r.start.y,r.end.y),maxX:Math.max(r.start.x,r.end.x),maxY:Math.max(r.start.y,r.end.y)},o=ki(t=this.body.nodeIndices).call(t,a=>{const g=this.body.nodes[a];return g.x>=i.minX&&g.x<=i.maxX&&g.y>=i.minY&&g.y<=i.maxY});ze(o).call(o,a=>this.selectionHandler.selectObject(this.body.nodes[a]));const s=this.getPointer(e.center);this.selectionHandler.commitAndEmit(s,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{const r=this.drag.selection;r&&r.length?(ze(r).call(r,function(i){i.node.options.fixed.x=i.xFixed,i.node.options.fixed.y=i.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}onPinch(e){const t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);const r=this.pinch.scale*e.scale;this.zoom(r,t)}zoom(e,t){if(this.options.zoomView===!0){const r=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let i;this.drag!==void 0&&this.drag.dragging===!0&&(i=this.canvas.DOMtoCanvas(this.drag.pointer));const o=this.body.view.translation,s=e/r,a=(1-s)*t.x+o.x*s,g=(1-s)*t.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:a,y:g},i!=null){const A=this.canvas.canvasToDOM(i);this.drag.pointer.x=A.x,this.drag.pointer.y=A.y}this.body.emitter.emit("_requestRedraw"),r<e?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:t}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:t})}}onMouseWheel(e){if(this.options.zoomView===!0){if(e.deltaY!==0){let t=this.body.view.scale;t*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);const r=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(t,r)}e.preventDefault()}}onMouseMove(e){const t=this.getPointer({x:e.clientX,y:e.clientY});let r=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(t),this.popup.hidden===!1&&(r=!0,this.popup.setPosition(t.x+3,t.y-5),this.popup.show())),this.options.keyboard.autoFocus&&this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),r===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=ls(()=>this._checkShowPopup(t),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,t)}_checkShowPopup(e){const t=this.canvas._XconvertDOMtoCanvas(e.x),r=this.canvas._YconvertDOMtoCanvas(e.y),i={left:t,top:r,right:t,bottom:r},o=this.popupObj===void 0?void 0:this.popupObj.id;let s=!1,a="node";if(this.popupObj===void 0){const g=this.body.nodeIndices,A=this.body.nodes;let I;const C=[];for(let l=0;l<g.length;l++)I=A[g[l]],I.isOverlappingWith(i)===!0&&(s=!0,I.getTitle()!==void 0&&C.push(g[l]));C.length>0&&(this.popupObj=A[C[C.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){const g=this.body.edgeIndices,A=this.body.edges;let I;const C=[];for(let l=0;l<g.length;l++)I=A[g[l]],I.isOverlappingWith(i)===!0&&I.connected===!0&&I.getTitle()!==void 0&&C.push(g[l]);C.length>0&&(this.popupObj=A[C[C.length-1]],a="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new SQ(this.canvas.frame)),this.popup.popupTargetType=a,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}_checkHidePopup(e){const t=this.selectionHandler._pointerToPositionObject(e);let r=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(r=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),r===!0)){const i=this.selectionHandler.getNodeAt(e);r=i===void 0?!1:i.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(r=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));r===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}};var WN={},VN={},ZN;function Hie(){if(ZN)return VN;ZN=1;var n=$S(),e=v4();return n("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),VN}var HN;function Uie(){return HN||(HN=1,Hie()),WN}var UN={},qf,YN;function co(){if(YN)return qf;YN=1;var n=Us(),e=TypeError;return qf=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(n(t)+" is not a set")},qf}var zf,KN;function fo(){if(KN)return zf;KN=1;var n=mr(),e=m4(),t=n("Set"),r=t.prototype;return zf={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:r},zf}var jf,XN;function po(){if(XN)return jf;XN=1;var n=Ir();return jf=function(e,t,r){for(var i=r?e:e.iterator,o=e.next,s,a;!(s=n(o,i)).done;)if(a=t(s.value),a!==void 0)return a},jf}var Lf,QN;function nA(){if(QN)return Lf;QN=1;var n=po();return Lf=function(e,t,r){return r?n(e.keys(),t,!0):e.forEach(t)},Lf}var Gf,JN;function jS(){if(JN)return Gf;JN=1;var n=fo(),e=nA(),t=n.Set,r=n.add;return Gf=function(i){var o=new t;return e(i,function(s){r(o,s)}),o},Gf}var Wf,eM;function oA(){return eM||(eM=1,Wf=function(n){return n.size}),Wf}var Vf,tM;function Yie(){return tM||(tM=1,Vf=function(n){return{iterator:n,next:n.next,done:!1}}),Vf}var Zf,rM;function vo(){if(rM)return Zf;rM=1;var n=Ni(),e=li(),t=Ir(),r=Qs(),i=Yie(),o="Invalid size",s=RangeError,a=TypeError,g=Math.max,A=function(I,C){this.set=I,this.size=g(C,0),this.has=n(I.has),this.keys=n(I.keys)};return A.prototype={getIterator:function(){return i(e(t(this.keys,this.set)))},includes:function(I){return t(this.has,this.set,I)}},Zf=function(I){e(I);var C=+I.size;if(C!==C)throw new a(o);var l=r(C);if(l<0)throw new s(o);return new A(I,l)},Zf}var Hf,iM;function Kie(){if(iM)return Hf;iM=1;var n=co(),e=fo(),t=jS(),r=oA(),i=vo(),o=nA(),s=po(),a=e.has,g=e.remove;return Hf=function(I){var C=n(this),l=i(I),d=t(C);return r(C)<=l.size?o(C,function(u){l.includes(u)&&g(d,u)}):s(l.getIterator(),function(u){a(d,u)&&g(d,u)}),d},Hf}var Uf,nM;function mo(){return nM||(nM=1,Uf=function(){return!1}),Uf}var oM;function Xie(){if(oM)return UN;oM=1;var n=ie(),e=Kie(),t=me(),r=mo(),i=!r("difference",function(s){return s.size===0}),o=i||t(function(){var s={size:1,has:function(){return!0},keys:function(){var g=0;return{next:function(){var A=g++>1;return a.has(1)&&a.clear(),{done:A,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(s).size!==3});return n({target:"Set",proto:!0,real:!0,forced:o},{difference:e}),UN}var sM={},Yf,aM;function Qie(){if(aM)return Yf;aM=1;var n=co(),e=fo(),t=oA(),r=vo(),i=nA(),o=po(),s=e.Set,a=e.add,g=e.has;return Yf=function(I){var C=n(this),l=r(I),d=new s;return t(C)>l.size?o(l.getIterator(),function(u){g(C,u)&&a(d,u)}):i(C,function(u){l.includes(u)&&a(d,u)}),d},Yf}var gM;function Jie(){if(gM)return sM;gM=1;var n=ie(),e=me(),t=Qie(),r=mo(),i=!r("intersection",function(o){return o.size===2&&o.has(1)&&o.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return n({target:"Set",proto:!0,real:!0,forced:i},{intersection:t}),sM}var AM={},Kf,IM;function ene(){if(IM)return Kf;IM=1;var n=co(),e=fo().has,t=oA(),r=vo(),i=nA(),o=po(),s=RS();return Kf=function(g){var A=n(this),I=r(g);if(t(A)<=I.size)return i(A,function(l){if(I.includes(l))return!1},!0)!==!1;var C=I.getIterator();return o(C,function(l){if(e(A,l))return s(C,"normal",!1)})!==!1},Kf}var CM;function tne(){if(CM)return AM;CM=1;var n=ie(),e=ene(),t=mo(),r=!t("isDisjointFrom",function(i){return!i});return n({target:"Set",proto:!0,real:!0,forced:r},{isDisjointFrom:e}),AM}var lM={},Xf,dM;function rne(){if(dM)return Xf;dM=1;var n=co(),e=oA(),t=nA(),r=vo();return Xf=function(o){var s=n(this),a=r(o);return e(s)>a.size?!1:t(s,function(g){if(!a.includes(g))return!1},!0)!==!1},Xf}var uM;function ine(){if(uM)return lM;uM=1;var n=ie(),e=rne(),t=mo(),r=!t("isSubsetOf",function(i){return i});return n({target:"Set",proto:!0,real:!0,forced:r},{isSubsetOf:e}),lM}var hM={},Qf,cM;function nne(){if(cM)return Qf;cM=1;var n=co(),e=fo().has,t=oA(),r=vo(),i=po(),o=RS();return Qf=function(a){var g=n(this),A=r(a);if(t(g)<A.size)return!1;var I=A.getIterator();return i(I,function(C){if(!e(g,C))return o(I,"normal",!1)})!==!1},Qf}var fM;function one(){if(fM)return hM;fM=1;var n=ie(),e=nne(),t=mo(),r=!t("isSupersetOf",function(i){return!i});return n({target:"Set",proto:!0,real:!0,forced:r},{isSupersetOf:e}),hM}var pM={},Jf,vM;function sne(){if(vM)return Jf;vM=1;var n=co(),e=fo(),t=jS(),r=vo(),i=po(),o=e.add,s=e.has,a=e.remove;return Jf=function(A){var I=n(this),C=r(A).getIterator(),l=t(I);return i(C,function(d){s(I,d)?a(l,d):o(l,d)}),l},Jf}var ep,mM;function U4(){return mM||(mM=1,ep=function(n){try{var e=new Set,t={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},r=e[n](t);return r.size===1&&r.values().next().value===4}catch{return!1}}),ep}var yM;function ane(){if(yM)return pM;yM=1;var n=ie(),e=sne(),t=U4(),r=mo(),i=!r("symmetricDifference")||!t("symmetricDifference");return n({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:e}),pM}var bM={},tp,wM;function gne(){if(wM)return tp;wM=1;var n=co(),e=fo().add,t=jS(),r=vo(),i=po();return tp=function(s){var a=n(this),g=r(s).getIterator(),A=t(a);return i(g,function(I){e(A,I)}),A},tp}var EM;function Ane(){if(EM)return bM;EM=1;var n=ie(),e=gne(),t=U4(),r=mo(),i=!r("union")||!t("union");return n({target:"Set",proto:!0,real:!0,forced:i},{union:e}),bM}var rp,SM;function Ine(){if(SM)return rp;SM=1,oa(),Uie(),Xie(),Jie(),tne(),ine(),one(),ane(),Ane(),MS();var n=Pe();return rp=n.Set,rp}var ip,OM;function Cne(){if(OM)return ip;OM=1;var n=Ine();return sa(),ip=n,ip}var np,TM;function lne(){return TM||(TM=1,np=Cne()),np}var dne=lne(),Hi=de(dne),_M={},PM={},op,RM;function une(){if(RM)return op;RM=1;var n=ye(),e=NS(),t=OC().getWeakData,r=xS(),i=li(),o=Vs(),s=Ot(),a=TC(),g=cn(),A=kt(),I=lo(),C=I.set,l=I.getterFor,d=g.find,u=g.findIndex,h=n([].splice),p=0,f=function(v){return v.frozen||(v.frozen=new c)},c=function(){this.entries=[]},m=function(v,y){return d(v.entries,function(w){return w[0]===y})};return c.prototype={get:function(v){var y=m(this,v);if(y)return y[1]},has:function(v){return!!m(this,v)},set:function(v,y){var w=m(this,v);w?w[1]=y:this.entries.push([v,y])},delete:function(v){var y=u(this.entries,function(w){return w[0]===v});return~y&&h(this.entries,y,1),!!~y}},op={getConstructor:function(v,y,w,S){var b=v(function(_,T){r(_,E),C(_,{type:y,id:p++,frozen:null}),o(T)||a(T,_[S],{that:_,AS_ENTRIES:w})}),E=b.prototype,O=l(y),P=function(_,T,R){var D=O(_),G=t(i(T),!0);return G===!0?f(D).set(T,R):G[D.id]=R,_};return e(E,{delete:function(_){var T=O(this);if(!s(_))return!1;var R=t(_);return R===!0?f(T).delete(_):R&&A(R,T.id)&&delete R[T.id]},has:function(T){var R=O(this);if(!s(T))return!1;var D=t(T);return D===!0?f(R).has(T):D&&A(D,R.id)}}),e(E,w?{get:function(T){var R=O(this);if(s(T)){var D=t(T);if(D===!0)return f(R).get(T);if(D)return D[R.id]}},set:function(T,R){return P(this,T,R)}}:{add:function(T){return P(this,T,!0)}}),b}},op}var xM;function hne(){if(xM)return PM;xM=1;var n=f4(),e=We(),t=ye(),r=NS(),i=OC(),o=$S(),s=une(),a=Ot(),g=lo().enforce,A=me(),I=h4(),C=Object,l=Array.isArray,d=C.isExtensible,u=C.isFrozen,h=C.isSealed,p=C.freeze,f=C.seal,c=!e.ActiveXObject&&"ActiveXObject"in e,m,v=function(_){return function(){return _(this,arguments.length?arguments[0]:void 0)}},y=o("WeakMap",v,s),w=y.prototype,S=t(w.set),b=function(){return n&&A(function(){var _=p([]);return S(new y,_,1),!u(_)})};if(I)if(c){m=s.getConstructor(v,"WeakMap",!0),i.enable();var E=t(w.delete),O=t(w.has),P=t(w.get);r(w,{delete:function(_){if(a(_)&&!d(_)){var T=g(this);return T.frozen||(T.frozen=new m),E(this,_)||T.frozen.delete(_)}return E(this,_)},has:function(T){if(a(T)&&!d(T)){var R=g(this);return R.frozen||(R.frozen=new m),O(this,T)||R.frozen.has(T)}return O(this,T)},get:function(T){if(a(T)&&!d(T)){var R=g(this);return R.frozen||(R.frozen=new m),O(this,T)?P(this,T):R.frozen.get(T)}return P(this,T)},set:function(T,R){if(a(T)&&!d(T)){var D=g(this);D.frozen||(D.frozen=new m),O(this,T)?S(this,T,R):D.frozen.set(T,R)}else S(this,T,R);return this}})}else b()&&r(w,{set:function(T,R){var D;return l(T)&&(u(T)?D=p:h(T)&&(D=f)),S(this,T,R),D&&D(T),this}});return PM}var $M;function cne(){return $M||($M=1,hne()),_M}var sp,DM;function fne(){if(DM)return sp;DM=1,oa(),cne();var n=Pe();return sp=n.WeakMap,sp}var ap,NM;function pne(){if(NM)return ap;NM=1;var n=fne();return sa(),ap=n,ap}var gp,MM;function vne(){return MM||(MM=1,gp=pne()),gp}var mne=vne(),sA=de(mne);function gg(n,e,t){yne(n,e),e.set(n,t)}function yne(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function AE(n,e,t){return n.set(Y4(n,e),t),t}function De(n,e){return n.get(Y4(n,e))}function Y4(n,e,t){if(typeof n=="function"?n===e:n.has(e))return arguments.length<3?e:t;throw new TypeError("Private element is not present on this object")}function kM(n,e){const t=new Hi;for(const r of e)n.has(r)||t.add(r);return t}var qo=new sA,jr=new sA;let FM=class{constructor(){gg(this,qo,new Hi),gg(this,jr,new Hi)}get size(){return De(jr,this).size}add(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(const i of t)De(jr,this).add(i)}delete(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(const i of t)De(jr,this).delete(i)}clear(){De(jr,this).clear()}getSelection(){return[...De(jr,this)]}getChanges(){return{added:[...kM(De(qo,this),De(jr,this))],deleted:[...kM(De(jr,this),De(qo,this))],previous:[...new Hi(De(qo,this))],current:[...new Hi(De(jr,this))]}}commit(){const e=this.getChanges();AE(qo,this,De(jr,this)),AE(jr,this,new Hi(De(qo,this)));for(const t of e.added)t.select();for(const t of e.deleted)t.unselect();return e}};var Rn=new sA,xn=new sA,Ap=new sA;let bne=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:()=>{};gg(this,Rn,new FM),gg(this,xn,new FM),gg(this,Ap,void 0),AE(Ap,this,e)}get sizeNodes(){return De(Rn,this).size}get sizeEdges(){return De(xn,this).size}getNodes(){return De(Rn,this).getSelection()}getEdges(){return De(xn,this).getSelection()}addNodes(){De(Rn,this).add(...arguments)}addEdges(){De(xn,this).add(...arguments)}deleteNodes(e){De(Rn,this).delete(e)}deleteEdges(e){De(xn,this).delete(e)}clear(){De(Rn,this).clear(),De(xn,this).clear()}commit(){const e={nodes:De(Rn,this).commit(),edges:De(xn,this).commit()};for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return De(Ap,this).call(this,e,...r),e}},wne=class{constructor(e,t){this.body=e,this.canvas=t,this._selectionAccumulator=new bne,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Nt(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",()=>{this.updateSelection()})}setOptions(e){e!==void 0&&ta(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}selectOnPoint(e){let t=!1;if(this.options.selectable===!0){const r=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),r!==void 0&&(t=this.selectObject(r)),this.body.emitter.emit("_requestRedraw")}return t}selectAdditionalOnPoint(e){let t=!1;if(this.options.selectable===!0){const r=this.getNodeAt(e)||this.getEdgeAt(e);r!==void 0&&(t=!0,r.isSelected()===!0?this.deselectObject(r):this.selectObject(r),this.body.emitter.emit("_requestRedraw"))}return t}_initBaseEvent(e,t){const r={};return r.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},r.event=e,r}generateClickEvent(e,t,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;const s=this._initBaseEvent(t,r);if(o===!0)s.nodes=[],s.edges=[];else{const a=this.getSelection();s.nodes=a.nodes,s.edges=a.edges}i!==void 0&&(s.previousSelection=i),e=="click"&&(s.items=this.getClickedItems(r)),t.controlEdge!==void 0&&(s.controlEdge=t.controlEdge),this.body.emitter.emit(e,s)}selectObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0?(e instanceof cr?(t===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0):!1}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){const t=[],r=this.body.nodes;for(let i=0;i<this.body.nodeIndices.length;i++){const o=this.body.nodeIndices[i];r[o].isOverlappingWith(e)&&t.push(o)}return t}_pointerToPositionObject(e){const t=this.canvas.DOMtoCanvas(e);return{left:t.x-1,top:t.y+1,right:t.x+1,bottom:t.y-1}}getNodeAt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const r=this._pointerToPositionObject(e),i=this._getAllNodesOverlappingWith(r);if(i.length>0)return t===!0?this.body.nodes[i[i.length-1]]:i[i.length-1]}_getEdgesOverlappingWith(e,t){const r=this.body.edges;for(let i=0;i<this.body.edgeIndices.length;i++){const o=this.body.edgeIndices[i];r[o].isOverlappingWith(e)&&t.push(o)}}_getAllEdgesOverlappingWith(e){const t=[];return this._getEdgesOverlappingWith(e,t),t}getEdgeAt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const r=this.canvas.DOMtoCanvas(e);let i=10,o=null;const s=this.body.edges;for(let a=0;a<this.body.edgeIndices.length;a++){const g=this.body.edgeIndices[a],A=s[g];if(A.connected){const I=A.from.x,C=A.from.y,l=A.to.x,d=A.to.y,u=A.edgeType.getDistanceToEdge(I,C,l,d,r.x,r.y);u<i&&(o=g,i=u)}}if(o!==null)return t===!0?this.body.edges[o]:o}_addToHover(e){e instanceof cr?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}_removeFromSelection(e){e instanceof cr?(this._selectionAccumulator.deleteNodes(e),this._selectionAccumulator.deleteEdges(...e.edges)):this._selectionAccumulator.deleteEdges(e)}unselectAll(){this._selectionAccumulator.clear()}getSelectedNodeCount(){return this._selectionAccumulator.sizeNodes}getSelectedEdgeCount(){return this._selectionAccumulator.sizeEdges}_hoverConnectedEdges(e){for(let t=0;t<e.edges.length;t++){const r=e.edges[t];r.hover=!0,this._addToHover(r)}}emitBlurEvent(e,t,r){const i=this._initBaseEvent(e,t);r.hover===!0&&(r.hover=!1,r instanceof cr?(i.node=r.id,this.body.emitter.emit("blurNode",i)):(i.edge=r.id,this.body.emitter.emit("blurEdge",i)))}emitHoverEvent(e,t,r){const i=this._initBaseEvent(e,t);let o=!1;return r.hover===!1&&(r.hover=!0,this._addToHover(r),o=!0,r instanceof cr?(i.node=r.id,this.body.emitter.emit("hoverNode",i)):(i.edge=r.id,this.body.emitter.emit("hoverEdge",i))),o}hoverObject(e,t){let r=this.getNodeAt(t);r===void 0&&(r=this.getEdgeAt(t));let i=!1;for(const o in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,o)&&(r===void 0||r instanceof cr&&r.id!=o||r instanceof us)&&(this.emitBlurEvent(e,t,this.hoverObj.nodes[o]),delete this.hoverObj.nodes[o],i=!0);for(const o in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,o)&&(i===!0?(this.hoverObj.edges[o].hover=!1,delete this.hoverObj.edges[o]):(r===void 0||r instanceof us&&r.id!=o||r instanceof cr&&!r.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[o]),delete this.hoverObj.edges[o],i=!0));if(r!==void 0){const o=At(this.hoverObj.edges).length,s=At(this.hoverObj.nodes).length,a=r instanceof us&&o===0&&s===0,g=r instanceof cr&&o===0&&s===0;(i||a||g)&&(i=this.emitHoverEvent(e,t,r)),r instanceof cr&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(r)}i===!0&&this.body.emitter.emit("_requestRedraw")}commitWithoutEmitting(){this._selectionAccumulator.commit()}commitAndEmit(e,t){let r=!1;const i=this._selectionAccumulator.commit(),o={nodes:i.nodes.previous,edges:i.edges.previous};i.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",t,e,o),r=!0),i.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,o),r=!0),i.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),r=!0),i.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),r=!0),r===!0&&this.generateClickEvent("select",t,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return Og(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return Og(e=this._selectionAccumulator.getEdges()).call(e,t=>t.id)}setSelection(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(const r of e.nodes){const i=this.body.nodes[r];if(!i)throw new RangeError('Node with id "'+r+'" not found');this.selectObject(i,t.highlightEdges)}if(e.edges)for(const r of e.edges){const i=this.body.edges[r];if(!i)throw new RangeError('Edge with id "'+r+'" not found');this.selectObject(i)}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}selectNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}selectEdges(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}updateSelection(){for(const e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(const e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){const t=this.canvas.DOMtoCanvas(e),r=[],i=this.body.nodeIndices,o=this.body.nodes;for(let g=i.length-1;g>=0;g--){const I=o[i[g]].getItemsOnPoint(t);r.push.apply(r,I)}const s=this.body.edgeIndices,a=this.body.edges;for(let g=s.length-1;g>=0;g--){const I=a[s[g]].getItemsOnPoint(t);r.push.apply(r,I)}return r}};var BM={},Ip,qM;function Ene(){if(qM)return Ip;qM=1;var n=Js(),e=Math.floor,t=function(r,i){var o=r.length;if(o<8)for(var s=1,a,g;s<o;){for(g=s,a=r[s];g&&i(r[g-1],a)>0;)r[g]=r[--g];g!==s++&&(r[g]=a)}else for(var A=e(o/2),I=t(n(r,0,A),i),C=t(n(r,A),i),l=I.length,d=C.length,u=0,h=0;u<l||h<d;)r[u+h]=u<l&&h<d?i(I[u],C[h])<=0?I[u++]:C[h++]:u<l?I[u++]:C[h++];return r};return Ip=t,Ip}var Cp,zM;function Sne(){if(zM)return Cp;zM=1;var n=Zs(),e=n.match(/firefox\/(\d+)/i);return Cp=!!e&&+e[1],Cp}var lp,jM;function One(){if(jM)return lp;jM=1;var n=Zs();return lp=/MSIE|Trident/.test(n),lp}var dp,LM;function Tne(){if(LM)return dp;LM=1;var n=Zs(),e=n.match(/AppleWebKit\/(\d+)\./);return dp=!!e&&+e[1],dp}var GM;function _ne(){if(GM)return BM;GM=1;var n=ie(),e=ye(),t=Ni(),r=$r(),i=Mi(),o=s4(),s=Mr(),a=me(),g=Ene(),A=ra(),I=Sne(),C=One(),l=Zg(),d=Tne(),u=[],h=e(u.sort),p=e(u.push),f=a(function(){u.sort(void 0)}),c=a(function(){u.sort(null)}),m=A("sort"),v=!a(function(){if(l)return l<70;if(!(I&&I>3)){if(C)return!0;if(d)return d<603;var S="",b,E,O,P;for(b=65;b<76;b++){switch(E=String.fromCharCode(b),b){case 66:case 69:case 70:case 72:O=3;break;case 68:case 71:O=4;break;default:O=2}for(P=0;P<47;P++)u.push({k:E+P,v:O})}for(u.sort(function(_,T){return T.v-_.v}),P=0;P<u.length;P++)E=u[P].k.charAt(0),S.charAt(S.length-1)!==E&&(S+=E);return S!=="DGBEFHACIJK"}}),y=f||!c||!m||!v,w=function(S){return function(b,E){return E===void 0?-1:b===void 0?1:S!==void 0?+S(b,E)||0:s(b)>s(E)?1:-1}};return n({target:"Array",proto:!0,forced:y},{sort:function(b){b!==void 0&&t(b);var E=r(this);if(v)return b===void 0?h(E):h(E,b);var O=[],P=i(E),_,T;for(T=0;T<P;T++)T in E&&p(O,E[T]);for(g(O,w(b)),_=i(O),T=0;T<_;)E[T]=O[T++];for(;T<P;)o(E,T++);return E}}),BM}var up,WM;function Pne(){if(WM)return up;WM=1,_ne();var n=Ft();return up=n("Array","sort"),up}var hp,VM;function Rne(){if(VM)return hp;VM=1;var n=ut(),e=Pne(),t=Array.prototype;return hp=function(r){var i=r.sort;return r===t||n(t,r)&&i===t.sort?e:i},hp}var cp,ZM;function xne(){if(ZM)return cp;ZM=1;var n=Rne();return cp=n,cp}var fp,HM;function $ne(){return HM||(HM=1,fp=xne()),fp}var Dne=$ne(),cs=de(Dne),UM={},pp,YM;function Nne(){if(YM)return pp;YM=1;var n=at(),e=me(),t=ye(),r=OS(),i=Yg(),o=Qr(),s=dC().f,a=t(s),g=t([].push),A=n&&e(function(){var C=Object.create(null);return C[2]=2,!a(C,2)}),I=function(C){return function(l){for(var d=o(l),u=i(d),h=A&&r(d)===null,p=u.length,f=0,c=[],m;p>f;)m=u[f++],(!n||(h?m in d:a(d,m)))&&g(c,C?[m,d[m]]:d[m]);return c}};return pp={entries:I(!0),values:I(!1)},pp}var KM;function Mne(){if(KM)return UM;KM=1;var n=ie(),e=Nne().values;return n({target:"Object",stat:!0},{values:function(r){return e(r)}}),UM}var vp,XM;function kne(){if(XM)return vp;XM=1,Mne();var n=Pe();return vp=n.Object.values,vp}var mp,QM;function Fne(){if(QM)return mp;QM=1;var n=kne();return mp=n,mp}var yp,JM;function Bne(){return JM||(JM=1,yp=Fne()),yp}var qne=Bne(),zne=de(qne),ek={},bp,tk;function jne(){if(tk)return bp;tk=1;var n=Ni(),e=$r(),t=uC(),r=Mi(),i=TypeError,o="Reduce of empty array with no initial value",s=function(a){return function(g,A,I,C){var l=e(g),d=t(l),u=r(l);if(n(A),u===0&&I<2)throw new i(o);var h=a?u-1:0,p=a?-1:1;if(I<2)for(;;){if(h in d){C=d[h],h+=p;break}if(h+=p,a?h<0:u<=h)throw new i(o)}for(;a?h>=0:u>h;h+=p)h in d&&(C=A(C,d[h],h,l));return C}};return bp={left:s(!1),right:s(!0)},bp}var wp,rk;function Lne(){if(rk)return wp;rk=1;var n=y4();return wp=n==="NODE",wp}var ik;function Gne(){if(ik)return ek;ik=1;var n=ie(),e=jne().left,t=ra(),r=Zg(),i=Lne(),o=!i&&r>79&&r<83,s=o||!t("reduce");return n({target:"Array",proto:!0,forced:s},{reduce:function(g){var A=arguments.length;return e(this,g,A,A>1?arguments[1]:void 0)}}),ek}var Ep,nk;function Wne(){if(nk)return Ep;nk=1,Gne();var n=Ft();return Ep=n("Array","reduce"),Ep}var Sp,ok;function Vne(){if(ok)return Sp;ok=1;var n=ut(),e=Wne(),t=Array.prototype;return Sp=function(r){var i=r.reduce;return r===t||n(t,r)&&i===t.reduce?e:i},Sp}var Op,sk;function Zne(){if(sk)return Op;sk=1;var n=Vne();return Op=n,Op}var Tp,ak;function Hne(){return ak||(ak=1,Tp=Zne()),Tp}var Une=Hne(),K4=de(Une);let X4=class{abstract(){throw new Error("Can't instantiate abstract class!")}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,r),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,t){this.fake_use(e,t),this.abstract()}shift(e,t){this.fake_use(e,t),this.abstract()}},Yne=class extends X4{constructor(e){super(),this.layout=e}curveType(){return"horizontal"}getPosition(e){return e.x}setPosition(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;r!==void 0&&this.layout.hierarchical.addToOrdering(e,r),e.x=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}sort(e){cs(e).call(e,function(t,r){return t.x-r.x})}fix(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}shift(e,t){this.layout.body.nodes[e].x+=t}},Kne=class extends X4{constructor(e){super(),this.layout=e}curveType(){return"vertical"}getPosition(e){return e.y}setPosition(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;r!==void 0&&this.layout.hierarchical.addToOrdering(e,r),e.y=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}sort(e){cs(e).call(e,function(t,r){return t.y-r.y})}fix(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}shift(e,t){this.layout.body.nodes[e].y+=t}};var gk={},Ak;function Xne(){if(Ak)return gk;Ak=1;var n=ie(),e=cn().every,t=ra(),r=t("every");return n({target:"Array",proto:!0,forced:!r},{every:function(o){return e(this,o,arguments.length>1?arguments[1]:void 0)}}),gk}var _p,Ik;function Qne(){if(Ik)return _p;Ik=1,Xne();var n=Ft();return _p=n("Array","every"),_p}var Pp,Ck;function Jne(){if(Ck)return Pp;Ck=1;var n=ut(),e=Qne(),t=Array.prototype;return Pp=function(r){var i=r.every;return r===t||n(t,r)&&i===t.every?e:i},Pp}var Rp,lk;function eoe(){if(lk)return Rp;lk=1;var n=Jne();return Rp=n,Rp}var xp,dk;function toe(){return dk||(dk=1,xp=eoe()),xp}var roe=toe(),Q4=de(roe);function ioe(n,e){const t=new Hi;return ze(n).call(n,r=>{var i;ze(i=r.edges).call(i,o=>{o.connected&&t.add(o)})}),ze(t).call(t,r=>{const i=r.from.id,o=r.to.id;e[i]==null&&(e[i]=0),(e[o]==null||e[i]>=e[o])&&(e[o]=e[i]+1)}),e}function noe(n){return J4(e=>{var t,r;return Q4(t=ki(r=e.edges).call(r,i=>n.has(i.toId))).call(t,i=>i.to===e)},(e,t)=>t>e,"from",n)}function ooe(n){return J4(e=>{var t,r;return Q4(t=ki(r=e.edges).call(r,i=>n.has(i.toId))).call(t,i=>i.from===e)},(e,t)=>t<e,"to",n)}function J4(n,e,t,r){var i;const o=og(null),s=K4(i=[...z4(r).call(r)]).call(i,(C,l)=>C+1+l.edges.length,0),a=t+"Id",g=t==="to"?1:-1;for(const[C,l]of r){if(!r.has(C)||!n(l))continue;o[C]=0;const d=[l];let u=0,h;for(;h=d.pop();){var A,I;if(!r.has(C))continue;const p=o[h.id]+g;if(ze(A=ki(I=h.edges).call(I,f=>f.connected&&f.to!==f.from&&f[t]!==h&&r.has(f.toId)&&r.has(f.fromId))).call(A,f=>{const c=f[a],m=o[c];(m==null||e(p,m))&&(o[c]=p,d.push(f[t]))}),u>s)return ioe(r,o);++u}}return o}let soe=class{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}checkIfTree(){for(const e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){const t={},r=i=>{if(t[i]!==void 0)return t[i];let o=this.levels[i];if(this.childrenReference[i]){const s=this.childrenReference[i];if(s.length>0)for(let a=0;a<s.length;a++)o=Math.max(o,r(s[a]))}return t[i]=o,o};return r(e)}levelDownstream(e,t){this.levels[t.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[t.id]=this.levels[e.id]+1)}setMinLevelToZero(){var e;const t=new kS;let r=0;const i=cs(e=[...new Hi(zne(this.levels))]).call(e,(o,s)=>o-s);for(const o of i)t.set(o,r++);for(const o in this.levels)Object.prototype.hasOwnProperty.call(this.levels,o)&&(this.levels[o]=t.get(this.levels[o]))}getTreeSize(e,t){let r=1e9,i=-1e9,o=1e9,s=-1e9;for(const a in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,a)&&this.trees[a]===t){const g=e[a];r=Math.min(g.x,r),i=Math.max(g.x,i),o=Math.min(g.y,o),s=Math.max(g.y,s)}return{min_x:r,max_x:i,min_y:o,max_y:s}}hasSameParent(e,t){const r=this.parentReference[e.id],i=this.parentReference[t.id];if(r===void 0||i===void 0)return!1;for(let o=0;o<r.length;o++)for(let s=0;s<i.length;s++)if(r[o]==i[s])return!0;return!1}inSameSubNetwork(e,t){return this.trees[e.id]===this.trees[t.id]}getLevels(){return At(this.distributionOrdering)}addToOrdering(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);let r=!1;const i=this.distributionOrdering[t];for(const o in i)if(i[o]===e){r=!0;break}r||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}},aoe=class{constructor(e){this.body=e,this._resetRNG(Math.random()+":"+gE()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},Nt(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("_dataChanged",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",()=>{this.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",()=>{if(this.options.hierarchical.enabled!==!0)return;const e=this.direction.curveType();this.body.emitter.emit("_forceDisableDynamicCurves",e,!1)})}setOptions(e,t){if(e!==void 0){const r=this.options.hierarchical,i=r.enabled;if(ta(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),Sr(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),r.enabled===!0)return i===!0&&this.body.emitter.emit("refresh",!0),r.direction==="RL"||r.direction==="DU"?r.levelSeparation>0&&(r.levelSeparation*=-1):r.levelSeparation<0&&(r.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(i===!0)return this.body.emitter.emit("refresh"),Me(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=bC(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){const t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):typeof e.physics=="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});let r=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:r};else{const i=e.edges.smooth;i.type!==void 0&&i.type!=="dynamic"&&(r=i.type),this.optionsBackup.edges={smooth:{enabled:i.enabled===void 0?!0:i.enabled,type:i.type===void 0?"dynamic":i.type,roundness:i.roundness===void 0?.5:i.roundness,forceDirection:i.forceDirection===void 0?!1:i.forceDirection}},e.edges.smooth={enabled:i.enabled===void 0?!0:i.enabled,type:r,roundness:i.roundness===void 0?.5:i.roundness,forceDirection:i.forceDirection===void 0?!1:i.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",r)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);const t=e.length+50;for(let r=0;r<e.length;r++){const i=e[r],o=2*Math.PI*this._rng();i.x===void 0&&(i.x=t*Math.cos(o)),i.y===void 0&&(i.y=t*Math.sin(o))}}}layoutNetwork(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){const e=this.body.nodeIndices;let t=0;for(let r=0;r<e.length;r++)this.body.nodes[e[r]].predefinedPosition===!0&&(t+=1);if(t<.5*e.length){let i=0;const o=this.options.clusterThreshold,s={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>o){const g=e.length;for(;e.length>o&&i<=10;){i+=1;const A=e.length;i%3===0?this.body.modules.clustering.clusterBridges(s):this.body.modules.clustering.clusterOutliers(s);const I=e.length;if(A==I&&i%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*g)})}i>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();const a=70;for(let g=0;g<e.length;g++){const A=this.body.nodes[e[g]];A.predefinedPosition===!1&&(A.x+=(.5-this._rng())*a,A.y+=(.5-this._rng())*a)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}_shiftToCenter(){const e=Ut.getRangeCore(this.body.nodes,this.body.nodeIndices),t=Ut.findCenter(e);for(let r=0;r<this.body.nodeIndices.length;r++){const i=this.body.nodes[this.body.nodeIndices[r]];i.x-=t.x,i.y-=t.y}}_declusterAll(){let e=!0;for(;e===!0;){e=!1;for(let t=0;t<this.body.nodeIndices.length;t++)this.body.nodes[this.body.nodeIndices[t]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!1));e===!0&&this.body.emitter.emit("_dataChanged")}}getSeed(){return this.initialRandomSeed}setupHierarchicalLayout(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){let e,t,r=!1,i=!1;this.lastNodeOnLevel={},this.hierarchical=new soe;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(r=!0,this.hierarchical.levels[t]=e.options.level):i=!0);if(i===!0&&r===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");{if(i===!0){const s=this.options.hierarchical.sortMethod;s==="hubsize"?this._determineLevelsByHubsize():s==="directed"?this._determineLevelsDirected():s==="custom"&&this._determineLevelsCustomCallback()}for(const s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.hierarchical.ensureLevel(s);const o=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(o),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let t=!1;const r={},i=()=>{const f=s();let c=0;for(let m=0;m<f.length-1;m++){const v=f[m].max-f[m+1].min;c+=v+this.options.hierarchical.treeSpacing,o(m+1,c)}},o=(f,c)=>{const m=this.hierarchical.trees;for(const v in m)Object.prototype.hasOwnProperty.call(m,v)&&m[v]===f&&this.direction.shift(v,c)},s=()=>{const f=[];for(let c=0;c<this.hierarchical.numTrees();c++)f.push(this.direction.getTreeSize(c));return f},a=(f,c)=>{if(!c[f.id]&&(c[f.id]=!0,this.hierarchical.childrenReference[f.id])){const m=this.hierarchical.childrenReference[f.id];if(m.length>0)for(let v=0;v<m.length;v++)a(this.body.nodes[m[v]],c)}},g=function(f){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,m=1e9,v=1e9,y=1e9,w=-1e9;for(const S in f)if(Object.prototype.hasOwnProperty.call(f,S)){const b=e.body.nodes[S],E=e.hierarchical.levels[b.id],O=e.direction.getPosition(b),[P,_]=e._getSpaceAroundNode(b,f);m=Math.min(P,m),v=Math.min(_,v),E<=c&&(y=Math.min(O,y),w=Math.max(O,w))}return[y,w,m,v]},A=(f,c)=>{const m=this.hierarchical.getMaxLevel(f.id),v=this.hierarchical.getMaxLevel(c.id);return Math.min(m,v)},I=(f,c,m)=>{const v=this.hierarchical;for(let y=0;y<c.length;y++){const w=c[y],S=v.distributionOrdering[w];if(S.length>1)for(let b=0;b<S.length-1;b++){const E=S[b],O=S[b+1];v.hasSameParent(E,O)&&v.inSameSubNetwork(E,O)&&f(E,O,m)}}},C=function(f,c){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const v=e.direction.getPosition(f),y=e.direction.getPosition(c),w=Math.abs(y-v),S=e.options.hierarchical.nodeSpacing;if(w>S){const b={},E={};a(f,b),a(c,E);const O=A(f,c),P=g(b,O),_=g(E,O),T=P[1],R=_[0],D=_[2];if(Math.abs(T-R)>S){let B=T-R+S;B<-D+S&&(B=-D+S),B<0&&(e._shiftBlock(c.id,B),t=!0,m===!0&&e._centerParent(c))}}},l=(f,c)=>{const m=c.id,v=c.edges,y=this.hierarchical.levels[c.id],w=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,S={},b=[];for(let D=0;D<v.length;D++){const G=v[D];if(G.toId!=G.fromId){const B=G.toId==m?G.from:G.to;S[v[D].id]=B,this.hierarchical.levels[B.id]<y&&b.push(G)}}const E=(D,G)=>{let B=0;for(let Q=0;Q<G.length;Q++)if(S[G[Q].id]!==void 0){const te=this.direction.getPosition(S[G[Q].id])-D;B+=te/Math.sqrt(te*te+w)}return B},O=(D,G)=>{let B=0;for(let Q=0;Q<G.length;Q++)if(S[G[Q].id]!==void 0){const te=this.direction.getPosition(S[G[Q].id])-D;B-=w*Math.pow(te*te+w,-1.5)}return B},P=(D,G)=>{let B=this.direction.getPosition(c);const Q={};for(let te=0;te<D;te++){const le=E(B,G),U=O(B,G),fe=40,xe=Math.max(-fe,Math.min(fe,Math.round(le/U)));if(B=B-xe,Q[B]!==void 0)break;Q[B]=te}return B},_=D=>{const G=this.direction.getPosition(c);if(r[c.id]===void 0){const fe={};a(c,fe),r[c.id]=fe}const B=g(r[c.id]),Q=B[2],te=B[3],le=D-G;let U=0;le>0?U=Math.min(le,te-this.options.hierarchical.nodeSpacing):le<0&&(U=-Math.min(-le,Q-this.options.hierarchical.nodeSpacing)),U!=0&&(this._shiftBlock(c.id,U),t=!0)},T=D=>{const G=this.direction.getPosition(c),[B,Q]=this._getSpaceAroundNode(c),te=D-G;let le=G;te>0?le=Math.min(G+(Q-this.options.hierarchical.nodeSpacing),D):te<0&&(le=Math.max(G-(B-this.options.hierarchical.nodeSpacing),D)),le!==G&&(this.direction.setPosition(c,le),t=!0)};let R=P(f,b);_(R),R=P(f,v),T(R)},d=f=>{let c=this.hierarchical.getLevels();c=hs(c).call(c);for(let m=0;m<f;m++){t=!1;for(let v=0;v<c.length;v++){const y=c[v],w=this.hierarchical.distributionOrdering[y];for(let S=0;S<w.length;S++)l(1e3,w[S])}if(t!==!0)break}},u=f=>{let c=this.hierarchical.getLevels();c=hs(c).call(c);for(let m=0;m<f&&(t=!1,I(C,c,!0),t===!0);m++);},h=()=>{for(const f in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,f)&&this._centerParent(this.body.nodes[f])},p=()=>{let f=this.hierarchical.getLevels();f=hs(f).call(f);for(let c=0;c<f.length;c++){const m=f[c],v=this.hierarchical.distributionOrdering[m];for(let y=0;y<v.length;y++)this._centerParent(v[y])}};this.options.hierarchical.blockShifting===!0&&(u(5),h()),this.options.hierarchical.edgeMinimization===!0&&d(20),this.options.hierarchical.parentCentralization===!0&&p(),i()}_getSpaceAroundNode(e,t){let r=!0;t===void 0&&(r=!1);const i=this.hierarchical.levels[e.id];if(i!==void 0){const o=this.hierarchical.distributionIndex[e.id],s=this.direction.getPosition(e),a=this.hierarchical.distributionOrdering[i];let g=1e9,A=1e9;if(o!==0){const I=a[o-1];if(r===!0&&t[I.id]===void 0||r===!1){const C=this.direction.getPosition(I);g=s-C}}if(o!=a.length-1){const I=a[o+1];if(r===!0&&t[I.id]===void 0||r===!1){const C=this.direction.getPosition(I);A=Math.min(A,C-s)}}return[g,A]}else return[0,0]}_centerParent(e){if(this.hierarchical.parentReference[e.id]){const t=this.hierarchical.parentReference[e.id];for(let r=0;r<t.length;r++){const i=t[r],o=this.body.nodes[i],s=this.hierarchical.childrenReference[i];if(s!==void 0){const a=this._getCenterPosition(s),g=this.direction.getPosition(o),[A,I]=this._getSpaceAroundNode(o),C=g-a;(C<0&&Math.abs(C)<I-this.options.hierarchical.nodeSpacing||C>0&&Math.abs(C)<A-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,a)}}}}_placeNodesByHierarchy(e){this.positionedNodes={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var t;let i=At(e[r]);i=this._indexArrayToNodes(i),cs(t=this.direction).call(t,i);let o=0;for(let s=0;s<i.length;s++){const a=i[s];if(this.positionedNodes[a.id]===void 0){const g=this.options.hierarchical.nodeSpacing;let A=g*o;o>0&&(A=this.direction.getPosition(i[s-1])+g),this.direction.setPosition(a,A,r),this._validatePositionAndContinue(a,r,A),o++}}}}_placeBranchNodes(e,t){var r;const i=this.hierarchical.childrenReference[e];if(i===void 0)return;const o=[];for(let a=0;a<i.length;a++)o.push(this.body.nodes[i[a]]);cs(r=this.direction).call(r,o);for(let a=0;a<o.length;a++){const g=o[a],A=this.hierarchical.levels[g.id];if(A>t&&this.positionedNodes[g.id]===void 0){const I=this.options.hierarchical.nodeSpacing;let C;a===0?C=this.direction.getPosition(this.body.nodes[e]):C=this.direction.getPosition(o[a-1])+I,this.direction.setPosition(g,C,A),this._validatePositionAndContinue(g,A,C)}else return}const s=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],s,t)}_validatePositionAndContinue(e,t,r){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){const i=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(r-i<this.options.hierarchical.nodeSpacing){const o=i+this.options.hierarchical.nodeSpacing-r,s=this._findCommonParent(this.lastNodeOnLevel[t],e.id);this._shiftBlock(s.withChild,o)}}this.lastNodeOnLevel[t]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,t)}}_indexArrayToNodes(e){const t=[];for(let r=0;r<e.length;r++)t.push(this.body.nodes[e[r]]);return t}_getDistribution(){const e={};let t,r;for(t in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,t)){r=this.body.nodes[t];const i=this.hierarchical.levels[t]===void 0?0:this.hierarchical.levels[t];this.direction.fix(r,i),e[i]===void 0&&(e[i]={}),e[i][t]=r}return e}_getActiveEdges(e){const t=[];return pe(e.edges,r=>{var i;Ue(i=this.body.edgeIndices).call(i,r.id)!==-1&&t.push(r)}),t}_getHubSizes(){const e={},t=this.body.nodeIndices;pe(t,i=>{const o=this.body.nodes[i],s=this._getActiveEdges(o).length;e[s]=!0});const r=[];return pe(e,i=>{r.push(Number(i))}),cs(r).call(r,function(i,o){return o-i}),r}_determineLevelsByHubsize(){const e=(r,i)=>{this.hierarchical.levelDownstream(r,i)},t=this._getHubSizes();for(let r=0;r<t.length;++r){const i=t[r];if(i===0)break;pe(this.body.nodeIndices,o=>{const s=this.body.nodes[o];i===this._getActiveEdges(s).length&&this._crawlNetwork(e,o)})}}_determineLevelsCustomCallback(){const t=function(i,o,s){},r=(i,o,s)=>{let a=this.hierarchical.levels[i.id];a===void 0&&(a=this.hierarchical.levels[i.id]=1e5);const g=t(Ut.cloneOptions(i,"node"),Ut.cloneOptions(o,"node"),Ut.cloneOptions(s,"edge"));this.hierarchical.levels[o.id]=a+g};this._crawlNetwork(r),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=K4(e=this.body.nodeIndices).call(e,(r,i)=>(r.set(i,this.body.nodes[i]),r),new kS);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=ooe(t):this.hierarchical.levels=noe(t),this.hierarchical.setMinLevelToZero()}_generateMap(){const e=(t,r)=>{this.hierarchical.levels[r.id]>this.hierarchical.levels[t.id]&&this.hierarchical.addRelation(t.id,r.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},t=arguments.length>1?arguments[1]:void 0;const r={},i=(o,s)=>{if(r[o.id]===void 0){this.hierarchical.setTreeIndex(o,s),r[o.id]=!0;let a;const g=this._getActiveEdges(o);for(let A=0;A<g.length;A++){const I=g[A];I.connected===!0&&(I.toId==o.id?a=I.from:a=I.to,o.id!=a.id&&(e(o,a,I),i(a,s)))}}};if(t===void 0){let o=0;for(let s=0;s<this.body.nodeIndices.length;s++){const a=this.body.nodeIndices[s];if(r[a]===void 0){const g=this.body.nodes[a];i(g,o),o+=1}}}else{const o=this.body.nodes[t];if(o===void 0){console.error("Node not found:",t);return}i(o)}}_shiftBlock(e,t){const r={},i=o=>{if(r[o])return;r[o]=!0,this.direction.shift(o,t);const s=this.hierarchical.childrenReference[o];if(s!==void 0)for(let a=0;a<s.length;a++)i(s[a])};i(e)}_findCommonParent(e,t){const r={},i=(s,a)=>{const g=this.hierarchical.parentReference[a];if(g!==void 0)for(let A=0;A<g.length;A++){const I=g[A];s[I]=!0,i(s,I)}},o=(s,a)=>{const g=this.hierarchical.parentReference[a];if(g!==void 0)for(let A=0;A<g.length;A++){const I=g[A];if(s[I]!==void 0)return{foundParent:I,withChild:a};const C=o(s,I);if(C.foundParent!==null)return C}return{foundParent:null,withChild:a}};return i(r,e),o(r,t)}setDirectionStrategy(){this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU"?this.direction=new Yne(this):this.direction=new Kne(this)}_getCenterPosition(e){let t=1e9,r=-1e9;for(let i=0;i<e.length;i++){let o;if(e[i].id!==void 0)o=e[i];else{const a=e[i];o=this.body.nodes[a]}const s=this.direction.getPosition(o);t=Math.min(t,s),r=Math.max(r,s)}return .5*(t+r)}},goe=class{constructor(e,t,r,i){var o,s;this.body=e,this.canvas=t,this.selectionHandler=r,this.interactionHandler=i,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},Nt(this.options,this.defaultOptions),this.body.emitter.on("destroy",()=>{this._clean()}),this.body.emitter.on("_dataChanged",q(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",q(s=this._restore).call(s,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,t,r){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=r.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=r.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,Me(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}disableEditMode(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";const r=this.selectionHandler.getSelectedNodeCount(),i=this.selectionHandler.getSelectedEdgeCount(),o=r+i,s=this.options.locales[this.options.locale];let a=!1;this.options.addNode!==!1&&(this._createAddNodeButton(s),a=!0),this.options.addEdge!==!1&&(a===!0?this._createSeperator(1):a=!0,this._createAddEdgeButton(s)),r===1&&typeof this.options.editNode=="function"?(a===!0?this._createSeperator(2):a=!0,this._createEditNodeButton(s)):i===1&&r===0&&this.options.editEdge!==!1&&(a===!0?this._createSeperator(3):a=!0,this._createEditEdgeButton(s)),o!==0&&(r>0&&this.options.deleteNode!==!1?(a===!0&&this._createSeperator(4),this._createDeleteButton(s)):r===0&&this.options.deleteEdge!==!1&&(a===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,q(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",q(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t;const r=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(r),this._createSeperator(),this._createDescription(r.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,q(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",q(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();const e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(e.isCluster!==!0){const t=Me({},e.options,!1);if(t.x=e.x,t.y=e.y,this.options.editNode.length===2)this.options.editNode(t,r=>{r!=null&&this.inMode==="editNode"&&this.body.data.nodes.getDataSet().update(r),this.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}addEdgeMode(){var e,t,r,i,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s;const a=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(a),this._createSeperator(),this._createDescription(a.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,q(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",q(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",q(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",q(r=this._dragControlNode).call(r,this)),this._temporaryBindUI("onRelease",q(i=this._finishConnect).call(i,this)),this._temporaryBindUI("onDragStart",q(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",typeof this.options.editEdge=="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){const s=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(s.from.id,s.to.id);return}if(this.guiEnabled===!0){var e;const s=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(s),this._createSeperator(),this._createDescription(s.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,q(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var t,r,i,o;const s=this.body.edges[this.edgeBeingEditedId],a=this._getNewTargetNode(s.from.x,s.from.y),g=this._getNewTargetNode(s.to.x,s.to.y);this.temporaryIds.nodes.push(a.id),this.temporaryIds.nodes.push(g.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this.body.nodes[g.id]=g,this.body.nodeIndices.push(g.id),this._temporaryBindUI("onTouch",q(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",q(r=this._controlNodeDragStart).call(r,this)),this._temporaryBindUI("onDrag",q(i=this._controlNodeDrag).call(i,this)),this._temporaryBindUI("onDragEnd",q(o=this._controlNodeDragEnd).call(o,this)),this._temporaryBindUI("onMouseMove",()=>{}),this._temporaryBindEvent("beforeDrawing",A=>{const I=s.edgeType.findBorderPositions(A);a.selected===!1&&(a.x=I.from.x,a.y=I.from.y),g.selected===!1&&(g.x=I.to.x,g.y=I.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";const e=this.selectionHandler.getSelectedNodeIds(),t=this.selectionHandler.getSelectedEdgeIds();let r;if(e.length>0){for(let i=0;i<e.length;i++)if(this.body.nodes[e[i]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode=="function"&&(r=this.options.deleteNode)}else t.length>0&&typeof this.options.deleteEdge=="function"&&(r=this.options.deleteEdge);if(typeof r=="function"){const i={nodes:e,edges:t};if(r.length===2)r(i,o=>{o!=null&&this.inMode==="delete"?(this.body.data.edges.getDataSet().remove(o.edges),this.body.data.nodes.getDataSet().remove(o.nodes),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()):(this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(t),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}_getNewTargetNode(e,t){const r=Me({},this.options.controlNodeStyle);r.id="targetNode"+ds(),r.hidden=!1,r.physics=!1,r.x=e,r.y=t;const i=this.body.functions.createNode(r);return i.shape.boundingBox={left:e,right:e,top:t,bottom:t},i}_createEditButton(){var e;this._clean(),this.manipulationDOM={},Gi(this.editModeDiv);const t=this.options.locales[this.options.locale],r=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(r),this._bindElementEvents(r,q(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(Gi(this.editModeDiv),Gi(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of en(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),Gi(this.manipulationDiv),Gi(this.editModeDiv),Gi(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}_createSeperator(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}_createAddNodeButton(e){var t;const r=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,q(t=this.addNodeMode).call(t,this))}_createAddEdgeButton(e){var t;const r=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,q(t=this.addEdgeMode).call(t,this))}_createEditNodeButton(e){var t;const r=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,q(t=this.editNode).call(t,this))}_createEditEdgeButton(e){var t;const r=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,q(t=this.editEdgeMode).call(t,this))}_createDeleteButton(e){var t;let r;this.options.rtl?r="vis-delete-rtl":r="vis-delete";const i=this._createButton("delete",r,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,q(t=this.deleteSelected).call(t,this))}_createBackButton(e){var t;const r=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,q(t=this.showManipulatorToolbar).call(t,this))}_createButton(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=i,this.manipulationDOM[e+"Label"].innerText=r,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}_temporaryBindUI(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+L4(At(this.body.eventListeners)))}_unbindTemporaryUIs(){for(const e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e<this.temporaryEventFunctions.length;e++){const t=this.temporaryEventFunctions[e].event,r=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,r)}this.temporaryEventFunctions=[]}_bindElementEvents(e,t){const r=new Cs(e,{});WI(r,t),this._domEventListenerCleanupQueue.push(()=>{r.destroy()});const i=o=>{let{keyCode:s,key:a}=o;(a==="Enter"||a===" "||s===13||s===32)&&t()};e.addEventListener("keyup",i,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener("keyup",i,!1)})}_cleanupTemporaryNodesAndEdges(){for(let o=0;o<this.temporaryIds.edges.length;o++){var e;this.body.edges[this.temporaryIds.edges[o]].disconnect(),delete this.body.edges[this.temporaryIds.edges[o]];const s=Ue(e=this.body.edgeIndices).call(e,this.temporaryIds.edges[o]);if(s!==-1){var t;en(t=this.body.edgeIndices).call(t,s,1)}}for(let o=0;o<this.temporaryIds.nodes.length;o++){var r;delete this.body.nodes[this.temporaryIds.nodes[o]];const s=Ue(r=this.body.nodeIndices).call(r,this.temporaryIds.nodes[o]);if(s!==-1){var i;en(i=this.body.nodeIndices).call(i,s,1)}}this.temporaryIds={nodes:[],edges:[]}}_controlNodeTouch(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Nt({},this.body.view.translation)}_controlNodeDragStart(){const e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),r=this.body.nodes[this.temporaryIds.nodes[0]],i=this.body.nodes[this.temporaryIds.nodes[1]],o=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;const s=r.isOverlappingWith(t),a=i.isOverlappingWith(t);s===!0?(this.selectedControlNode=r,o.edgeType.from=r):a===!0&&(this.selectedControlNode=i,o.edgeType.to=i),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}_controlNodeDrag(e){this.body.emitter.emit("disablePhysics");const t=this.body.functions.getPointer(e.center),r=this.canvas.DOMtoCanvas(t);this.selectedControlNode!==void 0?(this.selectedControlNode.x=r.x,this.selectedControlNode.y=r.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}_controlNodeDragEnd(e){const t=this.body.functions.getPointer(e.center),r=this.selectionHandler._pointerToPositionObject(t),i=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode===void 0)return;this.selectionHandler.unselectAll();const o=this.selectionHandler._getAllNodesOverlappingWith(r);let s;for(let a=o.length-1;a>=0;a--)if(o[a]!==this.selectedControlNode.id){s=this.body.nodes[o[a]];break}if(s!==void 0&&this.selectedControlNode!==void 0)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,i.to.id):this._performEditEdge(i.from.id,s.id)}else i.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Nt({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;const t=this.lastTouch,r=this.selectionHandler.getNodeAt(t);if(r!==void 0)if(r.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const i=this._getNewTargetNode(r.x,r.y);this.body.nodes[i.id]=i,this.body.nodeIndices.push(i.id);const o=this.body.functions.createEdge({id:"connectionEdge"+ds(),from:r.id,to:i.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(i.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){const t=this.body.functions.getPointer(e.center),r=this.selectionHandler._pointerToPositionObject(t);let i;this.temporaryIds.edges[0]!==void 0&&(i=this.body.edges[this.temporaryIds.edges[0]].fromId);const o=this.selectionHandler._getAllNodesOverlappingWith(r);let s;for(let g=o.length-1;g>=0;g--){var a;if(Ue(a=this.temporaryIds.nodes).call(a,o[g])===-1){s=this.body.nodes[o[g]];break}}if(e.controlEdge={from:i,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){const g=this.body.nodes[this.temporaryIds.nodes[0]];g.x=this.canvas._XconvertDOMtoCanvas(t.x),g.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}_finishConnect(e){const t=this.body.functions.getPointer(e.center),r=this.selectionHandler._pointerToPositionObject(t);let i;this.temporaryIds.edges[0]!==void 0&&(i=this.body.edges[this.temporaryIds.edges[0]].fromId);const o=this.selectionHandler._getAllNodesOverlappingWith(r);let s;for(let g=o.length-1;g>=0;g--){var a;if(Ue(a=this.temporaryIds.nodes).call(a,o[g])===-1){s=this.body.nodes[o[g]];break}}this._cleanupTemporaryNodesAndEdges(),s!==void 0&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[i]!==void 0&&this.body.nodes[s.id]!==void 0&&this._performAddEdge(i,s.id)),e.controlEdge={from:i,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}_dragStartEdge(e){const t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}_performAddNode(e){const t={id:ds(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(t,r=>{r!=null&&this.inMode==="addNode"&&this.body.data.nodes.getDataSet().add(r),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(t),this.showManipulatorToolbar()}_performAddEdge(e,t){const r={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(r,i=>{i!=null&&this.inMode==="addEdge"&&(this.body.data.edges.getDataSet().add(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(r),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,t){const r={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label};let i=this.options.editEdge;if(typeof i=="object"&&(i=i.editWithoutDrag),typeof i=="function")if(i.length===2)i(r,o=>{o==null||this.inMode!=="editEdge"?(this.body.edges[r.id].updateEdgeType(),this.body.emitter.emit("_redraw"),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(r),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}};const j="string",k="boolean",x="number",Ja="array",J="object",eU="dom",Aoe="any",$p=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Dp={borderWidth:{number:x},borderWidthSelected:{number:x,undefined:"undefined"},brokenImage:{string:j,undefined:"undefined"},chosen:{label:{boolean:k,function:"function"},node:{boolean:k,function:"function"},__type__:{object:J,boolean:k}},color:{border:{string:j},background:{string:j},highlight:{border:{string:j},background:{string:j},__type__:{object:J,string:j}},hover:{border:{string:j},background:{string:j},__type__:{object:J,string:j}},__type__:{object:J,string:j}},opacity:{number:x,undefined:"undefined"},fixed:{x:{boolean:k},y:{boolean:k},__type__:{object:J,boolean:k}},font:{align:{string:j},color:{string:j},size:{number:x},face:{string:j},background:{string:j},strokeWidth:{number:x},strokeColor:{string:j},vadjust:{number:x},multi:{boolean:k,string:j},bold:{color:{string:j},size:{number:x},face:{string:j},mod:{string:j},vadjust:{number:x},__type__:{object:J,string:j}},boldital:{color:{string:j},size:{number:x},face:{string:j},mod:{string:j},vadjust:{number:x},__type__:{object:J,string:j}},ital:{color:{string:j},size:{number:x},face:{string:j},mod:{string:j},vadjust:{number:x},__type__:{object:J,string:j}},mono:{color:{string:j},size:{number:x},face:{string:j},mod:{string:j},vadjust:{number:x},__type__:{object:J,string:j}},__type__:{object:J,string:j}},group:{string:j,number:x,undefined:"undefined"},heightConstraint:{minimum:{number:x},valign:{string:j},__type__:{object:J,boolean:k,number:x}},hidden:{boolean:k},icon:{face:{string:j},code:{string:j},size:{number:x},color:{string:j},weight:{string:j,number:x},__type__:{object:J}},id:{string:j,number:x},image:{selected:{string:j,undefined:"undefined"},unselected:{string:j,undefined:"undefined"},__type__:{object:J,string:j}},imagePadding:{top:{number:x},right:{number:x},bottom:{number:x},left:{number:x},__type__:{object:J,number:x}},label:{string:j,undefined:"undefined"},labelHighlightBold:{boolean:k},level:{number:x,undefined:"undefined"},margin:{top:{number:x},right:{number:x},bottom:{number:x},left:{number:x},__type__:{object:J,number:x}},mass:{number:x},physics:{boolean:k},scaling:{min:{number:x},max:{number:x},label:{enabled:{boolean:k},min:{number:x},max:{number:x},maxVisible:{number:x},drawThreshold:{number:x},__type__:{object:J,boolean:k}},customScalingFunction:{function:"function"},__type__:{object:J}},shadow:{enabled:{boolean:k},color:{string:j},size:{number:x},x:{number:x},y:{number:x},__type__:{object:J,boolean:k}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:k,array:Ja},borderRadius:{number:x},interpolation:{boolean:k},useImageSize:{boolean:k},useBorderWithImage:{boolean:k},coordinateOrigin:{string:["center","top-left"]},__type__:{object:J}},size:{number:x},title:{string:j,dom:eU,undefined:"undefined"},value:{number:x,undefined:"undefined"},widthConstraint:{minimum:{number:x},maximum:{number:x},__type__:{object:J,boolean:k,number:x}},x:{number:x},y:{number:x},__type__:{object:J}},Ioe={configure:{enabled:{boolean:k},filter:{boolean:k,string:j,array:Ja,function:"function"},container:{dom:eU},showButton:{boolean:k},__type__:{object:J,boolean:k,string:j,array:Ja,function:"function"}},edges:{arrows:{to:{enabled:{boolean:k},scaleFactor:{number:x},type:{string:$p},imageHeight:{number:x},imageWidth:{number:x},src:{string:j},__type__:{object:J,boolean:k}},middle:{enabled:{boolean:k},scaleFactor:{number:x},type:{string:$p},imageWidth:{number:x},imageHeight:{number:x},src:{string:j},__type__:{object:J,boolean:k}},from:{enabled:{boolean:k},scaleFactor:{number:x},type:{string:$p},imageWidth:{number:x},imageHeight:{number:x},src:{string:j},__type__:{object:J,boolean:k}},__type__:{string:["from","to","middle"],object:J}},endPointOffset:{from:{number:x},to:{number:x},__type__:{object:J,number:x}},arrowStrikethrough:{boolean:k},background:{enabled:{boolean:k},color:{string:j},size:{number:x},dashes:{boolean:k,array:Ja},__type__:{object:J,boolean:k}},chosen:{label:{boolean:k,function:"function"},edge:{boolean:k,function:"function"},__type__:{object:J,boolean:k}},color:{color:{string:j},highlight:{string:j},hover:{string:j},inherit:{string:["from","to","both"],boolean:k},opacity:{number:x},__type__:{object:J,string:j}},dashes:{boolean:k,array:Ja},font:{color:{string:j},size:{number:x},face:{string:j},background:{string:j},strokeWidth:{number:x},strokeColor:{string:j},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:x},multi:{boolean:k,string:j},bold:{color:{string:j},size:{number:x},face:{string:j},mod:{string:j},vadjust:{number:x},__type__:{object:J,string:j}},boldital:{color:{string:j},size:{number:x},face:{string:j},mod:{string:j},vadjust:{number:x},__type__:{object:J,string:j}},ital:{color:{string:j},size:{number:x},face:{string:j},mod:{string:j},vadjust:{number:x},__type__:{object:J,string:j}},mono:{color:{string:j},size:{number:x},face:{string:j},mod:{string:j},vadjust:{number:x},__type__:{object:J,string:j}},__type__:{object:J,string:j}},hidden:{boolean:k},hoverWidth:{function:"function",number:x},label:{string:j,undefined:"undefined"},labelHighlightBold:{boolean:k},length:{number:x,undefined:"undefined"},physics:{boolean:k},scaling:{min:{number:x},max:{number:x},label:{enabled:{boolean:k},min:{number:x},max:{number:x},maxVisible:{number:x},drawThreshold:{number:x},__type__:{object:J,boolean:k}},customScalingFunction:{function:"function"},__type__:{object:J}},selectionWidth:{function:"function",number:x},selfReferenceSize:{number:x},selfReference:{size:{number:x},angle:{number:x},renderBehindTheNode:{boolean:k},__type__:{object:J}},shadow:{enabled:{boolean:k},color:{string:j},size:{number:x},x:{number:x},y:{number:x},__type__:{object:J,boolean:k}},smooth:{enabled:{boolean:k},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:x},forceDirection:{string:["horizontal","vertical","none"],boolean:k},__type__:{object:J,boolean:k}},title:{string:j,undefined:"undefined"},width:{number:x},widthConstraint:{maximum:{number:x},__type__:{object:J,boolean:k,number:x}},value:{number:x,undefined:"undefined"},__type__:{object:J}},groups:{useDefaultGroups:{boolean:k},__any__:Dp,__type__:{object:J}},interaction:{dragNodes:{boolean:k},dragView:{boolean:k},hideEdgesOnDrag:{boolean:k},hideEdgesOnZoom:{boolean:k},hideNodesOnDrag:{boolean:k},hover:{boolean:k},keyboard:{enabled:{boolean:k},speed:{x:{number:x},y:{number:x},zoom:{number:x},__type__:{object:J}},bindToWindow:{boolean:k},autoFocus:{boolean:k},__type__:{object:J,boolean:k}},multiselect:{boolean:k},navigationButtons:{boolean:k},selectable:{boolean:k},selectConnectedEdges:{boolean:k},hoverConnectedEdges:{boolean:k},tooltipDelay:{number:x},zoomView:{boolean:k},zoomSpeed:{number:x},__type__:{object:J}},layout:{randomSeed:{undefined:"undefined",number:x,string:j},improvedLayout:{boolean:k},clusterThreshold:{number:x},hierarchical:{enabled:{boolean:k},levelSeparation:{number:x},nodeSpacing:{number:x},treeSpacing:{number:x},blockShifting:{boolean:k},edgeMinimization:{boolean:k},parentCentralization:{boolean:k},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:J,boolean:k}},__type__:{object:J}},manipulation:{enabled:{boolean:k},initiallyActive:{boolean:k},addNode:{boolean:k,function:"function"},addEdge:{boolean:k,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:J,boolean:k,function:"function"}},deleteNode:{boolean:k,function:"function"},deleteEdge:{boolean:k,function:"function"},controlNodeStyle:Dp,__type__:{object:J,boolean:k}},nodes:Dp,physics:{enabled:{boolean:k},barnesHut:{theta:{number:x},gravitationalConstant:{number:x},centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},damping:{number:x},avoidOverlap:{number:x},__type__:{object:J}},forceAtlas2Based:{theta:{number:x},gravitationalConstant:{number:x},centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},damping:{number:x},avoidOverlap:{number:x},__type__:{object:J}},repulsion:{centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},nodeDistance:{number:x},damping:{number:x},__type__:{object:J}},hierarchicalRepulsion:{centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},nodeDistance:{number:x},damping:{number:x},avoidOverlap:{number:x},__type__:{object:J}},maxVelocity:{number:x},minVelocity:{number:x},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:k},iterations:{number:x},updateInterval:{number:x},onlyDynamicEdges:{boolean:k},fit:{boolean:k},__type__:{object:J,boolean:k}},timestep:{number:x},adaptiveTimestep:{boolean:k},wind:{x:{number:x},y:{number:x},__type__:{object:J}},__type__:{object:J,boolean:k}},autoResize:{boolean:k},clickToUse:{boolean:k},locale:{string:j},locales:{__any__:{any:Aoe},__type__:{object:J}},height:{string:j},width:{string:j},__type__:{object:J}},tU={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},Coe=(n,e,t)=>{var r;return!!(sg(n).call(n,"physics")&&sg(r=tU.physics.solver).call(r,e)&&t.physics.solver!==e&&e!=="wind")};let loe=class{constructor(){}getDistances(e,t,r){const i={},o=e.edges;for(let a=0;a<t.length;a++){const g=t[a],A={};i[g]=A;for(let I=0;I<t.length;I++)A[t[I]]=a==I?0:1e9}for(let a=0;a<r.length;a++){const g=o[r[a]];g.connected===!0&&i[g.fromId]!==void 0&&i[g.toId]!==void 0&&(i[g.fromId][g.toId]=1,i[g.toId][g.fromId]=1)}const s=t.length;for(let a=0;a<s;a++){const g=t[a],A=i[g];for(let I=0;I<s-1;I++){const C=t[I],l=i[C];for(let d=I+1;d<s;d++){const u=t[d],h=i[u],p=Math.min(l[u],l[g]+A[u]);l[u]=p,h[C]=p}}}return i}},doe=class{constructor(e,t,r){this.body=e,this.springLength=t,this.springConstant=r,this.distanceSolver=new loe}setOptions(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}solve(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const i=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(i),this._createK_matrix(i),this._createE_matrix();const o=.01,s=1;let a=0;const g=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),A=5;let I=1e9,C=0,l=0,d=0,u=0,h=0;for(;I>o&&a<g;)for(a+=1,[C,I,l,d]=this._getHighestEnergyNode(r),u=I,h=0;u>s&&h<A;)h+=1,this._moveNode(C,l,d),[u,l,d]=this._getEnergy(C)}_getHighestEnergyNode(e){const t=this.body.nodeIndices,r=this.body.nodes;let i=0,o=t[0],s=0,a=0;for(let g=0;g<t.length;g++){const A=t[g];if(r[A].predefinedPosition!==!0||r[A].isCluster===!0&&e===!0||r[A].options.fixed.x!==!0||r[A].options.fixed.y!==!0){const[I,C,l]=this._getEnergy(A);i<I&&(i=I,o=A,s=C,a=l)}}return[o,i,s,a]}_getEnergy(e){const[t,r]=this.E_sums[e];return[Math.sqrt(t**2+r**2),t,r]}_moveNode(e,t,r){const i=this.body.nodeIndices,o=this.body.nodes;let s=0,a=0,g=0;const A=o[e].x,I=o[e].y,C=this.K_matrix[e],l=this.L_matrix[e];for(let v=0;v<i.length;v++){const y=i[v];if(y!==e){const w=o[y].x,S=o[y].y,b=C[y],E=l[y],O=1/((A-w)**2+(I-S)**2)**1.5;s+=b*(1-E*(I-S)**2*O),a+=b*(E*(A-w)*(I-S)*O),g+=b*(1-E*(A-w)**2*O)}}const d=s,u=a,h=t,p=g,f=r,c=(h/d+f/u)/(u/d-p/u),m=-(u*c+h)/d;o[e].x+=m,o[e].y+=c,this._updateE_matrix(e)}_createL_matrix(e){const t=this.body.nodeIndices,r=this.springLength;this.L_matrix=[];for(let i=0;i<t.length;i++){this.L_matrix[t[i]]={};for(let o=0;o<t.length;o++)this.L_matrix[t[i]][t[o]]=r*e[t[i]][t[o]]}}_createK_matrix(e){const t=this.body.nodeIndices,r=this.springConstant;this.K_matrix=[];for(let i=0;i<t.length;i++){this.K_matrix[t[i]]={};for(let o=0;o<t.length;o++)this.K_matrix[t[i]][t[o]]=r*e[t[i]][t[o]]**-2}}_createE_matrix(){const e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(let r=0;r<e.length;r++)this.E_matrix[e[r]]=[];for(let r=0;r<e.length;r++){const i=e[r],o=t[i].x,s=t[i].y;let a=0,g=0;for(let A=r;A<e.length;A++){const I=e[A];if(I!==i){const C=t[I].x,l=t[I].y,d=1/Math.sqrt((o-C)**2+(s-l)**2);this.E_matrix[i][A]=[this.K_matrix[i][I]*(o-C-this.L_matrix[i][I]*(o-C)*d),this.K_matrix[i][I]*(s-l-this.L_matrix[i][I]*(s-l)*d)],this.E_matrix[I][r]=this.E_matrix[i][A],a+=this.E_matrix[i][A][0],g+=this.E_matrix[i][A][1]}}this.E_sums[i]=[a,g]}}_updateE_matrix(e){const t=this.body.nodeIndices,r=this.body.nodes,i=this.E_matrix[e],o=this.K_matrix[e],s=this.L_matrix[e],a=r[e].x,g=r[e].y;let A=0,I=0;for(let C=0;C<t.length;C++){const l=t[C];if(l!==e){const d=i[C],u=d[0],h=d[1],p=r[l].x,f=r[l].y,c=1/Math.sqrt((a-p)**2+(g-f)**2),m=o[l]*(a-p-s[l]*(a-p)*c),v=o[l]*(g-f-s[l]*(g-f)*c);i[C]=[m,v],A+=m,I+=v;const y=this.E_sums[l];y[0]+=m-u,y[1]+=v-h}}this.E_sums[e]=[A,I]}};function X(n,e,t){var r,i,o,s;if(!(this instanceof X))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:V7,clickToUse:!1},Nt(this.options,this.defaultOptions),this.body={container:n,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:q(r=this.on).call(r,this),off:q(i=this.off).call(i,this),emit:q(o=this.emit).call(o,this),once:q(s=this.once).call(s,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}},selectionBox:{show:!1,position:{start:{x:0,y:0},end:{x:0,y:0}}}},this.bindEventListeners(),this.images=new eJ(()=>this.body.emitter.emit("_requestRedraw")),this.groups=new EJ,this.canvas=new Lie(this.body),this.selectionHandler=new wne(this.body,this.canvas),this.interactionHandler=new Zie(this.body,this.canvas,this.selectionHandler),this.view=new Wie(this.body,this.canvas),this.renderer=new Fie(this.body,this.canvas),this.physics=new _ie(this.body),this.layoutEngine=new aoe(this.body),this.clustering=new kie(this.body),this.manipulation=new goe(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new Gre(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new fie(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new doe(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}EH(X.prototype);X.prototype.setOptions=function(n){if(n===null&&(n=void 0),n!==void 0){if(OQ.validate(n,Ioe)===!0&&console.error("%cErrors have been found in the supplied options object.",i4),ta(["locale","locales","clickToUse"],this.options,n),n.locale!==void 0&&(n.locale=Q7(n.locales||this.options.locales,n.locale)),n=this.layoutEngine.setOptions(n.layout,n),this.canvas.setOptions(n),this.groups.setOptions(n.groups),this.nodesHandler.setOptions(n.nodes),this.edgesHandler.setOptions(n.edges),this.physics.setOptions(n.physics),this.manipulation.setOptions(n.manipulation,n,this.options),this.interactionHandler.setOptions(n.interaction),this.renderer.setOptions(n.interaction),this.selectionHandler.setOptions(n.interaction),n.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in n&&(this.configurator||(this.configurator=new EQ(this,this.body.container,tU,this.canvas.pixelRatio,Coe)),this.configurator.setOptions(n.configure)),this.configurator&&this.configurator.options.enabled===!0){const r={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};Me(r.nodes,this.nodesHandler.options),Me(r.edges,this.edgesHandler.options),Me(r.layout,this.layoutEngine.options),Me(r.interaction,this.selectionHandler.options),Me(r.interaction,this.renderer.options),Me(r.interaction,this.interactionHandler.options),Me(r.manipulation,this.manipulation.options),Me(r.physics,this.physics.options),Me(r.global,this.canvas.options),Me(r.global,this.options),this.configurator.setModuleOptions(r)}n.clickToUse!==void 0?n.clickToUse===!0?this.activator===void 0&&(this.activator=new wQ(this.canvas.frame),this.activator.on("change",()=>{this.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};X.prototype._updateVisibleIndices=function(){const n=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&!this.clustering._isClusteredNode(t)&&n[t].options.hidden===!1&&this.body.nodeIndices.push(n[t].id);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t],i=n[r.fromId],o=n[r.toId],s=i!==void 0&&o!==void 0;!this.clustering._isClusteredEdge(t)&&r.options.hidden===!1&&s&&i.options.hidden===!1&&o.options.hidden===!1&&this.body.edgeIndices.push(r.id)}};X.prototype.bindEventListeners=function(){this.body.emitter.on("_dataChanged",()=>{this.edgesHandler._updateState(),this.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit("startSimulation"),this.body.emitter.emit("_requestRedraw")})};X.prototype.setData=function(n){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),n&&n.dot&&(n.nodes||n.edges))throw new SyntaxError('Data must contain either parameter "dot" or  parameter pair "nodes" and "edges", but not both.');if(this.setOptions(n&&n.options),n&&n.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");const e=O7(n.dot);this.setData(e);return}else if(n&&n.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");const e=D7(n.gephi);this.setData(e);return}else this.nodesHandler.setData(n&&n.nodes,!0),this.edgesHandler.setData(n&&n.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};X.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(const n in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,n)&&delete this.body.nodes[n];for(const n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&delete this.body.edges[n];Gi(this.body.container)};X.prototype._updateValueRange=function(n){let e,t,r,i=0;for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){const o=n[e].getValue();o!==void 0&&(t=t===void 0?o:Math.min(o,t),r=r===void 0?o:Math.max(o,r),i+=o)}if(t!==void 0&&r!==void 0)for(e in n)Object.prototype.hasOwnProperty.call(n,e)&&n[e].setValueRange(t,r,i)};X.prototype.isActive=function(){return!this.activator||this.activator.active};X.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};X.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};X.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};X.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};X.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};X.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};X.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};X.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};X.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};X.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};X.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};X.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};X.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};X.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};X.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};X.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};X.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};X.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};X.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};X.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};X.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};X.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};X.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};X.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};X.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};X.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};X.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};X.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};X.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};X.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};X.prototype.getConnectedNodes=function(n){return this.body.nodes[n]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};X.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};X.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};X.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};X.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};X.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};X.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};X.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};X.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};X.prototype.getNodeAt=function(){const n=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return n!==void 0&&n.id!==void 0?n.id:n};X.prototype.getEdgeAt=function(){const n=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return n!==void 0&&n.id!==void 0?n.id:n};X.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};X.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};X.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};X.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};X.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};X.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};X.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};X.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};X.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};X.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};X.prototype.getOptionsFromConfigurator=function(){let n={};return this.configurator&&(n=this.configurator.getOptions.apply(this.configurator)),n};const rU={vue:{color:"#42b883"},ts:{color:"#3B86CB"},js:{color:"#d6cb2d"},json:{color:"#cf8f30"},css:{color:"#e6659a"},html:{color:"#e34c26"},jsx:{color:"#54B9D1"},tsx:{color:"#4FC7FF"},other:{color:"#B86542"}},uoe=["vue","other"];function hoe(){const[n,e]=IH(!0);return{fileTypeData:Object.entries(rU).map(([t,r])=>({key:t,color:r.color,capitalize:uoe.includes(t)})),fileTypeShow:n,toggleFileType:e}}const{isDark:coe}=y6(),uk=CH(()=>({nodes:{shape:"dot",size:16,font:{color:coe.value?"#fff":"#000",multi:"html"}},interaction:{hover:!0},physics:{maxVelocity:146,solver:"forceAtlas2Based",timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:rU})),Ag=CH({get:()=>Yw.value.graphSettings,set:n=>{Yw.value.graphSettings=n}});NI(Ag,()=>{VS()},{deep:!0});const LS=jn("");b6(LS,()=>{VS()},{debounce:350});const GS=jn(""),Rs=new Ps([]),xs=new Ps([]),WS=lH([]),iU=new Map,gi=new Map,fs=new Map,foe=n=>n.reduce((e,t)=>(e.some(r=>r.id===t.id)||e.push(t),e),[]),nU=n=>n.reduce((e,t)=>(e.some(r=>r.from===t.from&&r.to===t.to)||e.push(t),e),[]);function poe(){WS.value=[],iU.clear(),Rs.clear(),xs.clear(),gi.clear(),fs.clear()}function $s(n){const e=n.id.includes("node_modules");return!(!Ag.value.node_modules&&e||!Ag.value.virtual&&n.virtual&&!e||!Ag.value.lib&&!n.id.includes(GS.value)&&!n.virtual)}function oU(n){const e=fs.get(n);return e?e.some(t=>$s(t.mod)):!0}const voe=/(?:.*\/){3}([^/]+$)/;function VS(){Rs.clear(),xs.clear(),woe();const n=[],e=[],t=[],r=Soe();(r?r.slice():WS.value.slice()).forEach(({node:s,edges:a,mod:g})=>{$s(g)&&oU(g.id)&&(n.push(s),e.push({id:g.id.match(voe)?.[0]??g.id,fullId:g.id,node:s,edges:a,deps:g.deps}),t.push(...a))});const o=LS.value;if(o.trim().length){const s=e.filter(({id:a})=>a.includes(o));if(t.length=0,n.length=0,s.length){const{node:a,edges:g}=moe(s);n.push(...a),t.push(...g)}}Rs.add(foe(n)),xs.add(nU(t))}function moe(n){const e=new Map,t=new Map;return n.forEach(r=>{r=w6(r),r.node.font||(r.node.font={color:"#F19B4A"}),r.node.label=`<b>${r.node.label}</b>`,e.set(r.fullId,r.node),r.deps.forEach(i=>{const o=gi.get(i);o&&$s(o.mod)&&(e.set(o.mod.id,o.node),t.set(`${r.fullId}-${o.mod.id}`,IE(o.mod.id,r.fullId)),o.edges.forEach(s=>t.set(`${s.from}-${s.to}`,s)))})}),{node:Array.from(e.values()),edges:Array.from(t.values())}}function IE(n,e){return{from:n,to:e,arrows:{to:{enabled:!0,scaleFactor:.8}}}}function ZS(n){return n.replace(/\?.*$/,"").replace(/#.*$/,"").replace(/\/{2,}/g,"/")}function sU(n){return n.includes("vue&type=style")}function CE(n){return n.replace(GS.value,"")}function hk(n){return 15+Math.min(n/2,8)}function ck(n,e){const t=[];return n.forEach(r=>{sU(r)||(r=ZS(r),!t.includes(r)&&(t.push(r),e?.(r)))}),t}function yoe(n,e){if(!n)return;GS.value=e,Rs.clear(),xs.clear();const t=[],r=[];n.forEach(i=>{if(sU(i.id))return;if(i.id=ZS(i.id),r.some(C=>C.id===i.id)){const C=gi.get(i.id);C.node.size=hk(C.edges.length+i.deps.length);const l=[],u=ck(i.deps,h=>{l.push(IE(i.id,h))}).filter(h=>!C.mod.deps.includes(h));if(!u.length)return;C.mod.deps.push(...u),t.push(...l);return}const o=i.id,a=o.split("/").at(-1)??"",g=CE(o),A={mod:i,info:{displayName:a,displayPath:g},node:{id:i.id,label:a,group:o.match(/\.(\w+)$/)?.[1]||"unknown",size:hk(i.deps.length),shape:i.id.includes("/node_modules/")?"hexagon":i.virtual?"diamond":"dot"},edges:[]},I=ck(i.deps,C=>{A.edges.push(IE(i.id,C)),fs.has(C)||fs.set(C,[]);const l=fs.get(C),d=CE(o);l.find(h=>h.path===o&&h.displayPath===d&&h.mod.id===i.id)||l.push({path:o,displayPath:d,mod:i})});i.deps=I,WS.value.push(A),iU.set(i.id,A),gi.set(i.id,A),$s(i)&&oU(i.id)&&(r.push(A.node),t.push(...A.edges))}),Rs.add(r.slice()),xs.add(nU(t))}const aU=jn(),[boe,lE]=IH(!1);function woe(){lE(!1)}function Eoe(n){const e=gi.get(n);if(!e)return;const t=e.mod.deps.reduce((o,s)=>{const a=gi.get(s);return a&&$s(a.mod)&&o.push({path:s,displayPath:CE(ZS(s))}),o},[]),i=(fs.get(e.mod.id)||[]).reduce((o,s)=>{const a=gi.get(s.path);return a&&$s(a.mod)&&o.push({path:s.path,displayPath:s.displayPath}),o},[]);aU.value={name:e.info.displayName,displayPath:e.info.displayPath,path:e.mod.id,deps:t,refs:i}}const Ds=jn("");NI(Ds,()=>{VS()});function Soe(){const n=Ds.value;return Ds.value=n,!n||!gi.get(n)?null:gU(n)}function gU(n,e=0){const t=gi.get(n);if(e+=1,!t||e>20)return[];const r=[t];return t.mod.deps.forEach(i=>{const o=gi.get(i);o&&r.push(...gU(o.mod.id,e))}),r.reduce((i,o)=>(i.some(s=>s.mod.id===o.mod.id)||i.push(o),i),[])}const Ooe={class:"w-300px","h-full":"","of-auto":""},Toe={"text-md":"","h-80px":"","border-b":"","border-base":"",p3:"",flex:"~ col gap1"},_oe={"text-lg":"",flex:"~ gap2 items-center"},Poe={key:0,"i-material-symbols-check-small":"","text-primary-500":""},Roe=["title"],xoe={pb2:"","text-gray-500":""},$oe={"text-primary-500":""},Doe={flex:"~ col gap2 items-start"},Noe=["onClick"],Moe={p3:""},fk=1500,koe=CC({__name:"GraphDrawer",props:{top:{}},setup(n){const e=aU,t=boe,r=Ds,i=_6(),o=C=>{if(i.vitePluginDetected.value&&P6.value){R6(C);return}A(C)},{copy:s,isSupported:a,copied:g}=E6({copiedDuring:fk});function A(C){s(C),x6({message:"Copied to clipboard",type:"success",duration:fk})}const I=[["refs","references"],["deps","dependencies"]];return(C,l)=>(nr(),S6(_e(T6),{modelValue:_e(t),"onUpdate:modelValue":l[3]||(l[3]=d=>dH(t)?t.value=d:null),top:C.top,"close-outside":!1,permanent:!0,"content-blur":!0,position:"absolute","mount-to":".graph-body"},{default:cT(()=>[nt("div",Ooe,[nt("div",Toe,[nt("span",_oe,[vI(Mn(_e(e)?.name)+" ",1),_e(g)?(nr(),pr("span",Poe)):_e(e)?(nr(),pr("span",{key:1,hover:"op-100","i-carbon-copy":"","cursor-pointer":"","text-sm":"","op-50":"",class:Ko({"text-gray-200":!_e(a)}),onClick:l[0]||(l[0]=d=>A(_e(e).name))},null,2)):nS("",!0)]),nt("button",{hover:"underline",truncate:"","text-left":"","text-gray-500":"",title:_e(e)?.displayPath,onClick:l[1]||(l[1]=d=>o(_e(e).path))},Mn(_e(e)?.displayPath),9,Roe)]),(nr(),pr(MI,null,kI(I,([d,u])=>nt("div",{key:d,"max-h-60":"","of-auto":"","border-b":"","border-base":"",p3:"","text-sm":""},[nt("div",xoe,[nt("span",$oe,Mn(_e(e)?.[d].length),1),vI(" "+Mn(u),1)]),nt("div",Doe,[(nr(!0),pr(MI,null,kI(_e(e)?.[d],h=>(nr(),pr("button",{key:h.path,dark:"text-gray-200","of-hidden":"",truncate:"","ws-nowrap":"","pr-3":"","text-gray-800":"",hover:"underline",onClick:p=>o(h.path)},Mn(h.displayPath),9,Noe))),128))])])),64)),nt("div",Moe,[As(_e(O6),{type:"primary",onClick:l[2]||(l[2]=d=>r.value=_e(e).path)},{default:cT(()=>l[4]||(l[4]=[vI(" Filter to this module ",-1)])),_:1,__:[4]})])])]),_:1},8,["modelValue","top"]))}}),Foe=CC({__name:"GraphFileType",setup(n){const{fileTypeData:e,fileTypeShow:t,toggleFileType:r}=hoe();return(i,o)=>(nr(),pr("div",{absolute:"","bottom-0":"",grid:"","grid-cols-3":"","w-260px":"","gap-2":"","b-1":"","b-l-0":"","border-base":"","rounded-tr-lg":"","glass-effect":"",px4:"",py2:"","text-sm":"","transition-transform":"","duration-300":"",class:Ko(["group",{"translate-x-[calc(-100%+30px)] translate-y-[calc(100%-30px)]":!_e(t)}])},[nt("div",{class:Ko(["group",{"rounded-bl-lg opacity-0 group-hover:opacity-100":_e(t)}]),absolute:"","right-0":"",h30px:"",w30px:"","cursor-pointer":"","rounded-tr-lg":"","bg-primary-500":"","text-white":"","transition-opacity":"",flex:"~ justify-center items-center",onClick:o[0]||(o[0]=()=>_e(r)())},[nt("div",{"transition-transform":"",class:Ko([_e(t)?"i-material-symbols-arrow-downward-alt rotate-45 hover:translate-x--10% hover:translate-y-10%":"i-mdi-file-outline"])},null,2)],2),(nr(!0),pr(MI,null,kI(_e(e),s=>(nr(),pr("div",{key:s.key,flex:"","items-center":"","gap-2":""},[nt("div",{h12px:"",w12px:"","rounded-full":"",style:$6({backgroundColor:s.color})},null,4),nt("span",{class:Ko([s.capitalize?"capitalize":"uppercase"])},Mn(s.key),3)]))),128))],2))}}),Boe={flex:"~ items-center gap-4 nowrap",class:"[&_>*]:flex-[0_0_auto]",absolute:"","left-0":"","top-0":"","z-10":"","navbar-base":"","w-full":"","overflow-x-auto":"","glass-effect":"",px4:"","text-sm":""},qoe=CC({__name:"GraphNavbar",setup(n){const e=LS,t=Ag,r=[["node_modules"],["virtual","virtual module"],["lib","library module"]],i=Ds;return(o,s)=>(nr(),pr("div",Boe,[As(_e(D6),{modelValue:_e(e),"onUpdate:modelValue":s[0]||(s[0]=a=>dH(e)?e.value=a:null),placeholder:"Search modules..."},null,8,["modelValue"]),(nr(),pr(MI,null,kI(r,a=>nt("div",{key:a[0],flex:"~ gap-2 items-center"},[As(_e(N6),{modelValue:_e(t)[a[0]],"onUpdate:modelValue":g=>_e(t)[a[0]]=g},null,8,["modelValue","onUpdate:modelValue"]),nt("span",{class:Ko({"text-gray-400 dark:text-gray-600":!_e(t)[a[0]]})},"Show "+Mn(a[1]??a[0]),3)])),64)),s[3]||(s[3]=nt("div",{"flex-auto":""},null,-1)),_e(i)?(nr(),pr("button",{key:0,"rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:s[1]||(s[1]=a=>i.value="")},s[2]||(s[2]=[vI(" Clear filter ",-1),nt("div",{"i-carbon-close":"",mb2px:""},null,-1)]))):nS("",!0)]))}});/**
 * vis-data
 * http://visjs.org/
 *
 * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
 *
 * @version 7.1.9
 * @date    2023-11-24T17:53:34.179Z
 *
 * @copyright (c) 2011-2017 Almende B.V, http://almende.com
 * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
 *
 * @license
 * vis.js is dual licensed under both
 *
 *   1. The Apache 2.0 License
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *   and
 *
 *   2. The MIT License
 *      http://opensource.org/licenses/MIT
 *
 * vis.js may be distributed under either license.
 */function $C(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}var Np=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ce(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var AU={exports:{}},YA=function(n){return n&&n.Math===Math&&n},Ve=YA(typeof globalThis=="object"&&globalThis)||YA(typeof window=="object"&&window)||YA(typeof self=="object"&&self)||YA(typeof Np=="object"&&Np)||(function(){return this})()||Np||Function("return this")(),Se=function(n){try{return!!n()}catch{return!0}},zoe=Se,aA=!zoe(function(){var n=(function(){}).bind();return typeof n!="function"||n.hasOwnProperty("prototype")}),joe=aA,IU=Function.prototype,pk=IU.apply,vk=IU.call,aa=typeof Reflect=="object"&&Reflect.apply||(joe?vk.bind(pk):function(){return vk.apply(pk,arguments)}),CU=aA,lU=Function.prototype,dE=lU.call,Loe=CU&&lU.bind.bind(dE,dE),Le=CU?Loe:function(n){return function(){return dE.apply(n,arguments)}},dU=Le,Goe=dU({}.toString),Woe=dU("".slice),vn=function(n){return Woe(Goe(n),8,-1)},Voe=vn,Zoe=Le,uU=function(n){if(Voe(n)==="Function")return Zoe(n)},uE=typeof document=="object"&&document.all,Hoe=typeof uE>"u"&&uE!==void 0,hU={all:uE,IS_HTMLDDA:Hoe},cU=hU,Uoe=cU.all,tt=cU.IS_HTMLDDA?function(n){return typeof n=="function"||n===Uoe}:function(n){return typeof n=="function"},yo={},Yoe=Se,Tt=!Yoe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Koe=aA,KA=Function.prototype.call,_t=Koe?KA.bind(KA):function(){return KA.apply(KA,arguments)},DC={},fU={}.propertyIsEnumerable,pU=Object.getOwnPropertyDescriptor,Xoe=pU&&!fU.call({1:2},1);DC.f=Xoe?function(e){var t=pU(this,e);return!!t&&t.enumerable}:fU;var bo=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}},Qoe=Le,Joe=Se,ese=vn,Mp=Object,tse=Qoe("".split),NC=Joe(function(){return!Mp("z").propertyIsEnumerable(0)})?function(n){return ese(n)==="String"?tse(n,""):Mp(n)}:Mp,ga=function(n){return n==null},rse=ga,ise=TypeError,HS=function(n){if(rse(n))throw new ise("Can't call method on "+n);return n},nse=NC,ose=HS,di=function(n){return nse(ose(n))},mk=tt,vU=hU,sse=vU.all,Bt=vU.IS_HTMLDDA?function(n){return typeof n=="object"?n!==null:mk(n)||n===sse}:function(n){return typeof n=="object"?n!==null:mk(n)},Ze={},kp=Ze,Fp=Ve,ase=tt,yk=function(n){return ase(n)?n:void 0},Jt=function(n,e){return arguments.length<2?yk(kp[n])||yk(Fp[n]):kp[n]&&kp[n][e]||Fp[n]&&Fp[n][e]},gse=Le,ct=gse({}.isPrototypeOf),mn=typeof navigator<"u"&&String(navigator.userAgent)||"",mU=Ve,Bp=mn,bk=mU.process,wk=mU.Deno,Ek=bk&&bk.versions||wk&&wk.version,Sk=Ek&&Ek.v8,Wr,VI;Sk&&(Wr=Sk.split("."),VI=Wr[0]>0&&Wr[0]<4?1:+(Wr[0]+Wr[1]));!VI&&Bp&&(Wr=Bp.match(/Edge\/(\d+)/),(!Wr||Wr[1]>=74)&&(Wr=Bp.match(/Chrome\/(\d+)/),Wr&&(VI=+Wr[1])));var Aa=VI,Ok=Aa,Ase=Se,Ise=Ve,Cse=Ise.String,Ia=!!Object.getOwnPropertySymbols&&!Ase(function(){var n=Symbol("symbol detection");return!Cse(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&Ok&&Ok<41}),lse=Ia,yU=lse&&!Symbol.sham&&typeof Symbol.iterator=="symbol",dse=Jt,use=tt,hse=ct,cse=yU,fse=Object,gA=cse?function(n){return typeof n=="symbol"}:function(n){var e=dse("Symbol");return use(e)&&hse(e.prototype,fse(n))},pse=String,Ca=function(n){try{return pse(n)}catch{return"Object"}},vse=tt,mse=Ca,yse=TypeError,Cr=function(n){if(vse(n))return n;throw new yse(mse(n)+" is not a function")},bse=Cr,wse=ga,US=function(n,e){var t=n[e];return wse(t)?void 0:bse(t)},qp=_t,zp=tt,jp=Bt,Ese=TypeError,Sse=function(n,e){var t,r;if(e==="string"&&zp(t=n.toString)&&!jp(r=qp(t,n))||zp(t=n.valueOf)&&!jp(r=qp(t,n))||e!=="string"&&zp(t=n.toString)&&!jp(r=qp(t,n)))return r;throw new Ese("Can't convert object to primitive value")},bU={exports:{}},Ose=!0,Tk=Ve,Tse=Object.defineProperty,_se=function(n,e){try{Tse(Tk,n,{value:e,configurable:!0,writable:!0})}catch{Tk[n]=e}return e},Pse=Ve,Rse=_se,_k="__core-js_shared__",xse=Pse[_k]||Rse(_k,{}),YS=xse,Pk=YS;(bU.exports=function(n,e){return Pk[n]||(Pk[n]=e!==void 0?e:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var la=bU.exports,$se=HS,Dse=Object,lr=function(n){return Dse($se(n))},Nse=Le,Mse=lr,kse=Nse({}.hasOwnProperty),ft=Object.hasOwn||function(e,t){return kse(Mse(e),t)},Fse=Le,Bse=0,qse=Math.random(),zse=Fse(1 .toString),MC=function(n){return"Symbol("+(n===void 0?"":n)+")_"+zse(++Bse+qse,36)},jse=Ve,Lse=la,Rk=ft,Gse=MC,Wse=Ia,Vse=yU,Jo=jse.Symbol,Lp=Lse("wks"),Zse=Vse?Jo.for||Jo:Jo&&Jo.withoutSetter||Gse,Xe=function(n){return Rk(Lp,n)||(Lp[n]=Wse&&Rk(Jo,n)?Jo[n]:Zse("Symbol."+n)),Lp[n]},Hse=_t,xk=Bt,$k=gA,Use=US,Yse=Sse,Kse=Xe,Xse=TypeError,Qse=Kse("toPrimitive"),Jse=function(n,e){if(!xk(n)||$k(n))return n;var t=Use(n,Qse),r;if(t){if(e===void 0&&(e="default"),r=Hse(t,n,e),!xk(r)||$k(r))return r;throw new Xse("Can't convert object to primitive value")}return e===void 0&&(e="number"),Yse(n,e)},eae=Jse,tae=gA,kC=function(n){var e=eae(n,"string");return tae(e)?e:e+""},rae=Ve,Dk=Bt,hE=rae.document,iae=Dk(hE)&&Dk(hE.createElement),KS=function(n){return iae?hE.createElement(n):{}},nae=Tt,oae=Se,sae=KS,wU=!nae&&!oae(function(){return Object.defineProperty(sae("div"),"a",{get:function(){return 7}}).a!==7}),aae=Tt,gae=_t,Aae=DC,Iae=bo,Cae=di,lae=kC,dae=ft,uae=wU,Nk=Object.getOwnPropertyDescriptor;yo.f=aae?Nk:function(e,t){if(e=Cae(e),t=lae(t),uae)try{return Nk(e,t)}catch{}if(dae(e,t))return Iae(!gae(Aae.f,e,t),e[t])};var hae=Se,cae=tt,fae=/#|\.prototype\./,AA=function(n,e){var t=vae[pae(n)];return t===yae?!0:t===mae?!1:cae(e)?hae(e):!!e},pae=AA.normalize=function(n){return String(n).replace(fae,".").toLowerCase()},vae=AA.data={},mae=AA.NATIVE="N",yae=AA.POLYFILL="P",EU=AA,Mk=uU,bae=Cr,wae=aA,Eae=Mk(Mk.bind),yn=function(n,e){return bae(n),e===void 0?n:wae?Eae(n,e):function(){return n.apply(e,arguments)}},dr={},Sae=Tt,Oae=Se,SU=Sae&&Oae(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Tae=Bt,_ae=String,Pae=TypeError,yr=function(n){if(Tae(n))return n;throw new Pae(_ae(n)+" is not an object")},Rae=Tt,xae=wU,$ae=SU,XA=yr,kk=kC,Dae=TypeError,Gp=Object.defineProperty,Nae=Object.getOwnPropertyDescriptor,Wp="enumerable",Vp="configurable",Zp="writable";dr.f=Rae?$ae?function(e,t,r){if(XA(e),t=kk(t),XA(r),typeof e=="function"&&t==="prototype"&&"value"in r&&Zp in r&&!r[Zp]){var i=Nae(e,t);i&&i[Zp]&&(e[t]=r.value,r={configurable:Vp in r?r[Vp]:i[Vp],enumerable:Wp in r?r[Wp]:i[Wp],writable:!1})}return Gp(e,t,r)}:Gp:function(e,t,r){if(XA(e),t=kk(t),XA(r),xae)try{return Gp(e,t,r)}catch{}if("get"in r||"set"in r)throw new Dae("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Mae=Tt,kae=dr,Fae=bo,Fi=Mae?function(n,e,t){return kae.f(n,e,Fae(1,t))}:function(n,e,t){return n[e]=t,n},QA=Ve,Bae=aa,qae=uU,zae=tt,jae=yo.f,Lae=EU,zo=Ze,Gae=yn,jo=Fi,Fk=ft,Wae=function(n){var e=function(t,r,i){if(this instanceof e){switch(arguments.length){case 0:return new n;case 1:return new n(t);case 2:return new n(t,r)}return new n(t,r,i)}return Bae(n,this,arguments)};return e.prototype=n.prototype,e},se=function(n,e){var t=n.target,r=n.global,i=n.stat,o=n.proto,s=r?QA:i?QA[t]:(QA[t]||{}).prototype,a=r?zo:zo[t]||jo(zo,t,{})[t],g=a.prototype,A,I,C,l,d,u,h,p,f;for(l in e)A=Lae(r?l:t+(i?".":"#")+l,n.forced),I=!A&&s&&Fk(s,l),u=a[l],I&&(n.dontCallGetSet?(f=jae(s,l),h=f&&f.value):h=s[l]),d=I&&h?h:e[l],!(I&&typeof u==typeof d)&&(n.bind&&I?p=Gae(d,QA):n.wrap&&I?p=Wae(d):o&&zae(d)?p=qae(d):p=d,(n.sham||d&&d.sham||u&&u.sham)&&jo(p,"sham",!0),jo(a,l,p),o&&(C=t+"Prototype",Fk(zo,C)||jo(zo,C,{}),jo(zo[C],l,d),n.real&&g&&(A||!g[l])&&jo(g,l,d)))},Vae=se,Zae=Tt,Bk=dr.f;Vae({target:"Object",stat:!0,forced:Object.defineProperty!==Bk,sham:!Zae},{defineProperty:Bk});var Hae=Ze,OU=Hae.Object,Uae=AU.exports=function(e,t,r){return OU.defineProperty(e,t,r)};OU.defineProperty.sham&&(Uae.sham=!0);var Yae=AU.exports,Kae=Yae,TU=Kae,Xae=TU,Qae=Xae,Jae=Qae,ege=Jae,_U=ege,FC=Ce(_U),tge=vn,bn=Array.isArray||function(e){return tge(e)==="Array"},rge=Math.ceil,ige=Math.floor,nge=Math.trunc||function(e){var t=+e;return(t>0?ige:rge)(t)},oge=nge,BC=function(n){var e=+n;return e!==e||e===0?0:oge(e)},sge=BC,age=Math.min,gge=function(n){return n>0?age(sge(n),9007199254740991):0},Age=gge,br=function(n){return Age(n.length)},Ige=TypeError,Cge=9007199254740991,qC=function(n){if(n>Cge)throw Ige("Maximum allowed index exceeded");return n},lge=kC,dge=dr,uge=bo,da=function(n,e,t){var r=lge(e);r in n?dge.f(n,r,uge(0,t)):n[r]=t},hge=Xe,cge=hge("toStringTag"),PU={};PU[cge]="z";var XS=String(PU)==="[object z]",fge=XS,pge=tt,EI=vn,vge=Xe,mge=vge("toStringTag"),yge=Object,bge=EI((function(){return arguments})())==="Arguments",wge=function(n,e){try{return n[e]}catch{}},Bi=fge?EI:function(n){var e,t,r;return n===void 0?"Undefined":n===null?"Null":typeof(t=wge(e=yge(n),mge))=="string"?t:bge?EI(e):(r=EI(e))==="Object"&&pge(e.callee)?"Arguments":r},Ege=Le,Sge=tt,cE=YS,Oge=Ege(Function.toString);Sge(cE.inspectSource)||(cE.inspectSource=function(n){return Oge(n)});var RU=cE.inspectSource,Tge=Le,_ge=Se,xU=tt,Pge=Bi,Rge=Jt,xge=RU,$U=function(){},$ge=[],DU=Rge("Reflect","construct"),QS=/^\s*(?:class|function)\b/,Dge=Tge(QS.exec),Nge=!QS.test($U),Za=function(e){if(!xU(e))return!1;try{return DU($U,$ge,e),!0}catch{return!1}},NU=function(e){if(!xU(e))return!1;switch(Pge(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Nge||!!Dge(QS,xge(e))}catch{return!0}};NU.sham=!0;var zC=!DU||_ge(function(){var n;return Za(Za.call)||!Za(Object)||!Za(function(){n=!0})||n})?NU:Za,qk=bn,Mge=zC,kge=Bt,Fge=Xe,Bge=Fge("species"),zk=Array,qge=function(n){var e;return qk(n)&&(e=n.constructor,Mge(e)&&(e===zk||qk(e.prototype))?e=void 0:kge(e)&&(e=e[Bge],e===null&&(e=void 0))),e===void 0?zk:e},zge=qge,jC=function(n,e){return new(zge(n))(e===0?0:e)},jge=Se,Lge=Xe,Gge=Aa,Wge=Lge("species"),IA=function(n){return Gge>=51||!jge(function(){var e=[],t=e.constructor={};return t[Wge]=function(){return{foo:1}},e[n](Boolean).foo!==1})},Vge=se,Zge=Se,Hge=bn,Uge=Bt,Yge=lr,Kge=br,jk=qC,Lk=da,Xge=jC,Qge=IA,Jge=Xe,eAe=Aa,MU=Jge("isConcatSpreadable"),tAe=eAe>=51||!Zge(function(){var n=[];return n[MU]=!1,n.concat()[0]!==n}),rAe=function(n){if(!Uge(n))return!1;var e=n[MU];return e!==void 0?!!e:Hge(n)},iAe=!tAe||!Qge("concat");Vge({target:"Array",proto:!0,forced:iAe},{concat:function(e){var t=Yge(this),r=Xge(t,0),i=0,o,s,a,g,A;for(o=-1,a=arguments.length;o<a;o++)if(A=o===-1?t:arguments[o],rAe(A))for(g=Kge(A),jk(i+g),s=0;s<g;s++,i++)s in A&&Lk(r,i,A[s]);else jk(i+1),Lk(r,i++,A);return r.length=i,r}});var nAe=Bi,oAe=String,wo=function(n){if(nAe(n)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return oAe(n)},LC={},sAe=BC,aAe=Math.max,gAe=Math.min,GC=function(n,e){var t=sAe(n);return t<0?aAe(t+e,0):gAe(t,e)},AAe=di,IAe=GC,CAe=br,lAe=function(n){return function(e,t,r){var i=AAe(e),o=CAe(i),s=IAe(r,o),a;if(n&&t!==t){for(;o>s;)if(a=i[s++],a!==a)return!0}else for(;o>s;s++)if((n||s in i)&&i[s]===t)return n||s||0;return!n&&-1}},dAe={indexOf:lAe(!1)},CA={},uAe=Le,Hp=ft,hAe=di,cAe=dAe.indexOf,fAe=CA,Gk=uAe([].push),kU=function(n,e){var t=hAe(n),r=0,i=[],o;for(o in t)!Hp(fAe,o)&&Hp(t,o)&&Gk(i,o);for(;e.length>r;)Hp(t,o=e[r++])&&(~cAe(i,o)||Gk(i,o));return i},JS=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],pAe=kU,vAe=JS,WC=Object.keys||function(e){return pAe(e,vAe)},mAe=Tt,yAe=SU,bAe=dr,wAe=yr,EAe=di,SAe=WC;LC.f=mAe&&!yAe?Object.defineProperties:function(e,t){wAe(e);for(var r=EAe(t),i=SAe(t),o=i.length,s=0,a;o>s;)bAe.f(e,a=i[s++],r[a]);return e};var OAe=Jt,FU=OAe("document","documentElement"),TAe=la,_Ae=MC,Wk=TAe("keys"),VC=function(n){return Wk[n]||(Wk[n]=_Ae(n))},PAe=yr,RAe=LC,Vk=JS,xAe=CA,$Ae=FU,DAe=KS,NAe=VC,Zk=">",Hk="<",fE="prototype",pE="script",BU=NAe("IE_PROTO"),Up=function(){},qU=function(n){return Hk+pE+Zk+n+Hk+"/"+pE+Zk},Uk=function(n){n.write(qU("")),n.close();var e=n.parentWindow.Object;return n=null,e},MAe=function(){var n=DAe("iframe"),e="java"+pE+":",t;return n.style.display="none",$Ae.appendChild(n),n.src=String(e),t=n.contentWindow.document,t.open(),t.write(qU("document.F=Object")),t.close(),t.F},JA,SI=function(){try{JA=new ActiveXObject("htmlfile")}catch{}SI=typeof document<"u"?document.domain&&JA?Uk(JA):MAe():Uk(JA);for(var n=Vk.length;n--;)delete SI[fE][Vk[n]];return SI()};xAe[BU]=!0;var Eo=Object.create||function(e,t){var r;return e!==null?(Up[fE]=PAe(e),r=new Up,Up[fE]=null,r[BU]=e):r=SI(),t===void 0?r:RAe.f(r,t)},lA={},kAe=kU,FAe=JS,BAe=FAe.concat("length","prototype");lA.f=Object.getOwnPropertyNames||function(e){return kAe(e,BAe)};var eO={},Yk=GC,qAe=br,zAe=da,jAe=Array,LAe=Math.max,zU=function(n,e,t){for(var r=qAe(n),i=Yk(e,r),o=Yk(t===void 0?r:t,r),s=jAe(LAe(o-i,0)),a=0;i<o;i++,a++)zAe(s,a,n[i]);return s.length=a,s},GAe=vn,WAe=di,jU=lA.f,VAe=zU,LU=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ZAe=function(n){try{return jU(n)}catch{return VAe(LU)}};eO.f=function(e){return LU&&GAe(e)==="Window"?ZAe(e):jU(WAe(e))};var dA={};dA.f=Object.getOwnPropertySymbols;var HAe=Fi,ua=function(n,e,t,r){return r&&r.enumerable?n[e]=t:HAe(n,e,t),n},UAe=dr,tO=function(n,e,t){return UAe.f(n,e,t)},uA={},YAe=Xe;uA.f=YAe;var Kk=Ze,KAe=ft,XAe=uA,QAe=dr.f,rt=function(n){var e=Kk.Symbol||(Kk.Symbol={});KAe(e,n)||QAe(e,n,{value:XAe.f(n)})},JAe=_t,eIe=Jt,tIe=Xe,rIe=ua,GU=function(){var n=eIe("Symbol"),e=n&&n.prototype,t=e&&e.valueOf,r=tIe("toPrimitive");e&&!e[r]&&rIe(e,r,function(i){return JAe(t,this)},{})},iIe=XS,nIe=Bi,oIe=iIe?{}.toString:function(){return"[object "+nIe(this)+"]"},sIe=XS,aIe=dr.f,gIe=Fi,AIe=ft,IIe=oIe,CIe=Xe,Xk=CIe("toStringTag"),So=function(n,e,t,r){if(n){var i=t?n:n.prototype;AIe(i,Xk)||aIe(i,Xk,{configurable:!0,value:e}),r&&!sIe&&gIe(i,"toString",IIe)}},lIe=Ve,dIe=tt,Qk=lIe.WeakMap,uIe=dIe(Qk)&&/native code/.test(String(Qk)),hIe=uIe,WU=Ve,cIe=Bt,fIe=Fi,Yp=ft,Kp=YS,pIe=VC,vIe=CA,Jk="Object already initialized",vE=WU.TypeError,mIe=WU.WeakMap,ZI,_g,HI,yIe=function(n){return HI(n)?_g(n):ZI(n,{})},bIe=function(n){return function(e){var t;if(!cIe(e)||(t=_g(e)).type!==n)throw new vE("Incompatible receiver, "+n+" required");return t}};if(hIe||Kp.state){var ei=Kp.state||(Kp.state=new mIe);ei.get=ei.get,ei.has=ei.has,ei.set=ei.set,ZI=function(n,e){if(ei.has(n))throw new vE(Jk);return e.facade=n,ei.set(n,e),e},_g=function(n){return ei.get(n)||{}},HI=function(n){return ei.has(n)}}else{var Lo=pIe("state");vIe[Lo]=!0,ZI=function(n,e){if(Yp(n,Lo))throw new vE(Jk);return e.facade=n,fIe(n,Lo,e),e},_g=function(n){return Yp(n,Lo)?n[Lo]:{}},HI=function(n){return Yp(n,Lo)}}var ha={set:ZI,get:_g,has:HI,enforce:yIe,getterFor:bIe},wIe=yn,EIe=Le,SIe=NC,OIe=lr,TIe=br,_Ie=jC,eF=EIe([].push),eI=function(n){var e=n===1,t=n===2,r=n===3,i=n===4,o=n===6,s=n===7,a=n===5||o;return function(g,A,I,C){for(var l=OIe(g),d=SIe(l),u=wIe(A,I),h=TIe(d),p=0,f=C||_Ie,c=e?f(g,h):t||s?f(g,0):void 0,m,v;h>p;p++)if((a||p in d)&&(m=d[p],v=u(m,p,l),n))if(e)c[p]=v;else if(v)switch(n){case 3:return!0;case 5:return m;case 6:return p;case 2:eF(c,m)}else switch(n){case 4:return!1;case 7:eF(c,m)}return o?-1:r||i?i:c}},ca={forEach:eI(0),map:eI(1),filter:eI(2),some:eI(3)},ZC=se,hA=Ve,rO=_t,PIe=Le,Ns=Tt,Ms=Ia,RIe=Se,Et=ft,xIe=ct,mE=yr,HC=di,iO=kC,$Ie=wo,yE=bo,Pg=Eo,VU=WC,DIe=lA,ZU=eO,NIe=dA,HU=yo,UU=dr,MIe=LC,YU=DC,tF=ua,kIe=tO,nO=la,FIe=VC,KU=CA,rF=MC,BIe=Xe,qIe=uA,zIe=rt,jIe=GU,LIe=So,XU=ha,UC=ca.forEach,or=FIe("hidden"),YC="Symbol",Rg="prototype",GIe=XU.set,iF=XU.getterFor(YC),Zr=Object[Rg],Wn=hA.Symbol,eg=Wn&&Wn[Rg],WIe=hA.RangeError,VIe=hA.TypeError,Xp=hA.QObject,QU=HU.f,Vn=UU.f,JU=ZU.f,ZIe=YU.f,eY=PIe([].push),xi=nO("symbols"),cA=nO("op-symbols"),HIe=nO("wks"),bE=!Xp||!Xp[Rg]||!Xp[Rg].findChild,tY=function(n,e,t){var r=QU(Zr,e);r&&delete Zr[e],Vn(n,e,t),r&&n!==Zr&&Vn(Zr,e,r)},wE=Ns&&RIe(function(){return Pg(Vn({},"a",{get:function(){return Vn(this,"a",{value:7}).a}})).a!==7})?tY:Vn,Qp=function(n,e){var t=xi[n]=Pg(eg);return GIe(t,{type:YC,tag:n,description:e}),Ns||(t.description=e),t},KC=function(e,t,r){e===Zr&&KC(cA,t,r),mE(e);var i=iO(t);return mE(r),Et(xi,i)?(r.enumerable?(Et(e,or)&&e[or][i]&&(e[or][i]=!1),r=Pg(r,{enumerable:yE(0,!1)})):(Et(e,or)||Vn(e,or,yE(1,{})),e[or][i]=!0),wE(e,i,r)):Vn(e,i,r)},oO=function(e,t){mE(e);var r=HC(t),i=VU(r).concat(oY(r));return UC(i,function(o){(!Ns||rO(rY,r,o))&&KC(e,o,r[o])}),e},UIe=function(e,t){return t===void 0?Pg(e):oO(Pg(e),t)},rY=function(e){var t=iO(e),r=rO(ZIe,this,t);return this===Zr&&Et(xi,t)&&!Et(cA,t)?!1:r||!Et(this,t)||!Et(xi,t)||Et(this,or)&&this[or][t]?r:!0},iY=function(e,t){var r=HC(e),i=iO(t);if(!(r===Zr&&Et(xi,i)&&!Et(cA,i))){var o=QU(r,i);return o&&Et(xi,i)&&!(Et(r,or)&&r[or][i])&&(o.enumerable=!0),o}},nY=function(e){var t=JU(HC(e)),r=[];return UC(t,function(i){!Et(xi,i)&&!Et(KU,i)&&eY(r,i)}),r},oY=function(n){var e=n===Zr,t=JU(e?cA:HC(n)),r=[];return UC(t,function(i){Et(xi,i)&&(!e||Et(Zr,i))&&eY(r,xi[i])}),r};Ms||(Wn=function(){if(xIe(eg,this))throw new VIe("Symbol is not a constructor");var e=!arguments.length||arguments[0]===void 0?void 0:$Ie(arguments[0]),t=rF(e),r=function(i){var o=this===void 0?hA:this;o===Zr&&rO(r,cA,i),Et(o,or)&&Et(o[or],t)&&(o[or][t]=!1);var s=yE(1,i);try{wE(o,t,s)}catch(a){if(!(a instanceof WIe))throw a;tY(o,t,s)}};return Ns&&bE&&wE(Zr,t,{configurable:!0,set:r}),Qp(t,e)},eg=Wn[Rg],tF(eg,"toString",function(){return iF(this).tag}),tF(Wn,"withoutSetter",function(n){return Qp(rF(n),n)}),YU.f=rY,UU.f=KC,MIe.f=oO,HU.f=iY,DIe.f=ZU.f=nY,NIe.f=oY,qIe.f=function(n){return Qp(BIe(n),n)},Ns&&kIe(eg,"description",{configurable:!0,get:function(){return iF(this).description}}));ZC({global:!0,wrap:!0,forced:!Ms,sham:!Ms},{Symbol:Wn});UC(VU(HIe),function(n){zIe(n)});ZC({target:YC,stat:!0,forced:!Ms},{useSetter:function(){bE=!0},useSimple:function(){bE=!1}});ZC({target:"Object",stat:!0,forced:!Ms,sham:!Ns},{create:UIe,defineProperty:KC,defineProperties:oO,getOwnPropertyDescriptor:iY});ZC({target:"Object",stat:!0,forced:!Ms},{getOwnPropertyNames:nY});jIe();LIe(Wn,YC);KU[or]=!0;var YIe=Ia,sY=YIe&&!!Symbol.for&&!!Symbol.keyFor,KIe=se,XIe=Jt,QIe=ft,JIe=wo,aY=la,eCe=sY,Jp=aY("string-to-symbol-registry"),tCe=aY("symbol-to-string-registry");KIe({target:"Symbol",stat:!0,forced:!eCe},{for:function(n){var e=JIe(n);if(QIe(Jp,e))return Jp[e];var t=XIe("Symbol")(e);return Jp[e]=t,tCe[t]=e,t}});var rCe=se,iCe=ft,nCe=gA,oCe=Ca,sCe=la,aCe=sY,nF=sCe("symbol-to-string-registry");rCe({target:"Symbol",stat:!0,forced:!aCe},{keyFor:function(e){if(!nCe(e))throw new TypeError(oCe(e)+" is not a symbol");if(iCe(nF,e))return nF[e]}});var gCe=Le,fA=gCe([].slice),ACe=Le,oF=bn,ICe=tt,sF=vn,CCe=wo,aF=ACe([].push),lCe=function(n){if(ICe(n))return n;if(oF(n)){for(var e=n.length,t=[],r=0;r<e;r++){var i=n[r];typeof i=="string"?aF(t,i):(typeof i=="number"||sF(i)==="Number"||sF(i)==="String")&&aF(t,CCe(i))}var o=t.length,s=!0;return function(a,g){if(s)return s=!1,g;if(oF(this))return g;for(var A=0;A<o;A++)if(t[A]===a)return g}}},dCe=se,gY=Jt,AY=aa,uCe=_t,pA=Le,IY=Se,gF=tt,AF=gA,CY=fA,hCe=lCe,cCe=Ia,fCe=String,tn=gY("JSON","stringify"),tI=pA(/./.exec),IF=pA("".charAt),pCe=pA("".charCodeAt),vCe=pA("".replace),mCe=pA(1 .toString),yCe=/[\uD800-\uDFFF]/g,CF=/^[\uD800-\uDBFF]$/,lF=/^[\uDC00-\uDFFF]$/,dF=!cCe||IY(function(){var n=gY("Symbol")("stringify detection");return tn([n])!=="[null]"||tn({a:n})!=="{}"||tn(Object(n))!=="{}"}),uF=IY(function(){return tn("\uDF06\uD834")!=='"\\udf06\\ud834"'||tn("\uDEAD")!=='"\\udead"'}),bCe=function(n,e){var t=CY(arguments),r=hCe(e);if(!(!gF(r)&&(n===void 0||AF(n))))return t[1]=function(i,o){if(gF(r)&&(o=uCe(r,this,fCe(i),o)),!AF(o))return o},AY(tn,null,t)},wCe=function(n,e,t){var r=IF(t,e-1),i=IF(t,e+1);return tI(CF,n)&&!tI(lF,i)||tI(lF,n)&&!tI(CF,r)?"\\u"+mCe(pCe(n,0),16):n};tn&&dCe({target:"JSON",stat:!0,forced:dF||uF},{stringify:function(e,t,r){var i=CY(arguments),o=AY(dF?bCe:tn,null,i);return uF&&typeof o=="string"?vCe(o,yCe,wCe):o}});var ECe=se,SCe=Ia,OCe=Se,lY=dA,TCe=lr,_Ce=!SCe||OCe(function(){lY.f(1)});ECe({target:"Object",stat:!0,forced:_Ce},{getOwnPropertySymbols:function(e){var t=lY.f;return t?t(TCe(e)):[]}});var PCe=rt;PCe("asyncIterator");var RCe=rt;RCe("hasInstance");var xCe=rt;xCe("isConcatSpreadable");var $Ce=rt;$Ce("iterator");var DCe=rt;DCe("match");var NCe=rt;NCe("matchAll");var MCe=rt;MCe("replace");var kCe=rt;kCe("search");var FCe=rt;FCe("species");var BCe=rt;BCe("split");var qCe=rt,zCe=GU;qCe("toPrimitive");zCe();var jCe=Jt,LCe=rt,GCe=So;LCe("toStringTag");GCe(jCe("Symbol"),"Symbol");var WCe=rt;WCe("unscopables");var VCe=Ve,ZCe=So;ZCe(VCe.JSON,"JSON",!0);var HCe=Ze,UCe=HCe.Symbol,fa={},EE=Tt,YCe=ft,dY=Function.prototype,KCe=EE&&Object.getOwnPropertyDescriptor,uY=YCe(dY,"name"),XCe=uY&&(function(){}).name==="something";uY&&(!EE||EE&&KCe(dY,"name").configurable);var QCe={PROPER:XCe},JCe=Se,hY=!JCe(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype}),ele=ft,tle=tt,rle=lr,ile=VC,nle=hY,hF=ile("IE_PROTO"),SE=Object,ole=SE.prototype,XC=nle?SE.getPrototypeOf:function(n){var e=rle(n);if(ele(e,hF))return e[hF];var t=e.constructor;return tle(t)&&e instanceof t?t.prototype:e instanceof SE?ole:null},sle=Se,ale=tt,gle=Bt,Ale=Eo,cF=XC,Ile=ua,Cle=Xe,OE=Cle("iterator"),cY=!1,Ei,ev,tv;[].keys&&(tv=[].keys(),"next"in tv?(ev=cF(cF(tv)),ev!==Object.prototype&&(Ei=ev)):cY=!0);var lle=!gle(Ei)||sle(function(){var n={};return Ei[OE].call(n)!==n});lle?Ei={}:Ei=Ale(Ei);ale(Ei[OE])||Ile(Ei,OE,function(){return this});var fY={IteratorPrototype:Ei,BUGGY_SAFARI_ITERATORS:cY},dle=fY.IteratorPrototype,ule=Eo,hle=bo,cle=So,fle=fa,ple=function(){return this},vle=function(n,e,t,r){var i=e+" Iterator";return n.prototype=ule(dle,{next:hle(+!r,t)}),cle(n,i,!1,!0),fle[i]=ple,n},mle=Le,yle=Cr,ble=function(n,e,t){try{return mle(yle(Object.getOwnPropertyDescriptor(n,e)[t]))}catch{}},wle=tt,Ele=String,Sle=TypeError,Ole=function(n){if(typeof n=="object"||wle(n))return n;throw new Sle("Can't set "+Ele(n)+" as a prototype")},Tle=ble,_le=yr,Ple=Ole,pY=Object.setPrototypeOf||("__proto__"in{}?(function(){var n=!1,e={},t;try{t=Tle(Object.prototype,"__proto__","set"),t(e,[]),n=e instanceof Array}catch{}return function(i,o){return _le(i),Ple(o),n?t(i,o):i.__proto__=o,i}})():void 0),Rle=se,xle=_t,$le=QCe,Dle=vle,Nle=XC,Mle=So,fF=ua,kle=Xe,pF=fa,Fle=fY,Ble=$le.PROPER,rI=Fle.BUGGY_SAFARI_ITERATORS,rv=kle("iterator"),vF="keys",iI="values",mF="entries",qle=function(){return this},sO=function(n,e,t,r,i,o,s){Dle(t,e,r);var a=function(f){if(f===i&&l)return l;if(!rI&&f&&f in I)return I[f];switch(f){case vF:return function(){return new t(this,f)};case iI:return function(){return new t(this,f)};case mF:return function(){return new t(this,f)}}return function(){return new t(this)}},g=e+" Iterator",A=!1,I=n.prototype,C=I[rv]||I["@@iterator"]||i&&I[i],l=!rI&&C||a(i),d=e==="Array"&&I.entries||C,u,h,p;if(d&&(u=Nle(d.call(new n)),u!==Object.prototype&&u.next&&(Mle(u,g,!0,!0),pF[g]=qle)),Ble&&i===iI&&C&&C.name!==iI&&(A=!0,l=function(){return xle(C,this)}),i)if(h={values:a(iI),keys:o?l:a(vF),entries:a(mF)},s)for(p in h)(rI||A||!(p in I))&&fF(I,p,h[p]);else Rle({target:e,proto:!0,forced:rI||A},h);return s&&I[rv]!==l&&fF(I,rv,l,{}),pF[e]=l,h},aO=function(n,e){return{value:n,done:e}},zle=di,yF=fa,vY=ha;dr.f;var jle=sO,nI=aO,mY="Array Iterator",Lle=vY.set,Gle=vY.getterFor(mY);jle(Array,"Array",function(n,e){Lle(this,{type:mY,target:zle(n),index:0,kind:e})},function(){var n=Gle(this),e=n.target,t=n.index++;if(!e||t>=e.length)return n.target=void 0,nI(void 0,!0);switch(n.kind){case"keys":return nI(t,!1);case"values":return nI(e[t],!1)}return nI([t,e[t]],!1)},"values");yF.Arguments=yF.Array;var Wle={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Vle=Wle,Zle=Ve,Hle=Bi,Ule=Fi,bF=fa,Yle=Xe,wF=Yle("toStringTag");for(var iv in Vle){var EF=Zle[iv],nv=EF&&EF.prototype;nv&&Hle(nv)!==wF&&Ule(nv,wF,iv),bF[iv]=bF.Array}var Kle=UCe,yY=Kle,Xle=Xe,Qle=dr.f,SF=Xle("metadata"),OF=Function.prototype;OF[SF]===void 0&&Qle(OF,SF,{value:null});var Jle=rt;Jle("asyncDispose");var ede=rt;ede("dispose");var tde=rt;tde("metadata");var rde=yY,ide=rde,nde=Jt,ode=Le,gO=nde("Symbol"),sde=gO.keyFor,ade=ode(gO.prototype.valueOf),bY=gO.isRegisteredSymbol||function(e){try{return sde(ade(e))!==void 0}catch{return!1}},gde=se,Ade=bY;gde({target:"Symbol",stat:!0},{isRegisteredSymbol:Ade});var Ide=la,wY=Jt,Cde=Le,lde=gA,dde=Xe,UI=wY("Symbol"),TF=UI.isWellKnownSymbol,EY=wY("Object","getOwnPropertyNames"),ude=Cde(UI.prototype.valueOf),_F=Ide("wks");for(var ov=0,PF=EY(UI),hde=PF.length;ov<hde;ov++)try{var RF=PF[ov];lde(UI[RF])&&dde(RF)}catch{}var SY=function(e){if(TF&&TF(e))return!0;try{for(var t=ude(e),r=0,i=EY(_F),o=i.length;r<o;r++)if(_F[i[r]]==t)return!0}catch{}return!1},cde=se,fde=SY;cde({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:fde});var pde=rt;pde("matcher");var vde=rt;vde("observable");var mde=se,yde=bY;mde({target:"Symbol",stat:!0},{isRegistered:yde});var bde=se,wde=SY;bde({target:"Symbol",stat:!0,forced:!0},{isWellKnown:wde});var Ede=rt;Ede("metadataKey");var Sde=rt;Sde("patternMatch");var Ode=rt;Ode("replaceAll");var Tde=ide,_de=Tde,AO=_de,es=Ce(AO),IO=Le,Pde=BC,Rde=wo,xde=HS,$de=IO("".charAt),xF=IO("".charCodeAt),Dde=IO("".slice),Nde=function(n){return function(e,t){var r=Rde(xde(e)),i=Pde(t),o=r.length,s,a;return i<0||i>=o?n?"":void 0:(s=xF(r,i),s<55296||s>56319||i+1===o||(a=xF(r,i+1))<56320||a>57343?n?$de(r,i):s:n?Dde(r,i,i+2):(s-55296<<10)+(a-56320)+65536)}},Mde={charAt:Nde(!0)},kde=Mde.charAt,Fde=wo,OY=ha,Bde=sO,$F=aO,TY="String Iterator",qde=OY.set,zde=OY.getterFor(TY);Bde(String,"String",function(n){qde(this,{type:TY,string:Fde(n),index:0})},function(){var e=zde(this),t=e.string,r=e.index,i;return r>=t.length?$F(void 0,!0):(i=kde(t,r),e.index+=i.length,$F(i,!1))});var jde=uA,Lde=jde.f("iterator"),Gde=Lde,_Y=Gde,Wde=_Y,Vde=Wde,Zde=Vde,Hde=Zde,PY=Hde,Ude=Ce(PY);function ks(n){"@babel/helpers - typeof";return ks=typeof es=="function"&&typeof Ude=="symbol"?function(e){return typeof e}:function(e){return e&&typeof es=="function"&&e.constructor===es&&e!==es.prototype?"symbol":typeof e},ks(n)}var Yde=uA,Kde=Yde.f("toPrimitive"),Xde=Kde,Qde=Xde,Jde=Qde,eue=Jde,tue=eue,rue=tue,iue=rue,nue=Ce(iue);function oue(n,e){if(ks(n)!=="object"||n===null)return n;var t=n[nue];if(t!==void 0){var r=t.call(n,e);if(ks(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function RY(n){var e=oue(n,"string");return ks(e)==="symbol"?e:String(e)}function DF(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),FC(n,RY(r.key),r)}}function QC(n,e,t){return e&&DF(n.prototype,e),t&&DF(n,t),FC(n,"prototype",{writable:!1}),n}function rn(n,e,t){return e=RY(e),e in n?FC(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var xY=Le,sue=Cr,aue=Bt,gue=ft,NF=fA,Aue=aA,$Y=Function,Iue=xY([].concat),Cue=xY([].join),sv={},lue=function(n,e,t){if(!gue(sv,e)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";sv[e]=$Y("C,a","return new C("+Cue(r,",")+")")}return sv[e](n,t)},DY=Aue?$Y.bind:function(e){var t=sue(this),r=t.prototype,i=NF(arguments,1),o=function(){var a=Iue(i,NF(arguments));return this instanceof o?lue(t,a.length,a):t.apply(e,a)};return aue(r)&&(o.prototype=r),o},due=se,MF=DY;due({target:"Function",proto:!0,forced:Function.bind!==MF},{bind:MF});var uue=Ve,hue=Ze,jt=function(n,e){var t=hue[n+"Prototype"],r=t&&t[e];if(r)return r;var i=uue[n],o=i&&i.prototype;return o&&o[e]},cue=jt,fue=cue("Function","bind"),pue=ct,vue=fue,av=Function.prototype,mue=function(n){var e=n.bind;return n===av||pue(av,n)&&e===av.bind?vue:e},yue=mue,NY=yue,bue=NY,MY=Ce(bue),wue=Cr,Eue=lr,Sue=NC,Oue=br,Tue=TypeError,_ue=function(n){return function(e,t,r,i){wue(t);var o=Eue(e),s=Sue(o),a=Oue(o),g=n?a-1:0,A=n?-1:1;if(r<2)for(;;){if(g in s){i=s[g],g+=A;break}if(g+=A,n?g<0:a<=g)throw new Tue("Reduce of empty array with no initial value")}for(;n?g>=0:a>g;g+=A)g in s&&(i=t(i,s[g],g,o));return i}},Pue={left:_ue(!1)},Rue=Se,JC=function(n,e){var t=[][n];return!!t&&Rue(function(){t.call(null,e||function(){return 1},1)})},xue=Ve,$ue=vn,vA=$ue(xue.process)==="process",Due=se,Nue=Pue.left,Mue=JC,kF=Aa,kue=vA,Fue=!kue&&kF>79&&kF<83,Bue=Fue||!Mue("reduce");Due({target:"Array",proto:!0,forced:Bue},{reduce:function(e){var t=arguments.length;return Nue(this,e,t,t>1?arguments[1]:void 0)}});var que=jt,zue=que("Array","reduce"),jue=ct,Lue=zue,gv=Array.prototype,Gue=function(n){var e=n.reduce;return n===gv||jue(gv,n)&&e===gv.reduce?Lue:e},Wue=Gue,Vue=Wue,Zue=Vue,Hue=Ce(Zue),Uue=se,Yue=ca.filter,Kue=IA,Xue=Kue("filter");Uue({target:"Array",proto:!0,forced:!Xue},{filter:function(e){return Yue(this,e,arguments.length>1?arguments[1]:void 0)}});var Que=jt,Jue=Que("Array","filter"),ehe=ct,the=Jue,Av=Array.prototype,rhe=function(n){var e=n.filter;return n===Av||ehe(Av,n)&&e===Av.filter?the:e},ihe=rhe,nhe=ihe,ohe=nhe,ts=Ce(ohe),she=se,ahe=ca.map,ghe=IA,Ahe=ghe("map");she({target:"Array",proto:!0,forced:!Ahe},{map:function(e){return ahe(this,e,arguments.length>1?arguments[1]:void 0)}});var Ihe=jt,Che=Ihe("Array","map"),lhe=ct,dhe=Che,Iv=Array.prototype,uhe=function(n){var e=n.map;return n===Iv||lhe(Iv,n)&&e===Iv.map?dhe:e},hhe=uhe,che=hhe,fhe=che,Vr=Ce(fhe),phe=bn,vhe=br,mhe=qC,yhe=yn,kY=function(n,e,t,r,i,o,s,a){for(var g=i,A=0,I=s?yhe(s,a):!1,C,l;A<r;)A in t&&(C=I?I(t[A],A,e):t[A],o>0&&phe(C)?(l=vhe(C),g=kY(n,e,C,l,g,o-1)-1):(mhe(g+1),n[g]=C),g++),A++;return g},bhe=kY,whe=se,Ehe=bhe,She=Cr,Ohe=lr,The=br,_he=jC;whe({target:"Array",proto:!0},{flatMap:function(e){var t=Ohe(this),r=The(t),i;return She(e),i=_he(t,0),i.length=Ehe(i,t,t,r,0,1,e,arguments.length>1?arguments[1]:void 0),i}});var Phe=jt;Phe("Array","flatMap");var Rhe=_t,FF=yr,xhe=US,FY=function(n,e,t){var r,i;FF(n);try{if(r=xhe(n,"return"),!r){if(e==="throw")throw t;return t}r=Rhe(r,n)}catch(o){i=!0,r=o}if(e==="throw")throw t;if(i)throw r;return FF(r),t},$he=yr,Dhe=FY,Nhe=function(n,e,t,r){try{return r?e($he(t)[0],t[1]):e(t)}catch(i){Dhe(n,"throw",i)}},Mhe=Xe,khe=fa,Fhe=Mhe("iterator"),Bhe=Array.prototype,BY=function(n){return n!==void 0&&(khe.Array===n||Bhe[Fhe]===n)},qhe=Bi,BF=US,zhe=ga,jhe=fa,Lhe=Xe,Ghe=Lhe("iterator"),el=function(n){if(!zhe(n))return BF(n,Ghe)||BF(n,"@@iterator")||jhe[qhe(n)]},Whe=_t,Vhe=Cr,Zhe=yr,Hhe=Ca,Uhe=el,Yhe=TypeError,CO=function(n,e){var t=arguments.length<2?Uhe(n):e;if(Vhe(t))return Zhe(Whe(t,n));throw new Yhe(Hhe(n)+" is not iterable")},Khe=yn,Xhe=_t,Qhe=lr,Jhe=Nhe,ece=BY,tce=zC,rce=br,qF=da,ice=CO,nce=el,zF=Array,oce=function(e){var t=Qhe(e),r=tce(this),i=arguments.length,o=i>1?arguments[1]:void 0,s=o!==void 0;s&&(o=Khe(o,i>2?arguments[2]:void 0));var a=nce(t),g=0,A,I,C,l,d,u;if(a&&!(this===zF&&ece(a)))for(l=ice(t,a),d=l.next,I=r?new this:[];!(C=Xhe(d,l)).done;g++)u=s?Jhe(l,o,[C.value,g],!0):C.value,qF(I,g,u);else for(A=rce(t),I=r?new this(A):zF(A);A>g;g++)u=s?o(t[g],g):t[g],qF(I,g,u);return I.length=g,I},sce=Xe,qY=sce("iterator"),zY=!1;try{var ace=0,jF={next:function(){return{done:!!ace++}},return:function(){zY=!0}};jF[qY]=function(){return this},Array.from(jF,function(){throw 2})}catch{}var jY=function(n,e){try{if(!e&&!zY)return!1}catch{return!1}var t=!1;try{var r={};r[qY]=function(){return{next:function(){return{done:t=!0}}}},n(r)}catch{}return t},gce=se,Ace=oce,Ice=jY,Cce=!Ice(function(n){Array.from(n)});gce({target:"Array",stat:!0,forced:Cce},{from:Ace});var lce=Ze,dce=lce.Array.from,uce=dce,LY=uce,hce=LY,lO=Ce(hce),cce=el,fce=cce,pce=fce,vce=pce,mce=vce,yce=mce,bce=yce,wce=bce,GY=wce,WY=Ce(GY),Ece=GY,dO=Ce(Ece),Sce=se,Oce=bn;Sce({target:"Array",stat:!0},{isArray:Oce});var Tce=Ze,_ce=Tce.Array.isArray,Pce=_ce,VY=Pce,Rce=VY,xce=Rce,$ce=xce,Dce=$ce,Nce=Dce,ZY=Ce(Nce);function Mce(n){if(ZY(n))return n}var kce=Tt,Fce=bn,Bce=TypeError,qce=Object.getOwnPropertyDescriptor,zce=kce&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(n){return n instanceof TypeError}})(),HY=zce?function(n,e){if(Fce(n)&&!qce(n,"length").writable)throw new Bce("Cannot set read only .length");return n.length=e}:function(n,e){return n.length=e},jce=se,Lce=lr,Gce=br,Wce=HY,Vce=qC,Zce=Se,Hce=Zce(function(){return[].push.call({length:4294967296},1)!==4294967297}),Uce=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(n){return n instanceof TypeError}},Yce=Hce||!Uce();jce({target:"Array",proto:!0,forced:Yce},{push:function(e){var t=Lce(this),r=Gce(t),i=arguments.length;Vce(r+i);for(var o=0;o<i;o++)t[r]=arguments[o],r++;return Wce(t,r),r}});var Kce=jt,Xce=Kce("Array","push"),Qce=ct,Jce=Xce,Cv=Array.prototype,efe=function(n){var e=n.push;return n===Cv||Qce(Cv,n)&&e===Cv.push?Jce:e},tfe=efe,rfe=tfe,ife=rfe,nfe=ife,ofe=nfe,sfe=ofe,UY=sfe,afe=Ce(UY);function gfe(n,e){var t=n==null?null:typeof es<"u"&&WY(n)||n["@@iterator"];if(t!=null){var r,i,o,s,a=[],g=!0,A=!1;try{if(o=(t=t.call(n)).next,e===0){if(Object(t)!==t)return;g=!1}else for(;!(g=(r=o.call(t)).done)&&(afe(a).call(a,r.value),a.length!==e);g=!0);}catch(I){A=!0,i=I}finally{try{if(!g&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(A)throw i}}return a}}var Afe=se,LF=bn,Ife=zC,Cfe=Bt,GF=GC,lfe=br,dfe=di,ufe=da,hfe=Xe,cfe=IA,ffe=fA,pfe=cfe("slice"),vfe=hfe("species"),lv=Array,mfe=Math.max;Afe({target:"Array",proto:!0,forced:!pfe},{slice:function(e,t){var r=dfe(this),i=lfe(r),o=GF(e,i),s=GF(t===void 0?i:t,i),a,g,A;if(LF(r)&&(a=r.constructor,Ife(a)&&(a===lv||LF(a.prototype))?a=void 0:Cfe(a)&&(a=a[vfe],a===null&&(a=void 0)),a===lv||a===void 0))return ffe(r,o,s);for(g=new(a===void 0?lv:a)(mfe(s-o,0)),A=0;o<s;o++,A++)o in r&&ufe(g,A,r[o]);return g.length=A,g}});var yfe=jt,bfe=yfe("Array","slice"),wfe=ct,Efe=bfe,dv=Array.prototype,Sfe=function(n){var e=n.slice;return n===dv||wfe(dv,n)&&e===dv.slice?Efe:e},Ofe=Sfe,YY=Ofe,Tfe=YY,_fe=Tfe,Pfe=_fe,Rfe=Pfe,KY=Rfe,xfe=Ce(KY),$fe=LY,Dfe=$fe,Nfe=Dfe,Mfe=Nfe,kfe=Mfe,XY=Ce(kfe);function TE(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function QY(n,e){var t;if(n){if(typeof n=="string")return TE(n,e);var r=xfe(t=Object.prototype.toString.call(n)).call(t,8,-1);if(r==="Object"&&n.constructor&&(r=n.constructor.name),r==="Map"||r==="Set")return XY(n);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return TE(n,e)}}function Ffe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function er(n,e){return Mce(n)||gfe(n,e)||QY(n,e)||Ffe()}function Bfe(n){if(ZY(n))return TE(n)}function qfe(n){if(typeof es<"u"&&WY(n)!=null||n["@@iterator"]!=null)return XY(n)}function zfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sr(n){return Bfe(n)||qfe(n)||QY(n)||zfe()}var jfe=yY,tl=Ce(jfe),Lfe=jt,Gfe=Lfe("Array","concat"),Wfe=ct,Vfe=Gfe,uv=Array.prototype,Zfe=function(n){var e=n.concat;return n===uv||Wfe(uv,n)&&e===uv.concat?Vfe:e},Hfe=Zfe,Ufe=Hfe,Yfe=Ufe,rl=Ce(Yfe),Kfe=YY,il=Ce(Kfe),Xfe=Jt,Qfe=Le,Jfe=lA,epe=dA,tpe=yr,rpe=Qfe([].concat),uO=Xfe("Reflect","ownKeys")||function(e){var t=Jfe.f(tpe(e)),r=epe.f;return r?rpe(t,r(e)):t},ipe=se,npe=uO;ipe({target:"Reflect",stat:!0},{ownKeys:npe});var ope=Ze,spe=ope.Reflect.ownKeys,ape=spe,gpe=ape,Ape=gpe,Ipe=Ce(Ape),Cpe=VY,fr=Ce(Cpe),lpe=se,dpe=lr,JY=WC,upe=Se,hpe=upe(function(){JY(1)});lpe({target:"Object",stat:!0,forced:hpe},{keys:function(e){return JY(dpe(e))}});var cpe=Ze,fpe=cpe.Object.keys,ppe=fpe,vpe=ppe,mpe=vpe,hO=Ce(mpe),ype=ca.forEach,bpe=JC,wpe=bpe("forEach"),Epe=wpe?[].forEach:function(e){return ype(this,e,arguments.length>1?arguments[1]:void 0)},Spe=se,WF=Epe;Spe({target:"Array",proto:!0,forced:[].forEach!==WF},{forEach:WF});var Ope=jt,Tpe=Ope("Array","forEach"),_pe=Tpe,Ppe=_pe,Rpe=Bi,xpe=ft,$pe=ct,Dpe=Ppe,hv=Array.prototype,Npe={DOMTokenList:!0,NodeList:!0},eK=function(n){var e=n.forEach;return n===hv||$pe(hv,n)&&e===hv.forEach||xpe(Npe,Rpe(n))?Dpe:e},Mpe=eK,eo=Ce(Mpe),kpe=se,Fpe=Le,Bpe=bn,qpe=Fpe([].reverse),VF=[1,2];kpe({target:"Array",proto:!0,forced:String(VF)===String(VF.reverse())},{reverse:function(){return Bpe(this)&&(this.length=this.length),qpe(this)}});var zpe=jt,jpe=zpe("Array","reverse"),Lpe=ct,Gpe=jpe,cv=Array.prototype,Wpe=function(n){var e=n.reverse;return n===cv||Lpe(cv,n)&&e===cv.reverse?Gpe:e},Vpe=Wpe,tK=Vpe,Zpe=tK,Hpe=Ce(Zpe),ZF=Ca,Upe=TypeError,rK=function(n,e){if(!delete n[e])throw new Upe("Cannot delete property "+ZF(e)+" of "+ZF(n))},Ype=se,Kpe=lr,Xpe=GC,Qpe=BC,Jpe=br,eve=HY,tve=qC,rve=jC,ive=da,fv=rK,nve=IA,ove=nve("splice"),sve=Math.max,ave=Math.min;Ype({target:"Array",proto:!0,forced:!ove},{splice:function(e,t){var r=Kpe(this),i=Jpe(r),o=Xpe(e,i),s=arguments.length,a,g,A,I,C,l;for(s===0?a=g=0:s===1?(a=0,g=i-o):(a=s-2,g=ave(sve(Qpe(t),0),i-o)),tve(i+a-g),A=rve(r,g),I=0;I<g;I++)C=o+I,C in r&&ive(A,I,r[C]);if(A.length=g,a<g){for(I=o;I<i-g;I++)C=I+g,l=I+a,C in r?r[l]=r[C]:fv(r,l);for(I=i;I>i-g+a;I--)fv(r,I-1)}else if(a>g)for(I=i-g;I>o;I--)C=I+g-1,l=I+a-1,C in r?r[l]=r[C]:fv(r,l);for(I=0;I<a;I++)r[I+o]=arguments[I+2];return eve(r,i-g+a),A}});var gve=jt,Ave=gve("Array","splice"),Ive=ct,Cve=Ave,pv=Array.prototype,lve=function(n){var e=n.splice;return n===pv||Ive(pv,n)&&e===pv.splice?Cve:e},dve=lve,uve=dve,hve=uve,iK=Ce(hve),HF=Tt,cve=Le,fve=_t,pve=Se,vv=WC,vve=dA,mve=DC,yve=lr,bve=NC,Go=Object.assign,UF=Object.defineProperty,wve=cve([].concat),Eve=!Go||pve(function(){if(HF&&Go({b:1},Go(UF({},"a",{enumerable:!0,get:function(){UF(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var n={},e={},t=Symbol("assign detection"),r="abcdefghijklmnopqrst";return n[t]=7,r.split("").forEach(function(i){e[i]=i}),Go({},n)[t]!==7||vv(Go({},e)).join("")!==r})?function(e,t){for(var r=yve(e),i=arguments.length,o=1,s=vve.f,a=mve.f;i>o;)for(var g=bve(arguments[o++]),A=s?wve(vv(g),s(g)):vv(g),I=A.length,C=0,l;I>C;)l=A[C++],(!HF||fve(a,g,l))&&(r[l]=g[l]);return r}:Go,Sve=se,YF=Eve;Sve({target:"Object",stat:!0,forced:Object.assign!==YF},{assign:YF});var Ove=Ze,Tve=Ove.Object.assign,_ve=Tve,Pve=_ve,Rve=Pve,xve=Ce(Rve),$ve=se,Dve=Se,Nve=lr,nK=XC,Mve=hY,kve=Dve(function(){nK(1)});$ve({target:"Object",stat:!0,forced:kve,sham:!Mve},{getPrototypeOf:function(e){return nK(Nve(e))}});var Fve=Ze,Bve=Fve.Object.getPrototypeOf,qve=Bve,zve=qve,jve=se,Lve=Tt,Gve=Eo;jve({target:"Object",stat:!0,sham:!Lve},{create:Gve});var Wve=Ze,Vve=Wve.Object,Zve=function(e,t){return Vve.create(e,t)},Hve=Zve,oK=Hve,Uve=oK,Yve=Ce(Uve),_E=Ze,Kve=aa;_E.JSON||(_E.JSON={stringify:JSON.stringify});var Xve=function(e,t,r){return Kve(_E.JSON.stringify,null,arguments)},Qve=Xve,Jve=Qve,eme=Jve,tme=Ce(eme),rme=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",ime=TypeError,sK=function(n,e){if(n<e)throw new ime("Not enough arguments");return n},aK=Ve,nme=aa,ome=tt,sme=rme,ame=mn,gme=fA,Ame=sK,Ime=aK.Function,Cme=/MSIE .\./.test(ame)||sme&&(function(){var n=aK.Bun.version.split(".");return n.length<3||n[0]==="0"&&(n[1]<3||n[1]==="3"&&n[2]==="0")})(),gK=function(n,e){var t=e?2:1;return Cme?function(r,i){var o=Ame(arguments.length,1)>t,s=ome(r)?r:Ime(r),a=o?gme(arguments,t):[],g=o?function(){nme(s,this,a)}:s;return e?n(g,i):n(g)}:n},lme=se,AK=Ve,dme=gK,KF=dme(AK.setInterval,!0);lme({global:!0,bind:!0,forced:AK.setInterval!==KF},{setInterval:KF});var ume=se,IK=Ve,hme=gK,XF=hme(IK.setTimeout,!0);ume({global:!0,bind:!0,forced:IK.setTimeout!==XF},{setTimeout:XF});var cme=Ze,fme=cme.setTimeout,pme=fme,vme=Ce(pme),CK={exports:{}};(function(n){function e(r){if(r)return t(r);this._callbacks=new Map}function t(r){return Object.assign(r,e.prototype),r._callbacks=new Map,r}e.prototype.on=function(r,i){const o=this._callbacks.get(r)??[];return o.push(i),this._callbacks.set(r,o),this},e.prototype.once=function(r,i){const o=(...s)=>{this.off(r,o),i.apply(this,s)};return o.fn=i,this.on(r,o),this},e.prototype.off=function(r,i){if(r===void 0&&i===void 0)return this._callbacks.clear(),this;if(i===void 0)return this._callbacks.delete(r),this;const o=this._callbacks.get(r);if(o){for(const[s,a]of o.entries())if(a===i||a.fn===i){o.splice(s,1);break}o.length===0?this._callbacks.delete(r):this._callbacks.set(r,o)}return this},e.prototype.emit=function(r,...i){const o=this._callbacks.get(r);if(o){const s=[...o];for(const a of s)a.apply(this,i)}return this},e.prototype.listeners=function(r){return this._callbacks.get(r)??[]},e.prototype.listenerCount=function(r){if(r)return this.listeners(r).length;let i=0;for(const o of this._callbacks.values())i+=o.length;return i},e.prototype.hasListeners=function(r){return this.listenerCount(r)>0},e.prototype.addEventListener=e.prototype.on,e.prototype.removeListener=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,n.exports=e})(CK);var mme=CK.exports,yme=Ce(mme);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
 * http://naver.github.io/egjs
 *
 * Forked By Naver egjs
 * Copyright (c) hammerjs
 * Licensed under the MIT license */function Kr(){return Kr=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Kr.apply(this,arguments)}function kr(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}function oI(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}var PE;typeof Object.assign!="function"?PE=function(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(i!=null)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:PE=Object.assign;var to=PE,QF=["","webkit","Moz","MS","ms","o"],bme=typeof document>"u"?{style:{}}:document.createElement("div"),wme="function",rs=Math.round,ro=Math.abs,cO=Date.now;function nl(n,e){for(var t,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<QF.length;){if(t=QF[o],r=t?t+i:e,r in n)return r;o++}}var Si;typeof window>"u"?Si={}:Si=window;var lK=nl(bme.style,"touchAction"),dK=lK!==void 0;function Eme(){if(!dK)return!1;var n={},e=Si.CSS&&Si.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return n[t]=e?Si.CSS.supports("touch-action",t):!0}),n}var uK="compute",hK="auto",RE="manipulation",Zn="none",xg="pan-x",$g="pan-y",sI=Eme(),Sme=/mobile|tablet|ip(ad|hone|od)|android/i,cK="ontouchstart"in Si,Ome=nl(Si,"PointerEvent")!==void 0,Tme=cK&&Sme.test(navigator.userAgent),mA="touch",_me="pen",fO="mouse",Pme="kinect",Rme=25,Xt=1,Oo=2,lt=4,gr=8,YI=1,yA=2,bA=4,wA=8,Fs=16,Ai=yA|bA,Hn=wA|Fs,fK=Ai|Hn,pK=["x","y"],KI=["clientX","clientY"];function Oi(n,e,t){var r;if(n)if(n.forEach)n.forEach(e,t);else if(n.length!==void 0)for(r=0;r<n.length;)e.call(t,n[r],r,n),r++;else for(r in n)n.hasOwnProperty(r)&&e.call(t,n[r],r,n)}function ol(n,e){return typeof n===wme?n.apply(e&&e[0]||void 0,e):n}function Bn(n,e){return n.indexOf(e)>-1}function xme(n){if(Bn(n,Zn))return Zn;var e=Bn(n,xg),t=Bn(n,$g);return e&&t?Zn:e||t?e?xg:$g:Bn(n,RE)?RE:hK}var vK=(function(){function n(t,r){this.manager=t,this.set(r)}var e=n.prototype;return e.set=function(r){r===uK&&(r=this.compute()),dK&&this.manager.element.style&&sI[r]&&(this.manager.element.style[lK]=r),this.actions=r.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var r=[];return Oi(this.manager.recognizers,function(i){ol(i.options.enable,[i])&&(r=r.concat(i.getTouchAction()))}),xme(r.join(" "))},e.preventDefaults=function(r){var i=r.srcEvent,o=r.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var s=this.actions,a=Bn(s,Zn)&&!sI[Zn],g=Bn(s,$g)&&!sI[$g],A=Bn(s,xg)&&!sI[xg];if(a){var I=r.pointers.length===1,C=r.distance<2,l=r.deltaTime<250;if(I&&C&&l)return}if(!(A&&g)&&(a||g&&o&Ai||A&&o&Hn))return this.preventSrc(i)},e.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},n})();function pO(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}function mK(n){var e=n.length;if(e===1)return{x:rs(n[0].clientX),y:rs(n[0].clientY)};for(var t=0,r=0,i=0;i<e;)t+=n[i].clientX,r+=n[i].clientY,i++;return{x:rs(t/e),y:rs(r/e)}}function JF(n){for(var e=[],t=0;t<n.pointers.length;)e[t]={clientX:rs(n.pointers[t].clientX),clientY:rs(n.pointers[t].clientY)},t++;return{timeStamp:cO(),pointers:e,center:mK(e),deltaX:n.deltaX,deltaY:n.deltaY}}function XI(n,e,t){t||(t=pK);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.sqrt(r*r+i*i)}function xE(n,e,t){t||(t=pK);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.atan2(i,r)*180/Math.PI}function yK(n,e){return n===e?YI:ro(n)>=ro(e)?n<0?yA:bA:e<0?wA:Fs}function $me(n,e){var t=e.center,r=n.offsetDelta||{},i=n.prevDelta||{},o=n.prevInput||{};(e.eventType===Xt||o.eventType===lt)&&(i=n.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=n.offsetDelta={x:t.x,y:t.y}),e.deltaX=i.x+(t.x-r.x),e.deltaY=i.y+(t.y-r.y)}function bK(n,e,t){return{x:e/n||0,y:t/n||0}}function Dme(n,e){return XI(e[0],e[1],KI)/XI(n[0],n[1],KI)}function Nme(n,e){return xE(e[1],e[0],KI)+xE(n[1],n[0],KI)}function Mme(n,e){var t=n.lastInterval||e,r=e.timeStamp-t.timeStamp,i,o,s,a;if(e.eventType!==gr&&(r>Rme||t.velocity===void 0)){var g=e.deltaX-t.deltaX,A=e.deltaY-t.deltaY,I=bK(r,g,A);o=I.x,s=I.y,i=ro(I.x)>ro(I.y)?I.x:I.y,a=yK(g,A),n.lastInterval=e}else i=t.velocity,o=t.velocityX,s=t.velocityY,a=t.direction;e.velocity=i,e.velocityX=o,e.velocityY=s,e.direction=a}function kme(n,e){var t=n.session,r=e.pointers,i=r.length;t.firstInput||(t.firstInput=JF(e)),i>1&&!t.firstMultiple?t.firstMultiple=JF(e):i===1&&(t.firstMultiple=!1);var o=t.firstInput,s=t.firstMultiple,a=s?s.center:o.center,g=e.center=mK(r);e.timeStamp=cO(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=xE(a,g),e.distance=XI(a,g),$me(t,e),e.offsetDirection=yK(e.deltaX,e.deltaY);var A=bK(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=A.x,e.overallVelocityY=A.y,e.overallVelocity=ro(A.x)>ro(A.y)?A.x:A.y,e.scale=s?Dme(s.pointers,r):1,e.rotation=s?Nme(s.pointers,r):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,Mme(t,e);var I=n.element,C=e.srcEvent,l;C.composedPath?l=C.composedPath()[0]:C.path?l=C.path[0]:l=C.target,pO(l,I)&&(I=l),e.target=I}function Fme(n,e,t){var r=t.pointers.length,i=t.changedPointers.length,o=e&Xt&&r-i===0,s=e&(lt|gr)&&r-i===0;t.isFirst=!!o,t.isFinal=!!s,o&&(n.session={}),t.eventType=e,kme(n,t),n.emit("hammer.input",t),n.recognize(t),n.session.prevInput=t}function Dg(n){return n.trim().split(/\s+/g)}function Ig(n,e,t){Oi(Dg(e),function(r){n.addEventListener(r,t,!1)})}function Cg(n,e,t){Oi(Dg(e),function(r){n.removeEventListener(r,t,!1)})}function eB(n){var e=n.ownerDocument||n;return e.defaultView||e.parentWindow||window}var pa=(function(){function n(t,r){var i=this;this.manager=t,this.callback=r,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(o){ol(t.options.enable,[t])&&i.handler(o)},this.init()}var e=n.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Ig(this.element,this.evEl,this.domHandler),this.evTarget&&Ig(this.target,this.evTarget,this.domHandler),this.evWin&&Ig(eB(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Cg(this.element,this.evEl,this.domHandler),this.evTarget&&Cg(this.target,this.evTarget,this.domHandler),this.evWin&&Cg(eB(this.element),this.evWin,this.domHandler)},n})();function io(n,e,t){if(n.indexOf&&!t)return n.indexOf(e);for(var r=0;r<n.length;){if(t&&n[r][t]==e||!t&&n[r]===e)return r;r++}return-1}var Bme={pointerdown:Xt,pointermove:Oo,pointerup:lt,pointercancel:gr,pointerout:gr},qme={2:mA,3:_me,4:fO,5:Pme},wK="pointerdown",EK="pointermove pointerup pointercancel";Si.MSPointerEvent&&!Si.PointerEvent&&(wK="MSPointerDown",EK="MSPointerMove MSPointerUp MSPointerCancel");var SK=(function(n){kr(e,n);function e(){var r,i=e.prototype;return i.evEl=wK,i.evWin=EK,r=n.apply(this,arguments)||this,r.store=r.manager.session.pointerEvents=[],r}var t=e.prototype;return t.handler=function(i){var o=this.store,s=!1,a=i.type.toLowerCase().replace("ms",""),g=Bme[a],A=qme[i.pointerType]||i.pointerType,I=A===mA,C=io(o,i.pointerId,"pointerId");g&Xt&&(i.button===0||I)?C<0&&(o.push(i),C=o.length-1):g&(lt|gr)&&(s=!0),!(C<0)&&(o[C]=i,this.callback(this.manager,g,{pointers:o,changedPointers:[i],pointerType:A,srcEvent:i}),s&&o.splice(C,1))},e})(pa);function Ng(n){return Array.prototype.slice.call(n,0)}function vO(n,e,t){for(var r=[],i=[],o=0;o<n.length;){var s=e?n[o][e]:n[o];io(i,s)<0&&r.push(n[o]),i[o]=s,o++}return t&&(e?r=r.sort(function(a,g){return a[e]>g[e]}):r=r.sort()),r}var zme={touchstart:Xt,touchmove:Oo,touchend:lt,touchcancel:gr},jme="touchstart touchmove touchend touchcancel",mO=(function(n){kr(e,n);function e(){var r;return e.prototype.evTarget=jme,r=n.apply(this,arguments)||this,r.targetIds={},r}var t=e.prototype;return t.handler=function(i){var o=zme[i.type],s=Lme.call(this,i,o);s&&this.callback(this.manager,o,{pointers:s[0],changedPointers:s[1],pointerType:mA,srcEvent:i})},e})(pa);function Lme(n,e){var t=Ng(n.touches),r=this.targetIds;if(e&(Xt|Oo)&&t.length===1)return r[t[0].identifier]=!0,[t,t];var i,o,s=Ng(n.changedTouches),a=[],g=this.target;if(o=t.filter(function(A){return pO(A.target,g)}),e===Xt)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<s.length;)r[s[i].identifier]&&a.push(s[i]),e&(lt|gr)&&delete r[s[i].identifier],i++;if(a.length)return[vO(o.concat(a),"identifier",!0),a]}var Gme={mousedown:Xt,mousemove:Oo,mouseup:lt},Wme="mousedown",Vme="mousemove mouseup",yO=(function(n){kr(e,n);function e(){var r,i=e.prototype;return i.evEl=Wme,i.evWin=Vme,r=n.apply(this,arguments)||this,r.pressed=!1,r}var t=e.prototype;return t.handler=function(i){var o=Gme[i.type];o&Xt&&i.button===0&&(this.pressed=!0),o&Oo&&i.which!==1&&(o=lt),this.pressed&&(o&lt&&(this.pressed=!1),this.callback(this.manager,o,{pointers:[i],changedPointers:[i],pointerType:fO,srcEvent:i}))},e})(pa),Zme=2500,tB=25;function rB(n){var e=n.changedPointers,t=e[0];if(t.identifier===this.primaryTouch){var r={x:t.clientX,y:t.clientY},i=this.lastTouches;this.lastTouches.push(r);var o=function(){var a=i.indexOf(r);a>-1&&i.splice(a,1)};setTimeout(o,Zme)}}function Hme(n,e){n&Xt?(this.primaryTouch=e.changedPointers[0].identifier,rB.call(this,e)):n&(lt|gr)&&rB.call(this,e)}function Ume(n){for(var e=n.srcEvent.clientX,t=n.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),s=Math.abs(t-i.y);if(o<=tB&&s<=tB)return!0}return!1}var OK=(function(){var n=(function(e){kr(t,e);function t(i,o){var s;return s=e.call(this,i,o)||this,s.handler=function(a,g,A){var I=A.pointerType===mA,C=A.pointerType===fO;if(!(C&&A.sourceCapabilities&&A.sourceCapabilities.firesTouchEvents)){if(I)Hme.call(oI(oI(s)),g,A);else if(C&&Ume.call(oI(oI(s)),A))return;s.callback(a,g,A)}},s.touch=new mO(s.manager,s.handler),s.mouse=new yO(s.manager,s.handler),s.primaryTouch=null,s.lastTouches=[],s}var r=t.prototype;return r.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t})(pa);return n})();function Yme(n){var e,t=n.options.inputClass;return t?e=t:Ome?e=SK:Tme?e=mO:cK?e=OK:e=yO,new e(n,Fme)}function is(n,e,t){return Array.isArray(n)?(Oi(n,t[e],t),!0):!1}var OI=1,Rr=2,Bs=4,nn=8,Ti=nn,Mg=16,ni=32,Kme=1;function Xme(){return Kme++}function aI(n,e){var t=e.manager;return t?t.get(n):n}function iB(n){return n&Mg?"cancel":n&nn?"end":n&Bs?"move":n&Rr?"start":""}var EA=(function(){function n(t){t===void 0&&(t={}),this.options=Kr({enable:!0},t),this.id=Xme(),this.manager=null,this.state=OI,this.simultaneous={},this.requireFail=[]}var e=n.prototype;return e.set=function(r){return to(this.options,r),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(r){if(is(r,"recognizeWith",this))return this;var i=this.simultaneous;return r=aI(r,this),i[r.id]||(i[r.id]=r,r.recognizeWith(this)),this},e.dropRecognizeWith=function(r){return is(r,"dropRecognizeWith",this)?this:(r=aI(r,this),delete this.simultaneous[r.id],this)},e.requireFailure=function(r){if(is(r,"requireFailure",this))return this;var i=this.requireFail;return r=aI(r,this),io(i,r)===-1&&(i.push(r),r.requireFailure(this)),this},e.dropRequireFailure=function(r){if(is(r,"dropRequireFailure",this))return this;r=aI(r,this);var i=io(this.requireFail,r);return i>-1&&this.requireFail.splice(i,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(r){return!!this.simultaneous[r.id]},e.emit=function(r){var i=this,o=this.state;function s(a){i.manager.emit(a,r)}o<nn&&s(i.options.event+iB(o)),s(i.options.event),r.additionalEvent&&s(r.additionalEvent),o>=nn&&s(i.options.event+iB(o))},e.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=ni},e.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(ni|OI)))return!1;r++}return!0},e.recognize=function(r){var i=to({},r);if(!ol(this.options.enable,[this,i])){this.reset(),this.state=ni;return}this.state&(Ti|Mg|ni)&&(this.state=OI),this.state=this.process(i),this.state&(Rr|Bs|nn|Mg)&&this.tryEmit(i)},e.process=function(r){},e.getTouchAction=function(){},e.reset=function(){},n})(),$E=(function(n){kr(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,Kr({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},r))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var t=e.prototype;return t.getTouchAction=function(){return[RE]},t.process=function(i){var o=this,s=this.options,a=i.pointers.length===s.pointers,g=i.distance<s.threshold,A=i.deltaTime<s.time;if(this.reset(),i.eventType&Xt&&this.count===0)return this.failTimeout();if(g&&A&&a){if(i.eventType!==lt)return this.failTimeout();var I=this.pTime?i.timeStamp-this.pTime<s.interval:!0,C=!this.pCenter||XI(this.pCenter,i.center)<s.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!C||!I?this.count=1:this.count+=1,this._input=i;var l=this.count%s.taps;if(l===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){o.state=Ti,o.tryEmit()},s.interval),Rr):Ti}return ni},t.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=ni},this.options.interval),ni},t.reset=function(){clearTimeout(this._timer)},t.emit=function(){this.state===Ti&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e})(EA),qs=(function(n){kr(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Kr({pointers:1},r))||this}var t=e.prototype;return t.attrTest=function(i){var o=this.options.pointers;return o===0||i.pointers.length===o},t.process=function(i){var o=this.state,s=i.eventType,a=o&(Rr|Bs),g=this.attrTest(i);return a&&(s&gr||!g)?o|Mg:a||g?s&lt?o|nn:o&Rr?o|Bs:Rr:ni},e})(EA);function TK(n){return n===Fs?"down":n===wA?"up":n===yA?"left":n===bA?"right":""}var bO=(function(n){kr(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,Kr({event:"pan",threshold:10,pointers:1,direction:fK},r))||this,i.pX=null,i.pY=null,i}var t=e.prototype;return t.getTouchAction=function(){var i=this.options.direction,o=[];return i&Ai&&o.push($g),i&Hn&&o.push(xg),o},t.directionTest=function(i){var o=this.options,s=!0,a=i.distance,g=i.direction,A=i.deltaX,I=i.deltaY;return g&o.direction||(o.direction&Ai?(g=A===0?YI:A<0?yA:bA,s=A!==this.pX,a=Math.abs(i.deltaX)):(g=I===0?YI:I<0?wA:Fs,s=I!==this.pY,a=Math.abs(i.deltaY))),i.direction=g,s&&a>o.threshold&&g&o.direction},t.attrTest=function(i){return qs.prototype.attrTest.call(this,i)&&(this.state&Rr||!(this.state&Rr)&&this.directionTest(i))},t.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var o=TK(i.direction);o&&(i.additionalEvent=this.options.event+o),n.prototype.emit.call(this,i)},e})(qs),_K=(function(n){kr(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Kr({event:"swipe",threshold:10,velocity:.3,direction:Ai|Hn,pointers:1},r))||this}var t=e.prototype;return t.getTouchAction=function(){return bO.prototype.getTouchAction.call(this)},t.attrTest=function(i){var o=this.options.direction,s;return o&(Ai|Hn)?s=i.overallVelocity:o&Ai?s=i.overallVelocityX:o&Hn&&(s=i.overallVelocityY),n.prototype.attrTest.call(this,i)&&o&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&ro(s)>this.options.velocity&&i.eventType&lt},t.emit=function(i){var o=TK(i.offsetDirection);o&&this.manager.emit(this.options.event+o,i),this.manager.emit(this.options.event,i)},e})(qs),PK=(function(n){kr(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Kr({event:"pinch",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[Zn]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&Rr)},t.emit=function(i){if(i.scale!==1){var o=i.scale<1?"in":"out";i.additionalEvent=this.options.event+o}n.prototype.emit.call(this,i)},e})(qs),RK=(function(n){kr(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Kr({event:"rotate",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[Zn]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&Rr)},e})(qs),xK=(function(n){kr(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,Kr({event:"press",pointers:1,time:251,threshold:9},r))||this,i._timer=null,i._input=null,i}var t=e.prototype;return t.getTouchAction=function(){return[hK]},t.process=function(i){var o=this,s=this.options,a=i.pointers.length===s.pointers,g=i.distance<s.threshold,A=i.deltaTime>s.time;if(this._input=i,!g||!a||i.eventType&(lt|gr)&&!A)this.reset();else if(i.eventType&Xt)this.reset(),this._timer=setTimeout(function(){o.state=Ti,o.tryEmit()},s.time);else if(i.eventType&lt)return Ti;return ni},t.reset=function(){clearTimeout(this._timer)},t.emit=function(i){this.state===Ti&&(i&&i.eventType&lt?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=cO(),this.manager.emit(this.options.event,this._input)))},e})(EA),$K={domEvents:!1,touchAction:uK,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},nB=[[RK,{enable:!1}],[PK,{enable:!1},["rotate"]],[_K,{direction:Ai}],[bO,{direction:Ai},["swipe"]],[$E],[$E,{event:"doubletap",taps:2},["tap"]],[xK]],Qme=1,oB=2;function sB(n,e){var t=n.element;if(t.style){var r;Oi(n.options.cssProps,function(i,o){r=nl(t.style,o),e?(n.oldCssProps[r]=t.style[r],t.style[r]=i):t.style[r]=n.oldCssProps[r]||""}),e||(n.oldCssProps={})}}function Jme(n,e){var t=document.createEvent("Event");t.initEvent(n,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var aB=(function(){function n(t,r){var i=this;this.options=to({},$K,r||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=Yme(this),this.touchAction=new vK(this,this.options.touchAction),sB(this,!0),Oi(this.options.recognizers,function(o){var s=i.add(new o[0](o[1]));o[2]&&s.recognizeWith(o[2]),o[3]&&s.requireFailure(o[3])},this)}var e=n.prototype;return e.set=function(r){return to(this.options,r),r.touchAction&&this.touchAction.update(),r.inputTarget&&(this.input.destroy(),this.input.target=r.inputTarget,this.input.init()),this},e.stop=function(r){this.session.stopped=r?oB:Qme},e.recognize=function(r){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(r);var o,s=this.recognizers,a=i.curRecognizer;(!a||a&&a.state&Ti)&&(i.curRecognizer=null,a=null);for(var g=0;g<s.length;)o=s[g],i.stopped!==oB&&(!a||o===a||o.canRecognizeWith(a))?o.recognize(r):o.reset(),!a&&o.state&(Rr|Bs|nn)&&(i.curRecognizer=o,a=o),g++}},e.get=function(r){if(r instanceof EA)return r;for(var i=this.recognizers,o=0;o<i.length;o++)if(i[o].options.event===r)return i[o];return null},e.add=function(r){if(is(r,"add",this))return this;var i=this.get(r.options.event);return i&&this.remove(i),this.recognizers.push(r),r.manager=this,this.touchAction.update(),r},e.remove=function(r){if(is(r,"remove",this))return this;var i=this.get(r);if(r){var o=this.recognizers,s=io(o,i);s!==-1&&(o.splice(s,1),this.touchAction.update())}return this},e.on=function(r,i){if(r===void 0||i===void 0)return this;var o=this.handlers;return Oi(Dg(r),function(s){o[s]=o[s]||[],o[s].push(i)}),this},e.off=function(r,i){if(r===void 0)return this;var o=this.handlers;return Oi(Dg(r),function(s){i?o[s]&&o[s].splice(io(o[s],i),1):delete o[s]}),this},e.emit=function(r,i){this.options.domEvents&&Jme(r,i);var o=this.handlers[r]&&this.handlers[r].slice();if(!(!o||!o.length)){i.type=r,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var s=0;s<o.length;)o[s](i),s++}},e.destroy=function(){this.element&&sB(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},n})(),eye={touchstart:Xt,touchmove:Oo,touchend:lt,touchcancel:gr},tye="touchstart",rye="touchstart touchmove touchend touchcancel",iye=(function(n){kr(e,n);function e(){var r,i=e.prototype;return i.evTarget=tye,i.evWin=rye,r=n.apply(this,arguments)||this,r.started=!1,r}var t=e.prototype;return t.handler=function(i){var o=eye[i.type];if(o===Xt&&(this.started=!0),!!this.started){var s=nye.call(this,i,o);o&(lt|gr)&&s[0].length-s[1].length===0&&(this.started=!1),this.callback(this.manager,o,{pointers:s[0],changedPointers:s[1],pointerType:mA,srcEvent:i})}},e})(pa);function nye(n,e){var t=Ng(n.touches),r=Ng(n.changedTouches);return e&(lt|gr)&&(t=vO(t.concat(r),"identifier",!0)),[t,r]}function DK(n,e,t){var r="DEPRECATED METHOD: "+e+`
`+t+` AT 
`;return function(){var i=new Error("get-stack-trace"),o=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=window.console&&(window.console.warn||window.console.log);return s&&s.call(window.console,r,o),n.apply(this,arguments)}}var NK=DK(function(n,e,t){for(var r=Object.keys(e),i=0;i<r.length;)(!t||t&&n[r[i]]===void 0)&&(n[r[i]]=e[r[i]]),i++;return n},"extend","Use `assign`."),oye=DK(function(n,e){return NK(n,e,!0)},"merge","Use `assign`.");function sye(n,e,t){var r=e.prototype,i;i=n.prototype=Object.create(r),i.constructor=n,i._super=r,t&&to(i,t)}function gB(n,e){return function(){return n.apply(e,arguments)}}var aye=(function(){var n=function(t,r){return r===void 0&&(r={}),new aB(t,Kr({recognizers:nB.concat()},r))};return n.VERSION="2.0.17-rc",n.DIRECTION_ALL=fK,n.DIRECTION_DOWN=Fs,n.DIRECTION_LEFT=yA,n.DIRECTION_RIGHT=bA,n.DIRECTION_UP=wA,n.DIRECTION_HORIZONTAL=Ai,n.DIRECTION_VERTICAL=Hn,n.DIRECTION_NONE=YI,n.DIRECTION_DOWN=Fs,n.INPUT_START=Xt,n.INPUT_MOVE=Oo,n.INPUT_END=lt,n.INPUT_CANCEL=gr,n.STATE_POSSIBLE=OI,n.STATE_BEGAN=Rr,n.STATE_CHANGED=Bs,n.STATE_ENDED=nn,n.STATE_RECOGNIZED=Ti,n.STATE_CANCELLED=Mg,n.STATE_FAILED=ni,n.Manager=aB,n.Input=pa,n.TouchAction=vK,n.TouchInput=mO,n.MouseInput=yO,n.PointerEventInput=SK,n.TouchMouseInput=OK,n.SingleTouchInput=iye,n.Recognizer=EA,n.AttrRecognizer=qs,n.Tap=$E,n.Pan=bO,n.Swipe=_K,n.Pinch=PK,n.Rotate=RK,n.Press=xK,n.on=Ig,n.off=Cg,n.each=Oi,n.merge=oye,n.extend=NK,n.bindFn=gB,n.assign=to,n.inherit=sye,n.bindFn=gB,n.prefixed=nl,n.toArray=Ng,n.inArray=io,n.uniqueArray=vO,n.splitStr=Dg,n.boolOrFn=ol,n.hasParent=pO,n.addEventListeners=Ig,n.removeEventListeners=Cg,n.defaults=to({},$K,{preset:nB}),n})(),gye=aye;function MK(n,e){var t=typeof tl<"u"&&dO(n)||n["@@iterator"];if(!t){if(fr(n)||(t=Aye(n))||e){t&&(n=t);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(A){throw A},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){t=t.call(n)},n:function(){var A=t.next();return o=A.done,A},e:function(A){s=!0,a=A},f:function(){try{!o&&t.return!=null&&t.return()}finally{if(s)throw a}}}}function Aye(n,e){var t;if(n){if(typeof n=="string")return AB(n,e);var r=il(t=Object.prototype.toString.call(n)).call(t,8,-1);if(r==="Object"&&n.constructor&&(r=n.constructor.name),r==="Map"||r==="Set")return lO(n);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return AB(n,e)}}function AB(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}var kK=tl("DELETE");function Iye(n){for(var e,t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return FK.apply(void 0,rl(e=[{},n]).call(e,r))}function FK(){var n=QI.apply(void 0,arguments);return qK(n),n}function QI(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];if(e.length<2)return e[0];if(e.length>2){var r;return QI.apply(void 0,rl(r=[FK(e[0],e[1])]).call(r,sr(il(e).call(e,2))))}var i=e[0],o=e[1];if(i instanceof Date&&o instanceof Date)return i.setTime(o.getTime()),i;var s=MK(Ipe(o)),a;try{for(s.s();!(a=s.n()).done;){var g=a.value;Object.prototype.propertyIsEnumerable.call(o,g)&&(o[g]===kK?delete i[g]:i[g]!==null&&o[g]!==null&&typeof i[g]=="object"&&typeof o[g]=="object"&&!fr(i[g])&&!fr(o[g])?i[g]=QI(i[g],o[g]):i[g]=BK(o[g]))}}catch(A){s.e(A)}finally{s.f()}return i}function BK(n){return fr(n)?Vr(n).call(n,function(e){return BK(e)}):typeof n=="object"&&n!==null?n instanceof Date?new Date(n.getTime()):QI({},n):n}function qK(n){for(var e=0,t=hO(n);e<t.length;e++){var r=t[e];n[r]===kK?delete n[r]:typeof n[r]=="object"&&n[r]!==null&&qK(n[r])}}function Cye(){var n=function(){};return{on:n,off:n,destroy:n,emit:n,get(){return{set:n}}}}var lye=typeof window<"u"?window.Hammer||gye:function(){return Cye()};function vi(n){var e=this,t;this._cleanupQueue=[],this.active=!1,this._dom={container:n,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){e._dom.overlay.parentNode.removeChild(e._dom.overlay)});var r=lye(this._dom.overlay);r.on("tap",MY(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(function(){r.destroy()});var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];eo(i).call(i,function(o){r.on(o,function(s){s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(o){dye(o.target,n)||e.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",e._onClick)})),this._escListener=function(o){("key"in o?o.key==="Escape":o.keyCode===27)&&e.deactivate()}}yme(vi.prototype);vi.current=null;vi.prototype.destroy=function(){var n,e;this.deactivate();var t=MK(Hpe(n=iK(e=this._cleanupQueue).call(e,0)).call(n)),r;try{for(t.s();!(r=t.n()).done;){var i=r.value;i()}}catch(o){t.e(o)}finally{t.f()}};vi.prototype.activate=function(){vi.current&&vi.current.deactivate(),vi.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};vi.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};vi.prototype._onTapOverlay=function(n){this.activate(),n.srcEvent.stopPropagation()};function dye(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}var uye=zC,hye=Ca,cye=TypeError,zK=function(n){if(uye(n))return n;throw new cye(hye(n)+" is not a constructor")},fye=se,pye=Jt,mv=aa,vye=DY,IB=zK,mye=yr,CB=Bt,yye=Eo,jK=Se,wO=pye("Reflect","construct"),bye=Object.prototype,wye=[].push,LK=jK(function(){function n(){}return!(wO(function(){},[],n)instanceof n)}),GK=!jK(function(){wO(function(){})}),lB=LK||GK;fye({target:"Reflect",stat:!0,forced:lB,sham:lB},{construct:function(e,t){IB(e),mye(t);var r=arguments.length<3?e:IB(arguments[2]);if(GK&&!LK)return wO(e,t,r);if(e===r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var i=[null];return mv(wye,i,t),new(mv(vye,e,i))}var o=r.prototype,s=yye(CB(o)?o:bye),a=mv(e,s,t);return CB(a)?a:s}});var Eye=Ze,Sye=Eye.Reflect.construct,Oye=Sye,Tye=Oye,_ye=Tye,TI=Ce(_ye),Pye=Ze,Rye=Pye.Object.getOwnPropertySymbols,xye=Rye,$ye=xye,Dye=$ye,dB=Ce(Dye),WK={exports:{}},Nye=se,Mye=Se,kye=di,VK=yo.f,ZK=Tt,Fye=!ZK||Mye(function(){VK(1)});Nye({target:"Object",stat:!0,forced:Fye,sham:!ZK},{getOwnPropertyDescriptor:function(e,t){return VK(kye(e),t)}});var Bye=Ze,HK=Bye.Object,qye=WK.exports=function(e,t){return HK.getOwnPropertyDescriptor(e,t)};HK.getOwnPropertyDescriptor.sham&&(qye.sham=!0);var zye=WK.exports,jye=zye,Lye=jye,Gye=Lye,UK=Ce(Gye),Wye=se,Vye=Tt,Zye=uO,Hye=di,Uye=yo,Yye=da;Wye({target:"Object",stat:!0,sham:!Vye},{getOwnPropertyDescriptors:function(e){for(var t=Hye(e),r=Uye.f,i=Zye(t),o={},s=0,a,g;i.length>s;)g=r(t,a=i[s++]),g!==void 0&&Yye(o,a,g);return o}});var Kye=Ze,Xye=Kye.Object.getOwnPropertyDescriptors,Qye=Xye,Jye=Qye,ebe=Jye,uB=Ce(ebe),YK={exports:{}},tbe=se,rbe=Tt,hB=LC.f;tbe({target:"Object",stat:!0,forced:Object.defineProperties!==hB,sham:!rbe},{defineProperties:hB});var ibe=Ze,KK=ibe.Object,nbe=YK.exports=function(e,t){return KK.defineProperties(e,t)};KK.defineProperties.sham&&(nbe.sham=!0);var obe=YK.exports,sbe=obe,abe=sbe,gbe=abe,Abe=Ce(gbe),Ibe=TU,Cbe=Ce(Ibe);function XK(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}var lbe=oK,dbe=lbe,ube=dbe,hbe=ube,QK=hbe,cbe=Ce(QK),fbe=se,pbe=pY;fbe({target:"Object",stat:!0},{setPrototypeOf:pbe});var vbe=Ze,mbe=vbe.Object.setPrototypeOf,ybe=mbe,bbe=ybe,wbe=bbe,Ebe=wbe,Sbe=Ebe,Obe=Sbe,JK=Obe,DE=Ce(JK),Tbe=NY,_be=Tbe,Pbe=_be,Rbe=Pbe,xbe=Rbe,e8=Ce(xbe);function NE(n,e){var t;return NE=DE?e8(t=DE).call(t):function(i,o){return i.__proto__=o,i},NE(n,e)}function $be(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=cbe(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),FC(n,"prototype",{writable:!1}),e&&NE(n,e)}function Dbe(n,e){if(e&&(ks(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return XK(n)}var Nbe=zve,Mbe=Nbe,kbe=Mbe,Fbe=kbe,t8=Fbe,cB=Ce(t8);function JI(n){var e;return JI=DE?e8(e=cB).call(e):function(r){return r.__proto__||cB(r)},JI(n)}var r8={exports:{}},i8={exports:{}};(function(n){var e=AO,t=PY;function r(i){"@babel/helpers - typeof";return n.exports=r=typeof e=="function"&&typeof t=="symbol"?function(o){return typeof o}:function(o){return o&&typeof e=="function"&&o.constructor===e&&o!==e.prototype?"symbol":typeof o},n.exports.__esModule=!0,n.exports.default=n.exports,r(i)}n.exports=r,n.exports.__esModule=!0,n.exports.default=n.exports})(i8);var Bbe=i8.exports,qbe=eK,zbe=qbe,jbe=zbe,Lbe=jbe,Gbe=Lbe,fB=ft,Wbe=uO,Vbe=yo,Zbe=dr,Hbe=function(n,e,t){for(var r=Wbe(e),i=Zbe.f,o=Vbe.f,s=0;s<r.length;s++){var a=r[s];!fB(n,a)&&!(t&&fB(t,a))&&i(n,a,o(e,a))}},Ube=Bt,Ybe=Fi,Kbe=function(n,e){Ube(e)&&"cause"in e&&Ybe(n,"cause",e.cause)},Xbe=Le,n8=Error,Qbe=Xbe("".replace),Jbe=(function(n){return String(new n8(n).stack)})("zxcasd"),o8=/\n\s*at [^:]*:[^\n]*/,e0e=o8.test(Jbe),t0e=function(n,e){if(e0e&&typeof n=="string"&&!n8.prepareStackTrace)for(;e--;)n=Qbe(n,o8,"");return n},r0e=Se,i0e=bo,n0e=!r0e(function(){var n=new Error("a");return"stack"in n?(Object.defineProperty(n,"stack",i0e(1,7)),n.stack!==7):!0}),o0e=Fi,s0e=t0e,a0e=n0e,pB=Error.captureStackTrace,g0e=function(n,e,t,r){a0e&&(pB?pB(n,e):o0e(n,"stack",s0e(t,r)))},A0e=yn,I0e=_t,C0e=yr,l0e=Ca,d0e=BY,u0e=br,vB=ct,h0e=CO,c0e=el,mB=FY,f0e=TypeError,_I=function(n,e){this.stopped=n,this.result=e},yB=_I.prototype,To=function(n,e,t){var r=t&&t.that,i=!!(t&&t.AS_ENTRIES),o=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),a=!!(t&&t.INTERRUPTED),g=A0e(e,r),A,I,C,l,d,u,h,p=function(c){return A&&mB(A,"normal",c),new _I(!0,c)},f=function(c){return i?(C0e(c),a?g(c[0],c[1],p):g(c[0],c[1])):a?g(c,p):g(c)};if(o)A=n.iterator;else if(s)A=n;else{if(I=c0e(n),!I)throw new f0e(l0e(n)+" is not iterable");if(d0e(I)){for(C=0,l=u0e(n);l>C;C++)if(d=f(n[C]),d&&vB(yB,d))return d;return new _I(!1)}A=h0e(n,I)}for(u=o?n.next:A.next;!(h=I0e(u,A)).done;){try{d=f(h.value)}catch(c){mB(A,"throw",c)}if(typeof d=="object"&&d&&vB(yB,d))return d}return new _I(!1)},p0e=wo,v0e=function(n,e){return n===void 0?arguments.length<2?"":e:p0e(n)},m0e=se,y0e=ct,b0e=XC,eC=pY,w0e=Hbe,s8=Eo,yv=Fi,bv=bo,E0e=Kbe,S0e=g0e,O0e=To,T0e=v0e,_0e=Xe,P0e=_0e("toStringTag"),tC=Error,R0e=[].push,zs=function(e,t){var r=y0e(wv,this),i;eC?i=eC(new tC,r?b0e(this):wv):(i=r?this:s8(wv),yv(i,P0e,"Error")),t!==void 0&&yv(i,"message",T0e(t)),S0e(i,zs,i.stack,1),arguments.length>2&&E0e(i,arguments[2]);var o=[];return O0e(e,R0e,{that:o}),yv(i,"errors",o),i};eC?eC(zs,tC):w0e(zs,tC,{name:!0});var wv=zs.prototype=s8(tC.prototype,{constructor:bv(1,zs),message:bv(1,""),name:bv(1,"AggregateError")});m0e({global:!0},{AggregateError:zs});var x0e=Jt,$0e=tO,D0e=Xe,N0e=Tt,bB=D0e("species"),a8=function(n){var e=x0e(n);N0e&&e&&!e[bB]&&$0e(e,bB,{configurable:!0,get:function(){return this}})},M0e=ct,k0e=TypeError,EO=function(n,e){if(M0e(e,n))return n;throw new k0e("Incorrect invocation")},wB=yr,F0e=zK,B0e=ga,q0e=Xe,z0e=q0e("species"),g8=function(n,e){var t=wB(n).constructor,r;return t===void 0||B0e(r=wB(t)[z0e])?e:F0e(r)},j0e=mn,A8=/(?:ipad|iphone|ipod).*applewebkit/i.test(j0e),vr=Ve,L0e=aa,G0e=yn,EB=tt,W0e=ft,I8=Se,SB=FU,V0e=fA,OB=KS,Z0e=sK,H0e=A8,U0e=vA,ME=vr.setImmediate,TB=vr.clearImmediate,Y0e=vr.process,Ev=vr.Dispatch,K0e=vr.Function,_B=vr.MessageChannel,X0e=vr.String,Sv=0,lg={},PB="onreadystatechange",kg,$n,Ov,Tv;I8(function(){kg=vr.location});var SO=function(n){if(W0e(lg,n)){var e=lg[n];delete lg[n],e()}},_v=function(n){return function(){SO(n)}},RB=function(n){SO(n.data)},xB=function(n){vr.postMessage(X0e(n),kg.protocol+"//"+kg.host)};(!ME||!TB)&&(ME=function(e){Z0e(arguments.length,1);var t=EB(e)?e:K0e(e),r=V0e(arguments,1);return lg[++Sv]=function(){L0e(t,void 0,r)},$n(Sv),Sv},TB=function(e){delete lg[e]},U0e?$n=function(n){Y0e.nextTick(_v(n))}:Ev&&Ev.now?$n=function(n){Ev.now(_v(n))}:_B&&!H0e?(Ov=new _B,Tv=Ov.port2,Ov.port1.onmessage=RB,$n=G0e(Tv.postMessage,Tv)):vr.addEventListener&&EB(vr.postMessage)&&!vr.importScripts&&kg&&kg.protocol!=="file:"&&!I8(xB)?($n=xB,vr.addEventListener("message",RB,!1)):PB in OB("script")?$n=function(n){SB.appendChild(OB("script"))[PB]=function(){SB.removeChild(this),SO(n)}}:$n=function(n){setTimeout(_v(n),0)});var C8={set:ME},l8=function(){this.head=null,this.tail=null};l8.prototype={add:function(n){var e={item:n,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var n=this.head;if(n){var e=this.head=n.next;return e===null&&(this.tail=null),n.item}}};var d8=l8,Q0e=mn,J0e=/ipad|iphone|ipod/i.test(Q0e)&&typeof Pebble<"u",e1e=mn,t1e=/web0s(?!.*chrome)/i.test(e1e),no=Ve,$B=yn,r1e=yo.f,Pv=C8.set,i1e=d8,n1e=A8,o1e=J0e,s1e=t1e,Rv=vA,DB=no.MutationObserver||no.WebKitMutationObserver,NB=no.document,MB=no.process,gI=no.Promise,kB=r1e(no,"queueMicrotask"),kE=kB&&kB.value,Wo,xv,$v,AI,FB;if(!kE){var II=new i1e,CI=function(){var n,e;for(Rv&&(n=MB.domain)&&n.exit();e=II.get();)try{e()}catch(t){throw II.head&&Wo(),t}n&&n.enter()};!n1e&&!Rv&&!s1e&&DB&&NB?(xv=!0,$v=NB.createTextNode(""),new DB(CI).observe($v,{characterData:!0}),Wo=function(){$v.data=xv=!xv}):!o1e&&gI&&gI.resolve?(AI=gI.resolve(void 0),AI.constructor=gI,FB=$B(AI.then,AI),Wo=function(){FB(CI)}):Rv?Wo=function(){MB.nextTick(CI)}:(Pv=$B(Pv,no),Wo=function(){Pv(CI)}),kE=function(n){II.head||Wo(),II.add(n)}}var a1e=kE,g1e=function(n,e){try{arguments.length===1?console.error(n):console.error(n,e)}catch{}},va=function(n){try{return{error:!1,value:n()}}catch(e){return{error:!0,value:e}}},A1e=Ve,ma=A1e.Promise,u8=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",I1e=u8,C1e=vA,l1e=!I1e&&!C1e&&typeof window=="object"&&typeof document=="object",d1e=Ve,dg=ma,u1e=tt,h1e=EU,c1e=RU,f1e=Xe,p1e=l1e,v1e=u8,Dv=Aa,BB=dg&&dg.prototype,m1e=f1e("species"),qB=!1,h8=u1e(d1e.PromiseRejectionEvent),y1e=h1e("Promise",function(){var n=c1e(dg),e=n!==String(dg);if(!e&&Dv===66||!(BB.catch&&BB.finally))return!0;if(!Dv||Dv<51||!/native code/.test(n)){var t=new dg(function(o){o(1)}),r=function(o){o(function(){},function(){})},i=t.constructor={};if(i[m1e]=r,qB=t.then(function(){})instanceof r,!qB)return!0}return!e&&(p1e||v1e)&&!h8}),SA={CONSTRUCTOR:y1e,REJECTION_EVENT:h8},ui={},zB=Cr,b1e=TypeError,w1e=function(n){var e,t;this.promise=new n(function(r,i){if(e!==void 0||t!==void 0)throw new b1e("Bad Promise constructor");e=r,t=i}),this.resolve=zB(e),this.reject=zB(t)};ui.f=function(n){return new w1e(n)};var E1e=se,rC=vA,ln=Ve,OA=_t,S1e=ua,O1e=So,T1e=a8,_1e=Cr,FE=tt,P1e=Bt,R1e=EO,x1e=g8,c8=C8.set,OO=a1e,$1e=g1e,D1e=va,N1e=d8,f8=ha,BE=ma,p8=SA,v8=ui,sl="Promise",m8=p8.CONSTRUCTOR,M1e=p8.REJECTION_EVENT,Nv=f8.getterFor(sl),k1e=f8.set,F1e=BE&&BE.prototype,ns=BE,Mv=F1e,y8=ln.TypeError,qE=ln.document,TO=ln.process,zE=v8.f,B1e=zE,q1e=!!(qE&&qE.createEvent&&ln.dispatchEvent),b8="unhandledrejection",z1e="rejectionhandled",jB=0,w8=1,j1e=2,_O=1,E8=2,lI,LB,L1e,S8=function(n){var e;return P1e(n)&&FE(e=n.then)?e:!1},O8=function(n,e){var t=e.value,r=e.state===w8,i=r?n.ok:n.fail,o=n.resolve,s=n.reject,a=n.domain,g,A,I;try{i?(r||(e.rejection===E8&&W1e(e),e.rejection=_O),i===!0?g=t:(a&&a.enter(),g=i(t),a&&(a.exit(),I=!0)),g===n.promise?s(new y8("Promise-chain cycle")):(A=S8(g))?OA(A,g,o,s):o(g)):s(t)}catch(C){a&&!I&&a.exit(),s(C)}},T8=function(n,e){n.notified||(n.notified=!0,OO(function(){for(var t=n.reactions,r;r=t.get();)O8(r,n);n.notified=!1,e&&!n.rejection&&G1e(n)}))},_8=function(n,e,t){var r,i;q1e?(r=qE.createEvent("Event"),r.promise=e,r.reason=t,r.initEvent(n,!1,!0),ln.dispatchEvent(r)):r={promise:e,reason:t},!M1e&&(i=ln["on"+n])?i(r):n===b8&&$1e("Unhandled promise rejection",t)},G1e=function(n){OA(c8,ln,function(){var e=n.facade,t=n.value,r=GB(n),i;if(r&&(i=D1e(function(){rC?TO.emit("unhandledRejection",t,e):_8(b8,e,t)}),n.rejection=rC||GB(n)?E8:_O,i.error))throw i.value})},GB=function(n){return n.rejection!==_O&&!n.parent},W1e=function(n){OA(c8,ln,function(){var e=n.facade;rC?TO.emit("rejectionHandled",e):_8(z1e,e,n.value)})},os=function(n,e,t){return function(r){n(e,r,t)}},ps=function(n,e,t){n.done||(n.done=!0,t&&(n=t),n.value=e,n.state=j1e,T8(n,!0))},jE=function(n,e,t){if(!n.done){n.done=!0,t&&(n=t);try{if(n.facade===e)throw new y8("Promise can't be resolved itself");var r=S8(e);r?OO(function(){var i={done:!1};try{OA(r,e,os(jE,i,n),os(ps,i,n))}catch(o){ps(i,o,n)}}):(n.value=e,n.state=w8,T8(n,!1))}catch(i){ps({done:!1},i,n)}}};m8&&(ns=function(e){R1e(this,Mv),_1e(e),OA(lI,this);var t=Nv(this);try{e(os(jE,t),os(ps,t))}catch(r){ps(t,r)}},Mv=ns.prototype,lI=function(e){k1e(this,{type:sl,done:!1,notified:!1,parent:!1,reactions:new N1e,rejection:!1,state:jB,value:void 0})},lI.prototype=S1e(Mv,"then",function(e,t){var r=Nv(this),i=zE(x1e(this,ns));return r.parent=!0,i.ok=FE(e)?e:!0,i.fail=FE(t)&&t,i.domain=rC?TO.domain:void 0,r.state===jB?r.reactions.add(i):OO(function(){O8(i,r)}),i.promise}),LB=function(){var n=new lI,e=Nv(n);this.promise=n,this.resolve=os(jE,e),this.reject=os(ps,e)},v8.f=zE=function(n){return n===ns||n===L1e?new LB(n):B1e(n)});E1e({global:!0,wrap:!0,forced:m8},{Promise:ns});O1e(ns,sl,!1,!0);T1e(sl);var V1e=ma,Z1e=jY,H1e=SA.CONSTRUCTOR,al=H1e||!Z1e(function(n){V1e.all(n).then(void 0,function(){})}),U1e=se,Y1e=_t,K1e=Cr,X1e=ui,Q1e=va,J1e=To,ewe=al;U1e({target:"Promise",stat:!0,forced:ewe},{all:function(e){var t=this,r=X1e.f(t),i=r.resolve,o=r.reject,s=Q1e(function(){var a=K1e(t.resolve),g=[],A=0,I=1;J1e(e,function(C){var l=A++,d=!1;I++,Y1e(a,t,C).then(function(u){d||(d=!0,g[l]=u,--I||i(g))},o)}),--I||i(g)});return s.error&&o(s.value),r.promise}});var twe=se,rwe=SA.CONSTRUCTOR,WB=ma;WB&&WB.prototype;twe({target:"Promise",proto:!0,forced:rwe,real:!0},{catch:function(n){return this.then(void 0,n)}});var iwe=se,nwe=_t,owe=Cr,swe=ui,awe=va,gwe=To,Awe=al;iwe({target:"Promise",stat:!0,forced:Awe},{race:function(e){var t=this,r=swe.f(t),i=r.reject,o=awe(function(){var s=owe(t.resolve);gwe(e,function(a){nwe(s,t,a).then(r.resolve,i)})});return o.error&&i(o.value),r.promise}});var Iwe=se,Cwe=_t,lwe=ui,dwe=SA.CONSTRUCTOR;Iwe({target:"Promise",stat:!0,forced:dwe},{reject:function(e){var t=lwe.f(this);return Cwe(t.reject,void 0,e),t.promise}});var uwe=yr,hwe=Bt,cwe=ui,P8=function(n,e){if(uwe(n),hwe(e)&&e.constructor===n)return e;var t=cwe.f(n),r=t.resolve;return r(e),t.promise},fwe=se,pwe=Jt,vwe=Ose,mwe=ma,ywe=SA.CONSTRUCTOR,bwe=P8,wwe=pwe("Promise"),Ewe=!ywe;fwe({target:"Promise",stat:!0,forced:vwe},{resolve:function(e){return bwe(Ewe&&this===wwe?mwe:this,e)}});var Swe=se,Owe=_t,Twe=Cr,_we=ui,Pwe=va,Rwe=To,xwe=al;Swe({target:"Promise",stat:!0,forced:xwe},{allSettled:function(e){var t=this,r=_we.f(t),i=r.resolve,o=r.reject,s=Pwe(function(){var a=Twe(t.resolve),g=[],A=0,I=1;Rwe(e,function(C){var l=A++,d=!1;I++,Owe(a,t,C).then(function(u){d||(d=!0,g[l]={status:"fulfilled",value:u},--I||i(g))},function(u){d||(d=!0,g[l]={status:"rejected",reason:u},--I||i(g))})}),--I||i(g)});return s.error&&o(s.value),r.promise}});var $we=se,Dwe=_t,Nwe=Cr,Mwe=Jt,kwe=ui,Fwe=va,Bwe=To,qwe=al,VB="No one promise resolved";$we({target:"Promise",stat:!0,forced:qwe},{any:function(e){var t=this,r=Mwe("AggregateError"),i=kwe.f(t),o=i.resolve,s=i.reject,a=Fwe(function(){var g=Nwe(t.resolve),A=[],I=0,C=1,l=!1;Bwe(e,function(d){var u=I++,h=!1;C++,Dwe(g,t,d).then(function(p){h||l||(l=!0,o(p))},function(p){h||l||(h=!0,A[u]=p,--C||s(new r(A,VB)))})}),--C||s(new r(A,VB))});return a.error&&s(a.value),i.promise}});var zwe=se,LE=ma,jwe=Se,Lwe=Jt,Gwe=tt,Wwe=g8,ZB=P8,Vwe=LE&&LE.prototype,Zwe=!!LE&&jwe(function(){Vwe.finally.call({then:function(){}},function(){})});zwe({target:"Promise",proto:!0,real:!0,forced:Zwe},{finally:function(n){var e=Wwe(this,Lwe("Promise")),t=Gwe(n);return this.then(t?function(r){return ZB(e,n()).then(function(){return r})}:n,t?function(r){return ZB(e,n()).then(function(){throw r})}:n)}});var Hwe=Ze,Uwe=Hwe.Promise,Ywe=Uwe,Kwe=Ywe,Xwe=se,Qwe=ui;Xwe({target:"Promise",stat:!0},{withResolvers:function(){var e=Qwe.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}});var Jwe=Kwe,eEe=Jwe,tEe=se,rEe=ui,iEe=va;tEe({target:"Promise",stat:!0,forced:!0},{try:function(n){var e=rEe.f(this),t=iEe(n);return(t.error?e.reject:e.resolve)(t.value),e.promise}});var nEe=eEe,oEe=nEe,sEe=oEe,aEe=tK,gEe=aEe,AEe=gEe,IEe=AEe,CEe=IEe;(function(n){var e=Bbe.default,t=_U,r=AO,i=QK,o=t8,s=Gbe,a=UY,g=JK,A=sEe,I=CEe,C=KY;function l(){n.exports=l=function(){return u},n.exports.__esModule=!0,n.exports.default=n.exports;var d,u={},h=Object.prototype,p=h.hasOwnProperty,f=t||function(W,N,M){W[N]=M.value},c=typeof r=="function"?r:{},m=c.iterator||"@@iterator",v=c.asyncIterator||"@@asyncIterator",y=c.toStringTag||"@@toStringTag";function w(W,N,M){return t(W,N,{value:M,enumerable:!0,configurable:!0,writable:!0}),W[N]}try{w({},"")}catch{w=function(M,Y,re){return M[Y]=re}}function S(W,N,M,Y){var re=N&&N.prototype instanceof R?N:R,oe=i(re.prototype),qe=new mt(Y||[]);return f(oe,"_invoke",{value:xe(W,M,qe)}),oe}function b(W,N,M){try{return{type:"normal",arg:W.call(N,M)}}catch(Y){return{type:"throw",arg:Y}}}u.wrap=S;var E="suspendedStart",O="suspendedYield",P="executing",_="completed",T={};function R(){}function D(){}function G(){}var B={};w(B,m,function(){return this});var Q=o,te=Q&&Q(Q(Lt([])));te&&te!==h&&p.call(te,m)&&(B=te);var le=G.prototype=R.prototype=i(B);function U(W){var N;s(N=["next","throw","return"]).call(N,function(M){w(W,M,function(Y){return this._invoke(M,Y)})})}function fe(W,N){function M(re,oe,qe,it){var Ee=b(W[re],W,oe);if(Ee.type!=="throw"){var yt=Ee.arg,Er=yt.value;return Er&&e(Er)=="object"&&p.call(Er,"__await")?N.resolve(Er.__await).then(function(Gt){M("next",Gt,qe,it)},function(Gt){M("throw",Gt,qe,it)}):N.resolve(Er).then(function(Gt){yt.value=Gt,qe(yt)},function(Gt){return M("throw",Gt,qe,it)})}it(Ee.arg)}var Y;f(this,"_invoke",{value:function(oe,qe){function it(){return new N(function(Ee,yt){M(oe,qe,Ee,yt)})}return Y=Y?Y.then(it,it):it()}})}function xe(W,N,M){var Y=E;return function(re,oe){if(Y===P)throw new Error("Generator is already running");if(Y===_){if(re==="throw")throw oe;return{value:d,done:!0}}for(M.method=re,M.arg=oe;;){var qe=M.delegate;if(qe){var it=$e(qe,M);if(it){if(it===T)continue;return it}}if(M.method==="next")M.sent=M._sent=M.arg;else if(M.method==="throw"){if(Y===E)throw Y=_,M.arg;M.dispatchException(M.arg)}else M.method==="return"&&M.abrupt("return",M.arg);Y=P;var Ee=b(W,N,M);if(Ee.type==="normal"){if(Y=M.done?_:O,Ee.arg===T)continue;return{value:Ee.arg,done:M.done}}Ee.type==="throw"&&(Y=_,M.method="throw",M.arg=Ee.arg)}}}function $e(W,N){var M=N.method,Y=W.iterator[M];if(Y===d)return N.delegate=null,M==="throw"&&W.iterator.return&&(N.method="return",N.arg=d,$e(W,N),N.method==="throw")||M!=="return"&&(N.method="throw",N.arg=new TypeError("The iterator does not provide a '"+M+"' method")),T;var re=b(Y,W.iterator,N.arg);if(re.type==="throw")return N.method="throw",N.arg=re.arg,N.delegate=null,T;var oe=re.arg;return oe?oe.done?(N[W.resultName]=oe.value,N.next=W.nextLoc,N.method!=="return"&&(N.method="next",N.arg=d),N.delegate=null,T):oe:(N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,T)}function hr(W){var N,M={tryLoc:W[0]};1 in W&&(M.catchLoc=W[1]),2 in W&&(M.finallyLoc=W[2],M.afterLoc=W[3]),a(N=this.tryEntries).call(N,M)}function Oe(W){var N=W.completion||{};N.type="normal",delete N.arg,W.completion=N}function mt(W){this.tryEntries=[{tryLoc:"root"}],s(W).call(W,hr,this),this.reset(!0)}function Lt(W){if(W||W===""){var N=W[m];if(N)return N.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var M=-1,Y=function re(){for(;++M<W.length;)if(p.call(W,M))return re.value=W[M],re.done=!1,re;return re.value=d,re.done=!0,re};return Y.next=Y}}throw new TypeError(e(W)+" is not iterable")}return D.prototype=G,f(le,"constructor",{value:G,configurable:!0}),f(G,"constructor",{value:D,configurable:!0}),D.displayName=w(G,y,"GeneratorFunction"),u.isGeneratorFunction=function(W){var N=typeof W=="function"&&W.constructor;return!!N&&(N===D||(N.displayName||N.name)==="GeneratorFunction")},u.mark=function(W){return g?g(W,G):(W.__proto__=G,w(W,y,"GeneratorFunction")),W.prototype=i(le),W},u.awrap=function(W){return{__await:W}},U(fe.prototype),w(fe.prototype,v,function(){return this}),u.AsyncIterator=fe,u.async=function(W,N,M,Y,re){re===void 0&&(re=A);var oe=new fe(S(W,N,M,Y),re);return u.isGeneratorFunction(N)?oe:oe.next().then(function(qe){return qe.done?qe.value:oe.next()})},U(le),w(le,y,"Generator"),w(le,m,function(){return this}),w(le,"toString",function(){return"[object Generator]"}),u.keys=function(W){var N=Object(W),M=[];for(var Y in N)a(M).call(M,Y);return I(M).call(M),function re(){for(;M.length;){var oe=M.pop();if(oe in N)return re.value=oe,re.done=!1,re}return re.done=!0,re}},u.values=Lt,mt.prototype={constructor:mt,reset:function(N){var M;if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,s(M=this.tryEntries).call(M,Oe),!N)for(var Y in this)Y.charAt(0)==="t"&&p.call(this,Y)&&!isNaN(+C(Y).call(Y,1))&&(this[Y]=d)},stop:function(){this.done=!0;var N=this.tryEntries[0].completion;if(N.type==="throw")throw N.arg;return this.rval},dispatchException:function(N){if(this.done)throw N;var M=this;function Y(yt,Er){return qe.type="throw",qe.arg=N,M.next=yt,Er&&(M.method="next",M.arg=d),!!Er}for(var re=this.tryEntries.length-1;re>=0;--re){var oe=this.tryEntries[re],qe=oe.completion;if(oe.tryLoc==="root")return Y("end");if(oe.tryLoc<=this.prev){var it=p.call(oe,"catchLoc"),Ee=p.call(oe,"finallyLoc");if(it&&Ee){if(this.prev<oe.catchLoc)return Y(oe.catchLoc,!0);if(this.prev<oe.finallyLoc)return Y(oe.finallyLoc)}else if(it){if(this.prev<oe.catchLoc)return Y(oe.catchLoc,!0)}else{if(!Ee)throw new Error("try statement without catch or finally");if(this.prev<oe.finallyLoc)return Y(oe.finallyLoc)}}}},abrupt:function(N,M){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var re=this.tryEntries[Y];if(re.tryLoc<=this.prev&&p.call(re,"finallyLoc")&&this.prev<re.finallyLoc){var oe=re;break}}oe&&(N==="break"||N==="continue")&&oe.tryLoc<=M&&M<=oe.finallyLoc&&(oe=null);var qe=oe?oe.completion:{};return qe.type=N,qe.arg=M,oe?(this.method="next",this.next=oe.finallyLoc,T):this.complete(qe)},complete:function(N,M){if(N.type==="throw")throw N.arg;return N.type==="break"||N.type==="continue"?this.next=N.arg:N.type==="return"?(this.rval=this.arg=N.arg,this.method="return",this.next="end"):N.type==="normal"&&M&&(this.next=M),T},finish:function(N){for(var M=this.tryEntries.length-1;M>=0;--M){var Y=this.tryEntries[M];if(Y.finallyLoc===N)return this.complete(Y.completion,Y.afterLoc),Oe(Y),T}},catch:function(N){for(var M=this.tryEntries.length-1;M>=0;--M){var Y=this.tryEntries[M];if(Y.tryLoc===N){var re=Y.completion;if(re.type==="throw"){var oe=re.arg;Oe(Y)}return oe}}throw new Error("illegal catch attempt")},delegateYield:function(N,M,Y){return this.delegate={iterator:Lt(N),resultName:M,nextLoc:Y},this.method==="next"&&(this.arg=d),T}},u}n.exports=l,n.exports.__esModule=!0,n.exports.default=n.exports})(r8);var lEe=r8.exports,PI=lEe(),dEe=PI;try{regeneratorRuntime=PI}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=PI:Function("r","regeneratorRuntime = r")(PI)}var tr=Ce(dEe),R8={exports:{}},uEe=Se,hEe=uEe(function(){if(typeof ArrayBuffer=="function"){var n=new ArrayBuffer(8);Object.isExtensible(n)&&Object.defineProperty(n,"a",{value:8})}}),cEe=Se,fEe=Bt,pEe=vn,HB=hEe,RI=Object.isExtensible,vEe=cEe(function(){RI(1)}),mEe=vEe||HB?function(e){return!fEe(e)||HB&&pEe(e)==="ArrayBuffer"?!1:RI?RI(e):!0}:RI,yEe=Se,bEe=!yEe(function(){return Object.isExtensible(Object.preventExtensions({}))}),wEe=se,EEe=Le,SEe=CA,OEe=Bt,PO=ft,TEe=dr.f,UB=lA,_Ee=eO,RO=mEe,PEe=MC,REe=bEe,x8=!1,$i=PEe("meta"),xEe=0,xO=function(n){TEe(n,$i,{value:{objectID:"O"+xEe++,weakData:{}}})},$Ee=function(n,e){if(!OEe(n))return typeof n=="symbol"?n:(typeof n=="string"?"S":"P")+n;if(!PO(n,$i)){if(!RO(n))return"F";if(!e)return"E";xO(n)}return n[$i].objectID},DEe=function(n,e){if(!PO(n,$i)){if(!RO(n))return!0;if(!e)return!1;xO(n)}return n[$i].weakData},NEe=function(n){return REe&&x8&&RO(n)&&!PO(n,$i)&&xO(n),n},MEe=function(){kEe.enable=function(){},x8=!0;var n=UB.f,e=EEe([].splice),t={};t[$i]=1,n(t).length&&(UB.f=function(r){for(var i=n(r),o=0,s=i.length;o<s;o++)if(i[o]===$i){e(i,o,1);break}return i},wEe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:_Ee.f}))},kEe=R8.exports={enable:MEe,fastKey:$Ee,getWeakData:DEe,onFreeze:NEe};SEe[$i]=!0;var $8=R8.exports,FEe=se,BEe=Ve,qEe=$8,zEe=Se,jEe=Fi,LEe=To,GEe=EO,WEe=tt,VEe=Bt,ZEe=ga,HEe=So,UEe=dr.f,YEe=ca.forEach,KEe=Tt,D8=ha,XEe=D8.set,QEe=D8.getterFor,N8=function(n,e,t){var r=n.indexOf("Map")!==-1,i=n.indexOf("Weak")!==-1,o=r?"set":"add",s=BEe[n],a=s&&s.prototype,g={},A;if(!KEe||!WEe(s)||!(i||a.forEach&&!zEe(function(){new s().entries().next()})))A=t.getConstructor(e,n,r,o),qEe.enable();else{A=e(function(l,d){XEe(GEe(l,I),{type:n,collection:new s}),ZEe(d)||LEe(d,l[o],{that:l,AS_ENTRIES:r})});var I=A.prototype,C=QEe(n);YEe(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(l){var d=l==="add"||l==="set";l in a&&!(i&&l==="clear")&&jEe(I,l,function(u,h){var p=C(this).collection;if(!d&&i&&!VEe(u))return l==="get"?void 0:!1;var f=p[l](u===0?0:u,h);return d?this:f})}),i||UEe(I,"size",{configurable:!0,get:function(){return C(this).collection.size}})}return HEe(A,n,!1,!0),g[n]=A,FEe({global:!0,forced:!0},g),i||t.setStrong(A,n,r),A},JEe=ua,eSe=function(n,e,t){for(var r in e)t&&t.unsafe&&n[r]?n[r]=e[r]:JEe(n,r,e[r],t);return n},tSe=Eo,rSe=tO,YB=eSe,iSe=yn,nSe=EO,oSe=ga,sSe=To,aSe=sO,dI=aO,gSe=a8,Ha=Tt,KB=$8.fastKey,M8=ha,XB=M8.set,kv=M8.getterFor,k8={getConstructor:function(n,e,t,r){var i=n(function(A,I){nSe(A,o),XB(A,{type:e,index:tSe(null),first:void 0,last:void 0,size:0}),Ha||(A.size=0),oSe(I)||sSe(I,A[r],{that:A,AS_ENTRIES:t})}),o=i.prototype,s=kv(e),a=function(A,I,C){var l=s(A),d=g(A,I),u,h;return d?d.value=C:(l.last=d={index:h=KB(I,!0),key:I,value:C,previous:u=l.last,next:void 0,removed:!1},l.first||(l.first=d),u&&(u.next=d),Ha?l.size++:A.size++,h!=="F"&&(l.index[h]=d)),A},g=function(A,I){var C=s(A),l=KB(I),d;if(l!=="F")return C.index[l];for(d=C.first;d;d=d.next)if(d.key===I)return d};return YB(o,{clear:function(){for(var I=this,C=s(I),l=C.index,d=C.first;d;)d.removed=!0,d.previous&&(d.previous=d.previous.next=void 0),delete l[d.index],d=d.next;C.first=C.last=void 0,Ha?C.size=0:I.size=0},delete:function(A){var I=this,C=s(I),l=g(I,A);if(l){var d=l.next,u=l.previous;delete C.index[l.index],l.removed=!0,u&&(u.next=d),d&&(d.previous=u),C.first===l&&(C.first=d),C.last===l&&(C.last=u),Ha?C.size--:I.size--}return!!l},forEach:function(I){for(var C=s(this),l=iSe(I,arguments.length>1?arguments[1]:void 0),d;d=d?d.next:C.first;)for(l(d.value,d.key,this);d&&d.removed;)d=d.previous},has:function(I){return!!g(this,I)}}),YB(o,t?{get:function(I){var C=g(this,I);return C&&C.value},set:function(I,C){return a(this,I===0?0:I,C)}}:{add:function(I){return a(this,I=I===0?0:I,I)}}),Ha&&rSe(o,"size",{configurable:!0,get:function(){return s(this).size}}),i},setStrong:function(n,e,t){var r=e+" Iterator",i=kv(e),o=kv(r);aSe(n,e,function(s,a){XB(this,{type:r,target:s,state:i(s),kind:a,last:void 0})},function(){for(var s=o(this),a=s.kind,g=s.last;g&&g.removed;)g=g.previous;return!s.target||!(s.last=g=g?g.next:s.state.first)?(s.target=void 0,dI(void 0,!0)):dI(a==="keys"?g.key:a==="values"?g.value:[g.key,g.value],!1)},t?"entries":"values",!t,!0),gSe(e)}},ASe=N8,ISe=k8;ASe("Map",function(n){return function(){return n(this,arguments.length?arguments[0]:void 0)}},ISe);var CSe=Ze,lSe=CSe.Map,dSe=lSe,uSe=dSe,hSe=uSe,F8=Ce(hSe),cSe=se,fSe=ca.some,pSe=JC,vSe=pSe("some");cSe({target:"Array",proto:!0,forced:!vSe},{some:function(e){return fSe(this,e,arguments.length>1?arguments[1]:void 0)}});var mSe=jt,ySe=mSe("Array","some"),bSe=ct,wSe=ySe,Fv=Array.prototype,ESe=function(n){var e=n.some;return n===Fv||bSe(Fv,n)&&e===Fv.some?wSe:e},SSe=ESe,OSe=SSe,TSe=OSe,_Se=Ce(TSe),PSe=jt,RSe=PSe("Array","keys"),xSe=RSe,$Se=xSe,DSe=Bi,NSe=ft,MSe=ct,kSe=$Se,Bv=Array.prototype,FSe={DOMTokenList:!0,NodeList:!0},BSe=function(n){var e=n.keys;return n===Bv||MSe(Bv,n)&&e===Bv.keys||NSe(FSe,DSe(n))?kSe:e},qSe=BSe,Vo=Ce(qSe),QB=zU,zSe=Math.floor,GE=function(n,e){var t=n.length,r=zSe(t/2);return t<8?jSe(n,e):LSe(n,GE(QB(n,0,r),e),GE(QB(n,r),e),e)},jSe=function(n,e){for(var t=n.length,r=1,i,o;r<t;){for(o=r,i=n[r];o&&e(n[o-1],i)>0;)n[o]=n[--o];o!==r++&&(n[o]=i)}return n},LSe=function(n,e,t,r){for(var i=e.length,o=t.length,s=0,a=0;s<i||a<o;)n[s+a]=s<i&&a<o?r(e[s],t[a])<=0?e[s++]:t[a++]:s<i?e[s++]:t[a++];return n},GSe=GE,WSe=mn,JB=WSe.match(/firefox\/(\d+)/i),VSe=!!JB&&+JB[1],ZSe=mn,HSe=/MSIE|Trident/.test(ZSe),USe=mn,eq=USe.match(/AppleWebKit\/(\d+)\./),YSe=!!eq&&+eq[1],KSe=se,B8=Le,XSe=Cr,QSe=lr,tq=br,JSe=rK,rq=wo,$O=Se,eOe=GSe,tOe=JC,iq=VSe,rOe=HSe,nq=Aa,oq=YSe,Ki=[],sq=B8(Ki.sort),iOe=B8(Ki.push),nOe=$O(function(){Ki.sort(void 0)}),oOe=$O(function(){Ki.sort(null)}),sOe=tOe("sort"),q8=!$O(function(){if(nq)return nq<70;if(!(iq&&iq>3)){if(rOe)return!0;if(oq)return oq<603;var n="",e,t,r,i;for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)Ki.push({k:t+i,v:r})}for(Ki.sort(function(o,s){return s.v-o.v}),i=0;i<Ki.length;i++)t=Ki[i].k.charAt(0),n.charAt(n.length-1)!==t&&(n+=t);return n!=="DGBEFHACIJK"}}),aOe=nOe||!oOe||!sOe||!q8,gOe=function(n){return function(e,t){return t===void 0?-1:e===void 0?1:n!==void 0?+n(e,t)||0:rq(e)>rq(t)?1:-1}};KSe({target:"Array",proto:!0,forced:aOe},{sort:function(e){e!==void 0&&XSe(e);var t=QSe(this);if(q8)return e===void 0?sq(t):sq(t,e);var r=[],i=tq(t),o,s;for(s=0;s<i;s++)s in t&&iOe(r,t[s]);for(eOe(r,gOe(e)),o=tq(r),s=0;s<o;)t[s]=r[s++];for(;s<i;)JSe(t,s++);return t}});var AOe=jt,IOe=AOe("Array","sort"),COe=ct,lOe=IOe,qv=Array.prototype,dOe=function(n){var e=n.sort;return n===qv||COe(qv,n)&&e===qv.sort?lOe:e},uOe=dOe,hOe=uOe,cOe=hOe,WE=Ce(cOe),fOe=jt,pOe=fOe("Array","values"),vOe=pOe,mOe=vOe,yOe=Bi,bOe=ft,wOe=ct,EOe=mOe,zv=Array.prototype,SOe={DOMTokenList:!0,NodeList:!0},OOe=function(n){var e=n.values;return n===zv||wOe(zv,n)&&e===zv.values||bOe(SOe,yOe(n))?EOe:e},TOe=OOe,aq=Ce(TOe),_Oe=_Y,ss=Ce(_Oe),POe=jt,ROe=POe("Array","entries"),xOe=ROe,$Oe=xOe,DOe=Bi,NOe=ft,MOe=ct,kOe=$Oe,jv=Array.prototype,FOe={DOMTokenList:!0,NodeList:!0},BOe=function(n){var e=n.entries;return n===jv||MOe(jv,n)&&e===jv.entries||NOe(FOe,DOe(n))?kOe:e},qOe=BOe,zOe=Ce(qOe);let uI;const jOe=new Uint8Array(16);function LOe(){if(!uI&&(uI=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!uI))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return uI(jOe)}const $t=[];for(let n=0;n<256;++n)$t.push((n+256).toString(16).slice(1));function GOe(n,e=0){return $t[n[e+0]]+$t[n[e+1]]+$t[n[e+2]]+$t[n[e+3]]+"-"+$t[n[e+4]]+$t[n[e+5]]+"-"+$t[n[e+6]]+$t[n[e+7]]+"-"+$t[n[e+8]]+$t[n[e+9]]+"-"+$t[n[e+10]]+$t[n[e+11]]+$t[n[e+12]]+$t[n[e+13]]+$t[n[e+14]]+$t[n[e+15]]}const WOe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var gq={randomUUID:WOe};function VOe(n,e,t){if(gq.randomUUID&&!n)return gq.randomUUID();n=n||{};const r=n.random||(n.rng||LOe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,GOe(r)}function Aq(n){return typeof n=="string"||typeof n=="number"}var ZOe=(function(){function n(e){$C(this,n),rn(this,"_queue",[]),rn(this,"_timeout",null),rn(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(e)}return QC(n,[{key:"setOptions",value:function(t){t&&typeof t.delay<"u"&&(this.delay=t.delay),t&&typeof t.max<"u"&&(this.max=t.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var t=this._extended.object,r=this._extended.methods,i=0;i<r.length;i++){var o=r[i];o.original?t[o.name]=o.original:delete t[o.name]}this._extended=null}}},{key:"replace",value:function(t,r){var i=this,o=t[r];if(!o)throw new Error("Method "+r+" undefined");t[r]=function(){for(var s=arguments.length,a=new Array(s),g=0;g<s;g++)a[g]=arguments[g];i.queue({args:a,fn:o,context:this})}}},{key:"queue",value:function(t){typeof t=="function"?this._queue.push({fn:t}):this._queue.push(t),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var t=this;this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=vme(function(){t.flush()},this.delay))}},{key:"flush",value:function(){var t,r;eo(t=iK(r=this._queue).call(r,0)).call(t,function(i){i.fn.apply(i.context||i.fn,i.args||[])})}}],[{key:"extend",value:function(t,r){var i=new n(r);if(t.flush!==void 0)throw new Error("Target object already has a property flush");t.flush=function(){i.flush()};var o=[{name:"flush",original:void 0}];if(r&&r.replace)for(var s=0;s<r.replace.length;s++){var a=r.replace[s];o.push({name:a,original:t[a]}),i.replace(t,a)}return i._extended={object:t,methods:o},i}}]),n})(),HOe=(function(){function n(){$C(this,n),rn(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),rn(this,"subscribe",n.prototype.on),rn(this,"unsubscribe",n.prototype.off)}return QC(n,[{key:"_trigger",value:function(t,r,i){var o,s;if(t==="*")throw new Error("Cannot trigger event *");eo(o=rl(s=[]).call(s,sr(this._subscribers[t]),sr(this._subscribers["*"]))).call(o,function(a){a(t,r,i??null)})}},{key:"on",value:function(t,r){typeof r=="function"&&this._subscribers[t].push(r)}},{key:"off",value:function(t,r){var i;this._subscribers[t]=ts(i=this._subscribers[t]).call(i,function(o){return o!==r})}}]),n})(),UOe=N8,YOe=k8;UOe("Set",function(n){return function(){return n(this,arguments.length?arguments[0]:void 0)}},YOe);var KOe=Ze,XOe=KOe.Set,QOe=XOe,JOe=QOe,eTe=JOe,Lv=Ce(eTe),tTe=CO,rTe=tTe,iTe=rTe,nTe=iTe,oTe=nTe,sTe=oTe,aTe=sTe,gTe=aTe,ATe=gTe,ITe=ATe,Gv=Ce(ITe);function ti(n,e){var t=typeof tl<"u"&&dO(n)||n["@@iterator"];if(!t){if(fr(n)||(t=CTe(n))||e){t&&(n=t);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(A){throw A},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){t=t.call(n)},n:function(){var A=t.next();return o=A.done,A},e:function(A){s=!0,a=A},f:function(){try{!o&&t.return!=null&&t.return()}finally{if(s)throw a}}}}function CTe(n,e){var t;if(n){if(typeof n=="string")return Iq(n,e);var r=il(t=Object.prototype.toString.call(n)).call(t,8,-1);if(r==="Object"&&n.constructor&&(r=n.constructor.name),r==="Map"||r==="Set")return lO(n);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Iq(n,e)}}function Iq(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}var Cq=(function(n){function e(t){$C(this,e),this._pairs=t}return QC(e,[{key:n,value:tr.mark(function t(){var r,i,o,s,a;return tr.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:r=ti(this._pairs),A.prev=1,r.s();case 3:if((i=r.n()).done){A.next=9;break}return o=er(i.value,2),s=o[0],a=o[1],A.next=7,[s,a];case 7:A.next=3;break;case 9:A.next=14;break;case 11:A.prev=11,A.t0=A.catch(1),r.e(A.t0);case 14:return A.prev=14,r.f(),A.finish(14);case 17:case"end":return A.stop()}},t,this,[[1,11,14,17]])})},{key:"entries",value:tr.mark(function t(){var r,i,o,s,a;return tr.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:r=ti(this._pairs),A.prev=1,r.s();case 3:if((i=r.n()).done){A.next=9;break}return o=er(i.value,2),s=o[0],a=o[1],A.next=7,[s,a];case 7:A.next=3;break;case 9:A.next=14;break;case 11:A.prev=11,A.t0=A.catch(1),r.e(A.t0);case 14:return A.prev=14,r.f(),A.finish(14);case 17:case"end":return A.stop()}},t,this,[[1,11,14,17]])})},{key:"keys",value:tr.mark(function t(){var r,i,o,s;return tr.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:r=ti(this._pairs),g.prev=1,r.s();case 3:if((i=r.n()).done){g.next=9;break}return o=er(i.value,1),s=o[0],g.next=7,s;case 7:g.next=3;break;case 9:g.next=14;break;case 11:g.prev=11,g.t0=g.catch(1),r.e(g.t0);case 14:return g.prev=14,r.f(),g.finish(14);case 17:case"end":return g.stop()}},t,this,[[1,11,14,17]])})},{key:"values",value:tr.mark(function t(){var r,i,o,s;return tr.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:r=ti(this._pairs),g.prev=1,r.s();case 3:if((i=r.n()).done){g.next=9;break}return o=er(i.value,2),s=o[1],g.next=7,s;case 7:g.next=3;break;case 9:g.next=14;break;case 11:g.prev=11,g.t0=g.catch(1),r.e(g.t0);case 14:return g.prev=14,r.f(),g.finish(14);case 17:case"end":return g.stop()}},t,this,[[1,11,14,17]])})},{key:"toIdArray",value:function(){var r;return Vr(r=sr(this._pairs)).call(r,function(i){return i[0]})}},{key:"toItemArray",value:function(){var r;return Vr(r=sr(this._pairs)).call(r,function(i){return i[1]})}},{key:"toEntryArray",value:function(){return sr(this._pairs)}},{key:"toObjectMap",value:function(){var r=Yve(null),i=ti(this._pairs),o;try{for(i.s();!(o=i.n()).done;){var s=er(o.value,2),a=s[0],g=s[1];r[a]=g}}catch(A){i.e(A)}finally{i.f()}return r}},{key:"toMap",value:function(){return new F8(this._pairs)}},{key:"toIdSet",value:function(){return new Lv(this.toIdArray())}},{key:"toItemSet",value:function(){return new Lv(this.toItemArray())}},{key:"cache",value:function(){return new e(sr(this._pairs))}},{key:"distinct",value:function(r){var i=new Lv,o=ti(this._pairs),s;try{for(o.s();!(s=o.n()).done;){var a=er(s.value,2),g=a[0],A=a[1];i.add(r(A,g))}}catch(I){o.e(I)}finally{o.f()}return i}},{key:"filter",value:function(r){var i=this._pairs;return new e({[ss](){return tr.mark(function o(){var s,a,g,A,I;return tr.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:s=ti(i),l.prev=1,s.s();case 3:if((a=s.n()).done){l.next=10;break}if(g=er(a.value,2),A=g[0],I=g[1],!r(I,A)){l.next=8;break}return l.next=8,[A,I];case 8:l.next=3;break;case 10:l.next=15;break;case 12:l.prev=12,l.t0=l.catch(1),s.e(l.t0);case 15:return l.prev=15,s.f(),l.finish(15);case 18:case"end":return l.stop()}},o,null,[[1,12,15,18]])})()}})}},{key:"forEach",value:function(r){var i=ti(this._pairs),o;try{for(i.s();!(o=i.n()).done;){var s=er(o.value,2),a=s[0],g=s[1];r(g,a)}}catch(A){i.e(A)}finally{i.f()}}},{key:"map",value:function(r){var i=this._pairs;return new e({[ss](){return tr.mark(function o(){var s,a,g,A,I;return tr.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:s=ti(i),l.prev=1,s.s();case 3:if((a=s.n()).done){l.next=9;break}return g=er(a.value,2),A=g[0],I=g[1],l.next=7,[A,r(I,A)];case 7:l.next=3;break;case 9:l.next=14;break;case 11:l.prev=11,l.t0=l.catch(1),s.e(l.t0);case 14:return l.prev=14,s.f(),l.finish(14);case 17:case"end":return l.stop()}},o,null,[[1,11,14,17]])})()}})}},{key:"max",value:function(r){var i=Gv(this._pairs),o=i.next();if(o.done)return null;for(var s=o.value[1],a=r(o.value[1],o.value[0]);!(o=i.next()).done;){var g=er(o.value,2),A=g[0],I=g[1],C=r(I,A);C>a&&(a=C,s=I)}return s}},{key:"min",value:function(r){var i=Gv(this._pairs),o=i.next();if(o.done)return null;for(var s=o.value[1],a=r(o.value[1],o.value[0]);!(o=i.next()).done;){var g=er(o.value,2),A=g[0],I=g[1],C=r(I,A);C<a&&(a=C,s=I)}return s}},{key:"reduce",value:function(r,i){var o=ti(this._pairs),s;try{for(o.s();!(s=o.n()).done;){var a=er(s.value,2),g=a[0],A=a[1];i=r(i,A,g)}}catch(I){o.e(I)}finally{o.f()}return i}},{key:"sort",value:function(r){var i=this;return new e({[ss]:function(){var o;return Gv(WE(o=sr(i._pairs)).call(o,function(s,a){var g=er(s,2),A=g[0],I=g[1],C=er(a,2),l=C[0],d=C[1];return r(I,d,A,l)}))}})}}]),e})(ss);function lq(n,e){var t=hO(n);if(dB){var r=dB(n);e&&(r=ts(r).call(r,function(i){return UK(n,i).enumerable})),t.push.apply(t,r)}return t}function dq(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?eo(t=lq(Object(i),!0)).call(t,function(o){rn(n,o,i[o])}):uB?Abe(n,uB(i)):eo(r=lq(Object(i))).call(r,function(o){Cbe(n,o,UK(i,o))})}return n}function Wv(n,e){var t=typeof tl<"u"&&dO(n)||n["@@iterator"];if(!t){if(fr(n)||(t=lTe(n))||e){t&&(n=t);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(A){throw A},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){t=t.call(n)},n:function(){var A=t.next();return o=A.done,A},e:function(A){s=!0,a=A},f:function(){try{!o&&t.return!=null&&t.return()}finally{if(s)throw a}}}}function lTe(n,e){var t;if(n){if(typeof n=="string")return uq(n,e);var r=il(t=Object.prototype.toString.call(n)).call(t,8,-1);if(r==="Object"&&n.constructor&&(r=n.constructor.name),r==="Map"||r==="Set")return lO(n);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uq(n,e)}}function uq(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function dTe(n){var e=uTe();return function(){var r=JI(n),i;if(e){var o=JI(this).constructor;i=TI(r,arguments,o)}else i=r.apply(this,arguments);return Dbe(this,i)}}function uTe(){if(typeof Reflect>"u"||!TI||TI.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(TI(Boolean,[],function(){})),!0}catch{return!1}}function hTe(n,e){return n[e]==null&&(n[e]=VOe()),n}var iC=(function(n){$be(t,n);var e=dTe(t);function t(r,i){var o;return $C(this,t),o=e.call(this),rn(XK(o),"_queue",null),r&&!fr(r)&&(i=r,r=[]),o._options=i||{},o._data=new F8,o.length=0,o._idProp=o._options.fieldId||"id",r&&r.length&&o.add(r),o.setOptions(i),o}return QC(t,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(i){i&&i.queue!==void 0&&(i.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=ZOe.extend(this,{replace:["add","update","remove"]})),i.queue&&typeof i.queue=="object"&&this._queue.setOptions(i.queue)))}},{key:"add",value:function(i,o){var s=this,a=[],g;if(fr(i)){var A=Vr(i).call(i,function(l){return l[s._idProp]});if(_Se(A).call(A,function(l){return s._data.has(l)}))throw new Error("A duplicate id was found in the parameter array.");for(var I=0,C=i.length;I<C;I++)g=this._addItem(i[I]),a.push(g)}else if(i&&typeof i=="object")g=this._addItem(i),a.push(g);else throw new Error("Unknown dataType");return a.length&&this._trigger("add",{items:a},o),a}},{key:"update",value:function(i,o){var s=this,a=[],g=[],A=[],I=[],C=this._idProp,l=function(f){var c=f[C];if(c!=null&&s._data.has(c)){var m=f,v=xve({},s._data.get(c)),y=s._updateItem(m);g.push(y),I.push(m),A.push(v)}else{var w=s._addItem(f);a.push(w)}};if(fr(i))for(var d=0,u=i.length;d<u;d++)i[d]&&typeof i[d]=="object"?l(i[d]):console.warn("Ignoring input item, which is not an object at index "+d);else if(i&&typeof i=="object")l(i);else throw new Error("Unknown dataType");if(a.length&&this._trigger("add",{items:a},o),g.length){var h={items:g,oldData:A,data:I};this._trigger("update",h,o)}return rl(a).call(a,g)}},{key:"updateOnly",value:function(i,o){var s,a=this;fr(i)||(i=[i]);var g=Vr(s=Vr(i).call(i,function(I){var C=a._data.get(I[a._idProp]);if(C==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:C,update:I}})).call(s,function(I){var C=I.oldData,l=I.update,d=C[a._idProp],u=Iye(C,l);return a._data.set(d,u),{id:d,oldData:C,updatedData:u}});if(g.length){var A={items:Vr(g).call(g,function(I){return I.id}),oldData:Vr(g).call(g,function(I){return I.oldData}),data:Vr(g).call(g,function(I){return I.updatedData})};return this._trigger("update",A,o),A.items}else return[]}},{key:"get",value:function(i,o){var s=void 0,a=void 0,g=void 0;Aq(i)?(s=i,g=o):fr(i)?(a=i,g=o):g=i;var A=g&&g.returnType==="Object"?"Object":"Array",I=g&&ts(g),C=[],l=void 0,d=void 0,u=void 0;if(s!=null)l=this._data.get(s),l&&I&&!I(l)&&(l=void 0);else if(a!=null)for(var h=0,p=a.length;h<p;h++)l=this._data.get(a[h]),l!=null&&(!I||I(l))&&C.push(l);else{var f;d=sr(Vo(f=this._data).call(f));for(var c=0,m=d.length;c<m;c++)u=d[c],l=this._data.get(u),l!=null&&(!I||I(l))&&C.push(l)}if(g&&g.order&&s==null&&this._sort(C,g.order),g&&g.fields){var v=g.fields;if(s!=null&&l!=null)l=this._filterFields(l,v);else for(var y=0,w=C.length;y<w;y++)C[y]=this._filterFields(C[y],v)}if(A=="Object"){for(var S={},b=0,E=C.length;b<E;b++){var O=C[b],P=O[this._idProp];S[P]=O}return S}else if(s!=null){var _;return(_=l)!==null&&_!==void 0?_:null}else return C}},{key:"getIds",value:function(i){var o=this._data,s=i&&ts(i),a=i&&i.order,g=sr(Vo(o).call(o)),A=[];if(s)if(a){for(var I=[],C=0,l=g.length;C<l;C++){var d=g[C],u=this._data.get(d);u!=null&&s(u)&&I.push(u)}this._sort(I,a);for(var h=0,p=I.length;h<p;h++)A.push(I[h][this._idProp])}else for(var f=0,c=g.length;f<c;f++){var m=g[f],v=this._data.get(m);v!=null&&s(v)&&A.push(v[this._idProp])}else if(a){for(var y=[],w=0,S=g.length;w<S;w++){var b=g[w];y.push(o.get(b))}this._sort(y,a);for(var E=0,O=y.length;E<O;E++)A.push(y[E][this._idProp])}else for(var P=0,_=g.length;P<_;P++){var T=g[P],R=o.get(T);R!=null&&A.push(R[this._idProp])}return A}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(i,o){var s=o&&ts(o),a=this._data,g=sr(Vo(a).call(a));if(o&&o.order)for(var A=this.get(o),I=0,C=A.length;I<C;I++){var l=A[I],d=l[this._idProp];i(l,d)}else for(var u=0,h=g.length;u<h;u++){var p=g[u],f=this._data.get(p);f!=null&&(!s||s(f))&&i(f,p)}}},{key:"map",value:function(i,o){for(var s=o&&ts(o),a=[],g=this._data,A=sr(Vo(g).call(g)),I=0,C=A.length;I<C;I++){var l=A[I],d=this._data.get(l);d!=null&&(!s||s(d))&&a.push(i(d,l))}return o&&o.order&&this._sort(a,o.order),a}},{key:"_filterFields",value:function(i,o){var s;return i&&Hue(s=fr(o)?o:hO(o)).call(s,function(a,g){return a[g]=i[g],a},{})}},{key:"_sort",value:function(i,o){if(typeof o=="string"){var s=o;WE(i).call(i,function(a,g){var A=a[s],I=g[s];return A>I?1:A<I?-1:0})}else if(typeof o=="function")WE(i).call(i,o);else throw new TypeError("Order must be a function or a string")}},{key:"remove",value:function(i,o){for(var s=[],a=[],g=fr(i)?i:[i],A=0,I=g.length;A<I;A++){var C=this._remove(g[A]);if(C){var l=C[this._idProp];l!=null&&(s.push(l),a.push(C))}}return s.length&&this._trigger("remove",{items:s,oldData:a},o),s}},{key:"_remove",value:function(i){var o;if(Aq(i)?o=i:i&&typeof i=="object"&&(o=i[this._idProp]),o!=null&&this._data.has(o)){var s=this._data.get(o)||null;return this._data.delete(o),--this.length,s}return null}},{key:"clear",value:function(i){for(var o,s=sr(Vo(o=this._data).call(o)),a=[],g=0,A=s.length;g<A;g++)a.push(this._data.get(s[g]));return this._data.clear(),this.length=0,this._trigger("remove",{items:s,oldData:a},i),s}},{key:"max",value:function(i){var o,s=null,a=null,g=Wv(aq(o=this._data).call(o)),A;try{for(g.s();!(A=g.n()).done;){var I=A.value,C=I[i];typeof C=="number"&&(a==null||C>a)&&(s=I,a=C)}}catch(l){g.e(l)}finally{g.f()}return s||null}},{key:"min",value:function(i){var o,s=null,a=null,g=Wv(aq(o=this._data).call(o)),A;try{for(g.s();!(A=g.n()).done;){var I=A.value,C=I[i];typeof C=="number"&&(a==null||C<a)&&(s=I,a=C)}}catch(l){g.e(l)}finally{g.f()}return s||null}},{key:"distinct",value:function(i){for(var o=this._data,s=sr(Vo(o).call(o)),a=[],g=0,A=0,I=s.length;A<I;A++){for(var C=s[A],l=o.get(C),d=l[i],u=!1,h=0;h<g;h++)if(a[h]==d){u=!0;break}!u&&d!==void 0&&(a[g]=d,g++)}return a}},{key:"_addItem",value:function(i){var o=hTe(i,this._idProp),s=o[this._idProp];if(this._data.has(s))throw new Error("Cannot add item: item with id "+s+" already exists");return this._data.set(s,o),++this.length,s}},{key:"_updateItem",value:function(i){var o=i[this._idProp];if(o==null)throw new Error("Cannot update item: item has no id (item: "+tme(i)+")");var s=this._data.get(o);if(!s)throw new Error("Cannot update item: no item with id "+o+" found");return this._data.set(o,dq(dq({},s),i)),o}},{key:"stream",value:function(i){if(i){var o=this._data;return new Cq({[ss](){return tr.mark(function a(){var g,A,I,C;return tr.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:g=Wv(i),d.prev=1,g.s();case 3:if((A=g.n()).done){d.next=11;break}if(I=A.value,C=o.get(I),C==null){d.next=9;break}return d.next=9,[I,C];case 9:d.next=3;break;case 11:d.next=16;break;case 13:d.prev=13,d.t0=d.catch(1),g.e(d.t0);case 16:return d.prev=16,g.f(),d.finish(16);case 19:case"end":return d.stop()}},a,null,[[1,13,16,19]])})()}})}else{var s;return new Cq({[ss]:MY(s=zOe(this._data)).call(s,this._data)})}}}]),t})(HOe);function cTe(n,e){return typeof e=="object"&&e!==null&&n===e.idProp&&typeof e.add=="function"&&typeof e.clear=="function"&&typeof e.distinct=="function"&&typeof eo(e)=="function"&&typeof e.get=="function"&&typeof e.getDataSet=="function"&&typeof e.getIds=="function"&&typeof e.length=="number"&&typeof Vr(e)=="function"&&typeof e.max=="function"&&typeof e.min=="function"&&typeof e.off=="function"&&typeof e.on=="function"&&typeof e.remove=="function"&&typeof e.setOptions=="function"&&typeof e.stream=="function"&&typeof e.update=="function"&&typeof e.updateOnly=="function"}function z8(n,e){return typeof e=="object"&&e!==null&&n===e.idProp&&typeof eo(e)=="function"&&typeof e.get=="function"&&typeof e.getDataSet=="function"&&typeof e.getIds=="function"&&typeof e.length=="number"&&typeof Vr(e)=="function"&&typeof e.off=="function"&&typeof e.on=="function"&&typeof e.stream=="function"&&cTe(n,e.getDataSet())}/**
 * vis-network
 * https://visjs.github.io/vis-network/
 *
 * A dynamic, browser-based visualization library.
 *
 * @version 10.0.1
 * @date    2025-07-13T08:15:32.270Z
 *
 * @copyright (c) 2011-2017 Almende B.V, http://almende.com
 * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
 *
 * @license
 * vis.js is dual licensed under both
 *
 *   1. The Apache 2.0 License
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *   and
 *
 *   2. The MIT License
 *      http://opensource.org/licenses/MIT
 *
 * vis.js may be distributed under either license.
 */var hq=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ue(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var cq={},Ua,fq;function He(){if(fq)return Ua;fq=1;var n=function(e){return e&&e.Math===Math&&e};return Ua=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof hq=="object"&&hq)||n(typeof Ua=="object"&&Ua)||(function(){return this})()||Function("return this")(),Ua}var Vv,pq;function be(){return pq||(pq=1,Vv=function(n){try{return!!n()}catch{return!0}}),Vv}var Zv,vq;function TA(){if(vq)return Zv;vq=1;var n=be();return Zv=!n(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Zv}var Hv,mq;function gl(){if(mq)return Hv;mq=1;var n=TA(),e=Function.prototype,t=e.apply,r=e.call;return Hv=typeof Reflect=="object"&&Reflect.apply||(n?r.bind(t):function(){return r.apply(t,arguments)}),Hv}var Uv,yq;function we(){if(yq)return Uv;yq=1;var n=TA(),e=Function.prototype,t=e.call,r=n&&e.bind.bind(t,t);return Uv=n?r:function(i){return function(){return t.apply(i,arguments)}},Uv}var Yv,bq;function hi(){if(bq)return Yv;bq=1;var n=we(),e=n({}.toString),t=n("".slice);return Yv=function(r){return t(e(r),8,-1)},Yv}var Kv,wq;function DO(){if(wq)return Kv;wq=1;var n=hi(),e=we();return Kv=function(t){if(n(t)==="Function")return e(t)},Kv}var Xv,Eq;function Pt(){if(Eq)return Xv;Eq=1;var n=typeof document=="object"&&document.all;return Xv=typeof n>"u"&&n!==void 0?function(e){return typeof e=="function"||e===n}:function(e){return typeof e=="function"},Xv}var Qv={},Jv,Sq;function gt(){if(Sq)return Jv;Sq=1;var n=be();return Jv=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Jv}var em,Oq;function ur(){if(Oq)return em;Oq=1;var n=TA(),e=Function.prototype.call;return em=n?e.bind(e):function(){return e.apply(e,arguments)},em}var tm={},Tq;function Al(){if(Tq)return tm;Tq=1;var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!n.call({1:2},1);return tm.f=t?function(i){var o=e(this,i);return!!o&&o.enumerable}:n,tm}var rm,_q;function _A(){return _q||(_q=1,rm=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}}),rm}var im,Pq;function Il(){if(Pq)return im;Pq=1;var n=we(),e=be(),t=hi(),r=Object,i=n("".split);return im=e(function(){return!r("z").propertyIsEnumerable(0)})?function(o){return t(o)==="String"?i(o,""):r(o)}:r,im}var nm,Rq;function ya(){return Rq||(Rq=1,nm=function(n){return n==null}),nm}var om,xq;function qi(){if(xq)return om;xq=1;var n=ya(),e=TypeError;return om=function(t){if(n(t))throw new e("Can't call method on "+t);return t},om}var sm,$q;function Jr(){if($q)return sm;$q=1;var n=Il(),e=qi();return sm=function(t){return n(e(t))},sm}var am,Dq;function Rt(){if(Dq)return am;Dq=1;var n=Pt();return am=function(e){return typeof e=="object"?e!==null:n(e)},am}var gm,Nq;function Re(){return Nq||(Nq=1,gm={}),gm}var Am,Mq;function wr(){if(Mq)return Am;Mq=1;var n=Re(),e=He(),t=Pt(),r=function(i){return t(i)?i:void 0};return Am=function(i,o){return arguments.length<2?r(n[i])||r(e[i]):n[i]&&n[i][o]||e[i]&&e[i][o]},Am}var Im,kq;function pt(){if(kq)return Im;kq=1;var n=we();return Im=n({}.isPrototypeOf),Im}var Cm,Fq;function ba(){if(Fq)return Cm;Fq=1;var n=He(),e=n.navigator,t=e&&e.userAgent;return Cm=t?String(t):"",Cm}var lm,Bq;function PA(){if(Bq)return lm;Bq=1;var n=He(),e=ba(),t=n.process,r=n.Deno,i=t&&t.versions||r&&r.version,o=i&&i.v8,s,a;return o&&(s=o.split("."),a=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!a&&e&&(s=e.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=e.match(/Chrome\/(\d+)/),s&&(a=+s[1]))),lm=a,lm}var dm,qq;function wa(){if(qq)return dm;qq=1;var n=PA(),e=be(),t=He(),r=t.String;return dm=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!r(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&n&&n<41}),dm}var um,zq;function j8(){if(zq)return um;zq=1;var n=wa();return um=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",um}var hm,jq;function RA(){if(jq)return hm;jq=1;var n=wr(),e=Pt(),t=pt(),r=j8(),i=Object;return hm=r?function(o){return typeof o=="symbol"}:function(o){var s=n("Symbol");return e(s)&&t(s.prototype,i(o))},hm}var cm,Lq;function Ea(){if(Lq)return cm;Lq=1;var n=String;return cm=function(e){try{return n(e)}catch{return"Object"}},cm}var fm,Gq;function zi(){if(Gq)return fm;Gq=1;var n=Pt(),e=Ea(),t=TypeError;return fm=function(r){if(n(r))return r;throw new t(e(r)+" is not a function")},fm}var pm,Wq;function NO(){if(Wq)return pm;Wq=1;var n=zi(),e=ya();return pm=function(t,r){var i=t[r];return e(i)?void 0:n(i)},pm}var vm,Vq;function fTe(){if(Vq)return vm;Vq=1;var n=ur(),e=Pt(),t=Rt(),r=TypeError;return vm=function(i,o){var s,a;if(o==="string"&&e(s=i.toString)&&!t(a=n(s,i))||e(s=i.valueOf)&&!t(a=n(s,i))||o!=="string"&&e(s=i.toString)&&!t(a=n(s,i)))return a;throw new r("Can't convert object to primitive value")},vm}var mm={exports:{}},ym,Zq;function Sa(){return Zq||(Zq=1,ym=!0),ym}var bm,Hq;function pTe(){if(Hq)return bm;Hq=1;var n=He(),e=Object.defineProperty;return bm=function(t,r){try{e(n,t,{value:r,configurable:!0,writable:!0})}catch{n[t]=r}return r},bm}var Uq;function MO(){if(Uq)return mm.exports;Uq=1;var n=Sa(),e=He(),t=pTe(),r="__core-js_shared__",i=mm.exports=e[r]||t(r,{});return(i.versions||(i.versions=[])).push({version:"3.44.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),mm.exports}var wm,Yq;function Oa(){if(Yq)return wm;Yq=1;var n=MO();return wm=function(e,t){return n[e]||(n[e]=t||{})},wm}var Em,Kq;function Fr(){if(Kq)return Em;Kq=1;var n=qi(),e=Object;return Em=function(t){return e(n(t))},Em}var Sm,Xq;function qt(){if(Xq)return Sm;Xq=1;var n=we(),e=Fr(),t=n({}.hasOwnProperty);return Sm=Object.hasOwn||function(i,o){return t(e(i),o)},Sm}var Om,Qq;function Cl(){if(Qq)return Om;Qq=1;var n=we(),e=0,t=Math.random(),r=n(1.1.toString);return Om=function(i){return"Symbol("+(i===void 0?"":i)+")_"+r(++e+t,36)},Om}var Tm,Jq;function vt(){if(Jq)return Tm;Jq=1;var n=He(),e=Oa(),t=qt(),r=Cl(),i=wa(),o=j8(),s=n.Symbol,a=e("wks"),g=o?s.for||s:s&&s.withoutSetter||r;return Tm=function(A){return t(a,A)||(a[A]=i&&t(s,A)?s[A]:g("Symbol."+A)),a[A]},Tm}var _m,ez;function L8(){if(ez)return _m;ez=1;var n=ur(),e=Rt(),t=RA(),r=NO(),i=fTe(),o=vt(),s=TypeError,a=o("toPrimitive");return _m=function(g,A){if(!e(g)||t(g))return g;var I=r(g,a),C;if(I){if(A===void 0&&(A="default"),C=n(I,g,A),!e(C)||t(C))return C;throw new s("Can't convert object to primitive value")}return A===void 0&&(A="number"),i(g,A)},_m}var Pm,tz;function kO(){if(tz)return Pm;tz=1;var n=L8(),e=RA();return Pm=function(t){var r=n(t,"string");return e(r)?r:r+""},Pm}var Rm,rz;function G8(){if(rz)return Rm;rz=1;var n=He(),e=Rt(),t=n.document,r=e(t)&&e(t.createElement);return Rm=function(i){return r?t.createElement(i):{}},Rm}var xm,iz;function W8(){if(iz)return xm;iz=1;var n=gt(),e=be(),t=G8();return xm=!n&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),xm}var nz;function ll(){if(nz)return Qv;nz=1;var n=gt(),e=ur(),t=Al(),r=_A(),i=Jr(),o=kO(),s=qt(),a=W8(),g=Object.getOwnPropertyDescriptor;return Qv.f=n?g:function(I,C){if(I=i(I),C=o(C),a)try{return g(I,C)}catch{}if(s(I,C))return r(!e(t.f,I,C),I[C])},Qv}var $m,oz;function vTe(){if(oz)return $m;oz=1;var n=be(),e=Pt(),t=/#|\.prototype\./,r=function(g,A){var I=o[i(g)];return I===a?!0:I===s?!1:e(A)?n(A):!!A},i=r.normalize=function(g){return String(g).replace(t,".").toLowerCase()},o=r.data={},s=r.NATIVE="N",a=r.POLYFILL="P";return $m=r,$m}var Dm,sz;function dl(){if(sz)return Dm;sz=1;var n=DO(),e=zi(),t=TA(),r=n(n.bind);return Dm=function(i,o){return e(i),o===void 0?i:t?r(i,o):function(){return i.apply(o,arguments)}},Dm}var Nm={},Mm,az;function V8(){if(az)return Mm;az=1;var n=gt(),e=be();return Mm=n&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Mm}var km,gz;function ci(){if(gz)return km;gz=1;var n=Rt(),e=String,t=TypeError;return km=function(r){if(n(r))return r;throw new t(e(r)+" is not an object")},km}var Az;function Br(){if(Az)return Nm;Az=1;var n=gt(),e=W8(),t=V8(),r=ci(),i=kO(),o=TypeError,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,g="enumerable",A="configurable",I="writable";return Nm.f=n?t?function(l,d,u){if(r(l),d=i(d),r(u),typeof l=="function"&&d==="prototype"&&"value"in u&&I in u&&!u[I]){var h=a(l,d);h&&h[I]&&(l[d]=u.value,u={configurable:A in u?u[A]:h[A],enumerable:g in u?u[g]:h[g],writable:!1})}return s(l,d,u)}:s:function(l,d,u){if(r(l),d=i(d),r(u),e)try{return s(l,d,u)}catch{}if("get"in u||"set"in u)throw new o("Accessors not supported");return"value"in u&&(l[d]=u.value),l},Nm}var Fm,Iz;function Ta(){if(Iz)return Fm;Iz=1;var n=gt(),e=Br(),t=_A();return Fm=n?function(r,i,o){return e.f(r,i,t(1,o))}:function(r,i,o){return r[i]=o,r},Fm}var Bm,Cz;function ne(){if(Cz)return Bm;Cz=1;var n=He(),e=gl(),t=DO(),r=Pt(),i=ll().f,o=vTe(),s=Re(),a=dl(),g=Ta(),A=qt(),I=function(C){var l=function(d,u,h){if(this instanceof l){switch(arguments.length){case 0:return new C;case 1:return new C(d);case 2:return new C(d,u)}return new C(d,u,h)}return e(C,this,arguments)};return l.prototype=C.prototype,l};return Bm=function(C,l){var d=C.target,u=C.global,h=C.stat,p=C.proto,f=u?n:h?n[d]:n[d]&&n[d].prototype,c=u?s:s[d]||g(s,d,{})[d],m=c.prototype,v,y,w,S,b,E,O,P,_;for(S in l)v=o(u?S:d+(h?".":"#")+S,C.forced),y=!v&&f&&A(f,S),E=c[S],y&&(C.dontCallGetSet?(_=i(f,S),O=_&&_.value):O=f[S]),b=y&&O?O:l[S],!(!v&&!p&&typeof E==typeof b)&&(C.bind&&y?P=a(b,n):C.wrap&&y?P=I(b):p&&r(b)?P=t(b):P=b,(C.sham||b&&b.sham||E&&E.sham)&&g(P,"sham",!0),g(c,S,P),p&&(w=d+"Prototype",A(s,w)||g(s,w,{}),g(s[w],S,b),C.real&&m&&(v||!m[S])&&g(m,S,b)))},Bm}var qm,lz;function mTe(){if(lz)return qm;lz=1;var n=Math.ceil,e=Math.floor;return qm=Math.trunc||function(r){var i=+r;return(i>0?e:n)(i)},qm}var zm,dz;function _a(){if(dz)return zm;dz=1;var n=mTe();return zm=function(e){var t=+e;return t!==t||t===0?0:n(t)},zm}var jm,uz;function ul(){if(uz)return jm;uz=1;var n=_a(),e=Math.max,t=Math.min;return jm=function(r,i){var o=n(r);return o<0?e(o+i,0):t(o,i)},jm}var Lm,hz;function Z8(){if(hz)return Lm;hz=1;var n=_a(),e=Math.min;return Lm=function(t){var r=n(t);return r>0?e(r,9007199254740991):0},Lm}var Gm,cz;function ji(){if(cz)return Gm;cz=1;var n=Z8();return Gm=function(e){return n(e.length)},Gm}var Wm,fz;function FO(){if(fz)return Wm;fz=1;var n=Jr(),e=ul(),t=ji(),r=function(i){return function(o,s,a){var g=n(o),A=t(g);if(A===0)return!i&&-1;var I=e(a,A),C;if(i&&s!==s){for(;A>I;)if(C=g[I++],C!==C)return!0}else for(;A>I;I++)if((i||I in g)&&g[I]===s)return i||I||0;return!i&&-1}};return Wm={includes:r(!0),indexOf:r(!1)},Wm}var Vm,pz;function xA(){return pz||(pz=1,Vm={}),Vm}var Zm,vz;function H8(){if(vz)return Zm;vz=1;var n=we(),e=qt(),t=Jr(),r=FO().indexOf,i=xA(),o=n([].push);return Zm=function(s,a){var g=t(s),A=0,I=[],C;for(C in g)!e(i,C)&&e(g,C)&&o(I,C);for(;a.length>A;)e(g,C=a[A++])&&(~r(I,C)||o(I,C));return I},Zm}var Hm,mz;function BO(){return mz||(mz=1,Hm=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Hm}var Um,yz;function $A(){if(yz)return Um;yz=1;var n=H8(),e=BO();return Um=Object.keys||function(r){return n(r,e)},Um}var Ym={},bz;function hl(){return bz||(bz=1,Ym.f=Object.getOwnPropertySymbols),Ym}var Km,wz;function yTe(){if(wz)return Km;wz=1;var n=gt(),e=we(),t=ur(),r=be(),i=$A(),o=hl(),s=Al(),a=Fr(),g=Il(),A=Object.assign,I=Object.defineProperty,C=e([].concat);return Km=!A||r(function(){if(n&&A({b:1},A(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var l={},d={},u=Symbol("assign detection"),h="abcdefghijklmnopqrst";return l[u]=7,h.split("").forEach(function(p){d[p]=p}),A({},l)[u]!==7||i(A({},d)).join("")!==h})?function(d,u){for(var h=a(d),p=arguments.length,f=1,c=o.f,m=s.f;p>f;)for(var v=g(arguments[f++]),y=c?C(i(v),c(v)):i(v),w=y.length,S=0,b;w>S;)b=y[S++],(!n||t(m,v,b))&&(h[b]=v[b]);return h}:A,Km}var Ez;function bTe(){if(Ez)return cq;Ez=1;var n=ne(),e=yTe();return n({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),cq}var Xm,Sz;function wTe(){if(Sz)return Xm;Sz=1,bTe();var n=Re();return Xm=n.Object.assign,Xm}var Qm,Oz;function ETe(){if(Oz)return Qm;Oz=1;var n=wTe();return Qm=n,Qm}var Jm,Tz;function STe(){return Tz||(Tz=1,Jm=ETe()),Jm}var OTe=STe(),Mt=ue(OTe),_z={},ey,Pz;function Pa(){if(Pz)return ey;Pz=1;var n=we();return ey=n([].slice),ey}var ty,Rz;function TTe(){if(Rz)return ty;Rz=1;var n=we(),e=zi(),t=Rt(),r=qt(),i=Pa(),o=TA(),s=Function,a=n([].concat),g=n([].join),A={},I=function(C,l,d){if(!r(A,l)){for(var u=[],h=0;h<l;h++)u[h]="a["+h+"]";A[l]=s("C,a","return new C("+g(u,",")+")")}return A[l](C,d)};return ty=o?s.bind:function(l){var d=e(this),u=d.prototype,h=i(arguments,1),p=function(){var c=a(h,i(arguments));return this instanceof p?I(d,c.length,c):d.apply(l,c)};return t(u)&&(p.prototype=u),p},ty}var xz;function _Te(){if(xz)return _z;xz=1;var n=ne(),e=TTe();return n({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e}),_z}var ry,$z;function zt(){if($z)return ry;$z=1;var n=He(),e=Re();return ry=function(t,r){var i=e[t+"Prototype"],o=i&&i[r];if(o)return o;var s=n[t],a=s&&s.prototype;return a&&a[r]},ry}var iy,Dz;function PTe(){if(Dz)return iy;Dz=1,_Te();var n=zt();return iy=n("Function","bind"),iy}var ny,Nz;function RTe(){if(Nz)return ny;Nz=1;var n=pt(),e=PTe(),t=Function.prototype;return ny=function(r){var i=r.bind;return r===t||n(t,r)&&i===t.bind?e:i},ny}var oy,Mz;function xTe(){if(Mz)return oy;Mz=1;var n=RTe();return oy=n,oy}var sy,kz;function $Te(){return kz||(kz=1,sy=xTe()),sy}var DTe=$Te(),z=ue(DTe);function qO(n,e,t,r){n.beginPath(),n.arc(e,t,r,0,2*Math.PI,!1),n.closePath()}function NTe(n,e,t,r){n.beginPath(),n.rect(e-r,t-r,r*2,r*2),n.closePath()}function MTe(n,e,t,r){n.beginPath(),r*=1.15,t+=.275*r;const i=r*2,o=i/2,s=Math.sqrt(3)/6*i,a=Math.sqrt(i*i-o*o);n.moveTo(e,t-(a-s)),n.lineTo(e+o,t+s),n.lineTo(e-o,t+s),n.lineTo(e,t-(a-s)),n.closePath()}function kTe(n,e,t,r){n.beginPath(),r*=1.15,t-=.275*r;const i=r*2,o=i/2,s=Math.sqrt(3)/6*i,a=Math.sqrt(i*i-o*o);n.moveTo(e,t+(a-s)),n.lineTo(e+o,t-s),n.lineTo(e-o,t-s),n.lineTo(e,t+(a-s)),n.closePath()}function FTe(n,e,t,r){n.beginPath(),r*=.82,t+=.1*r;for(let i=0;i<10;i++){const o=i%2===0?r*1.3:r*.5;n.lineTo(e+o*Math.sin(i*2*Math.PI/10),t-o*Math.cos(i*2*Math.PI/10))}n.closePath()}function BTe(n,e,t,r){n.beginPath(),n.lineTo(e,t+r),n.lineTo(e+r,t),n.lineTo(e,t-r),n.lineTo(e-r,t),n.closePath()}function U8(n,e,t,r,i,o){const s=Math.PI/180;r-2*o<0&&(o=r/2),i-2*o<0&&(o=i/2),n.beginPath(),n.moveTo(e+o,t),n.lineTo(e+r-o,t),n.arc(e+r-o,t+o,o,s*270,s*360,!1),n.lineTo(e+r,t+i-o),n.arc(e+r-o,t+i-o,o,0,s*90,!1),n.lineTo(e+o,t+i),n.arc(e+o,t+i-o,o,s*90,s*180,!1),n.lineTo(e,t+o),n.arc(e+o,t+o,o,s*180,s*270,!1),n.closePath()}function VE(n,e,t,r,i){const o=.5522848,s=r/2*o,a=i/2*o,g=e+r,A=t+i,I=e+r/2,C=t+i/2;n.beginPath(),n.moveTo(e,C),n.bezierCurveTo(e,C-a,I-s,t,I,t),n.bezierCurveTo(I+s,t,g,C-a,g,C),n.bezierCurveTo(g,C+a,I+s,A,I,A),n.bezierCurveTo(I-s,A,e,C+a,e,C),n.closePath()}function Y8(n,e,t,r,i){const o=.3333333333333333,s=r,a=i*o,g=.5522848,A=s/2*g,I=a/2*g,C=e+s,l=t+a,d=e+s/2,u=t+a/2,h=t+(i-a/2),p=t+i;n.beginPath(),n.moveTo(C,u),n.bezierCurveTo(C,u+I,d+A,l,d,l),n.bezierCurveTo(d-A,l,e,u+I,e,u),n.bezierCurveTo(e,u-I,d-A,t,d,t),n.bezierCurveTo(d+A,t,C,u-I,C,u),n.lineTo(C,h),n.bezierCurveTo(C,h+I,d+A,p,d,p),n.bezierCurveTo(d-A,p,e,h+I,e,h),n.lineTo(e,u)}function K8(n,e,t,r,i,o){n.beginPath(),n.moveTo(e,t);const s=o.length,a=r-e,g=i-t,A=g/a;let I=Math.sqrt(a*a+g*g),C=0,l=!0,d=0,u=+o[0];for(;I>=.1;)u=+o[C++%s],u>I&&(u=I),d=Math.sqrt(u*u/(1+A*A)),d=a<0?-d:d,e+=d,t+=A*d,l===!0?n.lineTo(e,t):n.moveTo(e,t),I-=u,l=!l}function qTe(n,e,t,r){n.beginPath();const i=6,o=Math.PI*2/i;n.moveTo(e+r,t);for(let s=1;s<i;s++)n.lineTo(e+r*Math.cos(o*s),t+r*Math.sin(o*s));n.closePath()}const Fz={circle:qO,dashedLine:K8,database:Y8,diamond:BTe,ellipse:VE,ellipse_vis:VE,hexagon:qTe,roundRect:U8,square:NTe,star:FTe,triangle:MTe,triangleDown:kTe};function zTe(n){return Object.prototype.hasOwnProperty.call(Fz,n)?Fz[n]:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];CanvasRenderingContext2D.prototype[n].call(e,r)}}var ay={exports:{}},Bz;function jTe(){return Bz||(Bz=1,(function(n){n.exports=e;function e(r){if(r)return t(r)}function t(r){for(var i in e.prototype)r[i]=e.prototype[i];return r}e.prototype.on=e.prototype.addEventListener=function(r,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(i),this},e.prototype.once=function(r,i){function o(){this.off(r,o),i.apply(this,arguments)}return o.fn=i,this.on(r,o),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(r,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var o=this._callbacks["$"+r];if(!o)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var s,a=0;a<o.length;a++)if(s=o[a],s===i||s.fn===i){o.splice(a,1);break}return o.length===0&&delete this._callbacks["$"+r],this},e.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),o=this._callbacks["$"+r],s=1;s<arguments.length;s++)i[s-1]=arguments[s];if(o){o=o.slice(0);for(var s=0,a=o.length;s<a;++s)o[s].apply(this,i)}return this},e.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]},e.prototype.hasListeners=function(r){return!!this.listeners(r).length}})(ay)),ay.exports}var LTe=jTe(),X8=ue(LTe);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
 * http://naver.github.io/egjs
 *
 * Forked By Naver egjs
 * Copyright (c) hammerjs
 * Licensed under the MIT license */function Xr(){return Xr=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Xr.apply(this,arguments)}function qr(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}function hI(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}var ZE;typeof Object.assign!="function"?ZE=function(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(i!=null)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:ZE=Object.assign;var oo=ZE,qz=["","webkit","Moz","MS","ms","o"],GTe=typeof document>"u"?{style:{}}:document.createElement("div"),WTe="function",as=Math.round,so=Math.abs,zO=Date.now;function cl(n,e){for(var t,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<qz.length;){if(t=qz[o],r=t?t+i:e,r in n)return r;o++}}var _i;typeof window>"u"?_i={}:_i=window;var Q8=cl(GTe.style,"touchAction"),J8=Q8!==void 0;function VTe(){if(!J8)return!1;var n={},e=_i.CSS&&_i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return n[t]=e?_i.CSS.supports("touch-action",t):!0}),n}var e9="compute",t9="auto",HE="manipulation",Un="none",Fg="pan-x",Bg="pan-y",cI=VTe(),ZTe=/mobile|tablet|ip(ad|hone|od)|android/i,r9="ontouchstart"in _i,HTe=cl(_i,"PointerEvent")!==void 0,UTe=r9&&ZTe.test(navigator.userAgent),DA="touch",YTe="pen",jO="mouse",KTe="kinect",XTe=25,Qt=1,_o=2,dt=4,Ar=8,nC=1,NA=2,MA=4,kA=8,js=16,Ii=NA|MA,Yn=kA|js,i9=Ii|Yn,n9=["x","y"],oC=["clientX","clientY"];function Pi(n,e,t){var r;if(n)if(n.forEach)n.forEach(e,t);else if(n.length!==void 0)for(r=0;r<n.length;)e.call(t,n[r],r,n),r++;else for(r in n)n.hasOwnProperty(r)&&e.call(t,n[r],r,n)}function fl(n,e){return typeof n===WTe?n.apply(e&&e[0]||void 0,e):n}function qn(n,e){return n.indexOf(e)>-1}function QTe(n){if(qn(n,Un))return Un;var e=qn(n,Fg),t=qn(n,Bg);return e&&t?Un:e||t?e?Fg:Bg:qn(n,HE)?HE:t9}var o9=(function(){function n(t,r){this.manager=t,this.set(r)}var e=n.prototype;return e.set=function(r){r===e9&&(r=this.compute()),J8&&this.manager.element.style&&cI[r]&&(this.manager.element.style[Q8]=r),this.actions=r.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var r=[];return Pi(this.manager.recognizers,function(i){fl(i.options.enable,[i])&&(r=r.concat(i.getTouchAction()))}),QTe(r.join(" "))},e.preventDefaults=function(r){var i=r.srcEvent,o=r.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var s=this.actions,a=qn(s,Un)&&!cI[Un],g=qn(s,Bg)&&!cI[Bg],A=qn(s,Fg)&&!cI[Fg];if(a){var I=r.pointers.length===1,C=r.distance<2,l=r.deltaTime<250;if(I&&C&&l)return}if(!(A&&g)&&(a||g&&o&Ii||A&&o&Yn))return this.preventSrc(i)},e.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},n})();function LO(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}function s9(n){var e=n.length;if(e===1)return{x:as(n[0].clientX),y:as(n[0].clientY)};for(var t=0,r=0,i=0;i<e;)t+=n[i].clientX,r+=n[i].clientY,i++;return{x:as(t/e),y:as(r/e)}}function zz(n){for(var e=[],t=0;t<n.pointers.length;)e[t]={clientX:as(n.pointers[t].clientX),clientY:as(n.pointers[t].clientY)},t++;return{timeStamp:zO(),pointers:e,center:s9(e),deltaX:n.deltaX,deltaY:n.deltaY}}function sC(n,e,t){t||(t=n9);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.sqrt(r*r+i*i)}function UE(n,e,t){t||(t=n9);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.atan2(i,r)*180/Math.PI}function a9(n,e){return n===e?nC:so(n)>=so(e)?n<0?NA:MA:e<0?kA:js}function JTe(n,e){var t=e.center,r=n.offsetDelta||{},i=n.prevDelta||{},o=n.prevInput||{};(e.eventType===Qt||o.eventType===dt)&&(i=n.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=n.offsetDelta={x:t.x,y:t.y}),e.deltaX=i.x+(t.x-r.x),e.deltaY=i.y+(t.y-r.y)}function g9(n,e,t){return{x:e/n||0,y:t/n||0}}function e_e(n,e){return sC(e[0],e[1],oC)/sC(n[0],n[1],oC)}function t_e(n,e){return UE(e[1],e[0],oC)+UE(n[1],n[0],oC)}function r_e(n,e){var t=n.lastInterval||e,r=e.timeStamp-t.timeStamp,i,o,s,a;if(e.eventType!==Ar&&(r>XTe||t.velocity===void 0)){var g=e.deltaX-t.deltaX,A=e.deltaY-t.deltaY,I=g9(r,g,A);o=I.x,s=I.y,i=so(I.x)>so(I.y)?I.x:I.y,a=a9(g,A),n.lastInterval=e}else i=t.velocity,o=t.velocityX,s=t.velocityY,a=t.direction;e.velocity=i,e.velocityX=o,e.velocityY=s,e.direction=a}function i_e(n,e){var t=n.session,r=e.pointers,i=r.length;t.firstInput||(t.firstInput=zz(e)),i>1&&!t.firstMultiple?t.firstMultiple=zz(e):i===1&&(t.firstMultiple=!1);var o=t.firstInput,s=t.firstMultiple,a=s?s.center:o.center,g=e.center=s9(r);e.timeStamp=zO(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=UE(a,g),e.distance=sC(a,g),JTe(t,e),e.offsetDirection=a9(e.deltaX,e.deltaY);var A=g9(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=A.x,e.overallVelocityY=A.y,e.overallVelocity=so(A.x)>so(A.y)?A.x:A.y,e.scale=s?e_e(s.pointers,r):1,e.rotation=s?t_e(s.pointers,r):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,r_e(t,e);var I=n.element,C=e.srcEvent,l;C.composedPath?l=C.composedPath()[0]:C.path?l=C.path[0]:l=C.target,LO(l,I)&&(I=l),e.target=I}function n_e(n,e,t){var r=t.pointers.length,i=t.changedPointers.length,o=e&Qt&&r-i===0,s=e&(dt|Ar)&&r-i===0;t.isFirst=!!o,t.isFinal=!!s,o&&(n.session={}),t.eventType=e,i_e(n,t),n.emit("hammer.input",t),n.recognize(t),n.session.prevInput=t}function qg(n){return n.trim().split(/\s+/g)}function ug(n,e,t){Pi(qg(e),function(r){n.addEventListener(r,t,!1)})}function hg(n,e,t){Pi(qg(e),function(r){n.removeEventListener(r,t,!1)})}function jz(n){var e=n.ownerDocument||n;return e.defaultView||e.parentWindow||window}var Ra=(function(){function n(t,r){var i=this;this.manager=t,this.callback=r,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(o){fl(t.options.enable,[t])&&i.handler(o)},this.init()}var e=n.prototype;return e.handler=function(){},e.init=function(){this.evEl&&ug(this.element,this.evEl,this.domHandler),this.evTarget&&ug(this.target,this.evTarget,this.domHandler),this.evWin&&ug(jz(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&hg(this.element,this.evEl,this.domHandler),this.evTarget&&hg(this.target,this.evTarget,this.domHandler),this.evWin&&hg(jz(this.element),this.evWin,this.domHandler)},n})();function ao(n,e,t){if(n.indexOf&&!t)return n.indexOf(e);for(var r=0;r<n.length;){if(t&&n[r][t]==e||!t&&n[r]===e)return r;r++}return-1}var o_e={pointerdown:Qt,pointermove:_o,pointerup:dt,pointercancel:Ar,pointerout:Ar},s_e={2:DA,3:YTe,4:jO,5:KTe},A9="pointerdown",I9="pointermove pointerup pointercancel";_i.MSPointerEvent&&!_i.PointerEvent&&(A9="MSPointerDown",I9="MSPointerMove MSPointerUp MSPointerCancel");var C9=(function(n){qr(e,n);function e(){var r,i=e.prototype;return i.evEl=A9,i.evWin=I9,r=n.apply(this,arguments)||this,r.store=r.manager.session.pointerEvents=[],r}var t=e.prototype;return t.handler=function(i){var o=this.store,s=!1,a=i.type.toLowerCase().replace("ms",""),g=o_e[a],A=s_e[i.pointerType]||i.pointerType,I=A===DA,C=ao(o,i.pointerId,"pointerId");g&Qt&&(i.button===0||I)?C<0&&(o.push(i),C=o.length-1):g&(dt|Ar)&&(s=!0),!(C<0)&&(o[C]=i,this.callback(this.manager,g,{pointers:o,changedPointers:[i],pointerType:A,srcEvent:i}),s&&o.splice(C,1))},e})(Ra);function zg(n){return Array.prototype.slice.call(n,0)}function GO(n,e,t){for(var r=[],i=[],o=0;o<n.length;){var s=e?n[o][e]:n[o];ao(i,s)<0&&r.push(n[o]),i[o]=s,o++}return t&&(e?r=r.sort(function(a,g){return a[e]>g[e]}):r=r.sort()),r}var a_e={touchstart:Qt,touchmove:_o,touchend:dt,touchcancel:Ar},g_e="touchstart touchmove touchend touchcancel",WO=(function(n){qr(e,n);function e(){var r;return e.prototype.evTarget=g_e,r=n.apply(this,arguments)||this,r.targetIds={},r}var t=e.prototype;return t.handler=function(i){var o=a_e[i.type],s=A_e.call(this,i,o);s&&this.callback(this.manager,o,{pointers:s[0],changedPointers:s[1],pointerType:DA,srcEvent:i})},e})(Ra);function A_e(n,e){var t=zg(n.touches),r=this.targetIds;if(e&(Qt|_o)&&t.length===1)return r[t[0].identifier]=!0,[t,t];var i,o,s=zg(n.changedTouches),a=[],g=this.target;if(o=t.filter(function(A){return LO(A.target,g)}),e===Qt)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<s.length;)r[s[i].identifier]&&a.push(s[i]),e&(dt|Ar)&&delete r[s[i].identifier],i++;if(a.length)return[GO(o.concat(a),"identifier",!0),a]}var I_e={mousedown:Qt,mousemove:_o,mouseup:dt},C_e="mousedown",l_e="mousemove mouseup",VO=(function(n){qr(e,n);function e(){var r,i=e.prototype;return i.evEl=C_e,i.evWin=l_e,r=n.apply(this,arguments)||this,r.pressed=!1,r}var t=e.prototype;return t.handler=function(i){var o=I_e[i.type];o&Qt&&i.button===0&&(this.pressed=!0),o&_o&&i.which!==1&&(o=dt),this.pressed&&(o&dt&&(this.pressed=!1),this.callback(this.manager,o,{pointers:[i],changedPointers:[i],pointerType:jO,srcEvent:i}))},e})(Ra),d_e=2500,Lz=25;function Gz(n){var e=n.changedPointers,t=e[0];if(t.identifier===this.primaryTouch){var r={x:t.clientX,y:t.clientY},i=this.lastTouches;this.lastTouches.push(r);var o=function(){var a=i.indexOf(r);a>-1&&i.splice(a,1)};setTimeout(o,d_e)}}function u_e(n,e){n&Qt?(this.primaryTouch=e.changedPointers[0].identifier,Gz.call(this,e)):n&(dt|Ar)&&Gz.call(this,e)}function h_e(n){for(var e=n.srcEvent.clientX,t=n.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),s=Math.abs(t-i.y);if(o<=Lz&&s<=Lz)return!0}return!1}var l9=(function(){var n=(function(e){qr(t,e);function t(i,o){var s;return s=e.call(this,i,o)||this,s.handler=function(a,g,A){var I=A.pointerType===DA,C=A.pointerType===jO;if(!(C&&A.sourceCapabilities&&A.sourceCapabilities.firesTouchEvents)){if(I)u_e.call(hI(hI(s)),g,A);else if(C&&h_e.call(hI(hI(s)),A))return;s.callback(a,g,A)}},s.touch=new WO(s.manager,s.handler),s.mouse=new VO(s.manager,s.handler),s.primaryTouch=null,s.lastTouches=[],s}var r=t.prototype;return r.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t})(Ra);return n})();function c_e(n){var e,t=n.options.inputClass;return t?e=t:HTe?e=C9:UTe?e=WO:r9?e=l9:e=VO,new e(n,n_e)}function gs(n,e,t){return Array.isArray(n)?(Pi(n,t[e],t),!0):!1}var xI=1,xr=2,Ls=4,on=8,Ri=on,jg=16,oi=32,f_e=1;function p_e(){return f_e++}function fI(n,e){var t=e.manager;return t?t.get(n):n}function Wz(n){return n&jg?"cancel":n&on?"end":n&Ls?"move":n&xr?"start":""}var FA=(function(){function n(t){t===void 0&&(t={}),this.options=Xr({enable:!0},t),this.id=p_e(),this.manager=null,this.state=xI,this.simultaneous={},this.requireFail=[]}var e=n.prototype;return e.set=function(r){return oo(this.options,r),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(r){if(gs(r,"recognizeWith",this))return this;var i=this.simultaneous;return r=fI(r,this),i[r.id]||(i[r.id]=r,r.recognizeWith(this)),this},e.dropRecognizeWith=function(r){return gs(r,"dropRecognizeWith",this)?this:(r=fI(r,this),delete this.simultaneous[r.id],this)},e.requireFailure=function(r){if(gs(r,"requireFailure",this))return this;var i=this.requireFail;return r=fI(r,this),ao(i,r)===-1&&(i.push(r),r.requireFailure(this)),this},e.dropRequireFailure=function(r){if(gs(r,"dropRequireFailure",this))return this;r=fI(r,this);var i=ao(this.requireFail,r);return i>-1&&this.requireFail.splice(i,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(r){return!!this.simultaneous[r.id]},e.emit=function(r){var i=this,o=this.state;function s(a){i.manager.emit(a,r)}o<on&&s(i.options.event+Wz(o)),s(i.options.event),r.additionalEvent&&s(r.additionalEvent),o>=on&&s(i.options.event+Wz(o))},e.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=oi},e.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(oi|xI)))return!1;r++}return!0},e.recognize=function(r){var i=oo({},r);if(!fl(this.options.enable,[this,i])){this.reset(),this.state=oi;return}this.state&(Ri|jg|oi)&&(this.state=xI),this.state=this.process(i),this.state&(xr|Ls|on|jg)&&this.tryEmit(i)},e.process=function(r){},e.getTouchAction=function(){},e.reset=function(){},n})(),YE=(function(n){qr(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,Xr({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},r))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var t=e.prototype;return t.getTouchAction=function(){return[HE]},t.process=function(i){var o=this,s=this.options,a=i.pointers.length===s.pointers,g=i.distance<s.threshold,A=i.deltaTime<s.time;if(this.reset(),i.eventType&Qt&&this.count===0)return this.failTimeout();if(g&&A&&a){if(i.eventType!==dt)return this.failTimeout();var I=this.pTime?i.timeStamp-this.pTime<s.interval:!0,C=!this.pCenter||sC(this.pCenter,i.center)<s.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!C||!I?this.count=1:this.count+=1,this._input=i;var l=this.count%s.taps;if(l===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){o.state=Ri,o.tryEmit()},s.interval),xr):Ri}return oi},t.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=oi},this.options.interval),oi},t.reset=function(){clearTimeout(this._timer)},t.emit=function(){this.state===Ri&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e})(FA),Gs=(function(n){qr(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Xr({pointers:1},r))||this}var t=e.prototype;return t.attrTest=function(i){var o=this.options.pointers;return o===0||i.pointers.length===o},t.process=function(i){var o=this.state,s=i.eventType,a=o&(xr|Ls),g=this.attrTest(i);return a&&(s&Ar||!g)?o|jg:a||g?s&dt?o|on:o&xr?o|Ls:xr:oi},e})(FA);function d9(n){return n===js?"down":n===kA?"up":n===NA?"left":n===MA?"right":""}var ZO=(function(n){qr(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,Xr({event:"pan",threshold:10,pointers:1,direction:i9},r))||this,i.pX=null,i.pY=null,i}var t=e.prototype;return t.getTouchAction=function(){var i=this.options.direction,o=[];return i&Ii&&o.push(Bg),i&Yn&&o.push(Fg),o},t.directionTest=function(i){var o=this.options,s=!0,a=i.distance,g=i.direction,A=i.deltaX,I=i.deltaY;return g&o.direction||(o.direction&Ii?(g=A===0?nC:A<0?NA:MA,s=A!==this.pX,a=Math.abs(i.deltaX)):(g=I===0?nC:I<0?kA:js,s=I!==this.pY,a=Math.abs(i.deltaY))),i.direction=g,s&&a>o.threshold&&g&o.direction},t.attrTest=function(i){return Gs.prototype.attrTest.call(this,i)&&(this.state&xr||!(this.state&xr)&&this.directionTest(i))},t.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var o=d9(i.direction);o&&(i.additionalEvent=this.options.event+o),n.prototype.emit.call(this,i)},e})(Gs),u9=(function(n){qr(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Xr({event:"swipe",threshold:10,velocity:.3,direction:Ii|Yn,pointers:1},r))||this}var t=e.prototype;return t.getTouchAction=function(){return ZO.prototype.getTouchAction.call(this)},t.attrTest=function(i){var o=this.options.direction,s;return o&(Ii|Yn)?s=i.overallVelocity:o&Ii?s=i.overallVelocityX:o&Yn&&(s=i.overallVelocityY),n.prototype.attrTest.call(this,i)&&o&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&so(s)>this.options.velocity&&i.eventType&dt},t.emit=function(i){var o=d9(i.offsetDirection);o&&this.manager.emit(this.options.event+o,i),this.manager.emit(this.options.event,i)},e})(Gs),h9=(function(n){qr(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Xr({event:"pinch",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[Un]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&xr)},t.emit=function(i){if(i.scale!==1){var o=i.scale<1?"in":"out";i.additionalEvent=this.options.event+o}n.prototype.emit.call(this,i)},e})(Gs),c9=(function(n){qr(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Xr({event:"rotate",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[Un]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&xr)},e})(Gs),f9=(function(n){qr(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,Xr({event:"press",pointers:1,time:251,threshold:9},r))||this,i._timer=null,i._input=null,i}var t=e.prototype;return t.getTouchAction=function(){return[t9]},t.process=function(i){var o=this,s=this.options,a=i.pointers.length===s.pointers,g=i.distance<s.threshold,A=i.deltaTime>s.time;if(this._input=i,!g||!a||i.eventType&(dt|Ar)&&!A)this.reset();else if(i.eventType&Qt)this.reset(),this._timer=setTimeout(function(){o.state=Ri,o.tryEmit()},s.time);else if(i.eventType&dt)return Ri;return oi},t.reset=function(){clearTimeout(this._timer)},t.emit=function(i){this.state===Ri&&(i&&i.eventType&dt?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=zO(),this.manager.emit(this.options.event,this._input)))},e})(FA),p9={domEvents:!1,touchAction:e9,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Vz=[[c9,{enable:!1}],[h9,{enable:!1},["rotate"]],[u9,{direction:Ii}],[ZO,{direction:Ii},["swipe"]],[YE],[YE,{event:"doubletap",taps:2},["tap"]],[f9]],v_e=1,Zz=2;function Hz(n,e){var t=n.element;if(t.style){var r;Pi(n.options.cssProps,function(i,o){r=cl(t.style,o),e?(n.oldCssProps[r]=t.style[r],t.style[r]=i):t.style[r]=n.oldCssProps[r]||""}),e||(n.oldCssProps={})}}function m_e(n,e){var t=document.createEvent("Event");t.initEvent(n,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var Uz=(function(){function n(t,r){var i=this;this.options=oo({},p9,r||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=c_e(this),this.touchAction=new o9(this,this.options.touchAction),Hz(this,!0),Pi(this.options.recognizers,function(o){var s=i.add(new o[0](o[1]));o[2]&&s.recognizeWith(o[2]),o[3]&&s.requireFailure(o[3])},this)}var e=n.prototype;return e.set=function(r){return oo(this.options,r),r.touchAction&&this.touchAction.update(),r.inputTarget&&(this.input.destroy(),this.input.target=r.inputTarget,this.input.init()),this},e.stop=function(r){this.session.stopped=r?Zz:v_e},e.recognize=function(r){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(r);var o,s=this.recognizers,a=i.curRecognizer;(!a||a&&a.state&Ri)&&(i.curRecognizer=null,a=null);for(var g=0;g<s.length;)o=s[g],i.stopped!==Zz&&(!a||o===a||o.canRecognizeWith(a))?o.recognize(r):o.reset(),!a&&o.state&(xr|Ls|on)&&(i.curRecognizer=o,a=o),g++}},e.get=function(r){if(r instanceof FA)return r;for(var i=this.recognizers,o=0;o<i.length;o++)if(i[o].options.event===r)return i[o];return null},e.add=function(r){if(gs(r,"add",this))return this;var i=this.get(r.options.event);return i&&this.remove(i),this.recognizers.push(r),r.manager=this,this.touchAction.update(),r},e.remove=function(r){if(gs(r,"remove",this))return this;var i=this.get(r);if(r){var o=this.recognizers,s=ao(o,i);s!==-1&&(o.splice(s,1),this.touchAction.update())}return this},e.on=function(r,i){if(r===void 0||i===void 0)return this;var o=this.handlers;return Pi(qg(r),function(s){o[s]=o[s]||[],o[s].push(i)}),this},e.off=function(r,i){if(r===void 0)return this;var o=this.handlers;return Pi(qg(r),function(s){i?o[s]&&o[s].splice(ao(o[s],i),1):delete o[s]}),this},e.emit=function(r,i){this.options.domEvents&&m_e(r,i);var o=this.handlers[r]&&this.handlers[r].slice();if(!(!o||!o.length)){i.type=r,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var s=0;s<o.length;)o[s](i),s++}},e.destroy=function(){this.element&&Hz(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},n})(),y_e={touchstart:Qt,touchmove:_o,touchend:dt,touchcancel:Ar},b_e="touchstart",w_e="touchstart touchmove touchend touchcancel",E_e=(function(n){qr(e,n);function e(){var r,i=e.prototype;return i.evTarget=b_e,i.evWin=w_e,r=n.apply(this,arguments)||this,r.started=!1,r}var t=e.prototype;return t.handler=function(i){var o=y_e[i.type];if(o===Qt&&(this.started=!0),!!this.started){var s=S_e.call(this,i,o);o&(dt|Ar)&&s[0].length-s[1].length===0&&(this.started=!1),this.callback(this.manager,o,{pointers:s[0],changedPointers:s[1],pointerType:DA,srcEvent:i})}},e})(Ra);function S_e(n,e){var t=zg(n.touches),r=zg(n.changedTouches);return e&(dt|Ar)&&(t=GO(t.concat(r),"identifier",!0)),[t,r]}function v9(n,e,t){var r="DEPRECATED METHOD: "+e+`
`+t+` AT 
`;return function(){var i=new Error("get-stack-trace"),o=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=window.console&&(window.console.warn||window.console.log);return s&&s.call(window.console,r,o),n.apply(this,arguments)}}var m9=v9(function(n,e,t){for(var r=Object.keys(e),i=0;i<r.length;)(!t||t&&n[r[i]]===void 0)&&(n[r[i]]=e[r[i]]),i++;return n},"extend","Use `assign`."),O_e=v9(function(n,e){return m9(n,e,!0)},"merge","Use `assign`.");function T_e(n,e,t){var r=e.prototype,i;i=n.prototype=Object.create(r),i.constructor=n,i._super=r,t&&oo(i,t)}function Yz(n,e){return function(){return n.apply(e,arguments)}}var y9=(function(){var n=function(t,r){return r===void 0&&(r={}),new Uz(t,Xr({recognizers:Vz.concat()},r))};return n.VERSION="2.0.17-rc",n.DIRECTION_ALL=i9,n.DIRECTION_DOWN=js,n.DIRECTION_LEFT=NA,n.DIRECTION_RIGHT=MA,n.DIRECTION_UP=kA,n.DIRECTION_HORIZONTAL=Ii,n.DIRECTION_VERTICAL=Yn,n.DIRECTION_NONE=nC,n.DIRECTION_DOWN=js,n.INPUT_START=Qt,n.INPUT_MOVE=_o,n.INPUT_END=dt,n.INPUT_CANCEL=Ar,n.STATE_POSSIBLE=xI,n.STATE_BEGAN=xr,n.STATE_CHANGED=Ls,n.STATE_ENDED=on,n.STATE_RECOGNIZED=Ri,n.STATE_CANCELLED=jg,n.STATE_FAILED=oi,n.Manager=Uz,n.Input=Ra,n.TouchAction=o9,n.TouchInput=WO,n.MouseInput=VO,n.PointerEventInput=C9,n.TouchMouseInput=l9,n.SingleTouchInput=E_e,n.Recognizer=FA,n.AttrRecognizer=Gs,n.Tap=YE,n.Pan=ZO,n.Swipe=u9,n.Pinch=h9,n.Rotate=c9,n.Press=f9,n.on=ug,n.off=hg,n.each=Pi,n.merge=O_e,n.extend=m9,n.bindFn=Yz,n.assign=oo,n.inherit=T_e,n.bindFn=Yz,n.prefixed=cl,n.toArray=zg,n.inArray=ao,n.uniqueArray=GO,n.splitStr=qg,n.boolOrFn=fl,n.hasParent=LO,n.addEventListeners=ug,n.removeEventListeners=hg,n.defaults=oo({},p9,{preset:Vz}),n})();y9.defaults;/**
 * vis-util
 * https://github.com/visjs/vis-util
 *
 * utilitie collection for visjs
 *
 * @version 6.0.0
 * @date    2025-07-12T18:02:43.836Z
 *
 * @copyright (c) 2011-2017 Almende B.V, http://almende.com
 * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
 *
 * @license
 * vis.js is dual licensed under both
 *
 *   1. The Apache 2.0 License
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *   and
 *
 *   2. The MIT License
 *      http://opensource.org/licenses/MIT
 *
 * vis.js may be distributed under either license.
 */function pl(...n){return __e(n.length?n:[Date.now()])}function __e(n){let[e,t,r]=P_e(n),i=1;const o=()=>{const s=2091639*e+i*23283064365386963e-26;return e=t,t=r,r=s-(i=s|0)};return o.uint32=()=>o()*4294967296,o.fract53=()=>o()+(o()*2097152|0)*11102230246251565e-32,o.algorithm="Alea",o.seed=n,o.version="0.9",o}function P_e(...n){const e=R_e();let t=e(" "),r=e(" "),i=e(" ");for(let o=0;o<n.length;o++)t-=e(n[o]),t<0&&(t+=1),r-=e(n[o]),r<0&&(r+=1),i-=e(n[o]),i<0&&(i+=1);return[t,r,i]}function R_e(){let n=4022871197;return function(e){const t=e.toString();for(let r=0;r<t.length;r++){n+=t.charCodeAt(r);let i=.02519603282416938*n;n=i>>>0,i-=n,i*=n,n=i>>>0,i-=n,n+=i*4294967296}return(n>>>0)*23283064365386963e-26}}function x_e(){const n=()=>{};return{on:n,off:n,destroy:n,emit:n,get(){return{set:n}}}}const HO=typeof window<"u"?window.Hammer||y9:function(){return x_e()};function si(n){this._cleanupQueue=[],this.active=!1,this._dom={container:n,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const e=HO(this._dom.overlay);e.on("tap",this._onTapOverlay.bind(this)),this._cleanupQueue.push(()=>{e.destroy()}),["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(r=>{e.on(r,i=>{i.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=r=>{$_e(r.target,n)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=r=>{("key"in r?r.key==="Escape":r.keyCode===27)&&this.deactivate()}}X8(si.prototype);si.current=null;si.prototype.destroy=function(){this.deactivate();for(const n of this._cleanupQueue.splice(0).reverse())n()};si.prototype.activate=function(){si.current&&si.current.deactivate(),si.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};si.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};si.prototype._onTapOverlay=function(n){this.activate(),n.srcEvent.stopPropagation()};function $_e(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}const D_e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,N_e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,M_e=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,k_e=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function Vi(n){if(n)for(;n.hasChildNodes()===!0;){const e=n.firstChild;e&&(Vi(e),n.removeChild(e))}}function vs(n){return n instanceof String||typeof n=="string"}function Kz(n){return typeof n=="object"&&n!==null}function go(n,e,t,r){let i=!1;r===!0&&(i=e[t]===null&&n[t]!==void 0),i?delete n[t]:n[t]=e[t]}function b9(n,e,t=!1){for(const r in n)if(e[r]!==void 0)if(e[r]===null||typeof e[r]!="object")go(n,e,r,t);else{const i=n[r],o=e[r];Kz(i)&&Kz(o)&&b9(i,o,t)}}function xa(n,e,t,r=!1){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(let i=0;i<n.length;i++){const o=n[i];if(Object.prototype.hasOwnProperty.call(t,o))if(t[o]&&t[o].constructor===Object)e[o]===void 0&&(e[o]={}),e[o].constructor===Object?ke(e[o],t[o],!1,r):go(e,t,o,r);else{if(Array.isArray(t[o]))throw new TypeError("Arrays are not supported by deepExtend");go(e,t,o,r)}}return e}function aC(n,e,t,r=!1){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&!n.includes(i))if(t[i]&&t[i].constructor===Object)e[i]===void 0&&(e[i]={}),e[i].constructor===Object?ke(e[i],t[i]):go(e,t,i,r);else if(Array.isArray(t[i])){e[i]=[];for(let o=0;o<t[i].length;o++)e[i].push(t[i][o])}else go(e,t,i,r);return e}function ke(n,e,t=!1,r=!1){for(const i in e)(Object.prototype.hasOwnProperty.call(e,i)||t===!0)&&(typeof e[i]=="object"&&e[i]!==null&&Object.getPrototypeOf(e[i])===Object.prototype?n[i]===void 0?n[i]=ke({},e[i],t):typeof n[i]=="object"&&n[i]!==null&&Object.getPrototypeOf(n[i])===Object.prototype?ke(n[i],e[i],t):go(n,e,i,r):Array.isArray(e[i])?n[i]=e[i].slice():go(n,e,i,r));return n}function gC(n,e){return[...n,e]}function F_e(n){return n.slice()}function B_e(n){return n.getBoundingClientRect().left}function q_e(n){return n.getBoundingClientRect().top}function ve(n,e){if(Array.isArray(n)){const t=n.length;for(let r=0;r<t;r++)e(n[r],r,n)}else for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e(n[t],t,n)}function UO(n){let e;switch(n.length){case 3:case 4:return e=N_e.exec(n),e?{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16)}:null;case 6:case 7:return e=D_e.exec(n),e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null;default:return null}}function _r(n,e){if(n.includes("rgba"))return n;if(n.includes("rgb")){const t=n.substr(n.indexOf("(")+1).replace(")","").split(",");return"rgba("+t[0]+","+t[1]+","+t[2]+","+e+")"}else{const t=UO(n);return t==null?n:"rgba("+t.r+","+t.g+","+t.b+","+e+")"}}function w9(n,e,t){return"#"+((1<<24)+(n<<16)+(e<<8)+t).toString(16).slice(1)}function KE(n,e){if(vs(n)){let t=n;if(S9(t)){const r=t.substr(4).substr(0,t.length-5).split(",").map(function(i){return parseInt(i)});t=w9(r[0],r[1],r[2])}if(E9(t)===!0){const r=z_e(t),i={h:r.h,s:r.s*.8,v:Math.min(1,r.v*1.02)},o={h:r.h,s:Math.min(1,r.s*1.25),v:r.v*.8},s=XE(o.h,o.s,o.v),a=XE(i.h,i.s,i.v);return{background:t,border:s,highlight:{background:a,border:s},hover:{background:a,border:s}}}else return{background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else return{background:n.background||void 0,border:n.border||void 0,highlight:vs(n.highlight)?{border:n.highlight,background:n.highlight}:{background:n.highlight&&n.highlight.background||void 0,border:n.highlight&&n.highlight.border||void 0},hover:vs(n.hover)?{border:n.hover,background:n.hover}:{border:n.hover&&n.hover.border||void 0,background:n.hover&&n.hover.background||void 0}}}function tg(n,e,t){n=n/255,e=e/255,t=t/255;const r=Math.min(n,Math.min(e,t)),i=Math.max(n,Math.max(e,t));if(r===i)return{h:0,s:0,v:r};const o=n===r?e-t:t===r?n-e:t-n,a=60*((n===r?3:t===r?1:5)-o/(i-r))/360,g=(i-r)/i;return{h:a,s:g,v:i}}function $I(n,e,t){let r,i,o;const s=Math.floor(n*6),a=n*6-s,g=t*(1-e),A=t*(1-a*e),I=t*(1-(1-a)*e);switch(s%6){case 0:r=t,i=I,o=g;break;case 1:r=A,i=t,o=g;break;case 2:r=g,i=t,o=I;break;case 3:r=g,i=A,o=t;break;case 4:r=I,i=g,o=t;break;case 5:r=t,i=g,o=A;break}return{r:Math.floor(r*255),g:Math.floor(i*255),b:Math.floor(o*255)}}function XE(n,e,t){const r=$I(n,e,t);return w9(r.r,r.g,r.b)}function z_e(n){const e=UO(n);if(!e)throw new TypeError(`'${n}' is not a valid color.`);return tg(e.r,e.g,e.b)}function E9(n){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(n)}function S9(n){return M_e.test(n)}function j_e(n){return k_e.test(n)}function sn(n){if(n===null||typeof n!="object")return null;if(n instanceof Element)return n;const e=Object.create(n);for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&typeof n[t]=="object"&&(e[t]=sn(n[t]));return e}function Or(n,e,t,r={}){const i=function(d){return d!=null},o=function(d){return d!==null&&typeof d=="object"},s=function(d){for(const u in d)if(Object.prototype.hasOwnProperty.call(d,u))return!1;return!0};if(!o(n))throw new Error("Parameter mergeTarget must be an object");if(!o(e))throw new Error("Parameter options must be an object");if(!i(t))throw new Error("Parameter option must have a value");if(!o(r))throw new Error("Parameter globalOptions must be an object");const a=function(d,u,h){o(d[h])||(d[h]={});const p=u[h],f=d[h];for(const c in p)Object.prototype.hasOwnProperty.call(p,c)&&(f[c]=p[c])},g=e[t],I=o(r)&&!s(r)?r[t]:void 0,C=I?I.enabled:void 0;if(g===void 0)return;if(typeof g=="boolean"){o(n[t])||(n[t]={}),n[t].enabled=g;return}if(g===null&&!o(n[t]))if(i(I))n[t]=Object.create(I);else return;if(!o(g))return;let l=!0;g.enabled!==void 0?l=g.enabled:C!==void 0&&(l=I.enabled),a(n,e,t),n[t].enabled=l}const L_e={linear(n){return n},easeInQuad(n){return n*n},easeOutQuad(n){return n*(2-n)},easeInOutQuad(n){return n<.5?2*n*n:-1+(4-2*n)*n},easeInCubic(n){return n*n*n},easeOutCubic(n){return--n*n*n+1},easeInOutCubic(n){return n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1},easeInQuart(n){return n*n*n*n},easeOutQuart(n){return 1- --n*n*n*n},easeInOutQuart(n){return n<.5?8*n*n*n*n:1-8*--n*n*n*n},easeInQuint(n){return n*n*n*n*n},easeOutQuint(n){return 1+--n*n*n*n*n},easeInOutQuint(n){return n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n}};function Zi(n,e){let t;Array.isArray(e)||(e=[e]);for(const r of n)if(r){t=r[e[0]];for(let i=1;i<e.length;i++)t&&(t=t[e[i]]);if(typeof t<"u")break}return t}const G_e={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};let W_e=class{constructor(e=1){this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}setCloseCallback(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}_isColorString(e){if(typeof e=="string")return G_e[e]}setColor(e,t=!0){if(e==="none")return;let r;const i=this._isColorString(e);if(i!==void 0&&(e=i),vs(e)===!0){if(S9(e)===!0){const o=e.substr(4).substr(0,e.length-5).split(",");r={r:o[0],g:o[1],b:o[2],a:1}}else if(j_e(e)===!0){const o=e.substr(5).substr(0,e.length-6).split(",");r={r:o[0],g:o[1],b:o[2],a:o[3]}}else if(E9(e)===!0){const o=UO(e);r={r:o.r,g:o.g,b:o.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){const o=e.a!==void 0?e.a:"1.0";r={r:e.r,g:e.g,b:e.b,a:o}}if(r===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+JSON.stringify(e));this._setColor(r,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(e=!0){e===!0&&(this.previousColor=Object.assign({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(e,t=!0){t===!0&&(this.initialColor=Object.assign({},e)),this.color=e;const r=tg(e.r,e.g,e.b),i=2*Math.PI,o=this.r*r.s,s=this.centerCoordinates.x+o*Math.sin(i*r.h),a=this.centerCoordinates.y+o*Math.cos(i*r.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){const t=tg(this.color.r,this.color.g,this.color.b);t.v=e/100;const r=$I(t.h,t.s,t.v);r.a=this.color.a,this.color=r,this._updatePicker()}_updatePicker(e=this.color){const t=tg(e.r,e.g,e.b),r=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1)),r.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const i=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;r.clearRect(0,0,i,o),r.putImageData(this.hueCircle,0,0),r.fillStyle="rgba(0,0,0,"+(1-t.v)+")",r.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),r.fill(),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){const t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(t)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);const e=this;this.opacityRange.onchange=function(){e._setOpacity(this.value)},this.opacityRange.oninput=function(){e._setOpacity(this.value)},this.brightnessRange.onchange=function(){e._setBrightness(this.value)},this.brightnessRange.oninput=function(){e._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new HO(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on("tap",e=>{this._moveSelector(e)}),this.hammer.on("panstart",e=>{this._moveSelector(e)}),this.hammer.on("panmove",e=>{this._moveSelector(e)}),this.hammer.on("panend",e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){const e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const t=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,r);let i,o,s,a;this.centerCoordinates={x:t*.5,y:r*.5},this.r=.49*t;const g=2*Math.PI/360,A=1/360,I=1/this.r;let C;for(s=0;s<360;s++)for(a=0;a<this.r;a++)i=this.centerCoordinates.x+a*Math.sin(g*s),o=this.centerCoordinates.y+a*Math.cos(g*s),C=$I(s*A,a*I,1),e.fillStyle="rgb("+C.r+","+C.g+","+C.b+")",e.fillRect(i-.5,o-.5,2,2);e.strokeStyle="rgba(0,0,0,1)",e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,r)}this.generated=!0}_moveSelector(e){const t=this.colorPickerDiv.getBoundingClientRect(),r=e.center.x-t.left,i=e.center.y-t.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,a=r-s,g=i-o,A=Math.atan2(a,g),I=.98*Math.min(Math.sqrt(a*a+g*g),s),C=Math.cos(A)*I+o,l=Math.sin(A)*I+s;this.colorPickerSelector.style.top=C-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=l-.5*this.colorPickerSelector.clientWidth+"px";let d=A/(2*Math.PI);d=d<0?d+1:d;const u=I/this.r,h=tg(this.color.r,this.color.g,this.color.b);h.h=d,h.s=u;const p=$I(h.h,h.s,h.v);p.a=this.color.a,this.color=p,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}};function QE(...n){if(n.length<1)throw new TypeError("Invalid arguments.");if(n.length===1)return document.createTextNode(n[0]);{const e=document.createElement(n[0]);return e.appendChild(QE(...n.slice(1))),e}}let V_e=class{constructor(e,t,r,i=1,o=()=>!1){this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=o,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Object.assign(this.options,this.defaultOptions),this.configureOptions=r,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new W_e(i),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e=="string")this.options.filter=e;else if(Array.isArray(e))this.options.filter=e.join();else if(typeof e=="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),e.filter!==void 0&&(this.options.filter=e.filter),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);this.options.filter===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const e=this.options.filter;let t=0,r=!1;for(const i in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,i)&&(this.allowCreation=!1,r=!1,typeof e=="function"?(r=e(i,[]),r=r||this._handleObject(this.configureOptions[i],[i],!0)):(e===!0||e.indexOf(i)!==-1)&&(r=!0),r!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(i),this._handleObject(this.configureOptions[i],[i])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(let e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let t=this.moduleOptions;for(let r=0;r<e.length;r++)if(t[e[r]]!==void 0)t=t[e[r]];else{t=void 0;break}return t}_makeItem(e,...t){if(this.allowCreation===!0){const r=document.createElement("div");return r.className="vis-configuration vis-config-item vis-config-s"+e.length,t.forEach(i=>{r.appendChild(i)}),this.domElements.push(r),this.domElements.length}return 0}_makeHeader(e){const t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}_makeLabel(e,t,r=!1){const i=document.createElement("div");if(i.className="vis-configuration vis-config-label vis-config-s"+t.length,r===!0){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(QE("i","b",e))}else i.innerText=e+":";return i}_makeDropdown(e,t,r){const i=document.createElement("select");i.className="vis-configuration vis-config-select";let o=0;t!==void 0&&e.indexOf(t)!==-1&&(o=e.indexOf(t));for(let g=0;g<e.length;g++){const A=document.createElement("option");A.value=e[g],g===o&&(A.selected="selected"),A.innerText=e[g],i.appendChild(A)}const s=this;i.onchange=function(){s._update(this.value,r)};const a=this._makeLabel(r[r.length-1],r);this._makeItem(r,a,i)}_makeRange(e,t,r){const i=e[0],o=e[1],s=e[2],a=e[3],g=document.createElement("input");g.className="vis-configuration vis-config-range";try{g.type="range",g.min=o,g.max=s}catch{}g.step=a;let A="",I=0;t!==void 0?(t<0&&t*1.2<o?(g.min=Math.ceil(t*1.2),I=g.min,A="range increased"):t/1.2<o&&(g.min=Math.ceil(t/1.2),I=g.min,A="range increased"),t*1.2>s&&s!==1&&(g.max=Math.ceil(t*1.2),I=g.max,A="range increased"),g.value=t):g.value=i;const C=document.createElement("input");C.className="vis-configuration vis-config-rangeinput",C.value=g.value;const l=this;g.onchange=function(){C.value=this.value,l._update(Number(this.value),r)},g.oninput=function(){C.value=this.value};const d=this._makeLabel(r[r.length-1],r),u=this._makeItem(r,d,g,C);A!==""&&this.popupHistory[u]!==I&&(this.popupHistory[u]=I,this._setupPopup(A,u))}_makeButton(){if(this.options.showButton===!0){const e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className="vis-configuration vis-config-button hover"},e.onmouseout=()=>{e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){const r=document.createElement("div");r.id="vis-configuration-popup",r.className="vis-configuration-popup",r.innerText=e,r.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:r,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){const t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=setTimeout(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=setTimeout(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,r){const i=document.createElement("input");i.type="checkbox",i.className="vis-configuration vis-config-checkbox",i.checked=e,t!==void 0&&(i.checked=t,t!==e&&(typeof e=="object"?t!==e.enabled&&this.changedOptions.push({path:r,value:t}):this.changedOptions.push({path:r,value:t})));const o=this;i.onchange=function(){o._update(this.checked,r)};const s=this._makeLabel(r[r.length-1],r);this._makeItem(r,s,i)}_makeTextInput(e,t,r){const i=document.createElement("input");i.type="text",i.className="vis-configuration vis-config-text",i.value=t,t!==e&&this.changedOptions.push({path:r,value:t});const o=this;i.onchange=function(){o._update(this.value,r)};const s=this._makeLabel(r[r.length-1],r);this._makeItem(r,s,i)}_makeColorField(e,t,r){const i=e[1],o=document.createElement("div");t=t===void 0?i:t,t!=="none"?(o.className="vis-configuration vis-config-colorBlock",o.style.backgroundColor=t):o.className="vis-configuration vis-config-colorBlock none",t=t===void 0?i:t,o.onclick=()=>{this._showColorPicker(t,o,r)};const s=this._makeLabel(r[r.length-1],r);this._makeItem(r,s,o)}_showColorPicker(e,t,r){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(i=>{const o="rgba("+i.r+","+i.g+","+i.b+","+i.a+")";t.style.backgroundColor=o,this._update(o,r)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,r)}})}_handleObject(e,t=[],r=!1){let i=!1;const o=this.options.filter;let s=!1;for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){i=!0;const g=e[a],A=gC(t,a);if(typeof o=="function"&&(i=o(a,t),i===!1&&!Array.isArray(g)&&typeof g!="string"&&typeof g!="boolean"&&g instanceof Object&&(this.allowCreation=!1,i=this._handleObject(g,A,!0),this.allowCreation=r===!1)),i!==!1){s=!0;const I=this._getValue(A);if(Array.isArray(g))this._handleArray(g,I,A);else if(typeof g=="string")this._makeTextInput(g,I,A);else if(typeof g=="boolean")this._makeCheckbox(g,I,A);else if(g instanceof Object){if(!this.hideOption(t,a,this.moduleOptions))if(g.enabled!==void 0){const C=gC(A,"enabled"),l=this._getValue(C);if(l===!0){const d=this._makeLabel(a,A,!0);this._makeItem(A,d),s=this._handleObject(g,A)||s}else this._makeCheckbox(g,l,A)}else{const C=this._makeLabel(a,A,!0);this._makeItem(A,C),s=this._handleObject(g,A)||s}}else console.error("dont know how to handle",g,a,A)}}return s}_handleArray(e,t,r){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,r),e[1]!==t&&this.changedOptions.push({path:r,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,r),e[0]!==t&&this.changedOptions.push({path:r,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,r),e[0]!==t&&this.changedOptions.push({path:r,value:Number(t)}))}_update(e,t){const r=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",r),this.initialized=!0,this.parent.setOptions(r)}_constructOptions(e,t,r={}){let i=r;e=e==="true"?!0:e,e=e==="false"?!1:e;for(let o=0;o<t.length;o++)t[o]!=="global"&&(i[t[o]]===void 0&&(i[t[o]]={}),o!==t.length-1?i=i[t[o]]:i[t[o]]=e);return r}_printOptions(){const e=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(QE("pre","const options = "+JSON.stringify(e,null,2)))}getOptions(){const e={};for(let t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},Z_e=class{constructor(e,t){this.container=e,this.overflowMethod=t||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}setPosition(e,t){this.x=parseInt(e),this.y=parseInt(t)}setText(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}show(e){if(e===void 0&&(e=!0),e===!0){const t=this.frame.clientHeight,r=this.frame.clientWidth,i=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth;let s=0,a=0;if(this.overflowMethod=="flip"){let g=!1,A=!0;this.y-t<this.padding&&(A=!1),this.x+r>o-this.padding&&(g=!0),g?s=this.x-r:s=this.x,A?a=this.y-t:a=this.y}else a=this.y-t,a+t+this.padding>i&&(a=i-t-this.padding),a<this.padding&&(a=this.padding),s=this.x,s+r+this.padding>o&&(s=o-r-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=a+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}},Ya=!1,Xz;const JE="background: #FFeeee; color: #dd0000";let H_e=class et{static validate(e,t,r){Ya=!1,Xz=t;let i=t;return r!==void 0&&(i=t[r]),et.parse(e,i,[]),Ya}static parse(e,t,r){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&et.check(i,e,t,r)}static check(e,t,r,i){if(r[e]===void 0&&r.__any__===void 0){et.getSuggestion(e,r,i);return}let o=e,s=!0;r[e]===void 0&&r.__any__!==void 0&&(o="__any__",s=et.getType(t[e])==="object");let a=r[o];s&&a.__type__!==void 0&&(a=a.__type__),et.checkFields(e,t,r,o,a,i)}static checkFields(e,t,r,i,o,s){const a=function(I){console.error("%c"+I+et.printLocation(s,e),JE)},g=et.getType(t[e]),A=o[g];A!==void 0?et.getType(A)==="array"&&A.indexOf(t[e])===-1?(a('Invalid option detected in "'+e+'". Allowed values are:'+et.print(A)+' not "'+t[e]+'". '),Ya=!0):g==="object"&&i!=="__any__"&&(s=gC(s,e),et.parse(t[e],r[i],s)):o.any===void 0&&(a('Invalid type received for "'+e+'". Expected: '+et.print(Object.keys(o))+". Received ["+g+'] "'+t[e]+'"'),Ya=!0)}static getType(e){const t=typeof e;return t==="object"?e===null?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":Array.isArray(e)?"array":e instanceof Date?"date":e.nodeType!==void 0?"dom":e._isAMomentObject===!0?"moment":"object":t==="number"?"number":t==="boolean"?"boolean":t==="string"?"string":t===void 0?"undefined":t}static getSuggestion(e,t,r){const i=et.findInOptions(e,t,r,!1),o=et.findInOptions(e,Xz,[],!0),s=8,a=4;let g;i.indexMatch!==void 0?g=" in "+et.printLocation(i.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+i.indexMatch+`"?

`:o.distance<=a&&i.distance>o.distance?g=" in "+et.printLocation(i.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+et.printLocation(o.path,o.closestMatch,""):i.distance<=s?g='. Did you mean "'+i.closestMatch+'"?'+et.printLocation(i.path,e):g=". Did you mean one of these: "+et.print(Object.keys(t))+et.printLocation(r,e),console.error('%cUnknown option detected: "'+e+'"'+g,JE),Ya=!0}static findInOptions(e,t,r,i=!1){let o=1e9,s="",a=[];const g=e.toLowerCase();let A;for(const I in t){let C;if(t[I].__type__!==void 0&&i===!0){const l=et.findInOptions(e,t[I],gC(r,I));o>l.distance&&(s=l.closestMatch,a=l.path,o=l.distance,A=l.indexMatch)}else I.toLowerCase().indexOf(g)!==-1&&(A=I),C=et.levenshteinDistance(e,I),o>C&&(s=I,a=F_e(r),o=C)}return{closestMatch:s,path:a,distance:o,indexMatch:A}}static printLocation(e,t,r=`Problem value found at: 
`){let i=`

`+r+`options = {
`;for(let o=0;o<e.length;o++){for(let s=0;s<o+1;s++)i+="  ";i+=e[o]+`: {
`}for(let o=0;o<e.length+1;o++)i+="  ";i+=t+`
`;for(let o=0;o<e.length+1;o++){for(let s=0;s<e.length-o;s++)i+="  ";i+=`}
`}return i+`

`}static print(e){return JSON.stringify(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;const r=[];let i;for(i=0;i<=t.length;i++)r[i]=[i];let o;for(o=0;o<=e.length;o++)r[0][o]=o;for(i=1;i<=t.length;i++)for(o=1;o<=e.length;o++)t.charAt(i-1)==e.charAt(o-1)?r[i][o]=r[i-1][o-1]:r[i][o]=Math.min(r[i-1][o-1]+1,Math.min(r[i][o-1]+1,r[i-1][o]+1));return r[t.length][e.length]}};const U_e=si,Y_e=V_e,ms=HO,K_e=Z_e,O9=JE,X_e=H_e;var Qz={},gy={},Jz;function YO(){if(Jz)return gy;Jz=1;var n=gt(),e=V8(),t=Br(),r=ci(),i=Jr(),o=$A();return gy.f=n&&!e?Object.defineProperties:function(a,g){r(a);for(var A=i(g),I=o(g),C=I.length,l=0,d;C>l;)t.f(a,d=I[l++],A[d]);return a},gy}var Ay,ej;function Q_e(){if(ej)return Ay;ej=1;var n=wr();return Ay=n("document","documentElement"),Ay}var Iy,tj;function vl(){if(tj)return Iy;tj=1;var n=Oa(),e=Cl(),t=n("keys");return Iy=function(r){return t[r]||(t[r]=e(r))},Iy}var Cy,rj;function BA(){if(rj)return Cy;rj=1;var n=ci(),e=YO(),t=BO(),r=xA(),i=Q_e(),o=G8(),s=vl(),a=">",g="<",A="prototype",I="script",C=s("IE_PROTO"),l=function(){},d=function(c){return g+I+a+c+g+"/"+I+a},u=function(c){c.write(d("")),c.close();var m=c.parentWindow.Object;return c=null,m},h=function(){var c=o("iframe"),m="java"+I+":",v;return c.style.display="none",i.appendChild(c),c.src=String(m),v=c.contentWindow.document,v.open(),v.write(d("document.F=Object")),v.close(),v.F},p,f=function(){try{p=new ActiveXObject("htmlfile")}catch{}f=typeof document<"u"?document.domain&&p?u(p):h():u(p);for(var c=t.length;c--;)delete f[A][t[c]];return f()};return r[C]=!0,Cy=Object.create||function(m,v){var y;return m!==null?(l[A]=n(m),y=new l,l[A]=null,y[C]=m):y=f(),v===void 0?y:e.f(y,v)},Cy}var ij;function J_e(){if(ij)return Qz;ij=1;var n=ne(),e=gt(),t=BA();return n({target:"Object",stat:!0,sham:!e},{create:t}),Qz}var ly,nj;function ePe(){if(nj)return ly;nj=1,J_e();var n=Re(),e=n.Object;return ly=function(r,i){return e.create(r,i)},ly}var dy,oj;function tPe(){if(oj)return dy;oj=1;var n=ePe();return dy=n,dy}var uy,sj;function rPe(){return sj||(sj=1,uy=tPe()),uy}var iPe=rPe(),cg=ue(iPe),aj={},hy,gj;function $a(){if(gj)return hy;gj=1;var n=be();return hy=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){return 1},1)})},hy}var Aj;function nPe(){if(Aj)return aj;Aj=1;var n=ne(),e=DO(),t=FO().indexOf,r=$a(),i=e([].indexOf),o=!!i&&1/i([1],1,-0)<0,s=o||!r("indexOf");return n({target:"Array",proto:!0,forced:s},{indexOf:function(g){var A=arguments.length>1?arguments[1]:void 0;return o?i(this,g,A)||0:t(this,g,A)}}),aj}var cy,Ij;function oPe(){if(Ij)return cy;Ij=1,nPe();var n=zt();return cy=n("Array","indexOf"),cy}var fy,Cj;function sPe(){if(Cj)return fy;Cj=1;var n=pt(),e=oPe(),t=Array.prototype;return fy=function(r){var i=r.indexOf;return r===t||n(t,r)&&i===t.indexOf?e:i},fy}var py,lj;function aPe(){if(lj)return py;lj=1;var n=sPe();return py=n,py}var vy,dj;function gPe(){return dj||(dj=1,vy=aPe()),vy}var APe=gPe(),Ye=ue(APe),uj={},my,hj;function KO(){return hj||(hj=1,my=function(){}),my}var cj;function IPe(){if(cj)return uj;cj=1;var n=ne(),e=FO().includes,t=be(),r=KO(),i=t(function(){return!Array(1).includes()});return n({target:"Array",proto:!0,forced:i},{includes:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),r("includes"),uj}var yy,fj;function CPe(){if(fj)return yy;fj=1,IPe();var n=zt();return yy=n("Array","includes"),yy}var pj={},by,vj;function lPe(){if(vj)return by;vj=1;var n=Rt(),e=hi(),t=vt(),r=t("match");return by=function(i){var o;return n(i)&&((o=i[r])!==void 0?!!o:e(i)==="RegExp")},by}var wy,mj;function dPe(){if(mj)return wy;mj=1;var n=lPe(),e=TypeError;return wy=function(t){if(n(t))throw new e("The method doesn't accept regular expressions");return t},wy}var Ey,yj;function XO(){if(yj)return Ey;yj=1;var n=vt(),e=n("toStringTag"),t={};return t[e]="z",Ey=String(t)==="[object z]",Ey}var Sy,bj;function Da(){if(bj)return Sy;bj=1;var n=XO(),e=Pt(),t=hi(),r=vt(),i=r("toStringTag"),o=Object,s=t((function(){return arguments})())==="Arguments",a=function(g,A){try{return g[A]}catch{}};return Sy=n?t:function(g){var A,I,C;return g===void 0?"Undefined":g===null?"Null":typeof(I=a(A=o(g),i))=="string"?I:s?t(A):(C=t(A))==="Object"&&e(A.callee)?"Arguments":C},Sy}var Oy,wj;function zr(){if(wj)return Oy;wj=1;var n=Da(),e=String;return Oy=function(t){if(n(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},Oy}var Ty,Ej;function uPe(){if(Ej)return Ty;Ej=1;var n=vt(),e=n("match");return Ty=function(t){var r=/./;try{"/./"[t](r)}catch{try{return r[e]=!1,"/./"[t](r)}catch{}}return!1},Ty}var Sj;function hPe(){if(Sj)return pj;Sj=1;var n=ne(),e=we(),t=dPe(),r=qi(),i=zr(),o=uPe(),s=e("".indexOf);return n({target:"String",proto:!0,forced:!o("includes")},{includes:function(g){return!!~s(i(r(this)),i(t(g)),arguments.length>1?arguments[1]:void 0)}}),pj}var _y,Oj;function cPe(){if(Oj)return _y;Oj=1,hPe();var n=zt();return _y=n("String","includes"),_y}var Py,Tj;function fPe(){if(Tj)return Py;Tj=1;var n=pt(),e=CPe(),t=cPe(),r=Array.prototype,i=String.prototype;return Py=function(o){var s=o.includes;return o===r||n(r,o)&&s===r.includes?e:typeof o=="string"||o===i||n(i,o)&&s===i.includes?t:s},Py}var Ry,_j;function pPe(){if(_j)return Ry;_j=1;var n=fPe();return Ry=n,Ry}var xy,Pj;function vPe(){return Pj||(Pj=1,xy=pPe()),xy}var mPe=vPe(),fg=ue(mPe),Rj={},$y,xj;function Po(){if(xj)return $y;xj=1;var n=hi();return $y=Array.isArray||function(t){return n(t)==="Array"},$y}var Dy,$j;function yPe(){if($j)return Dy;$j=1;var n=gt(),e=Po(),t=TypeError,r=Object.getOwnPropertyDescriptor,i=n&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(o){return o instanceof TypeError}})();return Dy=i?function(o,s){if(e(o)&&!r(o,"length").writable)throw new t("Cannot set read only .length");return o.length=s}:function(o,s){return o.length=s},Dy}var Ny,Dj;function T9(){if(Dj)return Ny;Dj=1;var n=TypeError,e=9007199254740991;return Ny=function(t){if(t>e)throw n("Maximum allowed index exceeded");return t},Ny}var My,Nj;function bPe(){if(Nj)return My;Nj=1;var n=we(),e=Pt(),t=MO(),r=n(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(i){return r(i)}),My=t.inspectSource,My}var ky,Mj;function _9(){if(Mj)return ky;Mj=1;var n=we(),e=be(),t=Pt(),r=Da(),i=wr(),o=bPe(),s=function(){},a=i("Reflect","construct"),g=/^\s*(?:class|function)\b/,A=n(g.exec),I=!g.test(s),C=function(u){if(!t(u))return!1;try{return a(s,[],u),!0}catch{return!1}},l=function(u){if(!t(u))return!1;switch(r(u)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return I||!!A(g,o(u))}catch{return!0}};return l.sham=!0,ky=!a||e(function(){var d;return C(C.call)||!C(Object)||!C(function(){d=!0})||d})?l:C,ky}var Fy,kj;function wPe(){if(kj)return Fy;kj=1;var n=Po(),e=_9(),t=Rt(),r=vt(),i=r("species"),o=Array;return Fy=function(s){var a;return n(s)&&(a=s.constructor,e(a)&&(a===o||n(a.prototype))?a=void 0:t(a)&&(a=a[i],a===null&&(a=void 0))),a===void 0?o:a},Fy}var By,Fj;function QO(){if(Fj)return By;Fj=1;var n=wPe();return By=function(e,t){return new(n(e))(t===0?0:t)},By}var qy,Bj;function ml(){if(Bj)return qy;Bj=1;var n=gt(),e=Br(),t=_A();return qy=function(r,i,o){n?e.f(r,i,t(0,o)):r[i]=o},qy}var zy,qj;function P9(){if(qj)return zy;qj=1;var n=Ea(),e=TypeError;return zy=function(t,r){if(!delete t[r])throw new e("Cannot delete property "+n(r)+" of "+n(t))},zy}var jy,zj;function qA(){if(zj)return jy;zj=1;var n=be(),e=vt(),t=PA(),r=e("species");return jy=function(i){return t>=51||!n(function(){var o=[],s=o.constructor={};return s[r]=function(){return{foo:1}},o[i](Boolean).foo!==1})},jy}var jj;function EPe(){if(jj)return Rj;jj=1;var n=ne(),e=Fr(),t=ul(),r=_a(),i=ji(),o=yPe(),s=T9(),a=QO(),g=ml(),A=P9(),I=qA(),C=I("splice"),l=Math.max,d=Math.min;return n({target:"Array",proto:!0,forced:!C},{splice:function(h,p){var f=e(this),c=i(f),m=t(h,c),v=arguments.length,y,w,S,b,E,O;for(v===0?y=w=0:v===1?(y=0,w=c-m):(y=v-2,w=d(l(r(p),0),c-m)),s(c+y-w),S=a(f,w),b=0;b<w;b++)E=m+b,E in f&&g(S,b,f[E]);if(S.length=w,y<w){for(b=m;b<c-w;b++)E=b+w,O=b+y,E in f?f[O]=f[E]:A(f,O);for(b=c;b>c-w+y;b--)A(f,b-1)}else if(y>w)for(b=c-w;b>m;b--)E=b+w-1,O=b+y-1,E in f?f[O]=f[E]:A(f,O);for(b=0;b<y;b++)f[b+m]=arguments[b+2];return o(f,c-w+y),S}}),Rj}var Ly,Lj;function SPe(){if(Lj)return Ly;Lj=1,EPe();var n=zt();return Ly=n("Array","splice"),Ly}var Gy,Gj;function OPe(){if(Gj)return Gy;Gj=1;var n=pt(),e=SPe(),t=Array.prototype;return Gy=function(r){var i=r.splice;return r===t||n(t,r)&&i===t.splice?e:i},Gy}var Wy,Wj;function TPe(){if(Wj)return Wy;Wj=1;var n=OPe();return Wy=n,Wy}var Vy,Vj;function _Pe(){return Vj||(Vj=1,Vy=TPe()),Vy}var PPe=_Pe(),an=ue(PPe),Zj={},Hj;function RPe(){if(Hj)return Zj;Hj=1;var n=ne(),e=Po();return n({target:"Array",stat:!0},{isArray:e}),Zj}var Zy,Uj;function xPe(){if(Uj)return Zy;Uj=1,RPe();var n=Re();return Zy=n.Array.isArray,Zy}var Hy,Yj;function $Pe(){if(Yj)return Hy;Yj=1;var n=xPe();return Hy=n,Hy}var Uy,Kj;function DPe(){return Kj||(Kj=1,Uy=$Pe()),Uy}var NPe=DPe(),Ur=ue(NPe),Xj={},Yy,Qj;function wn(){if(Qj)return Yy;Qj=1;var n=dl(),e=we(),t=Il(),r=Fr(),i=ji(),o=QO(),s=e([].push),a=function(g){var A=g===1,I=g===2,C=g===3,l=g===4,d=g===6,u=g===7,h=g===5||d;return function(p,f,c,m){for(var v=r(p),y=t(v),w=i(y),S=n(f,c),b=0,E=m||o,O=A?E(p,w):I||u?E(p,0):void 0,P,_;w>b;b++)if((h||b in y)&&(P=y[b],_=S(P,b,v),g))if(A)O[b]=_;else if(_)switch(g){case 3:return!0;case 5:return P;case 6:return b;case 2:s(O,P)}else switch(g){case 4:return!1;case 7:s(O,P)}return d?-1:C||l?l:O}};return Yy={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Yy}var Ky,Jj;function MPe(){if(Jj)return Ky;Jj=1;var n=wn().forEach,e=$a(),t=e("forEach");return Ky=t?[].forEach:function(i){return n(this,i,arguments.length>1?arguments[1]:void 0)},Ky}var eL;function kPe(){if(eL)return Xj;eL=1;var n=ne(),e=MPe();return n({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),Xj}var Xy,tL;function FPe(){if(tL)return Xy;tL=1,kPe();var n=zt();return Xy=n("Array","forEach"),Xy}var Qy,rL;function BPe(){if(rL)return Qy;rL=1;var n=FPe();return Qy=n,Qy}var Jy,iL;function qPe(){if(iL)return Jy;iL=1;var n=Da(),e=qt(),t=pt(),r=BPe(),i=Array.prototype,o={DOMTokenList:!0,NodeList:!0};return Jy=function(s){var a=s.forEach;return s===i||t(i,s)&&a===i.forEach||e(o,n(s))?r:a},Jy}var eb,nL;function zPe(){return nL||(nL=1,eb=qPe()),eb}var jPe=zPe(),je=ue(jPe);function LPe(n){return Xi=n,ZPe()}var R9={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},JO=cg(R9);JO.color="color.color";JO.style="dashes";var Zt={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},oL={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Xi="",Ws=0,ce="",Ie="",ir=Zt.NULL;function GPe(){Ws=0,ce=Xi.charAt(0)}function wt(){Ws++,ce=Xi.charAt(Ws)}function Zo(){return Xi.charAt(Ws+1)}function sL(n){var e=n.charCodeAt(0);return e<47?e===35||e===46:e<59?e>47:e<91?e>64:e<96?e===95:e<123?e>96:!1}function dn(n,e){if(n||(n={}),e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function WPe(n,e,t){for(var r=e.split("."),i=n;r.length;){var o=r.shift();r.length?(i[o]||(i[o]={}),i=i[o]):i[o]=t}}function x9(n,e){for(var t,r,i=null,o=[n],s=n;s.parent;)o.push(s.parent),s=s.parent;if(s.nodes){for(t=0,r=s.nodes.length;t<r;t++)if(e.id===s.nodes[t].id){i=s.nodes[t];break}}for(i||(i={id:e.id},n.node&&(i.attr=dn(i.attr,n.node))),t=o.length-1;t>=0;t--){var a,g=o[t];g.nodes||(g.nodes=[]),Ye(a=g.nodes).call(a,i)===-1&&g.nodes.push(i)}e.attr&&(i.attr=dn(i.attr,e.attr))}function VPe(n,e){if(n.edges||(n.edges=[]),n.edges.push(e),n.edge){var t=dn({},n.edge);e.attr=dn(t,e.attr)}}function $9(n,e,t,r,i){var o={from:e,to:t,type:r};return n.edge&&(o.attr=dn({},n.edge)),o.attr=dn(o.attr||{},i),i!=null&&i.hasOwnProperty("arrows")&&i.arrows!=null&&(o.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),o}function Be(){for(ir=Zt.NULL,Ie="";ce===" "||ce==="	"||ce===`
`||ce==="\r";)wt();do{var n=!1;if(ce==="#"){for(var e=Ws-1;Xi.charAt(e)===" "||Xi.charAt(e)==="	";)e--;if(Xi.charAt(e)===`
`||Xi.charAt(e)===""){for(;ce!=""&&ce!=`
`;)wt();n=!0}}if(ce==="/"&&Zo()==="/"){for(;ce!=""&&ce!=`
`;)wt();n=!0}if(ce==="/"&&Zo()==="*"){for(;ce!="";)if(ce==="*"&&Zo()==="/"){wt(),wt();break}else wt();n=!0}for(;ce===" "||ce==="	"||ce===`
`||ce==="\r";)wt()}while(n);if(ce===""){ir=Zt.DELIMITER;return}var t=ce+Zo();if(oL[t]){ir=Zt.DELIMITER,Ie=t,wt(),wt();return}if(oL[ce]){ir=Zt.DELIMITER,Ie=ce,wt();return}if(sL(ce)||ce==="-"){for(Ie+=ce,wt();sL(ce);)Ie+=ce,wt();Ie==="false"?Ie=!1:Ie==="true"?Ie=!0:isNaN(Number(Ie))||(Ie=Number(Ie)),ir=Zt.IDENTIFIER;return}if(ce==='"'){for(wt();ce!=""&&(ce!='"'||ce==='"'&&Zo()==='"');)ce==='"'?(Ie+=ce,wt()):ce==="\\"&&Zo()==="n"?(Ie+=`
`,wt()):Ie+=ce,wt();if(ce!='"')throw Ht('End of string " expected');wt(),ir=Zt.IDENTIFIER;return}for(ir=Zt.UNKNOWN;ce!="";)Ie+=ce,wt();throw new SyntaxError('Syntax error in part "'+k9(Ie,30)+'"')}function ZPe(){var n={};if(GPe(),Be(),Ie==="strict"&&(n.strict=!0,Be()),(Ie==="graph"||Ie==="digraph")&&(n.type=Ie,Be()),ir===Zt.IDENTIFIER&&(n.id=Ie,Be()),Ie!="{")throw Ht("Angle bracket { expected");if(Be(),D9(n),Ie!="}")throw Ht("Angle bracket } expected");if(Be(),Ie!=="")throw Ht("End of file expected");return Be(),delete n.node,delete n.edge,delete n.graph,n}function D9(n){for(;Ie!==""&&Ie!="}";)HPe(n),Ie===";"&&Be()}function HPe(n){var e=N9(n);if(e){M9(n,e);return}var t=UPe(n);if(!t){if(ir!=Zt.IDENTIFIER)throw Ht("Identifier expected");var r=Ie;if(Be(),Ie==="="){if(Be(),ir!=Zt.IDENTIFIER)throw Ht("Identifier expected");n[r]=Ie,Be()}else YPe(n,r)}}function N9(n){var e=null;if(Ie==="subgraph"&&(e={},e.type="subgraph",Be(),ir===Zt.IDENTIFIER&&(e.id=Ie,Be())),Ie==="{"){if(Be(),e||(e={}),e.parent=n,e.node=n.node,e.edge=n.edge,e.graph=n.graph,D9(e),Ie!="}")throw Ht("Angle bracket } expected");Be(),delete e.node,delete e.edge,delete e.graph,delete e.parent,n.subgraphs||(n.subgraphs=[]),n.subgraphs.push(e)}return e}function UPe(n){return Ie==="node"?(Be(),n.node=pg(),"node"):Ie==="edge"?(Be(),n.edge=pg(),"edge"):Ie==="graph"?(Be(),n.graph=pg(),"graph"):null}function YPe(n,e){var t={id:e},r=pg();r&&(t.attr=r),x9(n,t),M9(n,e)}function M9(n,e){for(;Ie==="->"||Ie==="--";){var t,r=Ie;Be();var i=N9(n);if(i)t=i;else{if(ir!=Zt.IDENTIFIER)throw Ht("Identifier or subgraph expected");t=Ie,x9(n,{id:t}),Be()}var o=pg(),s=$9(n,e,t,r,o);VPe(n,s),e=t}}function pg(){for(var n,e=null,t={dashed:!0,solid:!1,dotted:[1,5]},r={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},i=new Array,o=new Array;Ie==="[";){for(Be(),e={};Ie!==""&&Ie!="]";){if(ir!=Zt.IDENTIFIER)throw Ht("Attribute name expected");var s=Ie;if(Be(),Ie!="=")throw Ht("Equal sign = expected");if(Be(),ir!=Zt.IDENTIFIER)throw Ht("Attribute value expected");var a=Ie;s==="style"&&(a=t[a]);var g;s==="arrowhead"&&(g=r[a],s="arrows",a={to:{enabled:!0,type:g}}),s==="arrowtail"&&(g=r[a],s="arrows",a={from:{enabled:!0,type:g}}),i.push({attr:e,name:s,value:a}),o.push(s),Be(),Ie==","&&Be()}if(Ie!="]")throw Ht("Bracket ] expected");Be()}if(fg(o).call(o,"dir")){var A={};for(A.arrows={},n=0;n<i.length;n++)if(i[n].name==="arrows")if(i[n].value.to!=null)A.arrows.to=n;else if(i[n].value.from!=null)A.arrows.from=n;else throw Ht("Invalid value of arrows");else i[n].name==="dir"&&(A.dir=n);var I=i[A.dir].value;if(!fg(o).call(o,"arrows"))if(I==="both")i.push({attr:i[A.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),A.arrows.to=i.length-1,i.push({attr:i[A.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),A.arrows.from=i.length-1;else if(I==="forward")i.push({attr:i[A.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),A.arrows.to=i.length-1;else if(I==="back")i.push({attr:i[A.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),A.arrows.from=i.length-1;else if(I==="none")i.push({attr:i[A.dir].attr,name:"arrows",value:""}),A.arrows.to=i.length-1;else throw Ht('Invalid dir type "'+I+'"');var C,l;if(I==="both")A.arrows.to&&A.arrows.from?(l=i[A.arrows.to].value.to.type,C=i[A.arrows.from].value.from.type,i[A.arrows.to]={attr:i[A.arrows.to].attr,name:i[A.arrows.to].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}},an(i).call(i,A.arrows.from,1)):A.arrows.to?(l=i[A.arrows.to].value.to.type,C="arrow",i[A.arrows.to]={attr:i[A.arrows.to].attr,name:i[A.arrows.to].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}):A.arrows.from&&(l="arrow",C=i[A.arrows.from].value.from.type,i[A.arrows.from]={attr:i[A.arrows.from].attr,name:i[A.arrows.from].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}});else if(I==="back")A.arrows.to&&A.arrows.from?(l="",C=i[A.arrows.from].value.from.type,i[A.arrows.from]={attr:i[A.arrows.from].attr,name:i[A.arrows.from].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}):A.arrows.to?(l="",C="arrow",A.arrows.from=A.arrows.to,i[A.arrows.from]={attr:i[A.arrows.from].attr,name:i[A.arrows.from].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}):A.arrows.from&&(l="",C=i[A.arrows.from].value.from.type,i[A.arrows.to]={attr:i[A.arrows.from].attr,name:i[A.arrows.from].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}),i[A.arrows.from]={attr:i[A.arrows.from].attr,name:i[A.arrows.from].name,value:{from:{enabled:!0,type:i[A.arrows.from].value.from.type}}};else if(I==="none"){var d;A.arrows.to?d=A.arrows.to:d=A.arrows.from,i[d]={attr:i[d].attr,name:i[d].name,value:""}}else if(I==="forward")A.arrows.to&&A.arrows.from?(l=i[A.arrows.to].value.to.type,C="",i[A.arrows.to]={attr:i[A.arrows.to].attr,name:i[A.arrows.to].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}):A.arrows.to?(l=i[A.arrows.to].value.to.type,C="",i[A.arrows.to]={attr:i[A.arrows.to].attr,name:i[A.arrows.to].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}):A.arrows.from&&(l="arrow",C="",A.arrows.to=A.arrows.from,i[A.arrows.to]={attr:i[A.arrows.to].attr,name:i[A.arrows.to].name,value:{to:{enabled:!0,type:l},from:{enabled:!0,type:C}}}),i[A.arrows.to]={attr:i[A.arrows.to].attr,name:i[A.arrows.to].name,value:{to:{enabled:!0,type:i[A.arrows.to].value.to.type}}};else throw Ht('Invalid dir type "'+I+'"');an(i).call(i,A.dir,1)}var u;if(fg(o).call(o,"penwidth")){var h=[];for(u=i.length,n=0;n<u;n++)i[n].name!=="width"&&(i[n].name==="penwidth"&&(i[n].name="width"),h.push(i[n]));i=h}for(u=i.length,n=0;n<u;n++)WPe(i[n].attr,i[n].name,i[n].value);return e}function Ht(n){return new SyntaxError(n+', got "'+k9(Ie,30)+'" (char '+Ws+")")}function k9(n,e){return n.length<=e?n:n.substr(0,27)+"..."}function KPe(n,e,t){Ur(n)?je(n).call(n,function(r){Ur(e)?je(e).call(e,function(i){t(r,i)}):t(r,e)}):Ur(e)?je(e).call(e,function(r){t(n,r)}):t(n,e)}function tb(n,e,t){for(var r=e.split("."),i=r.pop(),o=n,s=0;s<r.length;s++){var a=r[s];a in o||(o[a]={}),o=o[a]}return o[i]=t,n}function aL(n,e){var t={};for(var r in n)if(n.hasOwnProperty(r)){var i=e[r];Ur(i)?je(i).call(i,function(o){tb(t,o,n[r])}):typeof i=="string"?tb(t,i,n[r]):tb(t,r,n[r])}return t}function XPe(n){var e=LPe(n),t={nodes:[],edges:[],options:{}};if(e.nodes){var r;je(r=e.nodes).call(r,function(s){var a={id:s.id,label:String(s.label||s.id)};dn(a,aL(s.attr,R9)),a.image&&(a.shape="image"),t.nodes.push(a)})}if(e.edges){var i,o=function(s){var a={from:s.from,to:s.to};return dn(a,aL(s.attr,JO)),a.arrows==null&&s.type==="->"&&(a.arrows="to"),a};je(i=e.edges).call(i,function(s){var a,g;if(s.from instanceof Object?a=s.from.nodes:a={id:s.from},s.to instanceof Object?g=s.to.nodes:g={id:s.to},s.from instanceof Object&&s.from.edges){var A;je(A=s.from.edges).call(A,function(C){var l=o(C);t.edges.push(l)})}if(KPe(a,g,function(C,l){var d=$9(t,C.id,l.id,s.type,s.attr),u=o(d);t.edges.push(u)}),s.to instanceof Object&&s.to.edges){var I;je(I=s.to.edges).call(I,function(C){var l=o(C);t.edges.push(l)})}})}return e.attr&&(t.options=e.attr),t}var gL={},AL;function QPe(){if(AL)return gL;AL=1;var n=ne(),e=wn().map,t=qA(),r=t("map");return n({target:"Array",proto:!0,forced:!r},{map:function(o){return e(this,o,arguments.length>1?arguments[1]:void 0)}}),gL}var rb,IL;function JPe(){if(IL)return rb;IL=1,QPe();var n=zt();return rb=n("Array","map"),rb}var ib,CL;function eRe(){if(CL)return ib;CL=1;var n=pt(),e=JPe(),t=Array.prototype;return ib=function(r){var i=r.map;return r===t||n(t,r)&&i===t.map?e:i},ib}var nb,lL;function tRe(){if(lL)return nb;lL=1;var n=eRe();return nb=n,nb}var ob,dL;function rRe(){return dL||(dL=1,ob=tRe()),ob}var iRe=rRe(),Lg=ue(iRe);function nRe(n,e){var t;const r={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};e!=null&&(e.fixed!=null&&(r.nodes.fixed=e.fixed),e.parseColor!=null&&(r.nodes.parseColor=e.parseColor),e.inheritColor!=null&&(r.edges.inheritColor=e.inheritColor));const i=n.edges,o=Lg(i).call(i,a=>{const g={from:a.source,id:a.id,to:a.target};return a.attributes!=null&&(g.attributes=a.attributes),a.label!=null&&(g.label=a.label),a.attributes!=null&&a.attributes.title!=null&&(g.title=a.attributes.title),a.type==="Directed"&&(g.arrows="to"),a.color&&r.edges.inheritColor===!1&&(g.color=a.color),g});return{nodes:Lg(t=n.nodes).call(t,a=>{const g={id:a.id,fixed:r.nodes.fixed&&a.x!=null&&a.y!=null};return a.attributes!=null&&(g.attributes=a.attributes),a.label!=null&&(g.label=a.label),a.size!=null&&(g.size=a.size),a.attributes!=null&&a.attributes.title!=null&&(g.title=a.attributes.title),a.title!=null&&(g.title=a.title),a.x!=null&&(g.x=a.x),a.y!=null&&(g.y=a.y),a.color!=null&&(r.nodes.parseColor===!0?g.color=a.color:g.color={background:a.color,border:a.color,highlight:{background:a.color,border:a.color},hover:{background:a.color,border:a.color}}),g}),edges:o}}const oRe={addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},sRe={addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},aRe={addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},gRe={addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},ARe={addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},IRe={addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},CRe={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},lRe={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},dRe={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},uRe={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},hRe={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"};var cRe=Object.freeze({__proto__:null,cn:lRe,cs:hRe,de:sRe,en:oRe,es:aRe,fr:uRe,it:gRe,nl:ARe,pt:IRe,ru:CRe,uk:dRe}),uL={},hL;function F9(){if(hL)return uL;hL=1;var n=ne(),e=be(),t=Po(),r=Rt(),i=Fr(),o=ji(),s=T9(),a=ml(),g=QO(),A=qA(),I=vt(),C=PA(),l=I("isConcatSpreadable"),d=C>=51||!e(function(){var p=[];return p[l]=!1,p.concat()[0]!==p}),u=function(p){if(!r(p))return!1;var f=p[l];return f!==void 0?!!f:t(p)},h=!d||!A("concat");return n({target:"Array",proto:!0,arity:1,forced:h},{concat:function(f){var c=i(this),m=g(c,0),v=0,y,w,S,b,E;for(y=-1,S=arguments.length;y<S;y++)if(E=y===-1?c:arguments[y],u(E))for(b=o(E),s(v+b),w=0;w<b;w++,v++)w in E&&a(m,v,E[w]);else s(v+1),a(m,v++,E);return m.length=v,m}}),uL}var sb,cL;function fRe(){if(cL)return sb;cL=1,F9();var n=zt();return sb=n("Array","concat"),sb}var ab,fL;function pRe(){if(fL)return ab;fL=1;var n=pt(),e=fRe(),t=Array.prototype;return ab=function(r){var i=r.concat;return r===t||n(t,r)&&i===t.concat?e:i},ab}var gb,pL;function vRe(){if(pL)return gb;pL=1;var n=pRe();return gb=n,gb}var Ab,vL;function mRe(){return vL||(vL=1,Ab=vRe()),Ab}var yRe=mRe(),bRe=ue(yRe);function wRe(n,e){try{const[r,i]=e.split(/[-_ /]/,2),o=r!=null?r.toLowerCase():null,s=i!=null?i.toUpperCase():null;if(o&&s){const a=o+"-"+s;if(Object.prototype.hasOwnProperty.call(n,a))return a;var t;console.warn(bRe(t="Unknown variant ".concat(s," of language ")).call(t,o,"."))}if(o){const a=o;if(Object.prototype.hasOwnProperty.call(n,a))return a;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(e,", falling back to English.")),"en"}catch(r){return console.error(r),console.warn("Unexpected error while normalizing locale ".concat(e,", falling back to English.")),"en"}}class ERe{constructor(){this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}init(){if(this.initialized())return;this.src=this.image.src;const e=this.image.width,t=this.image.height;this.width=e,this.height=t;const r=Math.floor(t/2),i=Math.floor(t/4),o=Math.floor(t/8),s=Math.floor(t/16),a=Math.floor(e/2),g=Math.floor(e/4),A=Math.floor(e/8),I=Math.floor(e/16);this.canvas.width=3*g,this.canvas.height=r,this.coordinates=[[0,0,a,r],[a,0,g,i],[a,i,A,o],[5*A,i,I,s]],this._fillMipMap()}initialized(){return this.coordinates!==void 0}_fillMipMap(){const e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(let r=1;r<this.NUM_ITERATIONS;r++){const i=this.coordinates[r-1],o=this.coordinates[r];e.drawImage(this.canvas,i[0],i[1],i[2],i[3],o[0],o[1],o[2],o[3])}}drawImageAtPosition(e,t,r,i,o,s){if(this.initialized())if(t>2){t*=.5;let a=0;for(;t>2&&a<this.NUM_ITERATIONS;)t*=.5,a+=1;a>=this.NUM_ITERATIONS&&(a=this.NUM_ITERATIONS-1);const g=this.coordinates[a];e.drawImage(this.canvas,g[0],g[1],g[2],g[3],r,i,o,s)}else e.drawImage(this.image,r,i,o,s)}}class SRe{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,t,r){if(!(e===void 0||r===void 0)){if(t===void 0){console.warn("No broken url image defined");return}r.image.onerror=()=>{console.error("Could not load brokenImage:",t)},r.image.src=t}}_redrawWithImage(e){this.callback&&this.callback(e)}load(e,t){const r=this.images[e];if(r)return r;const i=new ERe;return this.images[e]=i,i.image.onload=()=>{this._fixImageCoordinates(i.image),i.init(),this._redrawWithImage(i)},i.image.onerror=()=>{console.error("Could not load image:",e),this._tryloadBrokenUrl(e,t,i)},i.image.src=e,i}_fixImageCoordinates(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}var Ib,mL;function Na(){return mL||(mL=1,Ib={}),Ib}var Cb,yL;function B9(){if(yL)return Cb;yL=1;var n=He(),e=Pt(),t=n.WeakMap;return Cb=e(t)&&/native code/.test(String(t)),Cb}var lb,bL;function Ro(){if(bL)return lb;bL=1;var n=B9(),e=He(),t=Rt(),r=Ta(),i=qt(),o=MO(),s=vl(),a=xA(),g="Object already initialized",A=e.TypeError,I=e.WeakMap,C,l,d,u=function(c){return d(c)?l(c):C(c,{})},h=function(c){return function(m){var v;if(!t(m)||(v=l(m)).type!==c)throw new A("Incompatible receiver, "+c+" required");return v}};if(n||o.state){var p=o.state||(o.state=new I);p.get=p.get,p.has=p.has,p.set=p.set,C=function(c,m){if(p.has(c))throw new A(g);return m.facade=c,p.set(c,m),m},l=function(c){return p.get(c)||{}},d=function(c){return p.has(c)}}else{var f=s("state");a[f]=!0,C=function(c,m){if(i(c,f))throw new A(g);return m.facade=c,r(c,f,m),m},l=function(c){return i(c,f)?c[f]:{}},d=function(c){return i(c,f)}}return lb={set:C,get:l,has:d,enforce:u,getterFor:h},lb}var db,wL;function ORe(){if(wL)return db;wL=1;var n=gt(),e=qt(),t=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,i=e(t,"name"),o=i&&(function(){}).name==="something",s=i&&(!n||n&&r(t,"name").configurable);return db={EXISTS:i,PROPER:o,CONFIGURABLE:s},db}var ub,EL;function TRe(){if(EL)return ub;EL=1;var n=be();return ub=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),ub}var hb,SL;function eT(){if(SL)return hb;SL=1;var n=qt(),e=Pt(),t=Fr(),r=vl(),i=TRe(),o=r("IE_PROTO"),s=Object,a=s.prototype;return hb=i?s.getPrototypeOf:function(g){var A=t(g);if(n(A,o))return A[o];var I=A.constructor;return e(I)&&A instanceof I?I.prototype:A instanceof s?a:null},hb}var cb,OL;function zA(){if(OL)return cb;OL=1;var n=Ta();return cb=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e},cb}var fb,TL;function q9(){if(TL)return fb;TL=1;var n=be(),e=Pt(),t=Rt(),r=BA(),i=eT(),o=zA(),s=vt(),a=Sa(),g=s("iterator"),A=!1,I,C,l;[].keys&&(l=[].keys(),"next"in l?(C=i(i(l)),C!==Object.prototype&&(I=C)):A=!0);var d=!t(I)||n(function(){var u={};return I[g].call(u)!==u});return d?I={}:a&&(I=r(I)),e(I[g])||o(I,g,function(){return this}),fb={IteratorPrototype:I,BUGGY_SAFARI_ITERATORS:A},fb}var pb,_L;function _Re(){if(_L)return pb;_L=1;var n=XO(),e=Da();return pb=n?{}.toString:function(){return"[object "+e(this)+"]"},pb}var vb,PL;function xo(){if(PL)return vb;PL=1;var n=XO(),e=Br().f,t=Ta(),r=qt(),i=_Re(),o=vt(),s=o("toStringTag");return vb=function(a,g,A,I){var C=A?a:a&&a.prototype;C&&(r(C,s)||e(C,s,{configurable:!0,value:g}),I&&!n&&t(C,"toString",i))},vb}var mb,RL;function PRe(){if(RL)return mb;RL=1;var n=q9().IteratorPrototype,e=BA(),t=_A(),r=xo(),i=Na(),o=function(){return this};return mb=function(s,a,g,A){var I=a+" Iterator";return s.prototype=e(n,{next:t(+!A,g)}),r(s,I,!1,!0),i[I]=o,s},mb}var yb,xL;function RRe(){if(xL)return yb;xL=1;var n=we(),e=zi();return yb=function(t,r,i){try{return n(e(Object.getOwnPropertyDescriptor(t,r)[i]))}catch{}},yb}var bb,$L;function xRe(){if($L)return bb;$L=1;var n=Rt();return bb=function(e){return n(e)||e===null},bb}var wb,DL;function $Re(){if(DL)return wb;DL=1;var n=xRe(),e=String,t=TypeError;return wb=function(r){if(n(r))return r;throw new t("Can't set "+e(r)+" as a prototype")},wb}var Eb,NL;function DRe(){if(NL)return Eb;NL=1;var n=RRe(),e=Rt(),t=qi(),r=$Re();return Eb=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,o={},s;try{s=n(Object.prototype,"__proto__","set"),s(o,[]),i=o instanceof Array}catch{}return function(g,A){return t(g),r(A),e(g)&&(i?s(g,A):g.__proto__=A),g}})():void 0),Eb}var Sb,ML;function tT(){if(ML)return Sb;ML=1;var n=ne(),e=ur(),t=Sa(),r=ORe(),i=Pt(),o=PRe(),s=eT(),a=DRe(),g=xo(),A=Ta(),I=zA(),C=vt(),l=Na(),d=q9(),u=r.PROPER,h=r.CONFIGURABLE,p=d.IteratorPrototype,f=d.BUGGY_SAFARI_ITERATORS,c=C("iterator"),m="keys",v="values",y="entries",w=function(){return this};return Sb=function(S,b,E,O,P,_,T){o(E,b,O);var R=function($e){if($e===P&&te)return te;if(!f&&$e&&$e in B)return B[$e];switch($e){case m:return function(){return new E(this,$e)};case v:return function(){return new E(this,$e)};case y:return function(){return new E(this,$e)}}return function(){return new E(this)}},D=b+" Iterator",G=!1,B=S.prototype,Q=B[c]||B["@@iterator"]||P&&B[P],te=!f&&Q||R(P),le=b==="Array"&&B.entries||Q,U,fe,xe;if(le&&(U=s(le.call(new S)),U!==Object.prototype&&U.next&&(!t&&s(U)!==p&&(a?a(U,p):i(U[c])||I(U,c,w)),g(U,D,!0,!0),t&&(l[D]=w))),u&&P===v&&Q&&Q.name!==v&&(!t&&h?A(B,"name",v):(G=!0,te=function(){return e(Q,this)})),P)if(fe={values:R(v),keys:_?te:R(m),entries:R(y)},T)for(xe in fe)(f||G||!(xe in B))&&I(B,xe,fe[xe]);else n({target:b,proto:!0,forced:f||G},fe);return(!t||T)&&B[c]!==te&&I(B,c,te,{name:P}),l[b]=te,fe},Sb}var Ob,kL;function rT(){return kL||(kL=1,Ob=function(n,e){return{value:n,done:e}}),Ob}var Tb,FL;function Ma(){if(FL)return Tb;FL=1;var n=Jr(),e=KO(),t=Na(),r=Ro(),i=Br().f,o=tT(),s=rT(),a=Sa(),g=gt(),A="Array Iterator",I=r.set,C=r.getterFor(A);Tb=o(Array,"Array",function(d,u){I(this,{type:A,target:n(d),index:0,kind:u})},function(){var d=C(this),u=d.target,h=d.index++;if(!u||h>=u.length)return d.target=null,s(void 0,!0);switch(d.kind){case"keys":return s(h,!1);case"values":return s(u[h],!1)}return s([h,u[h]],!1)},"values");var l=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&g&&l.name!=="values")try{i(l,"name",{value:"values"})}catch{}return Tb}var BL={},qL={},_b={exports:{}},Pb={},zL;function yl(){if(zL)return Pb;zL=1;var n=H8(),e=BO(),t=e.concat("length","prototype");return Pb.f=Object.getOwnPropertyNames||function(i){return n(i,t)},Pb}var Rb={},jL;function iT(){if(jL)return Rb;jL=1;var n=hi(),e=Jr(),t=yl().f,r=Pa(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(s){try{return t(s)}catch{return r(i)}};return Rb.f=function(a){return i&&n(a)==="Window"?o(a):t(e(a))},Rb}var xb,LL;function NRe(){if(LL)return xb;LL=1;var n=be();return xb=n(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),xb}var $b,GL;function MRe(){if(GL)return $b;GL=1;var n=be(),e=Rt(),t=hi(),r=NRe(),i=Object.isExtensible,o=n(function(){});return $b=o||r?function(a){return!e(a)||r&&t(a)==="ArrayBuffer"?!1:i?i(a):!0}:i,$b}var Db,WL;function z9(){if(WL)return Db;WL=1;var n=be();return Db=!n(function(){return Object.isExtensible(Object.preventExtensions({}))}),Db}var VL;function bl(){if(VL)return _b.exports;VL=1;var n=ne(),e=we(),t=xA(),r=Rt(),i=qt(),o=Br().f,s=yl(),a=iT(),g=MRe(),A=Cl(),I=z9(),C=!1,l=A("meta"),d=0,u=function(v){o(v,l,{value:{objectID:"O"+d++,weakData:{}}})},h=function(v,y){if(!r(v))return typeof v=="symbol"?v:(typeof v=="string"?"S":"P")+v;if(!i(v,l)){if(!g(v))return"F";if(!y)return"E";u(v)}return v[l].objectID},p=function(v,y){if(!i(v,l)){if(!g(v))return!0;if(!y)return!1;u(v)}return v[l].weakData},f=function(v){return I&&C&&g(v)&&!i(v,l)&&u(v),v},c=function(){m.enable=function(){},C=!0;var v=s.f,y=e([].splice),w={};w[l]=1,v(w).length&&(s.f=function(S){for(var b=v(S),E=0,O=b.length;E<O;E++)if(b[E]===l){y(b,E,1);break}return b},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},m=_b.exports={enable:c,fastKey:h,getWeakData:p,onFreeze:f};return t[l]=!0,_b.exports}var Nb,ZL;function kRe(){if(ZL)return Nb;ZL=1;var n=vt(),e=Na(),t=n("iterator"),r=Array.prototype;return Nb=function(i){return i!==void 0&&(e.Array===i||r[t]===i)},Nb}var Mb,HL;function j9(){if(HL)return Mb;HL=1;var n=Da(),e=NO(),t=ya(),r=Na(),i=vt(),o=i("iterator");return Mb=function(s){if(!t(s))return e(s,o)||e(s,"@@iterator")||r[n(s)]},Mb}var kb,UL;function FRe(){if(UL)return kb;UL=1;var n=ur(),e=zi(),t=ci(),r=Ea(),i=j9(),o=TypeError;return kb=function(s,a){var g=arguments.length<2?i(s):a;if(e(g))return t(n(g,s));throw new o(r(s)+" is not iterable")},kb}var Fb,YL;function nT(){if(YL)return Fb;YL=1;var n=ur(),e=ci(),t=NO();return Fb=function(r,i,o){var s,a;e(r);try{if(s=t(r,"return"),!s){if(i==="throw")throw o;return o}s=n(s,r)}catch(g){a=!0,s=g}if(i==="throw")throw o;if(a)throw s;return e(s),o},Fb}var Bb,KL;function wl(){if(KL)return Bb;KL=1;var n=dl(),e=ur(),t=ci(),r=Ea(),i=kRe(),o=ji(),s=pt(),a=FRe(),g=j9(),A=nT(),I=TypeError,C=function(d,u){this.stopped=d,this.result=u},l=C.prototype;return Bb=function(d,u,h){var p=h&&h.that,f=!!(h&&h.AS_ENTRIES),c=!!(h&&h.IS_RECORD),m=!!(h&&h.IS_ITERATOR),v=!!(h&&h.INTERRUPTED),y=n(u,p),w,S,b,E,O,P,_,T=function(D){return w&&A(w,"normal"),new C(!0,D)},R=function(D){return f?(t(D),v?y(D[0],D[1],T):y(D[0],D[1])):v?y(D,T):y(D)};if(c)w=d.iterator;else if(m)w=d;else{if(S=g(d),!S)throw new I(r(d)+" is not iterable");if(i(S)){for(b=0,E=o(d);E>b;b++)if(O=R(d[b]),O&&s(l,O))return O;return new C(!1)}w=a(d,S)}for(P=c?d.next:w.next;!(_=e(P,w)).done;){try{O=R(_.value)}catch(D){A(w,"throw",D)}if(typeof O=="object"&&O&&s(l,O))return O}return new C(!1)},Bb}var qb,XL;function oT(){if(XL)return qb;XL=1;var n=pt(),e=TypeError;return qb=function(t,r){if(n(r,t))return t;throw new e("Incorrect invocation")},qb}var zb,QL;function sT(){if(QL)return zb;QL=1;var n=ne(),e=He(),t=bl(),r=be(),i=Ta(),o=wl(),s=oT(),a=Pt(),g=Rt(),A=ya(),I=xo(),C=Br().f,l=wn().forEach,d=gt(),u=Ro(),h=u.set,p=u.getterFor;return zb=function(f,c,m){var v=f.indexOf("Map")!==-1,y=f.indexOf("Weak")!==-1,w=v?"set":"add",S=e[f],b=S&&S.prototype,E={},O;if(!d||!a(S)||!(y||b.forEach&&!r(function(){new S().entries().next()})))O=m.getConstructor(c,f,v,w),t.enable();else{O=c(function(T,R){h(s(T,P),{type:f,collection:new S}),A(R)||o(R,T[w],{that:T,AS_ENTRIES:v})});var P=O.prototype,_=p(f);l(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(T){var R=T==="add"||T==="set";T in b&&!(y&&T==="clear")&&i(P,T,function(D,G){var B=_(this).collection;if(!R&&y&&!g(D))return T==="get"?void 0:!1;var Q=B[T](D===0?0:D,G);return R?this:Q})}),y||C(P,"size",{configurable:!0,get:function(){return _(this).collection.size}})}return I(O,f,!1,!0),E[f]=O,n({global:!0,forced:!0},E),y||m.setStrong(O,f,v),O},zb}var jb,JL;function aT(){if(JL)return jb;JL=1;var n=Br();return jb=function(e,t,r){return n.f(e,t,r)},jb}var Lb,e3;function gT(){if(e3)return Lb;e3=1;var n=zA();return Lb=function(e,t,r){for(var i in t)r&&r.unsafe&&e[i]?e[i]=t[i]:n(e,i,t[i],r);return e},Lb}var Gb,t3;function BRe(){if(t3)return Gb;t3=1;var n=wr(),e=aT(),t=vt(),r=gt(),i=t("species");return Gb=function(o){var s=n(o);r&&s&&!s[i]&&e(s,i,{configurable:!0,get:function(){return this}})},Gb}var Wb,r3;function L9(){if(r3)return Wb;r3=1;var n=BA(),e=aT(),t=gT(),r=dl(),i=oT(),o=ya(),s=wl(),a=tT(),g=rT(),A=BRe(),I=gt(),C=bl().fastKey,l=Ro(),d=l.set,u=l.getterFor;return Wb={getConstructor:function(h,p,f,c){var m=h(function(b,E){i(b,v),d(b,{type:p,index:n(null),first:null,last:null,size:0}),I||(b.size=0),o(E)||s(E,b[c],{that:b,AS_ENTRIES:f})}),v=m.prototype,y=u(p),w=function(b,E,O){var P=y(b),_=S(b,E),T,R;return _?_.value=O:(P.last=_={index:R=C(E,!0),key:E,value:O,previous:T=P.last,next:null,removed:!1},P.first||(P.first=_),T&&(T.next=_),I?P.size++:b.size++,R!=="F"&&(P.index[R]=_)),b},S=function(b,E){var O=y(b),P=C(E),_;if(P!=="F")return O.index[P];for(_=O.first;_;_=_.next)if(_.key===E)return _};return t(v,{clear:function(){for(var E=this,O=y(E),P=O.first;P;)P.removed=!0,P.previous&&(P.previous=P.previous.next=null),P=P.next;O.first=O.last=null,O.index=n(null),I?O.size=0:E.size=0},delete:function(b){var E=this,O=y(E),P=S(E,b);if(P){var _=P.next,T=P.previous;delete O.index[P.index],P.removed=!0,T&&(T.next=_),_&&(_.previous=T),O.first===P&&(O.first=_),O.last===P&&(O.last=T),I?O.size--:E.size--}return!!P},forEach:function(E){for(var O=y(this),P=r(E,arguments.length>1?arguments[1]:void 0),_;_=_?_.next:O.first;)for(P(_.value,_.key,this);_&&_.removed;)_=_.previous},has:function(E){return!!S(this,E)}}),t(v,f?{get:function(E){var O=S(this,E);return O&&O.value},set:function(E,O){return w(this,E===0?0:E,O)}}:{add:function(E){return w(this,E=E===0?0:E,E)}}),I&&e(v,"size",{configurable:!0,get:function(){return y(this).size}}),m},setStrong:function(h,p,f){var c=p+" Iterator",m=u(p),v=u(c);a(h,p,function(y,w){d(this,{type:c,target:y,state:m(y),kind:w,last:null})},function(){for(var y=v(this),w=y.kind,S=y.last;S&&S.removed;)S=S.previous;return!y.target||!(y.last=S=S?S.next:y.state.first)?(y.target=null,g(void 0,!0)):g(w==="keys"?S.key:w==="values"?S.value:[S.key,S.value],!1)},f?"entries":"values",!f,!0),A(p)}},Wb}var i3;function qRe(){if(i3)return qL;i3=1;var n=sT(),e=L9();return n("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),qL}var n3;function zRe(){return n3||(n3=1,qRe()),BL}var o3={},Vb,s3;function G9(){return s3||(s3=1,Vb=function(n,e){return e===1?function(t,r){return t[n](r)}:function(t,r,i){return t[n](r,i)}}),Vb}var Zb,a3;function jRe(){if(a3)return Zb;a3=1;var n=wr(),e=G9(),t=n("Map");return Zb={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},Zb}var g3;function LRe(){if(g3)return o3;g3=1;var n=ne(),e=we(),t=zi(),r=qi(),i=wl(),o=jRe(),s=Sa(),a=be(),g=o.Map,A=o.has,I=o.get,C=o.set,l=e([].push),d=s||a(function(){return g.groupBy("ab",function(u){return u}).get("a").length!==1});return n({target:"Map",stat:!0,forced:s||d},{groupBy:function(h,p){r(h),t(p);var f=new g,c=0;return i(h,function(m){var v=p(m,c++);A(f,v)?l(I(f,v),m):C(f,v,[m])}),f}}),o3}var A3={},Hb,I3;function GRe(){if(I3)return Hb;I3=1;var n=we(),e=_a(),t=zr(),r=qi(),i=n("".charAt),o=n("".charCodeAt),s=n("".slice),a=function(g){return function(A,I){var C=t(r(A)),l=e(I),d=C.length,u,h;return l<0||l>=d?g?"":void 0:(u=o(C,l),u<55296||u>56319||l+1===d||(h=o(C,l+1))<56320||h>57343?g?i(C,l):u:g?s(C,l,l+2):(u-55296<<10)+(h-56320)+65536)}};return Hb={codeAt:a(!1),charAt:a(!0)},Hb}var C3;function AT(){if(C3)return A3;C3=1;var n=GRe().charAt,e=zr(),t=Ro(),r=tT(),i=rT(),o="String Iterator",s=t.set,a=t.getterFor(o);return r(String,"String",function(g){s(this,{type:o,string:e(g),index:0})},function(){var A=a(this),I=A.string,C=A.index,l;return C>=I.length?i(void 0,!0):(l=n(I,C),A.index+=l.length,i(l,!1))}),A3}var Ub,l3;function WRe(){if(l3)return Ub;l3=1,Ma(),zRe(),LRe(),AT();var n=Re();return Ub=n.Map,Ub}var d3={},Yb,u3;function VRe(){return u3||(u3=1,Yb={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),Yb}var h3;function ka(){if(h3)return d3;h3=1,Ma();var n=VRe(),e=He(),t=xo(),r=Na();for(var i in n)t(e[i],i),r[i]=r.Array;return d3}var Kb,c3;function ZRe(){if(c3)return Kb;c3=1;var n=WRe();return ka(),Kb=n,Kb}var Xb,f3;function HRe(){return f3||(f3=1,Xb=ZRe()),Xb}var URe=HRe(),IT=ue(URe);class YRe{constructor(){this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},Mt(this.options,this.defaultOptions)}setOptions(e){const t=["useDefaultGroups"];if(e!==void 0){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&Ye(t).call(t,r)===-1){const i=e[r];this.add(r,i)}}}clear(){this._groups=new IT,this._groupNames=[]}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this._groups.get(e);if(r===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){const i=this._groupIndex%this._groupNames.length;++this._groupIndex,r={},r.color=this._groups.get(this._groupNames[i]),this._groups.set(e,r)}else{const i=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,r={},r.color=this._defaultGroups[i],this._groups.set(e,r)}return r}add(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}var p3={},v3;function KRe(){if(v3)return p3;v3=1;var n=ne();return n({target:"Number",stat:!0},{isNaN:function(t){return t!==t}}),p3}var Qb,m3;function XRe(){if(m3)return Qb;m3=1,KRe();var n=Re();return Qb=n.Number.isNaN,Qb}var Jb,y3;function QRe(){if(y3)return Jb;y3=1;var n=XRe();return Jb=n,Jb}var e0,b3;function JRe(){return b3||(b3=1,e0=QRe()),e0}var exe=JRe(),eS=ue(exe),w3={},t0,E3;function txe(){if(E3)return t0;E3=1;var n=He(),e=n.isFinite;return t0=Number.isFinite||function(r){return typeof r=="number"&&e(r)},t0}var S3;function rxe(){if(S3)return w3;S3=1;var n=ne(),e=txe();return n({target:"Number",stat:!0},{isFinite:e}),w3}var r0,O3;function ixe(){if(O3)return r0;O3=1,rxe();var n=Re();return r0=n.Number.isFinite,r0}var i0,T3;function nxe(){if(T3)return i0;T3=1;var n=ixe();return i0=n,i0}var n0,_3;function oxe(){return _3||(_3=1,n0=nxe()),n0}var sxe=oxe(),zn=ue(sxe),P3={},R3;function axe(){if(R3)return P3;R3=1;var n=ne(),e=Fr(),t=$A(),r=be(),i=r(function(){t(1)});return n({target:"Object",stat:!0,forced:i},{keys:function(s){return t(e(s))}}),P3}var o0,x3;function gxe(){if(x3)return o0;x3=1,axe();var n=Re();return o0=n.Object.keys,o0}var s0,$3;function Axe(){if($3)return s0;$3=1;var n=gxe();return s0=n,s0}var a0,D3;function Ixe(){return D3||(D3=1,a0=Axe()),a0}var Cxe=Ixe(),It=ue(Cxe),N3={},M3;function lxe(){if(M3)return N3;M3=1;var n=ne(),e=wn().some,t=$a(),r=t("some");return n({target:"Array",proto:!0,forced:!r},{some:function(o){return e(this,o,arguments.length>1?arguments[1]:void 0)}}),N3}var g0,k3;function dxe(){if(k3)return g0;k3=1,lxe();var n=zt();return g0=n("Array","some"),g0}var A0,F3;function uxe(){if(F3)return A0;F3=1;var n=pt(),e=dxe(),t=Array.prototype;return A0=function(r){var i=r.some;return r===t||n(t,r)&&i===t.some?e:i},A0}var I0,B3;function hxe(){if(B3)return I0;B3=1;var n=uxe();return I0=n,I0}var C0,q3;function cxe(){return q3||(q3=1,C0=hxe()),C0}var fxe=cxe(),pxe=ue(fxe),z3={},j3={},l0,L3;function W9(){if(L3)return l0;L3=1;var n=He(),e=ba(),t=hi(),r=function(i){return e.slice(0,i.length)===i};return l0=(function(){return r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":n.Bun&&typeof Bun.version=="string"?"BUN":n.Deno&&typeof Deno.version=="object"?"DENO":t(n.process)==="process"?"NODE":n.window&&n.document?"BROWSER":"REST"})(),l0}var d0,G3;function vxe(){if(G3)return d0;G3=1;var n=TypeError;return d0=function(e,t){if(e<t)throw new n("Not enough arguments");return e},d0}var u0,W3;function V9(){if(W3)return u0;W3=1;var n=He(),e=gl(),t=Pt(),r=W9(),i=ba(),o=Pa(),s=vxe(),a=n.Function,g=/MSIE .\./.test(i)||r==="BUN"&&(function(){var A=n.Bun.version.split(".");return A.length<3||A[0]==="0"&&(A[1]<3||A[1]==="3"&&A[2]==="0")})();return u0=function(A,I){var C=I?2:1;return g?function(l,d){var u=s(arguments.length,1)>C,h=t(l)?l:a(l),p=u?o(arguments,C):[],f=u?function(){e(h,this,p)}:h;return I?A(f,d):A(f)}:A},u0}var V3;function mxe(){if(V3)return j3;V3=1;var n=ne(),e=He(),t=V9(),r=t(e.setInterval,!0);return n({global:!0,bind:!0,forced:e.setInterval!==r},{setInterval:r}),j3}var Z3={},H3;function yxe(){if(H3)return Z3;H3=1;var n=ne(),e=He(),t=V9(),r=t(e.setTimeout,!0);return n({global:!0,bind:!0,forced:e.setTimeout!==r},{setTimeout:r}),Z3}var U3;function Z9(){return U3||(U3=1,mxe(),yxe()),z3}var h0,Y3;function bxe(){if(Y3)return h0;Y3=1,Z9();var n=Re();return h0=n.setTimeout,h0}var c0,K3;function wxe(){return K3||(K3=1,c0=bxe()),c0}var Exe=wxe(),ys=ue(Exe),f0={exports:{}},X3={},Q3;function Sxe(){if(Q3)return X3;Q3=1;var n=ne(),e=gt(),t=Br().f;return n({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),X3}var J3;function Oxe(){if(J3)return f0.exports;J3=1,Sxe();var n=Re(),e=n.Object,t=f0.exports=function(i,o,s){return e.defineProperty(i,o,s)};return e.defineProperty.sham&&(t.sham=!0),f0.exports}var p0,e5;function H9(){if(e5)return p0;e5=1;var n=Oxe();return p0=n,p0}var v0,t5;function Txe(){if(t5)return v0;t5=1;var n=H9();return v0=n,v0}var m0,r5;function _xe(){if(r5)return m0;r5=1;var n=Txe();return m0=n,m0}var y0,i5;function Pxe(){return i5||(i5=1,y0=_xe()),y0}var Rxe=Pxe(),xxe=ue(Rxe),n5={},o5={},b0={},s5;function El(){if(s5)return b0;s5=1;var n=vt();return b0.f=n,b0}var w0,a5;function Qe(){if(a5)return w0;a5=1;var n=Re(),e=qt(),t=El(),r=Br().f;return w0=function(i){var o=n.Symbol||(n.Symbol={});e(o,i)||r(o,i,{value:t.f(i)})},w0}var E0,g5;function U9(){if(g5)return E0;g5=1;var n=ur(),e=wr(),t=vt(),r=zA();return E0=function(){var i=e("Symbol"),o=i&&i.prototype,s=o&&o.valueOf,a=t("toPrimitive");o&&!o[a]&&r(o,a,function(g){return n(s,this)},{arity:1})},E0}var A5;function $xe(){if(A5)return o5;A5=1;var n=ne(),e=He(),t=ur(),r=we(),i=Sa(),o=gt(),s=wa(),a=be(),g=qt(),A=pt(),I=ci(),C=Jr(),l=kO(),d=zr(),u=_A(),h=BA(),p=$A(),f=yl(),c=iT(),m=hl(),v=ll(),y=Br(),w=YO(),S=Al(),b=zA(),E=aT(),O=Oa(),P=vl(),_=xA(),T=Cl(),R=vt(),D=El(),G=Qe(),B=U9(),Q=xo(),te=Ro(),le=wn().forEach,U=P("hidden"),fe="Symbol",xe="prototype",$e=te.set,hr=te.getterFor(fe),Oe=Object[xe],mt=e.Symbol,Lt=mt&&mt[xe],W=e.RangeError,N=e.TypeError,M=e.QObject,Y=v.f,re=y.f,oe=c.f,qe=S.f,it=r([].push),Ee=O("symbols"),yt=O("op-symbols"),Er=O("wks"),Gt=!M||!M[xe]||!M[xe].findChild,Fa=function(ae,V,Z){var H=Y(Oe,V);H&&delete Oe[V],re(ae,V,Z),H&&ae!==Oe&&re(Oe,V,H)},On=o&&a(function(){return h(re({},"a",{get:function(){return re(this,"a",{value:7}).a}})).a!==7})?Fa:re,Tn=function(ae,V){var Z=Ee[ae]=h(Lt);return $e(Z,{type:fe,tag:ae,description:V}),o||(Z.description=V),Z},fi=function(V,Z,H){V===Oe&&fi(yt,Z,H),I(V);var ge=l(Z);return I(H),g(Ee,ge)?(H.enumerable?(g(V,U)&&V[U][ge]&&(V[U][ge]=!1),H=h(H,{enumerable:u(0,!1)})):(g(V,U)||re(V,U,u(1,h(null))),V[U][ge]=!0),On(V,ge,H)):re(V,ge,H)},_n=function(V,Z){I(V);var H=C(Z),ge=p(H).concat(za(H));return le(ge,function(Te){(!o||t(Pn,H,Te))&&fi(V,Te,H[Te])}),V},_l=function(V,Z){return Z===void 0?h(V):_n(h(V),Z)},Pn=function(V){var Z=l(V),H=t(qe,this,Z);return this===Oe&&g(Ee,Z)&&!g(yt,Z)?!1:H||!g(this,Z)||!g(Ee,Z)||g(this,U)&&this[U][Z]?H:!0},Ba=function(V,Z){var H=C(V),ge=l(Z);if(!(H===Oe&&g(Ee,ge)&&!g(yt,ge))){var Te=Y(H,ge);return Te&&g(Ee,ge)&&!(g(H,U)&&H[U][ge])&&(Te.enumerable=!0),Te}},qa=function(V){var Z=oe(C(V)),H=[];return le(Z,function(ge){!g(Ee,ge)&&!g(_,ge)&&it(H,ge)}),H},za=function(ae){var V=ae===Oe,Z=oe(V?yt:C(ae)),H=[];return le(Z,function(ge){g(Ee,ge)&&(!V||g(Oe,ge))&&it(H,Ee[ge])}),H};return s||(mt=function(){if(A(Lt,this))throw new N("Symbol is not a constructor");var V=!arguments.length||arguments[0]===void 0?void 0:d(arguments[0]),Z=T(V),H=function(ge){var Te=this===void 0?e:this;Te===Oe&&t(H,yt,ge),g(Te,U)&&g(Te[U],Z)&&(Te[U][Z]=!1);var ja=u(1,ge);try{On(Te,Z,ja)}catch(La){if(!(La instanceof W))throw La;Fa(Te,Z,ja)}};return o&&Gt&&On(Oe,Z,{configurable:!0,set:H}),Tn(Z,V)},Lt=mt[xe],b(Lt,"toString",function(){return hr(this).tag}),b(mt,"withoutSetter",function(ae){return Tn(T(ae),ae)}),S.f=Pn,y.f=fi,w.f=_n,v.f=Ba,f.f=c.f=qa,m.f=za,D.f=function(ae){return Tn(R(ae),ae)},o&&(E(Lt,"description",{configurable:!0,get:function(){return hr(this).description}}),i||b(Oe,"propertyIsEnumerable",Pn,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:mt}),le(p(Er),function(ae){G(ae)}),n({target:fe,stat:!0,forced:!s},{useSetter:function(){Gt=!0},useSimple:function(){Gt=!1}}),n({target:"Object",stat:!0,forced:!s,sham:!o},{create:_l,defineProperty:fi,defineProperties:_n,getOwnPropertyDescriptor:Ba}),n({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:qa}),B(),Q(mt,fe),_[U]=!0,o5}var I5={},S0,C5;function Y9(){if(C5)return S0;C5=1;var n=wa();return S0=n&&!!Symbol.for&&!!Symbol.keyFor,S0}var l5;function Dxe(){if(l5)return I5;l5=1;var n=ne(),e=wr(),t=qt(),r=zr(),i=Oa(),o=Y9(),s=i("string-to-symbol-registry"),a=i("symbol-to-string-registry");return n({target:"Symbol",stat:!0,forced:!o},{for:function(g){var A=r(g);if(t(s,A))return s[A];var I=e("Symbol")(A);return s[A]=I,a[I]=A,I}}),I5}var d5={},u5;function Nxe(){if(u5)return d5;u5=1;var n=ne(),e=qt(),t=RA(),r=Ea(),i=Oa(),o=Y9(),s=i("symbol-to-string-registry");return n({target:"Symbol",stat:!0,forced:!o},{keyFor:function(g){if(!t(g))throw new TypeError(r(g)+" is not a symbol");if(e(s,g))return s[g]}}),d5}var h5={},O0,c5;function Mxe(){if(c5)return O0;c5=1;var n=we(),e=Po(),t=Pt(),r=hi(),i=zr(),o=n([].push);return O0=function(s){if(t(s))return s;if(e(s)){for(var a=s.length,g=[],A=0;A<a;A++){var I=s[A];typeof I=="string"?o(g,I):(typeof I=="number"||r(I)==="Number"||r(I)==="String")&&o(g,i(I))}var C=g.length,l=!0;return function(d,u){if(l)return l=!1,u;if(e(this))return u;for(var h=0;h<C;h++)if(g[h]===d)return u}}},O0}var f5;function K9(){if(f5)return h5;f5=1;var n=ne(),e=wr(),t=gl(),r=ur(),i=we(),o=be(),s=Pt(),a=RA(),g=Pa(),A=Mxe(),I=wa(),C=String,l=e("JSON","stringify"),d=i(/./.exec),u=i("".charAt),h=i("".charCodeAt),p=i("".replace),f=i(1.1.toString),c=/[\uD800-\uDFFF]/g,m=/^[\uD800-\uDBFF]$/,v=/^[\uDC00-\uDFFF]$/,y=!I||o(function(){var E=e("Symbol")("stringify detection");return l([E])!=="[null]"||l({a:E})!=="{}"||l(Object(E))!=="{}"}),w=o(function(){return l("\uDF06\uD834")!=='"\\udf06\\ud834"'||l("\uDEAD")!=='"\\udead"'}),S=function(E,O){var P=g(arguments),_=A(O);if(!(!s(_)&&(E===void 0||a(E))))return P[1]=function(T,R){if(s(_)&&(R=r(_,this,C(T),R)),!a(R))return R},t(l,null,P)},b=function(E,O,P){var _=u(P,O-1),T=u(P,O+1);return d(m,E)&&!d(v,T)||d(v,E)&&!d(m,_)?"\\u"+f(h(E,0),16):E};return l&&n({target:"JSON",stat:!0,arity:3,forced:y||w},{stringify:function(O,P,_){var T=g(arguments),R=t(y?S:l,null,T);return w&&typeof R=="string"?p(R,c,b):R}}),h5}var p5={},v5;function kxe(){if(v5)return p5;v5=1;var n=ne(),e=wa(),t=be(),r=hl(),i=Fr(),o=!e||t(function(){r.f(1)});return n({target:"Object",stat:!0,forced:o},{getOwnPropertySymbols:function(a){var g=r.f;return g?g(i(a)):[]}}),p5}var m5;function X9(){return m5||(m5=1,$xe(),Dxe(),Nxe(),K9(),kxe()),n5}var y5={},b5;function Q9(){if(b5)return y5;b5=1;var n=Qe();return n("asyncDispose"),y5}var w5={},E5;function Fxe(){if(E5)return w5;E5=1;var n=Qe();return n("asyncIterator"),w5}var S5={},O5;function J9(){if(O5)return S5;O5=1;var n=Qe();return n("dispose"),S5}var T5={},_5;function Bxe(){if(_5)return T5;_5=1;var n=Qe();return n("hasInstance"),T5}var P5={},R5;function qxe(){if(R5)return P5;R5=1;var n=Qe();return n("isConcatSpreadable"),P5}var x5={},$5;function e6(){if($5)return x5;$5=1;var n=Qe();return n("iterator"),x5}var D5={},N5;function zxe(){if(N5)return D5;N5=1;var n=Qe();return n("match"),D5}var M5={},k5;function jxe(){if(k5)return M5;k5=1;var n=Qe();return n("matchAll"),M5}var F5={},B5;function Lxe(){if(B5)return F5;B5=1;var n=Qe();return n("replace"),F5}var q5={},z5;function Gxe(){if(z5)return q5;z5=1;var n=Qe();return n("search"),q5}var j5={},L5;function Wxe(){if(L5)return j5;L5=1;var n=Qe();return n("species"),j5}var G5={},W5;function Vxe(){if(W5)return G5;W5=1;var n=Qe();return n("split"),G5}var V5={},Z5;function t6(){if(Z5)return V5;Z5=1;var n=Qe(),e=U9();return n("toPrimitive"),e(),V5}var H5={},U5;function Zxe(){if(U5)return H5;U5=1;var n=wr(),e=Qe(),t=xo();return e("toStringTag"),t(n("Symbol"),"Symbol"),H5}var Y5={},K5;function Hxe(){if(K5)return Y5;K5=1;var n=Qe();return n("unscopables"),Y5}var X5={},Q5;function Uxe(){if(Q5)return X5;Q5=1;var n=He(),e=xo();return e(n.JSON,"JSON",!0),X5}var T0,J5;function Yxe(){if(J5)return T0;J5=1,F9(),X9(),Q9(),Fxe(),J9(),Bxe(),qxe(),e6(),zxe(),jxe(),Lxe(),Gxe(),Wxe(),Vxe(),t6(),Zxe(),Hxe(),Uxe();var n=Re();return T0=n.Symbol,T0}var _0,eG;function Kxe(){if(eG)return _0;eG=1;var n=Yxe();return ka(),_0=n,_0}var tG={},rG;function Xxe(){if(rG)return tG;rG=1;var n=vt(),e=Br().f,t=n("metadata"),r=Function.prototype;return r[t]===void 0&&e(r,t,{value:null}),tG}var iG={},nG;function Qxe(){return nG||(nG=1,Q9()),iG}var oG={},sG;function Jxe(){return sG||(sG=1,J9()),oG}var aG={},gG;function e$e(){if(gG)return aG;gG=1;var n=Qe();return n("metadata"),aG}var P0,AG;function t$e(){if(AG)return P0;AG=1;var n=Kxe();return Xxe(),Qxe(),Jxe(),e$e(),P0=n,P0}var IG={},R0,CG;function r6(){if(CG)return R0;CG=1;var n=wr(),e=we(),t=n("Symbol"),r=t.keyFor,i=e(t.prototype.valueOf);return R0=t.isRegisteredSymbol||function(s){try{return r(i(s))!==void 0}catch{return!1}},R0}var lG;function r$e(){if(lG)return IG;lG=1;var n=ne(),e=r6();return n({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),IG}var dG={},x0,uG;function i6(){if(uG)return x0;uG=1;for(var n=Oa(),e=wr(),t=we(),r=RA(),i=vt(),o=e("Symbol"),s=o.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),g=t(o.prototype.valueOf),A=n("wks"),I=0,C=a(o),l=C.length;I<l;I++)try{var d=C[I];r(o[d])&&i(d)}catch{}return x0=function(h){if(s&&s(h))return!0;try{for(var p=g(h),f=0,c=a(A),m=c.length;f<m;f++)if(A[c[f]]==p)return!0}catch{}return!1},x0}var hG;function i$e(){if(hG)return dG;hG=1;var n=ne(),e=i6();return n({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:e}),dG}var cG={},fG;function n$e(){if(fG)return cG;fG=1;var n=Qe();return n("customMatcher"),cG}var pG={},vG;function o$e(){if(vG)return pG;vG=1;var n=Qe();return n("observable"),pG}var mG={},yG;function s$e(){if(yG)return mG;yG=1;var n=ne(),e=r6();return n({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:e}),mG}var bG={},wG;function a$e(){if(wG)return bG;wG=1;var n=ne(),e=i6();return n({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:e}),bG}var EG={},SG;function g$e(){if(SG)return EG;SG=1;var n=Qe();return n("matcher"),EG}var OG={},TG;function A$e(){if(TG)return OG;TG=1;var n=Qe();return n("metadataKey"),OG}var _G={},PG;function I$e(){if(PG)return _G;PG=1;var n=Qe();return n("patternMatch"),_G}var RG={},xG;function C$e(){if(xG)return RG;xG=1;var n=Qe();return n("replaceAll"),RG}var $0,$G;function l$e(){if($G)return $0;$G=1;var n=t$e();return r$e(),i$e(),n$e(),o$e(),s$e(),a$e(),g$e(),A$e(),I$e(),C$e(),$0=n,$0}var D0,DG;function d$e(){return DG||(DG=1,D0=l$e()),D0}var u$e=d$e(),pI=ue(u$e),N0,NG;function h$e(){if(NG)return N0;NG=1,Ma(),AT(),e6();var n=El();return N0=n.f("iterator"),N0}var M0,MG;function c$e(){if(MG)return M0;MG=1;var n=h$e();return ka(),M0=n,M0}var k0,kG;function f$e(){if(kG)return k0;kG=1;var n=c$e();return k0=n,k0}var F0,FG;function p$e(){if(FG)return F0;FG=1;var n=f$e();return F0=n,F0}var B0,BG;function v$e(){return BG||(BG=1,B0=p$e()),B0}var m$e=v$e(),y$e=ue(m$e);function Gg(n){"@babel/helpers - typeof";return Gg=typeof pI=="function"&&typeof y$e=="symbol"?function(e){return typeof e}:function(e){return e&&typeof pI=="function"&&e.constructor===pI&&e!==pI.prototype?"symbol":typeof e},Gg(n)}var q0,qG;function b$e(){if(qG)return q0;qG=1,t6();var n=El();return q0=n.f("toPrimitive"),q0}var z0,zG;function w$e(){if(zG)return z0;zG=1;var n=b$e();return z0=n,z0}var j0,jG;function E$e(){if(jG)return j0;jG=1;var n=w$e();return j0=n,j0}var L0,LG;function S$e(){if(LG)return L0;LG=1;var n=E$e();return L0=n,L0}var G0,GG;function O$e(){return GG||(GG=1,G0=S$e()),G0}var T$e=O$e(),_$e=ue(T$e);function P$e(n,e){if(Gg(n)!="object"||!n)return n;var t=n[_$e];if(t!==void 0){var r=t.call(n,e);if(Gg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function R$e(n){var e=P$e(n,"string");return Gg(e)=="symbol"?e:e+""}function mi(n,e,t){return(e=R$e(e))in n?xxe(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var WG={},W0,VG;function CT(){return VG||(VG=1,W0=`	
\v\f\r                　\u2028\u2029\uFEFF`),W0}var V0,ZG;function n6(){if(ZG)return V0;ZG=1;var n=we(),e=qi(),t=zr(),r=CT(),i=n("".replace),o=RegExp("^["+r+"]+"),s=RegExp("(^|[^"+r+"])["+r+"]+$"),a=function(g){return function(A){var I=t(e(A));return g&1&&(I=i(I,o,"")),g&2&&(I=i(I,s,"$1")),I}};return V0={start:a(1),end:a(2),trim:a(3)},V0}var Z0,HG;function x$e(){if(HG)return Z0;HG=1;var n=He(),e=be(),t=we(),r=zr(),i=n6().trim,o=CT(),s=n.parseInt,a=n.Symbol,g=a&&a.iterator,A=/^[+-]?0x/i,I=t(A.exec),C=s(o+"08")!==8||s(o+"0x16")!==22||g&&!e(function(){s(Object(g))});return Z0=C?function(d,u){var h=i(r(d));return s(h,u>>>0||(I(A,h)?16:10))}:s,Z0}var UG;function $$e(){if(UG)return WG;UG=1;var n=ne(),e=x$e();return n({global:!0,forced:parseInt!==e},{parseInt:e}),WG}var H0,YG;function D$e(){if(YG)return H0;YG=1,$$e();var n=Re();return H0=n.parseInt,H0}var U0,KG;function N$e(){if(KG)return U0;KG=1;var n=D$e();return U0=n,U0}var Y0,XG;function M$e(){return XG||(XG=1,Y0=N$e()),Y0}var k$e=M$e(),QG=ue(k$e),JG={},K0,eW;function F$e(){if(eW)return K0;eW=1;var n=He(),e=be(),t=we(),r=zr(),i=n6().trim,o=CT(),s=t("".charAt),a=n.parseFloat,g=n.Symbol,A=g&&g.iterator,I=1/a(o+"-0")!==-1/0||A&&!e(function(){a(Object(A))});return K0=I?function(l){var d=i(r(l)),u=a(d);return u===0&&s(d,0)==="-"?-0:u}:a,K0}var tW;function B$e(){if(tW)return JG;tW=1;var n=ne(),e=F$e();return n({global:!0,forced:parseFloat!==e},{parseFloat:e}),JG}var X0,rW;function q$e(){if(rW)return X0;rW=1,B$e();var n=Re();return X0=n.parseFloat,X0}var Q0,iW;function z$e(){if(iW)return Q0;iW=1;var n=q$e();return Q0=n,Q0}var J0,nW;function j$e(){return nW||(nW=1,J0=z$e()),J0}var L$e=j$e(),o6=ue(L$e),oW={},sW;function G$e(){if(sW)return oW;sW=1;var n=ne(),e=wn().filter,t=qA(),r=t("filter");return n({target:"Array",proto:!0,forced:!r},{filter:function(o){return e(this,o,arguments.length>1?arguments[1]:void 0)}}),oW}var e1,aW;function W$e(){if(aW)return e1;aW=1,G$e();var n=zt();return e1=n("Array","filter"),e1}var t1,gW;function V$e(){if(gW)return t1;gW=1;var n=pt(),e=W$e(),t=Array.prototype;return t1=function(r){var i=r.filter;return r===t||n(t,r)&&i===t.filter?e:i},t1}var r1,AW;function Z$e(){if(AW)return r1;AW=1;var n=V$e();return r1=n,r1}var i1,IW;function H$e(){return IW||(IW=1,i1=Z$e()),i1}var U$e=H$e(),Li=ue(U$e),CW={},lW;function Y$e(){if(lW)return CW;lW=1;var n=ne(),e=be(),t=iT().f,r=e(function(){return!Object.getOwnPropertyNames(1)});return n({target:"Object",stat:!0,forced:r},{getOwnPropertyNames:t}),CW}var n1,dW;function K$e(){if(dW)return n1;dW=1,Y$e();var n=Re(),e=n.Object;return n1=function(r){return e.getOwnPropertyNames(r)},n1}var o1,uW;function X$e(){if(uW)return o1;uW=1;var n=K$e();return o1=n,o1}var s1,hW;function Q$e(){return hW||(hW=1,s1=X$e()),s1}var J$e=Q$e(),eDe=ue(J$e),a1,cW;function tDe(){if(cW)return a1;cW=1,X9();var n=Re();return a1=n.Object.getOwnPropertySymbols,a1}var g1,fW;function rDe(){if(fW)return g1;fW=1;var n=tDe();return g1=n,g1}var A1,pW;function iDe(){return pW||(pW=1,A1=rDe()),A1}var nDe=iDe(),un=ue(nDe),I1={exports:{}},vW={},mW;function oDe(){if(mW)return vW;mW=1;var n=ne(),e=be(),t=Jr(),r=ll().f,i=gt(),o=!i||e(function(){r(1)});return n({target:"Object",stat:!0,forced:o,sham:!i},{getOwnPropertyDescriptor:function(a,g){return r(t(a),g)}}),vW}var yW;function sDe(){if(yW)return I1.exports;yW=1,oDe();var n=Re(),e=n.Object,t=I1.exports=function(i,o){return e.getOwnPropertyDescriptor(i,o)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),I1.exports}var C1,bW;function aDe(){if(bW)return C1;bW=1;var n=sDe();return C1=n,C1}var l1,wW;function gDe(){return wW||(wW=1,l1=aDe()),l1}var ADe=gDe(),En=ue(ADe),EW={},d1,SW;function IDe(){if(SW)return d1;SW=1;var n=wr(),e=we(),t=yl(),r=hl(),i=ci(),o=e([].concat);return d1=n("Reflect","ownKeys")||function(a){var g=t.f(i(a)),A=r.f;return A?o(g,A(a)):g},d1}var OW;function CDe(){if(OW)return EW;OW=1;var n=ne(),e=gt(),t=IDe(),r=Jr(),i=ll(),o=ml();return n({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(a){for(var g=r(a),A=i.f,I=t(g),C={},l=0,d,u;I.length>l;)u=A(g,d=I[l++]),u!==void 0&&o(C,d,u);return C}}),EW}var u1,TW;function lDe(){if(TW)return u1;TW=1,CDe();var n=Re();return u1=n.Object.getOwnPropertyDescriptors,u1}var h1,_W;function dDe(){if(_W)return h1;_W=1;var n=lDe();return h1=n,h1}var c1,PW;function uDe(){return PW||(PW=1,c1=dDe()),c1}var hDe=uDe(),hn=ue(hDe),f1={exports:{}},RW={},xW;function cDe(){if(xW)return RW;xW=1;var n=ne(),e=gt(),t=YO().f;return n({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),RW}var $W;function fDe(){if($W)return f1.exports;$W=1,cDe();var n=Re(),e=n.Object,t=f1.exports=function(i,o){return e.defineProperties(i,o)};return e.defineProperties.sham&&(t.sham=!0),f1.exports}var p1,DW;function pDe(){if(DW)return p1;DW=1;var n=fDe();return p1=n,p1}var v1,NW;function vDe(){return NW||(NW=1,v1=pDe()),v1}var mDe=vDe(),Sl=ue(mDe),m1,MW;function yDe(){return MW||(MW=1,m1=H9()),m1}var bDe=yDe(),Ol=ue(bDe);function lT(n,e){const t=["node","edge","label"];let r=!0;const i=Zi(e,"chosen");if(typeof i=="boolean")r=i;else if(typeof i=="object"){if(Ye(t).call(t,n)===-1)throw new Error("choosify: subOption '"+n+"' should be one of '"+t.join("', '")+"'");const o=Zi(e,["chosen",n]);(typeof o=="boolean"||typeof o=="function")&&(r=o)}return r}function tS(n,e,t){if(n.width<=0||n.height<=0)return!1;if(t!==void 0){const o={x:e.x-t.x,y:e.y-t.y};if(t.angle!==0){const s=-t.angle;e={x:Math.cos(s)*o.x-Math.sin(s)*o.y,y:Math.sin(s)*o.x+Math.cos(s)*o.y}}else e=o}const r=n.x+n.width,i=n.y+n.width;return n.left<e.x&&r>e.x&&n.top<e.y&&i>e.y}function AC(n){return typeof n=="string"&&n!==""}function s6(n,e,t,r){let i=r.x,o=r.y;if(typeof r.distanceToBorder=="function"){const s=r.distanceToBorder(n,e),a=Math.sin(e)*s,g=Math.cos(e)*s;g===s?(i+=s,o=r.y):a===s?(i=r.x,o-=s):(i+=g,o-=a)}else r.shape.width>r.shape.height?(i=r.x+r.shape.width*.5,o=r.y-t):(i=r.x+t,o=r.y-r.shape.height*.5);return{x:i,y:o}}var kW={},FW;function wDe(){if(FW)return kW;FW=1;var n=ne(),e=Po(),t=_9(),r=Rt(),i=ul(),o=ji(),s=Jr(),a=ml(),g=vt(),A=qA(),I=Pa(),C=A("slice"),l=g("species"),d=Array,u=Math.max;return n({target:"Array",proto:!0,forced:!C},{slice:function(p,f){var c=s(this),m=o(c),v=i(p,m),y=i(f===void 0?m:f,m),w,S,b;if(e(c)&&(w=c.constructor,t(w)&&(w===d||e(w.prototype))?w=void 0:r(w)&&(w=w[l],w===null&&(w=void 0)),w===d||w===void 0))return I(c,v,y);for(S=new(w===void 0?d:w)(u(y-v,0)),b=0;v<y;v++,b++)v in c&&a(S,b,c[v]);return S.length=b,S}}),kW}var y1,BW;function EDe(){if(BW)return y1;BW=1,wDe();var n=zt();return y1=n("Array","slice"),y1}var b1,qW;function SDe(){if(qW)return b1;qW=1;var n=pt(),e=EDe(),t=Array.prototype;return b1=function(r){var i=r.slice;return r===t||n(t,r)&&i===t.slice?e:i},b1}var w1,zW;function ODe(){if(zW)return w1;zW=1;var n=SDe();return w1=n,w1}var E1,jW;function TDe(){return jW||(jW=1,E1=ODe()),E1}var _De=TDe(),Yo=ue(_De),S1,LW;function PDe(){if(LW)return S1;LW=1,Ma();var n=zt();return S1=n("Array","values"),S1}var O1,GW;function RDe(){if(GW)return O1;GW=1;var n=PDe();return O1=n,O1}var T1,WW;function xDe(){if(WW)return T1;WW=1,ka();var n=Da(),e=qt(),t=pt(),r=RDe(),i=Array.prototype,o={DOMTokenList:!0,NodeList:!0};return T1=function(s){var a=s.values;return s===i||t(i,s)&&a===i.values||e(o,n(s))?r:a},T1}var _1,VW;function $De(){return VW||(VW=1,_1=xDe()),_1}var DDe=$De(),a6=ue(DDe);class NDe{constructor(e){this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}_add(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});let i=t;(t===void 0||t==="")&&(i=" ");const o=this.measureText(i,r),s=Mt({},a6(o));s.text=t,s.width=o.width,s.mod=r,(t===void 0||t==="")&&(s.width=0),this.lines[e].blocks.push(s),this.lines[e].width+=s.width}curWidth(){const e=this.lines[this.current];return e===void 0?0:e.width}append(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}newLine(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}determineLineHeights(){for(let e=0;e<this.lines.length;e++){const t=this.lines[e];let r=0;if(t.blocks!==void 0)for(let i=0;i<t.blocks.length;i++){const o=t.blocks[i];r<o.height&&(r=o.height)}t.height=r}}determineLabelSize(){let e=0,t=0;for(let r=0;r<this.lines.length;r++){const i=this.lines[r];i.width>e&&(e=i.width),t+=i.height}this.width=e,this.height=t}removeEmptyBlocks(){const e=[];for(let t=0;t<this.lines.length;t++){const r=this.lines[t];if(r.blocks.length===0||t===this.lines.length-1&&r.width===0)continue;const i={};Mt(i,r),i.blocks=[];let o;const s=[];for(let a=0;a<r.blocks.length;a++){const g=r.blocks[a];g.width!==0?s.push(g):o===void 0&&(o=g)}s.length===0&&o!==void 0&&s.push(o),i.blocks=s,e.push(i)}return e}finalize(){this.determineLineHeights(),this.determineLabelSize();const e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}}const MDe={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/};class ZW{constructor(e){this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}mod(){return this.modStack.length===0?"normal":this.modStack[0]}modName(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}emitBlock(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}add(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}parseWS(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}setTag(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}unsetTag(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}parseStartTag(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const[r,i]=this.prepareRegExp(e),o=r.test(this.text.substr(this.position,i));return o&&t&&(this.position+=i-1),o}parseEndTag(e,t,r){let i=this.mod()===e;return e==="mono"?i=i&&this.mono:i=i&&!this.mono,i&&this.match(t)?(r!==void 0?(this.position===this.text.length-1||this.match(r,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}replace(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}prepareRegExp(e){let t,r;if(e instanceof RegExp)r=e,t=1;else{const i=MDe[e];i!==void 0?r=i:r=new RegExp(e),t=e.length}return[r,t]}}class kDe{constructor(e,t,r,i){this.ctx=e,this.parent=t,this.selected=r,this.hover=i;const o=(s,a)=>{if(s===void 0)return 0;const g=this.parent.getFormattingValues(e,r,i,a);let A=0;return s!==""&&(A=this.ctx.measureText(s).width),{width:A,values:g}};this.lines=new NDe(o)}process(e){if(!AC(e))return this.lines.finalize();const t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
`),e=e.replace(/\r/g,`
`);const r=String(e).split(`
`),i=r.length;if(t.multi)for(let o=0;o<i;o++){const s=this.splitBlocks(r[o],t.multi);if(s!==void 0){if(s.length===0){this.lines.newLine("");continue}if(t.maxWdt>0)for(let a=0;a<s.length;a++){const g=s[a].mod,A=s[a].text;this.splitStringIntoLines(A,g,!0)}else for(let a=0;a<s.length;a++){const g=s[a].mod,A=s[a].text;this.lines.append(A,g)}this.lines.newLine()}}else if(t.maxWdt>0)for(let o=0;o<i;o++)this.splitStringIntoLines(r[o]);else for(let o=0;o<i;o++)this.lines.newLine(r[o]);return this.lines.finalize()}decodeMarkupSystem(e){let t="none";return e==="markdown"||e==="md"?t="markdown":(e===!0||e==="html")&&(t="html"),t}splitHtmlBlocks(e){const t=new ZW(e),r=i=>/&/.test(i)?(t.replace(t.text,"&lt;","<")||t.replace(t.text,"&amp;","&")||t.add("&"),!0):!1;for(;t.position<t.text.length;){const i=t.text.charAt(t.position);t.parseWS(i)||/</.test(i)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||r(i)||t.add(i),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){const t=new ZW(e);let r=!0;const i=o=>/\\/.test(o)?(t.position<this.text.length+1&&(t.position++,o=this.text.charAt(t.position),/ \t/.test(o)?t.spacing=!0:(t.add(o),r=!1)),!0):!1;for(;t.position<t.text.length;){const o=t.text.charAt(t.position);t.parseWS(o)||i(o)||(r||t.spacing)&&(t.parseStartTag("bold","*")||t.parseStartTag("ital","_")||t.parseStartTag("mono","`"))||t.parseEndTag("bold","*","afterBold")||t.parseEndTag("ital","_","afterItal")||t.parseEndTag("mono","`","afterMono")||(t.add(o),r=!1),t.position++}return t.emitBlock(),t.blocks}splitBlocks(e,t){const r=this.decodeMarkupSystem(t);if(r==="none")return[{text:e,mod:"normal"}];if(r==="markdown")return this.splitMarkdownBlocks(e);if(r==="html")return this.splitHtmlBlocks(e)}overMaxWidth(e){const t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}getLongestFit(e){let t="",r=0;for(;r<e.length;){const o=t+(t===""?"":" ")+e[r];if(this.overMaxWidth(o))break;t=o,r++}return r}getLongestFitWord(e){let t=0;for(;t<e.length&&!this.overMaxWidth(Yo(e).call(e,0,t));)t++;return t}splitStringIntoLines(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let i=e.split("\r");for(;i.length>0;){let o=this.getLongestFit(i);if(o===0){const s=i[0],a=this.getLongestFitWord(s);this.lines.newLine(Yo(s).call(s,0,a),t),i[0]=Yo(s).call(s,a)}else{let s=o;i[o-1]===" "?o--:i[s]===" "&&s++;const a=Yo(i).call(i,0,o).join("");o==i.length&&r?this.lines.append(a,t):this.lines.newLine(a,t),i=Yo(i).call(i,s)}}}}const Ka=["bold","ital","boldital","mono"];class bs{constructor(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=r}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),AC(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(typeof e.font=="object"){const t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(e){if(ve(Ka,t=>{this.fontOptions[t]={}}),bs.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}ve(e,(t,r)=>{t!=null&&typeof t!="object"&&(this.fontOptions[r]=t)})}static parseFontString(e,t){if(!t||typeof t!="string")return!1;const r=t.split(" ");return e.size=+r[0].replace("px",""),e.face=r[1],e.color=r[2],!0}constrain(e){const t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},r=Zi(e,"widthConstraint");if(typeof r=="number")t.maxWdt=Number(r),t.minWdt=Number(r);else if(typeof r=="object"){const o=Zi(e,["widthConstraint","maximum"]);typeof o=="number"&&(t.maxWdt=Number(o));const s=Zi(e,["widthConstraint","minimum"]);typeof s=="number"&&(t.minWdt=Number(s))}const i=Zi(e,"heightConstraint");if(typeof i=="number")t.minHgt=Number(i);else if(typeof i=="object"){const o=Zi(e,["heightConstraint","minimum"]);typeof o=="number"&&(t.minHgt=Number(o));const s=Zi(e,["heightConstraint","valign"]);typeof s=="string"&&(s==="top"||s==="bottom")&&(t.valign=s)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),ke(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=lT("label",t)}adjustSizes(e){const t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);const r=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=r)}addFontOptionsToPile(e,t){for(let r=0;r<t.length;++r)this.addFontToPile(e,t[r])}addFontToPile(e,t){if(t===void 0||t.font===void 0||t.font===null)return;const r=t.font;e.push(r)}getBasicOptions(e){const t={};for(let r=0;r<e.length;++r){let i=e[r];const o={};bs.parseFontString(o,i)&&(i=o),ve(i,(s,a)=>{s!==void 0&&(Object.prototype.hasOwnProperty.call(t,a)||(Ye(Ka).call(Ka,a)!==-1?t[a]={}:t[a]=s))})}return t}getFontOption(e,t,r){let i;for(let o=0;o<e.length;++o){const s=e[o];if(Object.prototype.hasOwnProperty.call(s,t)){if(i=s[t],i==null)continue;const a={};if(bs.parseFontString(a,i)&&(i=a),Object.prototype.hasOwnProperty.call(i,r))return i[r]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,r))return this.fontOptions[r];throw new Error("Did not find value for multi-font for property: '"+r+"'")}getFontOptions(e,t){const r={},i=["color","size","face","mod","vadjust"];for(let o=0;o<i.length;++o){const s=i[o];r[s]=this.getFontOption(e,t,s)}return r}propagateFonts(e){const t=[];this.addFontOptionsToPile(t,e),this.fontOptions=this.getBasicOptions(t);for(let r=0;r<Ka.length;++r){const i=Ka[r],o=this.fontOptions[i],s=this.getFontOptions(t,i);ve(s,(a,g)=>{o[g]=a}),o.size=Number(o.size),o.vadjust=Number(o.vadjust)}}draw(e,t,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label===void 0)return;let a=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&a<this.elementOptions.scaling.label.drawThreshold-1||(a>=this.elementOptions.scaling.label.maxVisible&&(a=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,i,o,t,r,s),this._drawBackground(e),this._drawText(e,t,this.size.yLine,s,a))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;const t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}_drawText(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0;[t,r]=this._setAlignment(e,t,r,i),e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(r-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(r+=(this.size.height-this.size.labelHeight)/2));for(let s=0;s<this.lineCount;s++){const a=this.lines[s];if(a&&a.blocks){let g=0;this.isEdgeLabel||this.fontOptions.align==="center"?g+=(this.size.width-a.width)/2:this.fontOptions.align==="right"&&(g+=this.size.width-a.width);for(let A=0;A<a.blocks.length;A++){const I=a.blocks[A];e.font=I.font;const[C,l]=this._getColor(I.color,o,I.strokeColor);I.strokeWidth>0&&(e.lineWidth=I.strokeWidth,e.strokeStyle=l,e.lineJoin="round"),e.fillStyle=C,I.strokeWidth>0&&e.strokeText(I.text,t+g,r+I.vadjust),e.fillText(I.text,t+g,r+I.vadjust),g+=I.width}r+=a.height}}}_setAlignment(e,t,r,i){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,r=0;const o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",r-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",r+=2*o):e.textBaseline="middle"}else e.textBaseline=i;return[t,r]}_getColor(e,t,r){let i=e||"#000000",o=r||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){const s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));i=_r(i,s),o=_r(o,s)}return[i,o]}getTextSize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,r),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let t=this.size.left,r=this.size.top-.5*2;if(this.isEdgeLabel){const o=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=o,r=-this.size.height*.5;break;case"top":t=o,r=-(this.size.height+2);break;case"bottom":t=o,r=2;break}}return{left:t,top:r,width:this.size.width,height:this.size.height}}calculateLabelSize(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,r),this.size.left=i-this.size.width*.5,this.size.top=o-this.size.height*.5,this.size.yLine=o+(1-this.lineCount)*.5*this.fontOptions.size,s==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,t,r,i){const o=function(g,A,I){return A==="normal"?I==="mod"?"":g[I]:g[A][I]!==void 0?g[A][I]:g[I]},s={color:o(this.fontOptions,i,"color"),size:o(this.fontOptions,i,"size"),face:o(this.fontOptions,i,"face"),mod:o(this.fontOptions,i,"mod"),vadjust:o(this.fontOptions,i,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||r)&&(i==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,t,r));let a="";return s.mod!==void 0&&s.mod!==""&&(a+=s.mod+" "),a+=s.size+"px "+s.face,e.font=a.replace(/"/g,""),s.font=e.font,s.height=s.size,s}differentState(e,t){return e!==this.selectedState||t!==this.hoverState}_processLabelText(e,t,r,i){return new kDe(e,this,t,r).process(i)}_processLabel(e,t,r){if(this.labelDirty===!1&&!this.differentState(t,r))return;const i=this._processLabelText(e,t,r,this.elementOptions.label);this.fontOptions.minWdt>0&&i.width<this.fontOptions.minWdt&&(i.width=this.fontOptions.minWdt),this.size.labelHeight=i.height,this.fontOptions.minHgt>0&&i.height<this.fontOptions.minHgt&&(i.height=this.fontOptions.minHgt),this.lines=i.lines,this.lineCount=i.lines.length,this.size.width=i.width,this.size.height=i.height,this.selectedState=t,this.hoverState=r,this.labelDirty=!1}visible(){return!(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0||this.fontOptions.size*this.body.view.scale<this.elementOptions.scaling.label.drawThreshold-1)}}var HW={},P1,UW;function FDe(){if(UW)return P1;UW=1;var n=Fr(),e=ul(),t=ji();return P1=function(i){for(var o=n(this),s=t(o),a=arguments.length,g=e(a>1?arguments[1]:void 0,s),A=a>2?arguments[2]:void 0,I=A===void 0?s:e(A,s);I>g;)o[g++]=i;return o},P1}var YW;function BDe(){if(YW)return HW;YW=1;var n=ne(),e=FDe(),t=KO();return n({target:"Array",proto:!0},{fill:e}),t("fill"),HW}var R1,KW;function qDe(){if(KW)return R1;KW=1,BDe();var n=zt();return R1=n("Array","fill"),R1}var x1,XW;function zDe(){if(XW)return x1;XW=1;var n=pt(),e=qDe(),t=Array.prototype;return x1=function(r){var i=r.fill;return r===t||n(t,r)&&i===t.fill?e:i},x1}var $1,QW;function jDe(){if(QW)return $1;QW=1;var n=zDe();return $1=n,$1}var D1,JW;function LDe(){return JW||(JW=1,D1=jDe()),D1}var GDe=LDe(),Tl=ue(GDe);class $o{constructor(e,t,r){this.body=t,this.labelModule=r,this.setOptions(e),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}setOptions(e){this.options=e}_setMargins(e){this.margin={},this.options.margin&&(typeof this.options.margin=="object"?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),e.adjustSizes(this.margin)}_distanceToBorder(e,t){const r=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+r}enableShadow(e,t){t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}enableBorderDashes(e,t){if(t.borderDashes!==!1)if(e.setLineDash!==void 0){let r=t.borderDashes;r===!0&&(r=[5,15]),e.setLineDash(r)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1}disableBorderDashes(e,t){t.borderDashes!==!1&&(e.setLineDash!==void 0?e.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1))}needsRefresh(e,t){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,t)}initContextForDraw(e,t){const r=t.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,r),e.strokeStyle=t.borderColor,e.fillStyle=t.color}performStroke(e,t){const r=t.borderWidth/this.body.view.scale;e.save(),r>0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}performFill(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),Tl(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,t,r,i,o){r!==void 0&&this.resize(r,i,o),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}updateBoundingBox(e,t,r,i,o){this._updateBoundingBox(e,t,r,i,o)}getDimensionsFromLabel(e,t,r){this.textSize=this.labelModule.getTextSize(e,t,r);let i=this.textSize.width,o=this.textSize.height;const s=14;return i===0&&(i=s,o=s),{width:i,height:o}}}let WDe=class extends $o{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,r)){const i=this.getDimensionsFromLabel(e,t,r);this.width=i.width+this.margin.right+this.margin.left,this.height=i.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,t,r,i,o,s){this.resize(e,i,o),this.left=t-this.width/2,this.top=r-this.height/2,this.initContextForDraw(e,s),U8(e,this.left,this.top,this.width,this.height,s.borderRadius),this.performFill(e,s),this.updateBoundingBox(t,r,e,i,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,o)}updateBoundingBox(e,t,r,i,o){this._updateBoundingBox(e,t,r,i,o);const s=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(s)}distanceToBorder(e,t){e&&this.resize(e);const r=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+r}};class dT extends $o{constructor(e,t,r){super(e,t,r),this.labelOffset=0,this.selected=!1}setOptions(e,t,r){this.options=e,t===void 0&&r===void 0||this.setImages(t,r)}setImages(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}switchImages(e){const t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){const r=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=r}}_getImagePadding(){const e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){const t=this.options.imagePadding;typeof t=="object"?(e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left):(e.top=t,e.right=t,e.bottom=t,e.left=t)}return e}_resizeImage(){let e,t;if(this.options.shapeProperties.useImageSize===!1){let r=1,i=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?r=this.imageObj.width/this.imageObj.height:i=this.imageObj.height/this.imageObj.width),e=this.options.size*2*r,t=this.options.size*2*i}else{const r=this._getImagePadding();e=this.imageObj.width+r.left+r.right,t=this.imageObj.height+r.top+r.bottom}this.width=e,this.height=t,this.radius=.5*this.width}_drawRawCircle(e,t,r,i){this.initContextForDraw(e,i),qO(e,t,r,i.size),this.performFill(e,i)}_drawImageAtPosition(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity!==void 0?t.opacity:1,this.enableShadow(e,t);let r=1;this.options.shapeProperties.interpolation===!0&&(r=this.imageObj.width/this.width/this.body.view.scale);const i=this._getImagePadding(),o=this.left+i.left,s=this.top+i.top,a=this.width-i.left-i.right,g=this.height-i.top-i.bottom;this.imageObj.drawImageAtPosition(e,r,o,s,a,g),this.disableShadow(e,t)}}_drawImageLabel(e,t,r,i,o){let s=0;if(this.height!==void 0){s=this.height*.5;const g=this.labelModule.getTextSize(e,i,o);g.lineCount>=1&&(s+=g.height/2)}const a=r+s;this.options.label&&(this.labelOffset=s),this.labelModule.draw(e,t,a,i,o,"hanging")}}let VDe=class extends dT{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,r)){const i=this.getDimensionsFromLabel(e,t,r),o=Math.max(i.width+this.margin.right+this.margin.left,i.height+this.margin.top+this.margin.bottom);this.options.size=o/2,this.width=o,this.height=o,this.radius=this.width/2}}draw(e,t,r,i,o,s){this.resize(e,i,o),this.left=t-this.width/2,this.top=r-this.height/2,this._drawRawCircle(e,t,r,s),this.updateBoundingBox(t,r),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,r,i,o)}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size}distanceToBorder(e){return e&&this.resize(e),this.width*.5}};class ZDe extends dT{constructor(e,t,r,i,o){super(e,t,r),this.setImages(i,o)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const o=this.options.size*2;this.width=o,this.height=o,this.radius=.5*this.width;return}this.needsRefresh(t,r)&&this._resizeImage()}draw(e,t,r,i,o,s){this.switchImages(i),this.resize();let a=t,g=r;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=r,a+=this.width/2,g+=this.height/2):(this.left=t-this.width/2,this.top=r-this.height/2),this._drawRawCircle(e,a,g,s),e.save(),e.clip(),this._drawImageAtPosition(e,s),e.restore(),this._drawImageLabel(e,a,g,i,o),this.updateBoundingBox(t,r)}updateBoundingBox(e,t){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=t+this.options.size*2):(this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}}class Sn extends $o{constructor(e,t,r){super(e,t,r)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,r)){var o,s;this.labelModule.getTextSize(e,t,r);const a=2*i.size;this.width=(o=this.customSizeWidth)!==null&&o!==void 0?o:a,this.height=(s=this.customSizeHeight)!==null&&s!==void 0?s:a,this.radius=.5*this.width}}_drawShape(e,t,r,i,o,s,a,g){return this.resize(e,s,a,g),this.left=i-this.width/2,this.top=o-this.height/2,this.initContextForDraw(e,g),zTe(t)(e,i,o,g.size),this.performFill(e,g),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(s?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",e.fillText(this.options.icon.code,i,o)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,s,a,i,o,"hanging");const A=o+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,i,A,s,a,"hanging")}this.updateBoundingBox(i,o)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}function eV(n,e){var t=It(n);if(un){var r=un(n);e&&(r=Li(r).call(r,function(i){return En(n,i).enumerable})),t.push.apply(t,r)}return t}function HDe(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?je(t=eV(Object(i),!0)).call(t,function(o){mi(n,o,i[o])}):hn?Sl(n,hn(i)):je(r=eV(Object(i))).call(r,function(o){Ol(n,o,En(i,o))})}return n}class UDe extends Sn{constructor(e,t,r,i){super(e,t,r,i),this.ctxRenderer=i}draw(e,t,r,i,o,s){this.resize(e,i,o,s),this.left=t-this.width/2,this.top=r-this.height/2,e.save();const a=this.ctxRenderer({ctx:e,id:this.options.id,x:t,y:r,state:{selected:i,hover:o},style:HDe({},s),label:this.options.label});if(a.drawNode!=null&&a.drawNode(),e.restore(),a.drawExternalLabel){const g=a.drawExternalLabel;a.drawExternalLabel=()=>{e.save(),g(),e.restore()}}return a.nodeDimensions&&(this.customSizeWidth=a.nodeDimensions.width,this.customSizeHeight=a.nodeDimensions.height),a}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class YDe extends $o{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e,t,r){if(this.needsRefresh(t,r)){const o=this.getDimensionsFromLabel(e,t,r).width+this.margin.right+this.margin.left;this.width=o,this.height=o,this.radius=this.width/2}}draw(e,t,r,i,o,s){this.resize(e,i,o),this.left=t-this.width/2,this.top=r-this.height/2,this.initContextForDraw(e,s),Y8(e,t-this.width/2,r-this.height/2,this.width,this.height),this.performFill(e,s),this.updateBoundingBox(t,r,e,i,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let KDe=class extends Sn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"diamond",4,t,r,i,o,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class XDe extends Sn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"circle",2,t,r,i,o,s)}distanceToBorder(e){return e&&this.resize(e),this.options.size}}class tV extends $o{constructor(e,t,r){super(e,t,r)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,r)){const i=this.getDimensionsFromLabel(e,t,r);this.height=i.height*2,this.width=i.width+i.height,this.radius=.5*this.width}}draw(e,t,r,i,o,s){this.resize(e,i,o),this.left=t-this.width*.5,this.top=r-this.height*.5,this.initContextForDraw(e,s),VE(e,this.left,this.top,this.width,this.height),this.performFill(e,s),this.updateBoundingBox(t,r,e,i,o),this.labelModule.draw(e,t,r,i,o)}distanceToBorder(e,t){e&&this.resize(e);const r=this.width*.5,i=this.height*.5,o=Math.sin(t)*r,s=Math.cos(t)*i;return r*i/Math.sqrt(o*o+s*s)}}class QDe extends $o{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e,t,r){this.needsRefresh(t,r)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,r,i,o,s){return this.resize(e,i,o),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=r-this.height/2,this._icon(e,t,r,i,o,s),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,r+this.height/2+5,i),this.updateBoundingBox(t,r)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=t+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}_icon(e,t,r,i,o,s){const a=Number(this.options.icon.size);this.options.icon.code!==void 0?(e.font=[this.options.icon.weight!=null?this.options.icon.weight:i?"bold":"",(this.options.icon.weight!=null&&i?5:0)+a+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,s),e.fillText(this.options.icon.code,t,r),this.disableShadow(e,s)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let JDe=class extends dT{constructor(e,t,r,i,o){super(e,t,r),this.setImages(i,o)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const o=this.options.size*2;this.width=o,this.height=o;return}this.needsRefresh(t,r)&&this._resizeImage()}draw(e,t,r,i,o,s){e.save(),this.switchImages(i),this.resize();let a=t,g=r;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=r,a+=this.width/2,g+=this.height/2):(this.left=t-this.width/2,this.top=r-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){const A=this.options.borderWidth,I=this.options.borderWidthSelected||2*this.options.borderWidth,C=(i?I:A)/this.body.view.scale;e.lineWidth=Math.min(this.width,C),e.beginPath();let l=i?this.options.color.highlight.border:o?this.options.color.hover.border:this.options.color.border,d=i?this.options.color.highlight.background:o?this.options.color.hover.background:this.options.color.background;s.opacity!==void 0&&(l=_r(l,s.opacity),d=_r(d,s.opacity)),e.strokeStyle=l,e.fillStyle=d,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),Tl(e).call(e),this.performStroke(e,s),e.closePath()}this._drawImageAtPosition(e,s),this._drawImageLabel(e,a,g,i,o),this.updateBoundingBox(t,r),e.restore()}updateBoundingBox(e,t){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=e,this.top=t):(this.left=e-this.width/2,this.top=t-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class e2e extends Sn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"square",2,t,r,i,o,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class t2e extends Sn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"hexagon",4,t,r,i,o,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class r2e extends Sn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"star",4,t,r,i,o,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class i2e extends $o{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e,t,r){this.needsRefresh(t,r)&&(this.textSize=this.labelModule.getTextSize(e,t,r),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,r,i,o,s){this.resize(e,i,o),this.left=t-this.width/2,this.top=r-this.height/2,this.enableShadow(e,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,o),this.disableShadow(e,s),this.updateBoundingBox(t,r,e,i,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let n2e=class extends Sn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"triangle",3,t,r,i,o,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class o2e extends Sn{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,o,s){return this._drawShape(e,"triangleDown",3,t,r,i,o,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}function rV(n,e){var t=It(n);if(un){var r=un(n);e&&(r=Li(r).call(r,function(i){return En(n,i).enumerable})),t.push.apply(t,r)}return t}function iV(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?je(t=rV(Object(i),!0)).call(t,function(o){mi(n,o,i[o])}):hn?Sl(n,hn(i)):je(r=rV(Object(i))).call(r,function(o){Ol(n,o,En(i,o))})}return n}class Ge{constructor(e,t,r,i,o,s){this.options=sn(o),this.globalOptions=o,this.defaultOptions=s,this.body=t,this.edges=[],this.id=void 0,this.imagelist=r,this.grouplist=i,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new bs(this.body,this.options,!1),this.setOptions(e)}attachEdge(e){var t;Ye(t=this.edges).call(t,e)===-1&&this.edges.push(e)}detachEdge(e){var t;const r=Ye(t=this.edges).call(t,e);if(r!=-1){var i;an(i=this.edges).call(i,r,1)}}setOptions(e){const t=this.options.shape;if(!e)return;if(typeof e.color<"u"&&(this._localColor=e.color),e.id!==void 0&&(this.id=e.id),this.id===void 0)throw new Error("Node must have an id");Ge.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=QG(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=QG(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=o6(e.value)),Ge.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);const r=[e,this.options,this.defaultOptions];return this.chooser=lT("node",r),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&Ge.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(t),e.hidden!==void 0||e.physics!==void 0}_load_images(){if((this.options.shape==="circularImage"||this.options.shape==="image")&&this.options.image===void 0)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(this.options.image!==void 0){if(this.imagelist===void 0)throw new Error("Internal Error: No images provided");if(typeof this.options.image=="string")this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(this.options.image.unselected===void 0)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.options.image.selected!==void 0?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}static checkOpacity(e){return 0<=e&&e<=1}static checkCoordinateOrigin(e){return e===void 0||e==="center"||e==="top-left"}static updateGroupOptions(e,t,r){var i;if(r===void 0)return;const o=e.group;if(t!==void 0&&t.group!==void 0&&o!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");if(!(typeof o=="number"||typeof o=="string"&&o!=""))return;const a=r.get(o);a.opacity!==void 0&&t.opacity===void 0&&(Ge.checkOpacity(a.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+a.opacity),a.opacity=void 0));const g=Li(i=eDe(t)).call(i,A=>t[A]!=null);g.push("font"),aC(g,e,a),e.color=KE(e.color)}static parseOptions(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0;if(aC(["color","fixed","shadow"],e,t,r),Ge.checkMass(t),e.opacity!==void 0&&(Ge.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(Ge.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!Ge.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),Or(e,t,"shadow",i),t.color!==void 0&&t.color!==null){const a=KE(t.color);b9(e.color,a)}else r===!0&&t.color===null&&(e.color=sn(i.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),r===!0&&t.font===null&&(e.font=sn(i.font)),Ge.updateGroupOptions(e,t,o),t.scaling!==void 0&&Or(e.scaling,t.scaling,"label",i.scaling)}getFormattingValues(){const e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){const t=this.options.opacity;e.borderColor=_r(e.borderColor,t),e.color=_r(e.color,t),e.shadowColor=_r(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),Ge.updateGroupOptions(this.options,iV(iV({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);const t=this.grouplist.get(this.options.group,!1),r=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,r),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new WDe(this.options,this.body,this.labelModule);break;case"circle":this.shape=new VDe(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new ZDe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new UDe(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new YDe(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new KDe(this.options,this.body,this.labelModule);break;case"dot":this.shape=new XDe(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new tV(this.options,this.body,this.labelModule);break;case"icon":this.shape=new QDe(this.options,this.body,this.labelModule);break;case"image":this.shape=new JDe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new e2e(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new t2e(this.options,this.body,this.labelModule);break;case"star":this.shape=new r2e(this.options,this.body,this.labelModule);break;case"text":this.shape=new i2e(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new n2e(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new o2e(this.options,this.body,this.labelModule);break;default:this.shape=new tV(this.options,this.body,this.labelModule);break}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,t){return this.shape.distanceToBorder(e,t)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,t,r){if(this.options.value!==void 0){const i=this.options.scaling.customScalingFunction(e,t,r,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+i*s}this.options.size=this.options.scaling.min+i*o}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){const t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){const t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}getItemsOnPoint(e){const t=[];return this.labelModule.visible()&&tS(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),tS(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}isOverlappingWith(e){return this.shape.left<e.right&&this.shape.left+this.shape.width>e.left&&this.shape.top<e.bottom&&this.shape.top+this.shape.height>e.top}isBoundingBoxOverlappingWith(e){return this.shape.boundingBox.left<e.right&&this.shape.boundingBox.right>e.left&&this.shape.boundingBox.top<e.bottom&&this.shape.boundingBox.bottom>e.top}static checkMass(e,t){if(e.mass!==void 0&&e.mass<=0){let r="";t!==void 0&&(r=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+r+", setting mass to 1.",O9),e.mass=1}}}class s2e{constructor(e,t,r,i){var o;if(this.body=e,this.images=t,this.groups=r,this.layoutEngine=i,this.body.functions.createNode=z(o=this.create).call(o,this),this.nodesListeners={add:(s,a)=>{this.add(a.items)},update:(s,a)=>{this.update(a.items,a.data,a.oldData)},remove:(s,a)=>{this.remove(a.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,a,g,A){if(a===s)return .5;{const I=1/(a-s);return Math.max(0,(A-s)*I)}}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=sn(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on("refreshNodes",z(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",z(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",()=>{ve(this.nodesListeners,(r,i)=>{this.body.data.nodes&&this.body.data.nodes.off(i,r)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(Ge.parseOptions(this.options,e),e.opacity!==void 0&&(eS(e.opacity)||!zn(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(const t of It(this.body.nodes))this.body.nodes[t].updateLabelModule(),this.body.nodes[t].needsRefresh();if(e.size!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.body.data.nodes;if(z8("id",e))this.body.data.nodes=e;else if(Ur(e))this.body.data.nodes=new iC,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new iC;else throw new TypeError("Array or DataSet expected");if(r&&ve(this.nodesListeners,function(i,o){r.off(o,i)}),this.body.nodes={},this.body.data.nodes){const i=this;ve(this.nodesListeners,function(s,a){i.body.data.nodes.on(a,s)});const o=this.body.data.nodes.getIds();this.add(o,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r;const i=[];for(let o=0;o<e.length;o++){r=e[o];const s=this.body.data.nodes.get(r),a=this.create(s);i.push(a),this.body.nodes[r]=a}this.layoutEngine.positionInitially(i),t===!1&&this.body.emitter.emit("_dataChanged")}update(e,t,r){const i=this.body.nodes;let o=!1;for(let s=0;s<e.length;s++){const a=e[s];let g=i[a];const A=t[s];g!==void 0?g.setOptions(A)&&(o=!0):(o=!0,g=this.create(A),i[a]=g)}!o&&r!==void 0&&(o=pxe(t).call(t,function(s,a){const g=r[a];return g&&g.level!==s.level})),o===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}remove(e){const t=this.body.nodes;for(let r=0;r<e.length;r++){const i=e[r];delete t[i]}this.body.emitter.emit("_dataChanged")}create(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ge;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ve(this.body.nodes,(t,r)=>{const i=this.body.data.nodes.get(r);i!==void 0&&(e===!0&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(i))})}getPositions(e){const t={};if(e!==void 0){if(Ur(e)===!0){for(let r=0;r<e.length;r++)if(this.body.nodes[e[r]]!==void 0){const i=this.body.nodes[e[r]];t[e[r]]={x:Math.round(i.x),y:Math.round(i.y)}}}else if(this.body.nodes[e]!==void 0){const r=this.body.nodes[e];t[e]={x:Math.round(r.x),y:Math.round(r.y)}}}else for(let r=0;r<this.body.nodeIndices.length;r++){const i=this.body.nodes[this.body.nodeIndices[r]];t[this.body.nodeIndices[r]]={x:Math.round(i.x),y:Math.round(i.y)}}return t}getPosition(e){if(e==null)throw new TypeError("No id was specified for getPosition method.");if(this.body.nodes[e]==null)throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(e));return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}storePositions(){const e=[],t=this.body.data.nodes.getDataSet();for(const r of t.get()){const i=r.id,o=this.body.nodes[i],s=Math.round(o.x),a=Math.round(o.y);(r.x!==s||r.y!==a)&&e.push({id:i,x:s,y:a})}t.update(e)}getBoundingBox(e){if(this.body.nodes[e]!==void 0)return this.body.nodes[e].shape.boundingBox}getConnectedNodes(e,t){const r=[];if(this.body.nodes[e]!==void 0){const i=this.body.nodes[e],o={};for(let s=0;s<i.edges.length;s++){const a=i.edges[s];t!=="to"&&a.toId==i.id?o[a.fromId]===void 0&&(r.push(a.fromId),o[a.fromId]=!0):t!=="from"&&a.fromId==i.id&&o[a.toId]===void 0&&(r.push(a.toId),o[a.toId]=!0)}}return r}getConnectedEdges(e){const t=[];if(this.body.nodes[e]!==void 0){const r=this.body.nodes[e];for(let i=0;i<r.edges.length;i++)t.push(r.edges[i].id)}else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return t}moveNode(e,t,r){this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(r),ys(()=>{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}var nV={},N1,oV;function a2e(){if(oV)return N1;oV=1;var n=_a(),e=zr(),t=qi(),r=RangeError;return N1=function(o){var s=e(t(this)),a="",g=n(o);if(g<0||g===1/0)throw new r("Wrong number of repetitions");for(;g>0;(g>>>=1)&&(s+=s))g&1&&(a+=s);return a},N1}var M1,sV;function g2e(){if(sV)return M1;sV=1;var n=we(),e=Z8(),t=zr(),r=a2e(),i=qi(),o=n(r),s=n("".slice),a=Math.ceil,g=function(A){return function(I,C,l){var d=t(i(I)),u=e(C),h=d.length,p=l===void 0?" ":t(l),f,c;return u<=h||p===""?d:(f=u-h,c=o(p,a(f/p.length)),c.length>f&&(c=s(c,0,f)),A?d+c:c+d)}};return M1={start:g(!1),end:g(!0)},M1}var k1,aV;function A2e(){if(aV)return k1;aV=1;var n=we(),e=be(),t=g2e().start,r=RangeError,i=isFinite,o=Math.abs,s=Date.prototype,a=s.toISOString,g=n(s.getTime),A=n(s.getUTCDate),I=n(s.getUTCFullYear),C=n(s.getUTCHours),l=n(s.getUTCMilliseconds),d=n(s.getUTCMinutes),u=n(s.getUTCMonth),h=n(s.getUTCSeconds);return k1=e(function(){return a.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){a.call(new Date(NaN))})?function(){if(!i(g(this)))throw new r("Invalid time value");var f=this,c=I(f),m=l(f),v=c<0?"-":c>9999?"+":"";return v+t(o(c),v?6:4,0)+"-"+t(u(f)+1,2,0)+"-"+t(A(f),2,0)+"T"+t(C(f),2,0)+":"+t(d(f),2,0)+":"+t(h(f),2,0)+"."+t(m,3,0)+"Z"}:a,k1}var gV;function I2e(){if(gV)return nV;gV=1;var n=ne(),e=ur(),t=Fr(),r=L8(),i=A2e(),o=hi(),s=be(),a=s(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return n({target:"Date",proto:!0,forced:a},{toJSON:function(A){var I=t(this),C=r(I,"number");return typeof C=="number"&&!isFinite(C)?null:!("toISOString"in I)&&o(I)==="Date"?e(i,I):I.toISOString()}}),nV}var F1,AV;function C2e(){if(AV)return F1;AV=1,I2e(),K9();var n=Re(),e=gl();return n.JSON||(n.JSON={stringify:JSON.stringify}),F1=function(r,i,o){return e(n.JSON.stringify,null,arguments)},F1}var B1,IV;function l2e(){if(IV)return B1;IV=1;var n=C2e();return B1=n,B1}var q1,CV;function d2e(){return CV||(CV=1,q1=l2e()),q1}var u2e=d2e(),g6=ue(u2e),lV={},dV;function h2e(){if(dV)return lV;dV=1;var n=ne(),e=Math.hypot,t=Math.abs,r=Math.sqrt,i=!!e&&e(1/0,NaN)!==1/0;return n({target:"Math",stat:!0,arity:2,forced:i},{hypot:function(s,a){for(var g=0,A=0,I=arguments.length,C=0,l,d;A<I;)l=t(arguments[A++]),C<l?(d=C/l,g=g*d*d+1,C=l):l>0?(d=l/C,g+=d*d):g+=l;return C===1/0?1/0:C*r(g)}}),lV}var z1,uV;function c2e(){if(uV)return z1;uV=1,h2e();var n=Re();return z1=n.Math.hypot,z1}var j1,hV;function f2e(){if(hV)return j1;hV=1;var n=c2e();return j1=n,j1}var L1,cV;function p2e(){return cV||(cV=1,L1=f2e()),L1}var v2e=p2e(),m2e=ue(v2e);class st{static transform(e,t){Ur(e)||(e=[e]);const r=t.point.x,i=t.point.y,o=t.angle,s=t.length;for(let a=0;a<e.length;++a){const g=e[a],A=g.x*Math.cos(o)-g.y*Math.sin(o),I=g.x*Math.sin(o)+g.y*Math.cos(o);g.x=r+s*A,g.y=i+s*I}}static drawPath(e,t){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(let r=1;r<t.length;++r)e.lineTo(t[r].x,t[r].y);e.closePath()}}let y2e=class extends st{static draw(e,t){if(t.image){e.save(),e.translate(t.point.x,t.point.y),e.rotate(Math.PI/2+t.angle);const r=t.imageWidth!=null?t.imageWidth:t.image.width,i=t.imageHeight!=null?t.imageHeight:t.image.height;t.image.drawImageAtPosition(e,1,-r/2,0,r,i),e.restore()}return!1}};class b2e extends st{static draw(e,t){const r=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return st.transform(r,t),st.drawPath(e,r),!0}}class w2e{static draw(e,t){const r=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return st.transform(r,t),st.drawPath(e,r),!0}}class E2e{static draw(e,t){const r={x:-.4,y:0};st.transform(r,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";const i=Math.PI,o=t.angle-i/2,s=t.angle+i/2;return e.beginPath(),e.arc(r.x,r.y,t.length*.4,o,s,!1),e.stroke(),!0}}class S2e{static draw(e,t){const r={x:-.3,y:0};st.transform(r,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";const i=Math.PI,o=t.angle+i/2,s=t.angle+3*i/2;return e.beginPath(),e.arc(r.x,r.y,t.length*.4,o,s,!1),e.stroke(),!0}}class O2e{static draw(e,t){const r=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return st.transform(r,t),st.drawPath(e,r),!0}}class T2e{static draw(e,t){const r=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return st.transform(r,t),st.drawPath(e,r),!0}}class _2e{static draw(e,t){const r={x:-.4,y:0};return st.transform(r,t),qO(e,r.x,r.y,t.length*.4),!0}}class P2e{static draw(e,t){const r=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return st.transform(r,t),st.drawPath(e,r),!0}}class R2e{static draw(e,t){const r=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return st.transform(r,t),st.drawPath(e,r),!0}}class x2e{static draw(e,t){const r=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return st.transform(r,t),st.drawPath(e,r),!0}}class $2e{static draw(e,t){const r=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return st.transform(r,t),st.drawPath(e,r),!0}}class A6{static draw(e,t){let r;switch(t.type&&(r=t.type.toLowerCase()),r){case"image":return y2e.draw(e,t);case"circle":return _2e.draw(e,t);case"box":return R2e.draw(e,t);case"crow":return w2e.draw(e,t);case"curve":return E2e.draw(e,t);case"diamond":return x2e.draw(e,t);case"inv_curve":return S2e.draw(e,t);case"triangle":return O2e.draw(e,t);case"inv_triangle":return T2e.draw(e,t);case"bar":return P2e.draw(e,t);case"vee":return $2e.draw(e,t);case"arrow":default:return b2e.draw(e,t)}}}function fV(n,e){var t=It(n);if(un){var r=un(n);e&&(r=Li(r).call(r,function(i){return En(n,i).enumerable})),t.push.apply(t,r)}return t}function pV(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?je(t=fV(Object(i),!0)).call(t,function(o){mi(n,o,i[o])}):hn?Sl(n,hn(i)):je(r=fV(Object(i))).call(r,function(o){Ol(n,o,En(i,o))})}return n}class I6{constructor(e,t,r){mi(this,"color",{}),mi(this,"colorDirty",!0),mi(this,"hoverWidth",1.5),mi(this,"selectionWidth",2),this._body=t,this._labelModule=r,this.setOptions(e),this.fromPoint=this.from,this.toPoint=this.to}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}cleanup(){return!1}setOptions(e){this.options=e,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}drawLine(e,t,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,o):this._drawLine(e,t,o)}_drawLine(e,t,r,i,o){if(this.from!=this.to)this._line(e,t,r,i,o);else{const[s,a,g]=this._getCircleData(e);this._circle(e,t,s,a,g)}}_drawDashedLine(e,t,r,i,o){e.lineCap="round";const s=Ur(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,r);else{const[a,g,A]=this._getCircleData(e);this._circle(e,t,a,g,A)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)K8(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{const[a,g,A]=this._getCircleData(e);this._circle(e,t,a,g,A)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}findBorderPosition(e,t,r){return this.from!=this.to?this._findBorderPosition(e,t,r):this._findBorderPositionCircle(e,t,r)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var t;const[r,i]=Yo(t=this._getCircleData(e)).call(t,0,2);return{from:this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:.6,high:.8,direction:1})}}}_getCircleData(e){const t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);const r=s6(e,this.options.selfReference.angle,t,this.from);return[r.x,r.y,t]}_pointOnCircle(e,t,r,i){const o=i*2*Math.PI;return{x:e+r*Math.cos(o),y:t-r*Math.sin(o)}}_findBorderPositionCircle(e,t,r){const i=r.x,o=r.y;let s=r.low,a=r.high;const g=r.direction,A=10,I=this.options.selfReference.size,C=.05;let l,d=(s+a)*.5,u=0;this.options.arrowStrikethrough===!0&&(g===-1?u=this.options.endPointOffset.from:g===1&&(u=this.options.endPointOffset.to));let h=0;do{d=(s+a)*.5,l=this._pointOnCircle(i,o,I,d);const p=Math.atan2(e.y-l.y,e.x-l.x),f=e.distanceToBorder(t,p)+u,c=Math.sqrt(Math.pow(l.x-e.x,2)+Math.pow(l.y-e.y,2)),m=f-c;if(Math.abs(m)<C)break;m>0?g>0?s=d:a=d:g>0?a=d:s=d,++h}while(s<=a&&h<A);return pV(pV({},l),{},{t:d})}getLineWidth(e,t){return e===!0?Math.max(this.selectionWidth,.3/this._body.view.scale):t===!0?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}getColor(e,t){if(t.inheritsColor!==!1){if(t.inheritsColor==="both"&&this.from.id!==this.to.id){const r=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y);let i=this.from.options.color.highlight.border,o=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(i=_r(this.from.options.color.border,t.opacity),o=_r(this.to.options.color.border,t.opacity)):this.from.selected===!0&&this.to.selected===!1?o=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(i=this.from.options.color.border),r.addColorStop(0,i),r.addColorStop(1,o),r}return t.inheritsColor==="to"?_r(this.to.options.color.border,t.opacity):_r(this.from.options.color.border,t.opacity)}else return _r(t.color,t.opacity)}_circle(e,t,r,i,o){this.enableShadow(e,t);let s=0,a=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){const g=this.options.selfReference.angle,A=this.options.selfReference.angle+Math.PI,I=this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:g,high:A,direction:-1}),C=this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:g,high:A,direction:1});s=Math.atan2(I.y-i,I.x-r),a=Math.atan2(C.y-i,C.x-r)}e.beginPath(),e.arc(r,i,o,s,a,!1),e.stroke(),this.disableShadow(e,t)}getDistanceToEdge(e,t,r,i,o,s){if(this.from!=this.to)return this._getDistanceToEdge(e,t,r,i,o,s);{const[a,g,A]=this._getCircleData(void 0),I=a-o,C=g-s;return Math.abs(Math.sqrt(I*I+C*C)-A)}}_getDistanceToLine(e,t,r,i,o,s){const a=r-e,g=i-t,A=a*a+g*g;let I=((o-e)*a+(s-t)*g)/A;I>1?I=1:I<0&&(I=0);const C=e+I*a,l=t+I*g,d=C-o,u=l-s;return Math.sqrt(d*d+u*u)}getArrowData(e,t,r,i,o,s){let a,g,A,I,C,l,d;const u=s.width;t==="from"?(A=this.from,I=this.to,C=s.fromArrowScale<0,l=Math.abs(s.fromArrowScale),d=s.fromArrowType):t==="to"?(A=this.to,I=this.from,C=s.toArrowScale<0,l=Math.abs(s.toArrowScale),d=s.toArrowType):(A=this.to,I=this.from,C=s.middleArrowScale<0,l=Math.abs(s.middleArrowScale),d=s.middleArrowType);const h=15*l+3*u;if(A!=I){const m=m2e(A.x-I.x,A.y-I.y),v=h/m;if(t!=="middle")if(this.options.smooth.enabled===!0){const y=this._findBorderPosition(A,e,{via:r}),w=this.getPoint(y.t+v*(t==="from"?1:-1),r);a=Math.atan2(y.y-w.y,y.x-w.x),g=y}else a=Math.atan2(A.y-I.y,A.x-I.x),g=this._findBorderPosition(A,e);else{const y=(C?-v:v)/2,w=this.getPoint(.5+y,r),S=this.getPoint(.5-y,r);a=Math.atan2(w.y-S.y,w.x-S.x),g=this.getPoint(.5,r)}}else{const[m,v,y]=this._getCircleData(e);if(t==="from"){const w=this.options.selfReference.angle,S=this.options.selfReference.angle+Math.PI,b=this._findBorderPositionCircle(this.from,e,{x:m,y:v,low:w,high:S,direction:-1});a=b.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,g=b}else if(t==="to"){const w=this.options.selfReference.angle,S=this.options.selfReference.angle+Math.PI,b=this._findBorderPositionCircle(this.from,e,{x:m,y:v,low:w,high:S,direction:1});a=b.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,g=b}else{const w=this.options.selfReference.angle/(2*Math.PI);g=this._pointOnCircle(m,v,y,w),a=w*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const p=g.x-h*.9*Math.cos(a),f=g.y-h*.9*Math.sin(a);return{point:g,core:{x:p,y:f},angle:a,length:h,type:d}}drawArrowHead(e,t,r,i,o){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,A6.draw(e,o)&&(this.enableShadow(e,t),Tl(e).call(e),this.disableShadow(e,t))}enableShadow(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,t){if(t.background!==!1){const r={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=r.strokeStyle,e.lineWidth=r.lineWidth,e.dashes=r.dashes,this.setStrokeDashed(e,t.dashes)}}setStrokeDashed(e,t){if(t!==!1)if(e.setLineDash!==void 0){const r=Ur(t)?t:[5,5];e.setLineDash(r)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}function vV(n,e){var t=It(n);if(un){var r=un(n);e&&(r=Li(r).call(r,function(i){return En(n,i).enumerable})),t.push.apply(t,r)}return t}function mV(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?je(t=vV(Object(i),!0)).call(t,function(o){mi(n,o,i[o])}):hn?Sl(n,hn(i)):je(r=vV(Object(i))).call(r,function(o){Ol(n,o,En(i,o))})}return n}class uT extends I6{constructor(e,t,r){super(e,t,r)}_findBorderPositionBezier(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates();const i=10,o=.2;let s=!1,a=1,g=0,A=this.to,I,C,l=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(A=this.from,s=!0,l=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(l=0);let d=0;do{C=(g+a)*.5,I=this.getPoint(C,r);const u=Math.atan2(A.y-I.y,A.x-I.x),h=A.distanceToBorder(t,u)+l,p=Math.sqrt(Math.pow(I.x-A.x,2)+Math.pow(I.y-A.y,2)),f=h-p;if(Math.abs(f)<o)break;f<0?s===!1?g=C:a=C:s===!1?a=C:g=C,++d}while(g<=a&&d<i);return mV(mV({},I),{},{t:C})}_getDistanceToBezierEdge(e,t,r,i,o,s,a){let g=1e9,A,I,C,l,d,u=e,h=t;for(I=1;I<10;I++)C=.1*I,l=Math.pow(1-C,2)*e+2*C*(1-C)*a.x+Math.pow(C,2)*r,d=Math.pow(1-C,2)*t+2*C*(1-C)*a.y+Math.pow(C,2)*i,I>0&&(A=this._getDistanceToLine(u,h,l,d,o,s),g=A<g?A:g),u=l,h=d;return g}_bezierCurve(e,t,r,i){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),r!=null&&r.x!=null?i!=null&&i.x!=null?e.bezierCurveTo(r.x,r.y,i.x,i.y,this.toPoint.x,this.toPoint.y):e.quadraticCurveTo(r.x,r.y,this.toPoint.x,this.toPoint.y):e.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(e,t),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){return this._getViaCoordinates()}}class yV extends uT{constructor(e,t,r){super(e,t,r),mi(this,"via",this.via),this._boundFunction=()=>{this.positionBezierNode()},this._body.emitter.on("_repositionBezierNodes",this._boundFunction)}setOptions(e){super.setOptions(e);let t=!1;this.options.physics!==e.physics&&(t=!0),this.options=e,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),t===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}setupSupportNode(){if(this.via===void 0){const e="edgeId:"+this.id,t=this._body.functions.createNode({id:e,shape:"circle",physics:!0,hidden:!0});this._body.nodes[e]=t,this.via=t,this.via.parentEdgeId=this.id,this.positionBezierNode()}}positionBezierNode(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}_line(e,t,r){this._bezierCurve(e,t,r)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){const[r,i,o]=this._getCircleData(),s=2*Math.PI*(1-e);return{x:r+o*Math.sin(s),y:i+o-o*(1-Math.cos(s))}}else return{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*t.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*t.y+Math.pow(e,2)*this.toPoint.y}}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t,this.via)}_getDistanceToEdge(e,t,r,i,o,s){return this._getDistanceToBezierEdge(e,t,r,i,o,s,this.via)}}class bV extends uT{constructor(e,t,r){super(e,t,r)}_line(e,t,r){this._bezierCurve(e,t,r)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){const e=this.options.smooth.roundness,t=this.options.smooth.type;let r=Math.abs(this.from.x-this.to.x),i=Math.abs(this.from.y-this.to.y);if(t==="discrete"||t==="diagonalCross"){let o,s;r<=i?o=s=e*i:o=s=e*r,this.from.x>this.to.x&&(o=-o),this.from.y>=this.to.y&&(s=-s);let a=this.from.x+o,g=this.from.y+s;return t==="discrete"&&(r<=i?a=r<e*i?this.from.x:a:g=i<e*r?this.from.y:g),{x:a,y:g}}else if(t==="straightCross"){let o=(1-e)*r,s=(1-e)*i;return r<=i?(o=0,this.from.y<this.to.y&&(s=-s)):(this.from.x<this.to.x&&(o=-o),s=0),{x:this.to.x+o,y:this.to.y+s}}else if(t==="horizontal"){let o=(1-e)*r;return this.from.x<this.to.x&&(o=-o),{x:this.to.x+o,y:this.from.y}}else if(t==="vertical"){let o=(1-e)*i;return this.from.y<this.to.y&&(o=-o),{x:this.from.x,y:this.to.y+o}}else if(t==="curvedCW"){r=this.to.x-this.from.x,i=this.from.y-this.to.y;const o=Math.sqrt(r*r+i*i),s=Math.PI,g=(Math.atan2(i,r)+(e*.5+.5)*s)%(2*s);return{x:this.from.x+(e*.5+.5)*o*Math.sin(g),y:this.from.y+(e*.5+.5)*o*Math.cos(g)}}else if(t==="curvedCCW"){r=this.to.x-this.from.x,i=this.from.y-this.to.y;const o=Math.sqrt(r*r+i*i),s=Math.PI,g=(Math.atan2(i,r)+(-e*.5+.5)*s)%(2*s);return{x:this.from.x+(e*.5+.5)*o*Math.sin(g),y:this.from.y+(e*.5+.5)*o*Math.cos(g)}}else{let o,s;r<=i?o=s=e*i:o=s=e*r,this.from.x>this.to.x&&(o=-o),this.from.y>=this.to.y&&(s=-s);let a=this.from.x+o,g=this.from.y+s;return r<=i?this.from.x<=this.to.x?a=this.to.x<a?this.to.x:a:a=this.to.x>a?this.to.x:a:this.from.y>=this.to.y?g=this.to.y>g?this.to.y:g:g=this.to.y<g?this.to.y:g,{x:a,y:g}}}_findBorderPosition(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,r.via)}_getDistanceToEdge(e,t,r,i,o,s){let a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,r,i,o,s,a)}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const r=e,i=Math.pow(1-r,2)*this.fromPoint.x+2*r*(1-r)*t.x+Math.pow(r,2)*this.toPoint.x,o=Math.pow(1-r,2)*this.fromPoint.y+2*r*(1-r)*t.y+Math.pow(r,2)*this.toPoint.y;return{x:i,y:o}}}class D2e extends uT{constructor(e,t,r){super(e,t,r)}_getDistanceToBezierEdge2(e,t,r,i,o,s,a,g){let A=1e9,I=e,C=t;const l=[0,0,0,0];for(let d=1;d<10;d++){const u=.1*d;l[0]=Math.pow(1-u,3),l[1]=3*u*Math.pow(1-u,2),l[2]=3*Math.pow(u,2)*(1-u),l[3]=Math.pow(u,3);const h=l[0]*e+l[1]*a.x+l[2]*g.x+l[3]*r,p=l[0]*t+l[1]*a.y+l[2]*g.y+l[3]*i;if(d>0){const f=this._getDistanceToLine(I,C,h,p,o,s);A=f<A?f:A}I=h,C=p}return A}}class wV extends D2e{constructor(e,t,r){super(e,t,r)}_line(e,t,r){const i=r[0],o=r[1];this._bezierCurve(e,t,i,o)}_getViaCoordinates(){const e=this.from.x-this.to.x,t=this.from.y-this.to.y;let r,i,o,s;const a=this.options.smooth.roundness;return(Math.abs(e)>Math.abs(t)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(i=this.from.y,s=this.to.y,r=this.from.x-a*e,o=this.to.x+a*e):(i=this.from.y-a*t,s=this.to.y+a*t,r=this.from.x,o=this.to.x),[{x:r,y:i},{x:o,y:s}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t)}_getDistanceToEdge(e,t,r,i,o,s){let[a,g]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,t,r,i,o,s,a,g)}getPoint(e){let[t,r]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const i=e,o=[Math.pow(1-i,3),3*i*Math.pow(1-i,2),3*Math.pow(i,2)*(1-i),Math.pow(i,3)],s=o[0]*this.fromPoint.x+o[1]*t.x+o[2]*r.x+o[3]*this.toPoint.x,a=o[0]*this.fromPoint.y+o[1]*t.y+o[2]*r.y+o[3]*this.toPoint.y;return{x:s,y:a}}}class EV extends I6{constructor(e,t,r){super(e,t,r)}_line(e,t){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,t){let r=this.to,i=this.from;e.id===this.from.id&&(r=this.from,i=this.to);const o=Math.atan2(r.y-i.y,r.x-i.x),s=r.x-i.x,a=r.y-i.y,g=Math.sqrt(s*s+a*a),A=e.distanceToBorder(t,o),I=(g-A)/g;return{x:(1-I)*i.x+I*r.x,y:(1-I)*i.y+I*r.y,t:0}}_getDistanceToEdge(e,t,r,i,o,s){return this._getDistanceToLine(e,t,r,i,o,s)}}class gn{constructor(e,t,r,i,o){if(t===void 0)throw new Error("No body provided");this.options=sn(i),this.globalOptions=i,this.defaultOptions=o,this.body=t,this.imagelist=r,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new bs(this.body,this.options,!0),this.setOptions(e)}setOptions(e){if(!e)return;let t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;gn.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=o6(e.value));const r=[e,this.options,this.defaultOptions];return this.chooser=lT("edge",r),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}static parseOptions(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(xa(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,t,r),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(zn(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=i.endPointOffset.from!==void 0?i.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(zn(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=i.endPointOffset.to!==void 0?i.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),AC(t.label)?e.label=t.label:AC(e.label)||(e.label=void 0),Or(e,t,"smooth",i),Or(e,t,"shadow",i),Or(e,t,"background",i),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:r===!0&&t.dashes===null&&(e.dashes=cg(i.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),Or(e.scaling,t.scaling,"label",i.scaling)):r===!0&&t.scaling===null&&(e.scaling=cg(i.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const a=t.arrows.toLowerCase();e.arrows.to.enabled=Ye(a).call(a,"to")!=-1,e.arrows.middle.enabled=Ye(a).call(a,"middle")!=-1,e.arrows.from.enabled=Ye(a).call(a,"from")!=-1}else if(typeof t.arrows=="object")Or(e.arrows,t.arrows,"to",i.arrows),Or(e.arrows,t.arrows,"middle",i.arrows),Or(e.arrows,t.arrows,"from",i.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+g6(t.arrows));else r===!0&&t.arrows===null&&(e.arrows=cg(i.arrows));if(t.color!==void 0&&t.color!==null){const a=vs(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,g=e.color;if(o)ke(g,i.color,!1,r);else for(const A in g)Object.prototype.hasOwnProperty.call(g,A)&&delete g[A];if(vs(g))g.color=g,g.highlight=g,g.hover=g,g.inherit=!1,a.opacity===void 0&&(g.opacity=1);else{let A=!1;a.color!==void 0&&(g.color=a.color,A=!0),a.highlight!==void 0&&(g.highlight=a.highlight,A=!0),a.hover!==void 0&&(g.hover=a.hover,A=!0),a.inherit!==void 0&&(g.inherit=a.inherit),a.opacity!==void 0&&(g.opacity=Math.min(1,Math.max(0,a.opacity))),A===!0?g.inherit=!1:g.inherit===void 0&&(g.inherit="from")}}else r===!0&&t.color===null&&(e.color=sn(i.color));r===!0&&t.font===null&&(e.font=sn(i.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}getFormattingValues(){const e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,r=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,i=this.options.color.inherit,o={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:r,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:i?void 0:this.options.color.color,inheritsColor:i,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){const s=this.options.selectionWidth;typeof s=="function"?o.width=s(o.width):typeof s=="number"&&(o.width+=s),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.highlight,o.shadow=this.options.shadow.enabled}else if(this.hover){const s=this.options.hoverWidth;typeof s=="function"?o.width=s(o.width):typeof s=="number"&&(o.width+=s),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(o,this.options.id,this.selected,this.hover),o.color!==void 0&&(o.inheritsColor=!1),o.shadow===!1&&(o.shadowColor!==this.options.shadow.color||o.shadowSize!==this.options.shadow.size||o.shadowX!==this.options.shadow.x||o.shadowY!==this.options.shadow.y)&&(o.shadow=!0));else o.shadow=this.options.shadow.enabled,o.width=Math.max(o.width,.3/this.body.view.scale);return o}updateLabelModule(e){const t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){const e=this.options.smooth;let t=!1,r=!0;return this.edgeType!==void 0&&((this.edgeType instanceof yV&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof wV&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof bV&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof EV&&e.type.enabled===!1)&&(r=!1),r===!0&&(t=this.cleanup())),r===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new yV(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new wV(this.options,this.body,this.labelModule):this.edgeType=new bV(this.options,this.body,this.labelModule):this.edgeType=new EV(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}connect(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}disconnect(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,t,r){if(this.options.value!==void 0){const i=this.options.scaling.customScalingFunction(e,t,r,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+i*s}this.options.width=this.options.scaling.min+i*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}draw(e){const t=this.getFormattingValues();if(t.hidden)return;const r=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,r),this.drawLabel(e,r)}drawArrows(e){const t=this.getFormattingValues();if(t.hidden)return;const r=this.edgeType.getViaNode(),i={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(i.from=this.edgeType.getArrowData(e,"from",r,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=i.from.core),t.fromArrowSrc&&(i.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(i.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(i.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(i.to=this.edgeType.getArrowData(e,"to",r,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=i.to.core),t.toArrowSrc&&(i.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(i.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(i.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(i.middle=this.edgeType.getArrowData(e,"middle",r,this.selected,this.hover,t),t.middleArrowSrc&&(i.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(i.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(i.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,i.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,i.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,i.to)}drawLabel(e,t){if(this.options.label!==void 0){const r=this.from,i=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let o;if(r.id!=i.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,t),e.save();const s=this._getRotation(e);s.angle!=0&&(e.translate(s.x,s.y),e.rotate(s.angle)),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;const s=s6(e,this.options.selfReference.angle,this.options.selfReference.size,r);o=this._pointOnCircle(s.x,s.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}getItemsOnPoint(e){const t=[];if(this.labelModule.visible()){const i=this._getRotation();tS(this.labelModule.getSize(),e,i)&&t.push({edgeId:this.id,labelId:0})}const r={left:e.x,top:e.y};return this.isOverlappingWith(r)&&t.push({edgeId:this.id}),t}isOverlappingWith(e){if(this.connected){const r=this.from.x,i=this.from.y,o=this.to.x,s=this.to.y,a=e.left,g=e.top;return this.edgeType.getDistanceToEdge(r,i,o,s,a,g)<10}else return!1}_getRotation(e){const t=this.edgeType.getViaNode(),r=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,r.x,r.y);const i={x:r.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return i;const o=this.from.y-this.to.y,s=this.from.x-this.to.x;let a=Math.atan2(o,s);return(a<-1&&s<0||a>0&&s<0)&&(a+=Math.PI),i.angle=a,i}_pointOnCircle(e,t,r,i){return{x:e+r*Math.cos(i),y:t-r*Math.sin(i)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}class N2e{constructor(e,t,r){var i;this.body=e,this.images=t,this.groups=r,this.body.functions.createEdge=z(i=this.create).call(i,this),this.edgesListeners={add:(o,s)=>{this.add(s.items)},update:(o,s)=>{this.update(s.items)},remove:(o,s)=>{this.remove(s.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(o,s,a,g){if(s===o)return .5;{const A=1/(s-o);return Math.max(0,(g-o)*A)}}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},ke(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,t,r;this.body.emitter.on("_forceDisableDynamicCurves",function(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;i==="dynamic"&&(i="continuous");let s=!1;for(const a in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,a)){const g=e.body.edges[a],A=e.body.data.edges.get(a);if(A!=null){const I=A.smooth;I!==void 0&&I.enabled===!0&&I.type==="dynamic"&&(i===void 0?g.setOptions({smooth:!1}):g.setOptions({smooth:{type:i}}),s=!0)}}o===!0&&s===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",()=>{this.reconnectEdges()}),this.body.emitter.on("refreshEdges",z(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",z(r=this.refresh).call(r,this)),this.body.emitter.on("destroy",()=>{ve(this.edgesListeners,(i,o)=>{this.body.data.edges&&this.body.data.edges.off(o,i)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){gn.parseOptions(this.options,e,!0,this.defaultOptions,!0);let t=!1;if(e.smooth!==void 0)for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&(t=this.body.edges[r].updateEdgeType()||t);if(e.font!==void 0)for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&this.body.edges[r].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.body.data.edges;if(z8("id",e))this.body.data.edges=e;else if(Ur(e))this.body.data.edges=new iC,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new iC;else throw new TypeError("Array or DataSet expected");if(r&&ve(this.edgesListeners,(i,o)=>{r.off(o,i)}),this.body.edges={},this.body.data.edges){ve(this.edgesListeners,(o,s)=>{this.body.data.edges.on(s,o)});const i=this.body.data.edges.getIds();this.add(i,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.body.edges,i=this.body.data.edges;for(let o=0;o<e.length;o++){const s=e[o],a=r[s];a&&a.disconnect();const g=i.get(s,{showInternalIds:!0});r[s]=this.create(g)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}update(e){const t=this.body.edges,r=this.body.data.edges;let i=!1;for(let o=0;o<e.length;o++){const s=e[o],a=r.get(s),g=t[s];g!==void 0?(g.disconnect(),i=g.setOptions(a)||i,g.connect()):(this.body.edges[s]=this.create(a),i=!0)}i===!0?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}remove(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;const r=this.body.edges;ve(e,i=>{const o=r[i];o!==void 0&&o.remove()}),t&&this.body.emitter.emit("_dataChanged")}refresh(){ve(this.body.edges,(e,t)=>{const r=this.body.data.edges.get(t);r!==void 0&&e.setOptions(r)})}create(e){return new gn(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e;const t=this.body.nodes,r=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const i=r[e];i.from=null,i.to=null,i.connect()}}getConnectedNodes(e){const t=[];if(this.body.edges[e]!==void 0){const r=this.body.edges[e];r.fromId!==void 0&&t.push(r.fromId),r.toId!==void 0&&t.push(r.toId)}return t}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){const e=[];ve(this.body.edges,(t,r)=>{const i=this.body.nodes[t.toId],o=this.body.nodes[t.fromId];i!==void 0&&i.isCluster===!0||o!==void 0&&o.isCluster===!0||(i===void 0||o===void 0)&&e.push(r)}),this.remove(e,!1)}_addMissingEdges(){const e=this.body.data.edges;if(e==null)return;const t=this.body.edges,r=[];je(e).call(e,(i,o)=>{t[o]===void 0&&r.push(o)}),this.add(r,!0)}}var SV={},OV;function M2e(){if(OV)return SV;OV=1;var n=ne(),e=we(),t=Date,r=e(t.prototype.getTime);return n({target:"Date",stat:!0},{now:function(){return r(new t)}}),SV}var G1,TV;function k2e(){if(TV)return G1;TV=1,M2e();var n=Re();return G1=n.Date.now,G1}var W1,_V;function F2e(){if(_V)return W1;_V=1;var n=k2e();return W1=n,W1}var V1,PV;function B2e(){return PV||(PV=1,V1=F2e()),V1}var q2e=B2e(),rS=ue(q2e);class C6{constructor(e,t,r){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(r),this._rng=pl("BARNES HUT SOLVER")}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e;const t=this.body.nodes,r=this.physicsBody.physicsNodeIndices,i=r.length,o=this._formBarnesHutTree(t,r);this.barnesHutTree=o;for(let s=0;s<i;s++)e=t[r[s]],e.options.mass>0&&this._getForceContributions(o.root,e)}}_getForceContributions(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}_getForceContribution(e,t){if(e.childrenCount>0){const r=e.centerOfMass.x-t.x,i=e.centerOfMass.y-t.y,o=Math.sqrt(r*r+i*i);o*e.calcSize>this.thetaInversed?this._calculateForces(o,r,i,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(o,r,i,t,e)}}_calculateForces(e,t,r,i,o){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&i.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));const s=this.options.gravitationalConstant*o.mass*i.options.mass/Math.pow(e,3),a=t*s,g=r*s;this.physicsBody.forces[i.id].x+=a,this.physicsBody.forces[i.id].y+=g}_formBarnesHutTree(e,t){let r;const i=t.length;let o=e[t[0]].x,s=e[t[0]].y,a=e[t[0]].x,g=e[t[0]].y;for(let p=1;p<i;p++){const f=e[t[p]],c=f.x,m=f.y;f.options.mass>0&&(c<o&&(o=c),c>a&&(a=c),m<s&&(s=m),m>g&&(g=m))}const A=Math.abs(a-o)-Math.abs(g-s);A>0?(s-=.5*A,g+=.5*A):(o+=.5*A,a-=.5*A);const C=Math.max(1e-5,Math.abs(a-o)),l=.5*C,d=.5*(o+a),u=.5*(s+g),h={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:d-l,maxX:d+l,minY:u-l,maxY:u+l},size:C,calcSize:1/C,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(h.root);for(let p=0;p<i;p++)r=e[t[p]],r.options.mass>0&&this._placeInTree(h.root,r);return h}_updateBranchMass(e,t){const r=e.centerOfMass,i=e.mass+t.options.mass,o=1/i;r.x=r.x*e.mass+t.x*t.options.mass,r.x*=o,r.y=r.y*e.mass+t.y*t.options.mass,r.y*=o,e.mass=i;const s=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidth<s?s:e.maxWidth}_placeInTree(e,t,r){(r!=!0||r===void 0)&&this._updateBranchMass(e,t);const i=e.children.NW.range;let o;i.maxX>t.x?i.maxY>t.y?o="NW":o="SW":i.maxY>t.y?o="NE":o="SE",this._placeInRegion(e,t,o)}_placeInRegion(e,t,r){const i=e.children[r];switch(i.childrenCount){case 0:i.children.data=t,i.childrenCount=1,this._updateBranchMass(i,t);break;case 1:i.children.data.x===t.x&&i.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(i),this._placeInTree(i,t));break;case 4:this._placeInTree(i,t);break}}_splitBranch(e){let t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),t!=null&&this._placeInTree(e,t)}_insertRegion(e,t){let r,i,o,s;const a=.5*e.size;switch(t){case"NW":r=e.range.minX,i=e.range.minX+a,o=e.range.minY,s=e.range.minY+a;break;case"NE":r=e.range.minX+a,i=e.range.maxX,o=e.range.minY,s=e.range.minY+a;break;case"SW":r=e.range.minX,i=e.range.minX+a,o=e.range.minY+a,s=e.range.maxY;break;case"SE":r=e.range.minX+a,i=e.range.maxX,o=e.range.minY+a,s=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:r,maxX:i,minY:o,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}_drawBranch(e,t,r){r===void 0&&(r="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=r,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}class z2e{constructor(e,t,r){this._rng=pl("REPULSION SOLVER"),this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e}solve(){let e,t,r,i,o,s,a,g;const A=this.body.nodes,I=this.physicsBody.physicsNodeIndices,C=this.physicsBody.forces,l=this.options.nodeDistance,d=-2/3/l,u=4/3;for(let h=0;h<I.length-1;h++){a=A[I[h]];for(let p=h+1;p<I.length;p++)g=A[I[p]],e=g.x-a.x,t=g.y-a.y,r=Math.sqrt(e*e+t*t),r===0&&(r=.1*this._rng(),e=r),r<2*l&&(r<.5*l?s=1:s=d*r+u,s=s/r,i=e*s,o=t*s,C[a.id].x-=i,C[a.id].y-=o,C[g.id].x+=i,C[g.id].y+=o)}}}class j2e{constructor(e,t,r){this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}solve(){const e=this.body.nodes,t=this.physicsBody.physicsNodeIndices,r=this.physicsBody.forces,i=this.options.nodeDistance;for(let o=0;o<t.length-1;o++){const s=e[t[o]];for(let a=o+1;a<t.length;a++){const g=e[t[a]];if(s.level===g.level){const A=i+this.overlapAvoidanceFactor*((s.shape.radius||0)/2+(g.shape.radius||0)/2),I=g.x-s.x,C=g.y-s.y,l=Math.sqrt(I*I+C*C),d=.05;let u;l<A?u=-Math.pow(d*l,2)+Math.pow(d*A,2):u=0,l!==0&&(u=u/l);const h=I*u,p=C*u;r[s.id].x-=h,r[s.id].y-=p,r[g.id].x+=h,r[g.id].y+=p}}}}}class Z1{constructor(e,t,r){this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e}solve(){let e,t;const r=this.physicsBody.physicsEdgeIndices,i=this.body.edges;let o,s,a;for(let g=0;g<r.length;g++)t=i[r[g]],t.connected===!0&&t.toId!==t.fromId&&this.body.nodes[t.toId]!==void 0&&this.body.nodes[t.fromId]!==void 0&&(t.edgeType.via!==void 0?(e=t.options.length===void 0?this.options.springLength:t.options.length,o=t.to,s=t.edgeType.via,a=t.from,this._calculateSpringForce(o,s,.5*e),this._calculateSpringForce(s,a,.5*e)):(e=t.options.length===void 0?this.options.springLength*1.5:t.options.length,this._calculateSpringForce(t.from,t.to,e)))}_calculateSpringForce(e,t,r){const i=e.x-t.x,o=e.y-t.y,s=Math.max(Math.sqrt(i*i+o*o),.01),a=this.options.springConstant*(r-s)/s,g=i*a,A=o*a;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=g,this.physicsBody.forces[e.id].y+=A),this.physicsBody.forces[t.id]!==void 0&&(this.physicsBody.forces[t.id].x-=g,this.physicsBody.forces[t.id].y-=A)}}class L2e{constructor(e,t,r){this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e}solve(){let e,t,r,i,o,s,a,g;const A=this.body.edges,I=.5,C=this.physicsBody.physicsEdgeIndices,l=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces;for(let v=0;v<l.length;v++){const y=l[v];d[y].springFx=0,d[y].springFy=0}for(let v=0;v<C.length;v++)t=A[C[v]],t.connected===!0&&(e=t.options.length===void 0?this.options.springLength:t.options.length,r=t.from.x-t.to.x,i=t.from.y-t.to.y,g=Math.sqrt(r*r+i*i),g=g===0?.01:g,a=this.options.springConstant*(e-g)/g,o=r*a,s=i*a,t.to.level!=t.from.level?(d[t.toId]!==void 0&&(d[t.toId].springFx-=o,d[t.toId].springFy-=s),d[t.fromId]!==void 0&&(d[t.fromId].springFx+=o,d[t.fromId].springFy+=s)):(d[t.toId]!==void 0&&(d[t.toId].x-=I*o,d[t.toId].y-=I*s),d[t.fromId]!==void 0&&(d[t.fromId].x+=I*o,d[t.fromId].y+=I*s)));a=1;let u,h;for(let v=0;v<l.length;v++){const y=l[v];u=Math.min(a,Math.max(-a,d[y].springFx)),h=Math.min(a,Math.max(-a,d[y].springFy)),d[y].x+=u,d[y].y+=h}let p=0,f=0;for(let v=0;v<l.length;v++){const y=l[v];p+=d[y].x,f+=d[y].y}const c=p/l.length,m=f/l.length;for(let v=0;v<l.length;v++){const y=l[v];d[y].x-=c,d[y].y-=m}}}class DI{constructor(e,t,r){this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e}solve(){let e,t,r,i;const o=this.body.nodes,s=this.physicsBody.physicsNodeIndices,a=this.physicsBody.forces;for(let g=0;g<s.length;g++){const A=s[g];i=o[A],e=-i.x,t=-i.y,r=Math.sqrt(e*e+t*t),this._calculateForces(r,e,t,a,i)}}_calculateForces(e,t,r,i,o){const s=e===0?0:this.options.centralGravity/e;i[o.id].x=t*s,i[o.id].y=r*s}}class G2e extends C6{constructor(e,t,r){super(e,t,r),this._rng=pl("FORCE ATLAS 2 BASED REPULSION SOLVER")}_calculateForces(e,t,r,i,o){e===0&&(e=.1*this._rng(),t=e),this.overlapAvoidanceFactor<1&&i.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));const s=i.edges.length+1,a=this.options.gravitationalConstant*o.mass*i.options.mass*s/Math.pow(e,2),g=t*a,A=r*a;this.physicsBody.forces[i.id].x+=g,this.physicsBody.forces[i.id].y+=A}}class W2e extends DI{constructor(e,t,r){super(e,t,r)}_calculateForces(e,t,r,i,o){if(e>0){const s=o.edges.length+1,a=this.options.centralGravity*s*o.options.mass;i[o.id].x=t*a,i[o.id].y=r*a}}}class V2e{constructor(e){this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},Mt(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("initPhysics",()=>{this.initPhysics()}),this.body.emitter.on("_layoutFailed",()=>{this.layoutFailed=!0}),this.body.emitter.on("resetPhysics",()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on("disablePhysics",()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on("restorePhysics",()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on("startSimulation",()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on("stopSimulation",()=>{this.stopSimulation()}),this.body.emitter.on("destroy",()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on("_dataChanged",()=>{this.updatePhysicsData()})}setOptions(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,aC(["stabilization"],this.options,e),Or(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());const t=this.options.wind;t&&((typeof t.x!="number"||eS(t.x))&&(t.x=0),(typeof t.y!="number"||eS(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}init(){let e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new G2e(this.body,this.physicsBody,e),this.edgesSolver=new Z1(this.body,this.physicsBody,e),this.gravitySolver=new W2e(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new z2e(this.body,this.physicsBody,e),this.edgesSolver=new Z1(this.body,this.physicsBody,e),this.gravitySolver=new DI(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new j2e(this.body,this.physicsBody,e),this.edgesSolver=new L2e(this.body,this.physicsBody,e),this.gravitySolver=new DI(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new C6(this.body,this.physicsBody,e),this.edgesSolver=new Z1(this.body,this.physicsBody,e),this.gravitySolver=new DI(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}startSimulation(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=z(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}stopSimulation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}simulationStep(){const e=rS();this.physicsTick(),(rS()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&ys(()=>{this.body.emitter.emit("stabilized",{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){this._evaluateStepQuality()===!0?this.timestep=1.2*this.timestep:this.timestep/1.2<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/1.2))}physicsTick(){this._startStabilizing(),this.stabilized!==!0&&(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0?(this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1):(this.timestep=this.options.timestep,this.physicsStep()),this.stabilized===!0&&this.revert(),this.stabilizationIterations++)}updatePhysicsData(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];const e=this.body.nodes,t=this.body.edges;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&e[r].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[r].id);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&t[r].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(t[r].id);for(let r=0;r<this.physicsBody.physicsNodeIndices.length;r++){const i=this.physicsBody.physicsNodeIndices[r];this.physicsBody.forces[i]={x:0,y:0},this.physicsBody.velocities[i]===void 0&&(this.physicsBody.velocities[i]={x:0,y:0})}for(const r in this.physicsBody.velocities)e[r]===void 0&&delete this.physicsBody.velocities[r]}revert(){const e=It(this.previousStates),t=this.body.nodes,r=this.physicsBody.velocities;this.referenceState={};for(let i=0;i<e.length;i++){const o=e[i];t[o]!==void 0?t[o].options.physics===!0&&(this.referenceState[o]={positions:{x:t[o].x,y:t[o].y}},r[o].x=this.previousStates[o].vx,r[o].y=this.previousStates[o].vy,t[o].x=this.previousStates[o].x,t[o].y=this.previousStates[o].y):delete this.previousStates[o]}}_evaluateStepQuality(){let e,t,r;const i=this.body.nodes,o=this.referenceState,s=.3;for(const a in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,a)&&i[a]!==void 0&&(e=i[a].x-o[a].positions.x,t=i[a].y-o[a].positions.y,r=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),r>s))return!1;return!0}moveNodes(){const e=this.physicsBody.physicsNodeIndices;let t=0,r=0;const i=5;for(let o=0;o<e.length;o++){const s=e[o],a=this._performStep(s);t=Math.max(t,a),r+=a}this.adaptiveTimestepEnabled=r/e.length<i,this.stabilized=t<this.options.minVelocity}calculateComponentVelocity(e,t,r){const i=this.modelOptions.damping*e,o=(t-i)/r;e+=o*this.timestep;const s=this.options.maxVelocity||1e9;return Math.abs(e)>s&&(e=e>0?s:-s),e}_performStep(e){const t=this.body.nodes[e],r=this.physicsBody.forces[e];this.options.wind&&(r.x+=this.options.wind.x,r.y+=this.options.wind.y);const i=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:i.x,vy:i.y},t.options.fixed.x===!1?(i.x=this.calculateComponentVelocity(i.x,r.x,t.options.mass),t.x+=i.x*this.timestep):(r.x=0,i.x=0),t.options.fixed.y===!1?(i.y=this.calculateComponentVelocity(i.y,r.y,t.options.mass),t.y+=i.y*this.timestep):(r.y=0,i.y=0),Math.sqrt(Math.pow(i.x,2)+Math.pow(i.y,2))}_freezeNodes(){const e=this.body.nodes;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){const r=e[t].options.fixed;this.freezeCache[t]={x:r.x,y:r.y},r.x=!0,r.y=!0}}_restoreFrozenNodes(){const e=this.body.nodes;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!="number"&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,ys(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}_stabilizationBatch(){const e=()=>this.stabilized===!1&&this.stabilizationIterations<this.targetIterations,t=()=>{this.body.emitter.emit("stabilizationProgress",{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&t();let r=0;for(;e()&&r<this.options.stabilization.updateInterval;)this.physicsTick(),r++;if(t(),e()){var i;ys(z(i=this._stabilizationBatch).call(i,this),0)}else this._finalizeStabilization()}_finalizeStabilization(){this.body.emitter.emit("_allowRedraw"),this.options.stabilization.fit===!0&&this.body.emitter.emit("fit"),this.options.stabilization.onlyDynamicEdges===!0&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),this.stabilized===!0?this._emitStabilized():this.startSimulation(),this.ready=!0}_drawForces(e){for(let t=0;t<this.physicsBody.physicsNodeIndices.length;t++){const r=this.physicsBody.physicsNodeIndices[t],i=this.body.nodes[r],o=this.physicsBody.forces[r],s=20,a=.03,g=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.x,2)),A=Math.min(Math.max(5,g),15),I=3*A,C=XE((180-Math.min(1,Math.max(0,a*g))*180)/360,1,1),l={x:i.x+s*o.x,y:i.y+s*o.y};e.lineWidth=A,e.strokeStyle=C,e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(l.x,l.y),e.stroke();const d=Math.atan2(o.y,o.x);e.fillStyle=C,A6.draw(e,{type:"arrow",point:l,angle:d,length:I}),Tl(e).call(e)}}}var RV={},xV;function Z2e(){if(xV)return RV;xV=1;var n=ne(),e=we(),t=Po(),r=e([].reverse),i=[1,2];return n({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),r(this)}}),RV}var H1,$V;function H2e(){if($V)return H1;$V=1,Z2e();var n=zt();return H1=n("Array","reverse"),H1}var U1,DV;function U2e(){if(DV)return U1;DV=1;var n=pt(),e=H2e(),t=Array.prototype;return U1=function(r){var i=r.reverse;return r===t||n(t,r)&&i===t.reverse?e:i},U1}var Y1,NV;function Y2e(){if(NV)return Y1;NV=1;var n=U2e();return Y1=n,Y1}var K1,MV;function K2e(){return MV||(MV=1,K1=Y2e()),K1}var X2e=K2e(),ws=ue(X2e);const Dt=[];for(let n=0;n<256;++n)Dt.push((n+256).toString(16).slice(1));function Q2e(n,e=0){return(Dt[n[e+0]]+Dt[n[e+1]]+Dt[n[e+2]]+Dt[n[e+3]]+"-"+Dt[n[e+4]]+Dt[n[e+5]]+"-"+Dt[n[e+6]]+Dt[n[e+7]]+"-"+Dt[n[e+8]]+Dt[n[e+9]]+"-"+Dt[n[e+10]]+Dt[n[e+11]]+Dt[n[e+12]]+Dt[n[e+13]]+Dt[n[e+14]]+Dt[n[e+15]]).toLowerCase()}let X1;const J2e=new Uint8Array(16);function eNe(){if(!X1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");X1=crypto.getRandomValues.bind(crypto)}return X1(J2e)}const tNe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var kV={randomUUID:tNe};function vg(n,e,t){if(kV.randomUUID&&!n)return kV.randomUUID();n=n||{};const r=n.random??n.rng?.()??eNe();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Q2e(r)}class Yt{constructor(){}static getRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=1e9,i=-1e9,o=1e9,s=-1e9,a;if(t.length>0)for(let g=0;g<t.length;g++)a=e[t[g]],o>a.shape.boundingBox.left&&(o=a.shape.boundingBox.left),s<a.shape.boundingBox.right&&(s=a.shape.boundingBox.right),r>a.shape.boundingBox.top&&(r=a.shape.boundingBox.top),i<a.shape.boundingBox.bottom&&(i=a.shape.boundingBox.bottom);return o===1e9&&s===-1e9&&r===1e9&&i===-1e9&&(r=0,i=0,o=0,s=0),{minX:o,maxX:s,minY:r,maxY:i}}static getRangeCore(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=1e9,i=-1e9,o=1e9,s=-1e9,a;if(t.length>0)for(let g=0;g<t.length;g++)a=e[t[g]],o>a.x&&(o=a.x),s<a.x&&(s=a.x),r>a.y&&(r=a.y),i<a.y&&(i=a.y);return o===1e9&&s===-1e9&&r===1e9&&i===-1e9&&(r=0,i=0,o=0,s=0),{minX:o,maxX:s,minY:r,maxY:i}}static findCenter(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}static cloneOptions(e,t){const r={};return t===void 0||t==="node"?(ke(r,e.options,!0),r.x=e.x,r.y=e.y,r.amountOfConnections=e.edges.length):ke(r,e.options,!0),r}}class rNe extends Ge{constructor(e,t,r,i,o,s){super(e,t,r,i,o,s),this.isCluster=!0,this.containedNodes={},this.containedEdges={}}_openChildCluster(e){const t=this.body.nodes[e];if(this.containedNodes[e]===void 0)throw new Error("node with id: "+e+" not in current cluster");if(!t.isCluster)throw new Error("node with id: "+e+" is not a cluster");delete this.containedNodes[e],ve(t.edges,r=>{delete this.containedEdges[r.id]}),ve(t.containedNodes,(r,i)=>{this.containedNodes[i]=r}),t.containedNodes={},ve(t.containedEdges,(r,i)=>{this.containedEdges[i]=r}),t.containedEdges={},ve(t.edges,r=>{ve(this.edges,i=>{var o,s;const a=Ye(o=i.clusteringEdgeReplacingIds).call(o,r.id);a!==-1&&(ve(r.clusteringEdgeReplacingIds,g=>{i.clusteringEdgeReplacingIds.push(g),this.body.edges[g].edgeReplacedById=i.id}),an(s=i.clusteringEdgeReplacingIds).call(s,a,1))})}),t.edges=[]}}class iNe{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Mt(this.options,this.defaultOptions),this.body.emitter.on("_resetData",()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,t){e===void 0?e=this._getHubSize():typeof e=="object"&&(t=this._checkOptions(e),e=this._getHubSize());const r=[];for(let i=0;i<this.body.nodeIndices.length;i++){const o=this.body.nodes[this.body.nodeIndices[i]];o.edges.length>=e&&r.push(o.id)}for(let i=0;i<r.length;i++)this.clusterByConnection(r[i],t,!0);this.body.emitter.emit("_dataChanged")}cluster(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);const r={},i={};ve(this.body.nodes,(o,s)=>{o.options&&e.joinCondition(o.options)===!0&&(r[s]=o,ve(o.edges,a=>{this.clusteredEdges[a.id]===void 0&&(i[a.id]=a)}))}),this._cluster(r,i,e,t)}clusterByEdgeCount(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);const i=[],o={};let s,a,g;for(let A=0;A<this.body.nodeIndices.length;A++){const I={},C={},l=this.body.nodeIndices[A],d=this.body.nodes[l];if(o[l]===void 0){g=0,a=[];for(let u=0;u<d.edges.length;u++)s=d.edges[u],this.clusteredEdges[s.id]===void 0&&(s.toId!==s.fromId&&g++,a.push(s));if(g===e){const u=function(p){if(t.joinCondition===void 0||t.joinCondition===null)return!0;const f=Yt.cloneOptions(p);return t.joinCondition(f)};let h=!0;for(let p=0;p<a.length;p++){s=a[p];const f=this._getConnectedId(s,l);if(u(d))C[s.id]=s,I[l]=d,I[f]=this.body.nodes[f],o[l]=!0;else{h=!1;break}}if(It(I).length>0&&It(C).length>0&&h===!0){const f=function(){for(let c=0;c<i.length;++c)for(const m in I)if(i[c].nodes[m]!==void 0)return i[c]}();if(f!==void 0){for(const c in I)f.nodes[c]===void 0&&(f.nodes[c]=I[c]);for(const c in C)f.edges[c]===void 0&&(f.edges[c]=C[c])}else i.push({nodes:I,edges:C})}}}}for(let A=0;A<i.length;A++)this._cluster(i[A].nodes,i[A].edges,t,!1);r===!0&&this.body.emitter.emit("_dataChanged")}clusterOutliers(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}clusterBridges(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}clusterByConnection(e,t){var r;let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");const o=this.body.nodes[e];t=this._checkOptions(t,o),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=o.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=o.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=o.options.fixed.x,t.clusterNodeProperties.fixed.y=o.options.fixed.y);const s={},a={},g=o.id,A=Yt.cloneOptions(o);s[g]=o;for(let C=0;C<o.edges.length;C++){const l=o.edges[C];if(this.clusteredEdges[l.id]===void 0){const d=this._getConnectedId(l,g);if(this.clusteredNodes[d]===void 0)if(d!==g)if(t.joinCondition===void 0)a[l.id]=l,s[d]=this.body.nodes[d];else{const u=Yt.cloneOptions(this.body.nodes[d]);t.joinCondition(A,u)===!0&&(a[l.id]=l,s[d]=this.body.nodes[d])}else a[l.id]=l}}const I=Lg(r=It(s)).call(r,function(C){return s[C].id});for(const C in s){if(!Object.prototype.hasOwnProperty.call(s,C))continue;const l=s[C];for(let d=0;d<l.edges.length;d++){const u=l.edges[d];Ye(I).call(I,this._getConnectedId(u,l.id))>-1&&(a[u.id]=u)}}this._cluster(s,a,t,i)}_createClusterEdges(e,t,r,i){let o,s,a,g,A,I;const C=It(e),l=[];for(let h=0;h<C.length;h++){s=C[h],a=e[s];for(let p=0;p<a.edges.length;p++)o=a.edges[p],this.clusteredEdges[o.id]===void 0&&(o.toId==o.fromId?t[o.id]=o:o.toId==s?(g=r.id,A=o.fromId,I=A):(g=o.toId,A=r.id,I=g),e[I]===void 0&&l.push({edge:o,fromId:A,toId:g}))}const d=[],u=function(h){for(let p=0;p<d.length;p++){const f=d[p],c=h.fromId===f.fromId&&h.toId===f.toId,m=h.fromId===f.toId&&h.toId===f.fromId;if(c||m)return f}return null};for(let h=0;h<l.length;h++){const p=l[h],f=p.edge;let c=u(p);c===null?(c=this._createClusteredEdge(p.fromId,p.toId,f,i),d.push(c)):c.clusteringEdgeReplacingIds.push(f.id),this.body.edges[f.id].edgeReplacedById=c.id,this._backupEdgeOptions(f),f.setOptions({physics:!1})}}_checkOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const o=[];for(const I in e)Object.prototype.hasOwnProperty.call(e,I)&&this.clusteredNodes[I]!==void 0&&o.push(I);for(let I=0;I<o.length;++I)delete e[o[I]];if(It(e).length==0||It(e).length==1&&r.clusterNodeProperties.allowSingleNodeCluster!=!0)return;let s=ke({},r.clusterNodeProperties);if(r.processProperties!==void 0){const I=[];for(const l in e)if(Object.prototype.hasOwnProperty.call(e,l)){const d=Yt.cloneOptions(e[l]);I.push(d)}const C=[];for(const l in t)if(Object.prototype.hasOwnProperty.call(t,l)&&l.substr(0,12)!=="clusterEdge:"){const d=Yt.cloneOptions(t[l],"edge");C.push(d)}if(s=r.processProperties(s,I,C),!s)throw new Error("The processProperties function does not return properties!")}s.id===void 0&&(s.id="cluster:"+vg());const a=s.id;s.label===void 0&&(s.label="cluster");let g;s.x===void 0&&(g=this._getClusterPosition(e),s.x=g.x),s.y===void 0&&(g===void 0&&(g=this._getClusterPosition(e)),s.y=g.y),s.id=a;const A=this.body.functions.createNode(s,rNe);A.containedNodes=e,A.containedEdges=t,A.clusterEdgeProperties=r.clusterEdgeProperties,this.body.nodes[s.id]=A,this._clusterEdges(e,t,s,r.clusterEdgeProperties),s.id=void 0,i===!0&&this.body.emitter.emit("_dataChanged")}_backupEdgeOptions(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}_restoreEdge(e){const t=this.clusteredEdges[e.id];t!==void 0&&(e.setOptions({physics:t.physics}),delete this.clusteredEdges[e.id])}isCluster(e){return this.body.nodes[e]!==void 0?this.body.nodes[e].isCluster===!0:(console.error("Node does not exist."),!1)}_getClusterPosition(e){const t=It(e);let r=e[t[0]].x,i=e[t[0]].x,o=e[t[0]].y,s=e[t[0]].y,a;for(let g=1;g<t.length;g++)a=e[t[g]],r=a.x<r?a.x:r,i=a.x>i?a.x:i,o=a.y<o?a.y:o,s=a.y>s?a.y:s;return{x:.5*(r+i),y:.5*(o+s)}}openCluster(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");const i=this.body.nodes[e];if(i===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(i.isCluster!==!0||i.containedNodes===void 0||i.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");const o=this.findNode(e),s=Ye(o).call(o,e)-1;if(s>=0){const I=o[s];this.body.nodes[I]._openChildCluster(e),delete this.body.nodes[e],r===!0&&this.body.emitter.emit("_dataChanged");return}const a=i.containedNodes,g=i.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){const I={},C={x:i.x,y:i.y};for(const d in a)if(Object.prototype.hasOwnProperty.call(a,d)){const u=this.body.nodes[d];I[d]={x:u.x,y:u.y}}const l=t.releaseFunction(C,I);for(const d in a)if(Object.prototype.hasOwnProperty.call(a,d)){const u=this.body.nodes[d];l[d]!==void 0&&(u.x=l[d].x===void 0?i.x:l[d].x,u.y=l[d].y===void 0?i.y:l[d].y)}}else ve(a,function(I){I.options.fixed.x===!1&&(I.x=i.x),I.options.fixed.y===!1&&(I.y=i.y)});for(const I in a)if(Object.prototype.hasOwnProperty.call(a,I)){const C=this.body.nodes[I];C.vx=i.vx,C.vy=i.vy,C.setOptions({physics:!0}),delete this.clusteredNodes[I]}const A=[];for(let I=0;I<i.edges.length;I++)A.push(i.edges[I]);for(let I=0;I<A.length;I++){const C=A[I],l=this._getConnectedId(C,e),d=this.clusteredNodes[l];for(let u=0;u<C.clusteringEdgeReplacingIds.length;u++){const h=C.clusteringEdgeReplacingIds[u],p=this.body.edges[h];if(p!==void 0)if(d!==void 0){const f=this.body.nodes[d.clusterId];f.containedEdges[p.id]=p,delete g[p.id];let c=p.fromId,m=p.toId;p.toId==l?m=d.clusterId:c=d.clusterId,this._createClusteredEdge(c,m,p,f.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(p)}C.remove()}for(const I in g)Object.prototype.hasOwnProperty.call(g,I)&&this._restoreEdge(g[I]);delete this.body.nodes[e],r===!0&&this.body.emitter.emit("_dataChanged")}getNodesInCluster(e){const t=[];if(this.isCluster(e)===!0){const r=this.body.nodes[e].containedNodes;for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&t.push(this.body.nodes[i].id)}return t}findNode(e){const t=[];let i=0,o;for(;this.clusteredNodes[e]!==void 0&&i<100;){if(o=this.body.nodes[e],o===void 0)return[];t.push(o.id),e=this.clusteredNodes[e].clusterId,i++}return o=this.body.nodes[e],o===void 0?[]:(t.push(o.id),ws(t).call(t),t)}updateClusteredNode(e,t){if(e===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(t===void 0)throw new Error("No newOptions supplied to updateClusteredNode.");if(this.body.nodes[e]===void 0)throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[e].setOptions(t),this.body.emitter.emit("_dataChanged")}updateEdge(e,t){if(e===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(t===void 0)throw new Error("No newOptions supplied to updateEdge.");if(this.body.edges[e]===void 0)throw new Error("The startEdgeId supplied to updateEdge does not exist.");const r=this.getClusteredEdges(e);for(let i=0;i<r.length;i++)this.body.edges[r[i]].setOptions(t);this.body.emitter.emit("_dataChanged")}getClusteredEdges(e){const t=[];let i=0;for(;e!==void 0&&this.body.edges[e]!==void 0&&i<100;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,i++;return ws(t).call(t),t}getBaseEdge(e){return this.getBaseEdges(e)[0]}getBaseEdges(e){const t=[e],r=[],i=[],o=100;let s=0;for(;t.length>0&&s<o;){const a=t.pop();if(a===void 0)continue;const g=this.body.edges[a];if(g===void 0)continue;s++;const A=g.clusteringEdgeReplacingIds;if(A===void 0)i.push(a);else for(let I=0;I<A.length;++I){const C=A[I];Ye(t).call(t,A)!==-1||Ye(r).call(r,A)!==-1||t.push(C)}r.push(a)}return i}_getConnectedId(e,t){return e.toId!=t?e.toId:(e.fromId!=t,e.fromId)}_getHubSize(){let e=0,t=0,r=0,i=0;for(let g=0;g<this.body.nodeIndices.length;g++){const A=this.body.nodes[this.body.nodeIndices[g]];A.edges.length>i&&(i=A.edges.length),e+=A.edges.length,t+=Math.pow(A.edges.length,2),r+=1}e=e/r,t=t/r;const o=t-Math.pow(e,2),s=Math.sqrt(o);let a=Math.floor(e+2*s);return a>i&&(a=i),a}_createClusteredEdge(e,t,r,i,o){const s=Yt.cloneOptions(r,"edge");ke(s,i),s.from=e,s.to=t,s.id="clusterEdge:"+vg(),o!==void 0&&ke(s,o);const a=this.body.functions.createEdge(s);return a.clusteringEdgeReplacingIds=[r.id],a.connect(),this.body.edges[a.id]=a,a}_clusterEdges(e,t,r,i){if(t instanceof gn){const o=t,s={};s[o.id]=o,t=s}if(e instanceof Ge){const o=e,s={};s[o.id]=o,e=s}if(r==null)throw new Error("_clusterEdges: parameter clusterNode required");i===void 0&&(i=r.clusterEdgeProperties),this._createClusterEdges(e,t,r,i);for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&this.body.edges[o]!==void 0){const s=this.body.edges[o];this._backupEdgeOptions(s),s.setOptions({physics:!1})}for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(this.clusteredNodes[o]={clusterId:r.id,node:this.body.nodes[o]},this.body.nodes[o].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;const t=this.clusteredNodes[e];if(t===void 0)return;const r=t.clusterId;if(r!==void 0)return this.body.nodes[r]}_filter(e,t){const r=[];return ve(e,i=>{t(i)&&r.push(i)}),r}_updateState(){let e;const t=[],r={},i=g=>{ve(this.body.nodes,A=>{A.isCluster===!0&&g(A)})};for(e in this.clusteredNodes){if(!Object.prototype.hasOwnProperty.call(this.clusteredNodes,e))continue;this.body.nodes[e]===void 0&&t.push(e)}i(function(g){for(let A=0;A<t.length;A++)delete g.containedNodes[t[A]]});for(let g=0;g<t.length;g++)delete this.clusteredNodes[t[g]];ve(this.clusteredEdges,g=>{const A=this.body.edges[g];(A===void 0||!A.endPointsValid())&&(r[g]=g)}),i(function(g){ve(g.containedEdges,(A,I)=>{!A.endPointsValid()&&!r[I]&&(r[I]=I)})}),ve(this.body.edges,(g,A)=>{let I=!0;const C=g.clusteringEdgeReplacingIds;if(C!==void 0){let l=0;ve(C,d=>{const u=this.body.edges[d];u!==void 0&&u.endPointsValid()&&(l+=1)}),I=l>0}(!g.endPointsValid()||!I)&&(r[A]=A)}),i(g=>{ve(r,A=>{delete g.containedEdges[A],ve(g.edges,(I,C)=>{if(I.id===A){g.edges[C]=null;return}I.clusteringEdgeReplacingIds=this._filter(I.clusteringEdgeReplacingIds,function(l){return!r[l]})}),g.edges=this._filter(g.edges,function(I){return I!==null})})}),ve(r,g=>{delete this.clusteredEdges[g]}),ve(r,g=>{delete this.body.edges[g]});const o=It(this.body.edges);ve(o,g=>{const A=this.body.edges[g],I=this._isClusteredNode(A.fromId)||this._isClusteredNode(A.toId);if(I!==this._isClusteredEdge(A.id))if(I){const C=this._getClusterNodeForNode(A.fromId);C!==void 0&&this._clusterEdges(this.body.nodes[A.fromId],A,C);const l=this._getClusterNodeForNode(A.toId);l!==void 0&&this._clusterEdges(this.body.nodes[A.toId],A,l)}else delete this._clusterEdges[g],this._restoreEdge(A)});let s=!1,a=!0;for(;a;){const g=[];i(function(A){const I=It(A.containedNodes).length,C=A.options.allowSingleNodeCluster===!0;(C&&I<1||!C&&I<2)&&g.push(A.id)});for(let A=0;A<g.length;++A)this.openCluster(g[A],{},!1);a=g.length>0,s=s||a}s&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}}class nNe{constructor(e,t){this.body=e,this.canvas=t,this.redrawRequested=!1,this.requestAnimationFrameRequestId=void 0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},Mt(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on("dragStart",()=>{this.dragging=!0}),this.body.emitter.on("dragEnd",()=>{this.dragging=!1}),this.body.emitter.on("zoom",()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=ys(()=>{var t;this.zooming=!1,z(t=this._requestRedraw).call(t,this)()},250)}),this.body.emitter.on("_resizeNodes",()=>{this._resizeNodes()}),this.body.emitter.on("_redraw",()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on("_blockRedraw",()=>{this.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",z(e=this._requestRedraw).call(e,this)),this.body.emitter.on("_startRendering",()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on("_stopRendering",()=>{this.renderRequests-=1,this.renderingActive=this.renderRequests>0,this.requestAnimationFrameRequestId=void 0}),this.body.emitter.on("destroy",()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,window.cancelAnimationFrame(this.requestAnimationFrameRequestId),this.body.emitter.off()})}setOptions(e){e!==void 0&&xa(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(z(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.requestAnimationFrameRequestId=void 0,this._startRendering(),this._redraw())}redraw(){this.body.emitter.emit("setSize"),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,window.requestAnimationFrame(()=>{this._redraw(!1)}))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;const t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();const r=this.canvas.getContext(),i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(r.clearRect(0,0,i,o),this.canvas.frame.clientWidth===0)return;if(r.save(),r.translate(this.body.view.translation.x,this.body.view.translation.y),r.scale(this.body.view.scale,this.body.view.scale),r.beginPath(),this.body.emitter.emit("beforeDrawing",r),r.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(r),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){const{drawExternalLabels:s}=this._drawNodes(r,e);t.drawExternalLabels=s}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(r),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(r),r.beginPath(),this.body.emitter.emit("afterDrawing",r),r.closePath(),r.restore(),e===!0&&r.clearRect(0,0,i,o)}}_resizeNodes(){this.canvas.setTransform();const e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);const t=this.body.nodes;let r;for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r=t[i],r.resize(e),r.updateBoundingBox(e,r.selected));e.restore()}_drawNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.body.nodes,i=this.body.nodeIndices;let o;const s=[],a=[],g=20,A=this.canvas.DOMtoCanvas({x:-g,y:-g}),I=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+g,y:this.canvas.frame.canvas.clientHeight+g}),C={top:A.y,left:A.x,bottom:I.y,right:I.x},l=[];for(let p=0;p<i.length;p++)if(o=r[i[p]],o.hover)a.push(i[p]);else if(o.isSelected())s.push(i[p]);else if(t===!0){const f=o.draw(e);f.drawExternalLabel!=null&&l.push(f.drawExternalLabel)}else if(o.isBoundingBoxOverlappingWith(C)===!0){const f=o.draw(e);f.drawExternalLabel!=null&&l.push(f.drawExternalLabel)}else o.updateBoundingBox(e,o.selected);let d;const u=s.length,h=a.length;for(d=0;d<u;d++){o=r[s[d]];const p=o.draw(e);p.drawExternalLabel!=null&&l.push(p.drawExternalLabel)}for(d=0;d<h;d++){o=r[a[d]];const p=o.draw(e);p.drawExternalLabel!=null&&l.push(p.drawExternalLabel)}return{drawExternalLabels:()=>{for(const p of l)p()}}}_drawEdges(e){const t=this.body.edges,r=this.body.edgeIndices;for(let i=0;i<r.length;i++){const o=t[r[i]];o.connected===!0&&o.draw(e)}}_drawArrows(e){const t=this.body.edges,r=this.body.edgeIndices;for(let i=0;i<r.length;i++){const o=t[r[i]];o.connected===!0&&o.drawArrows(e)}}_drawSelectionBox(e){if(this.body.selectionBox.show){e.beginPath();const t=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,r=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y;e.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,r),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,r),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}}var Q1,FV;function oNe(){if(FV)return Q1;FV=1,Z9();var n=Re();return Q1=n.setInterval,Q1}var J1,BV;function sNe(){return BV||(BV=1,J1=oNe()),J1}var aNe=sNe(),gNe=ue(aNe);function IC(n,e){e.inputHandler=function(t){t.isFirst&&e(t)},n.on("hammer.input",e.inputHandler)}function l6(n,e){return e.inputHandler=function(t){t.isFinal&&e(t)},n.on("hammer.input",e.inputHandler)}class ANe{constructor(e){this.body=e,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},Mt(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.once("resize",t=>{t.width!==0&&(this.body.view.translation.x=t.width*.5),t.height!==0&&(this.body.view.translation.y=t.height*.5)}),this.body.emitter.on("setSize",z(e=this.setSize).call(e,this)),this.body.emitter.on("destroy",()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&xa(["width","height","autoResize"],this.options,e),this._cleanUp(),this.options.autoResize===!0){var t;if(window.ResizeObserver){const i=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")}),{frame:o}=this;i.observe(o),this._cleanupCallbacks.push(()=>{i.unobserve(o)})}else{const i=gNe(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(i)})}const r=z(t=this._onResize).call(t,this);window.addEventListener("resize",r),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",r)})}}_cleanUp(){var e,t,r;je(e=ws(t=an(r=this._cleanupCallbacks).call(r,0)).call(t)).call(e,i=>{try{i()}catch(o){console.error(o)}})}_onResize(){this.setSize(),this.body.emitter.emit("_redraw")}_getCameraState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}_setCameraState(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){const e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight;let r=this.cameraState.scale;e!=1&&t!=1?r=this.cameraState.scale*.5*(e+t):e!=1?r=this.cameraState.scale*e:t!=1&&(r=this.cameraState.scale*t),this.body.view.scale=r;const i=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),o={x:i.x-this.cameraState.position.x,y:i.y-this.cameraState.position.y};this.body.view.translation.x+=o.x*this.body.view.scale,this.body.view.translation.y+=o.y*this.body.view.scale}}_prepareValue(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(Ye(e).call(e,"%")!==-1||Ye(e).call(e,"px")!==-1)return e;if(Ye(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}_create(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{const e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new ms(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:ms.DIRECTION_ALL}),IC(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on("tap",e=>{this.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",e=>{this.body.eventListeners.onHold(e)}),this.hammer.on("panstart",e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on("panend",e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("wheel",e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new ms(this.frame),l6(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);let r=!1;const i=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},r=!0;else{const a=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),g=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==a||this.frame.canvas.height!==g)&&this._getCameraState(s),this.frame.canvas.width!==a&&(this.frame.canvas.width=a,r=!0),this.frame.canvas.height!==g&&(this.frame.canvas.height=g,r=!0)}return r===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(i/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,r}getContext(){return this.frame.canvas.getContext("2d")}_determinePixelRatio(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");let t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);const r=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/r}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}function INe(n,e){const t=Mt({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},n??{});if(!Ur(t.nodes))throw new TypeError("Nodes has to be an array of ids.");if(t.nodes.length===0&&(t.nodes=e),!(typeof t.minZoomLevel=="number"&&t.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof t.maxZoomLevel=="number"&&t.minZoomLevel<=t.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return t}class CNe{constructor(e,t){var r,i;this.body=e,this.canvas=t,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",z(r=this.fit).call(r,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",z(i=this.releaseNode).call(i,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=INe(e,this.body.nodeIndices);const r=this.canvas.frame.canvas.clientWidth,i=this.canvas.frame.canvas.clientHeight;let o,s;if(r===0||i===0)s=1,o=Yt.getRange(this.body.nodes,e.nodes);else if(t===!0){let A=0;for(const l in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,l)&&this.body.nodes[l].predefinedPosition===!0&&(A+=1);if(A>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=Yt.getRange(this.body.nodes,e.nodes),s=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const C=Math.min(r/600,i/600);s*=C}else{this.body.emitter.emit("_resizeNodes"),o=Yt.getRange(this.body.nodes,e.nodes);const A=Math.abs(o.maxX-o.minX)*1.1,I=Math.abs(o.maxY-o.minY)*1.1,C=r/A,l=i/I;s=C<=l?C:l}s>e.maxZoomLevel?s=e.maxZoomLevel:s<e.minZoomLevel&&(s=e.minZoomLevel);const g={position:Yt.findCenter(o),scale:s,animation:e.animation};this.moveTo(g)}focus(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){const r={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=r,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!zn(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!zn(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!zn(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!zn(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}animateView(e){if(e===void 0)return;this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;const t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),r={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+r.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+r.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var i;this.viewFunction=z(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var o;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=z(o=this._transitionRedraw).call(o,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}_lockedRedraw(){const e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),r={x:t.x-e.x,y:t.y-e.y},i=this.body.view.translation,o={x:i.x+r.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:i.y+r.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;const t=L_e[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var r;this.viewFunction=z(r=this._lockedRedraw).call(r,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}function qV(n){var e=n&&n.preventDefault||!1,t=n&&n.container||window,r={},i={keydown:{},keyup:{}},o={},s;for(s=97;s<=122;s++)o[String.fromCharCode(s)]={code:65+(s-97),shift:!1};for(s=65;s<=90;s++)o[String.fromCharCode(s)]={code:s,shift:!0};for(s=0;s<=9;s++)o[""+s]={code:48+s,shift:!1};for(s=1;s<=12;s++)o["F"+s]={code:111+s,shift:!1};for(s=0;s<=9;s++)o["num"+s]={code:96+s,shift:!1};o["num*"]={code:106,shift:!1},o["num+"]={code:107,shift:!1},o["num-"]={code:109,shift:!1},o["num/"]={code:111,shift:!1},o["num."]={code:110,shift:!1},o.left={code:37,shift:!1},o.up={code:38,shift:!1},o.right={code:39,shift:!1},o.down={code:40,shift:!1},o.space={code:32,shift:!1},o.enter={code:13,shift:!1},o.shift={code:16,shift:void 0},o.esc={code:27,shift:!1},o.backspace={code:8,shift:!1},o.tab={code:9,shift:!1},o.ctrl={code:17,shift:!1},o.alt={code:18,shift:!1},o.delete={code:46,shift:!1},o.pageup={code:33,shift:!1},o.pagedown={code:34,shift:!1},o["="]={code:187,shift:!1},o["-"]={code:189,shift:!1},o["]"]={code:221,shift:!1},o["["]={code:219,shift:!1};var a=function(I){A(I,"keydown")},g=function(I){A(I,"keyup")},A=function(I,C){if(i[C][I.keyCode]!==void 0){for(var l=i[C][I.keyCode],d=0;d<l.length;d++)(l[d].shift===void 0||l[d].shift==!0&&I.shiftKey==!0||l[d].shift==!1&&I.shiftKey==!1)&&l[d].fn(I);e==!0&&I.preventDefault()}};return r.bind=function(I,C,l){if(l===void 0&&(l="keydown"),o[I]===void 0)throw new Error("unsupported key: "+I);i[l][o[I].code]===void 0&&(i[l][o[I].code]=[]),i[l][o[I].code].push({fn:C,shift:o[I].shift})},r.bindAll=function(I,C){C===void 0&&(C="keydown");for(var l in o)o.hasOwnProperty(l)&&r.bind(l,I,C)},r.getKey=function(I){for(var C in o)if(o.hasOwnProperty(C)){if(I.shiftKey==!0&&o[C].shift==!0&&I.keyCode==o[C].code)return C;if(I.shiftKey==!1&&o[C].shift==!1&&I.keyCode==o[C].code)return C;if(I.keyCode==o[C].code&&C=="shift")return C}return"unknown key, currently not supported"},r.unbind=function(I,C,l){if(l===void 0&&(l="keydown"),o[I]===void 0)throw new Error("unsupported key: "+I);if(C!==void 0){var d=[],u=i[l][o[I].code];if(u!==void 0)for(var h=0;h<u.length;h++)u[h].fn==C&&u[h].shift==o[I].shift||d.push(i[l][o[I].code][h]);i[l][o[I].code]=d}else i[l][o[I].code]=[]},r.reset=function(){i={keydown:{},keyup:{}}},r.destroy=function(){i={keydown:{},keyup:{}},t.removeEventListener("keydown",a,!0),t.removeEventListener("keyup",g,!0)},t.addEventListener("keydown",a,!0),t.addEventListener("keyup",g,!0),r}class lNe{constructor(e,t){this.body=e,this.canvas=t,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",()=>{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on("deactivate",()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on("destroy",()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let e=0;e<this.navigationHammers.length;e++)this.navigationHammers[e].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}loadNavigationElements(){this.cleanNavigation(),this.navigationDOM={};const e=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],t=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(let s=0;s<e.length;s++){this.navigationDOM[e[s]]=document.createElement("div"),this.navigationDOM[e[s]].className="vis-button vis-"+e[s],this.navigationDOM.wrapper.appendChild(this.navigationDOM[e[s]]);const a=new ms(this.navigationDOM[e[s]]);if(t[s]==="_fit"){var r;IC(a,z(r=this._fit).call(r,this))}else{var i;IC(a,z(i=this.bindToRedraw).call(i,this,t[s]))}this.navigationHammers.push(a)}const o=new ms(this.canvas.frame);l6(o,()=>{this._stopMovement()}),this.navigationHammers.push(o),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=z(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(const e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){const e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),r=this.body.view.translation,i=t/e,o=(1-i)*this.canvas.canvasViewCenter.x+r.x*i,s=(1-i)*this.canvas.canvasViewCenter.y+r.y*i;this.body.view.scale=t,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}_zoomOut(){const e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),r=this.body.view.translation,i=t/e,o=(1-i)*this.canvas.canvasViewCenter.x+r.x*i,s=(1-i)*this.canvas.canvasViewCenter.y+r.y*i;this.body.view.scale=t,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=qV({container:window,preventDefault:!0}):this.keycharm=qV({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,r,i,o,s,a,g,A,I,C,l,d,u,h,p,f,c,m,v,y,w,S,b;z(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),z(t=this.keycharm).call(t,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),z(r=this.keycharm).call(r,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),z(i=this.keycharm).call(i,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),z(o=this.keycharm).call(o,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(s=this.keycharm).call(s,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(a=this.keycharm).call(a,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(g=this.keycharm).call(g,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(A=this.keycharm).call(A,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(I=this.keycharm).call(I,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(C=this.keycharm).call(C,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(l=this.keycharm).call(l,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(d=this.keycharm).call(d,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),z(u=this.keycharm).call(u,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),z(h=this.keycharm).call(h,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),z(p=this.keycharm).call(p,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),z(f=this.keycharm).call(f,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(c=this.keycharm).call(c,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(m=this.keycharm).call(m,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(v=this.keycharm).call(v,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(y=this.keycharm).call(y,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(w=this.keycharm).call(w,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(S=this.keycharm).call(S,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(b=this.keycharm).call(b,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class dNe{constructor(e,t,r){var i,o,s,a,g,A,I,C,l,d,u,h,p;this.body=e,this.canvas=t,this.selectionHandler=r,this.navigationHandler=new lNe(e,t),this.body.eventListeners.onTap=z(i=this.onTap).call(i,this),this.body.eventListeners.onTouch=z(o=this.onTouch).call(o,this),this.body.eventListeners.onDoubleTap=z(s=this.onDoubleTap).call(s,this),this.body.eventListeners.onHold=z(a=this.onHold).call(a,this),this.body.eventListeners.onDragStart=z(g=this.onDragStart).call(g,this),this.body.eventListeners.onDrag=z(A=this.onDrag).call(A,this),this.body.eventListeners.onDragEnd=z(I=this.onDragEnd).call(I,this),this.body.eventListeners.onMouseWheel=z(C=this.onMouseWheel).call(C,this),this.body.eventListeners.onPinch=z(l=this.onPinch).call(l,this),this.body.eventListeners.onMouseMove=z(d=this.onMouseMove).call(d,this),this.body.eventListeners.onRelease=z(u=this.onRelease).call(u,this),this.body.eventListeners.onContext=z(h=this.onContext).call(h,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=z(p=this.getPointer).call(p,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},Mt(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("destroy",()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(aC(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),Or(this.options,e,"keyboard"),e.tooltip&&(Mt(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=KE(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-B_e(this.canvas.frame.canvas),y:e.y-q_e(this.canvas.frame.canvas)}}onTouch(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}onTap(e){const t=this.getPointer(e.center),r=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,r),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}onDoubleTap(e){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}onHold(e){const t=this.getPointer(e.center),r=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,r),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}onContext(e){const t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,t){const r=function(i,o){const s=[];for(let a=0;a<i.length;a++){const g=i[a];Ye(o).call(o,g)===-1&&s.push(g)}return s};return{nodes:r(e.nodes,t.nodes),edges:r(e.edges,t.edges)}}onDragStart(e){if(this.drag.dragging)return;this.drag.pointer===void 0&&this.onTouch(e);const t=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=Mt({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;const r=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(r.x),y:this.canvas._YconvertDOMtoCanvas(r.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(r.x),y:this.canvas._YconvertDOMtoCanvas(r.y)}}else if(t!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=t.id,t.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[t.id]}),this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer);for(const r of this.selectionHandler.getSelectedNodes()){const i={id:r.id,node:r,x:r.x,y:r.y,xFixed:r.options.fixed.x,yFixed:r.options.fixed.y};r.options.fixed.x=!0,r.options.fixed.y=!0,this.drag.selection.push(i)}}else this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer,void 0,!0)}onDrag(e){if(this.drag.pinched===!0)return;this.body.emitter.emit("unlockNode");const t=this.getPointer(e.center),r=this.drag.selection;if(r&&r.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,t);const i=t.x-this.drag.pointer.x,o=t.y-this.drag.pointer.y;je(r).call(r,s=>{const a=s.node;s.xFixed===!1&&(a.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(s.x)+i)),s.yFixed===!1&&(a.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(s.y)+o))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}const i=t.x-this.drag.pointer.x,o=t.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+i,y:this.drag.translation.y+o},this.body.emitter.emit("_requestRedraw")}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var t;this.body.selectionBox.show=!1;const r=this.body.selectionBox.position,i={minX:Math.min(r.start.x,r.end.x),minY:Math.min(r.start.y,r.end.y),maxX:Math.max(r.start.x,r.end.x),maxY:Math.max(r.start.y,r.end.y)},o=Li(t=this.body.nodeIndices).call(t,a=>{const g=this.body.nodes[a];return g.x>=i.minX&&g.x<=i.maxX&&g.y>=i.minY&&g.y<=i.maxY});je(o).call(o,a=>this.selectionHandler.selectObject(this.body.nodes[a]));const s=this.getPointer(e.center);this.selectionHandler.commitAndEmit(s,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{const r=this.drag.selection;r&&r.length?(je(r).call(r,function(i){i.node.options.fixed.x=i.xFixed,i.node.options.fixed.y=i.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}onPinch(e){const t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);const r=this.pinch.scale*e.scale;this.zoom(r,t)}zoom(e,t){if(this.options.zoomView===!0){const r=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let i;this.drag!==void 0&&this.drag.dragging===!0&&(i=this.canvas.DOMtoCanvas(this.drag.pointer));const o=this.body.view.translation,s=e/r,a=(1-s)*t.x+o.x*s,g=(1-s)*t.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:a,y:g},i!=null){const A=this.canvas.canvasToDOM(i);this.drag.pointer.x=A.x,this.drag.pointer.y=A.y}this.body.emitter.emit("_requestRedraw"),r<e?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:t}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:t})}}onMouseWheel(e){if(this.options.zoomView===!0){if(e.deltaY!==0){let t=this.body.view.scale;t*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);const r=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(t,r)}e.preventDefault()}}onMouseMove(e){const t=this.getPointer({x:e.clientX,y:e.clientY});let r=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(t),this.popup.hidden===!1&&(r=!0,this.popup.setPosition(t.x+3,t.y-5),this.popup.show())),this.options.keyboard.autoFocus&&this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),r===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=ys(()=>this._checkShowPopup(t),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,t)}_checkShowPopup(e){const t=this.canvas._XconvertDOMtoCanvas(e.x),r=this.canvas._YconvertDOMtoCanvas(e.y),i={left:t,top:r,right:t,bottom:r},o=this.popupObj===void 0?void 0:this.popupObj.id;let s=!1,a="node";if(this.popupObj===void 0){const g=this.body.nodeIndices,A=this.body.nodes;let I;const C=[];for(let l=0;l<g.length;l++)I=A[g[l]],I.isOverlappingWith(i)===!0&&(s=!0,I.getTitle()!==void 0&&C.push(g[l]));C.length>0&&(this.popupObj=A[C[C.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){const g=this.body.edgeIndices,A=this.body.edges;let I;const C=[];for(let l=0;l<g.length;l++)I=A[g[l]],I.isOverlappingWith(i)===!0&&I.connected===!0&&I.getTitle()!==void 0&&C.push(g[l]);C.length>0&&(this.popupObj=A[C[C.length-1]],a="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new K_e(this.canvas.frame)),this.popup.popupTargetType=a,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}_checkHidePopup(e){const t=this.selectionHandler._pointerToPositionObject(e);let r=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(r=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),r===!0)){const i=this.selectionHandler.getNodeAt(e);r=i===void 0?!1:i.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(r=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));r===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}var zV={},jV={},LV;function uNe(){if(LV)return jV;LV=1;var n=sT(),e=L9();return n("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),jV}var GV;function hNe(){return GV||(GV=1,uNe()),zV}var WV={},ew,VV;function Do(){if(VV)return ew;VV=1;var n=Ea(),e=TypeError;return ew=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(n(t)+" is not a set")},ew}var tw,ZV;function No(){if(ZV)return tw;ZV=1;var n=wr(),e=G9(),t=n("Set"),r=t.prototype;return tw={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:r},tw}var rw,HV;function Mo(){if(HV)return rw;HV=1;var n=ur();return rw=function(e,t,r){for(var i=r?e:e.iterator,o=e.next,s,a;!(s=n(o,i)).done;)if(a=t(s.value),a!==void 0)return a},rw}var iw,UV;function jA(){if(UV)return iw;UV=1;var n=Mo();return iw=function(e,t,r){return r?n(e.keys(),t,!0):e.forEach(t)},iw}var nw,YV;function hT(){if(YV)return nw;YV=1;var n=No(),e=jA(),t=n.Set,r=n.add;return nw=function(i){var o=new t;return e(i,function(s){r(o,s)}),o},nw}var ow,KV;function LA(){return KV||(KV=1,ow=function(n){return n.size}),ow}var sw,XV;function cNe(){return XV||(XV=1,sw=function(n){return{iterator:n,next:n.next,done:!1}}),sw}var aw,QV;function ko(){if(QV)return aw;QV=1;var n=zi(),e=ci(),t=ur(),r=_a(),i=cNe(),o="Invalid size",s=RangeError,a=TypeError,g=Math.max,A=function(I,C){this.set=I,this.size=g(C,0),this.has=n(I.has),this.keys=n(I.keys)};return A.prototype={getIterator:function(){return i(e(t(this.keys,this.set)))},includes:function(I){return t(this.has,this.set,I)}},aw=function(I){e(I);var C=+I.size;if(C!==C)throw new a(o);var l=r(C);if(l<0)throw new s(o);return new A(I,l)},aw}var gw,JV;function fNe(){if(JV)return gw;JV=1;var n=Do(),e=No(),t=hT(),r=LA(),i=ko(),o=jA(),s=Mo(),a=e.has,g=e.remove;return gw=function(I){var C=n(this),l=i(I),d=t(C);return r(C)<=l.size?o(C,function(u){l.includes(u)&&g(d,u)}):s(l.getIterator(),function(u){a(d,u)&&g(d,u)}),d},gw}var Aw,eZ;function Fo(){return eZ||(eZ=1,Aw=function(){return!1}),Aw}var tZ;function pNe(){if(tZ)return WV;tZ=1;var n=ne(),e=fNe(),t=be(),r=Fo(),i=!r("difference",function(s){return s.size===0}),o=i||t(function(){var s={size:1,has:function(){return!0},keys:function(){var g=0;return{next:function(){var A=g++>1;return a.has(1)&&a.clear(),{done:A,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(s).size!==3});return n({target:"Set",proto:!0,real:!0,forced:o},{difference:e}),WV}var rZ={},Iw,iZ;function vNe(){if(iZ)return Iw;iZ=1;var n=Do(),e=No(),t=LA(),r=ko(),i=jA(),o=Mo(),s=e.Set,a=e.add,g=e.has;return Iw=function(I){var C=n(this),l=r(I),d=new s;return t(C)>l.size?o(l.getIterator(),function(u){g(C,u)&&a(d,u)}):i(C,function(u){l.includes(u)&&a(d,u)}),d},Iw}var nZ;function mNe(){if(nZ)return rZ;nZ=1;var n=ne(),e=be(),t=vNe(),r=Fo(),i=!r("intersection",function(o){return o.size===2&&o.has(1)&&o.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return n({target:"Set",proto:!0,real:!0,forced:i},{intersection:t}),rZ}var oZ={},Cw,sZ;function yNe(){if(sZ)return Cw;sZ=1;var n=Do(),e=No().has,t=LA(),r=ko(),i=jA(),o=Mo(),s=nT();return Cw=function(g){var A=n(this),I=r(g);if(t(A)<=I.size)return i(A,function(l){if(I.includes(l))return!1},!0)!==!1;var C=I.getIterator();return o(C,function(l){if(e(A,l))return s(C,"normal",!1)})!==!1},Cw}var aZ;function bNe(){if(aZ)return oZ;aZ=1;var n=ne(),e=yNe(),t=Fo(),r=!t("isDisjointFrom",function(i){return!i});return n({target:"Set",proto:!0,real:!0,forced:r},{isDisjointFrom:e}),oZ}var gZ={},lw,AZ;function wNe(){if(AZ)return lw;AZ=1;var n=Do(),e=LA(),t=jA(),r=ko();return lw=function(o){var s=n(this),a=r(o);return e(s)>a.size?!1:t(s,function(g){if(!a.includes(g))return!1},!0)!==!1},lw}var IZ;function ENe(){if(IZ)return gZ;IZ=1;var n=ne(),e=wNe(),t=Fo(),r=!t("isSubsetOf",function(i){return i});return n({target:"Set",proto:!0,real:!0,forced:r},{isSubsetOf:e}),gZ}var CZ={},dw,lZ;function SNe(){if(lZ)return dw;lZ=1;var n=Do(),e=No().has,t=LA(),r=ko(),i=Mo(),o=nT();return dw=function(a){var g=n(this),A=r(a);if(t(g)<A.size)return!1;var I=A.getIterator();return i(I,function(C){if(!e(g,C))return o(I,"normal",!1)})!==!1},dw}var dZ;function ONe(){if(dZ)return CZ;dZ=1;var n=ne(),e=SNe(),t=Fo(),r=!t("isSupersetOf",function(i){return!i});return n({target:"Set",proto:!0,real:!0,forced:r},{isSupersetOf:e}),CZ}var uZ={},uw,hZ;function TNe(){if(hZ)return uw;hZ=1;var n=Do(),e=No(),t=hT(),r=ko(),i=Mo(),o=e.add,s=e.has,a=e.remove;return uw=function(A){var I=n(this),C=r(A).getIterator(),l=t(I);return i(C,function(d){s(I,d)?a(l,d):o(l,d)}),l},uw}var hw,cZ;function d6(){return cZ||(cZ=1,hw=function(n){try{var e=new Set,t={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},r=e[n](t);return r.size===1&&r.values().next().value===4}catch{return!1}}),hw}var fZ;function _Ne(){if(fZ)return uZ;fZ=1;var n=ne(),e=TNe(),t=d6(),r=Fo(),i=!r("symmetricDifference")||!t("symmetricDifference");return n({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:e}),uZ}var pZ={},cw,vZ;function PNe(){if(vZ)return cw;vZ=1;var n=Do(),e=No().add,t=hT(),r=ko(),i=Mo();return cw=function(s){var a=n(this),g=r(s).getIterator(),A=t(a);return i(g,function(I){e(A,I)}),A},cw}var mZ;function RNe(){if(mZ)return pZ;mZ=1;var n=ne(),e=PNe(),t=d6(),r=Fo(),i=!r("union")||!t("union");return n({target:"Set",proto:!0,real:!0,forced:i},{union:e}),pZ}var fw,yZ;function xNe(){if(yZ)return fw;yZ=1,Ma(),hNe(),pNe(),mNe(),bNe(),ENe(),ONe(),_Ne(),RNe(),AT();var n=Re();return fw=n.Set,fw}var pw,bZ;function $Ne(){if(bZ)return pw;bZ=1;var n=xNe();return ka(),pw=n,pw}var vw,wZ;function DNe(){return wZ||(wZ=1,vw=$Ne()),vw}var NNe=DNe(),Ui=ue(NNe),EZ={},SZ={},mw,OZ;function MNe(){if(OZ)return mw;OZ=1;var n=we(),e=gT(),t=bl().getWeakData,r=oT(),i=ci(),o=ya(),s=Rt(),a=wl(),g=wn(),A=qt(),I=Ro(),C=I.set,l=I.getterFor,d=g.find,u=g.findIndex,h=n([].splice),p=0,f=function(v){return v.frozen||(v.frozen=new c)},c=function(){this.entries=[]},m=function(v,y){return d(v.entries,function(w){return w[0]===y})};return c.prototype={get:function(v){var y=m(this,v);if(y)return y[1]},has:function(v){return!!m(this,v)},set:function(v,y){var w=m(this,v);w?w[1]=y:this.entries.push([v,y])},delete:function(v){var y=u(this.entries,function(w){return w[0]===v});return~y&&h(this.entries,y,1),!!~y}},mw={getConstructor:function(v,y,w,S){var b=v(function(_,T){r(_,E),C(_,{type:y,id:p++,frozen:null}),o(T)||a(T,_[S],{that:_,AS_ENTRIES:w})}),E=b.prototype,O=l(y),P=function(_,T,R){var D=O(_),G=t(i(T),!0);return G===!0?f(D).set(T,R):G[D.id]=R,_};return e(E,{delete:function(_){var T=O(this);if(!s(_))return!1;var R=t(_);return R===!0?f(T).delete(_):R&&A(R,T.id)&&delete R[T.id]},has:function(T){var R=O(this);if(!s(T))return!1;var D=t(T);return D===!0?f(R).has(T):D&&A(D,R.id)}}),e(E,w?{get:function(T){var R=O(this);if(s(T)){var D=t(T);if(D===!0)return f(R).get(T);if(D)return D[R.id]}},set:function(T,R){return P(this,T,R)}}:{add:function(T){return P(this,T,!0)}}),b}},mw}var TZ;function kNe(){if(TZ)return SZ;TZ=1;var n=z9(),e=He(),t=we(),r=gT(),i=bl(),o=sT(),s=MNe(),a=Rt(),g=Ro().enforce,A=be(),I=B9(),C=Object,l=Array.isArray,d=C.isExtensible,u=C.isFrozen,h=C.isSealed,p=C.freeze,f=C.seal,c=!e.ActiveXObject&&"ActiveXObject"in e,m,v=function(_){return function(){return _(this,arguments.length?arguments[0]:void 0)}},y=o("WeakMap",v,s),w=y.prototype,S=t(w.set),b=function(){return n&&A(function(){var _=p([]);return S(new y,_,1),!u(_)})};if(I)if(c){m=s.getConstructor(v,"WeakMap",!0),i.enable();var E=t(w.delete),O=t(w.has),P=t(w.get);r(w,{delete:function(_){if(a(_)&&!d(_)){var T=g(this);return T.frozen||(T.frozen=new m),E(this,_)||T.frozen.delete(_)}return E(this,_)},has:function(T){if(a(T)&&!d(T)){var R=g(this);return R.frozen||(R.frozen=new m),O(this,T)||R.frozen.has(T)}return O(this,T)},get:function(T){if(a(T)&&!d(T)){var R=g(this);return R.frozen||(R.frozen=new m),O(this,T)?P(this,T):R.frozen.get(T)}return P(this,T)},set:function(T,R){if(a(T)&&!d(T)){var D=g(this);D.frozen||(D.frozen=new m),O(this,T)?S(this,T,R):D.frozen.set(T,R)}else S(this,T,R);return this}})}else b()&&r(w,{set:function(T,R){var D;return l(T)&&(u(T)?D=p:h(T)&&(D=f)),S(this,T,R),D&&D(T),this}});return SZ}var _Z;function FNe(){return _Z||(_Z=1,kNe()),EZ}var yw,PZ;function BNe(){if(PZ)return yw;PZ=1,Ma(),FNe();var n=Re();return yw=n.WeakMap,yw}var bw,RZ;function qNe(){if(RZ)return bw;RZ=1;var n=BNe();return ka(),bw=n,bw}var ww,xZ;function zNe(){return xZ||(xZ=1,ww=qNe()),ww}var jNe=zNe(),GA=ue(jNe);function mg(n,e,t){LNe(n,e),e.set(n,t)}function LNe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function iS(n,e,t){return n.set(u6(n,e),t),t}function Ne(n,e){return n.get(u6(n,e))}function u6(n,e,t){if(typeof n=="function"?n===e:n.has(e))return arguments.length<3?e:t;throw new TypeError("Private element is not present on this object")}function $Z(n,e){const t=new Ui;for(const r of e)n.has(r)||t.add(r);return t}var Ho=new GA,Lr=new GA;class DZ{constructor(){mg(this,Ho,new Ui),mg(this,Lr,new Ui)}get size(){return Ne(Lr,this).size}add(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(const i of t)Ne(Lr,this).add(i)}delete(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(const i of t)Ne(Lr,this).delete(i)}clear(){Ne(Lr,this).clear()}getSelection(){return[...Ne(Lr,this)]}getChanges(){return{added:[...$Z(Ne(Ho,this),Ne(Lr,this))],deleted:[...$Z(Ne(Lr,this),Ne(Ho,this))],previous:[...new Ui(Ne(Ho,this))],current:[...new Ui(Ne(Lr,this))]}}commit(){const e=this.getChanges();iS(Ho,this,Ne(Lr,this)),iS(Lr,this,new Ui(Ne(Ho,this)));for(const t of e.added)t.select();for(const t of e.deleted)t.unselect();return e}}var Dn=new GA,Nn=new GA,Ew=new GA;class GNe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:()=>{};mg(this,Dn,new DZ),mg(this,Nn,new DZ),mg(this,Ew,void 0),iS(Ew,this,e)}get sizeNodes(){return Ne(Dn,this).size}get sizeEdges(){return Ne(Nn,this).size}getNodes(){return Ne(Dn,this).getSelection()}getEdges(){return Ne(Nn,this).getSelection()}addNodes(){Ne(Dn,this).add(...arguments)}addEdges(){Ne(Nn,this).add(...arguments)}deleteNodes(e){Ne(Dn,this).delete(e)}deleteEdges(e){Ne(Nn,this).delete(e)}clear(){Ne(Dn,this).clear(),Ne(Nn,this).clear()}commit(){const e={nodes:Ne(Dn,this).commit(),edges:Ne(Nn,this).commit()};for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Ne(Ew,this).call(this,e,...r),e}}class WNe{constructor(e,t){this.body=e,this.canvas=t,this._selectionAccumulator=new GNe,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Mt(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",()=>{this.updateSelection()})}setOptions(e){e!==void 0&&xa(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}selectOnPoint(e){let t=!1;if(this.options.selectable===!0){const r=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),r!==void 0&&(t=this.selectObject(r)),this.body.emitter.emit("_requestRedraw")}return t}selectAdditionalOnPoint(e){let t=!1;if(this.options.selectable===!0){const r=this.getNodeAt(e)||this.getEdgeAt(e);r!==void 0&&(t=!0,r.isSelected()===!0?this.deselectObject(r):this.selectObject(r),this.body.emitter.emit("_requestRedraw"))}return t}_initBaseEvent(e,t){const r={};return r.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},r.event=e,r}generateClickEvent(e,t,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;const s=this._initBaseEvent(t,r);if(o===!0)s.nodes=[],s.edges=[];else{const a=this.getSelection();s.nodes=a.nodes,s.edges=a.edges}i!==void 0&&(s.previousSelection=i),e=="click"&&(s.items=this.getClickedItems(r)),t.controlEdge!==void 0&&(s.controlEdge=t.controlEdge),this.body.emitter.emit(e,s)}selectObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0?(e instanceof Ge?(t===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0):!1}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){const t=[],r=this.body.nodes;for(let i=0;i<this.body.nodeIndices.length;i++){const o=this.body.nodeIndices[i];r[o].isOverlappingWith(e)&&t.push(o)}return t}_pointerToPositionObject(e){const t=this.canvas.DOMtoCanvas(e);return{left:t.x-1,top:t.y+1,right:t.x+1,bottom:t.y-1}}getNodeAt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const r=this._pointerToPositionObject(e),i=this._getAllNodesOverlappingWith(r);if(i.length>0)return t===!0?this.body.nodes[i[i.length-1]]:i[i.length-1]}_getEdgesOverlappingWith(e,t){const r=this.body.edges;for(let i=0;i<this.body.edgeIndices.length;i++){const o=this.body.edgeIndices[i];r[o].isOverlappingWith(e)&&t.push(o)}}_getAllEdgesOverlappingWith(e){const t=[];return this._getEdgesOverlappingWith(e,t),t}getEdgeAt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const r=this.canvas.DOMtoCanvas(e);let i=10,o=null;const s=this.body.edges;for(let a=0;a<this.body.edgeIndices.length;a++){const g=this.body.edgeIndices[a],A=s[g];if(A.connected){const I=A.from.x,C=A.from.y,l=A.to.x,d=A.to.y,u=A.edgeType.getDistanceToEdge(I,C,l,d,r.x,r.y);u<i&&(o=g,i=u)}}if(o!==null)return t===!0?this.body.edges[o]:o}_addToHover(e){e instanceof Ge?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}_removeFromSelection(e){e instanceof Ge?(this._selectionAccumulator.deleteNodes(e),this._selectionAccumulator.deleteEdges(...e.edges)):this._selectionAccumulator.deleteEdges(e)}unselectAll(){this._selectionAccumulator.clear()}getSelectedNodeCount(){return this._selectionAccumulator.sizeNodes}getSelectedEdgeCount(){return this._selectionAccumulator.sizeEdges}_hoverConnectedEdges(e){for(let t=0;t<e.edges.length;t++){const r=e.edges[t];r.hover=!0,this._addToHover(r)}}emitBlurEvent(e,t,r){const i=this._initBaseEvent(e,t);r.hover===!0&&(r.hover=!1,r instanceof Ge?(i.node=r.id,this.body.emitter.emit("blurNode",i)):(i.edge=r.id,this.body.emitter.emit("blurEdge",i)))}emitHoverEvent(e,t,r){const i=this._initBaseEvent(e,t);let o=!1;return r.hover===!1&&(r.hover=!0,this._addToHover(r),o=!0,r instanceof Ge?(i.node=r.id,this.body.emitter.emit("hoverNode",i)):(i.edge=r.id,this.body.emitter.emit("hoverEdge",i))),o}hoverObject(e,t){let r=this.getNodeAt(t);r===void 0&&(r=this.getEdgeAt(t));let i=!1;for(const o in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,o)&&(r===void 0||r instanceof Ge&&r.id!=o||r instanceof gn)&&(this.emitBlurEvent(e,t,this.hoverObj.nodes[o]),delete this.hoverObj.nodes[o],i=!0);for(const o in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,o)&&(i===!0?(this.hoverObj.edges[o].hover=!1,delete this.hoverObj.edges[o]):(r===void 0||r instanceof gn&&r.id!=o||r instanceof Ge&&!r.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[o]),delete this.hoverObj.edges[o],i=!0));if(r!==void 0){const o=It(this.hoverObj.edges).length,s=It(this.hoverObj.nodes).length,a=r instanceof gn&&o===0&&s===0,g=r instanceof Ge&&o===0&&s===0;(i||a||g)&&(i=this.emitHoverEvent(e,t,r)),r instanceof Ge&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(r)}i===!0&&this.body.emitter.emit("_requestRedraw")}commitWithoutEmitting(){this._selectionAccumulator.commit()}commitAndEmit(e,t){let r=!1;const i=this._selectionAccumulator.commit(),o={nodes:i.nodes.previous,edges:i.edges.previous};i.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",t,e,o),r=!0),i.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,o),r=!0),i.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),r=!0),i.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),r=!0),r===!0&&this.generateClickEvent("select",t,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return Lg(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return Lg(e=this._selectionAccumulator.getEdges()).call(e,t=>t.id)}setSelection(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(const r of e.nodes){const i=this.body.nodes[r];if(!i)throw new RangeError('Node with id "'+r+'" not found');this.selectObject(i,t.highlightEdges)}if(e.edges)for(const r of e.edges){const i=this.body.edges[r];if(!i)throw new RangeError('Edge with id "'+r+'" not found');this.selectObject(i)}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}selectNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}selectEdges(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}updateSelection(){for(const e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(const e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){const t=this.canvas.DOMtoCanvas(e),r=[],i=this.body.nodeIndices,o=this.body.nodes;for(let g=i.length-1;g>=0;g--){const I=o[i[g]].getItemsOnPoint(t);r.push.apply(r,I)}const s=this.body.edgeIndices,a=this.body.edges;for(let g=s.length-1;g>=0;g--){const I=a[s[g]].getItemsOnPoint(t);r.push.apply(r,I)}return r}}var NZ={},Sw,MZ;function VNe(){if(MZ)return Sw;MZ=1;var n=Pa(),e=Math.floor,t=function(r,i){var o=r.length;if(o<8)for(var s=1,a,g;s<o;){for(g=s,a=r[s];g&&i(r[g-1],a)>0;)r[g]=r[--g];g!==s++&&(r[g]=a)}else for(var A=e(o/2),I=t(n(r,0,A),i),C=t(n(r,A),i),l=I.length,d=C.length,u=0,h=0;u<l||h<d;)r[u+h]=u<l&&h<d?i(I[u],C[h])<=0?I[u++]:C[h++]:u<l?I[u++]:C[h++];return r};return Sw=t,Sw}var Ow,kZ;function ZNe(){if(kZ)return Ow;kZ=1;var n=ba(),e=n.match(/firefox\/(\d+)/i);return Ow=!!e&&+e[1],Ow}var Tw,FZ;function HNe(){if(FZ)return Tw;FZ=1;var n=ba();return Tw=/MSIE|Trident/.test(n),Tw}var _w,BZ;function UNe(){if(BZ)return _w;BZ=1;var n=ba(),e=n.match(/AppleWebKit\/(\d+)\./);return _w=!!e&&+e[1],_w}var qZ;function YNe(){if(qZ)return NZ;qZ=1;var n=ne(),e=we(),t=zi(),r=Fr(),i=ji(),o=P9(),s=zr(),a=be(),g=VNe(),A=$a(),I=ZNe(),C=HNe(),l=PA(),d=UNe(),u=[],h=e(u.sort),p=e(u.push),f=a(function(){u.sort(void 0)}),c=a(function(){u.sort(null)}),m=A("sort"),v=!a(function(){if(l)return l<70;if(!(I&&I>3)){if(C)return!0;if(d)return d<603;var S="",b,E,O,P;for(b=65;b<76;b++){switch(E=String.fromCharCode(b),b){case 66:case 69:case 70:case 72:O=3;break;case 68:case 71:O=4;break;default:O=2}for(P=0;P<47;P++)u.push({k:E+P,v:O})}for(u.sort(function(_,T){return T.v-_.v}),P=0;P<u.length;P++)E=u[P].k.charAt(0),S.charAt(S.length-1)!==E&&(S+=E);return S!=="DGBEFHACIJK"}}),y=f||!c||!m||!v,w=function(S){return function(b,E){return E===void 0?-1:b===void 0?1:S!==void 0?+S(b,E)||0:s(b)>s(E)?1:-1}};return n({target:"Array",proto:!0,forced:y},{sort:function(b){b!==void 0&&t(b);var E=r(this);if(v)return b===void 0?h(E):h(E,b);var O=[],P=i(E),_,T;for(T=0;T<P;T++)T in E&&p(O,E[T]);for(g(O,w(b)),_=i(O),T=0;T<_;)E[T]=O[T++];for(;T<P;)o(E,T++);return E}}),NZ}var Pw,zZ;function KNe(){if(zZ)return Pw;zZ=1,YNe();var n=zt();return Pw=n("Array","sort"),Pw}var Rw,jZ;function XNe(){if(jZ)return Rw;jZ=1;var n=pt(),e=KNe(),t=Array.prototype;return Rw=function(r){var i=r.sort;return r===t||n(t,r)&&i===t.sort?e:i},Rw}var xw,LZ;function QNe(){if(LZ)return xw;LZ=1;var n=XNe();return xw=n,xw}var $w,GZ;function JNe(){return GZ||(GZ=1,$w=QNe()),$w}var eMe=JNe(),Es=ue(eMe),WZ={},Dw,VZ;function tMe(){if(VZ)return Dw;VZ=1;var n=gt(),e=be(),t=we(),r=eT(),i=$A(),o=Jr(),s=Al().f,a=t(s),g=t([].push),A=n&&e(function(){var C=Object.create(null);return C[2]=2,!a(C,2)}),I=function(C){return function(l){for(var d=o(l),u=i(d),h=A&&r(d)===null,p=u.length,f=0,c=[],m;p>f;)m=u[f++],(!n||(h?m in d:a(d,m)))&&g(c,C?[m,d[m]]:d[m]);return c}};return Dw={entries:I(!0),values:I(!1)},Dw}var ZZ;function rMe(){if(ZZ)return WZ;ZZ=1;var n=ne(),e=tMe().values;return n({target:"Object",stat:!0},{values:function(r){return e(r)}}),WZ}var Nw,HZ;function iMe(){if(HZ)return Nw;HZ=1,rMe();var n=Re();return Nw=n.Object.values,Nw}var Mw,UZ;function nMe(){if(UZ)return Mw;UZ=1;var n=iMe();return Mw=n,Mw}var kw,YZ;function oMe(){return YZ||(YZ=1,kw=nMe()),kw}var sMe=oMe(),aMe=ue(sMe),KZ={},Fw,XZ;function gMe(){if(XZ)return Fw;XZ=1;var n=zi(),e=Fr(),t=Il(),r=ji(),i=TypeError,o="Reduce of empty array with no initial value",s=function(a){return function(g,A,I,C){var l=e(g),d=t(l),u=r(l);if(n(A),u===0&&I<2)throw new i(o);var h=a?u-1:0,p=a?-1:1;if(I<2)for(;;){if(h in d){C=d[h],h+=p;break}if(h+=p,a?h<0:u<=h)throw new i(o)}for(;a?h>=0:u>h;h+=p)h in d&&(C=A(C,d[h],h,l));return C}};return Fw={left:s(!1),right:s(!0)},Fw}var Bw,QZ;function AMe(){if(QZ)return Bw;QZ=1;var n=W9();return Bw=n==="NODE",Bw}var JZ;function IMe(){if(JZ)return KZ;JZ=1;var n=ne(),e=gMe().left,t=$a(),r=PA(),i=AMe(),o=!i&&r>79&&r<83,s=o||!t("reduce");return n({target:"Array",proto:!0,forced:s},{reduce:function(g){var A=arguments.length;return e(this,g,A,A>1?arguments[1]:void 0)}}),KZ}var qw,eH;function CMe(){if(eH)return qw;eH=1,IMe();var n=zt();return qw=n("Array","reduce"),qw}var zw,tH;function lMe(){if(tH)return zw;tH=1;var n=pt(),e=CMe(),t=Array.prototype;return zw=function(r){var i=r.reduce;return r===t||n(t,r)&&i===t.reduce?e:i},zw}var jw,rH;function dMe(){if(rH)return jw;rH=1;var n=lMe();return jw=n,jw}var Lw,iH;function uMe(){return iH||(iH=1,Lw=dMe()),Lw}var hMe=uMe(),h6=ue(hMe);class c6{abstract(){throw new Error("Can't instantiate abstract class!")}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,r),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,t){this.fake_use(e,t),this.abstract()}shift(e,t){this.fake_use(e,t),this.abstract()}}class cMe extends c6{constructor(e){super(),this.layout=e}curveType(){return"horizontal"}getPosition(e){return e.x}setPosition(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;r!==void 0&&this.layout.hierarchical.addToOrdering(e,r),e.x=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}sort(e){Es(e).call(e,function(t,r){return t.x-r.x})}fix(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}shift(e,t){this.layout.body.nodes[e].x+=t}}class fMe extends c6{constructor(e){super(),this.layout=e}curveType(){return"vertical"}getPosition(e){return e.y}setPosition(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;r!==void 0&&this.layout.hierarchical.addToOrdering(e,r),e.y=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}sort(e){Es(e).call(e,function(t,r){return t.y-r.y})}fix(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}shift(e,t){this.layout.body.nodes[e].y+=t}}var nH={},oH;function pMe(){if(oH)return nH;oH=1;var n=ne(),e=wn().every,t=$a(),r=t("every");return n({target:"Array",proto:!0,forced:!r},{every:function(o){return e(this,o,arguments.length>1?arguments[1]:void 0)}}),nH}var Gw,sH;function vMe(){if(sH)return Gw;sH=1,pMe();var n=zt();return Gw=n("Array","every"),Gw}var Ww,aH;function mMe(){if(aH)return Ww;aH=1;var n=pt(),e=vMe(),t=Array.prototype;return Ww=function(r){var i=r.every;return r===t||n(t,r)&&i===t.every?e:i},Ww}var Vw,gH;function yMe(){if(gH)return Vw;gH=1;var n=mMe();return Vw=n,Vw}var Zw,AH;function bMe(){return AH||(AH=1,Zw=yMe()),Zw}var wMe=bMe(),f6=ue(wMe);function EMe(n,e){const t=new Ui;return je(n).call(n,r=>{var i;je(i=r.edges).call(i,o=>{o.connected&&t.add(o)})}),je(t).call(t,r=>{const i=r.from.id,o=r.to.id;e[i]==null&&(e[i]=0),(e[o]==null||e[i]>=e[o])&&(e[o]=e[i]+1)}),e}function SMe(n){return p6(e=>{var t,r;return f6(t=Li(r=e.edges).call(r,i=>n.has(i.toId))).call(t,i=>i.to===e)},(e,t)=>t>e,"from",n)}function OMe(n){return p6(e=>{var t,r;return f6(t=Li(r=e.edges).call(r,i=>n.has(i.toId))).call(t,i=>i.from===e)},(e,t)=>t<e,"to",n)}function p6(n,e,t,r){var i;const o=cg(null),s=h6(i=[...a6(r).call(r)]).call(i,(C,l)=>C+1+l.edges.length,0),a=t+"Id",g=t==="to"?1:-1;for(const[C,l]of r){if(!r.has(C)||!n(l))continue;o[C]=0;const d=[l];let u=0,h;for(;h=d.pop();){var A,I;if(!r.has(C))continue;const p=o[h.id]+g;if(je(A=Li(I=h.edges).call(I,f=>f.connected&&f.to!==f.from&&f[t]!==h&&r.has(f.toId)&&r.has(f.fromId))).call(A,f=>{const c=f[a],m=o[c];(m==null||e(p,m))&&(o[c]=p,d.push(f[t]))}),u>s)return EMe(r,o);++u}}return o}class TMe{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}checkIfTree(){for(const e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){const t={},r=i=>{if(t[i]!==void 0)return t[i];let o=this.levels[i];if(this.childrenReference[i]){const s=this.childrenReference[i];if(s.length>0)for(let a=0;a<s.length;a++)o=Math.max(o,r(s[a]))}return t[i]=o,o};return r(e)}levelDownstream(e,t){this.levels[t.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[t.id]=this.levels[e.id]+1)}setMinLevelToZero(){var e;const t=new IT;let r=0;const i=Es(e=[...new Ui(aMe(this.levels))]).call(e,(o,s)=>o-s);for(const o of i)t.set(o,r++);for(const o in this.levels)Object.prototype.hasOwnProperty.call(this.levels,o)&&(this.levels[o]=t.get(this.levels[o]))}getTreeSize(e,t){let r=1e9,i=-1e9,o=1e9,s=-1e9;for(const a in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,a)&&this.trees[a]===t){const g=e[a];r=Math.min(g.x,r),i=Math.max(g.x,i),o=Math.min(g.y,o),s=Math.max(g.y,s)}return{min_x:r,max_x:i,min_y:o,max_y:s}}hasSameParent(e,t){const r=this.parentReference[e.id],i=this.parentReference[t.id];if(r===void 0||i===void 0)return!1;for(let o=0;o<r.length;o++)for(let s=0;s<i.length;s++)if(r[o]==i[s])return!0;return!1}inSameSubNetwork(e,t){return this.trees[e.id]===this.trees[t.id]}getLevels(){return It(this.distributionOrdering)}addToOrdering(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);let r=!1;const i=this.distributionOrdering[t];for(const o in i)if(i[o]===e){r=!0;break}r||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}}class _Me{constructor(e){this.body=e,this._resetRNG(Math.random()+":"+rS()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},Mt(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("_dataChanged",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",()=>{this.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",()=>{if(this.options.hierarchical.enabled!==!0)return;const e=this.direction.curveType();this.body.emitter.emit("_forceDisableDynamicCurves",e,!1)})}setOptions(e,t){if(e!==void 0){const r=this.options.hierarchical,i=r.enabled;if(xa(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),Or(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),r.enabled===!0)return i===!0&&this.body.emitter.emit("refresh",!0),r.direction==="RL"||r.direction==="DU"?r.levelSeparation>0&&(r.levelSeparation*=-1):r.levelSeparation<0&&(r.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(i===!0)return this.body.emitter.emit("refresh"),ke(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=pl(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){const t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):typeof e.physics=="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});let r=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:r};else{const i=e.edges.smooth;i.type!==void 0&&i.type!=="dynamic"&&(r=i.type),this.optionsBackup.edges={smooth:{enabled:i.enabled===void 0?!0:i.enabled,type:i.type===void 0?"dynamic":i.type,roundness:i.roundness===void 0?.5:i.roundness,forceDirection:i.forceDirection===void 0?!1:i.forceDirection}},e.edges.smooth={enabled:i.enabled===void 0?!0:i.enabled,type:r,roundness:i.roundness===void 0?.5:i.roundness,forceDirection:i.forceDirection===void 0?!1:i.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",r)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);const t=e.length+50;for(let r=0;r<e.length;r++){const i=e[r],o=2*Math.PI*this._rng();i.x===void 0&&(i.x=t*Math.cos(o)),i.y===void 0&&(i.y=t*Math.sin(o))}}}layoutNetwork(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){const e=this.body.nodeIndices;let t=0;for(let r=0;r<e.length;r++)this.body.nodes[e[r]].predefinedPosition===!0&&(t+=1);if(t<.5*e.length){let i=0;const o=this.options.clusterThreshold,s={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>o){const g=e.length;for(;e.length>o&&i<=10;){i+=1;const A=e.length;i%3===0?this.body.modules.clustering.clusterBridges(s):this.body.modules.clustering.clusterOutliers(s);const I=e.length;if(A==I&&i%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*g)})}i>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();const a=70;for(let g=0;g<e.length;g++){const A=this.body.nodes[e[g]];A.predefinedPosition===!1&&(A.x+=(.5-this._rng())*a,A.y+=(.5-this._rng())*a)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}_shiftToCenter(){const e=Yt.getRangeCore(this.body.nodes,this.body.nodeIndices),t=Yt.findCenter(e);for(let r=0;r<this.body.nodeIndices.length;r++){const i=this.body.nodes[this.body.nodeIndices[r]];i.x-=t.x,i.y-=t.y}}_declusterAll(){let e=!0;for(;e===!0;){e=!1;for(let t=0;t<this.body.nodeIndices.length;t++)this.body.nodes[this.body.nodeIndices[t]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!1));e===!0&&this.body.emitter.emit("_dataChanged")}}getSeed(){return this.initialRandomSeed}setupHierarchicalLayout(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){let e,t,r=!1,i=!1;this.lastNodeOnLevel={},this.hierarchical=new TMe;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(r=!0,this.hierarchical.levels[t]=e.options.level):i=!0);if(i===!0&&r===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");{if(i===!0){const s=this.options.hierarchical.sortMethod;s==="hubsize"?this._determineLevelsByHubsize():s==="directed"?this._determineLevelsDirected():s==="custom"&&this._determineLevelsCustomCallback()}for(const s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.hierarchical.ensureLevel(s);const o=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(o),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let t=!1;const r={},i=()=>{const f=s();let c=0;for(let m=0;m<f.length-1;m++){const v=f[m].max-f[m+1].min;c+=v+this.options.hierarchical.treeSpacing,o(m+1,c)}},o=(f,c)=>{const m=this.hierarchical.trees;for(const v in m)Object.prototype.hasOwnProperty.call(m,v)&&m[v]===f&&this.direction.shift(v,c)},s=()=>{const f=[];for(let c=0;c<this.hierarchical.numTrees();c++)f.push(this.direction.getTreeSize(c));return f},a=(f,c)=>{if(!c[f.id]&&(c[f.id]=!0,this.hierarchical.childrenReference[f.id])){const m=this.hierarchical.childrenReference[f.id];if(m.length>0)for(let v=0;v<m.length;v++)a(this.body.nodes[m[v]],c)}},g=function(f){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,m=1e9,v=1e9,y=1e9,w=-1e9;for(const S in f)if(Object.prototype.hasOwnProperty.call(f,S)){const b=e.body.nodes[S],E=e.hierarchical.levels[b.id],O=e.direction.getPosition(b),[P,_]=e._getSpaceAroundNode(b,f);m=Math.min(P,m),v=Math.min(_,v),E<=c&&(y=Math.min(O,y),w=Math.max(O,w))}return[y,w,m,v]},A=(f,c)=>{const m=this.hierarchical.getMaxLevel(f.id),v=this.hierarchical.getMaxLevel(c.id);return Math.min(m,v)},I=(f,c,m)=>{const v=this.hierarchical;for(let y=0;y<c.length;y++){const w=c[y],S=v.distributionOrdering[w];if(S.length>1)for(let b=0;b<S.length-1;b++){const E=S[b],O=S[b+1];v.hasSameParent(E,O)&&v.inSameSubNetwork(E,O)&&f(E,O,m)}}},C=function(f,c){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const v=e.direction.getPosition(f),y=e.direction.getPosition(c),w=Math.abs(y-v),S=e.options.hierarchical.nodeSpacing;if(w>S){const b={},E={};a(f,b),a(c,E);const O=A(f,c),P=g(b,O),_=g(E,O),T=P[1],R=_[0],D=_[2];if(Math.abs(T-R)>S){let B=T-R+S;B<-D+S&&(B=-D+S),B<0&&(e._shiftBlock(c.id,B),t=!0,m===!0&&e._centerParent(c))}}},l=(f,c)=>{const m=c.id,v=c.edges,y=this.hierarchical.levels[c.id],w=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,S={},b=[];for(let D=0;D<v.length;D++){const G=v[D];if(G.toId!=G.fromId){const B=G.toId==m?G.from:G.to;S[v[D].id]=B,this.hierarchical.levels[B.id]<y&&b.push(G)}}const E=(D,G)=>{let B=0;for(let Q=0;Q<G.length;Q++)if(S[G[Q].id]!==void 0){const te=this.direction.getPosition(S[G[Q].id])-D;B+=te/Math.sqrt(te*te+w)}return B},O=(D,G)=>{let B=0;for(let Q=0;Q<G.length;Q++)if(S[G[Q].id]!==void 0){const te=this.direction.getPosition(S[G[Q].id])-D;B-=w*Math.pow(te*te+w,-1.5)}return B},P=(D,G)=>{let B=this.direction.getPosition(c);const Q={};for(let te=0;te<D;te++){const le=E(B,G),U=O(B,G),fe=40,xe=Math.max(-fe,Math.min(fe,Math.round(le/U)));if(B=B-xe,Q[B]!==void 0)break;Q[B]=te}return B},_=D=>{const G=this.direction.getPosition(c);if(r[c.id]===void 0){const fe={};a(c,fe),r[c.id]=fe}const B=g(r[c.id]),Q=B[2],te=B[3],le=D-G;let U=0;le>0?U=Math.min(le,te-this.options.hierarchical.nodeSpacing):le<0&&(U=-Math.min(-le,Q-this.options.hierarchical.nodeSpacing)),U!=0&&(this._shiftBlock(c.id,U),t=!0)},T=D=>{const G=this.direction.getPosition(c),[B,Q]=this._getSpaceAroundNode(c),te=D-G;let le=G;te>0?le=Math.min(G+(Q-this.options.hierarchical.nodeSpacing),D):te<0&&(le=Math.max(G-(B-this.options.hierarchical.nodeSpacing),D)),le!==G&&(this.direction.setPosition(c,le),t=!0)};let R=P(f,b);_(R),R=P(f,v),T(R)},d=f=>{let c=this.hierarchical.getLevels();c=ws(c).call(c);for(let m=0;m<f;m++){t=!1;for(let v=0;v<c.length;v++){const y=c[v],w=this.hierarchical.distributionOrdering[y];for(let S=0;S<w.length;S++)l(1e3,w[S])}if(t!==!0)break}},u=f=>{let c=this.hierarchical.getLevels();c=ws(c).call(c);for(let m=0;m<f&&(t=!1,I(C,c,!0),t===!0);m++);},h=()=>{for(const f in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,f)&&this._centerParent(this.body.nodes[f])},p=()=>{let f=this.hierarchical.getLevels();f=ws(f).call(f);for(let c=0;c<f.length;c++){const m=f[c],v=this.hierarchical.distributionOrdering[m];for(let y=0;y<v.length;y++)this._centerParent(v[y])}};this.options.hierarchical.blockShifting===!0&&(u(5),h()),this.options.hierarchical.edgeMinimization===!0&&d(20),this.options.hierarchical.parentCentralization===!0&&p(),i()}_getSpaceAroundNode(e,t){let r=!0;t===void 0&&(r=!1);const i=this.hierarchical.levels[e.id];if(i!==void 0){const o=this.hierarchical.distributionIndex[e.id],s=this.direction.getPosition(e),a=this.hierarchical.distributionOrdering[i];let g=1e9,A=1e9;if(o!==0){const I=a[o-1];if(r===!0&&t[I.id]===void 0||r===!1){const C=this.direction.getPosition(I);g=s-C}}if(o!=a.length-1){const I=a[o+1];if(r===!0&&t[I.id]===void 0||r===!1){const C=this.direction.getPosition(I);A=Math.min(A,C-s)}}return[g,A]}else return[0,0]}_centerParent(e){if(this.hierarchical.parentReference[e.id]){const t=this.hierarchical.parentReference[e.id];for(let r=0;r<t.length;r++){const i=t[r],o=this.body.nodes[i],s=this.hierarchical.childrenReference[i];if(s!==void 0){const a=this._getCenterPosition(s),g=this.direction.getPosition(o),[A,I]=this._getSpaceAroundNode(o),C=g-a;(C<0&&Math.abs(C)<I-this.options.hierarchical.nodeSpacing||C>0&&Math.abs(C)<A-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,a)}}}}_placeNodesByHierarchy(e){this.positionedNodes={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var t;let i=It(e[r]);i=this._indexArrayToNodes(i),Es(t=this.direction).call(t,i);let o=0;for(let s=0;s<i.length;s++){const a=i[s];if(this.positionedNodes[a.id]===void 0){const g=this.options.hierarchical.nodeSpacing;let A=g*o;o>0&&(A=this.direction.getPosition(i[s-1])+g),this.direction.setPosition(a,A,r),this._validatePositionAndContinue(a,r,A),o++}}}}_placeBranchNodes(e,t){var r;const i=this.hierarchical.childrenReference[e];if(i===void 0)return;const o=[];for(let a=0;a<i.length;a++)o.push(this.body.nodes[i[a]]);Es(r=this.direction).call(r,o);for(let a=0;a<o.length;a++){const g=o[a],A=this.hierarchical.levels[g.id];if(A>t&&this.positionedNodes[g.id]===void 0){const I=this.options.hierarchical.nodeSpacing;let C;a===0?C=this.direction.getPosition(this.body.nodes[e]):C=this.direction.getPosition(o[a-1])+I,this.direction.setPosition(g,C,A),this._validatePositionAndContinue(g,A,C)}else return}const s=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],s,t)}_validatePositionAndContinue(e,t,r){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){const i=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(r-i<this.options.hierarchical.nodeSpacing){const o=i+this.options.hierarchical.nodeSpacing-r,s=this._findCommonParent(this.lastNodeOnLevel[t],e.id);this._shiftBlock(s.withChild,o)}}this.lastNodeOnLevel[t]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,t)}}_indexArrayToNodes(e){const t=[];for(let r=0;r<e.length;r++)t.push(this.body.nodes[e[r]]);return t}_getDistribution(){const e={};let t,r;for(t in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,t)){r=this.body.nodes[t];const i=this.hierarchical.levels[t]===void 0?0:this.hierarchical.levels[t];this.direction.fix(r,i),e[i]===void 0&&(e[i]={}),e[i][t]=r}return e}_getActiveEdges(e){const t=[];return ve(e.edges,r=>{var i;Ye(i=this.body.edgeIndices).call(i,r.id)!==-1&&t.push(r)}),t}_getHubSizes(){const e={},t=this.body.nodeIndices;ve(t,i=>{const o=this.body.nodes[i],s=this._getActiveEdges(o).length;e[s]=!0});const r=[];return ve(e,i=>{r.push(Number(i))}),Es(r).call(r,function(i,o){return o-i}),r}_determineLevelsByHubsize(){const e=(r,i)=>{this.hierarchical.levelDownstream(r,i)},t=this._getHubSizes();for(let r=0;r<t.length;++r){const i=t[r];if(i===0)break;ve(this.body.nodeIndices,o=>{const s=this.body.nodes[o];i===this._getActiveEdges(s).length&&this._crawlNetwork(e,o)})}}_determineLevelsCustomCallback(){const t=function(i,o,s){},r=(i,o,s)=>{let a=this.hierarchical.levels[i.id];a===void 0&&(a=this.hierarchical.levels[i.id]=1e5);const g=t(Yt.cloneOptions(i,"node"),Yt.cloneOptions(o,"node"),Yt.cloneOptions(s,"edge"));this.hierarchical.levels[o.id]=a+g};this._crawlNetwork(r),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=h6(e=this.body.nodeIndices).call(e,(r,i)=>(r.set(i,this.body.nodes[i]),r),new IT);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=OMe(t):this.hierarchical.levels=SMe(t),this.hierarchical.setMinLevelToZero()}_generateMap(){const e=(t,r)=>{this.hierarchical.levels[r.id]>this.hierarchical.levels[t.id]&&this.hierarchical.addRelation(t.id,r.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},t=arguments.length>1?arguments[1]:void 0;const r={},i=(o,s)=>{if(r[o.id]===void 0){this.hierarchical.setTreeIndex(o,s),r[o.id]=!0;let a;const g=this._getActiveEdges(o);for(let A=0;A<g.length;A++){const I=g[A];I.connected===!0&&(I.toId==o.id?a=I.from:a=I.to,o.id!=a.id&&(e(o,a,I),i(a,s)))}}};if(t===void 0){let o=0;for(let s=0;s<this.body.nodeIndices.length;s++){const a=this.body.nodeIndices[s];if(r[a]===void 0){const g=this.body.nodes[a];i(g,o),o+=1}}}else{const o=this.body.nodes[t];if(o===void 0){console.error("Node not found:",t);return}i(o)}}_shiftBlock(e,t){const r={},i=o=>{if(r[o])return;r[o]=!0,this.direction.shift(o,t);const s=this.hierarchical.childrenReference[o];if(s!==void 0)for(let a=0;a<s.length;a++)i(s[a])};i(e)}_findCommonParent(e,t){const r={},i=(s,a)=>{const g=this.hierarchical.parentReference[a];if(g!==void 0)for(let A=0;A<g.length;A++){const I=g[A];s[I]=!0,i(s,I)}},o=(s,a)=>{const g=this.hierarchical.parentReference[a];if(g!==void 0)for(let A=0;A<g.length;A++){const I=g[A];if(s[I]!==void 0)return{foundParent:I,withChild:a};const C=o(s,I);if(C.foundParent!==null)return C}return{foundParent:null,withChild:a}};return i(r,e),o(r,t)}setDirectionStrategy(){this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU"?this.direction=new cMe(this):this.direction=new fMe(this)}_getCenterPosition(e){let t=1e9,r=-1e9;for(let i=0;i<e.length;i++){let o;if(e[i].id!==void 0)o=e[i];else{const a=e[i];o=this.body.nodes[a]}const s=this.direction.getPosition(o);t=Math.min(t,s),r=Math.max(r,s)}return .5*(t+r)}}class PMe{constructor(e,t,r,i){var o,s;this.body=e,this.canvas=t,this.selectionHandler=r,this.interactionHandler=i,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},Mt(this.options,this.defaultOptions),this.body.emitter.on("destroy",()=>{this._clean()}),this.body.emitter.on("_dataChanged",z(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",z(s=this._restore).call(s,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,t,r){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=r.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=r.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,ke(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}disableEditMode(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";const r=this.selectionHandler.getSelectedNodeCount(),i=this.selectionHandler.getSelectedEdgeCount(),o=r+i,s=this.options.locales[this.options.locale];let a=!1;this.options.addNode!==!1&&(this._createAddNodeButton(s),a=!0),this.options.addEdge!==!1&&(a===!0?this._createSeperator(1):a=!0,this._createAddEdgeButton(s)),r===1&&typeof this.options.editNode=="function"?(a===!0?this._createSeperator(2):a=!0,this._createEditNodeButton(s)):i===1&&r===0&&this.options.editEdge!==!1&&(a===!0?this._createSeperator(3):a=!0,this._createEditEdgeButton(s)),o!==0&&(r>0&&this.options.deleteNode!==!1?(a===!0&&this._createSeperator(4),this._createDeleteButton(s)):r===0&&this.options.deleteEdge!==!1&&(a===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",z(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t;const r=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(r),this._createSeperator(),this._createDescription(r.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,z(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",z(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();const e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(e.isCluster!==!0){const t=ke({},e.options,!1);if(t.x=e.x,t.y=e.y,this.options.editNode.length===2)this.options.editNode(t,r=>{r!=null&&this.inMode==="editNode"&&this.body.data.nodes.getDataSet().update(r),this.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}addEdgeMode(){var e,t,r,i,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s;const a=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(a),this._createSeperator(),this._createDescription(a.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,z(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",z(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",z(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",z(r=this._dragControlNode).call(r,this)),this._temporaryBindUI("onRelease",z(i=this._finishConnect).call(i,this)),this._temporaryBindUI("onDragStart",z(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",typeof this.options.editEdge=="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){const s=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(s.from.id,s.to.id);return}if(this.guiEnabled===!0){var e;const s=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(s),this._createSeperator(),this._createDescription(s.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var t,r,i,o;const s=this.body.edges[this.edgeBeingEditedId],a=this._getNewTargetNode(s.from.x,s.from.y),g=this._getNewTargetNode(s.to.x,s.to.y);this.temporaryIds.nodes.push(a.id),this.temporaryIds.nodes.push(g.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this.body.nodes[g.id]=g,this.body.nodeIndices.push(g.id),this._temporaryBindUI("onTouch",z(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",z(r=this._controlNodeDragStart).call(r,this)),this._temporaryBindUI("onDrag",z(i=this._controlNodeDrag).call(i,this)),this._temporaryBindUI("onDragEnd",z(o=this._controlNodeDragEnd).call(o,this)),this._temporaryBindUI("onMouseMove",()=>{}),this._temporaryBindEvent("beforeDrawing",A=>{const I=s.edgeType.findBorderPositions(A);a.selected===!1&&(a.x=I.from.x,a.y=I.from.y),g.selected===!1&&(g.x=I.to.x,g.y=I.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";const e=this.selectionHandler.getSelectedNodeIds(),t=this.selectionHandler.getSelectedEdgeIds();let r;if(e.length>0){for(let i=0;i<e.length;i++)if(this.body.nodes[e[i]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode=="function"&&(r=this.options.deleteNode)}else t.length>0&&typeof this.options.deleteEdge=="function"&&(r=this.options.deleteEdge);if(typeof r=="function"){const i={nodes:e,edges:t};if(r.length===2)r(i,o=>{o!=null&&this.inMode==="delete"?(this.body.data.edges.getDataSet().remove(o.edges),this.body.data.nodes.getDataSet().remove(o.nodes),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()):(this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(t),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}_getNewTargetNode(e,t){const r=ke({},this.options.controlNodeStyle);r.id="targetNode"+vg(),r.hidden=!1,r.physics=!1,r.x=e,r.y=t;const i=this.body.functions.createNode(r);return i.shape.boundingBox={left:e,right:e,top:t,bottom:t},i}_createEditButton(){var e;this._clean(),this.manipulationDOM={},Vi(this.editModeDiv);const t=this.options.locales[this.options.locale],r=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(r),this._bindElementEvents(r,z(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(Vi(this.editModeDiv),Vi(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of an(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),Vi(this.manipulationDiv),Vi(this.editModeDiv),Vi(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}_createSeperator(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}_createAddNodeButton(e){var t;const r=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,z(t=this.addNodeMode).call(t,this))}_createAddEdgeButton(e){var t;const r=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,z(t=this.addEdgeMode).call(t,this))}_createEditNodeButton(e){var t;const r=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,z(t=this.editNode).call(t,this))}_createEditEdgeButton(e){var t;const r=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,z(t=this.editEdgeMode).call(t,this))}_createDeleteButton(e){var t;let r;this.options.rtl?r="vis-delete-rtl":r="vis-delete";const i=this._createButton("delete",r,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.deleteSelected).call(t,this))}_createBackButton(e){var t;const r=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,z(t=this.showManipulatorToolbar).call(t,this))}_createButton(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=i,this.manipulationDOM[e+"Label"].innerText=r,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}_temporaryBindUI(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+g6(It(this.body.eventListeners)))}_unbindTemporaryUIs(){for(const e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e<this.temporaryEventFunctions.length;e++){const t=this.temporaryEventFunctions[e].event,r=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,r)}this.temporaryEventFunctions=[]}_bindElementEvents(e,t){const r=new ms(e,{});IC(r,t),this._domEventListenerCleanupQueue.push(()=>{r.destroy()});const i=o=>{let{keyCode:s,key:a}=o;(a==="Enter"||a===" "||s===13||s===32)&&t()};e.addEventListener("keyup",i,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener("keyup",i,!1)})}_cleanupTemporaryNodesAndEdges(){for(let o=0;o<this.temporaryIds.edges.length;o++){var e;this.body.edges[this.temporaryIds.edges[o]].disconnect(),delete this.body.edges[this.temporaryIds.edges[o]];const s=Ye(e=this.body.edgeIndices).call(e,this.temporaryIds.edges[o]);if(s!==-1){var t;an(t=this.body.edgeIndices).call(t,s,1)}}for(let o=0;o<this.temporaryIds.nodes.length;o++){var r;delete this.body.nodes[this.temporaryIds.nodes[o]];const s=Ye(r=this.body.nodeIndices).call(r,this.temporaryIds.nodes[o]);if(s!==-1){var i;an(i=this.body.nodeIndices).call(i,s,1)}}this.temporaryIds={nodes:[],edges:[]}}_controlNodeTouch(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Mt({},this.body.view.translation)}_controlNodeDragStart(){const e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),r=this.body.nodes[this.temporaryIds.nodes[0]],i=this.body.nodes[this.temporaryIds.nodes[1]],o=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;const s=r.isOverlappingWith(t),a=i.isOverlappingWith(t);s===!0?(this.selectedControlNode=r,o.edgeType.from=r):a===!0&&(this.selectedControlNode=i,o.edgeType.to=i),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}_controlNodeDrag(e){this.body.emitter.emit("disablePhysics");const t=this.body.functions.getPointer(e.center),r=this.canvas.DOMtoCanvas(t);this.selectedControlNode!==void 0?(this.selectedControlNode.x=r.x,this.selectedControlNode.y=r.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}_controlNodeDragEnd(e){const t=this.body.functions.getPointer(e.center),r=this.selectionHandler._pointerToPositionObject(t),i=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode===void 0)return;this.selectionHandler.unselectAll();const o=this.selectionHandler._getAllNodesOverlappingWith(r);let s;for(let a=o.length-1;a>=0;a--)if(o[a]!==this.selectedControlNode.id){s=this.body.nodes[o[a]];break}if(s!==void 0&&this.selectedControlNode!==void 0)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,i.to.id):this._performEditEdge(i.from.id,s.id)}else i.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Mt({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;const t=this.lastTouch,r=this.selectionHandler.getNodeAt(t);if(r!==void 0)if(r.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const i=this._getNewTargetNode(r.x,r.y);this.body.nodes[i.id]=i,this.body.nodeIndices.push(i.id);const o=this.body.functions.createEdge({id:"connectionEdge"+vg(),from:r.id,to:i.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(i.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){const t=this.body.functions.getPointer(e.center),r=this.selectionHandler._pointerToPositionObject(t);let i;this.temporaryIds.edges[0]!==void 0&&(i=this.body.edges[this.temporaryIds.edges[0]].fromId);const o=this.selectionHandler._getAllNodesOverlappingWith(r);let s;for(let g=o.length-1;g>=0;g--){var a;if(Ye(a=this.temporaryIds.nodes).call(a,o[g])===-1){s=this.body.nodes[o[g]];break}}if(e.controlEdge={from:i,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){const g=this.body.nodes[this.temporaryIds.nodes[0]];g.x=this.canvas._XconvertDOMtoCanvas(t.x),g.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}_finishConnect(e){const t=this.body.functions.getPointer(e.center),r=this.selectionHandler._pointerToPositionObject(t);let i;this.temporaryIds.edges[0]!==void 0&&(i=this.body.edges[this.temporaryIds.edges[0]].fromId);const o=this.selectionHandler._getAllNodesOverlappingWith(r);let s;for(let g=o.length-1;g>=0;g--){var a;if(Ye(a=this.temporaryIds.nodes).call(a,o[g])===-1){s=this.body.nodes[o[g]];break}}this._cleanupTemporaryNodesAndEdges(),s!==void 0&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[i]!==void 0&&this.body.nodes[s.id]!==void 0&&this._performAddEdge(i,s.id)),e.controlEdge={from:i,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}_dragStartEdge(e){const t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}_performAddNode(e){const t={id:vg(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(t,r=>{r!=null&&this.inMode==="addNode"&&this.body.data.nodes.getDataSet().add(r),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(t),this.showManipulatorToolbar()}_performAddEdge(e,t){const r={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(r,i=>{i!=null&&this.inMode==="addEdge"&&(this.body.data.edges.getDataSet().add(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(r),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,t){const r={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label};let i=this.options.editEdge;if(typeof i=="object"&&(i=i.editWithoutDrag),typeof i=="function")if(i.length===2)i(r,o=>{o==null||this.inMode!=="editEdge"?(this.body.edges[r.id].updateEdgeType(),this.body.emitter.emit("_redraw"),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(r),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}const L="string",F="boolean",$="number",rg="array",ee="object",v6="dom",RMe="any",Hw=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Uw={borderWidth:{number:$},borderWidthSelected:{number:$,undefined:"undefined"},brokenImage:{string:L,undefined:"undefined"},chosen:{label:{boolean:F,function:"function"},node:{boolean:F,function:"function"},__type__:{object:ee,boolean:F}},color:{border:{string:L},background:{string:L},highlight:{border:{string:L},background:{string:L},__type__:{object:ee,string:L}},hover:{border:{string:L},background:{string:L},__type__:{object:ee,string:L}},__type__:{object:ee,string:L}},opacity:{number:$,undefined:"undefined"},fixed:{x:{boolean:F},y:{boolean:F},__type__:{object:ee,boolean:F}},font:{align:{string:L},color:{string:L},size:{number:$},face:{string:L},background:{string:L},strokeWidth:{number:$},strokeColor:{string:L},vadjust:{number:$},multi:{boolean:F,string:L},bold:{color:{string:L},size:{number:$},face:{string:L},mod:{string:L},vadjust:{number:$},__type__:{object:ee,string:L}},boldital:{color:{string:L},size:{number:$},face:{string:L},mod:{string:L},vadjust:{number:$},__type__:{object:ee,string:L}},ital:{color:{string:L},size:{number:$},face:{string:L},mod:{string:L},vadjust:{number:$},__type__:{object:ee,string:L}},mono:{color:{string:L},size:{number:$},face:{string:L},mod:{string:L},vadjust:{number:$},__type__:{object:ee,string:L}},__type__:{object:ee,string:L}},group:{string:L,number:$,undefined:"undefined"},heightConstraint:{minimum:{number:$},valign:{string:L},__type__:{object:ee,boolean:F,number:$}},hidden:{boolean:F},icon:{face:{string:L},code:{string:L},size:{number:$},color:{string:L},weight:{string:L,number:$},__type__:{object:ee}},id:{string:L,number:$},image:{selected:{string:L,undefined:"undefined"},unselected:{string:L,undefined:"undefined"},__type__:{object:ee,string:L}},imagePadding:{top:{number:$},right:{number:$},bottom:{number:$},left:{number:$},__type__:{object:ee,number:$}},label:{string:L,undefined:"undefined"},labelHighlightBold:{boolean:F},level:{number:$,undefined:"undefined"},margin:{top:{number:$},right:{number:$},bottom:{number:$},left:{number:$},__type__:{object:ee,number:$}},mass:{number:$},physics:{boolean:F},scaling:{min:{number:$},max:{number:$},label:{enabled:{boolean:F},min:{number:$},max:{number:$},maxVisible:{number:$},drawThreshold:{number:$},__type__:{object:ee,boolean:F}},customScalingFunction:{function:"function"},__type__:{object:ee}},shadow:{enabled:{boolean:F},color:{string:L},size:{number:$},x:{number:$},y:{number:$},__type__:{object:ee,boolean:F}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:F,array:rg},borderRadius:{number:$},interpolation:{boolean:F},useImageSize:{boolean:F},useBorderWithImage:{boolean:F},coordinateOrigin:{string:["center","top-left"]},__type__:{object:ee}},size:{number:$},title:{string:L,dom:v6,undefined:"undefined"},value:{number:$,undefined:"undefined"},widthConstraint:{minimum:{number:$},maximum:{number:$},__type__:{object:ee,boolean:F,number:$}},x:{number:$},y:{number:$},__type__:{object:ee}},xMe={configure:{enabled:{boolean:F},filter:{boolean:F,string:L,array:rg,function:"function"},container:{dom:v6},showButton:{boolean:F},__type__:{object:ee,boolean:F,string:L,array:rg,function:"function"}},edges:{arrows:{to:{enabled:{boolean:F},scaleFactor:{number:$},type:{string:Hw},imageHeight:{number:$},imageWidth:{number:$},src:{string:L},__type__:{object:ee,boolean:F}},middle:{enabled:{boolean:F},scaleFactor:{number:$},type:{string:Hw},imageWidth:{number:$},imageHeight:{number:$},src:{string:L},__type__:{object:ee,boolean:F}},from:{enabled:{boolean:F},scaleFactor:{number:$},type:{string:Hw},imageWidth:{number:$},imageHeight:{number:$},src:{string:L},__type__:{object:ee,boolean:F}},__type__:{string:["from","to","middle"],object:ee}},endPointOffset:{from:{number:$},to:{number:$},__type__:{object:ee,number:$}},arrowStrikethrough:{boolean:F},background:{enabled:{boolean:F},color:{string:L},size:{number:$},dashes:{boolean:F,array:rg},__type__:{object:ee,boolean:F}},chosen:{label:{boolean:F,function:"function"},edge:{boolean:F,function:"function"},__type__:{object:ee,boolean:F}},color:{color:{string:L},highlight:{string:L},hover:{string:L},inherit:{string:["from","to","both"],boolean:F},opacity:{number:$},__type__:{object:ee,string:L}},dashes:{boolean:F,array:rg},font:{color:{string:L},size:{number:$},face:{string:L},background:{string:L},strokeWidth:{number:$},strokeColor:{string:L},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:$},multi:{boolean:F,string:L},bold:{color:{string:L},size:{number:$},face:{string:L},mod:{string:L},vadjust:{number:$},__type__:{object:ee,string:L}},boldital:{color:{string:L},size:{number:$},face:{string:L},mod:{string:L},vadjust:{number:$},__type__:{object:ee,string:L}},ital:{color:{string:L},size:{number:$},face:{string:L},mod:{string:L},vadjust:{number:$},__type__:{object:ee,string:L}},mono:{color:{string:L},size:{number:$},face:{string:L},mod:{string:L},vadjust:{number:$},__type__:{object:ee,string:L}},__type__:{object:ee,string:L}},hidden:{boolean:F},hoverWidth:{function:"function",number:$},label:{string:L,undefined:"undefined"},labelHighlightBold:{boolean:F},length:{number:$,undefined:"undefined"},physics:{boolean:F},scaling:{min:{number:$},max:{number:$},label:{enabled:{boolean:F},min:{number:$},max:{number:$},maxVisible:{number:$},drawThreshold:{number:$},__type__:{object:ee,boolean:F}},customScalingFunction:{function:"function"},__type__:{object:ee}},selectionWidth:{function:"function",number:$},selfReferenceSize:{number:$},selfReference:{size:{number:$},angle:{number:$},renderBehindTheNode:{boolean:F},__type__:{object:ee}},shadow:{enabled:{boolean:F},color:{string:L},size:{number:$},x:{number:$},y:{number:$},__type__:{object:ee,boolean:F}},smooth:{enabled:{boolean:F},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:$},forceDirection:{string:["horizontal","vertical","none"],boolean:F},__type__:{object:ee,boolean:F}},title:{string:L,undefined:"undefined"},width:{number:$},widthConstraint:{maximum:{number:$},__type__:{object:ee,boolean:F,number:$}},value:{number:$,undefined:"undefined"},__type__:{object:ee}},groups:{useDefaultGroups:{boolean:F},__any__:Uw,__type__:{object:ee}},interaction:{dragNodes:{boolean:F},dragView:{boolean:F},hideEdgesOnDrag:{boolean:F},hideEdgesOnZoom:{boolean:F},hideNodesOnDrag:{boolean:F},hover:{boolean:F},keyboard:{enabled:{boolean:F},speed:{x:{number:$},y:{number:$},zoom:{number:$},__type__:{object:ee}},bindToWindow:{boolean:F},autoFocus:{boolean:F},__type__:{object:ee,boolean:F}},multiselect:{boolean:F},navigationButtons:{boolean:F},selectable:{boolean:F},selectConnectedEdges:{boolean:F},hoverConnectedEdges:{boolean:F},tooltipDelay:{number:$},zoomView:{boolean:F},zoomSpeed:{number:$},__type__:{object:ee}},layout:{randomSeed:{undefined:"undefined",number:$,string:L},improvedLayout:{boolean:F},clusterThreshold:{number:$},hierarchical:{enabled:{boolean:F},levelSeparation:{number:$},nodeSpacing:{number:$},treeSpacing:{number:$},blockShifting:{boolean:F},edgeMinimization:{boolean:F},parentCentralization:{boolean:F},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:ee,boolean:F}},__type__:{object:ee}},manipulation:{enabled:{boolean:F},initiallyActive:{boolean:F},addNode:{boolean:F,function:"function"},addEdge:{boolean:F,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:ee,boolean:F,function:"function"}},deleteNode:{boolean:F,function:"function"},deleteEdge:{boolean:F,function:"function"},controlNodeStyle:Uw,__type__:{object:ee,boolean:F}},nodes:Uw,physics:{enabled:{boolean:F},barnesHut:{theta:{number:$},gravitationalConstant:{number:$},centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},damping:{number:$},avoidOverlap:{number:$},__type__:{object:ee}},forceAtlas2Based:{theta:{number:$},gravitationalConstant:{number:$},centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},damping:{number:$},avoidOverlap:{number:$},__type__:{object:ee}},repulsion:{centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},nodeDistance:{number:$},damping:{number:$},__type__:{object:ee}},hierarchicalRepulsion:{centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},nodeDistance:{number:$},damping:{number:$},avoidOverlap:{number:$},__type__:{object:ee}},maxVelocity:{number:$},minVelocity:{number:$},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:F},iterations:{number:$},updateInterval:{number:$},onlyDynamicEdges:{boolean:F},fit:{boolean:F},__type__:{object:ee,boolean:F}},timestep:{number:$},adaptiveTimestep:{boolean:F},wind:{x:{number:$},y:{number:$},__type__:{object:ee}},__type__:{object:ee,boolean:F}},autoResize:{boolean:F},clickToUse:{boolean:F},locale:{string:L},locales:{__any__:{any:RMe},__type__:{object:ee}},height:{string:L},width:{string:L},__type__:{object:ee}},m6={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},$Me=(n,e,t)=>{var r;return!!(fg(n).call(n,"physics")&&fg(r=m6.physics.solver).call(r,e)&&t.physics.solver!==e&&e!=="wind")};class DMe{constructor(){}getDistances(e,t,r){const i={},o=e.edges;for(let a=0;a<t.length;a++){const g=t[a],A={};i[g]=A;for(let I=0;I<t.length;I++)A[t[I]]=a==I?0:1e9}for(let a=0;a<r.length;a++){const g=o[r[a]];g.connected===!0&&i[g.fromId]!==void 0&&i[g.toId]!==void 0&&(i[g.fromId][g.toId]=1,i[g.toId][g.fromId]=1)}const s=t.length;for(let a=0;a<s;a++){const g=t[a],A=i[g];for(let I=0;I<s-1;I++){const C=t[I],l=i[C];for(let d=I+1;d<s;d++){const u=t[d],h=i[u],p=Math.min(l[u],l[g]+A[u]);l[u]=p,h[C]=p}}}return i}}class NMe{constructor(e,t,r){this.body=e,this.springLength=t,this.springConstant=r,this.distanceSolver=new DMe}setOptions(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}solve(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const i=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(i),this._createK_matrix(i),this._createE_matrix();const o=.01,s=1;let a=0;const g=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),A=5;let I=1e9,C=0,l=0,d=0,u=0,h=0;for(;I>o&&a<g;)for(a+=1,[C,I,l,d]=this._getHighestEnergyNode(r),u=I,h=0;u>s&&h<A;)h+=1,this._moveNode(C,l,d),[u,l,d]=this._getEnergy(C)}_getHighestEnergyNode(e){const t=this.body.nodeIndices,r=this.body.nodes;let i=0,o=t[0],s=0,a=0;for(let g=0;g<t.length;g++){const A=t[g];if(r[A].predefinedPosition!==!0||r[A].isCluster===!0&&e===!0||r[A].options.fixed.x!==!0||r[A].options.fixed.y!==!0){const[I,C,l]=this._getEnergy(A);i<I&&(i=I,o=A,s=C,a=l)}}return[o,i,s,a]}_getEnergy(e){const[t,r]=this.E_sums[e];return[Math.sqrt(t**2+r**2),t,r]}_moveNode(e,t,r){const i=this.body.nodeIndices,o=this.body.nodes;let s=0,a=0,g=0;const A=o[e].x,I=o[e].y,C=this.K_matrix[e],l=this.L_matrix[e];for(let v=0;v<i.length;v++){const y=i[v];if(y!==e){const w=o[y].x,S=o[y].y,b=C[y],E=l[y],O=1/((A-w)**2+(I-S)**2)**1.5;s+=b*(1-E*(I-S)**2*O),a+=b*(E*(A-w)*(I-S)*O),g+=b*(1-E*(A-w)**2*O)}}const d=s,u=a,h=t,p=g,f=r,c=(h/d+f/u)/(u/d-p/u),m=-(u*c+h)/d;o[e].x+=m,o[e].y+=c,this._updateE_matrix(e)}_createL_matrix(e){const t=this.body.nodeIndices,r=this.springLength;this.L_matrix=[];for(let i=0;i<t.length;i++){this.L_matrix[t[i]]={};for(let o=0;o<t.length;o++)this.L_matrix[t[i]][t[o]]=r*e[t[i]][t[o]]}}_createK_matrix(e){const t=this.body.nodeIndices,r=this.springConstant;this.K_matrix=[];for(let i=0;i<t.length;i++){this.K_matrix[t[i]]={};for(let o=0;o<t.length;o++)this.K_matrix[t[i]][t[o]]=r*e[t[i]][t[o]]**-2}}_createE_matrix(){const e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(let r=0;r<e.length;r++)this.E_matrix[e[r]]=[];for(let r=0;r<e.length;r++){const i=e[r],o=t[i].x,s=t[i].y;let a=0,g=0;for(let A=r;A<e.length;A++){const I=e[A];if(I!==i){const C=t[I].x,l=t[I].y,d=1/Math.sqrt((o-C)**2+(s-l)**2);this.E_matrix[i][A]=[this.K_matrix[i][I]*(o-C-this.L_matrix[i][I]*(o-C)*d),this.K_matrix[i][I]*(s-l-this.L_matrix[i][I]*(s-l)*d)],this.E_matrix[I][r]=this.E_matrix[i][A],a+=this.E_matrix[i][A][0],g+=this.E_matrix[i][A][1]}}this.E_sums[i]=[a,g]}}_updateE_matrix(e){const t=this.body.nodeIndices,r=this.body.nodes,i=this.E_matrix[e],o=this.K_matrix[e],s=this.L_matrix[e],a=r[e].x,g=r[e].y;let A=0,I=0;for(let C=0;C<t.length;C++){const l=t[C];if(l!==e){const d=i[C],u=d[0],h=d[1],p=r[l].x,f=r[l].y,c=1/Math.sqrt((a-p)**2+(g-f)**2),m=o[l]*(a-p-s[l]*(a-p)*c),v=o[l]*(g-f-s[l]*(g-f)*c);i[C]=[m,v],A+=m,I+=v;const y=this.E_sums[l];y[0]+=m-u,y[1]+=v-h}}this.E_sums[e]=[A,I]}}function K(n,e,t){var r,i,o,s;if(!(this instanceof K))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:cRe,clickToUse:!1},Mt(this.options,this.defaultOptions),this.body={container:n,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:z(r=this.on).call(r,this),off:z(i=this.off).call(i,this),emit:z(o=this.emit).call(o,this),once:z(s=this.once).call(s,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}},selectionBox:{show:!1,position:{start:{x:0,y:0},end:{x:0,y:0}}}},this.bindEventListeners(),this.images=new SRe(()=>this.body.emitter.emit("_requestRedraw")),this.groups=new YRe,this.canvas=new ANe(this.body),this.selectionHandler=new WNe(this.body,this.canvas),this.interactionHandler=new dNe(this.body,this.canvas,this.selectionHandler),this.view=new CNe(this.body,this.canvas),this.renderer=new nNe(this.body,this.canvas),this.physics=new V2e(this.body),this.layoutEngine=new _Me(this.body),this.clustering=new iNe(this.body),this.manipulation=new PMe(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new s2e(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new N2e(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new NMe(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}X8(K.prototype);K.prototype.setOptions=function(n){if(n===null&&(n=void 0),n!==void 0){if(X_e.validate(n,xMe)===!0&&console.error("%cErrors have been found in the supplied options object.",O9),xa(["locale","locales","clickToUse"],this.options,n),n.locale!==void 0&&(n.locale=wRe(n.locales||this.options.locales,n.locale)),n=this.layoutEngine.setOptions(n.layout,n),this.canvas.setOptions(n),this.groups.setOptions(n.groups),this.nodesHandler.setOptions(n.nodes),this.edgesHandler.setOptions(n.edges),this.physics.setOptions(n.physics),this.manipulation.setOptions(n.manipulation,n,this.options),this.interactionHandler.setOptions(n.interaction),this.renderer.setOptions(n.interaction),this.selectionHandler.setOptions(n.interaction),n.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in n&&(this.configurator||(this.configurator=new Y_e(this,this.body.container,m6,this.canvas.pixelRatio,$Me)),this.configurator.setOptions(n.configure)),this.configurator&&this.configurator.options.enabled===!0){const r={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};ke(r.nodes,this.nodesHandler.options),ke(r.edges,this.edgesHandler.options),ke(r.layout,this.layoutEngine.options),ke(r.interaction,this.selectionHandler.options),ke(r.interaction,this.renderer.options),ke(r.interaction,this.interactionHandler.options),ke(r.manipulation,this.manipulation.options),ke(r.physics,this.physics.options),ke(r.global,this.canvas.options),ke(r.global,this.options),this.configurator.setModuleOptions(r)}n.clickToUse!==void 0?n.clickToUse===!0?this.activator===void 0&&(this.activator=new U_e(this.canvas.frame),this.activator.on("change",()=>{this.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};K.prototype._updateVisibleIndices=function(){const n=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&!this.clustering._isClusteredNode(t)&&n[t].options.hidden===!1&&this.body.nodeIndices.push(n[t].id);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t],i=n[r.fromId],o=n[r.toId],s=i!==void 0&&o!==void 0;!this.clustering._isClusteredEdge(t)&&r.options.hidden===!1&&s&&i.options.hidden===!1&&o.options.hidden===!1&&this.body.edgeIndices.push(r.id)}};K.prototype.bindEventListeners=function(){this.body.emitter.on("_dataChanged",()=>{this.edgesHandler._updateState(),this.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit("startSimulation"),this.body.emitter.emit("_requestRedraw")})};K.prototype.setData=function(n){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),n&&n.dot&&(n.nodes||n.edges))throw new SyntaxError('Data must contain either parameter "dot" or  parameter pair "nodes" and "edges", but not both.');if(this.setOptions(n&&n.options),n&&n.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");const e=XPe(n.dot);this.setData(e);return}else if(n&&n.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");const e=nRe(n.gephi);this.setData(e);return}else this.nodesHandler.setData(n&&n.nodes,!0),this.edgesHandler.setData(n&&n.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};K.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(const n in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,n)&&delete this.body.nodes[n];for(const n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&delete this.body.edges[n];Vi(this.body.container)};K.prototype._updateValueRange=function(n){let e,t,r,i=0;for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){const o=n[e].getValue();o!==void 0&&(t=t===void 0?o:Math.min(o,t),r=r===void 0?o:Math.max(o,r),i+=o)}if(t!==void 0&&r!==void 0)for(e in n)Object.prototype.hasOwnProperty.call(n,e)&&n[e].setValueRange(t,r,i)};K.prototype.isActive=function(){return!this.activator||this.activator.active};K.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};K.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};K.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};K.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};K.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};K.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};K.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};K.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};K.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};K.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};K.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};K.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};K.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};K.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};K.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};K.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};K.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};K.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};K.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};K.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};K.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};K.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};K.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};K.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};K.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};K.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};K.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};K.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};K.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};K.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};K.prototype.getConnectedNodes=function(n){return this.body.nodes[n]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};K.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};K.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};K.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};K.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};K.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};K.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};K.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};K.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};K.prototype.getNodeAt=function(){const n=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return n!==void 0&&n.id!==void 0?n.id:n};K.prototype.getEdgeAt=function(){const n=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return n!==void 0&&n.id!==void 0?n.id:n};K.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};K.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};K.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};K.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};K.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};K.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};K.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};K.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};K.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};K.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};K.prototype.getOptionsFromConfigurator=function(){let n={};return this.configurator&&(n=this.configurator.getOptions.apply(this.configurator)),n};const MMe={flex:"~ col",relative:"","h-full":"","of-hidden":"","panel-grids":"",class:"graph-body"},kMe={class:"relative flex-1"},FMe={key:0,class:"absolute inset-0 flex select-none items-center justify-center bg-base text-base"},mFe=CC({__name:"graph",setup(n){async function e(){const g=await WA.value.getRoot().then(A=>A);WA.value.getGraphModules().then(A=>{yoe(A,g)})}function t(){e()}M6(()=>{e(),WA.functions.on("graphModuleUpdated",t)});const r=jn(),i=lH(),o=jn(!1);function s(){const g=r.value,A=i.value=new K(g,{nodes:Rs,edges:xs},uk.value);NI(uk,I=>{A.setOptions(I)},{immediate:!0}),A.on("selectNode",I=>{Eoe(I.nodes[0]),lE(!0)}),A.on("startStabilizing",()=>{Yw.value.reduceMotion&&(o.value=!0)}),A.on("stabilized",()=>{o.value=!1}),A.on("deselectNode",()=>{lE(!1)}),NI(()=>Ds.value,I=>{I&&A.moveTo({position:{x:0,y:0}})})}k6(()=>{s()}),F6(()=>{poe(),i.value?.destroy(),WA.functions.off("graphModuleUpdated",t)});const a=jn();return(g,A)=>{const I=qoe,C=Foe,l=koe;return nr(),pr("div",MMe,[As(I,{ref_key:"navbarRef",ref:a},null,512),nt("div",kMe,[nt("div",{ref_key:"container",ref:r,class:"absolute inset-0"},null,512),_e(o)?(nr(),pr("div",FMe,A[0]||(A[0]=[nt("div",{class:"flex items-center space-x-2"},[nt("span",null,"Stabilizing...")],-1)]))):nS("",!0),As(C),As(l,{top:_e(a)},null,8,["top"])])])}}});export{mFe as default};
