-
Notifications
You must be signed in to change notification settings - Fork 45
/
index.html
72 lines (64 loc) · 778 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>8-Puzzle Solver</title>
<meta name="description" content="8 puzzle solver and tree visualizer. Supports breadth-first,
uniform-cost, depth-first, iterative-deepening, greedy-best and A* search algorithms.">
<meta name="author" content="Deniz Gurkaynak">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="./favicon.png" />
<style>.vis .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}.vis [class*=span]{min-height:0;width:auto}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:#fff;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:#fff}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:700}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 #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{position:relative;top:-5px;width:60px;padding:1px;margin:0;pointer-events:none}input.vis-configuration.vis-config-range{-webkit-appearance:none;border:0 solid #fff;background-color:rgba(0,0,0,0);width:300px;height:20px}input.vis-configuration.vis-config-range::-webkit-slider-runnable-track{width:300px;height:5px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);border:1px solid #999;box-shadow:#aaa 0 0 3px 0;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;background:-moz-linear-gradient(top,#3876c2 0,#385380 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3876c2),color-stop(100%,#385380));background:-webkit-linear-gradient(top,#3876c2 0,#385380 100%);background:-o-linear-gradient(top,#3876c2 0,#385380 100%);background:-ms-linear-gradient(top,#3876c2 0,#385380 100%);background:linear-gradient(to bottom,#3876c2 0,#385380 100%);box-shadow:#111927 0 0 1px 0;margin-top:-7px}input.vis-configuration.vis-config-range:focus{outline:0}input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track{background:#9d9d9d;background:-moz-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#9d9d9d),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-o-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:linear-gradient(to bottom,#9d9d9d 0,#c8c8c8 99%)}input.vis-configuration.vis-config-range::-moz-range-track{width:300px;height:10px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-configuration.vis-config-range::-moz-range-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:#fff solid 1px;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:0 0;border-color:transparent;border-width:6px 0;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,.85);border:2px solid #f2faff;line-height:30px;height:30px;width:150px;text-align:center;color:#fff;font-size:14px;border-radius:4px;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;transition:opacity .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,.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}div.vis-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;color:#000;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,.2);pointer-events:none;z-index:5}div.vis-color-picker{position:absolute;top:0;left:30px;margin-top:-140px;margin-left:30px;width:310px;height:444px;z-index:1;padding:10px;border-radius:15px;background-color:#fff;display:none;box-shadow:rgba(0,0,0,.5) 0 0 10px 0}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:#fff;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 #fff;background:#4c4c4c;background:-moz-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4c4c4c),color-stop(12%,#595959),color-stop(25%,#666),color-stop(39%,#474747),color-stop(50%,#2c2c2c),color-stop(51%,#000),color-stop(60%,#111),color-stop(76%,#2b2b2b),color-stop(91%,#1c1c1c),color-stop(100%,#131313));background:-webkit-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-o-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-ms-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:linear-gradient(to bottom,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%)}div.vis-color-picker div.vis-initial-color,div.vis-color-picker div.vis-new-color{width:140px;height:20px;top:380px;font-size:10px;color:rgba(0,0,0,.4);line-height:20px;vertical-align:middle;position:absolute}div.vis-color-picker div.vis-new-color{border:1px solid rgba(0,0,0,.1);border-radius:5px;left:159px;text-align:right;padding-right:2px}div.vis-color-picker div.vis-initial-color{border:1px solid rgba(0,0,0,.1);border-radius:5px;left:10px;text-align:left;padding-left:2px}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{left:5px}div.vis-color-picker div.vis-button.vis-load{left:82px}div.vis-color-picker div.vis-button.vis-apply{left:159px}div.vis-color-picker div.vis-button.vis-save{left:236px}div.vis-color-picker input.vis-range{width:290px;height:20px}div.vis-network div.vis-manipulation{box-sizing:content-box;border-width:0;border-bottom:1px;border-style:solid;border-color:#d6d9d8;background:#fff;background:-moz-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(48%,#fcfcfc),color-stop(50%,#fafafa),color-stop(100%,#fcfcfc));background:-webkit-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-o-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-ms-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:linear-gradient(to bottom,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);padding-top:4px;position:absolute;left:0;top:0;width:100%;height:28px}div.vis-network div.vis-edit-mode{position:absolute;left:0;top:5px;height:30px}div.vis-network div.vis-close{position:absolute;right:0;top:0;width:30px;height:30px;background-position:20px 3px;background-repeat:no-repeat;background-image:url(img/network/cross.png);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-close:hover{opacity:.6}div.vis-network div.vis-edit-mode div.vis-button,div.vis-network div.vis-manipulation div.vis-button{float:left;font-family:verdana;font-size:12px;-moz-border-radius:15px;border-radius:15px;display:inline-block;background-position:0 0;background-repeat:no-repeat;height:24px;margin-left:10px;cursor:pointer;padding:0 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 div.vis-button:hover{box-shadow:1px 1px 8px rgba(0,0,0,.2)}div.vis-network div.vis-manipulation div.vis-button:active{box-shadow:1px 1px 8px rgba(0,0,0,.5)}div.vis-network div.vis-manipulation div.vis-button.vis-back{background-image:url(img/network/backIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-none:hover{box-shadow:1px 1px 8px transparent;cursor:default}div.vis-network div.vis-manipulation div.vis-button.vis-none:active{box-shadow:1px 1px 8px transparent}div.vis-network div.vis-manipulation div.vis-button.vis-none{padding:0}div.vis-network div.vis-manipulation div.notification{margin:2px;font-weight:700}div.vis-network div.vis-manipulation div.vis-button.vis-add{background-image:url(img/network/addNodeIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit,div.vis-network div.vis-manipulation div.vis-button.vis-edit{background-image:url(img/network/editIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode{background-color:#fcfcfc;border:1px solid #ccc}div.vis-network div.vis-manipulation div.vis-button.vis-connect{background-image:url(img/network/connectIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-delete{background-image:url(img/network/deleteIcon.png)}div.vis-network div.vis-edit-mode div.vis-label,div.vis-network div.vis-manipulation 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:0 7px 0 15px}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,.3)}div.vis-network div.vis-navigation div.vis-button:active{box-shadow:0 0 1px 3px rgba(56,207,21,.95)}div.vis-network div.vis-navigation div.vis-button.vis-up{background-image:url(img/network/upArrow.png);bottom:50px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-down{background-image:url(img/network/downArrow.png);bottom:10px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-left{background-image:url(img/network/leftArrow.png);bottom:10px;left:15px}div.vis-network div.vis-navigation div.vis-button.vis-right{background-image:url(img/network/rightArrow.png);bottom:10px;left:95px}div.vis-network div.vis-navigation div.vis-button.vis-zoomIn{background-image:url(img/network/plus.png);bottom:10px;right:15px}div.vis-network div.vis-navigation div.vis-button.vis-zoomOut{background-image:url(img/network/minus.png);bottom:10px;right:55px}div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends{background-image:url(img/network/zoomExtends.png);bottom:50px;right:15px}.vis-current-time{background-color:#ff7f6e;width:2px;z-index:1;pointer-events:none}.vis-rolling-mode-btn{height:40px;width:40px;position:absolute;top:7px;right:20px;border-radius:50%;font-size:28px;cursor:pointer;opacity:.8;color:#fff;font-weight:700;text-align:center;background:#3876c2}.vis-rolling-mode-btn:before{content:"\26F6"}.vis-rolling-mode-btn:hover{opacity:1}.vis-custom-time{background-color:#6e94ff;width:2px;cursor:move;z-index:1}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal{position:absolute;width:100%;height:0;border-bottom:1px solid}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor{border-color:#e5e5e5}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major{border-color:#bfbfbf}.vis-data-axis .vis-y-axis.vis-major{width:100%;position:absolute;color:#4d4d4d;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-major.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-minor{position:absolute;width:100%;color:#bebebe;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-minor.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title{position:absolute;color:#4d4d4d;white-space:nowrap;bottom:20px;text-align:center}.vis-data-axis .vis-y-axis.vis-title.vis-measure{padding:0;margin:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title.vis-left{bottom:0;-webkit-transform-origin:left top;-moz-transform-origin:left top;-ms-transform-origin:left top;-o-transform-origin:left top;transform-origin:left bottom;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.vis-data-axis .vis-y-axis.vis-title.vis-right{bottom:0;-webkit-transform-origin:right bottom;-moz-transform-origin:right bottom;-ms-transform-origin:right bottom;-o-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.vis-legend{background-color:rgba(247,252,255,.65);padding:5px;border:1px solid #b3b3b3;box-shadow:2px 2px 10px rgba(154,154,154,.55)}.vis-legend-text{white-space:nowrap;display:inline-block}.vis-item{position:absolute;color:#1a1a1a;border-color:#97b0f8;border-width:1px;background-color:#d5ddf6;display:inline-block;z-index:1}.vis-item.vis-point.vis-selected,.vis-item.vis-selected{background-color:#fff785}.vis-item.vis-selected{border-color:#ffc200;z-index:2}.vis-editable.vis-selected{cursor:move}.vis-item.vis-box{text-align:center;border-style:solid;border-radius:2px}.vis-item.vis-point{background:0 0}.vis-item.vis-dot{position:absolute;padding:0;border-width:4px;border-style:solid;border-radius:4px}.vis-item.vis-range{border-style:solid;border-radius:2px;box-sizing:border-box}.vis-item.vis-background{border:none;background-color:rgba(213,221,246,.4);box-sizing:border-box;padding:0;margin:0}.vis-item .vis-item-overflow{position:relative;width:100%;height:100%;padding:0;margin:0;overflow:hidden}.vis-item-visible-frame{white-space:nowrap}.vis-item.vis-range .vis-item-content{position:relative;display:inline-block}.vis-item.vis-background .vis-item-content{position:absolute;display:inline-block}.vis-item.vis-line{padding:0;position:absolute;width:0;border-left-width:1px;border-left-style:solid}.vis-item .vis-item-content{white-space:nowrap;box-sizing:border-box;padding:5px}.vis-item .vis-onUpdateTime-tooltip{position:absolute;background:#4f81bd;color:#fff;width:200px;text-align:center;white-space:nowrap;padding:5px;border-radius:1px;transition:.4s;-o-transition:.4s;-moz-transition:.4s;-webkit-transition:.4s}.vis-item .vis-delete,.vis-item .vis-delete-rtl{position:absolute;top:0;width:24px;height:24px;box-sizing:border-box;padding:0 5px;cursor:pointer;-webkit-transition:background .2s linear;-moz-transition:background .2s linear;-ms-transition:background .2s linear;-o-transition:background .2s linear;transition:background .2s linear}.vis-item .vis-delete{right:-24px}.vis-item .vis-delete-rtl{left:-24px}.vis-item .vis-delete-rtl:after,.vis-item .vis-delete:after{content:"\00D7";color:red;font-family:arial,sans-serif;font-size:22px;font-weight:700;-webkit-transition:color .2s linear;-moz-transition:color .2s linear;-ms-transition:color .2s linear;-o-transition:color .2s linear;transition:color .2s linear}.vis-item .vis-delete-rtl:hover,.vis-item .vis-delete:hover{background:red}.vis-item .vis-delete-rtl:hover:after,.vis-item .vis-delete:hover:after{color:#fff}.vis-item .vis-drag-center{position:absolute;width:100%;height:100%;top:0;left:0;cursor:move}.vis-item.vis-range .vis-drag-left,.vis-item.vis-range .vis-drag-right{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0}.vis-item.vis-range .vis-drag-left{left:-4px;cursor:w-resize}.vis-item.vis-range .vis-drag-right{right:-4px;cursor:e-resize}.vis-range.vis-item.vis-readonly .vis-drag-left,.vis-range.vis-item.vis-readonly .vis-drag-right{cursor:auto}.vis-labelset .vis-label.draggable,.vis-nesting-group{cursor:pointer}.vis-itemset{position:relative;padding:0;margin:0;box-sizing:border-box}.vis-itemset .vis-background,.vis-itemset .vis-foreground{position:absolute;width:100%;height:100%;overflow:visible}.vis-axis{position:absolute;width:100%;height:0;left:0;z-index:1}.vis-foreground .vis-group{position:relative;box-sizing:border-box;border-bottom:1px solid #bfbfbf}.vis-foreground .vis-group:last-child{border-bottom:none}.vis-nested-group{background:#f5f5f5}.vis-label.vis-nesting-group.expanded:before{content:"\25BC"}.vis-label.vis-nesting-group.collapsed-rtl:before{content:"\25C0"}.vis-label.vis-nesting-group.collapsed:before{content:"\25B6"}.vis-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-labelset,.vis-labelset .vis-label{position:relative;box-sizing:border-box}.vis-labelset{overflow:hidden}.vis-labelset .vis-label{left:0;top:0;width:100%;color:#4d4d4d;border-bottom:1px solid #bfbfbf}.vis-labelset .vis-label:last-child{border-bottom:none}.vis-labelset .vis-label .vis-inner{display:inline-block;padding:5px}.vis-labelset .vis-label .vis-inner.vis-hidden{padding:0}.vis-panel{position:absolute;padding:0;margin:0;box-sizing:border-box}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right,.vis-panel.vis-top{border:1px #bfbfbf}.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right{border-top-style:solid;border-bottom-style:solid;overflow:hidden}.vis-left.vis-panel.vis-vertical-scroll,.vis-right.vis-panel.vis-vertical-scroll{height:100%;overflow-x:hidden;overflow-y:scroll}.vis-background,.vis-time-axis,.vis-timeline{overflow:hidden}.vis-left.vis-panel.vis-vertical-scroll{direction:rtl}.vis-left.vis-panel.vis-vertical-scroll .vis-content,.vis-right.vis-panel.vis-vertical-scroll{direction:ltr}.vis-right.vis-panel.vis-vertical-scroll .vis-content{direction:rtl}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-top{border-left-style:solid;border-right-style:solid}.vis-panel>.vis-content{position:relative}.vis-panel .vis-shadow{position:absolute;width:100%;height:1px;box-shadow:0 0 10px rgba(0,0,0,.8)}.vis-panel .vis-shadow.vis-top{top:-1px;left:0}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}.vis-graph-group0{fill:#4f81bd;fill-opacity:0;stroke-width:2px;stroke:#4f81bd}.vis-graph-group1{fill:#f79646;fill-opacity:0;stroke-width:2px;stroke:#f79646}.vis-graph-group2{fill:#8c51cf;fill-opacity:0;stroke-width:2px;stroke:#8c51cf}.vis-graph-group3{fill:#75c841;fill-opacity:0;stroke-width:2px;stroke:#75c841}.vis-graph-group4{fill:#ff0100;fill-opacity:0;stroke-width:2px;stroke:#ff0100}.vis-graph-group5{fill:#37d8e6;fill-opacity:0;stroke-width:2px;stroke:#37d8e6}.vis-graph-group6{fill:#042662;fill-opacity:0;stroke-width:2px;stroke:#042662}.vis-graph-group7{fill:#00ff26;fill-opacity:0;stroke-width:2px;stroke:#00ff26}.vis-graph-group8{fill:#f0f;fill-opacity:0;stroke-width:2px;stroke:#f0f}.vis-graph-group9{fill:#8f3938;fill-opacity:0;stroke-width:2px;stroke:#8f3938}.vis-timeline .vis-fill{fill-opacity:.1;stroke:none}.vis-timeline .vis-bar{fill-opacity:.5;stroke-width:1px}.vis-timeline .vis-point{stroke-width:2px;fill-opacity:1}.vis-timeline .vis-legend-background{stroke-width:1px;fill-opacity:.9;fill:#fff;stroke:#c2c2c2}.vis-timeline .vis-outline{stroke-width:1px;fill-opacity:1;fill:#fff;stroke:#e5e5e5}.vis-timeline .vis-icon-fill{fill-opacity:.3;stroke:none}.vis-time-axis{position:relative}.vis-time-axis.vis-foreground{top:0;left:0;width:100%}.vis-time-axis.vis-background{position:absolute;top:0;left:0;width:100%;height:100%}.vis-time-axis .vis-text{position:absolute;color:#4d4d4d;padding:3px;overflow:hidden;box-sizing:border-box;white-space:nowrap}#controls #search,#controls #searchStep,#controls #searchStop,#controls .heading{color:#fff;line-height:150%}.vis-time-axis .vis-text.vis-measure{position:absolute;padding-left:0;padding-right:0;margin-left:0;margin-right:0;visibility:hidden}.vis-time-axis .vis-grid.vis-vertical{position:absolute;border-left:1px solid}.vis-time-axis .vis-grid.vis-vertical-rtl{position:absolute;border-right:1px solid}.vis-time-axis .vis-grid.vis-minor{border-color:#e5e5e5}.vis-time-axis .vis-grid.vis-major{border-color:#bfbfbf}.vis-timeline{position:relative;border:1px solid #bfbfbf;padding:0;margin:0;box-sizing:border-box}#board,#controls,#visualization,.board-item{position:absolute}html,margin{margin:0;padding:0;font-family:Arial,Helvetica,sans-serif;font-size:16px}#board{width:150px;height:150px;top:0;left:0;border:10px solid #ccc}.board-item{border:2px solid #000;font-size:36px;font-weight:800;line-height:46px;text-align:center;width:50px;height:50px;box-sizing:border-box;top:0;left:0}#controls label,#searchResult{font-size:.75em}#board.animation .board-item{-webkit-transition:all .5s;transition:all .5s}#controls{width:170px;top:170px;left:0;bottom:0;overflow-y:auto}#controls button,select{width:100%;height:2em}#controls input[type=number]{width:100%;box-sizing:border-box}#controls .heading{background:#333;font-weight:700;text-align:center}#controls label{display:block;background:#fff;color:#333;text-align:left;line-height:150%;font-weight:800}#visualization{left:170px;top:0;bottom:0;right:0}.vis-configuration-wrapper{display:none!important}#controls #search{width:100%;background:#9c0;border:0;border-radius:3px;margin:1px 0}#controls #searchStop{width:100%;background:#f66;border:0;border-radius:3px;margin:1px 0}#controls #searchStep{width:100%;background:#ffb366;border:0;border-radius:3px;margin:1px 0}#controls .content{margin:5px}</style>
</head>
<body>
<div id="board">
<div id="board-item-1" class="board-item">1</div>
<div id="board-item-2" class="board-item">2</div>
<div id="board-item-3" class="board-item">3</div>
<div id="board-item-4" class="board-item">4</div>
<div id="board-item-5" class="board-item">5</div>
<div id="board-item-6" class="board-item">6</div>
<div id="board-item-7" class="board-item">7</div>
<div id="board-item-8" class="board-item">8</div>
</div>
<div id="visualization"></div>
<div id="controls">
<div class="heading">Board</div>
<div class="content">
<button id="randomize">Randomize</button>
<button id="customInput">Enter Custom State</button>
</div>
<div class="heading">Search</div>
<div class="content">
<label>Algorithm</label>
<select id="searchType">
<option value="breadthFirst">Breadth-First</option>
<option value="uniformCost">Uniform-Cost</option>
<option value="depthFirst">Depth-First</option>
<option value="iterativeDeepening">Iterative-Deepening</option>
<option value="greedyBest" selected>Greedy-Best</option>
<option value="aStar">A*</option>
</select>
<label>Iteration Limit</label>
<input type="number" id="iterationLimit" value="10000">
<label>Depth Limit</label>
<input type="number" id="depthLimit" value="0">
<label style="display: none;">
<input type="checkbox" id="visualizationCheck" checked>
Visualization
</label>
<label style="display: none;">
<input type="checkbox" id="expandedNodeCheck">
Early check optimization
</label>
<button id="searchStep">Iterate one step</button>
<button id="search">Search</button>
<button id="searchStop" style="display: none;">Stop</button>
</div>
<div class="heading">Search Result</div>
<div id="searchResult" class="content"></div>
</div>
<a href="https://github.com/dgurkaynak/8-puzzle-solver" class="github-corner" aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
<script>(function(){function Js(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}function Qs(t,e,i,n){for(var o=-1,s=null==t?0:t.length;++o<s;){var r=t[o];e(n,r,i(r),t)}return n}function tr(t,e){for(var i=-1,n=null==t?0:t.length;++i<n&&!1!==e(t[i],i,t););return t}function er(t,e){for(var i=-1,n=null==t?0:t.length;++i<n;)if(!e(t[i],i,t))return!1;return!0}function ir(t,e){for(var i=-1,n=null==t?0:t.length,o=0,s=[];++i<n;){var r=t[i];e(r,i,t)&&(s[o++]=r)}return s}function nr(t,e){return!(null==t||!t.length)&&-1<cr(t,e,0)}function or(t,e,i){for(var n=-1,o=null==t?0:t.length;++n<o;)if(i(e,t[n]))return!0;return!1}function sr(t,e){for(var i=-1,n=null==t?0:t.length,o=Array(n);++i<n;)o[i]=e(t[i],i,t);return o}function rr(t,e){for(var i=-1,n=e.length,o=t.length;++i<n;)t[o+i]=e[i];return t}function ar(t,e,i,n){var o=-1,s=null==t?0:t.length;for(n&&s&&(i=t[++o]);++o<s;)i=e(i,t[o],o,t);return i}function hr(t,e,i,n){var o=null==t?0:t.length;for(n&&o&&(i=t[--o]);o--;)i=e(i,t[o],o,t);return i}function dr(t,e){for(var i=-1,n=null==t?0:t.length;++i<n;)if(e(t[i],i,t))return!0;return!1}function lr(t,n,e){var o;return e(t,function(t,e,i){if(n(t,e,i))return o=e,!1}),o}function ur(t,e,i,n){for(var o=t.length,s=i+(n?1:-1);n?s--:++s<o;)if(e(t[s],s,t))return s;return-1}function cr(t,e,i){return e==e?function(t,e,i){for(var n=i-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}(t,e,i):ur(t,fr,i)}function pr(t,e,i,n){for(var o=i-1,s=t.length;++o<s;)if(n(t[o],e))return o;return-1}function fr(t){return t!=t}function mr(t,e){var i=null==t?0:t.length;return i?yr(t,e)/i:Hr}function vr(e){return function(t){return null==t?Ar:t[e]}}function t(e){return function(t){return null==e?Ar:e[t]}}function gr(t,n,o,s,e){return e(t,function(t,e,i){o=s?(s=!1,t):n(o,t,e,i)}),o}function yr(t,e){for(var i,n=-1,o=t.length;++n<o;){var s=e(t[n]);s!==Ar&&(i=i===Ar?s:i+s)}return i}function br(t,e){for(var i=-1,n=Array(t);++i<t;)n[i]=e(i);return n}function _r(t){return t?t.slice(0,Rr(t)+1).replace(Pa,""):t}function wr(e){return function(t){return e(t)}}function xr(e,t){return sr(t,function(t){return e[t]})}function kr(t,e){return t.has(e)}function Sr(t,e){for(var i=-1,n=t.length;++i<n&&-1<cr(e,t[i],0););return i}function Dr(t,e){for(var i=t.length;i--&&-1<cr(e,t[i],0););return i}function Er(t){return"\\"+R[t]}function Mr(t){return N.test(t)}function Or(t){var i=-1,n=Array(t.size);return t.forEach(function(t,e){n[++i]=[e,t]}),n}function Cr(e,i){return function(t){return e(i(t))}}function Tr(t,e){for(var i=-1,n=t.length,o=0,s=[];++i<n;){var r=t[i];r!==e&&r!==Br||(t[i]=Br,s[o++]=i)}return s}function Ir(t){var e=-1,i=Array(t.size);return t.forEach(function(t){i[++e]=t}),i}function Pr(t){return Mr(t)?function(t){for(var e=P.lastIndex=0;P.test(t);)++e;return e}(t):H(t)}function Nr(t){return Mr(t)?function(t){return t.match(P)||[]}(t):function(t){return t.split("")}(t)}function Rr(t){for(var e=t.length;e--&&i.test(t.charAt(e)););return e}var Ar,Lr="Expected a function",zr="__lodash_hash_undefined__",Br="__lodash_placeholder__",Fr=128,jr=9007199254740991,Hr=NaN,Wr=4294967295,Yr=[["ary",Fr],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],Gr="[object Arguments]",Vr="[object Array]",Ur="[object Boolean]",qr="[object Date]",Xr="[object Error]",Zr="[object Function]",Kr="[object GeneratorFunction]",$r="[object Map]",Jr="[object Number]",Qr="[object Object]",ta="[object Promise]",ea="[object RegExp]",ia="[object Set]",na="[object String]",oa="[object Symbol]",sa="[object WeakMap]",ra="[object ArrayBuffer]",aa="[object DataView]",ha="[object Float32Array]",da="[object Float64Array]",la="[object Int8Array]",ua="[object Int16Array]",ca="[object Int32Array]",pa="[object Uint8Array]",fa="[object Uint8ClampedArray]",ma="[object Uint16Array]",va="[object Uint32Array]",ga=/\b__p \+= '';/g,ya=/\b(__p \+=) '' \+/g,ba=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_a=/&(?:amp|lt|gt|quot|#39);/g,wa=/[&<>"']/g,xa=RegExp(_a.source),ka=RegExp(wa.source),Sa=/<%-([\s\S]+?)%>/g,Da=/<%([\s\S]+?)%>/g,Ea=/<%=([\s\S]+?)%>/g,Ma=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oa=/^\w*$/,Ca=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ta=/[\\^$.*+?()[\]{}|]/g,Ia=RegExp(Ta.source),Pa=/^\s+/,i=/\s/,Na=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ra=/\{\n\/\* \[wrapped with (.+)\] \*/,Aa=/,? & /,La=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,za=/[()=,{}\[\]\/\s]/,Ba=/\\(\\)?/g,Fa=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ja=/\w*$/,Ha=/^[-+]0x[0-9a-f]+$/i,Wa=/^0b[01]+$/i,Ya=/^\[object .+?Constructor\]$/,Ga=/^0o[0-7]+$/i,Va=/^(?:0|[1-9]\d*)$/,Ua=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qa=/($^)/,Xa=/['\n\r\u2028\u2029\\]/g,e="\\ud800-\\udfff",n="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",o="\\u2700-\\u27bf",s="a-z\\xdf-\\xf6\\xf8-\\xff",r="A-Z\\xc0-\\xd6\\xd8-\\xde",a="\\ufe0e\\ufe0f",h="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",d="['’]",l="["+e+"]",u="["+h+"]",c="["+n+"]",p="\\d+",f="["+o+"]",m="["+s+"]",v="[^"+e+h+p+o+s+r+"]",g="\\ud83c[\\udffb-\\udfff]",y="[^"+e+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",_="[\\ud800-\\udbff][\\udc00-\\udfff]",w="["+r+"]",x="\\u200d",k="(?:"+m+"|"+v+")",S="(?:"+w+"|"+v+")",D="(?:['’](?:d|ll|m|re|s|t|ve))?",E="(?:['’](?:D|LL|M|RE|S|T|VE))?",M="(?:"+c+"|"+g+")"+"?",O="["+a+"]?",C=O+M+("(?:"+x+"(?:"+[y,b,_].join("|")+")"+O+M+")*"),T="(?:"+[f,b,_].join("|")+")"+C,I="(?:"+[y+c+"?",c,b,_,l].join("|")+")",Za=RegExp(d,"g"),Ka=RegExp(c,"g"),P=RegExp(g+"(?="+g+")|"+I+C,"g"),$a=RegExp([w+"?"+m+"+"+D+"(?="+[u,w,"$"].join("|")+")",S+"+"+E+"(?="+[u,w+k,"$"].join("|")+")",w+"?"+k+"+"+D,w+"+"+E,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",p,T].join("|"),"g"),N=RegExp("["+x+e+n+a+"]"),Ja=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qa=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],th=-1,eh={};eh[ha]=eh[da]=eh[la]=eh[ua]=eh[ca]=eh[pa]=eh[fa]=eh[ma]=eh[va]=!0,eh[Gr]=eh[Vr]=eh[ra]=eh[Ur]=eh[aa]=eh[qr]=eh[Xr]=eh[Zr]=eh[$r]=eh[Jr]=eh[Qr]=eh[ea]=eh[ia]=eh[na]=eh[sa]=!1;var ih={};ih[Gr]=ih[Vr]=ih[ra]=ih[aa]=ih[Ur]=ih[qr]=ih[ha]=ih[da]=ih[la]=ih[ua]=ih[ca]=ih[$r]=ih[Jr]=ih[Qr]=ih[ea]=ih[ia]=ih[na]=ih[oa]=ih[pa]=ih[fa]=ih[ma]=ih[va]=!0,ih[Xr]=ih[Zr]=ih[sa]=!1;var R={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nh=parseFloat,oh=parseInt,A="object"==typeof global&&global&&global.Object===Object&&global,L="object"==typeof self&&self&&self.Object===Object&&self,sh=A||L||Function("return this")(),z="object"==typeof exports&&exports&&!exports.nodeType&&exports,B=z&&"object"==typeof module&&module&&!module.nodeType&&module,rh=B&&B.exports===z,F=rh&&A.process,j=function(){try{var t=B&&B.require&&B.require("util").types;return t||F&&F.binding&&F.binding("util")}catch(t){}}(),ah=j&&j.isArrayBuffer,hh=j&&j.isDate,dh=j&&j.isMap,lh=j&&j.isRegExp,uh=j&&j.isSet,ch=j&&j.isTypedArray,H=vr("length"),ph=t({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),fh=t({"&":"&","<":"<",">":">",'"':""","'":"'"}),mh=t({"&":"&","<":"<",">":">",""":'"',"'":"'"}),vh=function t(e){function v(t){if(oi(t)&&!ts(t)&&!(t instanceof y)){if(t instanceof g)return t;if(Xi.call(t,"__wrapped__"))return Te(t)}return new g(t)}function s(){}function g(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=Ar}function y(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Wr,this.__views__=[]}function i(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function o(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function a(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function b(t){var e=-1,i=null==t?0:t.length;for(this.__data__=new a;++e<i;)this.add(t[e])}function _(t){this.size=(this.__data__=new o(t)).size}function n(t,e){var i=ts(t),n=!i&&Qo(t),o=!i&&!n&&is(t),s=!i&&!n&&!o&&as(t),r=i||n||o||s,a=r?br(t.length,Hi):[],h=a.length;for(var d in t)!e&&!Xi.call(t,d)||r&&("length"==d||o&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||me(d,h))||a.push(d);return a}function r(t){var e=t.length;return e?t[nt(0,e-1)]:Ar}function m(t,e,i){(i===Ar||Ke(t[e],i))&&(i!==Ar||e in t)||l(t,e,i)}function w(t,e,i){var n=t[e];Xi.call(t,e)&&Ke(n,i)&&(i!==Ar||e in t)||l(t,e,i)}function h(t,e){for(var i=t.length;i--;)if(Ke(t[i][0],e))return i;return-1}function d(t,n,o,s){return Xn(t,function(t,e,i){n(s,t,o(t),i)}),s}function x(t,e){return t&&Pt(e,yi(e),t)}function l(t,e,i){"__proto__"==e&&pn?pn(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}function u(t,e){for(var i=-1,n=e.length,o=Ri(n),s=null==t;++i<n;)o[i]=s?Ar:vi(t,e[i]);return o}function c(t,e,i){return t==t&&(i!==Ar&&(t=t<=i?t:i),e!==Ar&&(t=e<=t?t:e)),t}function k(i,n,o,t,e,s){var r,a=1&n,h=2&n,d=4&n;if(o&&(r=e?o(i,t,e,s):o(i)),r!==Ar)return r;if(!ni(i))return i;var l=ts(i);if(l){if(r=function(t){var e=t.length,i=new t.constructor(e);return e&&"string"==typeof t[0]&&Xi.call(t,"index")&&(i.index=t.index,i.input=t.input),i}(i),!a)return It(i,r)}else{var u=ro(i),c=u==Zr||u==Kr;if(is(i))return Dt(i,a);if(u==Qr||u==Gr||c&&!e){if(r=h||c?{}:pe(i),!a)return h?function(t,e){return Pt(t,so(t),e)}(i,function(t,e){return t&&Pt(e,bi(e),t)}(r,i)):function(t,e){return Pt(t,oo(t),e)}(i,x(r,i))}else{if(!ih[u])return e?i:{};r=function(t,e,i){var n=t.constructor;switch(e){case ra:return Et(t);case Ur:case qr:return new n(+t);case aa:return function(t,e){return new t.constructor(e?Et(t.buffer):t.buffer,t.byteOffset,t.byteLength)}(t,i);case ha:case da:case la:case ua:case ca:case pa:case fa:case ma:case va:return Mt(t,i);case $r:return new n;case Jr:case na:return new n(t);case ea:return function(t){var e=new t.constructor(t.source,ja.exec(t));return e.lastIndex=t.lastIndex,e}(t);case ia:return new n;case oa:return function(t){return Gn?Fi(Gn.call(t)):{}}(t)}}(i,u,a)}}var p=(s=s||new _).get(i);if(p)return p;s.set(i,r),rs(i)?i.forEach(function(t){r.add(k(t,n,o,t,i,s))}):os(i)&&i.forEach(function(t,e){r.set(e,k(t,n,o,e,i,s))});var f=l?Ar:(d?h?se:oe:h?bi:yi)(i);return tr(f||i,function(t,e){f&&(t=i[e=t]),w(r,e,k(t,n,o,e,i,s))}),r}function p(t,e,i){var n=i.length;if(null==t)return!n;for(t=Fi(t);n--;){var o=i[n],s=e[o],r=t[o];if(r===Ar&&!(o in t)||!s(r))return!1}return!0}function f(t,e,i){if("function"!=typeof t)throw new Wi(Lr);return co(function(){t.apply(Ar,i)},e)}function S(t,e,i,n){var o=-1,s=nr,r=!0,a=t.length,h=[],d=e.length;if(!a)return h;i&&(e=sr(e,wr(i))),n?(s=or,r=!1):200<=e.length&&(s=kr,r=!1,e=new b(e));t:for(;++o<a;){var l=t[o],u=null==i?l:i(l);if(l=n||0!==l?l:0,r&&u==u){for(var c=d;c--;)if(e[c]===u)continue t;h.push(l)}else s(e,u,n)||h.push(l)}return h}function D(t,n){var o=!0;return Xn(t,function(t,e,i){return o=!!n(t,e,i)}),o}function E(t,e,i){for(var n=-1,o=t.length;++n<o;){var s=t[n],r=e(s);if(null!=r&&(a===Ar?r==r&&!hi(r):i(r,a)))var a=r,h=s}return h}function M(t,n){var o=[];return Xn(t,function(t,e,i){n(t,e,i)&&o.push(t)}),o}function O(t,e,i,n,o){var s=-1,r=t.length;for(i=i||fe,o=o||[];++s<r;){var a=t[s];0<e&&i(a)?1<e?O(a,e-1,i,n,o):rr(o,a):n||(o[o.length]=a)}return o}function C(t,e){return t&&Kn(t,e,yi)}function T(t,e){return t&&$n(t,e,yi)}function I(e,t){return ir(t,function(t){return ti(e[t])})}function P(t,e){for(var i=0,n=(e=kt(e,t)).length;null!=t&&i<n;)t=t[Oe(e[i++])];return i&&i==n?t:Ar}function N(t,e,i){var n=e(t);return ts(t)?n:rr(n,i(t))}function R(t){return null==t?t===Ar?"[object Undefined]":"[object Null]":cn&&cn in Fi(t)?function(t){var e=Xi.call(t,cn),i=t[cn];try{t[cn]=Ar;var n=!0}catch(t){}var o=$i.call(t);return n&&(e?t[cn]=i:delete t[cn]),o}(t):function(t){return $i.call(t)}(t)}function A(t,e){return e<t}function L(t,e){return null!=t&&Xi.call(t,e)}function z(t,e){return null!=t&&e in Fi(t)}function B(t,e,i){for(var n=i?or:nr,o=t[0].length,s=t.length,r=s,a=Ri(s),h=1/0,d=[];r--;){var l=t[r];r&&e&&(l=sr(l,wr(e))),h=Dn(l.length,h),a[r]=!i&&(e||120<=o&&120<=l.length)?new b(r&&l):Ar}l=t[0];var u=-1,c=a[0];t:for(;++u<o&&d.length<h;){var p=l[u],f=e?e(p):p;if(p=i||0!==p?p:0,!(c?kr(c,f):n(d,f,i))){for(r=s;--r;){var m=a[r];if(!(m?kr(m,f):n(t[r],f,i)))continue t}c&&c.push(f),d.push(p)}}return d}function F(t,e,i){var n=null==(t=ke(t,e=kt(e,t)))?t:t[Oe(Ae(e))];return null==n?Ar:Js(n,t,i)}function j(t){return oi(t)&&R(t)==Gr}function H(t,e,i,n,o){return t===e||(null==t||null==e||!oi(t)&&!oi(e)?t!=t&&e!=e:function(t,e,i,n,o,s){var r=ts(t),a=ts(e),h=r?Vr:ro(t),d=a?Vr:ro(e),l=(h=h==Gr?Qr:h)==Qr,u=(d=d==Gr?Qr:d)==Qr,c=h==d;if(c&&is(t)){if(!is(e))return!1;l=!(r=!0)}if(c&&!l)return s=s||new _,r||as(t)?ie(t,e,i,n,o,s):function(t,e,i,n,o,s,r){switch(i){case aa:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ra:return!(t.byteLength!=e.byteLength||!s(new on(t),new on(e)));case Ur:case qr:case Jr:return Ke(+t,+e);case Xr:return t.name==e.name&&t.message==e.message;case ea:case na:return t==e+"";case $r:var a=Or;case ia:var h=1&n;if(a=a||Ir,t.size!=e.size&&!h)return!1;var d=r.get(t);if(d)return d==e;n|=2,r.set(t,e);var l=ie(a(t),a(e),n,o,s,r);return r.delete(t),l;case oa:if(Gn)return Gn.call(t)==Gn.call(e)}return!1}(t,e,h,i,n,o,s);if(!(1&i)){var p=l&&Xi.call(t,"__wrapped__"),f=u&&Xi.call(e,"__wrapped__");if(p||f){var m=p?t.value():t,v=f?e.value():e;return s=s||new _,o(m,v,i,n,s)}}return!!c&&(s=s||new _,function(t,e,i,n,o,s){var r=1&i,a=oe(t),h=a.length;if(h!=oe(e).length&&!r)return!1;for(var d=h;d--;){var l=a[d];if(!(r?l in e:Xi.call(e,l)))return!1}var u=s.get(t),c=s.get(e);if(u&&c)return u==e&&c==t;var p=!0;s.set(t,e),s.set(e,t);for(var f=r;++d<h;){l=a[d];var m=t[l],v=e[l];if(n)var g=r?n(v,m,l,e,t,s):n(m,v,l,t,e,s);if(!(g===Ar?m===v||o(m,v,i,n,s):g)){p=!1;break}f=f||"constructor"==l}if(p&&!f){var y=t.constructor,b=e.constructor;y!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(p=!1)}return s.delete(t),s.delete(e),p}(t,e,i,n,o,s))}(t,e,i,n,H,o))}function W(t,e,i,n){var o=i.length,s=o,r=!n;if(null==t)return!s;for(t=Fi(t);o--;){var a=i[o];if(r&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<s;){var h=(a=i[o])[0],d=t[h],l=a[1];if(r&&a[2]){if(d===Ar&&!(h in t))return!1}else{var u=new _;if(n)var c=n(d,l,h,t,e,u);if(!(c===Ar?H(l,d,3,n,u):c))return!1}}return!0}function Y(t){return!(!ni(t)||function(t){return!!Ki&&Ki in t}(t))&&(ti(t)?tn:Ya).test(Ce(t))}function G(t){return"function"==typeof t?t:null==t?Ei:"object"==typeof t?ts(t)?K(t[0],t[1]):Z(t):Ti(t)}function V(t){if(!be(t))return kn(t);var e=[];for(var i in Fi(t))Xi.call(t,i)&&"constructor"!=i&&e.push(i);return e}function U(t){if(!ni(t))return function(t){var e=[];if(null!=t)for(var i in Fi(t))e.push(i);return e}(t);var e=be(t),i=[];for(var n in t)("constructor"!=n||!e&&Xi.call(t,n))&&i.push(n);return i}function q(t,e){return t<e}function X(t,n){var o=-1,s=$e(t)?Ri(t.length):[];return Xn(t,function(t,e,i){s[++o]=n(t,e,i)}),s}function Z(e){var i=le(e);return 1==i.length&&i[0][2]?we(i[0][0],i[0][1]):function(t){return t===e||W(t,e,i)}}function K(i,n){return ge(i)&&_e(n)?we(Oe(i),n):function(t){var e=vi(t,i);return e===Ar&&e===n?gi(t,i):H(n,e,3)}}function $(n,o,s,r,a){n!==o&&Kn(o,function(t,e){if(a=a||new _,ni(t))!function(t,e,i,n,o,s,r){var a=Se(t,i),h=Se(e,i),d=r.get(h);if(d)return m(t,i,d);var l=s?s(a,h,i+"",t,e,r):Ar,u=l===Ar;if(u){var c=ts(h),p=!c&&is(h),f=!c&&!p&&as(h);l=h,c||p||f?l=ts(a)?a:Je(a)?It(a):p?Dt(h,!(u=!1)):f?Mt(h,!(u=!1)):[]:ri(h)||Qo(h)?Qo(l=a)?l=fi(a):ni(a)&&!ti(a)||(l=pe(h)):u=!1}u&&(r.set(h,l),o(l,h,n,s,r),r.delete(h)),m(t,i,l)}(n,o,e,s,$,r,a);else{var i=r?r(Se(n,e),t,e+"",n,o,a):Ar;i===Ar&&(i=t),m(n,e,i)}},bi)}function J(t,e){var i=t.length;if(i)return me(e+=e<0?i:0,i)?t[e]:Ar}function Q(t,n,i){n=n.length?sr(n,function(e){return ts(e)?function(t){return P(t,1===e.length?e[0]:e)}:e}):[Ei];var o=-1;return n=sr(n,wr(he())),function(t,e){var i=t.length;for(t.sort(e);i--;)t[i]=t[i].value;return t}(X(t,function(e,t,i){return{criteria:sr(n,function(t){return t(e)}),index:++o,value:e}}),function(t,e){return function(t,e,i){for(var n=-1,o=t.criteria,s=e.criteria,r=o.length,a=i.length;++n<r;){var h=Ot(o[n],s[n]);if(h)return a<=n?h:h*("desc"==i[n]?-1:1)}return t.index-e.index}(t,e,i)})}function tt(t,e,i){for(var n=-1,o=e.length,s={};++n<o;){var r=e[n],a=P(t,r);i(a,r)&&rt(s,kt(r,t),a)}return s}function et(t,e,i,n){var o=n?pr:cr,s=-1,r=e.length,a=t;for(t===e&&(e=It(e)),i&&(a=sr(t,wr(i)));++s<r;)for(var h=0,d=e[s],l=i?i(d):d;-1<(h=o(a,l,h,n));)a!==t&&dn.call(a,h,1),dn.call(t,h,1);return t}function it(t,e){for(var i=t?e.length:0,n=i-1;i--;){var o=e[i];if(i==n||o!==s){var s=o;me(o)?dn.call(t,o,1):mt(t,o)}}return t}function nt(t,e){return t+yn(On()*(e-t+1))}function ot(t,e){var i="";if(!t||e<1||jr<e)return i;for(;e%2&&(i+=t),(e=yn(e/2))&&(t+=t),e;);return i}function st(t,e){return po(xe(t,e,Ei),t+"")}function rt(t,e,i,n){if(!ni(t))return t;for(var o=-1,s=(e=kt(e,t)).length,r=s-1,a=t;null!=a&&++o<s;){var h=Oe(e[o]),d=i;if("__proto__"===h||"constructor"===h||"prototype"===h)return t;if(o!=r){var l=a[h];(d=n?n(l,h,a):Ar)===Ar&&(d=ni(l)?l:me(e[o+1])?[]:{})}w(a,h,d),a=a[h]}return t}function at(t,e,i){var n=-1,o=t.length;e<0&&(e=o<-e?0:o+e),(i=o<i?o:i)<0&&(i+=o),o=i<e?0:i-e>>>0,e>>>=0;for(var s=Ri(o);++n<o;)s[n]=t[n+e];return s}function ht(t,n){var o;return Xn(t,function(t,e,i){return!(o=n(t,e,i))}),!!o}function dt(t,e,i){var n=0,o=null==t?n:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;n<o;){var s=n+o>>>1,r=t[s];null!==r&&!hi(r)&&(i?r<=e:r<e)?n=1+s:o=s}return o}return lt(t,e,Ei,i)}function lt(t,e,i,n){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var r=(e=i(e))!=e,a=null===e,h=hi(e),d=e===Ar;o<s;){var l=yn((o+s)/2),u=i(t[l]),c=u!==Ar,p=null===u,f=u==u,m=hi(u);if(r)var v=n||f;else v=d?f&&(n||c):a?f&&c&&(n||!p):h?f&&c&&!p&&(n||!m):!p&&!m&&(n?u<=e:u<e);v?o=l+1:s=l}return Dn(s,4294967294)}function ut(t,e){for(var i=-1,n=t.length,o=0,s=[];++i<n;){var r=t[i],a=e?e(r):r;if(!i||!Ke(a,h)){var h=a;s[o++]=0===r?0:r}}return s}function ct(t){return"number"==typeof t?t:hi(t)?Hr:+t}function pt(t){if("string"==typeof t)return t;if(ts(t))return sr(t,pt)+"";if(hi(t))return Vn?Vn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ft(t,e,i){var n=-1,o=nr,s=t.length,r=!0,a=[],h=a;if(i)r=!1,o=or;else if(200<=s){var d=e?null:io(t);if(d)return Ir(d);r=!1,o=kr,h=new b}else h=e?[]:a;t:for(;++n<s;){var l=t[n],u=e?e(l):l;if(l=i||0!==l?l:0,r&&u==u){for(var c=h.length;c--;)if(h[c]===u)continue t;e&&h.push(u),a.push(l)}else o(h,u,i)||(h!==a&&h.push(u),a.push(l))}return a}function mt(t,e){return null==(t=ke(t,e=kt(e,t)))||delete t[Oe(Ae(e))]}function vt(t,e,i,n){return rt(t,e,i(P(t,e)),n)}function gt(t,e,i,n){for(var o=t.length,s=n?o:-1;(n?s--:++s<o)&&e(t[s],s,t););return i?at(t,n?0:s,n?s+1:o):at(t,n?s+1:0,n?o:s)}function yt(t,e){var i=t;return i instanceof y&&(i=i.value()),ar(e,function(t,e){return e.func.apply(e.thisArg,rr([t],e.args))},i)}function bt(t,e,i){var n=t.length;if(n<2)return n?ft(t[0]):[];for(var o=-1,s=Ri(n);++o<n;)for(var r=t[o],a=-1;++a<n;)a!=o&&(s[o]=S(s[o]||r,t[a],e,i));return ft(O(s,1),e,i)}function _t(t,e,i){for(var n=-1,o=t.length,s=e.length,r={};++n<o;)i(r,t[n],n<s?e[n]:Ar);return r}function wt(t){return Je(t)?t:[]}function xt(t){return"function"==typeof t?t:Ei}function kt(t,e){return ts(t)?t:ge(t,e)?[t]:fo(mi(t))}function St(t,e,i){var n=t.length;return i=i===Ar?n:i,!e&&n<=i?t:at(t,e,i)}function Dt(t,e){if(e)return t.slice();var i=t.length,n=sn?sn(i):new t.constructor(i);return t.copy(n),n}function Et(t){var e=new t.constructor(t.byteLength);return new on(e).set(new on(t)),e}function Mt(t,e){return new t.constructor(e?Et(t.buffer):t.buffer,t.byteOffset,t.length)}function Ot(t,e){if(t!==e){var i=t!==Ar,n=null===t,o=t==t,s=hi(t),r=e!==Ar,a=null===e,h=e==e,d=hi(e);if(!a&&!d&&!s&&e<t||s&&r&&h&&!a&&!d||n&&r&&h||!i&&h||!o)return 1;if(!n&&!s&&!d&&t<e||d&&i&&o&&!n&&!s||a&&i&&o||!r&&o||!h)return-1}return 0}function Ct(t,e,i,n){for(var o=-1,s=t.length,r=i.length,a=-1,h=e.length,d=Sn(s-r,0),l=Ri(h+d),u=!n;++a<h;)l[a]=e[a];for(;++o<r;)(u||o<s)&&(l[i[o]]=t[o]);for(;d--;)l[a++]=t[o++];return l}function Tt(t,e,i,n){for(var o=-1,s=t.length,r=-1,a=i.length,h=-1,d=e.length,l=Sn(s-a,0),u=Ri(l+d),c=!n;++o<l;)u[o]=t[o];for(var p=o;++h<d;)u[p+h]=e[h];for(;++r<a;)(c||o<s)&&(u[p+i[r]]=t[o++]);return u}function It(t,e){var i=-1,n=t.length;for(e=e||Ri(n);++i<n;)e[i]=t[i];return e}function Pt(t,e,i,n){var o=!i;i=i||{};for(var s=-1,r=e.length;++s<r;){var a=e[s],h=n?n(i[a],t[a],a,i,t):Ar;h===Ar&&(h=t[a]),o?l(i,a,h):w(i,a,h)}return i}function Nt(o,s){return function(t,e){var i=ts(t)?Qs:d,n=s?s():{};return i(t,o,he(e,2),n)}}function Rt(a){return st(function(t,e){var i=-1,n=e.length,o=1<n?e[n-1]:Ar,s=2<n?e[2]:Ar;for(o=3<a.length&&"function"==typeof o?(n--,o):Ar,s&&ve(e[0],e[1],s)&&(o=n<3?Ar:o,n=1),t=Fi(t);++i<n;){var r=e[i];r&&a(t,r,i,o)}return t})}function At(s,r){return function(t,e){if(null==t)return t;if(!$e(t))return s(t,e);for(var i=t.length,n=r?i:-1,o=Fi(t);(r?n--:++n<i)&&!1!==e(o[n],n,o););return t}}function Lt(h){return function(t,e,i){for(var n=-1,o=Fi(t),s=i(t),r=s.length;r--;){var a=s[h?r:++n];if(!1===e(o[a],a,o))break}return t}}function zt(o){return function(t){var e=Mr(t=mi(t))?Nr(t):Ar,i=e?e[0]:t.charAt(0),n=e?St(e,1).join(""):t.slice(1);return i[o]()+n}}function Bt(e){return function(t){return ar(Si(ki(t).replace(Za,"")),e,"")}}function Ft(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var e=Un(n.prototype),i=n.apply(e,t);return ni(i)?i:e}}function jt(r){return function(t,e,i){var n=Fi(t);if(!$e(t)){var o=he(e,3);t=yi(t),e=function(t){return o(n[t],t,n)}}var s=r(t,e,i);return-1<s?n[o?t[s]:s]:Ar}}function Ht(h){return ne(function(o){var s=o.length,t=s,e=g.prototype.thru;for(h&&o.reverse();t--;){var i=o[t];if("function"!=typeof i)throw new Wi(Lr);if(e&&!r&&"wrapper"==re(i))var r=new g([],!0)}for(t=r?t:s;++t<s;){var n=re(i=o[t]),a="wrapper"==n?no(i):Ar;r=a&&ye(a[0])&&424==a[1]&&!a[4].length&&1==a[9]?r[re(a[0])].apply(r,a[3]):1==i.length&&ye(i)?r[n]():r.thru(i)}return function(){var t=arguments,e=t[0];if(r&&1==t.length&&ts(e))return r.plant(e).value();for(var i=0,n=s?o[i].apply(this,t):e;++i<s;)n=o[i].call(this,n);return n}})}function Wt(h,d,l,u,c,p,f,m,v,g){var y=d&Fr,b=1&d,_=2&d,w=24&d,x=512&d,k=_?Ar:Ft(h);return function t(){for(var e=arguments.length,i=Ri(e),n=e;n--;)i[n]=arguments[n];if(w)var o=ae(t),s=function(t,e){for(var i=t.length,n=0;i--;)t[i]===e&&++n;return n}(i,o);if(u&&(i=Ct(i,u,c,w)),p&&(i=Tt(i,p,f,w)),e-=s,w&&e<g)return Zt(h,d,Wt,t.placeholder,l,i,Tr(i,o),m,v,g-e);var r=b?l:this,a=_?r[h]:h;return e=i.length,m?i=function(t,e){for(var i=t.length,n=Dn(e.length,i),o=It(t);n--;){var s=e[n];t[n]=me(s,i)?o[s]:Ar}return t}(i,m):x&&1<e&&i.reverse(),y&&v<e&&(i.length=v),this&&this!==sh&&this instanceof t&&(a=k||Ft(a)),a.apply(r,i)}}function Yt(i,n){return function(t,e){return function(t,n,o,s){return C(t,function(t,e,i){n(s,o(t),e,i)}),s}(t,i,n(e),{})}}function Gt(n,o){return function(t,e){var i;if(t===Ar&&e===Ar)return o;if(t!==Ar&&(i=t),e!==Ar){if(i===Ar)return e;e="string"==typeof t||"string"==typeof e?(t=pt(t),pt(e)):(t=ct(t),ct(e)),i=n(t,e)}return i}}function Vt(n){return ne(function(t){return t=sr(t,wr(he())),st(function(e){var i=this;return n(t,function(t){return Js(t,i,e)})})})}function Ut(t,e){var i=(e=e===Ar?" ":pt(e)).length;if(i<2)return i?ot(e,t):e;var n=ot(e,gn(t/Pr(e)));return Mr(e)?St(Nr(n),0,t).join(""):n.slice(0,t)}function qt(n){return function(t,e,i){return i&&"number"!=typeof i&&ve(t,e,i)&&(e=i=Ar),t=li(t),e===Ar?(e=t,t=0):e=li(e),function(t,e,i,n){for(var o=-1,s=Sn(gn((e-t)/(i||1)),0),r=Ri(s);s--;)r[n?s:++o]=t,t+=i;return r}(t,e,i=i===Ar?t<e?1:-1:li(i),n)}}function Xt(i){return function(t,e){return"string"==typeof t&&"string"==typeof e||(t=pi(t),e=pi(e)),i(t,e)}}function Zt(t,e,i,n,o,s,r,a,h,d){var l=8&e;e|=l?32:64,4&(e&=~(l?64:32))||(e&=-4);var u=[t,e,o,l?s:Ar,l?r:Ar,l?Ar:s,l?Ar:r,a,h,d],c=i.apply(Ar,u);return ye(t)&&uo(c,u),c.placeholder=n,De(c,t,e)}function Kt(t){var n=Bi[t];return function(t,e){if(t=pi(t),(e=null==e?0:Dn(ui(e),292))&&wn(t)){var i=(mi(t)+"e").split("e");return+((i=(mi(n(i[0]+"e"+(+i[1]+e)))+"e").split("e"))[0]+"e"+(+i[1]-e))}return n(t)}}function $t(i){return function(t){var e=ro(t);return e==$r?Or(t):e==ia?function(t){var e=-1,i=Array(t.size);return t.forEach(function(t){i[++e]=[t,t]}),i}(t):function(e,t){return sr(t,function(t){return[t,e[t]]})}(t,i(t))}}function Jt(t,e,i,n,o,s,r,a){var h=2&e;if(!h&&"function"!=typeof t)throw new Wi(Lr);var d=n?n.length:0;if(d||(e&=-97,n=o=Ar),r=r===Ar?r:Sn(ui(r),0),a=a===Ar?a:ui(a),d-=o?o.length:0,64&e){var l=n,u=o;n=o=Ar}var c=h?Ar:no(t),p=[t,e,i,n,o,l,u,s,r,a];if(c&&function(t,e){var i=t[1],n=e[1],o=i|n,s=o<131,r=n==Fr&&8==i||n==Fr&&256==i&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==i;if(!s&&!r)return;1&n&&(t[2]=e[2],o|=1&i?0:4);var a=e[3];if(a){var h=t[3];t[3]=h?Ct(h,a,e[4]):a,t[4]=h?Tr(t[3],Br):e[4]}(a=e[5])&&(h=t[5],t[5]=h?Tt(h,a,e[6]):a,t[6]=h?Tr(t[5],Br):e[6]),(a=e[7])&&(t[7]=a),n&Fr&&(t[8]=null==t[8]?e[8]:Dn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(p,c),t=p[0],e=p[1],i=p[2],n=p[3],o=p[4],!(a=p[9]=p[9]===Ar?h?0:t.length:Sn(p[9]-d,0))&&24&e&&(e&=-25),e&&1!=e)f=8==e||16==e?function(r,a,h){var d=Ft(r);return function t(){for(var e=arguments.length,i=Ri(e),n=e,o=ae(t);n--;)i[n]=arguments[n];var s=e<3&&i[0]!==o&&i[e-1]!==o?[]:Tr(i,o);return(e-=s.length)<h?Zt(r,a,Wt,t.placeholder,Ar,i,s,Ar,Ar,h-e):Js(this&&this!==sh&&this instanceof t?d:r,this,i)}}(t,e,a):32!=e&&33!=e||o.length?Wt.apply(Ar,p):function(a,t,h,d){var l=1&t,u=Ft(a);return function t(){for(var e=-1,i=arguments.length,n=-1,o=d.length,s=Ri(o+i),r=this&&this!==sh&&this instanceof t?u:a;++n<o;)s[n]=d[n];for(;i--;)s[n++]=arguments[++e];return Js(r,l?h:this,s)}}(t,e,i,n);else var f=function(e,t,i){var n=1&t,o=Ft(e);return function t(){return(this&&this!==sh&&this instanceof t?o:e).apply(n?i:this,arguments)}}(t,e,i);return De((c?Jn:uo)(f,p),t,e)}function Qt(t,e,i,n){return t===Ar||Ke(t,Vi[i])&&!Xi.call(n,i)?e:t}function te(t,e,i,n,o,s){return ni(t)&&ni(e)&&(s.set(e,t),$(t,e,Ar,te,s),s.delete(e)),t}function ee(t){return ri(t)?Ar:t}function ie(t,e,i,n,o,s){var r=1&i,a=t.length,h=e.length;if(a!=h&&!(r&&a<h))return!1;var d=s.get(t),l=s.get(e);if(d&&l)return d==e&&l==t;var u=-1,c=!0,p=2&i?new b:Ar;for(s.set(t,e),s.set(e,t);++u<a;){var f=t[u],m=e[u];if(n)var v=r?n(m,f,u,e,t,s):n(f,m,u,t,e,s);if(v!==Ar){if(v)continue;c=!1;break}if(p){if(!dr(e,function(t,e){if(!kr(p,e)&&(f===t||o(f,t,i,n,s)))return p.push(e)})){c=!1;break}}else if(f!==m&&!o(f,m,i,n,s)){c=!1;break}}return s.delete(t),s.delete(e),c}function ne(t){return po(xe(t,Ar,Ne),t+"")}function oe(t){return N(t,yi,oo)}function se(t){return N(t,bi,so)}function re(t){for(var e=t.name+"",i=zn[e],n=Xi.call(zn,e)?i.length:0;n--;){var o=i[n],s=o.func;if(null==s||s==t)return o.name}return e}function ae(t){return(Xi.call(v,"placeholder")?v:t).placeholder}function he(){var t=v.iteratee||Mi;return t=t===Mi?G:t,arguments.length?t(arguments[0],arguments[1]):t}function de(t,e){var i=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?i["string"==typeof e?"string":"hash"]:i.map}function le(t){for(var e=yi(t),i=e.length;i--;){var n=e[i],o=t[n];e[i]=[n,o,_e(o)]}return e}function ue(t,e){var i=function(t,e){return null==t?Ar:t[e]}(t,e);return Y(i)?i:Ar}function ce(t,e,i){for(var n=-1,o=(e=kt(e,t)).length,s=!1;++n<o;){var r=Oe(e[n]);if(!(s=null!=t&&i(t,r)))break;t=t[r]}return s||++n!=o?s:!!(o=null==t?0:t.length)&&ii(o)&&me(r,o)&&(ts(t)||Qo(t))}function pe(t){return"function"!=typeof t.constructor||be(t)?{}:Un(rn(t))}function fe(t){return ts(t)||Qo(t)||!!(ln&&t&&t[ln])}function me(t,e){var i=typeof t;return!!(e=null==e?jr:e)&&("number"==i||"symbol"!=i&&Va.test(t))&&-1<t&&t%1==0&&t<e}function ve(t,e,i){if(!ni(i))return!1;var n=typeof e;return!!("number"==n?$e(i)&&me(e,i.length):"string"==n&&e in i)&&Ke(i[e],t)}function ge(t,e){if(ts(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!hi(t))||Oa.test(t)||!Ma.test(t)||null!=e&&t in Fi(e)}function ye(t){var e=re(t),i=v[e];if("function"!=typeof i||!(e in y.prototype))return!1;if(t===i)return!0;var n=no(i);return!!n&&t===n[0]}function be(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Vi)}function _e(t){return t==t&&!ni(t)}function we(e,i){return function(t){return null!=t&&t[e]===i&&(i!==Ar||e in Fi(t))}}function xe(s,r,a){return r=Sn(r===Ar?s.length-1:r,0),function(){for(var t=arguments,e=-1,i=Sn(t.length-r,0),n=Ri(i);++e<i;)n[e]=t[r+e];e=-1;for(var o=Ri(r+1);++e<r;)o[e]=t[e];return o[r]=a(n),Js(s,this,o)}}function ke(t,e){return e.length<2?t:P(t,at(e,0,-1))}function Se(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function De(t,e,i){var n=e+"";return po(t,function(t,e){var i=e.length;if(!i)return t;var n=i-1;return e[n]=(1<i?"& ":"")+e[n],e=e.join(2<i?", ":" "),t.replace(Na,"{\n/* [wrapped with "+e+"] */\n")}(n,function(i,n){return tr(Yr,function(t){var e="_."+t[0];n&t[1]&&!nr(i,e)&&i.push(e)}),i.sort()}(function(t){var e=t.match(Ra);return e?e[1].split(Aa):[]}(n),i)))}function Ee(i){var n=0,o=0;return function(){var t=En(),e=16-(t-o);if(o=t,0<e){if(800<=++n)return arguments[0]}else n=0;return i.apply(Ar,arguments)}}function Me(t,e){var i=-1,n=t.length,o=n-1;for(e=e===Ar?n:e;++i<e;){var s=nt(i,o),r=t[s];t[s]=t[i],t[i]=r}return t.length=e,t}function Oe(t){if("string"==typeof t||hi(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ce(t){if(null!=t){try{return qi.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Te(t){if(t instanceof y)return t.clone();var e=new g(t.__wrapped__,t.__chain__);return e.__actions__=It(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function Ie(t,e,i){var n=null==t?0:t.length;if(!n)return-1;var o=null==i?0:ui(i);return o<0&&(o=Sn(n+o,0)),ur(t,he(e,3),o)}function Pe(t,e,i){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return i!==Ar&&(o=ui(i),o=i<0?Sn(n+o,0):Dn(o,n-1)),ur(t,he(e,3),o,!0)}function Ne(t){return null!=t&&t.length?O(t,1):[]}function Re(t){return t&&t.length?t[0]:Ar}function Ae(t){var e=null==t?0:t.length;return e?t[e-1]:Ar}function Le(t,e){return t&&t.length&&e&&e.length?et(t,e):t}function ze(t){return null==t?t:Cn.call(t)}function Be(e){if(!e||!e.length)return[];var i=0;return e=ir(e,function(t){if(Je(t))return i=Sn(t.length,i),!0}),br(i,function(t){return sr(e,vr(t))})}function Fe(t,e){if(!t||!t.length)return[];var i=Be(t);return null==e?i:sr(i,function(t){return Js(e,Ar,t)})}function je(t){var e=v(t);return e.__chain__=!0,e}function He(t,e){return e(t)}function We(t,e){return(ts(t)?tr:Xn)(t,he(e,3))}function Ye(t,e){return(ts(t)?function(t,e){for(var i=null==t?0:t.length;i--&&!1!==e(t[i],i,t););return t}:Zn)(t,he(e,3))}function Ge(t,e){return(ts(t)?sr:X)(t,he(e,3))}function Ve(t,e,i){return e=i?Ar:e,e=t&&null==e?t.length:e,Jt(t,Fr,Ar,Ar,Ar,Ar,e)}function Ue(t,e){var i;if("function"!=typeof e)throw new Wi(Lr);return t=ui(t),function(){return 0<--t&&(i=e.apply(this,arguments)),t<=1&&(e=Ar),i}}function qe(n,i,t){function o(t){var e=h,i=d;return h=d=Ar,f=t,u=n.apply(i,e)}function s(t){var e=t-p;return p===Ar||i<=e||e<0||v&&l<=t-f}function r(){var t=Ho();return s(t)?e(t):(c=co(r,function(t){var e=i-(t-p);return v?Dn(e,l-(t-f)):e}(t)),Ar)}function e(t){return c=Ar,g&&h?o(t):(h=d=Ar,u)}function a(){var t=Ho(),e=s(t);if(h=arguments,d=this,p=t,e){if(c===Ar)return function(t){return f=t,c=co(r,i),m?o(t):u}(p);if(v)return eo(c),c=co(r,i),o(p)}return c===Ar&&(c=co(r,i)),u}var h,d,l,u,c,p,f=0,m=!1,v=!1,g=!0;if("function"!=typeof n)throw new Wi(Lr);return i=pi(i)||0,ni(t)&&(m=!!t.leading,l=(v="maxWait"in t)?Sn(pi(t.maxWait)||0,i):l,g="trailing"in t?!!t.trailing:g),a.cancel=function(){c!==Ar&&eo(c),f=0,h=p=d=c=Ar},a.flush=function(){return c===Ar?u:e(Ho())},a}function Xe(o,s){if("function"!=typeof o||null!=s&&"function"!=typeof s)throw new Wi(Lr);var r=function(){var t=arguments,e=s?s.apply(this,t):t[0],i=r.cache;if(i.has(e))return i.get(e);var n=o.apply(this,t);return r.cache=i.set(e,n)||i,n};return r.cache=new(Xe.Cache||a),r}function Ze(e){if("function"!=typeof e)throw new Wi(Lr);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Ke(t,e){return t===e||t!=t&&e!=e}function $e(t){return null!=t&&ii(t.length)&&!ti(t)}function Je(t){return oi(t)&&$e(t)}function Qe(t){if(!oi(t))return!1;var e=R(t);return e==Xr||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ri(t)}function ti(t){if(!ni(t))return!1;var e=R(t);return e==Zr||e==Kr||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ei(t){return"number"==typeof t&&t==ui(t)}function ii(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=jr}function ni(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function oi(t){return null!=t&&"object"==typeof t}function si(t){return"number"==typeof t||oi(t)&&R(t)==Jr}function ri(t){if(!oi(t)||R(t)!=Qr)return!1;var e=rn(t);if(null===e)return!0;var i=Xi.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&qi.call(i)==Ji}function ai(t){return"string"==typeof t||!ts(t)&&oi(t)&&R(t)==na}function hi(t){return"symbol"==typeof t||oi(t)&&R(t)==oa}function di(t){if(!t)return[];if($e(t))return ai(t)?Nr(t):It(t);if(un&&t[un])return function(t){for(var e,i=[];!(e=t.next()).done;)i.push(e.value);return i}(t[un]());var e=ro(t);return(e==$r?Or:e==ia?Ir:wi)(t)}function li(t){return t?(t=pi(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ui(t){var e=li(t),i=e%1;return e==e?i?e-i:e:0}function ci(t){return t?c(ui(t),0,Wr):0}function pi(t){if("number"==typeof t)return t;if(hi(t))return Hr;if(ni(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ni(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=_r(t);var i=Wa.test(t);return i||Ga.test(t)?oh(t.slice(2),i?2:8):Ha.test(t)?Hr:+t}function fi(t){return Pt(t,bi(t))}function mi(t){return null==t?"":pt(t)}function vi(t,e,i){var n=null==t?Ar:P(t,e);return n===Ar?i:n}function gi(t,e){return null!=t&&ce(t,e,z)}function yi(t){return $e(t)?n(t):V(t)}function bi(t){return $e(t)?n(t,!0):U(t)}function _i(t,i){if(null==t)return{};var e=sr(se(t),function(t){return[t]});return i=he(i),tt(t,e,function(t,e){return i(t,e[0])})}function wi(t){return null==t?[]:xr(t,yi(t))}function xi(t){return Ns(mi(t).toLowerCase())}function ki(t){return(t=mi(t))&&t.replace(Ua,ph).replace(Ka,"")}function Si(t,e,i){return t=mi(t),(e=i?Ar:e)===Ar?function(t){return Ja.test(t)}(t)?function(t){return t.match($a)||[]}(t):function(t){return t.match(La)||[]}(t):t.match(e)||[]}function Di(t){return function(){return t}}function Ei(t){return t}function Mi(t){return G("function"==typeof t?t:k(t,1))}function Oi(n,e,t){var i=yi(e),o=I(e,i);null!=t||ni(e)&&(o.length||!i.length)||(t=e,e=n,n=this,o=I(e,yi(e)));var s=!(ni(t)&&"chain"in t&&!t.chain),r=ti(n);return tr(o,function(t){var i=e[t];n[t]=i,r&&(n.prototype[t]=function(){var t=this.__chain__;if(s||t){var e=n(this.__wrapped__);return(e.__actions__=It(this.__actions__)).push({func:i,args:arguments,thisArg:n}),e.__chain__=t,e}return i.apply(n,rr([this.value()],arguments))})}),n}function Ci(){}function Ti(t){return ge(t)?vr(Oe(t)):function(e){return function(t){return P(t,e)}}(t)}function Ii(){return[]}function Pi(){return!1}var Ni,Ri=(e=null==e?sh:vh.defaults(sh.Object(),e,vh.pick(sh,Qa))).Array,Ai=e.Date,Li=e.Error,zi=e.Function,Bi=e.Math,Fi=e.Object,ji=e.RegExp,Hi=e.String,Wi=e.TypeError,Yi=Ri.prototype,Gi=zi.prototype,Vi=Fi.prototype,Ui=e["__core-js_shared__"],qi=Gi.toString,Xi=Vi.hasOwnProperty,Zi=0,Ki=(Ni=/[^.]+$/.exec(Ui&&Ui.keys&&Ui.keys.IE_PROTO||""))?"Symbol(src)_1."+Ni:"",$i=Vi.toString,Ji=qi.call(Fi),Qi=sh._,tn=ji("^"+qi.call(Xi).replace(Ta,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),en=rh?e.Buffer:Ar,nn=e.Symbol,on=e.Uint8Array,sn=en?en.allocUnsafe:Ar,rn=Cr(Fi.getPrototypeOf,Fi),an=Fi.create,hn=Vi.propertyIsEnumerable,dn=Yi.splice,ln=nn?nn.isConcatSpreadable:Ar,un=nn?nn.iterator:Ar,cn=nn?nn.toStringTag:Ar,pn=function(){try{var t=ue(Fi,"defineProperty");return t({},"",{}),t}catch(t){}}(),fn=e.clearTimeout!==sh.clearTimeout&&e.clearTimeout,mn=Ai&&Ai.now!==sh.Date.now&&Ai.now,vn=e.setTimeout!==sh.setTimeout&&e.setTimeout,gn=Bi.ceil,yn=Bi.floor,bn=Fi.getOwnPropertySymbols,_n=en?en.isBuffer:Ar,wn=e.isFinite,xn=Yi.join,kn=Cr(Fi.keys,Fi),Sn=Bi.max,Dn=Bi.min,En=Ai.now,Mn=e.parseInt,On=Bi.random,Cn=Yi.reverse,Tn=ue(e,"DataView"),In=ue(e,"Map"),Pn=ue(e,"Promise"),Nn=ue(e,"Set"),Rn=ue(e,"WeakMap"),An=ue(Fi,"create"),Ln=Rn&&new Rn,zn={},Bn=Ce(Tn),Fn=Ce(In),jn=Ce(Pn),Hn=Ce(Nn),Wn=Ce(Rn),Yn=nn?nn.prototype:Ar,Gn=Yn?Yn.valueOf:Ar,Vn=Yn?Yn.toString:Ar,Un=function(t){if(!ni(t))return{};if(an)return an(t);qn.prototype=t;var e=new qn;return qn.prototype=Ar,e};function qn(){}v.templateSettings={escape:Sa,evaluate:Da,interpolate:Ea,variable:"",imports:{_:v}},(v.prototype=s.prototype).constructor=v,(g.prototype=Un(s.prototype)).constructor=g,(y.prototype=Un(s.prototype)).constructor=y,i.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},i.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},i.prototype.get=function(t){var e=this.__data__;if(An){var i=e[t];return i===zr?Ar:i}return Xi.call(e,t)?e[t]:Ar},i.prototype.has=function(t){var e=this.__data__;return An?e[t]!==Ar:Xi.call(e,t)},i.prototype.set=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=An&&e===Ar?zr:e,this},o.prototype.clear=function(){this.__data__=[],this.size=0},o.prototype.delete=function(t){var e=this.__data__,i=h(e,t);return!(i<0||(i==e.length-1?e.pop():dn.call(e,i,1),--this.size,0))},o.prototype.get=function(t){var e=this.__data__,i=h(e,t);return i<0?Ar:e[i][1]},o.prototype.has=function(t){return-1<h(this.__data__,t)},o.prototype.set=function(t,e){var i=this.__data__,n=h(i,t);return n<0?(++this.size,i.push([t,e])):i[n][1]=e,this},a.prototype.clear=function(){this.size=0,this.__data__={hash:new i,map:new(In||o),string:new i}},a.prototype.delete=function(t){var e=de(this,t).delete(t);return this.size-=e?1:0,e},a.prototype.get=function(t){return de(this,t).get(t)},a.prototype.has=function(t){return de(this,t).has(t)},a.prototype.set=function(t,e){var i=de(this,t),n=i.size;return i.set(t,e),this.size+=i.size==n?0:1,this},b.prototype.add=b.prototype.push=function(t){return this.__data__.set(t,zr),this},b.prototype.has=function(t){return this.__data__.has(t)},_.prototype.clear=function(){this.__data__=new o,this.size=0},_.prototype.delete=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i},_.prototype.get=function(t){return this.__data__.get(t)},_.prototype.has=function(t){return this.__data__.has(t)},_.prototype.set=function(t,e){var i=this.__data__;if(i instanceof o){var n=i.__data__;if(!In||n.length<199)return n.push([t,e]),this.size=++i.size,this;i=this.__data__=new a(n)}return i.set(t,e),this.size=i.size,this};var Xn=At(C),Zn=At(T,!0),Kn=Lt(),$n=Lt(!0),Jn=Ln?function(t,e){return Ln.set(t,e),t}:Ei,Qn=pn?function(t,e){return pn(t,"toString",{configurable:!0,enumerable:!1,value:Di(e),writable:!0})}:Ei,to=st,eo=fn||function(t){return sh.clearTimeout(t)},io=Nn&&1/Ir(new Nn([,-0]))[1]==1/0?function(t){return new Nn(t)}:Ci,no=Ln?function(t){return Ln.get(t)}:Ci,oo=bn?function(e){return null==e?[]:(e=Fi(e),ir(bn(e),function(t){return hn.call(e,t)}))}:Ii,so=bn?function(t){for(var e=[];t;)rr(e,oo(t)),t=rn(t);return e}:Ii,ro=R;(Tn&&ro(new Tn(new ArrayBuffer(1)))!=aa||In&&ro(new In)!=$r||Pn&&ro(Pn.resolve())!=ta||Nn&&ro(new Nn)!=ia||Rn&&ro(new Rn)!=sa)&&(ro=function(t){var e=R(t),i=e==Qr?t.constructor:Ar,n=i?Ce(i):"";if(n)switch(n){case Bn:return aa;case Fn:return $r;case jn:return ta;case Hn:return ia;case Wn:return sa}return e});var ao,ho,lo=Ui?ti:Pi,uo=Ee(Jn),co=vn||function(t,e){return sh.setTimeout(t,e)},po=Ee(Qn),fo=(ho=(ao=Xe(function(t){var o=[];return 46===t.charCodeAt(0)&&o.push(""),t.replace(Ca,function(t,e,i,n){o.push(i?n.replace(Ba,"$1"):e||t)}),o},function(t){return 500===ho.size&&ho.clear(),t})).cache,ao),mo=st(function(t,e){return Je(t)?S(t,O(e,1,Je,!0)):[]}),vo=st(function(t,e){var i=Ae(e);return Je(i)&&(i=Ar),Je(t)?S(t,O(e,1,Je,!0),he(i,2)):[]}),go=st(function(t,e){var i=Ae(e);return Je(i)&&(i=Ar),Je(t)?S(t,O(e,1,Je,!0),Ar,i):[]}),yo=st(function(t){var e=sr(t,wt);return e.length&&e[0]===t[0]?B(e):[]}),bo=st(function(t){var e=Ae(t),i=sr(t,wt);return e===Ae(i)?e=Ar:i.pop(),i.length&&i[0]===t[0]?B(i,he(e,2)):[]}),_o=st(function(t){var e=Ae(t),i=sr(t,wt);return(e="function"==typeof e?e:Ar)&&i.pop(),i.length&&i[0]===t[0]?B(i,Ar,e):[]}),wo=st(Le),xo=ne(function(t,e){var i=null==t?0:t.length,n=u(t,e);return it(t,sr(e,function(t){return me(t,i)?+t:t}).sort(Ot)),n}),ko=st(function(t){return ft(O(t,1,Je,!0))}),So=st(function(t){var e=Ae(t);return Je(e)&&(e=Ar),ft(O(t,1,Je,!0),he(e,2))}),Do=st(function(t){var e=Ae(t);return e="function"==typeof e?e:Ar,ft(O(t,1,Je,!0),Ar,e)}),Eo=st(function(t,e){return Je(t)?S(t,e):[]}),Mo=st(function(t){return bt(ir(t,Je))}),Oo=st(function(t){var e=Ae(t);return Je(e)&&(e=Ar),bt(ir(t,Je),he(e,2))}),Co=st(function(t){var e=Ae(t);return e="function"==typeof e?e:Ar,bt(ir(t,Je),Ar,e)}),To=st(Be),Io=st(function(t){var e=t.length,i=1<e?t[e-1]:Ar;return i="function"==typeof i?(t.pop(),i):Ar,Fe(t,i)}),Po=ne(function(e){function t(t){return u(t,e)}var i=e.length,n=i?e[0]:0,o=this.__wrapped__;return!(1<i||this.__actions__.length)&&o instanceof y&&me(n)?((o=o.slice(n,+n+(i?1:0))).__actions__.push({func:He,args:[t],thisArg:Ar}),new g(o,this.__chain__).thru(function(t){return i&&!t.length&&t.push(Ar),t})):this.thru(t)}),No=Nt(function(t,e,i){Xi.call(t,i)?++t[i]:l(t,i,1)}),Ro=jt(Ie),Ao=jt(Pe),Lo=Nt(function(t,e,i){Xi.call(t,i)?t[i].push(e):l(t,i,[e])}),zo=st(function(t,e,i){var n=-1,o="function"==typeof e,s=$e(t)?Ri(t.length):[];return Xn(t,function(t){s[++n]=o?Js(e,t,i):F(t,e,i)}),s}),Bo=Nt(function(t,e,i){l(t,i,e)}),Fo=Nt(function(t,e,i){t[i?0:1].push(e)},function(){return[[],[]]}),jo=st(function(t,e){if(null==t)return[];var i=e.length;return 1<i&&ve(t,e[0],e[1])?e=[]:2<i&&ve(e[0],e[1],e[2])&&(e=[e[0]]),Q(t,O(e,1),[])}),Ho=mn||function(){return sh.Date.now()},Wo=st(function(t,e,i){var n=1;if(i.length){var o=Tr(i,ae(Wo));n|=32}return Jt(t,n,e,i,o)}),Yo=st(function(t,e,i){var n=3;if(i.length){var o=Tr(i,ae(Yo));n|=32}return Jt(e,n,t,i,o)}),Go=st(function(t,e){return f(t,1,e)}),Vo=st(function(t,e,i){return f(t,pi(e)||0,i)});Xe.Cache=a;var Uo,qo=to(function(n,o){var s=(o=1==o.length&&ts(o[0])?sr(o[0],wr(he())):sr(O(o,1),wr(he()))).length;return st(function(t){for(var e=-1,i=Dn(t.length,s);++e<i;)t[e]=o[e].call(this,t[e]);return Js(n,this,t)})}),Xo=st(function(t,e){return Jt(t,32,Ar,e,Tr(e,ae(Xo)))}),Zo=st(function(t,e){return Jt(t,64,Ar,e,Tr(e,ae(Zo)))}),Ko=ne(function(t,e){return Jt(t,256,Ar,Ar,Ar,e)}),$o=Xt(A),Jo=Xt(function(t,e){return e<=t}),Qo=j(function(){return arguments}())?j:function(t){return oi(t)&&Xi.call(t,"callee")&&!hn.call(t,"callee")},ts=Ri.isArray,es=ah?wr(ah):function(t){return oi(t)&&R(t)==ra},is=_n||Pi,ns=hh?wr(hh):function(t){return oi(t)&&R(t)==qr},os=dh?wr(dh):function(t){return oi(t)&&ro(t)==$r},ss=lh?wr(lh):function(t){return oi(t)&&R(t)==ea},rs=uh?wr(uh):function(t){return oi(t)&&ro(t)==ia},as=ch?wr(ch):function(t){return oi(t)&&ii(t.length)&&!!eh[R(t)]},hs=Xt(q),ds=Xt(function(t,e){return t<=e}),ls=Rt(function(t,e){if(be(e)||$e(e))return Pt(e,yi(e),t),Ar;for(var i in e)Xi.call(e,i)&&w(t,i,e[i])}),us=Rt(function(t,e){Pt(e,bi(e),t)}),cs=Rt(function(t,e,i,n){Pt(e,bi(e),t,n)}),ps=Rt(function(t,e,i,n){Pt(e,yi(e),t,n)}),fs=ne(u),ms=st(function(t,e){t=Fi(t);var i=-1,n=e.length,o=2<n?e[2]:Ar;for(o&&ve(e[0],e[1],o)&&(n=1);++i<n;)for(var s=e[i],r=bi(s),a=-1,h=r.length;++a<h;){var d=r[a],l=t[d];(l===Ar||Ke(l,Vi[d])&&!Xi.call(t,d))&&(t[d]=s[d])}return t}),vs=st(function(t){return t.push(Ar,te),Js(ws,Ar,t)}),gs=Yt(function(t,e,i){null!=e&&"function"!=typeof e.toString&&(e=$i.call(e)),t[e]=i},Di(Ei)),ys=Yt(function(t,e,i){null!=e&&"function"!=typeof e.toString&&(e=$i.call(e)),Xi.call(t,e)?t[e].push(i):t[e]=[i]},he),bs=st(F),_s=Rt(function(t,e,i){$(t,e,i)}),ws=Rt(function(t,e,i,n){$(t,e,i,n)}),xs=ne(function(e,t){var i={};if(null==e)return i;var n=!1;t=sr(t,function(t){return t=kt(t,e),n=n||1<t.length,t}),Pt(e,se(e),i),n&&(i=k(i,7,ee));for(var o=t.length;o--;)mt(i,t[o]);return i}),ks=ne(function(t,e){return null==t?{}:function(i,t){return tt(i,t,function(t,e){return gi(i,e)})}(t,e)}),Ss=$t(yi),Ds=$t(bi),Es=Bt(function(t,e,i){return e=e.toLowerCase(),t+(i?xi(e):e)}),Ms=Bt(function(t,e,i){return t+(i?"-":"")+e.toLowerCase()}),Os=Bt(function(t,e,i){return t+(i?" ":"")+e.toLowerCase()}),Cs=zt("toLowerCase"),Ts=Bt(function(t,e,i){return t+(i?"_":"")+e.toLowerCase()}),Is=Bt(function(t,e,i){return t+(i?" ":"")+Ns(e)}),Ps=Bt(function(t,e,i){return t+(i?" ":"")+e.toUpperCase()}),Ns=zt("toUpperCase"),Rs=st(function(t,e){try{return Js(t,Ar,e)}catch(t){return Qe(t)?t:new Li(t)}}),As=ne(function(e,t){return tr(t,function(t){t=Oe(t),l(e,t,Wo(e[t],e))}),e}),Ls=Ht(),zs=Ht(!0),Bs=st(function(e,i){return function(t){return F(t,e,i)}}),Fs=st(function(e,i){return function(t){return F(e,t,i)}}),js=Vt(sr),Hs=Vt(er),Ws=Vt(dr),Ys=qt(),Gs=qt(!0),Vs=Gt(function(t,e){return t+e},0),Us=Kt("ceil"),qs=Gt(function(t,e){return t/e},1),Xs=Kt("floor"),Zs=Gt(function(t,e){return t*e},1),Ks=Kt("round"),$s=Gt(function(t,e){return t-e},0);return v.after=function(t,e){if("function"!=typeof e)throw new Wi(Lr);return t=ui(t),function(){if(--t<1)return e.apply(this,arguments)}},v.ary=Ve,v.assign=ls,v.assignIn=us,v.assignInWith=cs,v.assignWith=ps,v.at=fs,v.before=Ue,v.bind=Wo,v.bindAll=As,v.bindKey=Yo,v.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return ts(t)?t:[t]},v.chain=je,v.chunk=function(t,e,i){e=(i?ve(t,e,i):e===Ar)?1:Sn(ui(e),0);var n=null==t?0:t.length;if(!n||e<1)return[];for(var o=0,s=0,r=Ri(gn(n/e));o<n;)r[s++]=at(t,o,o+=e);return r},v.compact=function(t){for(var e=-1,i=null==t?0:t.length,n=0,o=[];++e<i;){var s=t[e];s&&(o[n++]=s)}return o},v.concat=function(){var t=arguments.length;if(!t)return[];for(var e=Ri(t-1),i=arguments[0],n=t;n--;)e[n-1]=arguments[n];return rr(ts(i)?It(i):[i],O(e,1))},v.cond=function(n){var o=null==n?0:n.length,e=he();return n=o?sr(n,function(t){if("function"!=typeof t[1])throw new Wi(Lr);return[e(t[0]),t[1]]}):[],st(function(t){for(var e=-1;++e<o;){var i=n[e];if(Js(i[0],this,t))return Js(i[1],this,t)}})},v.conforms=function(t){return function(e){var i=yi(e);return function(t){return p(t,e,i)}}(k(t,1))},v.constant=Di,v.countBy=No,v.create=function(t,e){var i=Un(t);return null==e?i:x(i,e)},v.curry=function t(e,i,n){var o=Jt(e,8,Ar,Ar,Ar,Ar,Ar,i=n?Ar:i);return o.placeholder=t.placeholder,o},v.curryRight=function t(e,i,n){var o=Jt(e,16,Ar,Ar,Ar,Ar,Ar,i=n?Ar:i);return o.placeholder=t.placeholder,o},v.debounce=qe,v.defaults=ms,v.defaultsDeep=vs,v.defer=Go,v.delay=Vo,v.difference=mo,v.differenceBy=vo,v.differenceWith=go,v.drop=function(t,e,i){var n=null==t?0:t.length;return n?at(t,(e=i||e===Ar?1:ui(e))<0?0:e,n):[]},v.dropRight=function(t,e,i){var n=null==t?0:t.length;return n?at(t,0,(e=n-(e=i||e===Ar?1:ui(e)))<0?0:e):[]},v.dropRightWhile=function(t,e){return t&&t.length?gt(t,he(e,3),!0,!0):[]},v.dropWhile=function(t,e){return t&&t.length?gt(t,he(e,3),!0):[]},v.fill=function(t,e,i,n){var o=null==t?0:t.length;return o?(i&&"number"!=typeof i&&ve(t,e,i)&&(i=0,n=o),function(t,e,i,n){var o=t.length;for((i=ui(i))<0&&(i=o<-i?0:o+i),(n=n===Ar||o<n?o:ui(n))<0&&(n+=o),n=n<i?0:ci(n);i<n;)t[i++]=e;return t}(t,e,i,n)):[]},v.filter=function(t,e){return(ts(t)?ir:M)(t,he(e,3))},v.flatMap=function(t,e){return O(Ge(t,e),1)},v.flatMapDeep=function(t,e){return O(Ge(t,e),1/0)},v.flatMapDepth=function(t,e,i){return i=i===Ar?1:ui(i),O(Ge(t,e),i)},v.flatten=Ne,v.flattenDeep=function(t){return null!=t&&t.length?O(t,1/0):[]},v.flattenDepth=function(t,e){return null!=t&&t.length?O(t,e=e===Ar?1:ui(e)):[]},v.flip=function(t){return Jt(t,512)},v.flow=Ls,v.flowRight=zs,v.fromPairs=function(t){for(var e=-1,i=null==t?0:t.length,n={};++e<i;){var o=t[e];n[o[0]]=o[1]}return n},v.functions=function(t){return null==t?[]:I(t,yi(t))},v.functionsIn=function(t){return null==t?[]:I(t,bi(t))},v.groupBy=Lo,v.initial=function(t){return null!=t&&t.length?at(t,0,-1):[]},v.intersection=yo,v.intersectionBy=bo,v.intersectionWith=_o,v.invert=gs,v.invertBy=ys,v.invokeMap=zo,v.iteratee=Mi,v.keyBy=Bo,v.keys=yi,v.keysIn=bi,v.map=Ge,v.mapKeys=function(t,n){var o={};return n=he(n,3),C(t,function(t,e,i){l(o,n(t,e,i),t)}),o},v.mapValues=function(t,n){var o={};return n=he(n,3),C(t,function(t,e,i){l(o,e,n(t,e,i))}),o},v.matches=function(t){return Z(k(t,1))},v.matchesProperty=function(t,e){return K(t,k(e,1))},v.memoize=Xe,v.merge=_s,v.mergeWith=ws,v.method=Bs,v.methodOf=Fs,v.mixin=Oi,v.negate=Ze,v.nthArg=function(e){return e=ui(e),st(function(t){return J(t,e)})},v.omit=xs,v.omitBy=function(t,e){return _i(t,Ze(he(e)))},v.once=function(t){return Ue(2,t)},v.orderBy=function(t,e,i,n){return null==t?[]:(ts(e)||(e=null==e?[]:[e]),ts(i=n?Ar:i)||(i=null==i?[]:[i]),Q(t,e,i))},v.over=js,v.overArgs=qo,v.overEvery=Hs,v.overSome=Ws,v.partial=Xo,v.partialRight=Zo,v.partition=Fo,v.pick=ks,v.pickBy=_i,v.property=Ti,v.propertyOf=function(e){return function(t){return null==e?Ar:P(e,t)}},v.pull=wo,v.pullAll=Le,v.pullAllBy=function(t,e,i){return t&&t.length&&e&&e.length?et(t,e,he(i,2)):t},v.pullAllWith=function(t,e,i){return t&&t.length&&e&&e.length?et(t,e,Ar,i):t},v.pullAt=xo,v.range=Ys,v.rangeRight=Gs,v.rearg=Ko,v.reject=function(t,e){return(ts(t)?ir:M)(t,Ze(he(e,3)))},v.remove=function(t,e){var i=[];if(!t||!t.length)return i;var n=-1,o=[],s=t.length;for(e=he(e,3);++n<s;){var r=t[n];e(r,n,t)&&(i.push(r),o.push(n))}return it(t,o),i},v.rest=function(t,e){if("function"!=typeof t)throw new Wi(Lr);return st(t,e=e===Ar?e:ui(e))},v.reverse=ze,v.sampleSize=function(t,e,i){return e=(i?ve(t,e,i):e===Ar)?1:ui(e),(ts(t)?function(t,e){return Me(It(t),c(e,0,t.length))}:function(t,e){var i=wi(t);return Me(i,c(e,0,i.length))})(t,e)},v.set=function(t,e,i){return null==t?t:rt(t,e,i)},v.setWith=function(t,e,i,n){return n="function"==typeof n?n:Ar,null==t?t:rt(t,e,i,n)},v.shuffle=function(t){return(ts(t)?function(t){return Me(It(t))}:function(t){return Me(wi(t))})(t)},v.slice=function(t,e,i){var n=null==t?0:t.length;return n?(i=i&&"number"!=typeof i&&ve(t,e,i)?(e=0,n):(e=null==e?0:ui(e),i===Ar?n:ui(i)),at(t,e,i)):[]},v.sortBy=jo,v.sortedUniq=function(t){return t&&t.length?ut(t):[]},v.sortedUniqBy=function(t,e){return t&&t.length?ut(t,he(e,2)):[]},v.split=function(t,e,i){return i&&"number"!=typeof i&&ve(t,e,i)&&(e=i=Ar),(i=i===Ar?Wr:i>>>0)?(t=mi(t))&&("string"==typeof e||null!=e&&!ss(e))&&(!(e=pt(e))&&Mr(t))?St(Nr(t),0,i):t.split(e,i):[]},v.spread=function(n,o){if("function"!=typeof n)throw new Wi(Lr);return o=null==o?0:Sn(ui(o),0),st(function(t){var e=t[o],i=St(t,0,o);return e&&rr(i,e),Js(n,this,i)})},v.tail=function(t){var e=null==t?0:t.length;return e?at(t,1,e):[]},v.take=function(t,e,i){return t&&t.length?at(t,0,(e=i||e===Ar?1:ui(e))<0?0:e):[]},v.takeRight=function(t,e,i){var n=null==t?0:t.length;return n?at(t,(e=n-(e=i||e===Ar?1:ui(e)))<0?0:e,n):[]},v.takeRightWhile=function(t,e){return t&&t.length?gt(t,he(e,3),!1,!0):[]},v.takeWhile=function(t,e){return t&&t.length?gt(t,he(e,3)):[]},v.tap=function(t,e){return e(t),t},v.throttle=function(t,e,i){var n=!0,o=!0;if("function"!=typeof t)throw new Wi(Lr);return ni(i)&&(n="leading"in i?!!i.leading:n,o="trailing"in i?!!i.trailing:o),qe(t,e,{leading:n,maxWait:e,trailing:o})},v.thru=He,v.toArray=di,v.toPairs=Ss,v.toPairsIn=Ds,v.toPath=function(t){return ts(t)?sr(t,Oe):hi(t)?[t]:It(fo(mi(t)))},v.toPlainObject=fi,v.transform=function(t,n,o){var e=ts(t),i=e||is(t)||as(t);if(n=he(n,4),null==o){var s=t&&t.constructor;o=i?e?new s:[]:ni(t)&&ti(s)?Un(rn(t)):{}}return(i?tr:C)(t,function(t,e,i){return n(o,t,e,i)}),o},v.unary=function(t){return Ve(t,1)},v.union=ko,v.unionBy=So,v.unionWith=Do,v.uniq=function(t){return t&&t.length?ft(t):[]},v.uniqBy=function(t,e){return t&&t.length?ft(t,he(e,2)):[]},v.uniqWith=function(t,e){return e="function"==typeof e?e:Ar,t&&t.length?ft(t,Ar,e):[]},v.unset=function(t,e){return null==t||mt(t,e)},v.unzip=Be,v.unzipWith=Fe,v.update=function(t,e,i){return null==t?t:vt(t,e,xt(i))},v.updateWith=function(t,e,i,n){return n="function"==typeof n?n:Ar,null==t?t:vt(t,e,xt(i),n)},v.values=wi,v.valuesIn=function(t){return null==t?[]:xr(t,bi(t))},v.without=Eo,v.words=Si,v.wrap=function(t,e){return Xo(xt(e),t)},v.xor=Mo,v.xorBy=Oo,v.xorWith=Co,v.zip=To,v.zipObject=function(t,e){return _t(t||[],e||[],w)},v.zipObjectDeep=function(t,e){return _t(t||[],e||[],rt)},v.zipWith=Io,v.entries=Ss,v.entriesIn=Ds,v.extend=us,v.extendWith=cs,Oi(v,v),v.add=Vs,v.attempt=Rs,v.camelCase=Es,v.capitalize=xi,v.ceil=Us,v.clamp=function(t,e,i){return i===Ar&&(i=e,e=Ar),i!==Ar&&(i=(i=pi(i))==i?i:0),e!==Ar&&(e=(e=pi(e))==e?e:0),c(pi(t),e,i)},v.clone=function(t){return k(t,4)},v.cloneDeep=function(t){return k(t,5)},v.cloneDeepWith=function(t,e){return k(t,5,e="function"==typeof e?e:Ar)},v.cloneWith=function(t,e){return k(t,4,e="function"==typeof e?e:Ar)},v.conformsTo=function(t,e){return null==e||p(t,e,yi(e))},v.deburr=ki,v.defaultTo=function(t,e){return null==t||t!=t?e:t},v.divide=qs,v.endsWith=function(t,e,i){t=mi(t),e=pt(e);var n=t.length,o=i=i===Ar?n:c(ui(i),0,n);return 0<=(i-=e.length)&&t.slice(i,o)==e},v.eq=Ke,v.escape=function(t){return(t=mi(t))&&ka.test(t)?t.replace(wa,fh):t},v.escapeRegExp=function(t){return(t=mi(t))&&Ia.test(t)?t.replace(Ta,"\\$&"):t},v.every=function(t,e,i){var n=ts(t)?er:D;return i&&ve(t,e,i)&&(e=Ar),n(t,he(e,3))},v.find=Ro,v.findIndex=Ie,v.findKey=function(t,e){return lr(t,he(e,3),C)},v.findLast=Ao,v.findLastIndex=Pe,v.findLastKey=function(t,e){return lr(t,he(e,3),T)},v.floor=Xs,v.forEach=We,v.forEachRight=Ye,v.forIn=function(t,e){return null==t?t:Kn(t,he(e,3),bi)},v.forInRight=function(t,e){return null==t?t:$n(t,he(e,3),bi)},v.forOwn=function(t,e){return t&&C(t,he(e,3))},v.forOwnRight=function(t,e){return t&&T(t,he(e,3))},v.get=vi,v.gt=$o,v.gte=Jo,v.has=function(t,e){return null!=t&&ce(t,e,L)},v.hasIn=gi,v.head=Re,v.identity=Ei,v.includes=function(t,e,i,n){t=$e(t)?t:wi(t),i=i&&!n?ui(i):0;var o=t.length;return i<0&&(i=Sn(o+i,0)),ai(t)?i<=o&&-1<t.indexOf(e,i):!!o&&-1<cr(t,e,i)},v.indexOf=function(t,e,i){var n=null==t?0:t.length;if(!n)return-1;var o=null==i?0:ui(i);return o<0&&(o=Sn(n+o,0)),cr(t,e,o)},v.inRange=function(t,e,i){return e=li(e),i===Ar?(i=e,e=0):i=li(i),function(t,e,i){return t>=Dn(e,i)&&t<Sn(e,i)}(t=pi(t),e,i)},v.invoke=bs,v.isArguments=Qo,v.isArray=ts,v.isArrayBuffer=es,v.isArrayLike=$e,v.isArrayLikeObject=Je,v.isBoolean=function(t){return!0===t||!1===t||oi(t)&&R(t)==Ur},v.isBuffer=is,v.isDate=ns,v.isElement=function(t){return oi(t)&&1===t.nodeType&&!ri(t)},v.isEmpty=function(t){if(null==t)return!0;if($e(t)&&(ts(t)||"string"==typeof t||"function"==typeof t.splice||is(t)||as(t)||Qo(t)))return!t.length;var e=ro(t);if(e==$r||e==ia)return!t.size;if(be(t))return!V(t).length;for(var i in t)if(Xi.call(t,i))return!1;return!0},v.isEqual=function(t,e){return H(t,e)},v.isEqualWith=function(t,e,i){var n=(i="function"==typeof i?i:Ar)?i(t,e):Ar;return n===Ar?H(t,e,Ar,i):!!n},v.isError=Qe,v.isFinite=function(t){return"number"==typeof t&&wn(t)},v.isFunction=ti,v.isInteger=ei,v.isLength=ii,v.isMap=os,v.isMatch=function(t,e){return t===e||W(t,e,le(e))},v.isMatchWith=function(t,e,i){return i="function"==typeof i?i:Ar,W(t,e,le(e),i)},v.isNaN=function(t){return si(t)&&t!=+t},v.isNative=function(t){if(lo(t))throw new Li("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Y(t)},v.isNil=function(t){return null==t},v.isNull=function(t){return null===t},v.isNumber=si,v.isObject=ni,v.isObjectLike=oi,v.isPlainObject=ri,v.isRegExp=ss,v.isSafeInteger=function(t){return ei(t)&&-jr<=t&&t<=jr},v.isSet=rs,v.isString=ai,v.isSymbol=hi,v.isTypedArray=as,v.isUndefined=function(t){return t===Ar},v.isWeakMap=function(t){return oi(t)&&ro(t)==sa},v.isWeakSet=function(t){return oi(t)&&"[object WeakSet]"==R(t)},v.join=function(t,e){return null==t?"":xn.call(t,e)},v.kebabCase=Ms,v.last=Ae,v.lastIndexOf=function(t,e,i){var n=null==t?0:t.length;if(!n)return-1;var o=n;return i!==Ar&&(o=(o=ui(i))<0?Sn(n+o,0):Dn(o,n-1)),e==e?function(t,e,i){for(var n=i+1;n--;)if(t[n]===e)return n;return n}(t,e,o):ur(t,fr,o,!0)},v.lowerCase=Os,v.lowerFirst=Cs,v.lt=hs,v.lte=ds,v.max=function(t){return t&&t.length?E(t,Ei,A):Ar},v.maxBy=function(t,e){return t&&t.length?E(t,he(e,2),A):Ar},v.mean=function(t){return mr(t,Ei)},v.meanBy=function(t,e){return mr(t,he(e,2))},v.min=function(t){return t&&t.length?E(t,Ei,q):Ar},v.minBy=function(t,e){return t&&t.length?E(t,he(e,2),q):Ar},v.stubArray=Ii,v.stubFalse=Pi,v.stubObject=function(){return{}},v.stubString=function(){return""},v.stubTrue=function(){return!0},v.multiply=Zs,v.nth=function(t,e){return t&&t.length?J(t,ui(e)):Ar},v.noConflict=function(){return sh._===this&&(sh._=Qi),this},v.noop=Ci,v.now=Ho,v.pad=function(t,e,i){t=mi(t);var n=(e=ui(e))?Pr(t):0;if(!e||e<=n)return t;var o=(e-n)/2;return Ut(yn(o),i)+t+Ut(gn(o),i)},v.padEnd=function(t,e,i){t=mi(t);var n=(e=ui(e))?Pr(t):0;return e&&n<e?t+Ut(e-n,i):t},v.padStart=function(t,e,i){t=mi(t);var n=(e=ui(e))?Pr(t):0;return e&&n<e?Ut(e-n,i)+t:t},v.parseInt=function(t,e,i){return e=i||null==e?0:e&&+e,Mn(mi(t).replace(Pa,""),e||0)},v.random=function(t,e,i){if(i&&"boolean"!=typeof i&&ve(t,e,i)&&(e=i=Ar),i===Ar&&("boolean"==typeof e?(i=e,e=Ar):"boolean"==typeof t&&(i=t,t=Ar)),t===Ar&&e===Ar?(t=0,e=1):(t=li(t),e===Ar?(e=t,t=0):e=li(e)),e<t){var n=t;t=e,e=n}if(i||t%1||e%1){var o=On();return Dn(t+o*(e-t+nh("1e-"+((o+"").length-1))),e)}return nt(t,e)},v.reduce=function(t,e,i){var n=ts(t)?ar:gr,o=arguments.length<3;return n(t,he(e,4),i,o,Xn)},v.reduceRight=function(t,e,i){var n=ts(t)?hr:gr,o=arguments.length<3;return n(t,he(e,4),i,o,Zn)},v.repeat=function(t,e,i){return e=(i?ve(t,e,i):e===Ar)?1:ui(e),ot(mi(t),e)},v.replace=function(){var t=arguments,e=mi(t[0]);return t.length<3?e:e.replace(t[1],t[2])},v.result=function(t,e,i){var n=-1,o=(e=kt(e,t)).length;for(o||(o=1,t=Ar);++n<o;){var s=null==t?Ar:t[Oe(e[n])];s===Ar&&(n=o,s=i),t=ti(s)?s.call(t):s}return t},v.round=Ks,v.runInContext=t,v.sample=function(t){return(ts(t)?r:function(t){return r(wi(t))})(t)},v.size=function(t){if(null==t)return 0;if($e(t))return ai(t)?Pr(t):t.length;var e=ro(t);return e==$r||e==ia?t.size:V(t).length},v.snakeCase=Ts,v.some=function(t,e,i){var n=ts(t)?dr:ht;return i&&ve(t,e,i)&&(e=Ar),n(t,he(e,3))},v.sortedIndex=function(t,e){return dt(t,e)},v.sortedIndexBy=function(t,e,i){return lt(t,e,he(i,2))},v.sortedIndexOf=function(t,e){var i=null==t?0:t.length;if(i){var n=dt(t,e);if(n<i&&Ke(t[n],e))return n}return-1},v.sortedLastIndex=function(t,e){return dt(t,e,!0)},v.sortedLastIndexBy=function(t,e,i){return lt(t,e,he(i,2),!0)},v.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var i=dt(t,e,!0)-1;if(Ke(t[i],e))return i}return-1},v.startCase=Is,v.startsWith=function(t,e,i){return t=mi(t),i=null==i?0:c(ui(i),0,t.length),e=pt(e),t.slice(i,i+e.length)==e},v.subtract=$s,v.sum=function(t){return t&&t.length?yr(t,Ei):0},v.sumBy=function(t,e){return t&&t.length?yr(t,he(e,2)):0},v.template=function(r,t,e){var i=v.templateSettings;e&&ve(r,t,e)&&(t=Ar),r=mi(r),t=cs({},t,i,Qt);var a,h,n=cs({},t.imports,i.imports,Qt),o=yi(n),s=xr(n,o),d=0,l=t.interpolate||qa,u="__p += '",c=ji((t.escape||qa).source+"|"+l.source+"|"+(l===Ea?Fa:qa).source+"|"+(t.evaluate||qa).source+"|$","g"),p="//# sourceURL="+(Xi.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++th+"]")+"\n";r.replace(c,function(t,e,i,n,o,s){return i=i||n,u+=r.slice(d,s).replace(Xa,Er),e&&(a=!0,u+="' +\n__e("+e+") +\n'"),o&&(h=!0,u+="';\n"+o+";\n__p += '"),i&&(u+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),d=s+t.length,t}),u+="';\n";var f=Xi.call(t,"variable")&&t.variable;if(f){if(za.test(f))throw new Li("Invalid `variable` option passed into `_.template`")}else u="with (obj) {\n"+u+"\n}\n";u=(h?u.replace(ga,""):u).replace(ya,"$1").replace(ba,"$1;"),u="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(h?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+u+"return __p\n}";var m=Rs(function(){return zi(o,p+"return "+u).apply(Ar,s)});if(m.source=u,Qe(m))throw m;return m},v.times=function(t,e){if((t=ui(t))<1||jr<t)return[];var i=Wr,n=Dn(t,Wr);e=he(e),t-=Wr;for(var o=br(n,e);++i<t;)e(i);return o},v.toFinite=li,v.toInteger=ui,v.toLength=ci,v.toLower=function(t){return mi(t).toLowerCase()},v.toNumber=pi,v.toSafeInteger=function(t){return t?c(ui(t),-jr,jr):0===t?t:0},v.toString=mi,v.toUpper=function(t){return mi(t).toUpperCase()},v.trim=function(t,e,i){if((t=mi(t))&&(i||e===Ar))return _r(t);if(!t||!(e=pt(e)))return t;var n=Nr(t),o=Nr(e);return St(n,Sr(n,o),Dr(n,o)+1).join("")},v.trimEnd=function(t,e,i){if((t=mi(t))&&(i||e===Ar))return t.slice(0,Rr(t)+1);if(!t||!(e=pt(e)))return t;var n=Nr(t);return St(n,0,Dr(n,Nr(e))+1).join("")},v.trimStart=function(t,e,i){if((t=mi(t))&&(i||e===Ar))return t.replace(Pa,"");if(!t||!(e=pt(e)))return t;var n=Nr(t);return St(n,Sr(n,Nr(e))).join("")},v.truncate=function(t,e){var i=30,n="...";if(ni(e)){var o="separator"in e?e.separator:o;i="length"in e?ui(e.length):i,n="omission"in e?pt(e.omission):n}var s=(t=mi(t)).length;if(Mr(t)){var r=Nr(t);s=r.length}if(s<=i)return t;var a=i-Pr(n);if(a<1)return n;var h=r?St(r,0,a).join(""):t.slice(0,a);if(o===Ar)return h+n;if(r&&(a+=h.length-a),ss(o)){if(t.slice(a).search(o)){var d,l=h;for(o.global||(o=ji(o.source,mi(ja.exec(o))+"g")),o.lastIndex=0;d=o.exec(l);)var u=d.index;h=h.slice(0,u===Ar?a:u)}}else if(t.indexOf(pt(o),a)!=a){var c=h.lastIndexOf(o);-1<c&&(h=h.slice(0,c))}return h+n},v.unescape=function(t){return(t=mi(t))&&xa.test(t)?t.replace(_a,mh):t},v.uniqueId=function(t){var e=++Zi;return mi(t)+e},v.upperCase=Ps,v.upperFirst=Ns,v.each=We,v.eachRight=Ye,v.first=Re,Oi(v,(Uo={},C(v,function(t,e){Xi.call(v.prototype,e)||(Uo[e]=t)}),Uo),{chain:!1}),v.VERSION="4.17.21",tr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){v[t].placeholder=v}),tr(["drop","take"],function(i,n){y.prototype[i]=function(t){t=t===Ar?1:Sn(ui(t),0);var e=this.__filtered__&&!n?new y(this):this.clone();return e.__filtered__?e.__takeCount__=Dn(t,e.__takeCount__):e.__views__.push({size:Dn(t,Wr),type:i+(e.__dir__<0?"Right":"")}),e},y.prototype[i+"Right"]=function(t){return this.reverse()[i](t).reverse()}}),tr(["filter","map","takeWhile"],function(t,e){var i=e+1,n=1==i||3==i;y.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:he(t,3),type:i}),e.__filtered__=e.__filtered__||n,e}}),tr(["head","last"],function(t,e){var i="take"+(e?"Right":"");y.prototype[t]=function(){return this[i](1).value()[0]}}),tr(["initial","tail"],function(t,e){var i="drop"+(e?"":"Right");y.prototype[t]=function(){return this.__filtered__?new y(this):this[i](1)}}),y.prototype.compact=function(){return this.filter(Ei)},y.prototype.find=function(t){return this.filter(t).head()},y.prototype.findLast=function(t){return this.reverse().find(t)},y.prototype.invokeMap=st(function(e,i){return"function"==typeof e?new y(this):this.map(function(t){return F(t,e,i)})}),y.prototype.reject=function(t){return this.filter(Ze(he(t)))},y.prototype.slice=function(t,e){t=ui(t);var i=this;return i.__filtered__&&(0<t||e<0)?new y(i):(t<0?i=i.takeRight(-t):t&&(i=i.drop(t)),e!==Ar&&(i=(e=ui(e))<0?i.dropRight(-e):i.take(e-t)),i)},y.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},y.prototype.toArray=function(){return this.take(Wr)},C(y.prototype,function(u,t){var c=/^(?:filter|find|map|reject)|While$/.test(t),p=/^(?:head|last)$/.test(t),f=v[p?"take"+("last"==t?"Right":""):t],m=p||/^find/.test(t);f&&(v.prototype[t]=function(){function t(t){var e=f.apply(v,rr([t],i));return p&&r?e[0]:e}var e=this.__wrapped__,i=p?[1]:arguments,n=e instanceof y,o=i[0],s=n||ts(e);s&&c&&"function"==typeof o&&1!=o.length&&(n=s=!1);var r=this.__chain__,a=!!this.__actions__.length,h=m&&!r,d=n&&!a;if(m||!s)return h&&d?u.apply(this,i):(l=this.thru(t),h?p?l.value()[0]:l.value():l);e=d?e:new y(this);var l=u.apply(e,i);return l.__actions__.push({func:He,args:[t],thisArg:Ar}),new g(l,r)})}),tr(["pop","push","shift","sort","splice","unshift"],function(t){var i=Yi[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",o=/^(?:pop|shift)$/.test(t);v.prototype[t]=function(){var e=arguments;if(!o||this.__chain__)return this[n](function(t){return i.apply(ts(t)?t:[],e)});var t=this.value();return i.apply(ts(t)?t:[],e)}}),C(y.prototype,function(t,e){var i=v[e];if(i){var n=i.name+"";Xi.call(zn,n)||(zn[n]=[]),zn[n].push({name:e,func:i})}}),zn[Wt(Ar,2).name]=[{name:"wrapper",func:Ar}],y.prototype.clone=function(){var t=new y(this.__wrapped__);return t.__actions__=It(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=It(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=It(this.__views__),t},y.prototype.reverse=function(){if(this.__filtered__){var t=new y(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},y.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,i=ts(t),n=e<0,o=i?t.length:0,s=function(t,e,i){for(var n=-1,o=i.length;++n<o;){var s=i[n],r=s.size;switch(s.type){case"drop":t+=r;break;case"dropRight":e-=r;break;case"take":e=Dn(e,t+r);break;case"takeRight":t=Sn(t,e-r)}}return{start:t,end:e}}(0,o,this.__views__),r=s.start,a=s.end,h=a-r,d=n?a:r-1,l=this.__iteratees__,u=l.length,c=0,p=Dn(h,this.__takeCount__);if(!i||!n&&o==h&&p==h)return yt(t,this.__actions__);var f=[];t:for(;h--&&c<p;){for(var m=-1,v=t[d+=e];++m<u;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(2==b)v=_;else if(!_){if(1==b)continue t;break t}}f[c++]=v}return f},v.prototype.at=Po,v.prototype.chain=function(){return je(this)},v.prototype.commit=function(){return new g(this.value(),this.__chain__)},v.prototype.next=function(){this.__values__===Ar&&(this.__values__=di(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?Ar:this.__values__[this.__index__++]}},v.prototype.plant=function(t){for(var e,i=this;i instanceof s;){var n=Te(i);n.__index__=0,n.__values__=Ar,e?o.__wrapped__=n:e=n;var o=n;i=i.__wrapped__}return o.__wrapped__=t,e},v.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof y){var e=t;return this.__actions__.length&&(e=new y(this)),(e=e.reverse()).__actions__.push({func:He,args:[ze],thisArg:Ar}),new g(e,this.__chain__)}return this.thru(ze)},v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=function(){return yt(this.__wrapped__,this.__actions__)},v.prototype.first=v.prototype.head,un&&(v.prototype[un]=function(){return this}),v}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(sh._=vh,define(function(){return vh})):B?((B.exports=vh)._=vh,z._=vh):sh._=vh}).call(this),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vis=e():t.vis=e()}(this,function(){return e$={},d$.m=c$=[function(t,e,i){e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,i){e.__esModule=!0;var n,o=i(169),s=(n=o)&&n.__esModule?n:{default:n};function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,s.default)(t,n.key,n)}}e.default=function(t,e,i){return e&&r(t.prototype,e),i&&r(t,i),t}},function(t,h,e){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,i,n){var o=!1;!0===n&&(o=null===e[i]&&void 0!==t[i]),o?delete t[i]:t[i]=e[i]}var l=i(e(77)),u=i(e(29)),n=i(e(8)),c=i(e(6)),o=e(9),s=e(157);h.isNumber=function(t){return t instanceof Number||"number"==typeof t},h.recursiveDOMDelete=function(t){if(t)for(;!0===t.hasChildNodes();)h.recursiveDOMDelete(t.firstChild),t.removeChild(t.firstChild)},h.giveRange=function(t,e,i,n){if(e==t)return.5;var o=1/(e-t);return Math.max(0,(n-t)*o)},h.isString=function(t){return t instanceof String||"string"==typeof t},h.isDate=function(t){if(t instanceof Date)return!0;if(h.isString(t)){if(a.exec(t))return!0;if(!isNaN(Date.parse(t)))return!0}return!1},h.randomUUID=function(){return s.v4()},h.assignAllKeys=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"object"!==(0,c.default)(t[i])&&(t[i]=e)},h.fillIfDefined=function(t,e){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2];for(var n in t)void 0!==e[n]&&(null===e[n]||"object"!==(0,c.default)(e[n])?r(t,e,n,i):"object"===(0,c.default)(t[n])&&h.fillIfDefined(t[n],e[n],i))},h.extend=function(t,e){for(var i=1;i<arguments.length;i++){var n=arguments[i];for(var o in n)n.hasOwnProperty(o)&&(t[o]=n[o])}return t},h.selectiveExtend=function(t,e,i){if(!Array.isArray(t))throw new Error("Array with property names expected as first argument");for(var n=2;n<arguments.length;n++)for(var o=arguments[n],s=0;s<t.length;s++){var r=t[s];o&&o.hasOwnProperty(r)&&(e[r]=o[r])}return e},h.selectiveDeepExtend=function(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o=0;o<t.length;o++){var s=t[o];if(i.hasOwnProperty(s))if(i[s]&&i[s].constructor===Object)void 0===e[s]&&(e[s]={}),e[s].constructor===Object?h.deepExtend(e[s],i[s],!1,n):r(e,i,s,n);else{if(Array.isArray(i[s]))throw new TypeError("Arrays are not supported by deepExtend");r(e,i,s,n)}}return e},h.selectiveNotDeepExtend=function(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o in i)if(i.hasOwnProperty(o)&&-1===t.indexOf(o))if(i[o]&&i[o].constructor===Object)void 0===e[o]&&(e[o]={}),e[o].constructor===Object?h.deepExtend(e[o],i[o]):r(e,i,o,n);else if(Array.isArray(i[o])){e[o]=[];for(var s=0;s<i[o].length;s++)e[o].push(i[o][s])}else r(e,i,o,n);return e},h.deepExtend=function(t,e){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];for(var o in e)if(e.hasOwnProperty(o)||!0===i)if(e[o]&&e[o].constructor===Object)void 0===t[o]&&(t[o]={}),t[o].constructor===Object?h.deepExtend(t[o],e[o],i):r(t,e,o,n);else if(Array.isArray(e[o])){t[o]=[];for(var s=0;s<e[o].length;s++)t[o].push(e[o][s])}else r(t,e,o,n);return t},h.equalArray=function(t,e){if(t.length!=e.length)return!1;for(var i=0,n=t.length;i<n;i++)if(t[i]!=e[i])return!1;return!0},h.convert=function(t,e){var i;if(void 0!==t){if(null===t)return null;if(!e)return t;if("string"!=typeof e&&!(e instanceof String))throw new Error("Type must be a string");switch(e){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return h.isString(t)&&!isNaN(Date.parse(t))?o(t).valueOf():Number(t.valueOf());case"string":case"String":return String(t);case"Date":if(h.isNumber(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(o.isMoment(t))return new Date(t.valueOf());if(h.isString(t))return(i=a.exec(t))?new Date(Number(i[1])):o(new Date(t)).toDate();throw new Error("Cannot convert object of type "+h.getType(t)+" to type Date");case"Moment":if(h.isNumber(t))return o(t);if(t instanceof Date)return o(t.valueOf());if(o.isMoment(t))return o(t);if(h.isString(t))return i=a.exec(t),o(i?Number(i[1]):t);throw new Error("Cannot convert object of type "+h.getType(t)+" to type Date");case"ISODate":if(h.isNumber(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(o.isMoment(t))return t.toDate().toISOString();if(h.isString(t))return(i=a.exec(t))?new Date(Number(i[1])).toISOString():o(t).format();throw new Error("Cannot convert object of type "+h.getType(t)+" to type ISODate");case"ASPDate":if(h.isNumber(t))return"/Date("+t+")/";if(t instanceof Date)return"/Date("+t.valueOf()+")/";if(h.isString(t))return"/Date("+((i=a.exec(t))?new Date(Number(i[1])).valueOf():new Date(t).valueOf())+")/";throw new Error("Cannot convert object of type "+h.getType(t)+" to type ASPDate");default:throw new Error('Unknown type "'+e+'"')}}};var a=/^\/?Date\((\-?\d+)/i;h.getType=function(t){var e=void 0===t?"undefined":(0,c.default)(t);return"object"==e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":void 0===e?"undefined":e},h.copyAndExtendArray=function(t,e){for(var i=[],n=0;n<t.length;n++)i.push(t[n]);return i.push(e),i},h.copyArray=function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i]);return e},h.getAbsoluteLeft=function(t){return t.getBoundingClientRect().left},h.getAbsoluteRight=function(t){return t.getBoundingClientRect().right},h.getAbsoluteTop=function(t){return t.getBoundingClientRect().top},h.addClassName=function(t,e){var i=t.className.split(" "),n=e.split(" ");i=i.concat(n.filter(function(t){return i.indexOf(t)<0})),t.className=i.join(" ")},h.removeClassName=function(t,e){var i=t.className.split(" "),n=e.split(" ");i=i.filter(function(t){return n.indexOf(t)<0}),t.className=i.join(" ")},h.forEach=function(t,e){var i,n;if(Array.isArray(t))for(i=0,n=t.length;i<n;i++)e(t[i],i,t);else for(i in t)t.hasOwnProperty(i)&&e(t[i],i,t)},h.toArray=function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(t[i]);return e},h.updateProperty=function(t,e,i){return t[e]!==i&&(t[e]=i,!0)},h.throttle=function(t){var e=!1;return function(){e||(e=!0,requestAnimationFrame(function(){e=!1,t()}))}},h.addEventListener=function(t,e,i,n){t.addEventListener?(void 0===n&&(n=!1),"mousewheel"===e&&0<=navigator.userAgent.indexOf("Firefox")&&(e="DOMMouseScroll"),t.addEventListener(e,i,n)):t.attachEvent("on"+e,i)},h.removeEventListener=function(t,e,i,n){t.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===e&&0<=navigator.userAgent.indexOf("Firefox")&&(e="DOMMouseScroll"),t.removeEventListener(e,i,n)):t.detachEvent("on"+e,i)},h.preventDefault=function(t){(t=t||window.event).preventDefault?t.preventDefault():t.returnValue=!1},h.getTarget=function(t){var e;return(t=t||window.event).target?e=t.target:t.srcElement&&(e=t.srcElement),null!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},h.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},h.option={},h.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},h.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},h.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},h.option.asSize=function(t,e){return"function"==typeof t&&(t=t()),h.isString(t)?t:h.isNumber(t)?t+"px":e||null},h.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},h.hexToRGB=function(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},h.overrideOpacity=function(t,e){var i;return-1!=t.indexOf("rgba")?t:-1!=t.indexOf("rgb")?"rgba("+(i=t.substr(t.indexOf("(")+1).replace(")","").split(","))[0]+","+i[1]+","+i[2]+","+e+")":null==(i=h.hexToRGB(t))?t:"rgba("+i.r+","+i.g+","+i.b+","+e+")"},h.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},h.parseColor=function(t){var e;if(!0===h.isString(t)){if(!0===h.isValidRGB(t)){var i=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=h.RGBToHex(i[0],i[1],i[2])}if(!0===h.isValidHex(t)){var n=h.hexToHSV(t),o={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},s={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},r=h.HSVToHex(s.h,s.s,s.v),a=h.HSVToHex(o.h,o.s,o.v);e={background:t,border:r,highlight:{background:a,border:r},hover:{background:a,border:r}}}else e={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else(e={}).background=t.background||void 0,e.border=t.border||void 0,h.isString(t.highlight)?e.highlight={border:t.highlight,background:t.highlight}:(e.highlight={},e.highlight.background=t.highlight&&t.highlight.background||void 0,e.highlight.border=t.highlight&&t.highlight.border||void 0),h.isString(t.hover)?e.hover={border:t.hover,background:t.hover}:(e.hover={},e.hover.background=t.hover&&t.hover.background||void 0,e.hover.border=t.hover&&t.hover.border||void 0);return e},h.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,Math.min(e,i)),o=Math.max(t,Math.max(e,i));return n==o?{h:0,s:0,v:n}:{h:60*((t==n?3:i==n?1:5)-(t==n?e-i:i==n?t-e:i-t)/(o-n))/360,s:(o-n)/o,v:o}};var d=function(t){var o={};return t.split(";").forEach(function(t){if(""!=t.trim()){var e=t.split(":"),i=e[0].trim(),n=e[1].trim();o[i]=n}}),o},p=function(e){return(0,n.default)(e).map(function(t){return t+": "+e[t]}).join("; ")};h.addCssText=function(t,e){var i=d(t.style.cssText),n=d(e),o=h.extend(i,n);t.style.cssText=p(o)},h.removeCssText=function(t,e){var i=d(t.style.cssText),n=d(e);for(var o in n)n.hasOwnProperty(o)&&delete i[o];t.style.cssText=p(i)},h.HSVToRGB=function(t,e,i){var n,o,s,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case 0:n=i,o=l,s=h;break;case 1:n=d,o=i,s=h;break;case 2:n=h,o=i,s=l;break;case 3:n=h,o=d,s=i;break;case 4:n=l,o=h,s=i;break;case 5:n=i,o=h,s=d}return{r:Math.floor(255*n),g:Math.floor(255*o),b:Math.floor(255*s)}},h.HSVToHex=function(t,e,i){var n=h.HSVToRGB(t,e,i);return h.RGBToHex(n.r,n.g,n.b)},h.hexToHSV=function(t){var e=h.hexToRGB(t);return h.RGBToHSV(e.r,e.g,e.b)},h.isValidHex=function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},h.isValidRGB=function(t){return t=t.replace(" ",""),/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t)},h.isValidRGBA=function(t){return t=t.replace(" ",""),/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t)},h.selectiveBridgeObject=function(t,e){if(null===e||"object"!==(void 0===e?"undefined":(0,c.default)(e)))return null;for(var i=(0,u.default)(e),n=0;n<t.length;n++)e.hasOwnProperty(t[n])&&"object"==(0,c.default)(e[t[n]])&&(i[t[n]]=h.bridgeObject(e[t[n]]));return i},h.bridgeObject=function(t){if(null===t||"object"!==(void 0===t?"undefined":(0,c.default)(t)))return null;var e=(0,u.default)(t);if(t instanceof Element)e=t;else for(var i in e=(0,u.default)(t),t)t.hasOwnProperty(i)&&"object"==(0,c.default)(t[i])&&(e[i]=h.bridgeObject(t[i]));return e},h.insertSort=function(t,e){for(var i=0;i<t.length;i++){for(var n=t[i],o=i;0<o&&e(n,t[o-1])<0;o--)t[o]=t[o-1];t[o]=n}return t},h.mergeOptions=function(t,e,i){function n(t){return null!=t}function r(t){return null!==t&&"object"===(void 0===t?"undefined":(0,c.default)(t))}var o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};if(!r(t))throw new Error("Parameter mergeTarget must be an object");if(!r(e))throw new Error("Parameter options must be an object");if(!n(i))throw new Error("Parameter option must have a value");if(!r(o))throw new Error("Parameter globalOptions must be an object");var s=e[i],a=r(o)&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(o)?o[i]:void 0,h=a?a.enabled:void 0;if(void 0!==s){if("boolean"==typeof s)return r(t[i])||(t[i]={}),void(t[i].enabled=s);if(null===s&&!r(t[i])){if(!n(a))return;t[i]=(0,u.default)(a)}if(r(s)){var d=!0;void 0!==s.enabled?d=s.enabled:void 0!==h&&(d=a.enabled),function(t,e,i){r(t[i])||(t[i]={});var n=e[i],o=t[i];for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s])}(t,e,i),t[i].enabled=d}}},h.binarySearchCustom=function(t,e,i,n){for(var o=0,s=0,r=t.length-1;s<=r&&o<1e4;){var a=Math.floor((s+r)/2),h=t[a],d=e(void 0===n?h[i]:h[i][n]);if(0==d)return a;-1==d?s=a+1:r=a-1,o++}return-1},h.binarySearchValue=function(t,e,i,n,o){var s,r,a,h,d=0,l=0,u=t.length-1;for(o=null!=o?o:function(t,e){return t==e?0:t<e?-1:1};l<=u&&d<1e4;){if(h=Math.floor(.5*(u+l)),s=t[Math.max(0,h-1)][i],r=t[h][i],a=t[Math.min(t.length-1,h+1)][i],0==o(r,e))return h;if(o(s,e)<0&&0<o(r,e))return"before"==n?Math.max(0,h-1):h;if(o(r,e)<0&&0<o(a,e))return"before"==n?h:Math.min(t.length-1,h+1);o(r,e)<0?l=h+1:u=h-1,d++}return-1},h.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},h.getScrollBarWidth=function(){var t=document.createElement("p");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;return i==n&&(n=e.clientWidth),document.body.removeChild(e),i-n},h.topMost=function(t,e){var i=void 0;Array.isArray(e)||(e=[e]);var n=!0,o=!1,s=void 0;try{for(var r,a=(0,l.default)(t);!(n=(r=a.next()).done);n=!0){var h=r.value;if(h){i=h[e[0]];for(var d=1;d<e.length;d++)i=i&&i[e[d]];if(void 0!==i)break}}}catch(t){o=!0,s=t}finally{try{!n&&a.return&&a.return()}finally{if(o)throw s}}return i}},function(t,e,i){t.exports={default:i(194),__esModule:!0}},function(t,e,i){e.__esModule=!0;var n,o=i(6),s=(n=o)&&n.__esModule?n:{default:n};e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,s.default)(e))&&"function"!=typeof e?t:e}},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(i(196)),s=n(i(29)),r=n(i(6));e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,r.default)(e)));t.prototype=(0,s.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(o.default?(0,o.default)(t,e):t.__proto__=e)}},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(i(142)),s=n(i(144)),r="function"==typeof s.default&&"symbol"==typeof o.default?function(t){return typeof t}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":typeof t};e.default="function"==typeof s.default&&"symbol"===r(o.default)?function(t){return void 0===t?"undefined":r(t)}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":void 0===t?"undefined":r(t)}},function(t,e){var i=t.exports={version:"2.5.1"};"number"==typeof __e&&(__e=i)},function(t,e,i){t.exports={default:i(140),__esModule:!0}},function(t,e,i){t.exports="undefined"!=typeof window&&window.moment||i(154)},function(t,e,i){if("undefined"!=typeof window){var n=i(175),o=window.Hammer||i(176);t.exports=n(o,{preventDefault:"mouse"})}else t.exports=function(){return function(){function e(){}return{on:e,off:e,destroy:e,emit:e,get:function(t){return{set:e}}}}()}},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i=(0,g.default)(this._options.type),n=0,o=i.length;n<o;n++){var s=i[n],r=this._options.type[s];this._type[s]="Date"==r||"ISODate"==r||"ASPDate"==r?"Date":r}this._subscribers={},t&&this.add(t),this.setOptions(e)}var h=n(i(19)),c=n(i(6)),g=n(i(8)),y=i(2),s=i(43);o.prototype.setOptions=function(t){t&&void 0!==t.queue&&(!1===t.queue?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=s.extend(this,{replace:["add","update","remove"]})),"object"===(0,c.default)(t.queue)&&this._queue.setOptions(t.queue)))},o.prototype.on=function(t,e){var i=this._subscribers[t];i||(i=[],this._subscribers[t]=i),i.push({callback:e})},o.prototype.off=function(t,e){var i=this._subscribers[t];i&&(this._subscribers[t]=i.filter(function(t){return t.callback!=e}))},o.prototype._trigger=function(t,e,i){if("*"==t)throw new Error("Cannot trigger event *");var n=[];t in this._subscribers&&(n=n.concat(this._subscribers[t])),"*"in this._subscribers&&(n=n.concat(this._subscribers["*"]));for(var o=0,s=n.length;o<s;o++){var r=n[o];r.callback&&r.callback(t,e,i||null)}},o.prototype.add=function(t,e){var i,n=[];if(Array.isArray(t))for(var o=0,s=t.length;o<s;o++)i=this._addItem(t[o]),n.push(i);else{if(!t||"object"!==(void 0===t?"undefined":(0,c.default)(t)))throw new Error("Unknown dataType");i=this._addItem(t),n.push(i)}return n.length&&this._trigger("add",{items:n},e),n},o.prototype.update=function(t,e){function i(t){var e=t[h];if(a._data[e]){var i=y.extend({},a._data[e]);e=a._updateItem(t),o.push(e),r.push(t),s.push(i)}else e=a._addItem(t),n.push(e)}var n=[],o=[],s=[],r=[],a=this,h=a._fieldId;if(Array.isArray(t))for(var d=0,l=t.length;d<l;d++)t[d]&&"object"===(0,c.default)(t[d])?i(t[d]):console.warn("Ignoring input item, which is not an object at index "+d);else{if(!t||"object"!==(void 0===t?"undefined":(0,c.default)(t)))throw new Error("Unknown dataType");i(t)}if(n.length&&this._trigger("add",{items:n},e),o.length){var u={items:o,oldData:s,data:r};this._trigger("update",u,e)}return n.concat(o)},o.prototype.get=function(t){var e,i,n,o,s=y.getType(t);o=(n="String"==s||"Number"==s?(e=t,arguments[1]):"Array"==s?(i=t,arguments[1]):t)&&n.returnType?-1==["Array","Object"].indexOf(n.returnType)?"Array":n.returnType:"Array";var r,a,h,d,l,u=n&&n.type||this._options.type,c=n&&n.filter,p=[];if(null!=e)(r=this._getItem(e,u))&&c&&!c(r)&&(r=null);else if(null!=i)for(d=0,l=i.length;d<l;d++)r=this._getItem(i[d],u),c&&!c(r)||p.push(r);else for(l=(a=(d=0,g.default)(this._data)).length;d<l;d++)h=a[d],r=this._getItem(h,u),c&&!c(r)||p.push(r);if(n&&n.order&&null==e&&this._sort(p,n.order),n&&n.fields){var f=n.fields;if(null!=e)r=this._filterFields(r,f);else for(d=0,l=p.length;d<l;d++)p[d]=this._filterFields(p[d],f)}if("Object"!=o)return null!=e?r:p;var m,v={};for(d=0,l=p.length;d<l;d++)v[(m=p[d]).id]=m;return v},o.prototype.getIds=function(t){var e,i,n,o,s,r=this._data,a=t&&t.filter,h=t&&t.order,d=t&&t.type||this._options.type,l=(0,g.default)(r),u=[];if(a)if(h){for(s=[],e=0,i=l.length;e<i;e++)n=l[e],a(o=this._getItem(n,d))&&s.push(o);for(this._sort(s,h),e=0,i=s.length;e<i;e++)u.push(s[e][this._fieldId])}else for(e=0,i=l.length;e<i;e++)n=l[e],a(o=this._getItem(n,d))&&u.push(o[this._fieldId]);else if(h){for(s=[],e=0,i=l.length;e<i;e++)n=l[e],s.push(r[n]);for(this._sort(s,h),e=0,i=s.length;e<i;e++)u.push(s[e][this._fieldId])}else for(e=0,i=l.length;e<i;e++)o=r[n=l[e]],u.push(o[this._fieldId]);return u},o.prototype.getDataSet=function(){return this},o.prototype.forEach=function(t,e){var i,n,o,s,r=e&&e.filter,a=e&&e.type||this._options.type,h=this._data,d=(0,g.default)(h);if(e&&e.order){var l=this.get(e);for(i=0,n=l.length;i<n;i++)t(o=l[i],s=o[this._fieldId])}else for(i=0,n=d.length;i<n;i++)s=d[i],o=this._getItem(s,a),r&&!r(o)||t(o,s)},o.prototype.map=function(t,e){var i,n,o,s,r=e&&e.filter,a=e&&e.type||this._options.type,h=[],d=this._data,l=(0,g.default)(d);for(i=0,n=l.length;i<n;i++)o=l[i],s=this._getItem(o,a),r&&!r(s)||h.push(t(s,o));return e&&e.order&&this._sort(h,e.order),h},o.prototype._filterFields=function(t,e){if(!t)return t;var i,n,o={},s=(0,g.default)(t),r=s.length;if(Array.isArray(e))for(i=0;i<r;i++)n=s[i],-1!=e.indexOf(n)&&(o[n]=t[n]);else for(i=0;i<r;i++)n=s[i],e.hasOwnProperty(n)&&(o[e[n]]=t[n]);return o},o.prototype._sort=function(t,e){if(y.isString(e)){var o=e;t.sort(function(t,e){var i=t[o],n=e[o];return n<i?1:i<n?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");t.sort(e)}},o.prototype.remove=function(t,e){var i,n,o,s,r,a=[],h=[];for(i=0,n=(r=Array.isArray(t)?t:[t]).length;i<n;i++)(s=this._remove(r[i]))&&null!=(o=s[this._fieldId])&&(a.push(o),h.push(s));return a.length&&this._trigger("remove",{items:a,oldData:h},e),a},o.prototype._remove=function(t){var e,i;return y.isNumber(t)||y.isString(t)?i=t:t&&"object"===(void 0===t?"undefined":(0,c.default)(t))&&(i=t[this._fieldId]),void 0!==i&&this._data[i]?(e=this._data[i],delete this._data[i],this.length--,e):null},o.prototype.clear=function(t){var e,i,n=(0,g.default)(this._data),o=[];for(e=0,i=n.length;e<i;e++)o.push(this._data[n[e]]);return this._data={},this.length=0,this._trigger("remove",{items:n,oldData:o},t),n},o.prototype.max=function(t){var e,i,n=this._data,o=(0,g.default)(n),s=null,r=null;for(e=0,i=o.length;e<i;e++){var a=n[o[e]],h=a[t];null!=h&&(!s||r<h)&&(s=a,r=h)}return s},o.prototype.min=function(t){var e,i,n=this._data,o=(0,g.default)(n),s=null,r=null;for(e=0,i=o.length;e<i;e++){var a=n[o[e]],h=a[t];null!=h&&(!s||h<r)&&(s=a,r=h)}return s},o.prototype.distinct=function(t){var e,i,n,o=this._data,s=(0,g.default)(o),r=[],a=this._options.type&&this._options.type[t]||null,h=0;for(e=0,n=s.length;e<n;e++){var d=o[s[e]][t],l=!1;for(i=0;i<h;i++)if(r[i]==d){l=!0;break}l||void 0===d||(r[h]=d,h++)}if(a)for(e=0,n=r.length;e<n;e++)r[e]=y.convert(r[e],a);return r},o.prototype._addItem=function(t){var e=t[this._fieldId];if(null!=e){if(this._data[e])throw new Error("Cannot add item: item with id "+e+" already exists")}else e=y.randomUUID(),t[this._fieldId]=e;var i,n,o={},s=(0,g.default)(t);for(i=0,n=s.length;i<n;i++){var r=s[i],a=this._type[r];o[r]=y.convert(t[r],a)}return this._data[e]=o,this.length++,e},o.prototype._getItem=function(t,e){var i,n,o,s,r=this._data[t];if(!r)return null;var a={},h=(0,g.default)(r);if(e)for(o=0,s=h.length;o<s;o++)n=r[i=h[o]],a[i]=y.convert(n,e[i]);else for(o=0,s=h.length;o<s;o++)n=r[i=h[o]],a[i]=n;return a[this._fieldId]||(a[this._fieldId]=r.id),a},o.prototype._updateItem=function(t){var e=t[this._fieldId];if(null==e)throw new Error("Cannot update item: item has no id (item: "+(0,h.default)(t)+")");var i=this._data[e];if(!i)throw new Error("Cannot update item: no item with id "+e+" found");for(var n=(0,g.default)(t),o=0,s=n.length;o<s;o++){var r=n[o],a=this._type[r];i[r]=y.convert(t[r],a)}return e},t.exports=o},function(t,e,i){function n(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var o,s=i(8),d=(o=s)&&o.__esModule?o:{default:o},h=i(2),r=i(11);n.prototype.setData=function(t){var e,i,n,o,s;if(this._data){for(this._data.off&&this._data.off("*",this.listener),s=[],n=0,o=(e=this._data.getIds({filter:this._options&&this._options.filter})).length;n<o;n++)s.push(this._data._data[e[n]]);this._ids={},this.length=0,this._trigger("remove",{items:e,oldData:s})}if(this._data=t,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",n=0,o=(e=this._data.getIds({filter:this._options&&this._options.filter})).length;n<o;n++)i=e[n],this._ids[i]=!0;this.length=e.length,this._trigger("add",{items:e}),this._data.on&&this._data.on("*",this.listener)}},n.prototype.refresh=function(){var t,e,i,n=this._data.getIds({filter:this._options&&this._options.filter}),o=(0,d.default)(this._ids),s={},r=[],a=[],h=[];for(e=0,i=n.length;e<i;e++)s[t=n[e]]=!0,this._ids[t]||(r.push(t),this._ids[t]=!0);for(e=0,i=o.length;e<i;e++)s[t=o[e]]||(a.push(t),h.push(this._data._data[t]),delete this._ids[t]);this.length+=r.length-a.length,r.length&&this._trigger("add",{items:r}),a.length&&this._trigger("remove",{items:a,oldData:h})},n.prototype.get=function(t){var e,i,n,o=this,s=h.getType(t);n="String"==s||"Number"==s||"Array"==s?(e=t,i=arguments[1],arguments[2]):(i=t,arguments[1]);var r=h.extend({},this._options,i);this._options.filter&&i&&i.filter&&(r.filter=function(t){return o._options.filter(t)&&i.filter(t)});var a=[];return null!=e&&a.push(e),a.push(r),a.push(n),this._data&&this._data.get.apply(this._data,a)},n.prototype.getIds=function(e){var t;if(this._data){var i,n=this._options.filter;i=e&&e.filter?n?function(t){return n(t)&&e.filter(t)}:e.filter:n,t=this._data.getIds({filter:i,order:e&&e.order})}else t=[];return t},n.prototype.map=function(t,e){var i=[];if(this._data){var n,o=this._options.filter;n=e&&e.filter?o?function(t){return o(t)&&e.filter(t)}:e.filter:o,i=this._data.map(t,{filter:n,order:e&&e.order})}else i=[];return i},n.prototype.getDataSet=function(){for(var t=this;t instanceof n;)t=t._data;return t||null},n.prototype._onEvent=function(t,e,i){var n,o,s,r=e&&e.items,a=[],h=[],d=[],l=[],u=[],c=[];if(r&&this._data){switch(t){case"add":for(n=0,o=r.length;n<o;n++)s=r[n],this.get(s)&&(this._ids[s]=!0,a.push(s));break;case"update":for(n=0,o=r.length;n<o;n++)s=r[n],this.get(s)?this._ids[s]?(h.push(s),u.push(e.data[n]),l.push(e.oldData[n])):(this._ids[s]=!0,a.push(s)):this._ids[s]&&(delete this._ids[s],d.push(s),c.push(e.oldData[n]));break;case"remove":for(n=0,o=r.length;n<o;n++)s=r[n],this._ids[s]&&(delete this._ids[s],d.push(s),c.push(e.oldData[n]))}this.length+=a.length-d.length,a.length&&this._trigger("add",{items:a},i),h.length&&this._trigger("update",{items:h,oldData:l,data:u},i),d.length&&this._trigger("remove",{items:d,oldData:c},i)}},n.prototype.on=r.prototype.on,n.prototype.off=r.prototype.off,n.prototype._trigger=r.prototype._trigger,n.prototype.subscribe=n.prototype.on,n.prototype.unsubscribe=n.prototype.off,t.exports=n},function(t,e,i){var n=i(57)("wks"),o=i(40),s=i(18).Symbol,r="function"==typeof s;(t.exports=function(t){return n[t]||(n[t]=r&&s[t]||(r?s:o)("Symbol."+t))}).store=n},function(t,d,e){d.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},d.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i<t[e].redundant.length;i++)t[e].redundant[i].parentNode.removeChild(t[e].redundant[i]);t[e].redundant=[]}},d.resetElements=function(t){d.prepareElements(t),d.cleanupElements(t),d.prepareElements(t)},d.getSVGElement=function(t,e,i){var n;return e.hasOwnProperty(t)?0<e[t].redundant.length?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(n)):(n=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(n)),e[t].used.push(n),n},d.getDOMElement=function(t,e,i,n){var o;return e.hasOwnProperty(t)?0<e[t].redundant.length?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElement(t),void 0!==n?i.insertBefore(o,n):i.appendChild(o)):(o=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==n?i.insertBefore(o,n):i.appendChild(o)),e[t].used.push(o),o},d.drawPoint=function(t,e,i,n,o,s){var r;if("circle"==i.style?((r=d.getSVGElement("circle",n,o)).setAttributeNS(null,"cx",t),r.setAttributeNS(null,"cy",e),r.setAttributeNS(null,"r",.5*i.size)):((r=d.getSVGElement("rect",n,o)).setAttributeNS(null,"x",t-.5*i.size),r.setAttributeNS(null,"y",e-.5*i.size),r.setAttributeNS(null,"width",i.size),r.setAttributeNS(null,"height",i.size)),void 0!==i.styles&&r.setAttributeNS(null,"style",i.styles),r.setAttributeNS(null,"class",i.className+" vis-point"),s){var a=d.getSVGElement("text",n,o);s.xOffset&&(t+=s.xOffset),s.yOffset&&(e+=s.yOffset),s.content&&(a.textContent=s.content),s.className&&a.setAttributeNS(null,"class",s.className+" vis-label"),a.setAttributeNS(null,"x",t),a.setAttributeNS(null,"y",e)}return r},d.drawBar=function(t,e,i,n,o,s,r,a){if(0!=n){n<0&&(e-=n*=-1);var h=d.getSVGElement("rect",s,r);h.setAttributeNS(null,"x",t-.5*i),h.setAttributeNS(null,"y",e),h.setAttributeNS(null,"width",i),h.setAttributeNS(null,"height",n),h.setAttributeNS(null,"class",o),a&&h.setAttributeNS(null,"style",a)}}},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.printStyle=void 0;var o=n(i(19)),s=n(i(6)),d=n(i(8)),r=n(i(0)),a=n(i(1)),c=i(2),l=!1,h=void 0,u="background: #FFeeee; color: #dd0000",p=((0,a.default)(f,null,[{key:"validate",value:function(t,e,i){l=!1;var n=h=e;return void 0!==i&&(n=e[i]),f.parse(t,n,[]),l}},{key:"parse",value:function(t,e,i){for(var n in t)t.hasOwnProperty(n)&&f.check(n,t,e,i)}},{key:"check",value:function(t,e,i,n){if(void 0!==i[t]||void 0!==i.__any__){var o=t,s=!0;void 0===i[t]&&void 0!==i.__any__&&(o="__any__",s="object"===f.getType(e[t]));var r=i[o];s&&void 0!==r.__type__&&(r=r.__type__),f.checkFields(t,e,i,o,r,n)}else f.getSuggestion(t,i,n)}},{key:"checkFields",value:function(e,t,i,n,o,s){function r(t){console.log("%c"+t+f.printLocation(s,e),u)}var a=f.getType(t[e]),h=o[a];void 0!==h?"array"===f.getType(h)&&-1===h.indexOf(t[e])?(r('Invalid option detected in "'+e+'". Allowed values are:'+f.print(h)+' not "'+t[e]+'". '),l=!0):"object"===a&&"__any__"!==n&&(s=c.copyAndExtendArray(s,e),f.parse(t[e],i[n],s)):void 0===o.any&&(r('Invalid type received for "'+e+'". Expected: '+f.print((0,d.default)(o))+". Received ["+a+'] "'+t[e]+'"'),l=!0)}},{key:"getType",value:function(t){var e=void 0===t?"undefined":(0,s.default)(t);return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":Array.isArray(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}},{key:"getSuggestion",value:function(t,e,i){var n,o=f.findInOptions(t,e,i,!1),s=f.findInOptions(t,h,[],!0);n=void 0!==o.indexMatch?" in "+f.printLocation(o.path,t,"")+'Perhaps it was incomplete? Did you mean: "'+o.indexMatch+'"?\n\n':s.distance<=4&&o.distance>s.distance?" in "+f.printLocation(o.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+f.printLocation(s.path,s.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+f.printLocation(o.path,t):". Did you mean one of these: "+f.print((0,d.default)(e))+f.printLocation(i,t),console.log('%cUnknown option detected: "'+t+'"'+n,u),l=!0}},{key:"findInOptions",value:function(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]&&arguments[3],o=1e9,s="",r=[],a=t.toLowerCase(),h=void 0;for(var d in e){var l=void 0;if(void 0!==e[d].__type__&&!0===n){var u=f.findInOptions(t,e[d],c.copyAndExtendArray(i,d));o>u.distance&&(s=u.closestMatch,r=u.path,o=u.distance,h=u.indexMatch)}else-1!==d.toLowerCase().indexOf(a)&&(h=d),(l=f.levenshteinDistance(t,d))<o&&(s=d,r=c.copyArray(i),o=l)}return{closestMatch:s,path:r,distance:o,indexMatch:h}}},{key:"printLocation",value:function(t,e){for(var i="\n\n"+(2<arguments.length&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n",n=0;n<t.length;n++){for(var o=0;o<n+1;o++)i+=" ";i+=t[n]+": {\n"}for(var s=0;s<t.length+1;s++)i+=" ";i+=e+"\n";for(var r=0;r<t.length+1;r++){for(var a=0;a<t.length-r;a++)i+=" ";i+="}\n"}return i+"\n\n"}},{key:"print",value:function(t){return(0,o.default)(t).replace(/(\")|(\[)|(\])|(,"__type__")/g,"").replace(/(\,)/g,", ")}},{key:"levenshteinDistance",value:function(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;var i,n,o=[];for(i=0;i<=e.length;i++)o[i]=[i];for(n=0;n<=t.length;n++)o[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)==t.charAt(n-1)?o[i][n]=o[i-1][n-1]:o[i][n]=Math.min(o[i-1][n-1]+1,Math.min(o[i][n-1]+1,o[i-1][n]+1));return o[e.length][t.length]}}]),f);function f(){(0,r.default)(this,f)}e.default=p,e.printStyle=u},function(t,e,i){function n(t,e){this.options=null,this.props=null}var o=i(2);n.prototype.setOptions=function(t){t&&o.extend(this.options,t)},n.prototype.redraw=function(){return!1},n.prototype.destroy=function(){},n.prototype._isResized=function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t},t.exports=n},function(t,e,i){var m=i(18),v=i(7),g=i(80),y=i(26),b=function(t,e,i){var n,o,s,r=t&b.F,a=t&b.G,h=t&b.S,d=t&b.P,l=t&b.B,u=t&b.W,c=a?v:v[e]||(v[e]={}),p=c.prototype,f=a?m:h?m[e]:(m[e]||{}).prototype;for(n in a&&(i=e),i)(o=!r&&f&&void 0!==f[n])&&n in c||(s=o?f[n]:i[n],c[n]=a&&"function"!=typeof f[n]?i[n]:l&&o?g(s,m):u&&f[n]==s?function(n){function t(t,e,i){if(this instanceof n){switch(arguments.length){case 0:return new n;case 1:return new n(t);case 2:return new n(t,e)}return new n(t,e,i)}return n.apply(this,arguments)}return t.prototype=n.prototype,t}(s):d&&"function"==typeof s?g(Function.call,s):s,d&&((c.virtual||(c.virtual={}))[n]=s,t&b.R&&p&&!p[n]&&y(p,n,s)))};b.F=1,b.G=2,b.S=4,b.P=8,b.B=16,b.W=32,b.U=64,b.R=128,t.exports=b},function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e,i){t.exports={default:i(160),__esModule:!0}},function(t,e,i){var n=i(27),o=i(81),s=i(53),r=Object.defineProperty;e.f=i(21)?Object.defineProperty:function(t,e,i){if(n(t),e=s(e,!0),n(i),o)try{return r(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[e]=i.value),t}},function(t,e,i){t.exports=!i(28)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(6)),s=n(i(0)),r=((0,n(i(1)).default)(a,[{key:"setOptions",value:function(t){this.options=t}},{key:"_setMargins",value:function(t){this.margin={},this.options.margin&&("object"==(0,o.default)(this.options.margin)?(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)),t.adjustSizes(this.margin)}},{key:"_distanceToBorder",value:function(t,e){var i=this.options.borderWidth;return this.resize(t),Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+i}},{key:"enableShadow",value:function(t,e){e.shadow&&(t.shadowColor=e.shadowColor,t.shadowBlur=e.shadowSize,t.shadowOffsetX=e.shadowX,t.shadowOffsetY=e.shadowY)}},{key:"disableShadow",value:function(t,e){e.shadow&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}},{key:"enableBorderDashes",value:function(t,e){if(!1!==e.borderDashes)if(void 0!==t.setLineDash){var i=e.borderDashes;!0===i&&(i=[5,15]),t.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,e.borderDashes=!1}},{key:"disableBorderDashes",value:function(t,e){!1!==e.borderDashes&&(void 0!==t.setLineDash?t.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,e.borderDashes=!1))}},{key:"needsRefresh",value:function(t,e){return!0===this.refreshNeeded?!(this.refreshNeeded=!1):void 0===this.width||this.labelModule.differentState(t,e)}},{key:"initContextForDraw",value:function(t,e){var i=e.borderWidth/this.body.view.scale;t.lineWidth=Math.min(this.width,i),t.strokeStyle=e.borderColor,t.fillStyle=e.color}},{key:"performStroke",value:function(t,e){var i=e.borderWidth/this.body.view.scale;t.save(),0<i&&(this.enableBorderDashes(t,e),t.stroke(),this.disableBorderDashes(t,e)),t.restore()}},{key:"performFill",value:function(t,e){this.enableShadow(t,e),t.fill(),this.disableShadow(t,e),this.performStroke(t,e)}},{key:"_addBoundingBoxMargin",value:function(t){this.boundingBox.left-=t,this.boundingBox.top-=t,this.boundingBox.bottom+=t,this.boundingBox.right+=t}},{key:"_updateBoundingBox",value:function(t,e,i,n,o){void 0!==i&&this.resize(i,n,o),this.left=t-this.width/2,this.top=e-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}},{key:"updateBoundingBox",value:function(t,e,i,n,o){this._updateBoundingBox(t,e,i,n,o)}},{key:"getDimensionsFromLabel",value:function(t,e,i){this.textSize=this.labelModule.getTextSize(t,e,i);var n=this.textSize.width,o=this.textSize.height;return 0===n&&(o=n=14),{width:n,height:o}}}]),a);function a(t,e,i){(0,s.default)(this,a),this.body=e,this.labelModule=i,this.setOptions(t),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}}e.default=r},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(23)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"resize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.selected,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.hover,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{size:this.options.size};if(this.needsRefresh(e,i)){this.labelModule.getTextSize(t,e,i);var o=2*n.size;this.width=o,this.height=o,this.radius=.5*this.width}}},{key:"_drawShape",value:function(t,e,i,n,o,s,r,a){if(this.resize(t,s,r,a),this.left=n-this.width/2,this.top=o-this.height/2,this.initContextForDraw(t,a),t[e](n,o,a.size),this.performFill(t,a),void 0!==this.options.label){this.labelModule.calculateLabelSize(t,s,r,n,o,"hanging");var h=o+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(t,n,h,s,r,"hanging")}this.updateBoundingBox(n,o)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size,void 0!==this.options.label&&0<this.labelModule.size.width&&(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))}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){var n=i(78),o=i(51);t.exports=function(t){return n(o(t))}},function(t,e,i){var n=i(20),o=i(39);t.exports=i(21)?function(t,e,i){return n.f(t,e,o(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e,i){var n=i(32);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,i){t.exports={default:i(138),__esModule:!0}},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(i(188)),h=n(i(77));e.default=function(t,e){if(Array.isArray(t))return t;if((0,o.default)(Object(t)))return function(t,e){var i=[],n=!0,o=!1,s=void 0;try{for(var r,a=(0,h.default)(t);!(n=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(t){o=!0,s=t}finally{try{!n&&a.return&&a.return()}finally{if(o)throw s}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e){t.exports={}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,i){var n=i(84),o=i(58);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,i){function n(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0}n.subtract=function(t,e){var i=new n;return i.x=t.x-e.x,i.y=t.y-e.y,i.z=t.z-e.z,i},n.add=function(t,e){var i=new n;return i.x=t.x+e.x,i.y=t.y+e.y,i.z=t.z+e.z,i},n.avg=function(t,e){return new n((t.x+e.x)/2,(t.y+e.y)/2,(t.z+e.z)/2)},n.crossProduct=function(t,e){var i=new n;return i.x=t.y*e.z-t.z*e.y,i.y=t.z*e.x-t.x*e.z,i.z=t.x*e.y-t.y*e.x,i},n.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.exports=n},function(t,e,i){var n,o,s;o=[],void 0!==(s="function"==typeof(n=function(){return function(t){var e,o=t&&t.preventDefault||!1,i=t&&t.container||window,n={},r={keydown:{},keyup:{}},a={};for(e=97;e<=122;e++)a[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)a[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)a[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)a["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)a["num"+e]={code:96+e,shift:!1};a["num*"]={code:106,shift:!1},a["num+"]={code:107,shift:!1},a["num-"]={code:109,shift:!1},a["num/"]={code:111,shift:!1},a["num."]={code:110,shift:!1},a.left={code:37,shift:!1},a.up={code:38,shift:!1},a.right={code:39,shift:!1},a.down={code:40,shift:!1},a.space={code:32,shift:!1},a.enter={code:13,shift:!1},a.shift={code:16,shift:void 0},a.esc={code:27,shift:!1},a.backspace={code:8,shift:!1},a.tab={code:9,shift:!1},a.ctrl={code:17,shift:!1},a.alt={code:18,shift:!1},a.delete={code:46,shift:!1},a.pageup={code:33,shift:!1},a.pagedown={code:34,shift:!1},a["="]={code:187,shift:!1},a["-"]={code:189,shift:!1},a["]"]={code:221,shift:!1},a["["]={code:219,shift:!1};function s(t){d(t,"keydown")}function h(t){d(t,"keyup")}var d=function(t,e){if(void 0!==r[e][t.keyCode]){for(var i=r[e][t.keyCode],n=0;n<i.length;n++)void 0===i[n].shift?i[n].fn(t):1==i[n].shift&&1==t.shiftKey?i[n].fn(t):0==i[n].shift&&0==t.shiftKey&&i[n].fn(t);1==o&&t.preventDefault()}};return n.bind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===a[t])throw new Error("unsupported key: "+t);void 0===r[i][a[t].code]&&(r[i][a[t].code]=[]),r[i][a[t].code].push({fn:e,shift:a[t].shift})},n.bindAll=function(t,e){for(var i in void 0===e&&(e="keydown"),a)a.hasOwnProperty(i)&&n.bind(i,t,e)},n.getKey=function(t){for(var e in a)if(a.hasOwnProperty(e)){if(1==t.shiftKey&&1==a[e].shift&&t.keyCode==a[e].code)return e;if(0==t.shiftKey&&0==a[e].shift&&t.keyCode==a[e].code)return e;if(t.keyCode==a[e].code&&"shift"==e)return e}return"unknown key, currently not supported"},n.unbind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===a[t])throw new Error("unsupported key: "+t);if(void 0!==e){var n=[],o=r[i][a[t].code];if(void 0!==o)for(var s=0;s<o.length;s++)o[s].fn==e&&o[s].shift==a[t].shift||n.push(r[i][a[t].code][s]);r[i][a[t].code]=n}else r[i][a[t].code]=[]},n.reset=function(){r={keydown:{},keyup:{}}},n.destroy=function(){r={keydown:{},keyup:{}},i.removeEventListener("keydown",s,!0),i.removeEventListener("keyup",h,!0)},i.addEventListener("keydown",s,!0),i.addEventListener("keyup",h,!0),n}})?n.apply(e,o):n)&&(t.exports=s)},function(t,g,e){g.convertHiddenOptions=function(t,e,i){if(i&&!Array.isArray(i))return g.convertHiddenOptions(t,e,[i]);if(e.hiddenDates=[],i&&1==Array.isArray(i)){for(var n=0;n<i.length;n++)if(void 0===i[n].repeat){var o={};o.start=t(i[n].start).toDate().valueOf(),o.end=t(i[n].end).toDate().valueOf(),e.hiddenDates.push(o)}e.hiddenDates.sort(function(t,e){return t.start-e.start})}},g.updateHiddenDates=function(t,e,i){if(i&&!Array.isArray(i))return g.updateHiddenDates(t,e,[i]);if(i&&void 0!==e.domProps.centerContainer.width){g.convertHiddenOptions(t,e,i);for(var n=t(e.range.start),o=t(e.range.end),s=(e.range.end-e.range.start)/e.domProps.centerContainer.width,r=0;r<i.length;r++)if(void 0!==i[r].repeat){var a=t(i[r].start),h=t(i[r].end);if("Invalid Date"==a._d)throw new Error("Supplied start date is not valid: "+i[r].start);if("Invalid Date"==h._d)throw new Error("Supplied end date is not valid: "+i[r].end);if(4*s<=h-a){var d=0,l=o.clone();switch(i[r].repeat){case"daily":a.day()!=h.day()&&(d=1),a.dayOfYear(n.dayOfYear()),a.year(n.year()),a.subtract(7,"days"),h.dayOfYear(n.dayOfYear()),h.year(n.year()),h.subtract(7-d,"days"),l.add(1,"weeks");break;case"weekly":var u=h.diff(a,"days"),c=a.day();a.date(n.date()),a.month(n.month()),a.year(n.year()),h=a.clone(),a.day(c),h.day(c),h.add(u,"days"),a.subtract(1,"weeks"),h.subtract(1,"weeks"),l.add(1,"weeks");break;case"monthly":a.month()!=h.month()&&(d=1),a.month(n.month()),a.year(n.year()),a.subtract(1,"months"),h.month(n.month()),h.year(n.year()),h.subtract(1,"months"),h.add(d,"months"),l.add(1,"months");break;case"yearly":a.year()!=h.year()&&(d=1),a.year(n.year()),a.subtract(1,"years"),h.year(n.year()),h.subtract(1,"years"),h.add(d,"years"),l.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",i[r].repeat)}for(;a<l;)switch(e.hiddenDates.push({start:a.valueOf(),end:h.valueOf()}),i[r].repeat){case"daily":a.add(1,"days"),h.add(1,"days");break;case"weekly":a.add(1,"weeks"),h.add(1,"weeks");break;case"monthly":a.add(1,"months"),h.add(1,"months");break;case"yearly":a.add(1,"y"),h.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",i[r].repeat)}e.hiddenDates.push({start:a.valueOf(),end:h.valueOf()})}}g.removeDuplicates(e);var p=g.isHidden(e.range.start,e.hiddenDates),f=g.isHidden(e.range.end,e.hiddenDates),m=e.range.start,v=e.range.end;1==p.hidden&&(m=1==e.range.startToFront?p.startDate-1:p.endDate+1),1==f.hidden&&(v=1==e.range.endToFront?f.startDate-1:f.endDate+1),1!=p.hidden&&1!=f.hidden||e.range._applyRange(m,v)}},g.removeDuplicates=function(t){for(var e=t.hiddenDates,i=[],n=0;n<e.length;n++)for(var o=0;o<e.length;o++)n!=o&&1!=e[o].remove&&1!=e[n].remove&&(e[o].start>=e[n].start&&e[o].end<=e[n].end?e[o].remove=!0:e[o].start>=e[n].start&&e[o].start<=e[n].end?(e[n].end=e[o].end,e[o].remove=!0):e[o].end>=e[n].start&&e[o].end<=e[n].end&&(e[n].start=e[o].start,e[o].remove=!0));for(n=0;n<e.length;n++)!0!==e[n].remove&&i.push(e[n]);t.hiddenDates=i,t.hiddenDates.sort(function(t,e){return t.start-e.start})},g.printDates=function(t){for(var e=0;e<t.length;e++)console.log(e,new Date(t[e].start),new Date(t[e].end),t[e].start,t[e].end,t[e].remove)},g.stepOverHiddenDates=function(t,e,i){for(var n=!1,o=e.current.valueOf(),s=0;s<e.hiddenDates.length;s++){var r=e.hiddenDates[s].start,a=e.hiddenDates[s].end;if(r<=o&&o<a){n=!0;break}}if(1==n&&o<e._end.valueOf()&&o!=i){var h=t(i),d=t(a);h.year()!=d.year()?e.switchedYear=!0:h.month()!=d.month()?e.switchedMonth=!0:h.dayOfYear()!=d.dayOfYear()&&(e.switchedDay=!0),e.current=d}},g.toScreen=function(t,e,i){var n;if(0==t.body.hiddenDates.length)return n=t.range.conversion(i),(e.valueOf()-n.offset)*n.scale;var o=g.isHidden(e,t.body.hiddenDates);1==o.hidden&&(e=o.startDate);var s=g.getHiddenDurationBetween(t.body.hiddenDates,t.range.start,t.range.end);if(e<t.range.start){n=t.range.conversion(i,s);var r=g.getHiddenDurationBeforeStart(t.body.hiddenDates,e,n.offset);return e=t.options.moment(e).toDate().valueOf(),e+=r,-(n.offset-e.valueOf())*n.scale}if(e>t.range.end){var a={start:t.range.start,end:e};return e=g.correctTimeForHidden(t.options.moment,t.body.hiddenDates,a,e),n=t.range.conversion(i,s),(e.valueOf()-n.offset)*n.scale}return e=g.correctTimeForHidden(t.options.moment,t.body.hiddenDates,t.range,e),n=t.range.conversion(i,s),(e.valueOf()-n.offset)*n.scale},g.toTime=function(t,e,i){if(0==t.body.hiddenDates.length){var n=t.range.conversion(i);return new Date(e/n.scale+n.offset)}var o=g.getHiddenDurationBetween(t.body.hiddenDates,t.range.start,t.range.end),s=(t.range.end-t.range.start-o)*e/i,r=g.getAccumulatedHiddenDuration(t.body.hiddenDates,t.range,s);return new Date(r+s+t.range.start)},g.getHiddenDurationBetween=function(t,e,i){for(var n=0,o=0;o<t.length;o++){var s=t[o].start,r=t[o].end;e<=s&&r<i&&(n+=r-s)}return n},g.getHiddenDurationBeforeStart=function(t,e,i){for(var n=0,o=0;o<t.length;o++){var s=t[o].start,r=t[o].end;e<=s&&r<=i&&(n+=r-s)}return n},g.correctTimeForHidden=function(t,e,i,n){return(n=t(n).toDate().valueOf())-g.getHiddenDurationBefore(t,e,i,n)},g.getHiddenDurationBefore=function(t,e,i,n){var o=0;n=t(n).toDate().valueOf();for(var s=0;s<e.length;s++){var r=e[s].start,a=e[s].end;r>=i.start&&a<i.end&&a<=n&&(o+=a-r)}return o},g.getAccumulatedHiddenDuration=function(t,e,i){for(var n=0,o=0,s=e.start,r=0;r<t.length;r++){var a=t[r].start,h=t[r].end;if(a>=e.start&&h<e.end){if(o+=a-s,s=h,i<=o)break;n+=h-a}}return n},g.snapAwayFromHidden=function(t,e,i,n){var o=g.isHidden(e,t);return 1==o.hidden?i<0?1==n?o.startDate-(o.endDate-e)-1:o.startDate-1:1==n?o.endDate+(e-o.startDate)+1:o.endDate+1:e},g.isHidden=function(t,e){for(var i=0;i<e.length;i++){var n=e[i].start,o=e[i].end;if(n<=t&&t<o)return{hidden:!0,startDate:n,endDate:o}}return{hidden:!1,startDate:n,endDate:o}}},function(t,e,i){e.onTouch=function(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)},e.onRelease=function(t,e){return e.inputHandler=function(t){t.isFinal&&e(t)},t.on("hammer.input",e.inputHandler)},e.offTouch=function(t,e){t.off("hammer.input",e.inputHandler)},e.offRelease=e.offTouch,e.disablePreventDefaultVertically=function(t){return t.getTouchAction=function(){return["pan-y"]},t}},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e,i){this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.options=i||{},this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.editable=null,this._updateEditStatus()}var s=n(i(6)),r=n(i(8)),a=i(10),h=i(2),d=i(9);o.prototype.stack=!0,o.prototype.select=function(){this.selected=!0,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.unselect=function(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setData=function(t){null!=t.group&&this.data.group!=t.group&&null!=this.parent&&this.parent.itemSet._moveToGroup(this,t.group),this.parent&&(this.parent.stackDirty=!0),null!=t.subgroup&&this.data.subgroup!=t.subgroup&&null!=this.parent&&this.parent.changeSubgroup(this,this.data.subgroup,t.subgroup),this.data=t,this._updateEditStatus(),this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setParent=function(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t},o.prototype.isVisible=function(t){return!1},o.prototype.show=function(){return!1},o.prototype.hide=function(){return!1},o.prototype.redraw=function(){},o.prototype.repositionX=function(){},o.prototype.repositionY=function(){},o.prototype._repaintDragCenter=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragCenter){var e=this,t=document.createElement("div");t.className="vis-drag-center",t.dragCenterItem=this;var i=new a(t);i.on("tap",function(t){e.parent.itemSet.body.emitter.emit("click",{event:t,item:e.id})}),i.on("doubletap",function(t){t.stopPropagation(),e.parent.itemSet._onUpdateItem(e),e.parent.itemSet.body.emitter.emit("doubleClick",{event:t,item:e.id})}),this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(t,this.dom.dragLeft):this.dom.box.appendChild(t):this.dom.point&&this.dom.point.appendChild(t),this.dom.dragCenter=t}else!this.selected&&this.dom.dragCenter&&(this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter),this.dom.dragCenter=null)},o.prototype._repaintDeleteButton=function(t){var e=(this.options.editable.overrideItems||null==this.editable)&&this.options.editable.remove||!this.options.editable.overrideItems&&null!=this.editable&&this.editable.remove;if(this.selected&&e&&!this.dom.deleteButton){var i=this,n=document.createElement("div");this.options.rtl?n.className="vis-delete-rtl":n.className="vis-delete",n.title="Delete this item",new a(n).on("tap",function(t){t.stopPropagation(),i.parent.removeFromDataSet(i)}),t.appendChild(n),this.dom.deleteButton=n}else!this.selected&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null)},o.prototype._repaintOnItemUpdateTimeTooltip=function(t){if(this.options.tooltipOnItemUpdateTime){var e=(this.options.editable.updateTime||!0===this.data.editable)&&!1!==this.data.editable;if(this.selected&&e&&!this.dom.onItemUpdateTimeTooltip){var i=document.createElement("div");i.className="vis-onUpdateTime-tooltip",t.appendChild(i),this.dom.onItemUpdateTimeTooltip=i}else!this.selected&&this.dom.onItemUpdateTimeTooltip&&(this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip),this.dom.onItemUpdateTimeTooltip=null);if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?"visible":"hidden",this.options.rtl?this.dom.onItemUpdateTimeTooltip.style.right=this.dom.content.style.right:this.dom.onItemUpdateTimeTooltip.style.left=this.dom.content.style.left;var n,o=this.parent.itemSet.body.domProps.scrollTop;("top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height)+this.parent.top-50<-o?(this.dom.onItemUpdateTimeTooltip.style.bottom="",this.dom.onItemUpdateTimeTooltip.style.top=this.height+2+"px"):(this.dom.onItemUpdateTimeTooltip.style.top="",this.dom.onItemUpdateTimeTooltip.style.bottom=this.height+2+"px"),this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template?n=this.options.tooltipOnItemUpdateTime.template.bind(this)(this.data):(n="start: "+d(this.data.start).format("MM/DD/YYYY hh:mm"),this.data.end&&(n+="<br> end: "+d(this.data.end).format("MM/DD/YYYY hh:mm"))),this.dom.onItemUpdateTimeTooltip.innerHTML=n}}},o.prototype._updateContents=function(t){var e,i,n,o,s=this.parent.itemSet.itemsData.get(this.id),r=this.dom.box||this.dom.point,a=r.getElementsByClassName("vis-item-visible-frame")[0];if(n=this.options.visibleFrameTemplate?(o=this.options.visibleFrameTemplate.bind(this))(s,r):"",a)if(n instanceof Object&&!(n instanceof Element))o(s,a);else if(this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(n)){if(n instanceof Element)a.innerHTML="",a.appendChild(n);else if(null!=n)a.innerHTML=n;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.itemVisibleFrameContent=n}if((e=this.options.template?(i=this.options.template.bind(this))(s,t,this.data):this.data.content)instanceof Object&&!(e instanceof Element))i(s,t);else if(this._contentToString(this.content)!==this._contentToString(e)){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(null!=e)t.innerHTML=e;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.content=e}},o.prototype._updateDataAttributes=function(t){if(this.options.dataAttributes&&0<this.options.dataAttributes.length){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=(0,r.default)(this.data)}for(var i=0;i<e.length;i++){var n=e[i],o=this.data[n];null!=o?t.setAttribute("data-"+n,o):t.removeAttribute("data-"+n)}}},o.prototype._updateStyle=function(t){this.style&&(h.removeCssText(t,this.style),this.style=null),this.data.style&&(h.addCssText(t,this.data.style),this.style=this.data.style)},o.prototype._contentToString=function(t){return"string"==typeof t?t:t&&"outerHTML"in t?t.outerHTML:t},o.prototype._updateEditStatus=function(){this.options&&("boolean"==typeof this.options.editable?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:"object"===(0,s.default)(this.options.editable)&&(this.editable={},h.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.options.editable))),this.options&&this.options.editable&&!0===this.options.editable.overrideItems||this.data&&("boolean"==typeof this.data.editable?this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable}:"object"===(0,s.default)(this.data.editable)&&(this.editable={},h.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.data.editable)))},o.prototype.getWidthLeft=function(){return 0},o.prototype.getWidthRight=function(){return 0},o.prototype.getTitle=function(){return this.data.title},t.exports=o},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var i=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++i+n).toString(36))}},function(t,e,i){var n=i(51);t.exports=function(t){return Object(n(t))}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,i){function r(t){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(t)}r.prototype.setOptions=function(t){t&&void 0!==t.delay&&(this.delay=t.delay),t&&void 0!==t.max&&(this.max=t.max),this._flushIfNeeded()},r.extend=function(t,e){var i=new r(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){i.flush()};var n=[{name:"flush",original:void 0}];if(e&&e.replace)for(var o=0;o<e.replace.length;o++){var s=e.replace[o];n.push({name:s,original:t[s]}),i.replace(t,s)}return i._extended={object:t,methods:n},i},r.prototype.destroy=function(){if(this.flush(),this._extended){for(var t=this._extended.object,e=this._extended.methods,i=0;i<e.length;i++){var n=e[i];n.original?t[n.name]=n.original:delete t[n.name]}this._extended=null}},r.prototype.replace=function(t,e){var i=this,n=t[e];if(!n)throw new Error("Method "+e+" undefined");t[e]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.queue({args:t,fn:n,context:this})}},r.prototype.queue=function(t){"function"==typeof t?this._queue.push({fn:t}):this._queue.push(t),this._flushIfNeeded()},r.prototype._flushIfNeeded=function(){if(this._queue.length>this.max&&this.flush(),clearTimeout(this._timeout),0<this.queue.length&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},r.prototype.flush=function(){for(;0<this._queue.length;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=r},function(t,e){function i(t){if(t)return function(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}(t)}(t.exports=i).prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){n.off(t,i),e.apply(this,arguments)}var n=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var n,o=0;o<i.length;o++)if((n=i[o])===e||n.fn===e){i.splice(o,1);break}return this},i.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),i=this._callbacks[t];if(i)for(var n=0,o=(i=i.slice(0)).length;n<o;++n)i[n].apply(this,e);return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,i){function n(t,e){this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,maxMinorChars:7,format:S.FORMAT,moment:h,timeAxis:null},this.options=k.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}var o,s=i(6),r=(o=s)&&o.__esModule?o:{default:o},k=i(2),a=i(16),S=i(66),D=i(36),h=i(9);(n.prototype=new a).setOptions=function(t){t&&(k.selectiveExtend(["showMinorLabels","showMajorLabels","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),k.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"===(0,r.default)(t.orientation)&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof h.locale?h.locale(t.locale):h.lang(t.locale)))},n.prototype._create=function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"},n.prototype.destroy=function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null},n.prototype.redraw=function(){var t=this.props,e=this.dom.foreground,i=this.dom.background,n="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,o=e.parentNode!==n;this._calculateCharSize();var s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,h=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height=this.props.height+"px",this._repaintLabels(),a?n.insertBefore(e,a):n.appendChild(e),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||o},n.prototype._repaintLabels=function(){var t=this.options.orientation.axis,e=k.convert(this.body.range.start,"Number"),i=k.convert(this.body.range.end,"Number"),n=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),o=n-D.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this.body.range,n);o-=this.body.util.toTime(0).valueOf();var s=new S(new Date(e),new Date(i),o,this.body.hiddenDates,this.options);s.setMoment(this.options.moment),this.options.format&&s.setFormat(this.options.format),this.options.timeAxis&&s.setScale(this.options.timeAxis),this.step=s;var r=this.dom;r.redundant.lines=r.lines,r.redundant.majorTexts=r.majorTexts,r.redundant.minorTexts=r.minorTexts,r.lines=[],r.majorTexts=[],r.minorTexts=[];var a,h,d,l,u,c,p,f,m,v=0,g=void 0,y=0;for(s.start(),a=s.getCurrent(),d=this.body.util.toScreen(a);s.hasNext()&&y<1e3;){switch(y++,l=s.isMajor(),m=s.getClassName(),f=s.getLabelMinor(),h=d,s.next(),a=s.getCurrent(),s.isMajor(),c=v,v=(d=this.body.util.toScreen(a))-h,s.scale){case"week":u=!0;break;default:u=.4*c<=v}if(this.options.showMinorLabels&&u){var b=this._repaintMinorText(h,f,t,m);b.style.width=v+"px"}l&&this.options.showMajorLabels?(0<h&&(null==g&&(g=h),b=this._repaintMajorText(h,s.getLabelMajor(),t,m)),p=this._repaintMajorLine(h,v,t,m)):u?p=this._repaintMinorLine(h,v,t,m):p&&(p.style.width=parseInt(p.style.width)+v+"px")}if(1e3!==y||E||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to 1000 lines."),E=!0),this.options.showMajorLabels){var _=this.body.util.toTime(0),w=s.getLabelMajor(_),x=w.length*(this.props.majorCharWidth||10)+10;(null==g||x<g)&&this._repaintMajorText(0,w,t,m)}k.forEach(this.dom.redundant,function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})},n.prototype._repaintMinorText=function(t,e,i,n){var o=this.dom.redundant.minorTexts.shift();if(!o){var s=document.createTextNode("");(o=document.createElement("div")).appendChild(s),this.dom.foreground.appendChild(o)}return this.dom.minorTexts.push(o),o.innerHTML=e,o.style.top="top"==i?this.props.majorLabelHeight+"px":"0",this.options.rtl?(o.style.left="",o.style.right=t+"px"):o.style.left=t+"px",o.className="vis-text vis-minor "+n,o},n.prototype._repaintMajorText=function(t,e,i,n){var o=this.dom.redundant.majorTexts.shift();if(!o){var s=document.createElement("div");(o=document.createElement("div")).appendChild(s),this.dom.foreground.appendChild(o)}return o.childNodes[0].innerHTML=e,o.className="vis-text vis-major "+n,o.style.top="top"==i?"0":this.props.minorLabelHeight+"px",this.options.rtl?(o.style.left="",o.style.right=t+"px"):o.style.left=t+"px",this.dom.majorTexts.push(o),o},n.prototype._repaintMinorLine=function(t,e,i,n){var o=this.dom.redundant.lines.shift();o||(o=document.createElement("div"),this.dom.background.appendChild(o)),this.dom.lines.push(o);var s=this.props;return o.style.top="top"==i?s.majorLabelHeight+"px":this.body.domProps.top.height+"px",o.style.height=s.minorLineHeight+"px",this.options.rtl?(o.style.left="",o.style.right=t-s.minorLineWidth/2+"px",o.className="vis-grid vis-vertical-rtl vis-minor "+n):(o.style.left=t-s.minorLineWidth/2+"px",o.className="vis-grid vis-vertical vis-minor "+n),o.style.width=e+"px",o},n.prototype._repaintMajorLine=function(t,e,i,n){var o=this.dom.redundant.lines.shift();o||(o=document.createElement("div"),this.dom.background.appendChild(o)),this.dom.lines.push(o);var s=this.props;return o.style.top="top"==i?"0":this.body.domProps.top.height+"px",this.options.rtl?(o.style.left="",o.style.right=t-s.majorLineWidth/2+"px",o.className="vis-grid vis-vertical-rtl vis-major "+n):(o.style.left=t-s.majorLineWidth/2+"px",o.className="vis-grid vis-vertical vis-major "+n),o.style.height=s.majorLineHeight+"px",o.style.width=e+"px",o};var E=!(n.prototype._calculateCharSize=function(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth});t.exports=n},function(t,e,i){function n(t,e){this.body=t,this.defaultOptions={moment:a,locales:h,locale:"en",id:void 0,title:void 0},this.options=s.extend({},this.defaultOptions),e&&e.time?this.customTime=e.time:this.customTime=new Date,this.eventParams={},this.setOptions(e),this._create()}var o=i(10),s=i(2),r=i(16),a=i(9),h=i(98);(n.prototype=new r).setOptions=function(t){t&&s.selectiveExtend(["moment","locale","locales","id"],this.options,t)},n.prototype._create=function(){function t(t){this.body.range._onMouseWheel(t)}var e=document.createElement("div");e["custom-time"]=this,e.className="vis-custom-time "+(this.options.id||""),e.style.position="absolute",e.style.top="0px",e.style.height="100%",this.bar=e;var i=document.createElement("div");i.style.position="relative",i.style.top="0px",i.style.left="-10px",i.style.height="100%",i.style.width="20px",i.addEventListener?(i.addEventListener("mousewheel",t.bind(this),!1),i.addEventListener("DOMMouseScroll",t.bind(this),!1)):i.attachEvent("onmousewheel",t.bind(this)),e.appendChild(i),this.hammer=new o(i),this.hammer.on("panstart",this._onDragStart.bind(this)),this.hammer.on("panmove",this._onDrag.bind(this)),this.hammer.on("panend",this._onDragEnd.bind(this)),this.hammer.get("pan").set({threshold:5,direction:o.DIRECTION_HORIZONTAL})},n.prototype.destroy=function(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null},n.prototype.redraw=function(){var t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar));var e=this.body.util.toScreen(this.customTime),i=this.options.locales[this.options.locale];i||(this.warned||(console.log("WARNING: options.locales['"+this.options.locale+"'] not found. See http://visjs.org/docs/timeline/#Localization"),this.warned=!0),i=this.options.locales.en);var n=this.options.title;return void 0===n?n=(n=i.time+": "+this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss")).charAt(0).toUpperCase()+n.substring(1):"function"==typeof n&&(n=n.call(this.customTime)),this.bar.style.left=e+"px",this.bar.title=n,!1},n.prototype.hide=function(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)},n.prototype.setCustomTime=function(t){this.customTime=s.convert(t,"Date"),this.redraw()},n.prototype.getCustomTime=function(){return new Date(this.customTime.valueOf())},n.prototype.setCustomTitle=function(t){this.options.title=t},n.prototype._onDragStart=function(t){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,t.stopPropagation()},n.prototype._onDrag=function(t){if(this.eventParams.dragging){var e=this.body.util.toScreen(this.eventParams.customTime)+t.deltaX,i=this.body.util.toTime(e);this.setCustomTime(i),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation()}},n.prototype._onDragEnd=function(t){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation())},n.customTimeFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("custom-time"))return e["custom-time"];e=e.parentNode}return null},t.exports=n},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(i(0)),o=n(i(1)),a=i(2),h=i(117).default,s=i(48).default,d=i(193).default,l=i(200).default,u=i(201).default,c=i(202).default,p=i(203).default,f=i(204).default,m=i(205).default,v=i(206).default,g=i(207).default,y=i(208).default,b=i(209).default,_=i(210).default,w=i(211).default,x=i(212).default,k=i(213).default,S=i(15).printStyle,D=((0,o.default)(E,[{key:"attachEdge",value:function(t){-1===this.edges.indexOf(t)&&this.edges.push(t)}},{key:"detachEdge",value:function(t){var e=this.edges.indexOf(t);-1!=e&&this.edges.splice(e,1)}},{key:"setOptions",value:function(t){var e=this.options.shape;if(t){if(void 0!==t.id&&(this.id=t.id),void 0===this.id)throw new Error("Node must have an id");E.checkMass(t,this.id),void 0!==t.x&&(null===t.x?(this.x=void 0,this.predefinedPosition=!1):(this.x=parseInt(t.x),this.predefinedPosition=!0)),void 0!==t.y&&(null===t.y?(this.y=void 0,this.predefinedPosition=!1):(this.y=parseInt(t.y),this.predefinedPosition=!0)),void 0!==t.size&&(this.baseSize=t.size),void 0!==t.value&&(t.value=parseFloat(t.value)),E.parseOptions(this.options,t,!0,this.globalOptions,this.grouplist);var i=[t,this.options,this.defaultOptions];return this.chooser=s.choosify("node",i),this._load_images(),this.updateLabelModule(t),this.updateShape(e),void 0!==t.hidden||void 0!==t.physics}}},{key:"_load_images",value:function(){if("circularImage"===this.options.shape||"image"===this.options.shape){if(void 0===this.options.image)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(void 0===this.imagelist)throw new Error("Internal Error: No images provided");if("string"==typeof this.options.image)this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(void 0===this.options.image.unselected)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),void 0!==this.options.image.selected?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}},{key:"getFormattingValues",value:function(){var t={color:this.options.color.background,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};return this.selected||this.hover?!0===this.chooser?this.selected?(t.borderWidth*=2,t.color=this.options.color.highlight.background,t.borderColor=this.options.color.highlight.border,t.shadow=this.options.shadow.enabled):this.hover&&(t.color=this.options.color.hover.background,t.borderColor=this.options.color.hover.border,t.shadow=this.options.shadow.enabled):"function"==typeof this.chooser&&(this.chooser(t,this.options.id,this.selected,this.hover),!1===t.shadow&&(t.shadowColor===this.options.shadow.color&&t.shadowSize===this.options.shadow.size&&t.shadowX===this.options.shadow.x&&t.shadowY===this.options.shadow.y||(t.shadow=!0))):t.shadow=this.options.shadow.enabled,t}},{key:"updateLabelModule",value:function(t){void 0!==this.options.label&&null!==this.options.label||(this.options.label=""),E.updateGroupOptions(this.options,t,this.grouplist);var e=this.grouplist.get(this.options.group,!1),i=[t,this.options,e,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,i),void 0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateShape",value:function(t){if(t===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new d(this.options,this.body,this.labelModule);break;case"circle":this.shape=new l(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new u(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"database":this.shape=new c(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new p(this.options,this.body,this.labelModule);break;case"dot":this.shape=new f(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new m(this.options,this.body,this.labelModule);break;case"icon":this.shape=new v(this.options,this.body,this.labelModule);break;case"image":this.shape=new g(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new y(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new b(this.options,this.body,this.labelModule);break;case"star":this.shape=new _(this.options,this.body,this.labelModule);break;case"text":this.shape=new w(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new x(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new k(this.options,this.body,this.labelModule);break;default:this.shape=new m(this.options,this.body,this.labelModule)}this.needsRefresh()}},{key:"select",value:function(){this.selected=!0,this.needsRefresh()}},{key:"unselect",value:function(){this.selected=!1,this.needsRefresh()}},{key:"needsRefresh",value:function(){this.shape.refreshNeeded=!0}},{key:"getTitle",value:function(){return this.options.title}},{key:"distanceToBorder",value:function(t,e){return this.shape.distanceToBorder(t,e)}},{key:"isFixed",value:function(){return this.options.fixed.x&&this.options.fixed.y}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"getLabelSize",value:function(){return this.labelModule.size()}},{key:"setValueRange",value:function(t,e,i){if(void 0!==this.options.value){var n=this.options.scaling.customScalingFunction(t,e,i,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(!0===this.options.scaling.label.enabled){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*s}this.options.size=this.options.scaling.min+n*o}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}},{key:"draw",value:function(t){var e=this.getFormattingValues();this.shape.draw(t,this.x,this.y,this.selected,this.hover,e)}},{key:"updateBoundingBox",value:function(t){this.shape.updateBoundingBox(this.x,this.y,t)}},{key:"resize",value:function(t){var e=this.getFormattingValues();this.shape.resize(t,this.selected,this.hover,e)}},{key:"getItemsOnPoint",value:function(t){var e=[];return this.labelModule.visible()&&s.pointInRect(this.labelModule.getSize(),t)&&e.push({nodeId:this.id,labelId:0}),s.pointInRect(this.shape.boundingBox,t)&&e.push({nodeId:this.id}),e}},{key:"isOverlappingWith",value:function(t){return this.shape.left<t.right&&this.shape.left+this.shape.width>t.left&&this.shape.top<t.bottom&&this.shape.top+this.shape.height>t.top}},{key:"isBoundingBoxOverlappingWith",value:function(t){return this.shape.boundingBox.left<t.right&&this.shape.boundingBox.right>t.left&&this.shape.boundingBox.top<t.bottom&&this.shape.boundingBox.bottom>t.top}}],[{key:"updateGroupOptions",value:function(t,e,i){if(void 0!==i){var n=t.group;if(void 0!==e&&void 0!==e.group&&n!==e.group)throw new Error("updateGroupOptions: group values in options don't match.");if("number"==typeof n||"string"==typeof n&&""!=n){var o=i.get(n);a.selectiveNotDeepExtend(["font"],t,o),t.color=a.parseColor(t.color)}}}},{key:"parseOptions",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},o=arguments[4];if(a.selectiveNotDeepExtend(["color","fixed","shadow"],t,e,i),E.checkMass(e),a.mergeOptions(t,e,"shadow",n),void 0!==e.color&&null!==e.color){var s=a.parseColor(e.color);a.fillIfDefined(t.color,s)}else!0===i&&null===e.color&&(t.color=a.bridgeObject(n.color));void 0!==e.fixed&&null!==e.fixed&&("boolean"==typeof e.fixed?(t.fixed.x=e.fixed,t.fixed.y=e.fixed):(void 0!==e.fixed.x&&"boolean"==typeof e.fixed.x&&(t.fixed.x=e.fixed.x),void 0!==e.fixed.y&&"boolean"==typeof e.fixed.y&&(t.fixed.y=e.fixed.y))),!0===i&&null===e.font&&(t.font=a.bridgeObject(n.font)),E.updateGroupOptions(t,e,o),void 0!==e.scaling&&a.mergeOptions(t.scaling,e.scaling,"label",n.scaling)}},{key:"checkMass",value:function(t,e){if(void 0!==t.mass&&t.mass<=0){var i="";void 0!==e&&(i=" in node id: "+e),console.log("%cNegative or zero mass disallowed"+i+", setting mass to 1.",S),t.mass=1}}}]),E);function E(t,e,i,n,o,s){(0,r.default)(this,E),this.options=a.bridgeObject(o),this.globalOptions=o,this.defaultOptions=s,this.body=e,this.edges=[],this.id=void 0,this.imagelist=i,this.grouplist=n,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 h(this.body,this.options,!1),this.setOptions(t)}e.default=D},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(i(6)),o=n(i(0)),s=n(i(1)),a=i(2),h=((0,s.default)(d,null,[{key:"choosify",value:function(t,e){var i=["node","edge","label"],n=!0,o=a.topMost(e,"chosen");if("boolean"==typeof o)n=o;else if("object"===(void 0===o?"undefined":(0,r.default)(o))){if(-1===i.indexOf(t))throw new Error("choosify: subOption '"+t+"' should be one of '"+i.join("', '")+"'");var s=a.topMost(e,["chosen",t]);"boolean"!=typeof s&&"function"!=typeof s||(n=s)}return n}},{key:"pointInRect",value:function(t,e,i){if(t.width<=0||t.height<=0)return!1;if(void 0!==i){var n={x:e.x-i.x,y:e.y-i.y};if(0!==i.angle){var o=-i.angle;e={x:Math.cos(o)*n.x-Math.sin(o)*n.y,y:Math.sin(o)*n.x+Math.cos(o)*n.y}}else e=n}var s=t.x+t.width,r=t.y+t.width;return t.left<e.x&&s>e.x&&t.top<e.y&&r>e.y}},{key:"isValidLabel",value:function(t){return"string"==typeof t&&""!==t}}]),d);function d(){(0,o.default)(this,d)}e.default=h},function(t,e,i){i(125);for(var n=i(18),o=i(26),s=i(31),r=i(13)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),h=0;h<a.length;h++){var d=a[h],l=n[d],u=l&&l.prototype;u&&!u[r]&&o(u,r,d),s[d]=s.Array}},function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!0},function(t,e,i){var o=i(32);t.exports=function(t,e){if(!o(t))return t;var i,n;if(e&&"function"==typeof(i=t.toString)&&!o(n=i.call(t)))return n;if("function"==typeof(i=t.valueOf)&&!o(n=i.call(t)))return n;if(!e&&"function"==typeof(i=t.toString)&&!o(n=i.call(t)))return n;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){function o(){}var s=n(27),r=n(130),a=n(58),h=n(56)("IE_PROTO"),d=function(){var t,e=n(82)("iframe"),i=a.length;for(e.style.display="none",n(134).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),d=t.F;i--;)delete d.prototype[a[i]];return d()};t.exports=Object.create||function(t,e){var i;return null!==t?(o.prototype=s(t),i=new o,o.prototype=null,i[h]=t):i=d(),void 0===e?i:r(i,e)}},function(t,e){var i=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0<t?n:i)(t)}},function(t,e,i){var n=i(57)("keys"),o=i(40);t.exports=function(t){return n[t]||(n[t]=o(t))}},function(t,e,i){var n=i(18),o=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,i){var n=i(20).f,o=i(22),s=i(13)("toStringTag");t.exports=function(t,e,i){t&&!o(t=i?t:t.prototype,s)&&n(t,s,{configurable:!0,value:e})}},function(t,e,i){var n=i(135)(!0);i(79)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,i=this._i;return i>=e.length?{value:void 0,done:!0}:(t=n(e,i),this._i+=t.length,{value:t,done:!1})})},function(t,e,i){e.f=i(13)},function(t,e,i){var n=i(18),o=i(7),s=i(52),r=i(61),a=i(20).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=s?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:r.f(t)})}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var i=a().hours(0).minutes(0).seconds(0).milliseconds(0),n=i.clone().add(-3,"days").valueOf(),o=i.clone().add(3,"days").valueOf();(this.millisecondsPerPixelCache=void 0)===e?(this.start=n,this.end=o):(this.start=e.start||n,this.end=e.end||o),this.rolling=!1,this.body=t,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:a,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}},this.options=w.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on("panstart",this._onDragStart.bind(this)),this.body.emitter.on("panmove",this._onDrag.bind(this)),this.body.emitter.on("panend",this._onDragEnd.bind(this)),this.body.emitter.on("mousewheel",this._onMouseWheel.bind(this)),this.body.emitter.on("touch",this._onTouch.bind(this)),this.body.emitter.on("pinch",this._onPinch.bind(this)),this.body.dom.rollingModeBtn.addEventListener("click",this.startRolling.bind(this)),this.setOptions(e)}function c(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'+t+'". Choose "horizontal" or "vertical".')}var s=n(i(8)),r=n(i(19)),_=n(i(6)),w=i(2),a=i(9),h=i(16),x=i(36);(o.prototype=new h).setOptions=function(t){if(t){w.selectiveExtend(["animation","direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","rtl","showCurrentTime","rollingMode","horizontalScroll"],this.options,t),t.rollingMode&&t.rollingMode.follow&&this.startRolling(),("start"in t||"end"in t)&&this.setRange(t.start,t.end)}},o.prototype.startRolling=function(){var s=this;!function t(){s.stopRolling(),s.rolling=!0;var e=s.end-s.start,i=w.convert(new Date,"Date").valueOf(),n=i-e*s.options.rollingMode.offset,o=i+e*(1-s.options.rollingMode.offset);s.setRange(n,o,{animation:!1}),(e=1/s.conversion(s.body.domProps.center.width).scale/10)<30&&(e=30),1e3<e&&(e=1e3),s.body.dom.rollingModeBtn.style.visibility="hidden",s.currentTimeTimer=setTimeout(t,e)}()},o.prototype.stopRolling=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")},o.prototype.setRange=function(t,e,a,h,d){!0!==(a=a||{}).byUser&&(a.byUser=!1);var l=this,u=null!=t?w.convert(t,"Date").valueOf():null,c=null!=e?w.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,a.animation){var p=this.start,f=this.end,m="object"===(0,_.default)(a.animation)&&"duration"in a.animation?a.animation.duration:500,i="object"===(0,_.default)(a.animation)&&"easingFunction"in a.animation?a.animation.easingFunction:"easeInOutQuad",v=w.easingFunctions[i];if(!v)throw new Error("Unknown easing function "+(0,r.default)(i)+". Choose from: "+(0,s.default)(w.easingFunctions).join(", "));var g=(new Date).valueOf(),y=!1;return function t(){if(!l.props.touch.dragging){var e=(new Date).valueOf()-g,i=v(e/m),n=m<e,o=n||null===u?u:p+(u-p)*i,s=n||null===c?c:f+(c-f)*i;b=l._applyRange(o,s),x.updateHiddenDates(l.options.moment,l.body,l.options.hiddenDates),y=y||b;var r={start:new Date(l.start),end:new Date(l.end),byUser:a.byUser,event:a.event};if(d&&d(i,b,n),b&&l.body.emitter.emit("rangechange",r),n){if(y&&(l.body.emitter.emit("rangechanged",r),h))return h()}else l.animationTimer=setTimeout(t,20)}}()}var b=this._applyRange(u,c);if(x.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),b){var n={start:new Date(this.start),end:new Date(this.end),byUser:a.byUser,event:a.event};if(this.body.emitter.emit("rangechange",n),clearTimeout(l.timeoutID),l.timeoutID=setTimeout(function(){l.body.emitter.emit("rangechanged",n)},200),h)return h()}},o.prototype.getMillisecondsPerPixel=function(){return void 0===this.millisecondsPerPixelCache&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache},o.prototype._cancelAnimation=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},o.prototype._applyRange=function(t,e){var i,n=null!=t?w.convert(t,"Date").valueOf():this.start,o=null!=e?w.convert(e,"Date").valueOf():this.end,s=null!=this.options.max?w.convert(this.options.max,"Date").valueOf():null,r=null!=this.options.min?w.convert(this.options.min,"Date").valueOf():null;if(isNaN(n)||null===n)throw new Error('Invalid start "'+t+'"');if(isNaN(o)||null===o)throw new Error('Invalid end "'+e+'"');if(o<n&&(o=n),null!==r&&n<r&&(n+=i=r-n,o+=i,null!=s&&s<o&&(o=s)),null!==s&&s<o&&(n-=i=o-s,o-=i,null!=r&&n<r&&(n=r)),null!==this.options.zoomMin){var a=parseFloat(this.options.zoomMin);a<0&&(a=0),o-n<a&&(this.end-this.start===a&&n>=this.start-.5&&o<=this.end?(n=this.start,o=this.end):(n-=(i=a-(o-n))/2,o+=i/2))}if(null!==this.options.zoomMax){var h=parseFloat(this.options.zoomMax);h<0&&(h=0),h<o-n&&(this.end-this.start===h&&n<this.start&&o>this.end?(n=this.start,o=this.end):(n+=(i=o-n-h)/2,o-=i/2))}var d=this.start!=n||this.end!=o;return n>=this.start&&n<=this.end||o>=this.start&&o<=this.end||this.start>=n&&this.start<=o||this.end>=n&&this.end<=o||this.body.emitter.emit("checkRangedItems"),this.start=n,this.end=o,d},o.prototype.getRange=function(){return{start:this.start,end:this.end}},o.prototype.conversion=function(t,e){return o.conversion(this.start,this.end,t,e)},o.conversion=function(t,e,i,n){return void 0===n&&(n=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-n)}:{offset:0,scale:1}},o.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.stopRolling(),this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))},o.prototype._onDrag=function(t){if(t&&this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;c(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var n=this.props.touch.end-this.props.touch.start;n-=x.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);var o,s="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;o=this.options.rtl?i/s*n:-i/s*n;var r=this.props.touch.start+o,a=this.props.touch.end+o,h=x.snapAwayFromHidden(this.body.hiddenDates,r,this.previousDelta-i,!0),d=x.snapAwayFromHidden(this.body.hiddenDates,a,this.previousDelta-i,!0);if(h!=r||d!=a)return this.deltaDifference+=i,this.props.touch.start=h,this.props.touch.end=d,void this._onDrag(t);this.previousDelta=i,this._applyRange(r,a);var l=new Date(this.start),u=new Date(this.end);this.body.emitter.emit("rangechange",{start:l,end:u,byUser:!0,event:t}),this.body.emitter.emit("panmove")}},o.prototype._onDragEnd=function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:t}))},o.prototype._onMouseWheel=function(t){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),!(this.options.zoomKey&&!t[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&e){var i,n;if(i=e<0?1-e/5:1/(1+e/5),this.rolling)n=this.start+(this.end-this.start)*this.options.rollingMode.offset;else{var o=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);n=this._pointerToDate(o)}this.zoom(i,n,e,t),t.preventDefault()}},o.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0,w.preventDefault(t)},o.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable){w.preventDefault(t),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center)),this.stopRolling();var e=1/(t.scale+this.scaleOffset),i=this._pointerToDate(this.props.touch.center),n=x.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),o=x.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,i),s=n-o,r=i-o+(this.props.touch.start-(i-o))*e,a=i+s+(this.props.touch.end-(i+s))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;var h=x.snapAwayFromHidden(this.body.hiddenDates,r,1-e,!0),d=x.snapAwayFromHidden(this.body.hiddenDates,a,e-1,!0);h==r&&d==a||(this.props.touch.start=h,this.props.touch.end=d,this.scaleOffset=1-t.scale,r=h,a=d);var l={animation:!1,byUser:!0,event:t};this.setRange(r,a,l),this.startToFront=!1,this.endToFront=!0}},o.prototype._isInsideRange=function(t){var e,i=t.center?t.center.x:t.clientX;e=this.options.rtl?i-w.getAbsoluteLeft(this.body.dom.centerContainer):w.getAbsoluteRight(this.body.dom.centerContainer)-i;var n=this.body.util.toTime(e);return n>=this.start&&n<=this.end},o.prototype._pointerToDate=function(t){var e,i=this.options.direction;if(c(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var n=this.body.domProps.center.height;return e=this.conversion(n),t.y/e.scale+e.offset},o.prototype.getPointer=function(t,e){return this.options.rtl?{x:w.getAbsoluteRight(e)-t.x,y:t.y-w.getAbsoluteTop(e)}:{x:t.x-w.getAbsoluteLeft(e),y:t.y-w.getAbsoluteTop(e)}},o.prototype.zoom=function(t,e,i,n){null==e&&(e=(this.start+this.end)/2);var o=x.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),s=x.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),r=o-s,a=e-s+(this.start-(e-s))*t,h=e+r+(this.end-(e+r))*t;this.startToFront=!(0<i),this.endToFront=!(0<-i);var d=x.snapAwayFromHidden(this.body.hiddenDates,a,i,!0),l=x.snapAwayFromHidden(this.body.hiddenDates,h,-i,!0);d==a&&l==h||(a=d,h=l);var u={animation:!1,byUser:!0,event:n};this.setRange(a,h,u),this.startToFront=!1,this.endToFront=!0},o.prototype.move=function(t){var e=this.end-this.start,i=this.start+e*t,n=this.end+e*t;this.start=i,this.end=n},o.prototype.moveTo=function(t){var e=(this.start+this.end)/2-t,i=this.start-e,n=this.end-e;this.setRange(i,n,{animation:!1,byUser:!0,event:null})},t.exports=o},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}function o(){}var s=n(i(19)),r=n(i(6)),a=i(44),u=i(10),h=i(37),c=i(2),d=i(45),l=i(97),p=i(36),f=i(46);a(o.prototype),o.prototype._create=function(t){function e(t){this.isActive()&&this.emit("mousewheel",t);var e=0,i=0;if("detail"in t&&(i=-1*t.detail),"wheelDelta"in t&&(i=t.wheelDelta),"wheelDeltaY"in t&&(i=t.wheelDeltaY),"wheelDeltaX"in t&&(e=-1*t.wheelDeltaX),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=-1*i,i=0),"deltaY"in t&&(i=-1*t.deltaY),"deltaX"in t&&(e=t.deltaX),this.options.zoomKey&&!t[this.options.zoomKey])if(t.preventDefault(),this.options.verticalScroll&&Math.abs(i)>=Math.abs(e)){var n=this.props.scrollTop+i;this.isActive()&&(this._setScrollTop(n),this._redraw(),this.emit("scroll",t))}else if(this.options.horizontalScroll){var o=(Math.abs(e)>=Math.abs(i)?e:i)/120*(this.range.end-this.range.start)/20,s=this.range.start+o,r=this.range.end+o,a={animation:!1,byUser:!0,event:t};this.range.setRange(s,r,a)}}function i(t){if(n.options.verticalScroll&&(t.preventDefault(),n.isActive())){var e=-t.target.scrollTop;n._setScrollTop(e),n._redraw(),n.emit("scrollSide",t)}}this.dom={},this.dom.container=t,this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.rollingModeBtn=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.rollingModeBtn.className="vis-rolling-mode-btn",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.rollingModeBtn),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on("rangechange",function(){!0===this.initialDrawDone&&this._redraw()}.bind(this)),this.on("rangechanged",function(){this.initialRangeChangeDone||(this.initialRangeChangeDone=!0)}.bind(this)),this.on("touch",this._onTouch.bind(this)),this.on("panmove",this._onDrag.bind(this));var n=this;this._origRedraw=this._redraw.bind(this),this._redraw=c.throttle(this._origRedraw),this.on("_change",function(t){n.itemSet&&n.itemSet.initialItemSetDrawn&&t&&1==t.queue?n._redraw():n._origRedraw()}),this.hammer=new u(this.dom.root);var o=this.hammer.get("pinch").set({enable:!0});h.disablePreventDefaultVertically(o),this.hammer.get("pan").set({threshold:5,direction:u.DIRECTION_HORIZONTAL}),this.listeners={},["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(function(e){function t(t){n.isActive()&&n.emit(e,t)}n.hammer.on(e,t),n.listeners[e]=t}),h.onTouch(this.hammer,function(t){n.emit("touch",t)}.bind(this)),h.onRelease(this.hammer,function(t){n.emit("release",t)}.bind(this)),this.dom.centerContainer.addEventListener?(this.dom.centerContainer.addEventListener("mousewheel",e.bind(this),!1),this.dom.centerContainer.addEventListener("DOMMouseScroll",e.bind(this),!1)):this.dom.centerContainer.attachEvent("onmousewheel",e.bind(this)),this.dom.left.parentNode.addEventListener("scroll",i.bind(this)),this.dom.right.parentNode.addEventListener("scroll",i.bind(this));var s=!1;if(this.dom.center.addEventListener("dragover",function(t){if(t.preventDefault&&t.preventDefault(),!(-1<!t.target.className.indexOf("vis")||s))return t.dataTransfer.dropEffect="move",!(s=!0)}.bind(this),!1),this.dom.center.addEventListener("drop",function(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();try{var e=JSON.parse(t.dataTransfer.getData("text"));if(!e||!e.content)return}catch(t){return!1}return s=!1,t.center={x:t.clientX,y:t.clientY},"item"!==e.target?n.itemSet._onAddItem(t):n.itemSet._onDropObjectOnItem(t),n.emit("drop",n.getEventProperties(t)),!1}.bind(this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root)},o.prototype.setOptions=function(e){if(e){if(c.selectiveExtend(["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","rtl","zoomKey","horizontalScroll","verticalScroll"],this.options,e),this.dom.rollingModeBtn.style.visibility="hidden",this.options.rtl&&(this.dom.container.style.direction="rtl",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className="vis-panel vis-right vis-vertical-scroll":this.dom.leftContainer.className="vis-panel vis-left vis-vertical-scroll"),"object"!==(0,r.default)(this.options.orientation)&&(this.options.orientation={item:void 0,axis:void 0}),"orientation"in e&&("string"==typeof e.orientation?this.options.orientation={item:e.orientation,axis:e.orientation}:"object"===(0,r.default)(e.orientation)&&("item"in e.orientation&&(this.options.orientation.item=e.orientation.item),"axis"in e.orientation&&(this.options.orientation.axis=e.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var i=this.timeAxis2=new d(this.body);i.setOptions=function(t){var e=t?c.extend({},t):{};e.orientation="top",d.prototype.setOptions.call(i,e)},this.components.push(i)}}else if(this.timeAxis2){var t=this.components.indexOf(this.timeAxis2);-1!==t&&this.components.splice(t,1),this.timeAxis2.destroy(),this.timeAxis2=null}if("function"==typeof e.drawPoints&&(e.drawPoints={onRender:e.drawPoints}),"hiddenDates"in this.options&&p.convertHiddenOptions(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in e&&(e.clickToUse?this.activator||(this.activator=new l(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),"showCustomTime"in e)throw new Error("Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])");this._initAutoResize()}if(this.components.forEach(function(t){return t.setOptions(e)}),"configure"in e){this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(e.configure);var n=c.deepExtend({},this.options);this.components.forEach(function(t){c.deepExtend(n,t.options)}),this.configurator.setModuleOptions({global:n})}this._redraw()},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.destroy=function(){for(var t in this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator),this.listeners)this.listeners.hasOwnProperty(t)&&delete this.listeners[t];this.listeners=null,this.hammer=null,this.components.forEach(function(t){return t.destroy()}),this.body=null},o.prototype.setCustomTime=function(t,e){var i=this.customTimes.filter(function(t){return e===t.options.id});if(0===i.length)throw new Error("No custom time bar found with id "+(0,s.default)(e));0<i.length&&i[0].setCustomTime(t)},o.prototype.getCustomTime=function(e){var t=this.customTimes.filter(function(t){return t.options.id===e});if(0===t.length)throw new Error("No custom time bar found with id "+(0,s.default)(e));return t[0].getCustomTime()},o.prototype.setCustomTimeTitle=function(t,e){var i=this.customTimes.filter(function(t){return t.options.id===e});if(0===i.length)throw new Error("No custom time bar found with id "+(0,s.default)(e));if(0<i.length)return i[0].setCustomTitle(t)},o.prototype.getEventProperties=function(t){return{event:t}},o.prototype.addCustomTime=function(t,e){var i=void 0!==t?c.convert(t,"Date").valueOf():new Date;if(this.customTimes.some(function(t){return t.options.id===e}))throw new Error("A custom time with id "+(0,s.default)(e)+" already exists");var n=new f(this.body,c.extend({},this.options,{time:i,id:e}));return this.customTimes.push(n),this.components.push(n),this._redraw(),e},o.prototype.removeCustomTime=function(e){var t=this.customTimes.filter(function(t){return t.options.id===e});if(0===t.length)throw new Error("No custom time bar found with id "+(0,s.default)(e));t.forEach(function(t){this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}.bind(this))},o.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},o.prototype.fit=function(t,e){var i=this.getDataRange();if(null!==i.min||null!==i.max){var n=i.max-i.min,o=new Date(i.min.valueOf()-.01*n),s=new Date(i.max.valueOf()+.01*n),r=!t||void 0===t.animation||t.animation;this.range.setRange(o,s,{animation:r},e)}},o.prototype.getDataRange=function(){throw new Error("Cannot invoke abstract method getDataRange")},o.prototype.setWindow=function(t,e,i,n){var o,s;"function"==typeof i&&(n=i,i={}),1==arguments.length?(o=void 0===(s=t).animation||s.animation,this.range.setRange(s.start,s.end,{animation:o})):2==arguments.length&&"function"==typeof e?(n=e,o=void 0===(s=t).animation||s.animation,this.range.setRange(s.start,s.end,{animation:o},n)):(o=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,{animation:o},n))},o.prototype.moveTo=function(t,e,i){"function"==typeof e&&(i=e,e={});var n=this.range.end-this.range.start,o=c.convert(t,"Date").valueOf(),s=o-n/2,r=o+n/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(s,r,{animation:a},i)},o.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},o.prototype.zoomIn=function(t,e,i){if(!(!t||t<0||1<t)){"function"==typeof e&&(i=e,e={});var n=this.getWindow(),o=n.start.valueOf(),s=n.end.valueOf(),r=s-o,a=(r-r/(1+t))/2,h=o+a,d=s-a;this.setWindow(h,d,e,i)}},o.prototype.zoomOut=function(t,e,i){if(!(!t||t<0||1<t)){"function"==typeof e&&(i=e,e={});var n=this.getWindow(),o=n.start.valueOf(),s=n.end.valueOf(),r=s-o,a=o-r*t/2,h=s+r*t/2;this.setWindow(a,h,e,i)}},o.prototype.redraw=function(){this._redraw()},o.prototype._redraw=function(){this.redrawCount++;var e=!1,t=this.options,i=this.props,n=this.dom;if(n&&n.container&&0!=n.root.offsetWidth){p.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),"top"==t.orientation?(c.addClassName(n.root,"vis-top"),c.removeClassName(n.root,"vis-bottom")):(c.removeClassName(n.root,"vis-top"),c.addClassName(n.root,"vis-bottom")),n.root.style.maxHeight=c.option.asSize(t.maxHeight,""),n.root.style.minHeight=c.option.asSize(t.minHeight,""),n.root.style.width=c.option.asSize(t.width,""),i.border.left=(n.centerContainer.offsetWidth-n.centerContainer.clientWidth)/2,i.border.right=i.border.left,i.border.top=(n.centerContainer.offsetHeight-n.centerContainer.clientHeight)/2,i.border.bottom=i.border.top,i.borderRootHeight=n.root.offsetHeight-n.root.clientHeight,i.borderRootWidth=n.root.offsetWidth-n.root.clientWidth,0===n.centerContainer.clientHeight&&(i.border.left=i.border.top,i.border.right=i.border.left),0===n.root.clientHeight&&(i.borderRootWidth=i.borderRootHeight),i.center.height=n.center.offsetHeight,i.left.height=n.left.offsetHeight,i.right.height=n.right.offsetHeight,i.top.height=n.top.clientHeight||-i.border.top,i.bottom.height=n.bottom.clientHeight||-i.border.bottom;var o=Math.max(i.left.height,i.center.height,i.right.height),s=i.top.height+o+i.bottom.height+i.borderRootHeight+i.border.top+i.border.bottom;n.root.style.height=c.option.asSize(t.height,s+"px"),i.root.height=n.root.offsetHeight,i.background.height=i.root.height-i.borderRootHeight;var r=i.root.height-i.top.height-i.bottom.height-i.borderRootHeight;i.centerContainer.height=r,i.leftContainer.height=r,i.rightContainer.height=i.leftContainer.height,i.root.width=n.root.offsetWidth,i.background.width=i.root.width-i.borderRootWidth,this.initialDrawDone||(i.scrollbarWidth=c.getScrollBarWidth()),t.verticalScroll?t.rtl?(i.left.width=n.leftContainer.clientWidth||-i.border.left,i.right.width=n.rightContainer.clientWidth+i.scrollbarWidth||-i.border.right):(i.left.width=n.leftContainer.clientWidth+i.scrollbarWidth||-i.border.left,i.right.width=n.rightContainer.clientWidth||-i.border.right):(i.left.width=n.leftContainer.clientWidth||-i.border.left,i.right.width=n.rightContainer.clientWidth||-i.border.right),this._setDOM();var a=this._updateScrollTop();"top"!=t.orientation.item&&(a+=Math.max(i.centerContainer.height-i.center.height-i.border.top-i.border.bottom,0)),n.center.style.top=a+"px";var h=0==i.scrollTop?"hidden":"",d=i.scrollTop==i.scrollTopMin?"hidden":"";n.shadowTop.style.visibility=h,n.shadowBottom.style.visibility=d,n.shadowTopLeft.style.visibility=h,n.shadowBottomLeft.style.visibility=d,n.shadowTopRight.style.visibility=h,n.shadowBottomRight.style.visibility=d,t.verticalScroll&&(n.rightContainer.className="vis-panel vis-right vis-vertical-scroll",n.leftContainer.className="vis-panel vis-left vis-vertical-scroll",n.shadowTopRight.style.visibility="hidden",n.shadowBottomRight.style.visibility="hidden",n.shadowTopLeft.style.visibility="hidden",n.shadowBottomLeft.style.visibility="hidden",n.left.style.top="0px",n.right.style.top="0px"),(!t.verticalScroll||i.center.height<i.centerContainer.height)&&(n.left.style.top=a+"px",n.right.style.top=a+"px",n.rightContainer.className=n.rightContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),n.leftContainer.className=n.leftContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),i.left.width=n.leftContainer.clientWidth||-i.border.left,i.right.width=n.rightContainer.clientWidth||-i.border.right,this._setDOM());var l=i.center.height>i.centerContainer.height;if(this.hammer.get("pan").set({direction:l?u.DIRECTION_ALL:u.DIRECTION_HORIZONTAL}),this.components.forEach(function(t){e=t.redraw()||e}),e){if(this.redrawCount<5)return void this.body.emitter.emit("_change");console.log("WARNING: infinite loop in redraw?")}else this.redrawCount=0;this.body.emitter.emit("changed")}},o.prototype._setDOM=function(){var t=this.props,e=this.dom;t.leftContainer.width=t.left.width,t.rightContainer.width=t.right.width;var i=t.root.width-t.left.width-t.right.width-t.borderRootWidth;t.center.width=i,t.centerContainer.width=i,t.top.width=i,t.bottom.width=i,e.background.style.height=t.background.height+"px",e.backgroundVertical.style.height=t.background.height+"px",e.backgroundHorizontal.style.height=t.centerContainer.height+"px",e.centerContainer.style.height=t.centerContainer.height+"px",e.leftContainer.style.height=t.leftContainer.height+"px",e.rightContainer.style.height=t.rightContainer.height+"px",e.background.style.width=t.background.width+"px",e.backgroundVertical.style.width=t.centerContainer.width+"px",e.backgroundHorizontal.style.width=t.background.width+"px",e.centerContainer.style.width=t.center.width+"px",e.top.style.width=t.top.width+"px",e.bottom.style.width=t.bottom.width+"px",e.background.style.left="0",e.background.style.top="0",e.backgroundVertical.style.left=t.left.width+t.border.left+"px",e.backgroundVertical.style.top="0",e.backgroundHorizontal.style.left="0",e.backgroundHorizontal.style.top=t.top.height+"px",e.centerContainer.style.left=t.left.width+"px",e.centerContainer.style.top=t.top.height+"px",e.leftContainer.style.left="0",e.leftContainer.style.top=t.top.height+"px",e.rightContainer.style.left=t.left.width+t.center.width+"px",e.rightContainer.style.top=t.top.height+"px",e.top.style.left=t.left.width+"px",e.top.style.top="0",e.bottom.style.left=t.left.width+"px",e.bottom.style.top=t.top.height+t.centerContainer.height+"px",e.center.style.left="0",e.left.style.left="0",e.right.style.left="0"},o.prototype.repaint=function(){throw new Error("Function repaint is deprecated. Use redraw instead.")},o.prototype.setCurrentTime=function(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)},o.prototype.getCurrentTime=function(){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()},o.prototype._toTime=function(t){return p.toTime(this,t,this.props.center.width)},o.prototype._toGlobalTime=function(t){return p.toTime(this,t,this.props.root.width)},o.prototype._toScreen=function(t){return p.toScreen(this,t,this.props.center.width)},o.prototype._toGlobalScreen=function(t){return p.toScreen(this,t,this.props.root.width)},o.prototype._initAutoResize=function(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()},o.prototype._startAutoResize=function(){var t=this;this._stopAutoResize(),this._onResize=function(){1==t.options.autoResize?t.dom.root&&(t.dom.root.offsetWidth==t.props.lastWidth&&t.dom.root.offsetHeight==t.props.lastHeight||(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight,t.props.scrollbarWidth=c.getScrollBarWidth(),t.body.emitter.emit("_change"))):t._stopAutoResize()},c.addEventListener(window,"resize",this._onResize),t.dom.root&&(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight),this.watchTimer=setInterval(this._onResize,1e3)},o.prototype._stopAutoResize=function(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(c.removeEventListener(window,"resize",this._onResize),this._onResize=null)},o.prototype._onTouch=function(t){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop},o.prototype._onPinch=function(t){this.touch.allowDragging=!1},o.prototype._onDrag=function(t){if(t&&this.touch.allowDragging){var e=t.deltaY,i=this._getScrollTop(),n=this._setScrollTop(this.touch.initialScrollTop+e);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),n!=i&&this.emit("verticalDrag")}},o.prototype._setScrollTop=function(t){return this.props.scrollTop=t,this._updateScrollTop(),this.props.scrollTop},o.prototype._updateScrollTop=function(){var t=Math.min(this.props.centerContainer.height-this.props.center.height,0);return t!=this.props.scrollTopMin&&("top"!=this.options.orientation.item&&(this.props.scrollTop+=t-this.props.scrollTopMin),this.props.scrollTopMin=t),0<this.props.scrollTop&&(this.props.scrollTop=0),this.props.scrollTop<t&&(this.props.scrollTop=t),this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),this.props.scrollTop},o.prototype._getScrollTop=function(){return this.props.scrollTop},o.prototype._createConfigurator=function(){throw new Error("Cannot invoke abstract method _createConfigurator")},t.exports=o},function(t,e,i){function s(t,e,i,n,o){this.moment=r,this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale="day",this.step=1,this.setRange(t,e,i),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,Array.isArray(n)?this.hiddenDates=n:this.hiddenDates=null!=n?[n]:[],this.format=s.FORMAT,this.options=o||{}}var r=i(9),n=i(36),o=i(2);s.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}},s.prototype.setMoment=function(t){this.moment=t,this.current=this.moment(this.current.valueOf()),this._start=this.moment(this._start.valueOf()),this._end=this.moment(this._end.valueOf())},s.prototype.setFormat=function(t){var e=o.deepExtend({},s.FORMAT);this.format=o.deepExtend(e,t)},s.prototype.setRange=function(t,e,i){if(!(t instanceof Date&&e instanceof Date))throw"No legal start or end date in method setRange";this._start=null!=t?this.moment(t.valueOf()):new Date,this._end=null!=e?this.moment(e.valueOf()):new Date,this.autoScale&&this.setMinimumStep(i)},s.prototype.start=function(){this.current=this._start.clone(),this.roundToMinor()},s.prototype.roundToMinor=function(){switch("week"==this.scale&&this.current.weekday(0),this.scale){case"year":this.current.year(this.step*Math.floor(this.current.year()/this.step)),this.current.month(0);case"month":this.current.date(1);case"week":case"day":case"weekday":this.current.hours(0);case"hour":this.current.minutes(0);case"minute":this.current.seconds(0);case"second":this.current.milliseconds(0)}if(1!=this.step)switch(this.scale){case"millisecond":this.current.subtract(this.current.milliseconds()%this.step,"milliseconds");break;case"second":this.current.subtract(this.current.seconds()%this.step,"seconds");break;case"minute":this.current.subtract(this.current.minutes()%this.step,"minutes");break;case"hour":this.current.subtract(this.current.hours()%this.step,"hours");break;case"weekday":case"day":this.current.subtract((this.current.date()-1)%this.step,"day");break;case"week":this.current.subtract(this.current.week()%this.step,"week");break;case"month":this.current.subtract(this.current.month()%this.step,"month");break;case"year":this.current.subtract(this.current.year()%this.step,"year")}},s.prototype.hasNext=function(){return this.current.valueOf()<=this._end.valueOf()},s.prototype.next=function(){var t=this.current.valueOf();switch(this.scale){case"millisecond":this.current.add(this.step,"millisecond");break;case"second":this.current.add(this.step,"second");break;case"minute":this.current.add(this.step,"minute");break;case"hour":this.current.add(this.step,"hour"),this.current.month()<6?this.current.subtract(this.current.hours()%this.step,"hour"):this.current.hours()%this.step!=0&&this.current.add(this.step-this.current.hours()%this.step,"hour");break;case"weekday":case"day":this.current.add(this.step,"day");break;case"week":if(0!==this.current.weekday())this.current.weekday(0),this.current.add(this.step,"week");else if(!1===this.options.showMajorLabels)this.current.add(this.step,"week");else{var e=this.current.clone();e.add(1,"week"),e.isSame(this.current,"month")?this.current.add(this.step,"week"):(this.current.add(this.step,"week"),this.current.date(1))}break;case"month":this.current.add(this.step,"month");break;case"year":this.current.add(this.step,"year")}if(1!=this.step)switch(this.scale){case"millisecond":0<this.current.milliseconds()&&this.current.milliseconds()<this.step&&this.current.milliseconds(0);break;case"second":0<this.current.seconds()&&this.current.seconds()<this.step&&this.current.seconds(0);break;case"minute":0<this.current.minutes()&&this.current.minutes()<this.step&&this.current.minutes(0);break;case"hour":0<this.current.hours()&&this.current.hours()<this.step&&this.current.hours(0);break;case"weekday":case"day":this.current.date()<this.step+1&&this.current.date(1);break;case"week":this.current.week()<this.step&&this.current.week(1);break;case"month":this.current.month()<this.step&&this.current.month(0)}this.current.valueOf()==t&&(this.current=this._end.clone()),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,n.stepOverHiddenDates(this.moment,this,t)},s.prototype.getCurrent=function(){return this.current},s.prototype.setScale=function(t){t&&"string"==typeof t.scale&&(this.scale=t.scale,this.step=0<t.step?t.step:1,this.autoScale=!1)},s.prototype.setAutoScale=function(t){this.autoScale=t},s.prototype.setMinimumStep=function(t){null!=t&&(t<31104e9&&(this.scale="year",this.step=1e3),t<15552e9&&(this.scale="year",this.step=500),t<31104e8&&(this.scale="year",this.step=100),t<15552e8&&(this.scale="year",this.step=50),t<31104e7&&(this.scale="year",this.step=10),t<15552e7&&(this.scale="year",this.step=5),t<31104e6&&(this.scale="year",this.step=1),t<7776e6&&(this.scale="month",this.step=3),t<2592e6&&(this.scale="month",this.step=1),t<432e6&&(this.scale="day",this.step=5),t<1728e5&&(this.scale="day",this.step=2),t<864e5&&(this.scale="day",this.step=1),t<432e5&&(this.scale="weekday",this.step=1),t<144e5&&(this.scale="hour",this.step=4),t<36e5&&(this.scale="hour",this.step=1),t<9e5&&(this.scale="minute",this.step=15),t<6e5&&(this.scale="minute",this.step=10),t<3e5&&(this.scale="minute",this.step=5),t<6e4&&(this.scale="minute",this.step=1),t<15e3&&(this.scale="second",this.step=15),t<1e4&&(this.scale="second",this.step=10),t<5e3&&(this.scale="second",this.step=5),t<1e3&&(this.scale="second",this.step=1),t<200&&(this.scale="millisecond",this.step=200),t<100&&(this.scale="millisecond",this.step=100),t<50&&(this.scale="millisecond",this.step=50),t<10&&(this.scale="millisecond",this.step=10),t<5&&(this.scale="millisecond",this.step=5),t<1&&(this.scale="millisecond",this.step=1))},s.snap=function(t,e,i){var n=r(t);if("year"==e){var o=n.year()+Math.round(n.month()/12);n.year(Math.round(o/i)*i),n.month(0),n.date(0),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("month"==e)15<n.date()?(n.date(1),n.add(1,"month")):n.date(1),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0);else if("week"==e)2<n.weekday()?(n.weekday(0),n.add(1,"week")):n.weekday(0),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:n.hours(24*Math.round(n.hours()/24));break;default:n.hours(12*Math.round(n.hours()/12))}n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:n.hours(12*Math.round(n.hours()/12));break;default:n.hours(6*Math.round(n.hours()/6))}n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("hour"==e){switch(i){case 4:n.minutes(60*Math.round(n.minutes()/60));break;default:n.minutes(30*Math.round(n.minutes()/30))}n.seconds(0),n.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:n.minutes(5*Math.round(n.minutes()/5)),n.seconds(0);break;case 5:n.seconds(60*Math.round(n.seconds()/60));break;default:n.seconds(30*Math.round(n.seconds()/30))}n.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:n.seconds(5*Math.round(n.seconds()/5)),n.milliseconds(0);break;case 5:n.milliseconds(1e3*Math.round(n.milliseconds()/1e3));break;default:n.milliseconds(500*Math.round(n.milliseconds()/500))}else if("millisecond"==e){var s=5<i?i/2:1;n.milliseconds(Math.round(n.milliseconds()/s)*s)}return n},s.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.scale){case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":case"week":return 1==t.date();case"month":return 0==t.month();case"year":default:return!1}},s.prototype.getLabelMinor=function(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.minorLabels)return this.format.minorLabels(t,this.scale,this.step);var e=this.format.minorLabels[this.scale];switch(this.scale){case"week":if(this.isMajor()&&0!==t.weekday())return"";default:return e&&0<e.length?this.moment(t).format(e):""}},s.prototype.getLabelMajor=function(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.majorLabels)return this.format.majorLabels(t,this.scale,this.step);var e=this.format.majorLabels[this.scale];return e&&0<e.length?this.moment(t).format(e):""},s.prototype.getClassName=function(){function t(t){return t/a%2==0?" vis-even":" vis-odd"}function e(t){return t.isSame(new Date,"day")?" vis-today":t.isSame(o().add(1,"day"),"day")?" vis-tomorrow":t.isSame(o().add(-1,"day"),"day")?" vis-yesterday":""}function i(t){return t.isSame(new Date,"week")?" vis-current-week":""}function n(t){return t.isSame(new Date,"month")?" vis-current-month":""}var o=this.moment,s=this.moment(this.current),r=s.locale?s.locale("en"):s.lang("en"),a=this.step,h=[];switch(this.scale){case"millisecond":h.push(e(r)),h.push(t(r.milliseconds()));break;case"second":h.push(e(r)),h.push(t(r.seconds()));break;case"minute":h.push(e(r)),h.push(t(r.minutes()));break;case"hour":h.push("vis-h"+r.hours()+(4==this.step?"-h"+(r.hours()+4):"")),h.push(e(r)),h.push(t(r.hours()));break;case"weekday":h.push("vis-"+r.format("dddd").toLowerCase()),h.push(e(r)),h.push(i(r)),h.push(t(r.date()));break;case"day":h.push("vis-day"+r.date()),h.push("vis-"+r.format("MMMM").toLowerCase()),h.push(e(r)),h.push(n(r)),h.push(this.step<=2?e(r):""),h.push(this.step<=2?"vis-"+r.format("dddd").toLowerCase():""),h.push(t(r.date()-1));break;case"week":h.push("vis-week"+r.format("w")),h.push(i(r)),h.push(t(r.week()));break;case"month":h.push("vis-"+r.format("MMMM").toLowerCase()),h.push(n(r)),h.push(t(r.month()));break;case"year":h.push("vis-year"+r.year()),h.push(r.isSame(new Date,"year")?" vis-current-year":""),h.push(t(r.year()))}return h.filter(String).join(" ")},t.exports=s},function(t,e,i){function n(t,e){this.body=t,this.defaultOptions={rtl:!1,showCurrentTime:!0,moment:r,locales:a,locale:"en"},this.options=o.extend({},this.defaultOptions),this.offset=0,this._create(),this.setOptions(e)}var o=i(2),s=i(16),r=i(9),a=i(98);(n.prototype=new s)._create=function(){var t=document.createElement("div");t.className="vis-current-time",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t},n.prototype.destroy=function(){this.options.showCurrentTime=!1,this.redraw(),this.body=null},n.prototype.setOptions=function(t){t&&o.selectiveExtend(["rtl","showCurrentTime","moment","locale","locales"],this.options,t)},n.prototype.redraw=function(){if(this.options.showCurrentTime){var t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar),this.start());var e=this.options.moment((new Date).valueOf()+this.offset),i=this.body.util.toScreen(e),n=this.options.locales[this.options.locale];n||(this.warned||(console.log("WARNING: options.locales['"+this.options.locale+"'] not found. See http://visjs.org/docs/timeline/#Localization"),this.warned=!0),n=this.options.locales.en);var o=n.current+" "+n.time+": "+e.format("dddd, MMMM Do YYYY, H:mm:ss");o=o.charAt(0).toUpperCase()+o.substring(1),this.options.rtl?this.bar.style.right=i+"px":this.bar.style.left=i+"px",this.bar.title=o}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1},n.prototype.start=function(){var i=this;!function t(){i.stop();var e=1/i.body.range.conversion(i.body.domProps.center.width).scale/10;e<30&&(e=30),1e3<e&&(e=1e3),i.redraw(),i.body.emitter.emit("currentTimeTick"),i.currentTimeTimer=setTimeout(t,e)}()},n.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},n.prototype.setCurrentTime=function(t){var e=o.convert(t,"Date").valueOf(),i=(new Date).valueOf();this.offset=e-i,this.redraw()},n.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},t.exports=n},function(t,e,i){function n(t,e,i){if(this.groupId=t,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.doInnerStack=!1,this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.isVisible=null,this.stackDirty=!0,e&&e.nestedGroups&&(this.nestedGroups=e.nestedGroups,0==e.showNested?this.showNested=!1:this.showNested=!0),e&&e.subgroupStack)if("boolean"==typeof e.subgroupStack)this.doInnerStack=e.subgroupStack,this.subgroupStackAll=e.subgroupStack;else for(var n in e.subgroupStack)this.subgroupStack[n]=e.subgroupStack[n],this.doInnerStack=this.doInnerStack||e.subgroupStack[n];this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var o=this;this.itemSet.body.emitter.on("checkRangedItems",function(){o.checkRangedItems=!0}),this._create(),this.setData(e)}var o,s=i(8),r=(o=s)&&o.__esModule?o:{default:o},v=i(2),u=i(100);n.prototype._create=function(){var t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="vis-group",(i["timeline-group"]=this).dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.style.position="absolute",this.dom.marker.innerHTML="",this.dom.background.appendChild(this.dom.marker)},n.prototype.setData=function(t){var e,i;if((e=this.itemSet.options&&this.itemSet.options.groupTemplate?(i=this.itemSet.options.groupTemplate.bind(this))(t,this.dom.inner):t&&t.content)instanceof Element){for(this.dom.inner.appendChild(e);this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else e instanceof Object?i(t,this.dom.inner):this.dom.inner.innerHTML=null!=e?e:this.groupId||"";if(this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?v.removeClassName(this.dom.inner,"vis-hidden"):v.addClassName(this.dom.inner,"vis-hidden"),t&&t.nestedGroups){this.nestedGroups&&this.nestedGroups==t.nestedGroups||(this.nestedGroups=t.nestedGroups),void 0===t.showNested&&void 0!==this.showNested||(0==t.showNested?this.showNested=!1:this.showNested=!0),v.addClassName(this.dom.label,"vis-nesting-group");var n=this.itemSet.options.rtl?"collapsed-rtl":"collapsed";this.showNested?(v.removeClassName(this.dom.label,n),v.addClassName(this.dom.label,"expanded")):(v.removeClassName(this.dom.label,"expanded"),v.addClassName(this.dom.label,n))}else this.nestedGroups&&(this.nestedGroups=null,n=this.itemSet.options.rtl?"collapsed-rtl":"collapsed",v.removeClassName(this.dom.label,n),v.removeClassName(this.dom.label,"expanded"),v.removeClassName(this.dom.label,"vis-nesting-group"));t&&t.nestedInGroup&&(v.addClassName(this.dom.label,"vis-nested-group"),this.itemSet.options&&this.itemSet.options.rtl?this.dom.inner.style.paddingRight="30px":this.dom.inner.style.paddingLeft="30px");var o=t&&t.className||null;o!=this.className&&(this.className&&(v.removeClassName(this.dom.label,this.className),v.removeClassName(this.dom.foreground,this.className),v.removeClassName(this.dom.background,this.className),v.removeClassName(this.dom.axis,this.className)),v.addClassName(this.dom.label,o),v.addClassName(this.dom.foreground,o),v.addClassName(this.dom.background,o),v.addClassName(this.dom.axis,o),this.className=o),this.style&&(v.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(v.addCssText(this.dom.label,t.style),this.style=t.style)},n.prototype.getLabelWidth=function(){return this.props.label.width},n.prototype._didMarkerHeightChange=function(){var t=this.dom.marker.clientHeight;if(t!=this.lastMarkerHeight){this.lastMarkerHeight=t;var i={},n=0;if(v.forEach(this.items,function(t,e){t.dirty=!0,t.displayed&&(i[e]=t.redraw(!0),n=i[e].length)}),0<n)for(var e=0;e<n;e++)v.forEach(i,function(t){t[e]()});return!0}},n.prototype._calculateGroupSizeAndPosition=function(){var t=this.dom.foreground.offsetTop,e=this.dom.foreground.offsetLeft,i=this.dom.foreground.offsetWidth;this.top=t,this.right=e,this.width=i},n.prototype._redrawItems=function(t,e,i,n){if(t||this.stackDirty||this.isVisible&&!e){var o={},s=null;if("function"==typeof this.itemSet.options.order){var r=this,a={},h=0;if(v.forEach(this.items,function(t,e){t.displayed||(a[e]=t.redraw(!0),h=a[e].length,r.visibleItems.push(t))}),0<h)for(var d=0;d<h;d++)v.forEach(a,function(t){t[d]()});if(v.forEach(this.items,function(t){t.repositionX(!1)}),this.doInnerStack&&this.itemSet.options.stackSubgroups){for(s in this.subgroups)o[s]=this.subgroups[s].items.slice().sort(function(t,e){return r.itemSet.options.order(t.data,e.data)});u.stackSubgroupsWithInnerStack(o,i,this.subgroups)}else{var l=this.orderedItems.byStart.slice().sort(function(t,e){return r.itemSet.options.order(t.data,e.data)});u.stack(l,i,!0)}this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,n)}else if(this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,n),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups){for(s in this.subgroups)o[s]=this.subgroups[s].items;u.stackSubgroupsWithInnerStack(o,i,this.subgroups)}else u.stack(this.visibleItems,i,!0);else u.nostack(this.visibleItems,i,this.subgroups,this.itemSet.options.stackSubgroups);this.stackDirty=!1}},n.prototype._didResize=function(t,e){t=v.updateProperty(this,"height",e)||t;var i=this.dom.inner.clientWidth,n=this.dom.inner.clientHeight;return t=v.updateProperty(this.props.label,"width",i)||t,v.updateProperty(this.props.label,"height",n)||t},n.prototype._applyGroupHeight=function(t){this.dom.background.style.height=t+"px",this.dom.foreground.style.height=t+"px",this.dom.label.style.height=t+"px"},n.prototype._updateItemsVerticalPosition=function(t){for(var e=0,i=this.visibleItems.length;e<i;e++){var n=this.visibleItems[e];n.repositionY(t),this.isVisible||"__background__"==this.groupId||n.displayed&&n.hide()}},n.prototype.redraw=function(t,e,i,n){var o,s,r=!1,a=this.isVisible,h=[function(){i=this._didMarkerHeightChange.bind(this)}.bind(this),this._updateSubGroupHeights.bind(this,e),this._calculateGroupSizeAndPosition.bind(this),function(){this.isVisible=this._isGroupVisible.bind(this)(t,e)}.bind(this),function(){this._redrawItems.bind(this)(i,a,e,t)}.bind(this),this._updateSubgroupsSizes.bind(this),function(){o=this._calculateHeight.bind(this)(e)}.bind(this),this._calculateGroupSizeAndPosition.bind(this),function(){r=this._didResize.bind(this)(r,o)}.bind(this),function(){this._applyGroupHeight.bind(this)(o)}.bind(this),function(){this._updateItemsVerticalPosition.bind(this)(e)}.bind(this),function(){return!this.isVisible&&this.height&&(r=!1),r}];return n?h:(h.forEach(function(t){s=t()}),s)},n.prototype._updateSubGroupHeights=function(e){if(0<(0,r.default)(this.subgroups).length){var i=this;this.resetSubgroups(),v.forEach(this.visibleItems,function(t){void 0!==t.data.subgroup&&(i.subgroups[t.data.subgroup].height=Math.max(i.subgroups[t.data.subgroup].height,t.height+e.item.vertical),i.subgroups[t.data.subgroup].visible=!0)})}},n.prototype._isGroupVisible=function(t,e){return this.top<=t.body.domProps.centerContainer.height-t.body.domProps.scrollTop+e.axis&&this.top+this.height+e.axis>=-t.body.domProps.scrollTop},n.prototype._calculateHeight=function(t){var e,i=this.visibleItems;if(0<i.length){var n=i[0].top,o=i[0].top+i[0].height;if(v.forEach(i,function(t){n=Math.min(n,t.top),o=Math.max(o,t.top+t.height)}),n>t.axis){var s=n-t.axis;o-=s,v.forEach(i,function(t){t.top-=s})}e=o+t.item.vertical/2}else e=0;return Math.max(e,this.props.label.height)},n.prototype.show=function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)},n.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var n=this.dom.axis;n.parentNode&&n.parentNode.removeChild(n)},n.prototype.add=function(t){if((this.items[t.id]=t).setParent(this),this.stackDirty=!0,void 0!==t.data.subgroup&&(this._addToSubgroup(t),this.orderSubgroups()),-1==this.visibleItems.indexOf(t)){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},n.prototype._addToSubgroup=function(t,e){null!=(e=e||t.data.subgroup)&&void 0===this.subgroups[e]&&(this.subgroups[e]={height:0,top:0,start:t.data.start,end:t.data.end||t.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[e]||!1},this.subgroupIndex++),new Date(t.data.start)<new Date(this.subgroups[e].start)&&(this.subgroups[e].start=t.data.start);var i=t.data.end||t.data.start;new Date(i)>new Date(this.subgroups[e].end)&&(this.subgroups[e].end=i),this.subgroups[e].items.push(t)},n.prototype._updateSubgroupsSizes=function(){if(this.subgroups)for(var t in this.subgroups){var e=this.subgroups[t].items[0].data.end||this.subgroups[t].items[0].data.start,i=this.subgroups[t].items[0].data.start,n=e-1;this.subgroups[t].items.forEach(function(t){new Date(t.data.start)<new Date(i)&&(i=t.data.start);var e=t.data.end||t.data.start;new Date(e)>new Date(n)&&(n=e)}),this.subgroups[t].start=i,this.subgroups[t].end=new Date(n-1)}},n.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t,e=[];if("string"==typeof this.subgroupOrderer){for(t in this.subgroups)e.push({subgroup:t,sortField:this.subgroups[t].items[0].data[this.subgroupOrderer]});e.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(t in this.subgroups)e.push(this.subgroups[t].items[0].data);e.sort(this.subgroupOrderer)}if(0<e.length)for(var i=0;i<e.length;i++)this.subgroups[e[i].subgroup].index=i}},n.prototype.resetSubgroups=function(){for(var t in this.subgroups)this.subgroups.hasOwnProperty(t)&&(this.subgroups[t].visible=!1,this.subgroups[t].height=0)},n.prototype.remove=function(t){delete this.items[t.id],t.setParent(null),this.stackDirty=!0;var e=this.visibleItems.indexOf(t);-1!=e&&this.visibleItems.splice(e,1),void 0!==t.data.subgroup&&(this._removeFromSubgroup(t),this.orderSubgroups())},n.prototype._removeFromSubgroup=function(t,e){if(null!=(e=e||t.data.subgroup)){var i=this.subgroups[e];if(i){var n=i.items.indexOf(t);0<=n&&(i.items.splice(n,1),i.items.length?this._updateSubgroupsSizes():delete this.subgroups[e])}}},n.prototype.removeFromDataSet=function(t){this.itemSet.removeItem(t.id)},n.prototype.order=function(){for(var t=v.toArray(this.items),e=[],i=[],n=0;n<t.length;n++)void 0!==t[n].data.end&&i.push(t[n]),e.push(t[n]);this.orderedItems={byStart:e,byEnd:i},u.orderByStart(this.orderedItems.byStart),u.orderByEnd(this.orderedItems.byEnd)},n.prototype._updateItemsInRange=function(t,e,i){function n(t){return t<a?-1:t<=h?0:1}var o=[],s={},r=(i.end-i.start)/4,a=i.start-r,h=i.end+r;if(0<e.length)for(var d=0;d<e.length;d++)this._checkIfVisibleWithReference(e[d],o,s,i);var l=v.binarySearchCustom(t.byStart,n,"data","start");if(this._traceVisible(l,t.byStart,o,s,function(t){return t.data.start<a||t.data.start>h}),1==this.checkRangedItems)for(this.checkRangedItems=!1,d=0;d<t.byEnd.length;d++)this._checkIfVisibleWithReference(t.byEnd[d],o,s,i);else{var u=v.binarySearchCustom(t.byEnd,n,"data","end");this._traceVisible(u,t.byEnd,o,s,function(t){return t.data.end<a||t.data.end>h})}var c={},p=0;for(d=0;d<o.length;d++){var f=o[d];f.displayed||(c[d]=f.redraw(!0),p=c[d].length)}if(0<p)for(var m=0;m<p;m++)v.forEach(c,function(t){t[m]()});for(d=0;d<o.length;d++)o[d].repositionX();return o},n.prototype._traceVisible=function(t,e,i,n,o){if(-1!=t){var s,r;for(s=t;0<=s&&!o(r=e[s]);s--)void 0===n[r.id]&&(n[r.id]=!0,i.push(r));for(s=t+1;s<e.length&&!o(r=e[s]);s++)void 0===n[r.id]&&(n[r.id]=!0,i.push(r))}},n.prototype._checkIfVisible=function(t,e,i){t.isVisible(i)?(t.displayed||t.show(),t.repositionX(),e.push(t)):t.displayed&&t.hide()},n.prototype._checkIfVisibleWithReference=function(t,e,i,n){t.isVisible(n)?void 0===i[t.id]&&(i[t.id]=!0,e.push(t)):t.displayed&&t.hide()},n.prototype.changeSubgroup=function(t,e,i){this._removeFromSubgroup(t,e),this._addToSubgroup(t,i),this.orderSubgroups()},t.exports=n},function(t,e,i){function n(t,e,i){a.call(this,t,e,i),this.width=0,this.height=0,this.top=0,this.left=0}var o,s=i(29),r=(o=s)&&o.__esModule?o:{default:o},a=i(68);(n.prototype=(0,r.default)(a.prototype)).redraw=function(t,e,i){this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,t),this.width=this.dom.background.offsetWidth,this.dom.background.style.height="0";for(var n=0,o=this.visibleItems.length;n<o;n++)this.visibleItems[n].repositionY(e);return!1},n.prototype.show=function(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)},t.exports=n},function(t,e,i){function n(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,this.options=i,t){if(null==t.start)throw new Error('Property "start" missing in item '+t.id);if(null==t.end)throw new Error('Property "end" missing in item '+t.id)}o.call(this,t,e,i)}var o=i(38);(n.prototype=new o(null,null,null)).baseClassName="vis-item vis-range",n.prototype.isVisible=function(t){return this.data.start<t.end&&this.data.end>t.start},n.prototype._createDomElement=function(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.visibleFrame=document.createElement("div"),this.dom.visibleFrame.className="vis-item-visible-frame",this.dom.box.appendChild(this.dom.visibleFrame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),(this.dom.box["timeline-item"]=this).dirty=!0)},n.prototype._appendDomElement=function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}this.displayed=!0},n.prototype._updateDirtyDomComponents=function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className=this.baseClassName+e,this.dom.content.style.maxWidth="none"}},n.prototype._getDomComponentsSizes=function(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.frame).overflow,{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}},n.prototype._updateDomComponentsSizes=function(t){this.props.content.width=t.content.width,this.height=t.box.height,this.dom.content.style.maxWidth="",this.dirty=!1},n.prototype._repaintDomAdditionals=function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()},n.prototype.redraw=function(t){var e,i,n=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),function(){this.dirty&&(e=this._getDomComponentsSizes.bind(this)())}.bind(this),function(){this.dirty&&this._updateDomComponentsSizes.bind(this)(e)}.bind(this),this._repaintDomAdditionals.bind(this)];return t?n:(n.forEach(function(t){i=t()}),i)},n.prototype.show=function(){this.displayed||this.redraw()},n.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},n.prototype.repositionX=function(t){var e,i,n=this.parent.width,o=this.conversion.toScreen(this.data.start),s=this.conversion.toScreen(this.data.end),r=void 0===this.data.align?this.options.align:this.data.align;!1===this.data.limitSize||void 0!==t&&!0!==t||(o<-n&&(o=-n),2*n<s&&(s=2*n));var a=Math.max(s-o+.5,1);switch(i=this.overflow?(this.options.rtl?this.right=o:this.left=o,this.width=a+this.props.content.width,this.props.content.width):(this.options.rtl?this.right=o:this.left=o,this.width=a,Math.min(s-o,this.props.content.width)),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=a+"px",r){case"left":this.options.rtl?this.dom.content.style.right="0":this.dom.content.style.left="0";break;case"right":this.options.rtl?this.dom.content.style.right=Math.max(a-i,0)+"px":this.dom.content.style.left=Math.max(a-i,0)+"px";break;case"center":this.options.rtl?this.dom.content.style.right=Math.max((a-i)/2,0)+"px":this.dom.content.style.left=Math.max((a-i)/2,0)+"px";break;default:e=this.overflow?0<s?Math.max(-o,0):-i:o<0?-o:0,this.options.rtl?this.dom.content.style.right=e+"px":(this.dom.content.style.left=e+"px",this.dom.content.style.width="calc(100% - "+e+"px)")}},n.prototype.repositionY=function(){var t=this.options.orientation.item;this.dom.box.style.top="top"==t?this.top+"px":this.parent.height-this.top-this.height+"px"},n.prototype._repaintDragLeft=function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",(t.dragLeftItem=this).dom.box.appendChild(t),this.dom.dragLeft=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragLeft||(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},n.prototype._repaintDragRight=function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",(t.dragRightItem=this).dom.box.appendChild(t),this.dom.dragRight=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragRight||(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},t.exports=n},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(19)),r=n(i(6)),s=n(i(0)),a=n(i(1)),m=i(2),h=i(179).default,d=((0,a.default)(l,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;"string"==typeof t?this.options.filter=t:t instanceof Array?this.options.filter=t.join():"object"===(void 0===t?"undefined":(0,r.default)(t))?(void 0!==t.container&&(this.options.container=t.container),void 0!==t.filter&&(this.options.filter=t.filter),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)):"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0),!1===this.options.filter&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){var t=this;this._clean(),this.changedOptions=[];var e=this.options.filter,i=0,n=!1;for(var o in this.configureOptions)this.configureOptions.hasOwnProperty(o)&&(n=this.allowCreation=!1,"function"==typeof e?n=(n=e(o,[]))||this._handleObject(this.configureOptions[o],[o],!0):!0!==e&&-1===e.indexOf(o)||(n=!0),!1!==n&&(this.allowCreation=!0,0<i&&this._makeItem([]),this._makeHeader(o),this._handleObject(this.configureOptions[o],[o])),i++);if(!0===this.options.showButton){var s=document.createElement("div");s.className="vis-configuration vis-config-button",s.innerHTML="generate options",s.onclick=function(){t._printOptions()},s.onmouseover=function(){s.className="vis-configuration vis-config-button hover"},s.onmouseout=function(){s.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(s)}this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);void 0!==this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(t){for(var e=this.moduleOptions,i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}},{key:"_makeItem",value:function(t){if(!0!==this.allowCreation)return 0;var e=document.createElement("div");e.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var i=arguments.length,n=Array(1<i?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return n.forEach(function(t){e.appendChild(t)}),this.domElements.push(e),this.domElements.length}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=t,this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");return n.className="vis-configuration vis-config-label vis-config-s"+e.length,n.innerHTML=!0===i?"<i><b>"+t+":</b></i>":t+":",n}},{key:"_makeDropdown",value:function(t,e,i){var n=document.createElement("select");n.className="vis-configuration vis-config-select";var o=0;void 0!==e&&-1!==t.indexOf(e)&&(o=t.indexOf(e));for(var s=0;s<t.length;s++){var r=document.createElement("option");r.value=t[s],s===o&&(r.selected="selected"),r.innerHTML=t[s],n.appendChild(r)}var a=this;n.onchange=function(){a._update(this.value,i)};var h=this._makeLabel(i[i.length-1],i);this._makeItem(i,h,n)}},{key:"_makeRange",value:function(t,e,i){var n=t[0],o=t[1],s=t[2],r=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=s}catch(t){}a.step=r;var h="",d=0;void 0!==e?(e<0&&1.2*e<o?(a.min=Math.ceil(1.2*e),d=a.min,h="range increased"):e/1.2<o&&(a.min=Math.ceil(e/1.2),d=a.min,h="range increased"),s<1.2*e&&1!==s&&(a.max=Math.ceil(1.2*e),d=a.max,h="range increased"),a.value=e):a.value=n;var l=document.createElement("input");l.className="vis-configuration vis-config-rangeinput",l.value=a.value;var u=this;a.onchange=function(){l.value=this.value,u._update(Number(this.value),i)},a.oninput=function(){l.value=this.value};var c=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,c,a,l);""!==h&&this.popupHistory[p]!==d&&(this.popupHistory[p]=d,this._setupPopup(h,p))}},{key:"_setupPopup",value:function(t,e){var i=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){var n=document.createElement("div");n.id="vis-configuration-popup",n.className="vis-configuration-popup",n.innerHTML=t,n.onclick=function(){i._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:e}}}},{key:"_removePopup",value:function(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var t=this;if(void 0!==this.popupDiv.html){var e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+"px",this.popupDiv.html.style.top=e.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=setTimeout(function(){t.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=setTimeout(function(){t._removePopup()},1800)}}},{key:"_makeCheckbox",value:function(t,e,i){var n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=t,void 0===e||(n.checked=e)!==t&&("object"===(void 0===t?"undefined":(0,r.default)(t))?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e}));var o=this;n.onchange=function(){o._update(this.checked,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}},{key:"_makeTextInput",value:function(t,e,i){var n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",(n.value=e)!==t&&this.changedOptions.push({path:i,value:e});var o=this;n.onchange=function(){o._update(this.value,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}},{key:"_makeColorField",value:function(t,e,i){var n=this,o=t[1],s=document.createElement("div");"none"!==(e=void 0===e?o:e)?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=e):s.className="vis-configuration vis-config-colorBlock none",e=void 0===e?o:e,s.onclick=function(){n._showColorPicker(e,s,i)};var r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,s)}},{key:"_showColorPicker",value:function(t,i,n){var o=this;i.onclick=function(){},this.colorPicker.insertTo(i),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback(function(t){var e="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";i.style.backgroundColor=e,o._update(e,n)}),this.colorPicker.setCloseCallback(function(){i.onclick=function(){o._showColorPicker(t,i,n)}})}},{key:"_handleObject",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=!1,o=this.options.filter,s=!1;for(var r in t)if(t.hasOwnProperty(r)){n=!0;var a=t[r],h=m.copyAndExtendArray(e,r);if("function"==typeof o&&!1===(n=o(r,e))&&!(a instanceof Array)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,h,!0),this.allowCreation=!1===i),!1!==n){s=!0;var d=this._getValue(h);if(a instanceof Array)this._handleArray(a,d,h);else if("string"==typeof a)this._makeTextInput(a,d,h);else if("boolean"==typeof a)this._makeCheckbox(a,d,h);else if(a instanceof Object){var l=!0;if(-1!==e.indexOf("physics")&&this.moduleOptions.physics.solver!==r&&(l=!1),!0===l)if(void 0!==a.enabled){var u=m.copyAndExtendArray(h,"enabled"),c=this._getValue(u);if(!0===c){var p=this._makeLabel(r,h,!0);this._makeItem(h,p),s=this._handleObject(a,h)||s}else this._makeCheckbox(a,c,h)}else{var f=this._makeLabel(r,h,!0);this._makeItem(h,f),s=this._handleObject(a,h)||s}}else console.error("dont know how to handle",a,r,h)}}return s}},{key:"_handleArray",value:function(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=i;t="false"!==(t="true"===t||t)&&t;for(var o=0;o<e.length;o++)"global"!==e[o]&&(void 0===n[e[o]]&&(n[e[o]]={}),o!==e.length-1?n=n[e[o]]:n[e[o]]=t);return i}},{key:"_printOptions",value:function(){var t=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+(0,o.default)(t,null,2)+"</pre>"}},{key:"getOptions",value:function(){for(var t={},e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}]),l);function l(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1;(0,s.default)(this,l),this.parent=t,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},m.extend(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new h(n),this.wrapper=void 0}e.default=d},function(t,e,i){function n(t,e){}function h(t,e){return{style:(e=void 0===e?{}:e).style||t.options.drawPoints.style,styles:e.styles||t.options.drawPoints.styles,size:e.size||t.options.drawPoints.size,className:e.className||t.className}}var o,s=i(6),a=(o=s)&&o.__esModule?o:{default:o},d=i(14);n.draw=function(t,e,i,n){n=n||0;for(var o=function(t,e){var i=void 0;return t.options&&t.options.drawPoints&&t.options.drawPoints.onRender&&"function"==typeof t.options.drawPoints.onRender&&(i=t.options.drawPoints.onRender),e.group.options&&e.group.options.drawPoints&&e.group.options.drawPoints.onRender&&"function"==typeof e.group.options.drawPoints.onRender&&(i=e.group.options.drawPoints.onRender),i}(i,e),s=0;s<t.length;s++)if(o){var r=o(t[s],e);!0!==r&&"object"!==(void 0===r?"undefined":(0,a.default)(r))||d.drawPoint(t[s].screen_x+n,t[s].screen_y,h(e,r),i.svgElements,i.svg,t[s].label)}else d.drawPoint(t[s].screen_x+n,t[s].screen_y,h(e),i.svgElements,i.svg,t[s].label)},n.drawIcon=function(t,e,i,n,o,s){var r=.5*o,a=d.getSVGElement("rect",s.svgElements,s.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-r),a.setAttributeNS(null,"width",n),a.setAttributeNS(null,"height",2*r),a.setAttributeNS(null,"class","vis-outline"),d.drawPoint(e+.5*n,i,h(t),s.svgElements,s.svg)},t.exports=n},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(23)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"setOptions",value:function(t,e,i){this.options=t,void 0===e&&void 0===i||this.setImages(e,i)}},{key:"setImages",value:function(t,e){e&&this.selected?(this.imageObj=e,this.imageObjAlt=t):(this.imageObj=t,this.imageObjAlt=e)}},{key:"switchImages",value:function(t){var e=t&&!this.selected||!t&&this.selected;if(this.selected=t,void 0!==this.imageObjAlt&&e){var i=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=i}}},{key:"_resizeImage",value:function(){var t,e;if(!1===this.options.shapeProperties.useImageSize){var i=1,n=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?i=this.imageObj.width/this.imageObj.height:n=this.imageObj.height/this.imageObj.width),t=2*this.options.size*i,e=2*this.options.size*n}else t=this.imageObj.width,e=this.imageObj.height;this.width=t,this.height=e,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(t,e,i,n){this.initContextForDraw(t,n),t.circle(e,i,n.size),this.performFill(t,n)}},{key:"_drawImageAtPosition",value:function(t,e){if(0!=this.imageObj.width){t.globalAlpha=1,this.enableShadow(t,e);var i=1;!0===this.options.shapeProperties.interpolation&&(i=this.imageObj.width/this.width/this.body.view.scale),this.imageObj.drawImageAtPosition(t,i,this.left,this.top,this.width,this.height),this.disableShadow(t,e)}}},{key:"_drawImageLabel",value:function(t,e,i,n,o){var s,r=0;if(void 0!==this.height){r=.5*this.height;var a=this.labelModule.getTextSize(t,n,o);1<=a.lineCount&&(r+=a.height/2)}s=i+r,this.options.label&&(this.labelOffset=r),this.labelModule.draw(t,e,s,n,o,"hanging")}}]),c);function c(t,e,i){(0,r.default)(this,c);var n=(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i));return n.labelOffset=0,n.selected=!1,n}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var l=n(i(19)),u=n(i(6)),c=n(i(29)),o=n(i(0)),s=n(i(1)),p=i(2),r=i(117).default,f=i(48).default,a=i(215).default,h=i(217).default,d=i(218).default,m=i(219).default,v=((0,s.default)(g,[{key:"setOptions",value:function(t){if(t){g.parseOptions(this.options,t,!0,this.globalOptions),void 0!==t.id&&(this.id=t.id),void 0!==t.from&&(this.fromId=t.from),void 0!==t.to&&(this.toId=t.to),void 0!==t.title&&(this.title=t.title),void 0!==t.value&&(t.value=parseFloat(t.value));var e=[t,this.options,this.defaultOptions];this.chooser=f.choosify("edge",e),this.updateLabelModule(t);var i=this.updateEdgeType();return this._setInteractionWidths(),this.connect(),void 0===t.hidden&&void 0===t.physics||(i=!0),i}}},{key:"getFormattingValues",value:function(){var t=!0===this.options.arrows.to||!0===this.options.arrows.to.enabled,e=!0===this.options.arrows.from||!0===this.options.arrows.from.enabled,i=!0===this.options.arrows.middle||!0===this.options.arrows.middle.enabled,n=this.options.color.inherit,o={toArrow:t,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,fromArrow:e,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,arrowStrikethrough:this.options.arrowStrikethrough,color:n?void 0:this.options.color.color,inheritsColor:n,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};if(this.selected||this.hover)if(!0===this.chooser){if(this.selected){var s=this.options.selectionWidth;"function"==typeof s?o.width=s(o.width):"number"==typeof s&&(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){var r=this.options.hoverWidth;"function"==typeof r?o.width=r(o.width):"number"==typeof r&&(o.width+=r),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else"function"==typeof this.chooser&&(this.chooser(o,this.options.id,this.selected,this.hover),void 0!==o.color&&(o.inheritsColor=!1),!1===o.shadow&&(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}},{key:"updateLabelModule",value:function(t){var e=[t,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,e),void 0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var t=this.options.smooth,e=!1,i=!0;return void 0!==this.edgeType&&((this.edgeType instanceof h&&!0===t.enabled&&"dynamic"===t.type||this.edgeType instanceof a&&!0===t.enabled&&"cubicBezier"===t.type||this.edgeType instanceof d&&!0===t.enabled&&"dynamic"!==t.type&&"cubicBezier"!==t.type||this.edgeType instanceof m&&!1===t.type.enabled)&&(i=!1),!0===i&&(e=this.cleanup())),!0===i?!0===t.enabled?"dynamic"===t.type?(e=!0,this.edgeType=new h(this.options,this.body,this.labelModule)):"cubicBezier"===t.type?this.edgeType=new a(this.options,this.body,this.labelModule):this.edgeType=new d(this.options,this.body,this.labelModule):this.edgeType=new m(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),e}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=void 0!==this.from&&void 0!==this.to,!0===this.connected?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(t,e,i){if(void 0!==this.options.value){var n=this.options.scaling.customScalingFunction(t,e,i,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(!0===this.options.scaling.label.enabled){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*s}this.options.width=this.options.scaling.min+n*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){"function"==typeof this.options.hoverWidth?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,"function"==typeof this.options.selectionWidth?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(t){var e=this.getFormattingValues();if(!e.hidden){var i=this.edgeType.getViaNode(),n={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,e.fromArrow&&(n.from=this.edgeType.getArrowData(t,"from",i,this.selected,this.hover,e),!1===e.arrowStrikethrough&&(this.edgeType.fromPoint=n.from.core)),e.toArrow&&(n.to=this.edgeType.getArrowData(t,"to",i,this.selected,this.hover,e),!1===e.arrowStrikethrough&&(this.edgeType.toPoint=n.to.core)),e.middleArrow&&(n.middle=this.edgeType.getArrowData(t,"middle",i,this.selected,this.hover,e)),this.edgeType.drawLine(t,e,this.selected,this.hover,i),this.drawArrows(t,n,e),this.drawLabel(t,i)}}},{key:"drawArrows",value:function(t,e,i){i.fromArrow&&this.edgeType.drawArrowHead(t,i,this.selected,this.hover,e.from),i.middleArrow&&this.edgeType.drawArrowHead(t,i,this.selected,this.hover,e.middle),i.toArrow&&this.edgeType.drawArrowHead(t,i,this.selected,this.hover,e.to)}},{key:"drawLabel",value:function(t,e){if(void 0!==this.options.label){var i=this.from,n=this.to;if(this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(t,this.selected,this.hover),i.id!=n.id){this.labelModule.pointToSelf=!1;var o=this.edgeType.getPoint(.5,e);t.save();var s=this._getRotation(t);0!=s.angle&&(t.translate(s.x,s.y),t.rotate(s.angle)),this.labelModule.draw(t,o.x,o.y,this.selected,this.hover),t.restore()}else{this.labelModule.pointToSelf=!0;var r,a,h=this.options.selfReferenceSize;a=i.shape.width>i.shape.height?(r=i.x+.5*i.shape.width,i.y-h):(r=i.x+h,i.y-.5*i.shape.height),o=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(t,o.x,o.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(t){var e=[];if(this.labelModule.visible()){var i=this._getRotation();f.pointInRect(this.labelModule.getSize(),t,i)&&e.push({edgeId:this.id,labelId:0})}var n={left:t.x,top:t.y};return this.isOverlappingWith(n)&&e.push({edgeId:this.id}),e}},{key:"isOverlappingWith",value:function(t){if(this.connected){var e=this.from.x,i=this.from.y,n=this.to.x,o=this.to.y,s=t.left,r=t.top;return this.edgeType.getDistanceToEdge(e,i,n,o,s,r)<10}return!1}},{key:"_getRotation",value:function(t){var e=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,e);void 0!==t&&this.labelModule.calculateLabelSize(t,this.selected,this.hover,i.x,i.y);var n={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible())return n;if("horizontal"===this.options.font.align)return n;var o=this.from.y-this.to.y,s=this.from.x-this.to.x,r=Math.atan2(o,s);return(r<-1&&s<0||0<r&&s<0)&&(r+=Math.PI),n.angle=r,n}},{key:"_pointOnCircle",value:function(t,e,i,n){var o=2*n*Math.PI;return{x:t+i*Math.cos(o),y:e-i*Math.sin(o)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return void 0!==this.body.nodes[this.fromId]&&void 0!==this.body.nodes[this.toId]}}],[{key:"parseOptions",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},o=4<arguments.length&&void 0!==arguments[4]&&arguments[4];if(p.selectiveDeepExtend(["arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","to","title","value","width","font","chosen","widthConstraint"],t,e,i),f.isValidLabel(e.label)?t.label=e.label:t.label=void 0,p.mergeOptions(t,e,"smooth",n),p.mergeOptions(t,e,"shadow",n),void 0!==e.dashes&&null!==e.dashes?t.dashes=e.dashes:!0===i&&null===e.dashes&&(t.dashes=(0,c.default)(n.dashes)),void 0!==e.scaling&&null!==e.scaling?(void 0!==e.scaling.min&&(t.scaling.min=e.scaling.min),void 0!==e.scaling.max&&(t.scaling.max=e.scaling.max),p.mergeOptions(t.scaling,e.scaling,"label",n.scaling)):!0===i&&null===e.scaling&&(t.scaling=(0,c.default)(n.scaling)),void 0!==e.arrows&&null!==e.arrows)if("string"==typeof e.arrows){var s=e.arrows.toLowerCase();t.arrows.to.enabled=-1!=s.indexOf("to"),t.arrows.middle.enabled=-1!=s.indexOf("middle"),t.arrows.from.enabled=-1!=s.indexOf("from")}else{if("object"!==(0,u.default)(e.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+(0,l.default)(e.arrows));p.mergeOptions(t.arrows,e.arrows,"to",n.arrows),p.mergeOptions(t.arrows,e.arrows,"middle",n.arrows),p.mergeOptions(t.arrows,e.arrows,"from",n.arrows)}else!0===i&&null===e.arrows&&(t.arrows=(0,c.default)(n.arrows));if(void 0!==e.color&&null!==e.color){var r=e.color,a=t.color;if(o)p.deepExtend(a,n.color,!1,i);else for(var h in a)a.hasOwnProperty(h)&&delete a[h];if(p.isString(a))(((a.color=a).highlight=a).hover=a).inherit=!1,void 0===r.opacity&&(a.opacity=1);else{var d=!1;void 0!==r.color&&(a.color=r.color,d=!0),void 0!==r.highlight&&(a.highlight=r.highlight,d=!0),void 0!==r.hover&&(a.hover=r.hover,d=!0),void 0!==r.inherit&&(a.inherit=r.inherit),void 0!==r.opacity&&(a.opacity=Math.min(1,Math.max(0,r.opacity))),!0===d?a.inherit=!1:void 0===a.inherit&&(a.inherit="from")}}else!0===i&&null===e.color&&(t.color=p.bridgeObject(n.color));!0===i&&null===e.font&&(t.font=p.bridgeObject(n.font))}}]),g);function g(t,e,i,n){if((0,o.default)(this,g),void 0===e)throw new Error("No body provided");this.options=p.bridgeObject(i),this.globalOptions=i,this.defaultOptions=n,this.body=e,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 r(this.body,this.options,!0),this.setOptions(t)}e.default=v},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(118)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"_findBorderPositionBezier",value:function(t,e){var i,n,o,s=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this._getViaCoordinates(),r=0,a=0,h=1,d=this.to,l=!1;for(t.id===this.from.id&&(d=this.from,l=!0);a<=h&&r<10;){var u=.5*(a+h);if(i=this.getPoint(u,s),n=Math.atan2(d.y-i.y,d.x-i.x),o=d.distanceToBorder(e,n)-Math.sqrt(Math.pow(i.x-d.x,2)+Math.pow(i.y-d.y,2)),Math.abs(o)<.2)break;o<0?!1===l?a=u:h=u:!1===l?h=u:a=u,r++}return i.t=u,i}},{key:"_getDistanceToBezierEdge",value:function(t,e,i,n,o,s,r){var a=1e9,h=void 0,d=void 0,l=void 0,u=void 0,c=void 0,p=t,f=e;for(d=1;d<10;d++)l=.1*d,u=Math.pow(1-l,2)*t+2*l*(1-l)*r.x+Math.pow(l,2)*i,c=Math.pow(1-l,2)*e+2*l*(1-l)*r.y+Math.pow(l,2)*n,0<d&&(a=(h=this._getDistanceToLine(p,f,u,c,o,s))<a?h:a),p=u,f=c;return a}},{key:"_bezierCurve",value:function(t,e,i,n){var o=void 0!==i&&void 0!==i.x,s=void 0!==n&&void 0!==n.x;t.beginPath(),t.moveTo(this.fromPoint.x,this.fromPoint.y),o&&s?t.bezierCurveTo(i.x,i.y,n.x,n.y,this.toPoint.x,this.toPoint.y):o?t.quadraticCurveTo(i.x,i.y,this.toPoint.x,this.toPoint.y):t.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=n(i(1)),r=i(2),a=((0,s.default)(h,null,[{key:"getRange",value:function(t){var e,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=1e9,o=-1e9,s=1e9,r=-1e9;if(0<i.length)for(var a=0;a<i.length;a++)s>(e=t[i[a]]).shape.boundingBox.left&&(s=e.shape.boundingBox.left),r<e.shape.boundingBox.right&&(r=e.shape.boundingBox.right),n>e.shape.boundingBox.top&&(n=e.shape.boundingBox.top),o<e.shape.boundingBox.bottom&&(o=e.shape.boundingBox.bottom);return 1e9===s&&-1e9===r&&1e9===n&&-1e9===o&&(r=s=o=n=0),{minX:s,maxX:r,minY:n,maxY:o}}},{key:"getRangeCore",value:function(t){var e,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=1e9,o=-1e9,s=1e9,r=-1e9;if(0<i.length)for(var a=0;a<i.length;a++)s>(e=t[i[a]]).x&&(s=e.x),r<e.x&&(r=e.x),n>e.y&&(n=e.y),o<e.y&&(o=e.y);return 1e9===s&&-1e9===r&&1e9===n&&-1e9===o&&(r=s=o=n=0),{minX:s,maxX:r,minY:n,maxY:o}}},{key:"findCenter",value:function(t){return{x:.5*(t.maxX+t.minX),y:.5*(t.maxY+t.minY)}}},{key:"cloneOptions",value:function(t,e){var i={};return void 0===e||"node"===e?(r.deepExtend(i,t.options,!0),i.x=t.x,i.y=t.y,i.amountOfConnections=t.edges.length):r.deepExtend(i,t.options,!0),i}}]),h);function h(){(0,o.default)(this,h)}e.default=a},function(t,e,i){t.exports={default:i(124),__esModule:!0}},function(t,e,i){var n=i(50);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e,i){function b(){return this}var _=i(52),w=i(17),x=i(83),k=i(26),S=i(22),D=i(31),E=i(129),M=i(59),O=i(85),C=i(13)("iterator"),T=!([].keys&&"next"in[].keys());t.exports=function(t,e,i,n,o,s,r){E(i,e,n);function a(t){if(!T&&t in f)return f[t];switch(t){case"keys":case"values":return function(){return new i(this,t)}}return function(){return new i(this,t)}}var h,d,l,u=e+" Iterator",c="values"==o,p=!1,f=t.prototype,m=f[C]||f["@@iterator"]||o&&f[o],v=m||a(o),g=o?c?a("entries"):v:void 0,y="Array"==e&&f.entries||m;if(y&&(l=O(y.call(new t)))!==Object.prototype&&l.next&&(M(l,u,!0),_||S(l,C)||k(l,C,b)),c&&m&&"values"!==m.name&&(p=!0,v=function(){return m.call(this)}),_&&!r||!T&&!p&&f[C]||k(f,C,v),D[e]=v,D[u]=b,o)if(h={values:c?v:a("values"),keys:s?v:a("keys"),entries:g},r)for(d in h)d in f||x(f,d,h[d]);else w(w.P+w.F*(T||p),e,h);return h}},function(t,e,i){var s=i(128);t.exports=function(n,o,t){if(s(n),void 0===o)return n;switch(t){case 1:return function(t){return n.call(o,t)};case 2:return function(t,e){return n.call(o,t,e)};case 3:return function(t,e,i){return n.call(o,t,e,i)}}return function(){return n.apply(o,arguments)}}},function(t,e,i){t.exports=!i(21)&&!i(28)(function(){return 7!=Object.defineProperty(i(82)("div"),"a",{get:function(){return 7}}).a})},function(t,e,i){var n=i(32),o=i(18).document,s=n(o)&&n(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},function(t,e,i){t.exports=i(26)},function(t,e,i){var r=i(22),a=i(25),h=i(131)(!1),d=i(56)("IE_PROTO");t.exports=function(t,e){var i,n=a(t),o=0,s=[];for(i in n)i!=d&&r(n,i)&&s.push(i);for(;e.length>o;)r(n,i=e[o++])&&(~h(s,i)||s.push(i));return s}},function(t,e,i){var n=i(22),o=i(41),s=i(56)("IE_PROTO"),r=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),n(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?r:null}},function(t,e,i){var o=i(50),s=i(13)("toStringTag"),r="Arguments"==o(function(){return arguments}());t.exports=function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),s))?i:r?o(e):"Object"==(n=o(e))&&"function"==typeof e.callee?"Arguments":n}},function(t,e,i){var o=i(17),s=i(7),r=i(28);t.exports=function(t,e){var i=(s.Object||{})[t]||Object[t],n={};n[t]=e(i),o(o.S+o.F*r(function(){i(1)}),"Object",n)}},function(t,e,i){var n=i(84),o=i(58).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,i){var n=i(42),o=i(39),s=i(25),r=i(53),a=i(22),h=i(81),d=Object.getOwnPropertyDescriptor;e.f=i(21)?d:function(t,e){if(t=s(t),e=r(e,!0),h)try{return d(t,e)}catch(t){}if(a(t,e))return o(!n.f.call(t,e),t[e])}},function(t,e,i){t.exports={default:i(162),__esModule:!0}},function(t,e,i){t.exports=function(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}},function(t,e,i){function n(t,e){if(void 0===t)throw new Error("No container element defined");if(this.container=t,this.visible=!e||null==e.visible||e.visible,this.visible){this.frame=document.createElement("DIV"),this.frame.style.width="100%",this.frame.style.position="relative",this.container.appendChild(this.frame),this.frame.prev=document.createElement("INPUT"),this.frame.prev.type="BUTTON",this.frame.prev.value="Prev",this.frame.appendChild(this.frame.prev),this.frame.play=document.createElement("INPUT"),this.frame.play.type="BUTTON",this.frame.play.value="Play",this.frame.appendChild(this.frame.play),this.frame.next=document.createElement("INPUT"),this.frame.next.type="BUTTON",this.frame.next.value="Next",this.frame.appendChild(this.frame.next),this.frame.bar=document.createElement("INPUT"),this.frame.bar.type="BUTTON",this.frame.bar.style.position="absolute",this.frame.bar.style.border="1px solid red",this.frame.bar.style.width="100px",this.frame.bar.style.height="6px",this.frame.bar.style.borderRadius="2px",this.frame.bar.style.MozBorderRadius="2px",this.frame.bar.style.border="1px solid #7F7F7F",this.frame.bar.style.backgroundColor="#E5E5E5",this.frame.appendChild(this.frame.bar),this.frame.slide=document.createElement("INPUT"),this.frame.slide.type="BUTTON",this.frame.slide.style.margin="0px",this.frame.slide.value=" ",this.frame.slide.style.position="relative",this.frame.slide.style.left="-100px",this.frame.appendChild(this.frame.slide);var i=this;this.frame.slide.onmousedown=function(t){i._onMouseDown(t)},this.frame.prev.onclick=function(t){i.prev(t)},this.frame.play.onclick=function(t){i.togglePlay(t)},this.frame.next.onclick=function(t){i.next(t)}}this.onChangeCallback=void 0,this.values=[],this.index=void 0,this.playTimeout=void 0,this.playInterval=1e3,this.playLoop=!0}var o=i(2);n.prototype.prev=function(){var t=this.getIndex();0<t&&(t--,this.setIndex(t))},n.prototype.next=function(){var t=this.getIndex();t<this.values.length-1&&(t++,this.setIndex(t))},n.prototype.playNext=function(){var t=new Date,e=this.getIndex();e<this.values.length-1?(e++,this.setIndex(e)):this.playLoop&&(e=0,this.setIndex(e));var i=new Date-t,n=Math.max(this.playInterval-i,0),o=this;this.playTimeout=setTimeout(function(){o.playNext()},n)},n.prototype.togglePlay=function(){void 0===this.playTimeout?this.play():this.stop()},n.prototype.play=function(){this.playTimeout||(this.playNext(),this.frame&&(this.frame.play.value="Stop"))},n.prototype.stop=function(){clearInterval(this.playTimeout),this.playTimeout=void 0,this.frame&&(this.frame.play.value="Play")},n.prototype.setOnChangeCallback=function(t){this.onChangeCallback=t},n.prototype.setPlayInterval=function(t){this.playInterval=t},n.prototype.getPlayInterval=function(){return this.playInterval},n.prototype.setPlayLoop=function(t){this.playLoop=t},n.prototype.onChange=function(){void 0!==this.onChangeCallback&&this.onChangeCallback()},n.prototype.redraw=function(){if(this.frame){this.frame.bar.style.top=this.frame.clientHeight/2-this.frame.bar.offsetHeight/2+"px",this.frame.bar.style.width=this.frame.clientWidth-this.frame.prev.clientWidth-this.frame.play.clientWidth-this.frame.next.clientWidth-30+"px";var t=this.indexToLeft(this.index);this.frame.slide.style.left=t+"px"}},n.prototype.setValues=function(t){this.values=t,0<this.values.length?this.setIndex(0):this.index=void 0},n.prototype.setIndex=function(t){if(!(t<this.values.length))throw new Error("Index out of range");this.index=t,this.redraw(),this.onChange()},n.prototype.getIndex=function(){return this.index},n.prototype.get=function(){return this.values[this.index]},n.prototype._onMouseDown=function(t){if(t.which?1===t.which:1===t.button){this.startClientX=t.clientX,this.startSlideX=parseFloat(this.frame.slide.style.left),this.frame.style.cursor="move";var e=this;this.onmousemove=function(t){e._onMouseMove(t)},this.onmouseup=function(t){e._onMouseUp(t)},o.addEventListener(document,"mousemove",this.onmousemove),o.addEventListener(document,"mouseup",this.onmouseup),o.preventDefault(t)}},n.prototype.leftToIndex=function(t){var e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10,i=t-3,n=Math.round(i/e*(this.values.length-1));return n<0&&(n=0),n>this.values.length-1&&(n=this.values.length-1),n},n.prototype.indexToLeft=function(t){var e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10;return t/(this.values.length-1)*e+3},n.prototype._onMouseMove=function(t){var e=t.clientX-this.startClientX,i=this.startSlideX+e,n=this.leftToIndex(i);this.setIndex(n),o.preventDefault()},n.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",o.removeEventListener(document,"mousemove",this.onmousemove),o.removeEventListener(document,"mouseup",this.onmouseup),o.preventDefault()},t.exports=n},function(t,e,i){function n(t,e,i,n){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,n)}n.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},n.prototype.setRange=function(t,e,i,n){if(!this.isNumeric(t))throw new Error("Parameter 'start' is not numeric; value: "+t);if(!this.isNumeric(e))throw new Error("Parameter 'end' is not numeric; value: "+t);if(!this.isNumeric(i))throw new Error("Parameter 'step' is not numeric; value: "+t);this._start=t||0,this._end=e||0,this.setStep(i,n)},n.prototype.setStep=function(t,e){void 0===t||t<=0||(void 0!==e&&(this.prettyStep=e),!0===this.prettyStep?this._step=n.calculatePrettyStep(t):this._step=t)},n.calculatePrettyStep=function(t){function e(t){return Math.log(t)/Math.LN10}var i=Math.pow(10,Math.round(e(t))),n=2*Math.pow(10,Math.round(e(t/2))),o=5*Math.pow(10,Math.round(e(t/5))),s=i;return Math.abs(n-t)<=Math.abs(s-t)&&(s=n),Math.abs(o-t)<=Math.abs(s-t)&&(s=o),s<=0&&(s=1),s},n.prototype.getCurrent=function(){return parseFloat(this._current.toPrecision(this.precision))},n.prototype.getStep=function(){return this._step},n.prototype.start=function(t){void 0===t&&(t=!1),this._current=this._start-this._start%this._step,t&&this.getCurrent()<this._start&&this.next()},n.prototype.next=function(){this._current+=this._step},n.prototype.end=function(){return this._current>this._end},t.exports=n},function(t,e,i){function n(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function r(t,e){return void 0===t||""===t?e:t+function(t){return void 0===t||""===t||"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}(e)}function o(t,e,i,n){for(var o,s=0;s<i.length;++s)e[r(n,o=i[s])]=t[o]}function s(t,e,i,n){for(var o,s=0;s<i.length;++s)void 0!==t[o=i[s]]&&(e[r(n,o)]=t[o])}function a(t,e){void 0!==t.backgroundColor&&function(t,e){var i="white",n="gray",o=1;if("string"==typeof t)i=t,n="none",o=0;else{if("object"!==(void 0===t?"undefined":(0,u.default)(t)))throw new Error("Unsupported type of backgroundColor");void 0!==t.fill&&(i=t.fill),void 0!==t.stroke&&(n=t.stroke),void 0!==t.strokeWidth&&(o=t.strokeWidth)}e.frame.style.backgroundColor=i,e.frame.style.borderColor=n,e.frame.style.borderWidth=o+"px",e.frame.style.borderStyle="solid"}(t.backgroundColor,e),function(t,e){void 0!==t&&(void 0===e.dataColor&&(e.dataColor={}),"string"==typeof t?(e.dataColor.fill=t,e.dataColor.stroke=t):(t.fill&&(e.dataColor.fill=t.fill),t.stroke&&(e.dataColor.stroke=t.stroke),void 0!==t.strokeWidth&&(e.dataColor.strokeWidth=t.strokeWidth)))}(t.dataColor,e),function(t,e){if(void 0!==t){var i;if("string"==typeof t){if(-1===(i=function(t){var e=v[t];return void 0===e?-1:e}(t)))throw new Error("Style '"+t+"' is invalid")}else{if(!function(t){var e=!1;for(var i in m)if(m[i]===t){e=!0;break}return e}(t))throw new Error("Style '"+t+"' is invalid");i=t}e.style=i}}(t.style,e),function(t,e){if(void 0===t){if(void 0===b.showLegend){var i=e.style===m.DOTCOLOR||e.style===m.DOTSIZE;e.showLegend=i}}else e.showLegend=t}(t.showLegend,e),h(t.cameraPosition,e),void 0!==t.tooltip&&(e.showTooltip=t.tooltip),null!=t.onclick&&(e.onclick_callback=t.onclick),void 0!==t.tooltipStyle&&c.selectiveDeepExtend(["tooltipStyle"],e,t)}function h(t,e){var i=t;void 0!==i&&(void 0===e.camera&&(e.camera=new p),e.camera.setArmRotation(i.horizontal,i.vertical),e.camera.setArmLength(i.distance))}var d,l=i(6),u=(d=l)&&d.__esModule?d:{default:d},c=i(2),p=i(95),f=i(34),m={BAR:0,BARCOLOR:1,BARSIZE:2,DOT:3,DOTLINE:4,DOTCOLOR:5,DOTSIZE:6,GRID:7,LINE:8,SURFACE:9},v={dot:m.DOT,"dot-line":m.DOTLINE,"dot-color":m.DOTCOLOR,"dot-size":m.DOTSIZE,line:m.LINE,grid:m.GRID,surface:m.SURFACE,bar:m.BAR,"bar-color":m.BARCOLOR,"bar-size":m.BARSIZE},g=["width","height","filterLabel","legendLabel","xLabel","yLabel","zLabel","xValueLabel","yValueLabel","zValueLabel","showXAxis","showYAxis","showZAxis","showGrid","showPerspective","showShadow","keepAspectRatio","verticalRatio","dotSizeRatio","dotSizeMinFraction","dotSizeMaxFraction","showAnimationControls","animationInterval","animationPreload","animationAutoStart","axisColor","gridColor","xCenter","yCenter"],y=["xBarWidth","yBarWidth","valueMin","valueMax","xMin","xMax","xStep","yMin","yMax","yStep","zMin","zMax","zStep"],b=void 0;t.exports.STYLE=m,t.exports.setDefaults=function(t,e){if(void 0===t||n(t))throw new Error("No DEFAULTS passed");if(void 0===e)throw new Error("No dst passed");o(b=t,e,g),o(t,e,y,"default"),a(t,e),e.margin=10,e.showGrayBottom=!1,e.showTooltip=!1,e.onclick_callback=null,e.eye=new f(0,0,-1)},t.exports.setOptions=function(t,e){if(void 0!==t){if(void 0===e)throw new Error("No dst passed");if(void 0===b||n(b))throw new Error("DEFAULTS not set for module Settings");s(t,e,g),s(t,e,y,"default"),a(t,e)}},t.exports.setCameraPosition=h},function(t,e,i){function n(){this.armLocation=new a,this.armRotation={},this.armRotation.horizontal=0,this.armRotation.vertical=0,this.armLength=1.7,this.cameraOffset=new a,this.offsetMultiplier=.6,this.cameraLocation=new a,this.cameraRotation=new a(.5*Math.PI,0,0),this.calculateCameraOrientation()}var o,s=i(165),r=(o=s)&&o.__esModule?o:{default:o},a=i(34);n.prototype.setOffset=function(t,e){var i=Math.abs,n=r.default,o=this.offsetMultiplier,s=this.armLength*o;i(t)>s&&(t=n(t)*s),i(e)>s&&(e=n(e)*s),this.cameraOffset.x=t,this.cameraOffset.y=e,this.calculateCameraOrientation()},n.prototype.getOffset=function(){return this.cameraOffset},n.prototype.setArmLocation=function(t,e,i){this.armLocation.x=t,this.armLocation.y=e,this.armLocation.z=i,this.calculateCameraOrientation()},n.prototype.setArmRotation=function(t,e){void 0!==t&&(this.armRotation.horizontal=t),void 0!==e&&(this.armRotation.vertical=e,this.armRotation.vertical<0&&(this.armRotation.vertical=0),this.armRotation.vertical>.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),void 0===t&&void 0===e||this.calculateCameraOrientation()},n.prototype.getArmRotation=function(){var t={};return t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},n.prototype.setArmLength=function(t){void 0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),5<this.armLength&&(this.armLength=5),this.setOffset(this.cameraOffset.x,this.cameraOffset.y),this.calculateCameraOrientation())},n.prototype.getArmLength=function(){return this.armLength},n.prototype.getCameraLocation=function(){return this.cameraLocation},n.prototype.getCameraRotation=function(){return this.cameraRotation},n.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal;var t=this.cameraRotation.x,e=this.cameraRotation.z,i=this.cameraOffset.x,n=this.cameraOffset.y,o=Math.sin,s=Math.cos;this.cameraLocation.x=this.cameraLocation.x+i*s(e)+n*-o(e)*s(t),this.cameraLocation.y=this.cameraLocation.y+i*o(e)+n*s(e)*s(t),this.cameraLocation.z=this.cameraLocation.z+n*o(t)},t.exports=n},function(t,e,i){function n(t,e,i){this.dataGroup=t,this.column=e,this.graph=i,this.index=void 0,this.value=void 0,this.values=t.getDistinctValues(this.column),0<this.values.length&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,i.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var o=i(12);n.prototype.isLoaded=function(){return this.loaded},n.prototype.getLoadedProgress=function(){for(var t=this.values.length,e=0;this.dataPoints[e];)e++;return Math.round(e/t*100)},n.prototype.getLabel=function(){return this.graph.filterLabel},n.prototype.getColumn=function(){return this.column},n.prototype.getSelectedValue=function(){if(void 0!==this.index)return this.values[this.index]},n.prototype.getValues=function(){return this.values},n.prototype.getValue=function(t){if(t>=this.values.length)throw new Error("Index out of range");return this.values[t]},n.prototype._getDataPoints=function(t){if(void 0===t&&(t=this.index),void 0===t)return[];var e;if(this.dataPoints[t])e=this.dataPoints[t];else{var i={};i.column=this.column,i.value=this.values[t];var n=new o(this.dataGroup.getDataSet(),{filter:function(t){return t[i.column]==i.value}}).get();e=this.dataGroup._getDataPoints(n),this.dataPoints[t]=e}return e},n.prototype.setOnLoadCallback=function(t){this.onLoadCallback=t},n.prototype.selectValue=function(t){if(t>=this.values.length)throw new Error("Index out of range");this.index=t,this.value=this.values[t]},n.prototype.loadInBackground=function(t){void 0===t&&(t=0);var e=this.graph.frame;if(t<this.values.length){void 0===e.progress&&(e.progress=document.createElement("DIV"),e.progress.style.position="absolute",e.progress.style.color="gray",e.appendChild(e.progress));var i=this.getLoadedProgress();e.progress.innerHTML="Loading animation... "+i+"%",e.progress.style.bottom="60px",e.progress.style.left="10px";var n=this;setTimeout(function(){n.loadInBackground(t+1)},10),this.loaded=!1}else this.loaded=!0,void 0!==e.progress&&(e.removeChild(e.progress),e.progress=void 0),this.onLoadCallback&&this.onLoadCallback()},t.exports=n},function(t,e,i){function n(e){this.active=!1,this.dom={container:e},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=r(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var i=this;["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(function(t){i.hammer.on(t,function(t){t.stopPropagation()})}),document&&document.body&&(this.onClick=function(t){!function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}(t.target,e)&&i.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=o(),this.escListener=this.deactivate.bind(this)}var o=i(35),s=i(44),r=i(10),a=i(2);s(n.prototype),n.current=null,n.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),this.hammer.destroy(),this.hammer=null},n.prototype.activate=function(){n.current&&n.current.deactivate(),(n.current=this).active=!0,this.dom.overlay.style.display="none",a.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),this.keycharm.bind("esc",this.escListener)},n.prototype.deactivate=function(){this.active=!1,this.dom.overlay.style.display="",a.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},n.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()},t.exports=n},function(t,e,i){e.en={current:"current",time:"time"},e.en_EN=e.en,e.en_US=e.en,e.it={current:"attuale",time:"tempo"},e.it_IT=e.it,e.it_CH=e.it,e.nl={current:"huidige",time:"tijd"},e.nl_NL=e.nl,e.nl_BE=e.nl,e.de={current:"Aktuelle",time:"Zeit"},e.de_DE=e.de,e.fr={current:"actuel",time:"heure"},e.fr_FR=e.fr,e.fr_CA=e.fr,e.fr_BE=e.fr,e.es={current:"corriente",time:"hora"},e.es_ES=e.es},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}function u(t,e){this.body=t,this.defaultOptions={type:null,orientation:{item:"bottom"},align:"auto",stack:!0,stackSubgroups:!0,groupOrderSwap:function(t,e,i){var n=e.order;e.order=t.order,t.order=n},groupOrder:"order",selectable:!0,multiselect:!1,itemsAlwaysDraggable:{item:!1,range:!1},editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:h.snap,onDropObjectOnItem:function(t,e,i){i(e)},onAdd:function(t,e){e(t)},onUpdate:function(t,e){e(t)},onMove:function(t,e){e(t)},onRemove:function(t,e){e(t)},onMoving:function(t,e){e(t)},onAddGroup:function(t,e){e(t)},onMoveGroup:function(t,e){e(t)},onRemoveGroup:function(t,e){e(t)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip"},tooltipOnItemUpdateTime:!1},this.options=x.extend({},this.defaultOptions),this.options.rtl=e.rtl,this.itemOptions={type:{start:"Date",end:"Date"}},this.conversion={toScreen:t.util.toScreen,toTime:t.util.toTime},this.dom={},this.props={},this.hammer=null;var n=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,i){n._onAdd(e.items)},update:function(t,e,i){n._onUpdate(e.items)},remove:function(t,e,i){n._onRemove(e.items)}},this.groupListeners={add:function(t,e,o){if(n._onAddGroups(e.items),n.groupsData&&0<n.groupsData.length){var s=n.groupsData.getDataSet();s.get().forEach(function(i){if(i.nestedGroups){0!=i.showNested&&(i.showNested=!0);var n=[];i.nestedGroups.forEach(function(t){var e=s.get(t);e&&(e.nestedInGroup=i.id,0==i.showNested&&(e.visible=!1),n=n.concat(e))}),s.update(n,o)}})}},update:function(t,e,i){n._onUpdateGroups(e.items)},remove:function(t,e,i){n._onRemoveGroups(e.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.popup=null,this.touchParams={},this.groupTouchParams={},this._create(),this.setOptions(e)}var a=n(i(29)),o=n(i(6)),r=i(10),x=i(2),s=i(11),_=i(12),h=i(66),d=i(16),l=i(68),c=i(69),p=i(101),f=i(102),m=i(70),v=i(103),g=i(104).default,y="__ungrouped__",k="__background__";u.prototype=new d,u.types={background:v,box:p,range:m,point:f},u.prototype._create=function(){var t=document.createElement("div");t.className="vis-itemset",(t["timeline-itemset"]=this).dom.frame=t;var e=document.createElement("div");e.className="vis-background",t.appendChild(e),this.dom.background=e;var i=document.createElement("div");i.className="vis-foreground",t.appendChild(i),this.dom.foreground=i;var n=document.createElement("div");n.className="vis-axis",this.dom.axis=n;var o=document.createElement("div");o.className="vis-labelset",this.dom.labelSet=o,this._updateUngrouped();var s=new c(k,null,this);s.show(),this.groups[k]=s,this.hammer=new r(this.body.dom.centerContainer),this.hammer.on("hammer.input",function(t){t.isFirst&&this._onTouch(t)}.bind(this)),this.hammer.on("panstart",this._onDragStart.bind(this)),this.hammer.on("panmove",this._onDrag.bind(this)),this.hammer.on("panend",this._onDragEnd.bind(this)),this.hammer.get("pan").set({threshold:5,direction:r.DIRECTION_HORIZONTAL}),this.hammer.on("tap",this._onSelectItem.bind(this)),this.hammer.on("press",this._onMultiSelectItem.bind(this)),this.hammer.on("doubletap",this._onAddItem.bind(this)),this.options.rtl?this.groupHammer=new r(this.body.dom.rightContainer):this.groupHammer=new r(this.body.dom.leftContainer),this.groupHammer.on("tap",this._onGroupClick.bind(this)),this.groupHammer.on("panstart",this._onGroupDragStart.bind(this)),this.groupHammer.on("panmove",this._onGroupDrag.bind(this)),this.groupHammer.on("panend",this._onGroupDragEnd.bind(this)),this.groupHammer.get("pan").set({threshold:5,direction:r.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",this._onMouseOver.bind(this)),this.body.dom.centerContainer.addEventListener("mouseout",this._onMouseOut.bind(this)),this.body.dom.centerContainer.addEventListener("mousemove",this._onMouseMove.bind(this)),this.body.dom.centerContainer.addEventListener("contextmenu",this._onDragEnd.bind(this)),this.body.dom.centerContainer.addEventListener("mousewheel",this._onMouseWheel.bind(this)),this.show()},u.prototype.setOptions=function(i){if(i){x.selectiveExtend(["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","multiselectPerGroup","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime"],this.options,i),"itemsAlwaysDraggable"in i&&("boolean"==typeof i.itemsAlwaysDraggable?(this.options.itemsAlwaysDraggable.item=i.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):"object"===(0,o.default)(i.itemsAlwaysDraggable)&&(x.selectiveExtend(["item","range"],this.options.itemsAlwaysDraggable,i.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),"orientation"in i&&("string"==typeof i.orientation?this.options.orientation.item="top"===i.orientation?"top":"bottom":"object"===(0,o.default)(i.orientation)&&"item"in i.orientation&&(this.options.orientation.item=i.orientation.item)),"margin"in i&&("number"==typeof i.margin?(this.options.margin.axis=i.margin,this.options.margin.item.horizontal=i.margin,this.options.margin.item.vertical=i.margin):"object"===(0,o.default)(i.margin)&&(x.selectiveExtend(["axis"],this.options.margin,i.margin),"item"in i.margin&&("number"==typeof i.margin.item?(this.options.margin.item.horizontal=i.margin.item,this.options.margin.item.vertical=i.margin.item):"object"===(0,o.default)(i.margin.item)&&x.selectiveExtend(["horizontal","vertical"],this.options.margin.item,i.margin.item)))),"editable"in i&&("boolean"==typeof i.editable?(this.options.editable.updateTime=i.editable,this.options.editable.updateGroup=i.editable,this.options.editable.add=i.editable,this.options.editable.remove=i.editable,this.options.editable.overrideItems=!1):"object"===(0,o.default)(i.editable)&&x.selectiveExtend(["updateTime","updateGroup","add","remove","overrideItems"],this.options.editable,i.editable)),"groupEditable"in i&&("boolean"==typeof i.groupEditable?(this.options.groupEditable.order=i.groupEditable,this.options.groupEditable.add=i.groupEditable,this.options.groupEditable.remove=i.groupEditable):"object"===(0,o.default)(i.groupEditable)&&x.selectiveExtend(["order","add","remove"],this.options.groupEditable,i.groupEditable)),["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"].forEach(function(t){var e=i[t];if(e){if(!(e instanceof Function))throw new Error("option "+t+" must be a function "+t+"(item, callback)");this.options[t]=e}}.bind(this)),this.markDirty()}},u.prototype.markDirty=function(t){this.groupIds=[],t&&t.refreshItems&&x.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()})},u.prototype.destroy=function(){this.hide(),this.setItems(null),this.setGroups(null),this.hammer=null,this.body=null,this.conversion=null},u.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)},u.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))},u.prototype.setSelection=function(t){var e,i,n,o;for(null==t&&(t=[]),Array.isArray(t)||(t=[t]),e=0,i=this.selection.length;e<i;e++)n=this.selection[e],(o=this.items[n])&&o.unselect();for(this.selection=[],e=0,i=t.length;e<i;e++)n=t[e],(o=this.items[n])&&(this.selection.push(n),o.select())},u.prototype.getSelection=function(){return this.selection.concat([])},u.prototype.getVisibleItems=function(){var t,e,i=this.body.range.getRange();this.options.rtl?(t=this.body.util.toScreen(i.start),e=this.body.util.toScreen(i.end)):(e=this.body.util.toScreen(i.start),t=this.body.util.toScreen(i.end));var n=[];for(var o in this.groups)if(this.groups.hasOwnProperty(o))for(var s=this.groups[o],r=s.isVisible?s.visibleItems:[],a=0;a<r.length;a++){var h=r[a];this.options.rtl?h.right<e&&h.right+h.width>t&&n.push(h.id):h.left<t&&h.left+h.width>e&&n.push(h.id)}return n},u.prototype._deselect=function(t){for(var e=this.selection,i=0,n=e.length;i<n;i++)if(e[i]==t){e.splice(i,1);break}},u.prototype.redraw=function(){var t=this.options.margin,n=this.body.range,e=x.option.asSize,i=this.options,o=i.orientation.item,s=!1,r=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,r.className="vis-itemset",s=this._orderGroups()||s;var a=n.end-n.start,h=a!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,d=n.start!=this.lastRangeStart,l=i.stack!=this.lastStack,u=i.stackSubgroups!=this.lastStackSubgroups,c=h||d||l||u;this.lastVisibleInterval=a,this.lastRangeStart=n.start,this.lastStack=i.stack,this.lastStackSubgroups=i.stackSubgroups,this.props.lastWidth=this.props.width;var p=this._firstGroup(),f={item:t.item,axis:t.axis},m={item:t.item,axis:t.item.vertical/2},v=0,g=t.axis+t.item.vertical;this.groups[k].redraw(n,m,c);var y={},b=0;if(x.forEach(this.groups,function(t,e){if(e!==k){var i=t==p?f:m;y[e]=t.redraw(n,i,c,!0),b=y[e].length}}),0<b){for(var _={},w=0;w<b;w++)x.forEach(y,function(t,e){_[e]=t[w]()});x.forEach(this.groups,function(t,e){if(e!==k){var i=_[e];s=i||s,v+=t.height}}),v=Math.max(v,g)}return v=Math.max(v,g),r.style.height=e(v),this.props.width=r.offsetWidth,this.props.height=v,this.dom.axis.style.top=e("top"==o?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right="0":this.dom.axis.style.left="0",this.initialItemSetDrawn=!0,s=this._isResized()||s},u.prototype._firstGroup=function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups[y]||null},u.prototype._updateUngrouped=function(){var t,e,i=this.groups[y];if(this.groupsData){if(i)for(e in i.hide(),delete this.groups[y],this.items)if(this.items.hasOwnProperty(e)){(t=this.items[e]).parent&&t.parent.remove(t);var n=this._getGroupId(t.data),o=this.groups[n];o&&o.add(t)||t.hide()}}else if(!i){for(e in i=new l(null,null,this),this.groups[y]=i,this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}},u.prototype.getLabelSet=function(){return this.dom.labelSet},u.prototype.setItems=function(t){var e,i=this,n=this.itemsData;if(t){if(!(t instanceof s||t instanceof _))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(n&&(x.forEach(this.itemListeners,function(t,e){n.off(e,t)}),e=n.getIds(),this._onRemove(e)),this.itemsData){var o=this.id;x.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,o)}),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})},u.prototype.getItems=function(){return this.itemsData},u.prototype.setGroups=function(t){var e,i=this;if(this.groupsData&&(x.forEach(this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof s||t instanceof _))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var n=this.groupsData;this.groupsData instanceof _&&(n=this.groupsData.getDataSet()),n.get().forEach(function(i){i.nestedGroups&&i.nestedGroups.forEach(function(t){var e=n.get(t);e.nestedInGroup=i.id,0==i.showNested&&(e.visible=!1),n.update(e)})});var o=this.id;x.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.body.emitter.emit("_change",{queue:!0})},u.prototype.getGroups=function(){return this.groupsData},u.prototype.removeItem=function(e){var t=this.itemsData.get(e),i=this.itemsData.getDataSet();t&&this.options.onRemove(t,function(t){t&&i.remove(e)})},u.prototype._getType=function(t){return t.type||this.options.type||(t.end?"range":"box")},u.prototype._getGroupId=function(t){return"background"==this._getType(t)&&null==t.group?k:this.groupsData?t.group:y},u.prototype._onAdd=u.prototype._onUpdate=function(t){var r=this;t.forEach(function(t){var e,i=r.itemsData.get(t,r.itemOptions),n=r.items[t],o=i?r._getType(i):null,s=u.types[o];if(n&&(s&&n instanceof s?r._updateItem(n,i):(e=n.selected,r._removeItem(n),n=null)),!n&&i){if(!s)throw"rangeoverflow"==o?new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: .vis-item.vis-range .vis-item-content {overflow: visible;}'):new TypeError('Unknown item type "'+o+'"');(n=new s(i,r.conversion,r.options)).id=t,r._addItem(n),e&&(this.selection.push(t),n.select())}}.bind(this)),this._order(),this.body.emitter.emit("_change",{queue:!0})},u.prototype._onRemove=function(t){var i=0,n=this;t.forEach(function(t){var e=n.items[t];e&&(i++,n._removeItem(e))}),i&&(this._order(),this.body.emitter.emit("_change",{queue:!0}))},u.prototype._order=function(){x.forEach(this.groups,function(t){t.order()})},u.prototype._onUpdateGroups=function(t){this._onAddGroups(t)},u.prototype._onAddGroups=function(t){var r=this;t.forEach(function(t){var e=r.groupsData.get(t),i=r.groups[t];if(i)i.setData(e);else{if(t==y||t==k)throw new Error("Illegal group id. "+t+" is a reserved id.");var n=(0,a.default)(r.options);for(var o in x.extend(n,{height:null}),i=new l(t,e,r),r.groups[t]=i,r.items)if(r.items.hasOwnProperty(o)){var s=r.items[o];s.data.group==t&&i.add(s)}i.order(),i.show()}}),this.body.emitter.emit("_change",{queue:!0})},u.prototype._onRemoveGroups=function(t){var i=this.groups;t.forEach(function(t){var e=i[t];e&&(e.hide(),delete i[t])}),this.markDirty(),this.body.emitter.emit("_change",{queue:!0})},u.prototype._orderGroups=function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder});t=this._orderNestedGroups(t);var e=!x.equalArray(t,this.groupIds);if(e){var i=this.groups;t.forEach(function(t){i[t].hide()}),t.forEach(function(t){i[t].show()}),this.groupIds=t}return e}return!1},u.prototype._orderNestedGroups=function(t){var n=[];return t.forEach(function(e){var t=this.groupsData.get(e);if(t.nestedInGroup||n.push(e),t.nestedGroups){var i=this.groupsData.get({filter:function(t){return t.nestedInGroup==e},order:this.options.groupOrder}).map(function(t){return t.id});n=n.concat(i)}},this),n},u.prototype._addItem=function(t){this.items[t.id]=t;var e=this._getGroupId(t.data),i=this.groups[e];i?i&&i.data&&i.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1,i&&i.add(t)},u.prototype._updateItem=function(t,e){t.setData(e);var i=this._getGroupId(t.data),n=this.groups[i];n?n&&n.data&&n.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1},u.prototype._removeItem=function(t){t.hide(),delete this.items[t.id];var e=this.selection.indexOf(t.id);-1!=e&&this.selection.splice(e,1),t.parent&&t.parent.remove(t)},u.prototype._constructByEndArray=function(t){for(var e=[],i=0;i<t.length;i++)t[i]instanceof m&&e.push(t[i]);return e},u.prototype._onTouch=function(t){this.touchParams.item=this.itemFromTarget(t),this.touchParams.dragLeftItem=t.target.dragLeftItem||!1,this.touchParams.dragRightItem=t.target.dragRightItem||!1,this.touchParams.itemProps=null},u.prototype._getGroupIndex=function(t){for(var e=0;e<this.groupIds.length;e++)if(t==this.groupIds[e])return e},u.prototype._onDragStart=function(n){if(!this.touchParams.itemIsDragging){var t,e=this.touchParams.item||null,o=this;if(e&&(e.selected||this.options.itemsAlwaysDraggable.item)){if(this.options.editable.overrideItems&&!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;if(null!=e.editable&&!e.editable.updateTime&&!e.editable.updateGroup&&!this.options.editable.overrideItems)return;var i=this.touchParams.dragLeftItem,s=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=e,i)t={item:i,initialX:n.center.x,dragLeft:!0,data:this._cloneItemData(e.data)},this.touchParams.itemProps=[t];else if(s)t={item:s,initialX:n.center.x,dragRight:!0,data:this._cloneItemData(e.data)},this.touchParams.itemProps=[t];else if(this.options.editable.add&&(n.srcEvent.ctrlKey||n.srcEvent.metaKey))this._onDragStartAddItem(n);else{this.groupIds.length<1&&this.redraw();var r=this._getGroupIndex(e.data.group),a=this.options.itemsAlwaysDraggable.item&&!e.selected?[e.id]:this.getSelection();this.touchParams.itemProps=a.map(function(t){var e=o.items[t],i=o._getGroupIndex(e.data.group);return{item:e,initialX:n.center.x,groupOffset:r-i,data:this._cloneItemData(e.data)}}.bind(this))}n.stopPropagation()}else this.options.editable.add&&(n.srcEvent.ctrlKey||n.srcEvent.metaKey)&&this._onDragStartAddItem(n)}},u.prototype._onDragStartAddItem=function(t){var e,i,n=this.options.snap||null;i=this.options.rtl?(e=x.getAbsoluteRight(this.dom.frame))-t.center.x+10:(e=x.getAbsoluteLeft(this.dom.frame),t.center.x-e-10);var o=this.body.util.toTime(i),s=this.body.util.getScale(),r=this.body.util.getStep(),a=n?n(o,s,r):o,h={type:"range",start:a,end:a,content:"new item"},d=x.randomUUID();h[this.itemsData._fieldId]=d;var l=this.groupFromTarget(t);l&&(h.group=l.groupId);var u=new m(h,this.conversion,this.options);u.id=d,u.data=this._cloneItemData(h),this._addItem(u);var c={item:this.touchParams.selectedItem=u,initialX:t.center.x,data:u.data};this.options.rtl?c.dragLeft=!0:c.dragRight=!0,this.touchParams.itemProps=[c],t.stopPropagation()},u.prototype._onDrag=function(u){if(this.touchParams.itemProps){u.stopPropagation();var c,p=this,f=this.options.snap||null;c=this.options.rtl?this.body.dom.root.offsetLeft+this.body.domProps.right.width:this.body.dom.root.offsetLeft+this.body.domProps.left.width;var m=this.body.util.getScale(),v=this.body.util.getStep(),g=this.touchParams.selectedItem,y=(this.options.editable.overrideItems||null==g.editable)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&null!=g.editable&&g.editable.updateGroup,b=null;if(y&&g&&null!=g.data.group){var t=p.groupFromTarget(u);t&&(b=this._getGroupIndex(t.groupId))}this.touchParams.itemProps.forEach(function(e){var t,i,n,o,s,r=p.body.util.toTime(u.center.x-c),a=p.body.util.toTime(e.initialX-c);t=this.options.rtl?-(r-a):r-a;var h=this._cloneItemData(e.item.data);if(null==e.item.editable||e.item.editable.updateTime||e.item.editable.updateGroup||p.options.editable.overrideItems){if((this.options.editable.overrideItems||null==g.editable)&&this.options.editable.updateTime||!this.options.editable.overrideItems&&null!=g.editable&&g.editable.updateTime)if(e.dragLeft)this.options.rtl?null!=h.end&&(n=x.convert(e.data.end,"Date"),s=new Date(n.valueOf()+t),h.end=f?f(s,m,v):s):null!=h.start&&(i=x.convert(e.data.start,"Date"),o=new Date(i.valueOf()+t),h.start=f?f(o,m,v):o);else if(e.dragRight)this.options.rtl?null!=h.start&&(i=x.convert(e.data.start,"Date"),o=new Date(i.valueOf()+t),h.start=f?f(o,m,v):o):null!=h.end&&(n=x.convert(e.data.end,"Date"),s=new Date(n.valueOf()+t),h.end=f?f(s,m,v):s);else if(null!=h.start)if(i=x.convert(e.data.start,"Date").valueOf(),o=new Date(i+t),null!=h.end){var d=(n=x.convert(e.data.end,"Date")).valueOf()-i.valueOf();h.start=f?f(o,m,v):o,h.end=new Date(h.start.valueOf()+d)}else h.start=f?f(o,m,v):o;if(y&&!e.dragLeft&&!e.dragRight&&null!=b&&null!=h.group){var l=b-e.groupOffset;l=Math.max(0,l),l=Math.min(p.groupIds.length-1,l),h.group=p.groupIds[l]}h=this._cloneItemData(h),p.options.onMoving(h,function(t){t&&e.item.setData(this._cloneItemData(t,"Date"))}.bind(this))}}.bind(this)),this.body.emitter.emit("_change")}},u.prototype._moveToGroup=function(t,e){var i=this.groups[e];if(i&&i.groupId!=t.data.group){var n=t.parent;n.remove(t),n.order(),t.data.group=i.groupId,i.add(t),i.order()}},u.prototype._onDragEnd=function(t){if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){t.stopPropagation();var n=this,o=this.itemsData.getDataSet(),e=this.touchParams.itemProps;this.touchParams.itemProps=null,e.forEach(function(e){var i=e.item.id;if(null!=n.itemsData.get(i,n.itemOptions)){var t=this._cloneItemData(e.item.data);n.options.onMove(t,function(t){t?(t[o._fieldId]=i,o.update(t)):(e.item.setData(e.data),n.body.emitter.emit("_change"))})}else n.options.onAdd(e.item.data,function(t){n._removeItem(e.item),t&&n.itemsData.getDataSet().add(t),n.body.emitter.emit("_change")})}.bind(this))}},u.prototype._onGroupClick=function(t){var e=this.groupFromTarget(t);if(e&&e.nestedGroups){var i=this.groupsData.getDataSet(),n=i.get(e.groupId);null==n.showNested&&(n.showNested=!0),n.showNested=!n.showNested;var o=i.get(e.nestedGroups).map(function(t){return t.visible=n.showNested,t});if(i.update(o.concat(n)),n.showNested)x.removeClassName(e.dom.label,"collapsed"),x.addClassName(e.dom.label,"expanded");else{x.removeClassName(e.dom.label,"expanded");var s=this.options.rtl?"collapsed-rtl":"collapsed";x.addClassName(e.dom.label,s)}}},u.prototype._onGroupDragStart=function(t){this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(t),this.groupTouchParams.group&&(t.stopPropagation(),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))},u.prototype._onGroupDrag=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this.groupsData;this.groupsData instanceof _&&(e=this.groupsData.getDataSet());var i=this.groupFromTarget(t);if(i&&i.height!=this.groupTouchParams.group.height){var n=i.top<this.groupTouchParams.group.top,o=t.center?t.center.y:t.clientY,s=x.getAbsoluteTop(i.dom.foreground),r=this.groupTouchParams.group.height;if(n){if(s+r<o)return}else if(s+i.height-r>o)return}if(i&&i!=this.groupTouchParams.group){var a=e.get(i.groupId),h=e.get(this.groupTouchParams.group.groupId);h&&a&&(this.options.groupOrderSwap(h,a,e),e.update(h),e.update(a));var d=e.getIds({order:this.options.groupOrder});if(!x.equalArray(d,this.groupTouchParams.originalOrder))for(var l=this.groupTouchParams.originalOrder,u=this.groupTouchParams.group.groupId,c=Math.min(l.length,d.length),p=0,f=0,m=0;p<c;){for(;p+f<c&&p+m<c&&d[p+f]==l[p+m];)p++;if(c<=p+f)break;if(d[p+f]==u)f=1;else if(l[p+m]==u)m=1;else{var v=d.indexOf(l[p+m]),g=e.get(d[p+f]),y=e.get(l[p+m]);this.options.groupOrderSwap(g,y,e),e.update(g),e.update(y);var b=d[p+f];d[p+f]=l[p+m],d[v]=b,p++}}}}},u.prototype._onGroupDragEnd=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var d=this,l=d.groupTouchParams.group.groupId,u=d.groupsData.getDataSet(),e=x.extend({},u.get(l));d.options.onMoveGroup(e,function(t){if(t)t[u._fieldId]=l,u.update(t);else{var e=u.getIds({order:d.options.groupOrder});if(!x.equalArray(e,d.groupTouchParams.originalOrder))for(var i=d.groupTouchParams.originalOrder,n=Math.min(i.length,e.length),o=0;o<n;){for(;o<n&&e[o]==i[o];)o++;if(n<=o)break;var s=e.indexOf(i[o]),r=u.get(e[o]),a=u.get(i[o]);d.options.groupOrderSwap(r,a,u),u.update(r),u.update(a);var h=e[o];e[o]=i[o],e[s]=h,o++}}}),d.body.emitter.emit("groupDragged",{groupId:l})}},u.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);var n=this.getSelection(),o=this.itemFromTarget(t),s=o?[o.id]:[];this.setSelection(s);var r=this.getSelection();(0<r.length||0<n.length)&&this.body.emitter.emit("select",{items:r,event:t})}},u.prototype._onMouseOver=function(t){var e=this.itemFromTarget(t);if(e&&e!==this.itemFromRelatedTarget(t)){var i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new g(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);var n=this.body.dom.centerContainer;this.popup.setPosition(t.clientX-x.getAbsoluteLeft(n)+n.offsetLeft,t.clientY-x.getAbsoluteTop(n)+n.offsetTop),this.popup.show()}else null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemover",{item:e.id,event:t})}},u.prototype._onMouseOut=function(t){var e=this.itemFromTarget(t);e&&e!==this.itemFromRelatedTarget(t)&&(null!=this.popup&&this.popup.hide(),this.body.emitter.emit("itemout",{item:e.id,event:t}))},u.prototype._onMouseMove=function(t){if(this.itemFromTarget(t)&&this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden){var e=this.body.dom.centerContainer;this.popup.setPosition(t.clientX-x.getAbsoluteLeft(e)+e.offsetLeft,t.clientY-x.getAbsoluteTop(e)+e.offsetTop),this.popup.show()}},u.prototype._onMouseWheel=function(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)},u.prototype._onUpdateItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this;if(t){var i=e.itemsData.get(t.id);this.options.onUpdate(i,function(t){t&&e.itemsData.getDataSet().update(t)})}}},u.prototype._onDropObjectOnItem=function(t){var e=this.itemFromTarget(t),i=JSON.parse(t.dataTransfer.getData("text"));this.options.onDropObjectOnItem(i,e)},u.prototype._onAddItem=function(e){if(this.options.selectable&&this.options.editable.add){var t,i,n=this,o=this.options.snap||null;i=this.options.rtl?(t=x.getAbsoluteRight(this.dom.frame))-e.center.x:(t=x.getAbsoluteLeft(this.dom.frame),e.center.x-t);var s,r,a=this.body.util.toTime(i),h=this.body.util.getScale(),d=this.body.util.getStep();"drop"==e.type?((r=JSON.parse(e.dataTransfer.getData("text"))).content=r.content?r.content:"new item",r.start=r.start?r.start:o?o(a,h,d):a,r.type=r.type||"box",r[this.itemsData._fieldId]=r.id||x.randomUUID(),"range"!=r.type||r.end||(s=this.body.util.toTime(i+this.props.width/5),r.end=o?o(s,h,d):s)):((r={start:o?o(a,h,d):a,content:"new item"})[this.itemsData._fieldId]=x.randomUUID(),"range"===this.options.type&&(s=this.body.util.toTime(i+this.props.width/5),r.end=o?o(s,h,d):s));var l=this.groupFromTarget(e);l&&(r.group=l.groupId),r=this._cloneItemData(r),this.options.onAdd(r,function(t){t&&(n.itemsData.getDataSet().add(t),"drop"==e.type&&n.setSelection([t.id]))})}},u.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e=this.itemFromTarget(t);if(e){var i=this.options.multiselect?this.getSelection():[];if(t.srcEvent&&t.srcEvent.shiftKey&&this.options.multiselect){var n=this.itemsData.get(e.id).group,o=void 0;this.options.multiselectPerGroup&&0<i.length&&(o=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&null!=o&&o!=n||i.push(e.id);var s=u._getItemRange(this.itemsData.get(i,this.itemOptions));if(!this.options.multiselectPerGroup||o==n)for(var r in i=[],this.items)if(this.items.hasOwnProperty(r)){var a=this.items[r],h=a.data.start,d=void 0!==a.data.end?a.data.end:h;!(h>=s.min&&d<=s.max)||this.options.multiselectPerGroup&&o!=this.itemsData.get(a.id).group||a instanceof v||i.push(a.id)}}else{var l=i.indexOf(e.id);-1==l?i.push(e.id):i.splice(l,1)}this.setSelection(i),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}},u._getItemRange=function(t){var e=null,i=null;return t.forEach(function(t){(null==i||t.start<i)&&(i=t.start),null!=t.end?(null==e||t.end>e)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}},u.prototype.itemFromElement=function(t){for(var e=t;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},u.prototype.itemFromTarget=function(t){return this.itemFromElement(t.target)},u.prototype.itemFromRelatedTarget=function(t){return this.itemFromElement(t.relatedTarget)},u.prototype.groupFromTarget=function(t){var e=t.center?t.center.y:t.clientY,i=this.groupIds;i.length<=0&&this.groupsData&&(i=this.groupsData.getIds({order:this.options.groupOrder}));for(var n=0;n<i.length;n++){var o=i[n],s=this.groups[o],r=s.dom.foreground,a=x.getAbsoluteTop(r);if(a<e&&e<a+r.offsetHeight)return s;if("top"===this.options.orientation.item){if(n===this.groupIds.length-1&&a<e)return s}else if(0===n&&e<a+r.offset)return s}return null},u.itemSetFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-itemset"))return e["timeline-itemset"];e=e.parentNode}return null},u.prototype._cloneItemData=function(t,e){var i=x.extend({},t);return e=e||this.itemsData.getDataSet()._options.type,null!=i.start&&(i.start=x.convert(i.start,e&&e.start||"Date")),null!=i.end&&(i.end=x.convert(i.end,e&&e.end||"Date")),i},t.exports=u},function(t,l,e){l.orderByStart=function(t){t.sort(function(t,e){return t.data.start-e.data.start})},l.orderByEnd=function(t){t.sort(function(t,e){return("end"in t.data?t.data.end:t.data.start)-("end"in e.data?e.data.end:e.data.start)})},l.stack=function(t,e,i){if(i)for(var n=0;n<t.length;n++)t[n].top=null;for(n=0;n<t.length;n++){var o=t[n];if(o.stack&&null===o.top){o.top=e.axis;do{for(var s=null,r=0,a=t.length;r<a;r++){var h=t[r];if(null!==h.top&&h!==o&&h.stack&&l.collision(o,h,e.item,h.options.rtl)){s=h;break}}null!=s&&(o.top=s.top+s.height+e.item.vertical)}while(s)}}},l.substack=function(t,e,i){for(var n=0;n<t.length;n++)t[n].top=null;var o=i.height;for(n=0;n<t.length;n++){var s=t[n];if(s.stack&&null===s.top){s.top=s.baseTop;do{for(var r=null,a=0,h=t.length;a<h;a++){var d=t[a];if(null!==d.top&&d!==s&&l.collision(s,d,e.item,d.options.rtl)){r=d;break}}null!=r&&(s.top=r.top+r.height+e.item.vertical),s.top+s.height>o&&(o=s.top+s.height)}while(r)}}i.height=o-i.top+.5*e.item.vertical},l.nostack=function(t,e,i,n){for(var o=0;o<t.length;o++)if(null==t[o].data.subgroup)t[o].top=e.item.vertical;else if(void 0!==t[o].data.subgroup&&n){var s=0;for(var r in i)i.hasOwnProperty(r)&&1==i[r].visible&&i[r].index<i[t[o].data.subgroup].index&&(s+=i[r].height,i[t[o].data.subgroup].top=s);t[o].top=s+.5*e.item.vertical}n||l.stackSubgroups(t,e,i)},l.stackSubgroups=function(t,e,i){for(var n in i)if(i.hasOwnProperty(n)){i[n].top=0;do{var o=null;for(var s in i)if(null!==i[s].top&&s!==n&&i[n].index>i[s].index&&l.collisionByTimes(i[n],i[s])){o=i[s];break}null!=o&&(i[n].top=o.top+o.height)}while(o)}for(var r=0;r<t.length;r++)void 0!==t[r].data.subgroup&&(t[r].top=i[t[r].data.subgroup].top+.5*e.item.vertical)},l.stackSubgroupsWithInnerStack=function(t,e,i){var n=!1,o=[];for(var s in i)i[s].hasOwnProperty("index")?o[i[s].index]=s:o.push(s);for(var r=0;r<o.length;r++)if(s=o[r],i.hasOwnProperty(s)){for(var a in n=n||i[s].stack,i[s].top=0,i)i[a].visible&&i[s].index>i[a].index&&(i[s].top+=i[a].height);for(var h=t[s],d=0;d<h.length;d++)void 0!==h[d].data.subgroup&&(h[d].top=i[h[d].data.subgroup].top+.5*e.item.vertical,i[s].stack&&(h[d].baseTop=h[d].top));n&&i[s].stack&&l.substack(t[s],e,i[s])}},l.collision=function(t,e,i,n){return n?t.right-i.horizontal+.001<e.right+e.width&&t.right+t.width+i.horizontal-.001>e.right&&t.top-i.vertical+.001<e.top+e.height&&t.top+t.height+i.vertical-.001>e.top:t.left-i.horizontal+.001<e.left+e.width&&t.left+t.width+i.horizontal-.001>e.left&&t.top-i.vertical+.001<e.top+e.height&&t.top+t.height+i.vertical-.001>e.top},l.collisionByTimes=function(t,e){return t.start<=e.start&&t.end>=e.start&&t.top<e.top+e.height&&t.top+t.height>e.top||e.start<=t.start&&e.end>=t.start&&e.top<t.top+t.height&&e.top+e.height>t.top}},function(t,e,i){function n(t,e,i){if(this.props={dot:{width:0,height:0},line:{width:0,height:0}},this.options=i,t&&null==t.start)throw new Error('Property "start" missing in item '+t);o.call(this,t,e,i)}var o=i(38);(n.prototype=new o(null,null,null)).isVisible=function(t){var e=this.options.align,i=this.width*t.getMillisecondsPerPixel();return"right"==e?this.data.start.getTime()>t.start&&this.data.start.getTime()-i<t.end:"left"==e?this.data.start.getTime()+i>t.start&&this.data.start.getTime()<t.end:this.data.start.getTime()+i/2>t.start&&this.data.start.getTime()-i/2<t.end},n.prototype._createDomElement=function(){this.dom||(this.dom={},this.dom.box=document.createElement("DIV"),this.dom.content=document.createElement("DIV"),this.dom.content.className="vis-item-content",this.dom.box.appendChild(this.dom.content),this.dom.line=document.createElement("DIV"),this.dom.line.className="vis-line",this.dom.dot=document.createElement("DIV"),this.dom.dot.className="vis-dot",(this.dom.box["timeline-item"]=this).dirty=!0)},n.prototype._appendDomElement=function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}if(!this.dom.line.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var i=this.parent.dom.axis;if(!e)throw new Error("Cannot redraw item: parent has no axis container element");i.appendChild(this.dom.dot)}this.displayed=!0},n.prototype._updateDirtyDomComponents=function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className="vis-item vis-box"+e,this.dom.line.className="vis-item vis-line"+e,this.dom.dot.className="vis-item vis-dot"+e}},n.prototype._getDomComponentsSizes=function(){return{previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},dot:{height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},line:{width:this.dom.line.offsetWidth},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}}},n.prototype._updateDomComponentsSizes=function(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px",this.props.dot.height=t.dot.height,this.props.dot.width=t.dot.width,this.props.line.width=t.line.width,this.width=t.box.width,this.height=t.box.height,this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left,this.dirty=!1},n.prototype._repaintDomAdditionals=function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.box)},n.prototype.redraw=function(t){var e,i,n=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),function(){this.dirty&&(e=this._getDomComponentsSizes())}.bind(this),function(){this.dirty&&this._updateDomComponentsSizes.bind(this)(e)}.bind(this),this._repaintDomAdditionals.bind(this)];return t?n:(n.forEach(function(t){i=t()}),i)},n.prototype.show=function(){this.displayed||this.redraw()},n.prototype.hide=function(){if(this.displayed){var t=this.dom;t.box.parentNode&&t.box.parentNode.removeChild(t.box),t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot),this.displayed=!1}},n.prototype.repositionX=function(){var t=this.conversion.toScreen(this.data.start),e=this.options.align;"right"==e?this.options.rtl?(this.right=t-this.width,this.dom.box.style.right=this.right+"px",this.dom.line.style.right=t-this.props.line.width+"px",this.dom.dot.style.right=t-this.props.line.width/2-this.props.dot.width/2+"px"):(this.left=t-this.width,this.dom.box.style.left=this.left+"px",this.dom.line.style.left=t-this.props.line.width+"px",this.dom.dot.style.left=t-this.props.line.width/2-this.props.dot.width/2+"px"):"left"==e?this.options.rtl?(this.right=t,this.dom.box.style.right=this.right+"px",this.dom.line.style.right=t+"px",this.dom.dot.style.right=t+this.props.line.width/2-this.props.dot.width/2+"px"):(this.left=t,this.dom.box.style.left=this.left+"px",this.dom.line.style.left=t+"px",this.dom.dot.style.left=t+this.props.line.width/2-this.props.dot.width/2+"px"):this.options.rtl?(this.right=t-this.width/2,this.dom.box.style.right=this.right+"px",this.dom.line.style.right=t-this.props.line.width+"px",this.dom.dot.style.right=t-this.props.dot.width/2+"px"):(this.left=t-this.width/2,this.dom.box.style.left=this.left+"px",this.dom.line.style.left=t-this.props.line.width/2+"px",this.dom.dot.style.left=t-this.props.dot.width/2+"px")},n.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box,i=this.dom.line,n=this.dom.dot;if("top"==t)e.style.top=(this.top||0)+"px",i.style.top="0",i.style.height=this.parent.top+this.top+1+"px",i.style.bottom="";else{var o=this.parent.itemSet.props.height,s=o-this.parent.top-this.parent.height+this.top;e.style.top=(this.parent.height-this.top-this.height||0)+"px",i.style.top=o-s+"px",i.style.bottom="0"}n.style.top=-this.props.dot.height/2+"px"},n.prototype.getWidthLeft=function(){return this.width/2},n.prototype.getWidthRight=function(){return this.width/2},t.exports=n},function(t,e,i){function n(t,e,i){if(this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}},this.options=i,t&&null==t.start)throw new Error('Property "start" missing in item '+t);o.call(this,t,e,i)}var o=i(38);(n.prototype=new o(null,null,null)).isVisible=function(t){var e=this.width*t.getMillisecondsPerPixel();return this.data.start.getTime()+e>t.start&&this.data.start<t.end},n.prototype._createDomElement=function(){this.dom||(this.dom={},this.dom.point=document.createElement("div"),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.point.appendChild(this.dom.content),this.dom.dot=document.createElement("div"),this.dom.point.appendChild(this.dom.dot),(this.dom.point["timeline-item"]=this).dirty=!0)},n.prototype._appendDomElement=function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.point.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.point)}this.displayed=!0},n.prototype._updateDirtyDomComponents=function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);var t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.point.className="vis-item vis-point"+e,this.dom.dot.className="vis-item vis-dot"+e}},n.prototype._getDomComponentsSizes=function(){return{dot:{width:this.dom.dot.offsetWidth,height:this.dom.dot.offsetHeight},content:{width:this.dom.content.offsetWidth,height:this.dom.content.offsetHeight},point:{width:this.dom.point.offsetWidth,height:this.dom.point.offsetHeight}}},n.prototype._updateDomComponentsSizes=function(t){this.props.dot.width=t.dot.width,this.props.dot.height=t.dot.height,this.props.content.height=t.content.height,this.options.rtl?this.dom.content.style.marginRight=2*this.props.dot.width+"px":this.dom.content.style.marginLeft=2*this.props.dot.width+"px",this.width=t.point.width,this.height=t.point.height,this.dom.dot.style.top=(this.height-this.props.dot.height)/2+"px",this.options.rtl?this.dom.dot.style.right=this.props.dot.width/2+"px":this.dom.dot.style.left=this.props.dot.width/2+"px",this.dirty=!1},n.prototype._repaintDomAdditionals=function(){this._repaintOnItemUpdateTimeTooltip(this.dom.point),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.point)},n.prototype.redraw=function(t){var e,i,n=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),function(){this.dirty&&(e=this._getDomComponentsSizes())}.bind(this),function(){this.dirty&&this._updateDomComponentsSizes.bind(this)(e)}.bind(this),this._repaintDomAdditionals.bind(this)];return t?n:(n.forEach(function(t){i=t()}),i)},n.prototype.show=function(){this.displayed||this.redraw()},n.prototype.hide=function(){this.displayed&&(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),this.displayed=!1)},n.prototype.repositionX=function(){var t=this.conversion.toScreen(this.data.start);this.options.rtl?(this.right=t-this.props.dot.width,this.dom.point.style.right=this.right+"px"):(this.left=t-this.props.dot.width,this.dom.point.style.left=this.left+"px")},n.prototype.repositionY=function(){var t=this.options.orientation.item;this.dom.point.style.top="top"==t?this.top+"px":this.parent.height-this.top-this.height+"px"},n.prototype.getWidthLeft=function(){return this.props.dot.width},n.prototype.getWidthRight=function(){return this.props.dot.width},t.exports=n},function(t,e,i){function n(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,t){if(null==t.start)throw new Error('Property "start" missing in item '+t.id);if(null==t.end)throw new Error('Property "end" missing in item '+t.id)}o.call(this,t,e,i)}var o=i(38),s=i(69),r=i(70);(n.prototype=new o(null,null,null)).baseClassName="vis-item vis-background",n.prototype.stack=!1,n.prototype.isVisible=function(t){return this.data.start<t.end&&this.data.end>t.start},n.prototype._createDomElement=function(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dirty=!0)},n.prototype._appendDomElement=function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.background;if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.box)}this.displayed=!0},n.prototype._updateDirtyDomComponents=function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");this.dom.box.className=this.baseClassName+t}},n.prototype._getDomComponentsSizes=function(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.content).overflow,{content:{width:this.dom.content.offsetWidth}}},n.prototype._updateDomComponentsSizes=function(t){this.props.content.width=t.content.width,this.height=0,this.dirty=!1},n.prototype._repaintDomAdditionals=function(){},n.prototype.redraw=function(t){var e,i,n=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),function(){this.dirty&&(e=this._getDomComponentsSizes.bind(this)())}.bind(this),function(){this.dirty&&this._updateDomComponentsSizes.bind(this)(e)}.bind(this),this._repaintDomAdditionals.bind(this)];return t?n:(n.forEach(function(t){i=t()}),i)},n.prototype.show=r.prototype.show,n.prototype.hide=r.prototype.hide,n.prototype.repositionX=r.prototype.repositionX,n.prototype.repositionY=function(t){var e,i=this.options.orientation.item;if(void 0!==this.data.subgroup){var n=this.data.subgroup;this.dom.box.style.height=this.parent.subgroups[n].height+"px",this.dom.box.style.top="top"==i?this.parent.top+this.parent.subgroups[n].top+"px":this.parent.top+this.parent.height-this.parent.subgroups[n].top-this.parent.subgroups[n].height+"px",this.dom.box.style.bottom=""}else this.parent instanceof s?(e=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.bottom="bottom"==i?"0":"",this.dom.box.style.top="top"==i?"0":""):(e=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=e+"px"},t.exports=n},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=((0,n(i(1)).default)(r,[{key:"setPosition",value:function(t,e){this.x=parseInt(t),this.y=parseInt(e)}},{key:"setText",value:function(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=t}},{key:"show",value:function(t){if(void 0===t&&(t=!0),!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,s=0,r=0;if("flip"==this.overflowMethod){var a=!1,h=!0;this.y-e<this.padding&&(h=!1),this.x+i>o-this.padding&&(a=!0),s=a?this.x-i:this.x,r=h?this.y-e:this.y}else(r=this.y-e)+e+this.padding>n&&(r=n-e-this.padding),r<this.padding&&(r=this.padding),(s=this.x)+i+this.padding>o&&(s=o-i-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=r+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),r);function r(t,e){(0,o.default)(this,r),this.container=t,this.overflowMethod=e||"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)}e.default=s},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var n="string",o="boolean",s="number",r="object",a={configure:{enabled:{boolean:o},filter:{boolean:o,function:"function"},container:{dom:"dom"},__type__:{object:r,boolean:o,function:"function"}},align:{string:n},rtl:{boolean:o,undefined:"undefined"},rollingMode:{follow:{boolean:o},offset:{number:s,undefined:"undefined"},__type__:{object:r}},verticalScroll:{boolean:o,undefined:"undefined"},horizontalScroll:{boolean:o,undefined:"undefined"},autoResize:{boolean:o},throttleRedraw:{number:s},clickToUse:{boolean:o},dataAttributes:{string:n,array:"array"},editable:{add:{boolean:o,undefined:"undefined"},remove:{boolean:o,undefined:"undefined"},updateGroup:{boolean:o,undefined:"undefined"},updateTime:{boolean:o,undefined:"undefined"},overrideItems:{boolean:o,undefined:"undefined"},__type__:{boolean:o,object:r}},end:{number:s,date:"date",string:n,moment:"moment"},format:{minorLabels:{millisecond:{string:n,undefined:"undefined"},second:{string:n,undefined:"undefined"},minute:{string:n,undefined:"undefined"},hour:{string:n,undefined:"undefined"},weekday:{string:n,undefined:"undefined"},day:{string:n,undefined:"undefined"},week:{string:n,undefined:"undefined"},month:{string:n,undefined:"undefined"},year:{string:n,undefined:"undefined"},__type__:{object:r,function:"function"}},majorLabels:{millisecond:{string:n,undefined:"undefined"},second:{string:n,undefined:"undefined"},minute:{string:n,undefined:"undefined"},hour:{string:n,undefined:"undefined"},weekday:{string:n,undefined:"undefined"},day:{string:n,undefined:"undefined"},week:{string:n,undefined:"undefined"},month:{string:n,undefined:"undefined"},year:{string:n,undefined:"undefined"},__type__:{object:r,function:"function"}},__type__:{object:r}},moment:{function:"function"},groupOrder:{string:n,function:"function"},groupEditable:{add:{boolean:o,undefined:"undefined"},remove:{boolean:o,undefined:"undefined"},order:{boolean:o,undefined:"undefined"},__type__:{boolean:o,object:r}},groupOrderSwap:{function:"function"},height:{string:n,number:s},hiddenDates:{start:{date:"date",number:s,string:n,moment:"moment"},end:{date:"date",number:s,string:n,moment:"moment"},repeat:{string:n},__type__:{object:r,array:"array"}},itemsAlwaysDraggable:{item:{boolean:o,undefined:"undefined"},range:{boolean:o,undefined:"undefined"},__type__:{boolean:o,object:r}},limitSize:{boolean:o},locale:{string:n},locales:{__any__:{any:"any"},__type__:{object:r}},margin:{axis:{number:s},item:{horizontal:{number:s,undefined:"undefined"},vertical:{number:s,undefined:"undefined"},__type__:{object:r,number:s}},__type__:{object:r,number:s}},max:{date:"date",number:s,string:n,moment:"moment"},maxHeight:{number:s,string:n},maxMinorChars:{number:s},min:{date:"date",number:s,string:n,moment:"moment"},minHeight:{number:s,string:n},moveable:{boolean:o},multiselect:{boolean:o},multiselectPerGroup:{boolean:o},onAdd:{function:"function"},onDropObjectOnItem:{function:"function"},onUpdate:{function:"function"},onMove:{function:"function"},onMoving:{function:"function"},onRemove:{function:"function"},onAddGroup:{function:"function"},onMoveGroup:{function:"function"},onRemoveGroup:{function:"function"},onInitialDrawComplete:{function:"function"},order:{function:"function"},orientation:{axis:{string:n,undefined:"undefined"},item:{string:n,undefined:"undefined"},__type__:{string:n,object:r}},selectable:{boolean:o},showCurrentTime:{boolean:o},showMajorLabels:{boolean:o},showMinorLabels:{boolean:o},stack:{boolean:o},stackSubgroups:{boolean:o},snap:{function:"function",null:"null"},start:{date:"date",number:s,string:n,moment:"moment"},template:{function:"function"},groupTemplate:{function:"function"},visibleFrameTemplate:{string:n,function:"function"},showTooltips:{boolean:o},tooltip:{followMouse:{boolean:o},overflowMethod:{string:["cap","flip"]},__type__:{object:r}},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:o,object:r}},timeAxis:{scale:{string:n,undefined:"undefined"},step:{number:s,undefined:"undefined"},__type__:{object:r}},type:{string:n},width:{string:n,number:s},zoomable:{boolean:o},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:s},zoomMin:{number:s},__type__:{object:r}};e.allOptions=a,e.configureOptions={global:{align:["center","left","right"],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}},groupsDraggable:!1,height:"",locale:"",margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,start:"",showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip"},tooltipOnItemUpdateTime:!1,type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1]}}},function(t,e,i){function n(t,e){this.id=v.randomUUID(),this.body=t,this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,stack:!1,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,sideBySide:!1,align:"center"},interpolation:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=v.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var n=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,i){n._onAdd(e.items)},update:function(t,e,i){n._onUpdate(e.items)},remove:function(t,e,i){n._onRemove(e.items)}},this.groupListeners={add:function(t,e,i){n._onAddGroups(e.items)},update:function(t,e,i){n._onUpdateGroups(e.items)},remove:function(t,e,i){n._onRemoveGroups(e.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(e),this.groupsUsingDefaultStyles=[0],this.body.emitter.on("rangechanged",function(){n.lastStart=n.body.range.start,n.svg.style.left=v.option.asSize(-n.props.width),n.forceGraphUpdate=!0,n.redraw.call(n)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}var o,s=i(6),r=(o=s)&&o.__esModule?o:{default:o},v=i(2),u=i(14),a=i(11),h=i(12),d=i(16),l=i(107),c=i(109),p=i(112),f=i(110),m=i(111),g=i(72);(n.prototype=new d)._create=function(){var t=document.createElement("div");t.className="vis-line-graph",this.dom.frame=t,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="relative",this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",this.svg.style.display="block",t.appendChild(this.svg),this.options.dataAxis.orientation="left",this.yAxisLeft=new l(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new l(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new p(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new p(this.body,this.options.legend,"right",this.options.groups),this.show()},n.prototype.setOptions=function(t){if(t){void 0===t.graphHeight&&void 0!==t.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&parseInt((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),v.selectiveDeepExtend(["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"],this.options,t),v.mergeOptions(this.options,t,"interpolation"),v.mergeOptions(this.options,t,"drawPoints"),v.mergeOptions(this.options,t,"shaded"),v.mergeOptions(this.options,t,"legend"),t.interpolation&&"object"==(0,r.default)(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5)),this.yAxisLeft&&void 0!==t.dataAxis&&(this.yAxisLeft.setOptions(this.options.dataAxis),this.yAxisRight.setOptions(this.options.dataAxis)),this.legendLeft&&void 0!==t.legend&&(this.legendLeft.setOptions(this.options.legend),this.legendRight.setOptions(this.options.legend)),this.groups.hasOwnProperty("__ungrouped__")&&this.groups.__ungrouped__.setOptions(t)}this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0}))},n.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},n.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},n.prototype.setItems=function(t){var e,i=this,n=this.itemsData;if(t){if(!(t instanceof a||t instanceof h))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(n&&(v.forEach(this.itemListeners,function(t,e){n.off(e,t)}),e=n.getIds(),this._onRemove(e)),this.itemsData){var o=this.id;v.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,o)}),e=this.itemsData.getIds(),this._onAdd(e)}},n.prototype.setGroups=function(t){var e,i=this;if(this.groupsData){v.forEach(this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null;for(var n=0;n<e.length;n++)this._removeGroup(e[n])}if(t){if(!(t instanceof a||t instanceof h))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;v.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}},n.prototype._onUpdate=function(t){this._updateAllGroupData(t)},n.prototype._onAdd=function(t){this._onUpdate(t)},n.prototype._onRemove=function(t){this._onUpdate(t)},n.prototype._onUpdateGroups=function(t){this._updateAllGroupData(null,t)},n.prototype._onAddGroups=function(t){this._onUpdateGroups(t)},n.prototype._onRemoveGroups=function(t){for(var e=0;e<t.length;e++)this._removeGroup(t[e]);this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})},n.prototype._removeGroup=function(t){this.groups.hasOwnProperty(t)&&("right"==this.groups[t].options.yAxisOrientation?(this.yAxisRight.removeGroup(t),this.legendRight.removeGroup(t),this.legendRight.redraw()):(this.yAxisLeft.removeGroup(t),this.legendLeft.removeGroup(t),this.legendLeft.redraw()),delete this.groups[t])},n.prototype._updateGroup=function(t,e){this.groups.hasOwnProperty(e)?(this.groups[e].update(t),"right"==this.groups[e].options.yAxisOrientation?(this.yAxisRight.updateGroup(e,this.groups[e]),this.legendRight.updateGroup(e,this.groups[e]),this.yAxisLeft.removeGroup(e),this.legendLeft.removeGroup(e)):(this.yAxisLeft.updateGroup(e,this.groups[e]),this.legendLeft.updateGroup(e,this.groups[e]),this.yAxisRight.removeGroup(e),this.legendRight.removeGroup(e))):(this.groups[e]=new c(t,e,this.options,this.groupsUsingDefaultStyles),"right"==this.groups[e].options.yAxisOrientation?(this.yAxisRight.addGroup(e,this.groups[e]),this.legendRight.addGroup(e,this.groups[e])):(this.yAxisLeft.addGroup(e,this.groups[e]),this.legendLeft.addGroup(e,this.groups[e]))),this.legendLeft.redraw(),this.legendRight.redraw()},n.prototype._updateAllGroupData=function(t,e){if(null!=this.itemsData){var i={},n=this.itemsData.get(),o=this.itemsData._fieldId,s={};t&&t.map(function(t){s[t]=t});for(var r={},a=0;a<n.length;a++){var h=n[a],d=h.group;null!=d||(d="__ungrouped__"),r.hasOwnProperty(d)?r[d]++:r[d]=1}var l={};if(!e&&t)for(d in this.groups)if(this.groups.hasOwnProperty(d)){var u=(m=this.groups[d]).getItems();i[d]=u.filter(function(t){return l[t[o]]=t[o],t[o]!==s[t[o]]});var c=r[d];r[d]-=i[d].length,i[d].length<c&&(i[d][c-1]={})}for(a=0;a<n.length;a++)if(null!=(d=(h=n[a]).group)||(d="__ungrouped__"),e||!t||h[o]===s[h[o]]||!l.hasOwnProperty(h[o])){i.hasOwnProperty(d)||(i[d]=new Array(r[d]));var p=v.bridgeObject(h);p.x=v.convert(h.x,"Date"),p.end=v.convert(h.end,"Date"),p.orginalY=h.y,p.y=Number(h.y),p[o]=h[o];var f=i[d].length-r[d]--;i[d][f]=p}for(d in this.groups)this.groups.hasOwnProperty(d)&&(i.hasOwnProperty(d)||(i[d]=new Array(0)));for(d in i)if(i.hasOwnProperty(d))if(0==i[d].length)this.groups.hasOwnProperty(d)&&this._removeGroup(d);else{var m=void 0;null!=this.groupsData&&(m=this.groupsData.get(d)),null==m&&(m={id:d,content:this.options.defaultGroup+d}),this._updateGroup(m,d),this.groups[d].setItems(i[d])}this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})}},n.prototype.redraw=function(){var t=!1;this.props.width=this.dom.frame.offsetWidth,this.props.height=this.body.domProps.centerContainer.height-this.body.domProps.border.top-this.body.domProps.border.bottom,t=this._isResized()||t;var e=this.body.range.end-this.body.range.start,i=e!=this.lastVisibleInterval;if(this.lastVisibleInterval=e,1==t&&(this.svg.style.width=v.option.asSize(3*this.props.width),this.svg.style.left=v.option.asSize(-this.props.width),-1==(this.options.height+"").indexOf("%")&&1!=this.updateSVGheightOnResize||(this.updateSVGheight=!0)),1==this.updateSVGheight?(this.options.graphHeight!=this.props.height+"px"&&(this.options.graphHeight=this.props.height+"px",this.svg.style.height=this.props.height+"px"),this.updateSVGheight=!1):this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",1==t||1==i||1==this.abortedGraphUpdate||1==this.forceGraphUpdate)t=this._updateGraph()||t,this.forceGraphUpdate=!1;else if(0!=this.lastStart){var n=this.body.range.start-this.lastStart,o=this.body.range.end-this.body.range.start;if(0!=this.props.width){var s=n*(this.props.width/o);this.svg.style.left=-this.props.width-s+"px"}}return this.legendLeft.redraw(),this.legendRight.redraw(),t},n.prototype._getSortedGroupIds=function(){var t=[];for(var e in this.groups)if(this.groups.hasOwnProperty(e)){var i=this.groups[e];1!=i.visible||void 0!==this.options.groups.visibility[e]&&1!=this.options.groups.visibility[e]||t.push({id:e,zIndex:i.options.zIndex})}v.insertSort(t,function(t,e){var i=t.zIndex,n=e.zIndex;return void 0===i&&(i=0),void 0===n&&(n=0),i==n?0:i<n?-1:1});for(var n=new Array(t.length),o=0;o<t.length;o++)n[o]=t[o].id;return n},n.prototype._updateGraph=function(){if(u.prepareElements(this.svgElements),0!=this.props.width&&null!=this.itemsData){var t,e,i={},n=this.body.util.toGlobalTime(-this.body.domProps.root.width),o=this.body.util.toGlobalTime(2*this.body.domProps.root.width),s=this._getSortedGroupIds();if(0<s.length){var r={};for(this._getRelevantData(s,r,n,o),this._applySampling(s,r),e=0;e<s.length;e++)this._convertXcoordinates(r[s[e]]);if(this._getYRanges(s,r,i),1==this._updateYAxis(s,i))return u.cleanupElements(this.svgElements),this.abortedGraphUpdate=!0;this.abortedGraphUpdate=!1;var a=void 0;for(e=0;e<s.length;e++)t=this.groups[s[e]],!0===this.options.stack&&"line"===this.options.style&&(null!=t.options.excludeFromStacking&&t.options.excludeFromStacking||(null!=a&&(this._stack(r[t.id],r[a.id]),1==t.options.shaded.enabled&&"group"!==t.options.shaded.orientation&&("top"==t.options.shaded.orientation&&"group"!==a.options.shaded.orientation?(a.options.shaded.orientation="group",a.options.shaded.groupId=t.id):(t.options.shaded.orientation="group",t.options.shaded.groupId=a.id))),a=t)),this._convertYcoordinates(r[s[e]],t);var h={};for(e=0;e<s.length;e++)if("line"===(t=this.groups[s[e]]).options.style&&1==t.options.shaded.enabled){var d=r[s[e]];if(null==d||0==d.length)continue;if(h.hasOwnProperty(s[e])||(h[s[e]]=m.calcPath(d,t)),"group"===t.options.shaded.orientation){var l=t.options.shaded.groupId;if(-1===s.indexOf(l)){console.log(t.id+": Unknown shading group target given:"+l);continue}h.hasOwnProperty(l)||(h[l]=m.calcPath(r[l],this.groups[l])),m.drawShading(h[s[e]],t,h[l],this.framework)}else m.drawShading(h[s[e]],t,void 0,this.framework)}for(f.draw(s,r,this.framework),e=0;e<s.length;e++)if(t=this.groups[s[e]],0<r[s[e]].length)switch(t.options.style){case"line":h.hasOwnProperty(s[e])||(h[s[e]]=m.calcPath(r[s[e]],t)),m.draw(h[s[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||g.draw(r[s[e]],t,this.framework)}}}return u.cleanupElements(this.svgElements),!1},n.prototype._stack=function(t,e){for(var i,n,o,s,r,a=i=0;a<t.length;a++){r=s=void 0;for(var h=i;h<e.length;h++){if(e[h].x===t[a].x){s=e[h],r=e[h],i=h;break}if(e[h].x>t[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),n=r.x-s.x,o=r.y-s.y,t[a].y=0==n?t[a].orginalY+r.y:t[a].orginalY+o/n*(t[a].x-s.x)+s.y}},n.prototype._getRelevantData=function(t,e,i,n){var o,s,r,a;if(0<t.length)for(s=0;s<t.length;s++){var h=(o=this.groups[t[s]]).getItems();if(1==o.options.sort){function d(t,e){return t.getTime()==e.getTime()?0:t<e?-1:1}var l=Math.max(0,v.binarySearchValue(h,i,"x","before",d)),u=Math.min(h.length,v.binarySearchValue(h,n,"x","after",d)+1);u<=0&&(u=h.length);var c=new Array(u-l);for(r=l;r<u;r++)a=o.itemsData[r],c[r-l]=a;e[t[s]]=c}else e[t[s]]=o.itemsData}},n.prototype._applySampling=function(t,e){if(0<t.length)for(var i=0;i<t.length;i++)if(1==this.groups[t[i]].options.sampling){var n=e[t[i]];if(0<n.length){var o,s=n.length,r=s/(this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x));o=Math.min(Math.ceil(.2*s),Math.max(1,Math.round(r)));for(var a=new Array(s),h=0;h<s;h+=o){a[Math.round(h/o)]=n[h]}e[t[i]]=a.splice(0,Math.round(s/o))}}},n.prototype._getYRanges=function(t,e,i){var n,o,s,r,a=[],h=[];if(0<t.length){for(s=0;s<t.length;s++)n=e[t[s]],r=this.groups[t[s]].options,0<n.length&&(o=this.groups[t[s]],!0===r.stack&&"bar"===r.style?"left"===r.yAxisOrientation?a=a.concat(n):h=h.concat(n):i[t[s]]=o.getYRange(n,t[s]));f.getStackedYRange(a,i,t,"__barStackLeft","left"),f.getStackedYRange(h,i,t,"__barStackRight","right")}},n.prototype._updateYAxis=function(t,e){var i,n,o=!1,s=!1,r=!1,a=1e9,h=1e9,d=-1e9,l=-1e9;if(0<t.length){for(var u=0;u<t.length;u++){var c=this.groups[t[u]];c&&"right"!=c.options.yAxisOrientation?(s=!0,d=-(a=1e9)):c&&c.options.yAxisOrientation&&(r=!0,l=-(h=1e9))}for(u=0;u<t.length;u++)e.hasOwnProperty(t[u])&&!0!==e[t[u]].ignore&&(i=e[t[u]].min,n=e[t[u]].max,"right"!=e[t[u]].yAxisOrientation?(s=!0,a=i<a?i:a,d=d<n?n:d):(r=!0,h=i<h?i:h,l=l<n?n:l));1==s&&this.yAxisLeft.setRange(a,d),1==r&&this.yAxisRight.setRange(h,l)}o=this._toggleAxisVisiblity(s,this.yAxisLeft)||o,o=this._toggleAxisVisiblity(r,this.yAxisRight)||o,1==r&&1==s?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!s,this.yAxisRight.masterAxis=this.yAxisLeft,o=(0==this.yAxisRight.master&&(this.yAxisLeft.lineOffset=1==r?this.yAxisRight.width:0,o=this.yAxisLeft.redraw()||o),this.yAxisRight.redraw()||o);var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"];for(u=0;u<p.length;u++)-1!=t.indexOf(p[u])&&t.splice(t.indexOf(p[u]),1);return o},n.prototype._toggleAxisVisiblity=function(t,e){var i=!1;return 0==t?e.dom.frame.parentNode&&0==e.hidden&&(e.hide(),i=!0):e.dom.frame.parentNode||1!=e.hidden||(e.show(),i=!0),i},n.prototype._convertXcoordinates=function(t){for(var e=this.body.util.toScreen,i=0;i<t.length;i++)t[i].screen_x=e(t[i].x)+this.props.width,t[i].screen_y=t[i].y,null!=t[i].end?t[i].screen_end=e(t[i].end)+this.props.width:t[i].screen_end=void 0},n.prototype._convertYcoordinates=function(t,e){var i=this.yAxisLeft,n=Number(this.svg.style.height.replace("px",""));"right"==e.options.yAxisOrientation&&(i=this.yAxisRight);for(var o=0;o<t.length;o++)t[o].screen_y=Math.round(i.convertValue(t[o].y));e.setZeroPosition(Math.min(n,i.convertValue(0)))},t.exports=n},function(t,e,i){function n(t,e,i,n){this.id=a.randomUUID(),this.body=t,this.defaultOptions={orientation:"left",showMinorLabels:!0,showMajorLabels:!0,icons:!1,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:"40px",visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format:function(t){return""+parseFloat(t.toPrecision(3))},title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:function(t){return""+parseFloat(t.toPrecision(3))},title:{text:void 0,style:void 0}}},this.linegraphOptions=n,this.linegraphSVG=i,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.scale=void 0,this.range={start:0,end:0},this.options=a.extend({},this.defaultOptions),this.conversionFactor=1,this.setOptions(e),this.width=Number((""+this.options.width).replace("px","")),this.minWidth=this.width,this.height=this.linegraphSVG.getBoundingClientRect().height,this.hidden=!1,this.stepPixels=25,this.zeroCrossing=-1,this.amountOfSteps=-1,this.lineOffset=0,this.master=!0,this.masterAxis=null,this.svgElements={},this.iconsRemoved=!1,this.groups={},this.amountOfGroups=0,this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups};var o=this;this.body.emitter.on("verticalDrag",function(){o.dom.lineContainer.style.top=o.body.domProps.scrollTop+"px"})}var o,s=i(8),r=(o=s)&&o.__esModule?o:{default:o},a=i(2),h=i(14),d=i(16),l=i(108);(n.prototype=new d).addGroup=function(t,e){this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1},n.prototype.updateGroup=function(t,e){this.groups.hasOwnProperty(t)||(this.amountOfGroups+=1),this.groups[t]=e},n.prototype.removeGroup=function(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)},n.prototype.setOptions=function(t){if(t){var e=!1;this.options.orientation!=t.orientation&&void 0!==t.orientation&&(e=!0);a.selectiveDeepExtend(["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","left","right","alignZeros"],this.options,t),this.minWidth=Number((""+this.options.width).replace("px","")),!0===e&&this.dom.frame&&(this.hide(),this.show())}},n.prototype._create=function(){this.dom.frame=document.createElement("div"),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement("div"),this.dom.lineContainer.style.width="100%",this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position="relative",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.height="100%",this.svg.style.width="100%",this.svg.style.display="block",this.dom.frame.appendChild(this.svg)},n.prototype._redrawGroupIcons=function(){h.prepareElements(this.svgElements);var t,e=this.options.iconWidth,i=11.5;t="left"===this.options.orientation?4:this.width-e-4;var n=(0,r.default)(this.groups);n.sort(function(t,e){return t<e?-1:1});for(var o=0;o<n.length;o++){var s=n[o];!0!==this.groups[s].visible||void 0!==this.linegraphOptions.visibility[s]&&!0!==this.linegraphOptions.visibility[s]||(this.groups[s].getLegend(e,15,this.framework,t,i),i+=19)}h.cleanupElements(this.svgElements),this.iconsRemoved=!1},n.prototype._cleanupIcons=function(){!1===this.iconsRemoved&&(h.prepareElements(this.svgElements),h.cleanupElements(this.svgElements),this.iconsRemoved=!0)},n.prototype.show=function(){this.hidden=!1,this.dom.frame.parentNode||("left"===this.options.orientation?this.body.dom.left.appendChild(this.dom.frame):this.body.dom.right.appendChild(this.dom.frame)),this.dom.lineContainer.parentNode||this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer)},n.prototype.hide=function(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.parentNode&&this.dom.lineContainer.parentNode.removeChild(this.dom.lineContainer)},n.prototype.setRange=function(t,e){this.range.start=t,this.range.end=e},n.prototype.redraw=function(){var t=!1,e=0;for(var i in this.dom.lineContainer.style.top=this.body.domProps.scrollTop+"px",this.groups)this.groups.hasOwnProperty(i)&&(!0!==this.groups[i].visible||void 0!==this.linegraphOptions.visibility[i]&&!0!==this.linegraphOptions.visibility[i]||e++);if(0===this.amountOfGroups||0===e)this.hide();else{this.show(),this.height=Number(this.linegraphSVG.style.height.replace("px","")),this.dom.lineContainer.style.height=this.height+"px",this.width=!0===this.options.visible?Number((""+this.options.width).replace("px","")):0;var n=this.props,o=this.dom.frame;o.className="vis-data-axis",this._calculateCharSize();var s=this.options.orientation,r=this.options.showMinorLabels,a=this.options.showMajorLabels;n.minorLabelHeight=r?n.minorCharHeight:0,n.majorLabelHeight=a?n.majorCharHeight:0,n.minorLineWidth=this.body.dom.backgroundHorizontal.offsetWidth-this.lineOffset-this.width+2*this.options.minorLinesOffset,n.minorLineHeight=1,n.majorLineWidth=this.body.dom.backgroundHorizontal.offsetWidth-this.lineOffset-this.width+2*this.options.majorLinesOffset,n.majorLineHeight=1,"left"===s?(o.style.top="0",o.style.left="0",o.style.bottom="",o.style.width=this.width+"px",o.style.height=this.height+"px",this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(o.style.top="",o.style.bottom="0",o.style.left="0",o.style.width=this.width+"px",o.style.height=this.height+"px",this.props.width=this.body.domProps.right.width,this.props.height=this.body.domProps.right.height),t=this._redrawLabels(),t=this._isResized()||t,!0===this.options.icons?this._redrawGroupIcons():this._cleanupIcons(),this._redrawTitle(s)}return t},n.prototype._redrawLabels=function(){var n=this;h.prepareElements(this.DOMelements.lines),h.prepareElements(this.DOMelements.labels);var o=this.options.orientation,t=null!=this.options[o].range?this.options[o].range:{},e=!0;null!=t.max&&(this.range.end=t.max,e=!1);var i=!0;null!=t.min&&(this.range.start=t.min,i=!1),this.scale=new l(this.range.start,this.range.end,i,e,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[o].format),!1===this.master&&null!=this.masterAxis&&this.scale.followScale(this.masterAxis.scale),this.maxLabelSize=0,this.scale.getLines().forEach(function(t){var e=t.y,i=t.major;n.options.showMinorLabels&&!1===i&&n._redrawLabel(e-2,t.val,o,"vis-y-axis vis-minor",n.props.minorCharHeight),i&&0<=e&&n._redrawLabel(e-2,t.val,o,"vis-y-axis vis-major",n.props.majorCharHeight),!0===n.master&&(i?n._redrawLine(e,o,"vis-grid vis-horizontal vis-major",n.options.majorLinesOffset,n.props.majorLineWidth):n._redrawLine(e,o,"vis-grid vis-horizontal vis-minor",n.options.minorLinesOffset,n.props.minorLineWidth))});var s=0;void 0!==this.options[o].title&&void 0!==this.options[o].title.text&&(s=this.props.titleCharHeight);var r=!0===this.options.icons?Math.max(this.options.iconWidth,s)+this.options.labelOffsetX+15:s+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-r&&!0===this.options.visible?(this.width=this.maxLabelSize+r,this.options.width=this.width+"px",h.cleanupElements(this.DOMelements.lines),h.cleanupElements(this.DOMelements.labels),this.redraw(),!0):this.maxLabelSize<this.width-r&&!0===this.options.visible&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+r),this.options.width=this.width+"px",h.cleanupElements(this.DOMelements.lines),h.cleanupElements(this.DOMelements.labels),this.redraw(),!0):(h.cleanupElements(this.DOMelements.lines),h.cleanupElements(this.DOMelements.labels),!1)},n.prototype.convertValue=function(t){return this.scale.convertValue(t)},n.prototype.screenToValue=function(t){return this.scale.screenToValue(t)},n.prototype._redrawLabel=function(t,e,i,n,o){var s=h.getDOMElement("div",this.DOMelements.labels,this.dom.frame);s.className=n,s.innerHTML=e,"left"===i?(s.style.left="-"+this.options.labelOffsetX+"px",s.style.textAlign="right"):(s.style.right="-"+this.options.labelOffsetX+"px",s.style.textAlign="left"),s.style.top=t-.5*o+this.options.labelOffsetY+"px",e+="";var r=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*r&&(this.maxLabelSize=e.length*r)},n.prototype._redrawLine=function(t,e,i,n,o){if(!0===this.master){var s=h.getDOMElement("div",this.DOMelements.lines,this.dom.lineContainer);s.className=i,s.innerHTML="","left"===e?s.style.left=this.width-n+"px":s.style.right=this.width-n+"px",s.style.width=o+"px",s.style.top=t+"px"}},n.prototype._redrawTitle=function(t){if(h.prepareElements(this.DOMelements.title),void 0!==this.options[t].title&&void 0!==this.options[t].title.text){var e=h.getDOMElement("div",this.DOMelements.title,this.dom.frame);e.className="vis-y-axis vis-title vis-"+t,e.innerHTML=this.options[t].title.text,void 0!==this.options[t].title.style&&a.addCssText(e,this.options[t].title.style),"left"===t?e.style.left=this.props.titleCharHeight+"px":e.style.right=this.props.titleCharHeight+"px",e.style.width=this.height+"px"}h.cleanupElements(this.DOMelements.title)},n.prototype._calculateCharSize=function(){if(!("minorCharHeight"in this.props)){var t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-minor vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.minorCharHeight=e.clientHeight,this.props.minorCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}if(!("majorCharHeight"in this.props)){var i=document.createTextNode("0"),n=document.createElement("div");n.className="vis-y-axis vis-major vis-measure",n.appendChild(i),this.dom.frame.appendChild(n),this.props.majorCharHeight=n.clientHeight,this.props.majorCharWidth=n.clientWidth,this.dom.frame.removeChild(n)}if(!("titleCharHeight"in this.props)){var o=document.createTextNode("0"),s=document.createElement("div");s.className="vis-y-axis vis-title vis-measure",s.appendChild(o),this.dom.frame.appendChild(s),this.props.titleCharHeight=s.clientHeight,this.props.titleCharWidth=s.clientWidth,this.dom.frame.removeChild(s)}},t.exports=n},function(t,e,i){function n(t,e,i,n,o,s){var r=6<arguments.length&&void 0!==arguments[6]&&arguments[6],a=7<arguments.length&&void 0!==arguments[7]&&arguments[7];if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=o,this.majorCharHeight=s,this._start=t,this._end=e,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=r,this.autoScaleStart=i,this.autoScaleEnd=n,this.formattingFunction=a,i||n){function h(t){var e=t-t%(d.magnitudefactor*d.minorSteps[d.minorStepIdx]);return t%(d.magnitudefactor*d.minorSteps[d.minorStepIdx])>d.magnitudefactor*d.minorSteps[d.minorStepIdx]*.5?e+d.magnitudefactor*d.minorSteps[d.minorStepIdx]:e}var d=this;i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=h(this._start)),n&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=h(this._end)),this.determineScale()}}n.prototype.setCharHeight=function(t){this.majorCharHeight=t},n.prototype.setHeight=function(t){this.containerHeight=t},n.prototype.determineScale=function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=0<t?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var n=0;i<0&&(n=i);for(var o=!1,s=n;Math.abs(s)<=Math.abs(i);s++){this.magnitudefactor=Math.pow(10,s);for(var r=0;r<this.minorSteps.length;r++)if(this.magnitudefactor*this.minorSteps[r]>=e){o=!0,this.minorStepIdx=r;break}if(!0===o)break}},n.prototype.is_major=function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])==0},n.prototype.getStep=function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]},n.prototype.getFirstMajor=function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)},n.prototype.formatValue=function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?""+e:"string"==typeof e?e:t.toPrecision(5)},n.prototype.getLines=function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,n=this._start+i;1e-5<this._end-n;n+=e)n!=this._start&&t.push({major:this.is_major(n),y:this.convertValue(n),val:this.formatValue(n)});return t},n.prototype.followScale=function(t){function e(){r.magnitudefactor*=2}function i(){r.magnitudefactor/=2}var n=this.minorStepIdx,o=this._start,s=this._end,r=this;t.minorStepIdx<=1&&this.minorStepIdx<=1||1<t.minorStepIdx&&1<this.minorStepIdx||(t.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,2==n||e(),e()):(this.minorStepIdx=2,1==n||i(),i()));for(var a=t.convertValue(0),h=t.getStep()*t.scale,d=!1,l=0;!d&&l++<5;){this.scale=h/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);var u=this.containerHeight/this.scale;this._start=o,this._end=this._start+u;var c=this._end*this.scale,p=this.magnitudefactor*this.majorSteps[this.minorStepIdx],f=this.getFirstMajor()-t.getFirstMajor();if(this.zeroAlign){var m=a-c;this._end+=m/this.scale,this._start=this._end-u}else this.autoScaleStart?this._start-=f/this.scale:this._start+=p-f/this.scale,this._end=this._start+u;if(!this.autoScaleEnd&&this._end>s+1e-5)i(),d=!1;else{if(!this.autoScaleStart&&this._start<o-1e-5){if(!(this.zeroAlign&&0<=o)){i(),d=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}d=!(this.autoScaleStart&&this.autoScaleEnd&&u<s-o)||(e(),!1)}}},n.prototype.convertValue=function(t){return this.containerHeight-(t-this._start)*this.scale},n.prototype.screenToValue=function(t){return(this.containerHeight-t)/this.scale+this._start},t.exports=n},function(t,e,i){function n(t,e,i,n){this.id=e;this.options=a.selectiveBridgeObject(["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"],i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=n,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible||t.visible}var o,s=i(6),r=(o=s)&&o.__esModule?o:{default:o},a=i(2),h=i(110),d=i(111),l=i(72);n.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==this.options.sort&&a.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})):this.itemsData=[]},n.prototype.getItems=function(){return this.itemsData},n.prototype.setZeroPosition=function(t){this.zeroPosition=t},n.prototype.setOptions=function(t){if(void 0!==t){a.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),a.mergeOptions(this.options,t,"interpolation"),a.mergeOptions(this.options,t,"drawPoints"),a.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==(0,r.default)(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},n.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible||t.visible,this.style=t.style,this.setOptions(t.options)},n.prototype.getLegend=function(t,e,i,n,o){switch(null!=i&&null!=i||(i={svg:document.createElementNS("http://www.w3.org/2000/svg","svg"),svgElements:{},options:this.options,groups:[this]}),null!=n&&null!=n||(n=0),null!=o&&null!=o||(o=.5*e),this.options.style){case"line":d.drawIcon(this,n,o,t,e,i);break;case"points":case"point":l.drawIcon(this,n,o,t,e,i);break;case"bar":h.drawIcon(this,n,o,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},n.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,n=0;n<t.length;n++)e=e>t[n].y?t[n].y:e,i=i<t[n].y?t[n].y:i;return{min:e,max:i,yAxisOrientation:this.options.yAxisOrientation}},t.exports=n},function(t,e,i){function y(t,e){}var b=i(14),_=i(72);y.drawIcon=function(t,e,i,n,o,s){var r=.5*o,a=b.getSVGElement("rect",s.svgElements,s.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-r),a.setAttributeNS(null,"width",n),a.setAttributeNS(null,"height",2*r),a.setAttributeNS(null,"class","vis-outline");var h=Math.round(.3*n),d=t.options.barChart.width/h,l=Math.round(.4*o),u=Math.round(.75*o),c=Math.round((n-2*h)/3);if(b.drawBar(e+.5*h+c,i+r-l-1,h,l,t.className+" vis-bar",s.svgElements,s.svg,t.style),b.drawBar(e+1.5*h+c+2,i+r-u-1,h,u,t.className+" vis-bar",s.svgElements,s.svg,t.style),1==t.options.drawPoints.enabled){var p={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size/d,className:t.className};b.drawPoint(e+.5*h+c,i+r-l-1,p,s.svgElements,s.svg),b.drawPoint(e+1.5*h+c+2,i+r-u-1,p,s.svgElements,s.svg)}},y.draw=function(t,e,i){var n,o,s,r,a,h,d=[],l={},u=0;for(a=0;a<t.length;a++)if("bar"===(r=i.groups[t[a]]).options.style&&!0===r.visible&&(void 0===i.options.groups.visibility[t[a]]||!0===i.options.groups.visibility[t[a]]))for(h=0;h<e[t[a]].length;h++)d.push({screen_x:e[t[a]][h].screen_x,screen_end:e[t[a]][h].screen_end,screen_y:e[t[a]][h].screen_y,x:e[t[a]][h].x,end:e[t[a]][h].end,y:e[t[a]][h].y,groupId:t[a],label:e[t[a]][h].label}),u+=1;if(0!==u)for(d.sort(function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x}),y._getDataIntersections(l,d),a=0;a<d.length;a++){var c=null!=(r=i.groups[d[a].groupId]).options.barChart.minWidth?r.options.barChart.minWidth:.1*r.options.barChart.width,p=0;if(void 0===l[o=d[a].screen_x])a+1<d.length&&(n=Math.abs(d[a+1].screen_x-o)),s=y._getSafeDrawData(n,r,c);else{var f=a+(l[o].amount-l[o].resolved);f<d.length&&(n=Math.abs(d[f].screen_x-o)),s=y._getSafeDrawData(n,r,c),l[o].resolved+=1,!0===r.options.stack&&!0!==r.options.excludeFromStacking?d[a].screen_y<r.zeroPosition?(p=l[o].accumulatedNegative,l[o].accumulatedNegative+=r.zeroPosition-d[a].screen_y):(p=l[o].accumulatedPositive,l[o].accumulatedPositive+=r.zeroPosition-d[a].screen_y):!0===r.options.barChart.sideBySide&&(s.width=s.width/l[o].amount,s.offset+=l[o].resolved*s.width-.5*s.width*(l[o].amount+1))}var m=s.width,v=d[a].screen_x;if(null!=d[a].screen_end?v+=.5*(m=d[a].screen_end-d[a].screen_x):v+=s.offset,b.drawBar(v,d[a].screen_y-p,m,r.zeroPosition-d[a].screen_y,r.className+" vis-bar",i.svgElements,i.svg,r.style),!0===r.options.drawPoints.enabled){var g={screen_x:d[a].screen_x,screen_y:d[a].screen_y-p,x:d[a].x,y:d[a].y,groupId:d[a].groupId,label:d[a].label};_.draw([g],r,i,s.offset)}}},y._getDataIntersections=function(t,e){for(var i,n=0;n<e.length;n++)n+1<e.length&&(i=Math.abs(e[n+1].screen_x-e[n].screen_x)),0<n&&(i=Math.min(i,Math.abs(e[n-1].screen_x-e[n].screen_x))),0===i&&(void 0===t[e[n].screen_x]&&(t[e[n].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[n].screen_x].amount+=1)},y._getSafeDrawData=function(t,e,i){var n,o;return t<e.options.barChart.width&&0<t?(n=t<i?i:t,o=0,"left"===e.options.barChart.align?o-=.5*t:"right"===e.options.barChart.align&&(o+=.5*t)):(n=e.options.barChart.width,o=0,"left"===e.options.barChart.align?o-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(o+=.5*e.options.barChart.width)),{width:n,offset:o}},y.getStackedYRange=function(t,e,i,n,o){if(0<t.length){t.sort(function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x});var s={};y._getDataIntersections(s,t),e[n]=y._getStackedYRange(s,t),e[n].yAxisOrientation=o,i.push(n)}},y._getStackedYRange=function(t,e){for(var i,n=e[0].screen_y,o=e[0].screen_y,s=0;s<e.length;s++)void 0===t[i=e[s].screen_x]?(n=n>e[s].screen_y?e[s].screen_y:n,o=o<e[s].screen_y?e[s].screen_y:o):e[s].screen_y<0?t[i].accumulatedNegative+=e[s].screen_y:t[i].accumulatedPositive+=e[s].screen_y;for(var r in t)t.hasOwnProperty(r)&&(n=(n=n>t[r].accumulatedNegative?t[r].accumulatedNegative:n)>t[r].accumulatedPositive?t[r].accumulatedPositive:n,o=(o=o<t[r].accumulatedNegative?t[r].accumulatedNegative:o)<t[r].accumulatedPositive?t[r].accumulatedPositive:o);return{min:n,max:o}},t.exports=y},function(t,e,i){function n(t,e){}var u=i(14);n.calcPath=function(t,e){if(null!=t&&0<t.length)return 1==e.options.interpolation.enabled?n._catmullRom(t,e):n._linear(t)},n.drawIcon=function(t,e,i,n,o,s){var r,a,h=.5*o,d=u.getSVGElement("rect",s.svgElements,s.svg);if(d.setAttributeNS(null,"x",e),d.setAttributeNS(null,"y",i-h),d.setAttributeNS(null,"width",n),d.setAttributeNS(null,"height",2*h),d.setAttributeNS(null,"class","vis-outline"),(r=u.getSVGElement("path",s.svgElements,s.svg)).setAttributeNS(null,"class",t.className),void 0!==t.style&&r.setAttributeNS(null,"style",t.style),r.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+n)+","+i),1==t.options.shaded.enabled&&(a=u.getSVGElement("path",s.svgElements,s.svg),"top"==t.options.shaded.orientation?a.setAttributeNS(null,"d","M"+e+", "+(i-h)+"L"+e+","+i+" L"+(e+n)+","+i+" L"+(e+n)+","+(i-h)):a.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+h)+" L"+(e+n)+","+(i+h)+"L"+(e+n)+","+i),a.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&a.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled){var l={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className};u.drawPoint(e+.5*n,i,l,s.svgElements,s.svg)}},n.drawShading=function(t,e,i,n){if(1==e.options.shaded.enabled){var o=Number(n.svg.style.height.replace("px","")),s=u.getSVGElement("path",n.svgElements,n.svg),r="L";1==e.options.interpolation.enabled&&(r="C");var a,h;h="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?o:Math.min(Math.max(0,e.zeroPosition),o),a="group"==e.options.shaded.orientation&&null!=i&&null!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,r,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,r,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,r,!1)+" V"+h+" H"+t[0][0]+" Z",s.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&s.setAttributeNS(null,"style",e.options.shaded.style),s.setAttributeNS(null,"d",a)}},n.draw=function(t,e,i){if(null!=t&&null!=t){var n=u.getSVGElement("path",i.svgElements,i.svg);n.setAttributeNS(null,"class",e.className),void 0!==e.style&&n.setAttributeNS(null,"style",e.style);var o="L";1==e.options.interpolation.enabled&&(o="C"),n.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,o,!1))}},n.serializePath=function(t,e,i){if(t.length<2)return"";var n,o=e;if(i)for(n=t.length-2;0<n;n--)o+=t[n][0]+","+t[n][1]+" ";else for(n=1;n<t.length;n++)o+=t[n][0]+","+t[n][1]+" ";return o},n._catmullRomUniform=function(t){var e,i,n,o,s,r,a=[];a.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var h=t.length,d=0;d<h-1;d++)e=0==d?t[0]:t[d-1],i=t[d],n=t[d+1],o=d+2<h?t[d+2]:n,s={screen_x:(-e.screen_x+6*i.screen_x+n.screen_x)*(1/6),screen_y:(-e.screen_y+6*i.screen_y+n.screen_y)*(1/6)},r={screen_x:(i.screen_x+6*n.screen_x-o.screen_x)*(1/6),screen_y:(i.screen_y+6*n.screen_y-o.screen_y)*(1/6)},a.push([s.screen_x,s.screen_y]),a.push([r.screen_x,r.screen_y]),a.push([n.screen_x,n.screen_y]);return a},n._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var n,o,s,r,a,h,d,l,u,c,p,f,m,v,g,y,b,_,w,x=[];x.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var k=t.length,S=0;S<k-1;S++)n=0==S?t[0]:t[S-1],o=t[S],s=t[S+1],r=S+2<k?t[S+2]:s,d=Math.sqrt(Math.pow(n.screen_x-o.screen_x,2)+Math.pow(n.screen_y-o.screen_y,2)),l=Math.sqrt(Math.pow(o.screen_x-s.screen_x,2)+Math.pow(o.screen_y-s.screen_y,2)),u=Math.sqrt(Math.pow(s.screen_x-r.screen_x,2)+Math.pow(s.screen_y-r.screen_y,2)),v=Math.pow(u,i),y=Math.pow(u,2*i),g=Math.pow(l,i),b=Math.pow(l,2*i),w=Math.pow(d,i),c=2*(_=Math.pow(d,2*i))+3*w*g+b,p=2*y+3*v*g+b,0<(f=3*w*(w+g))&&(f=1/f),0<(m=3*v*(v+g))&&(m=1/m),a={screen_x:(-b*n.screen_x+c*o.screen_x+_*s.screen_x)*f,screen_y:(-b*n.screen_y+c*o.screen_y+_*s.screen_y)*f},h={screen_x:(y*o.screen_x+p*s.screen_x-b*r.screen_x)*m,screen_y:(y*o.screen_y+p*s.screen_y-b*r.screen_y)*m},0==a.screen_x&&0==a.screen_y&&(a=o),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},n._linear=function(t){for(var e=[],i=0;i<t.length;i++)e.push([t[i].screen_x,t[i].screen_y]);return e},t.exports=n},function(t,e,i){function n(t,e,i,n){this.body=t,this.defaultOptions={enabled:!1,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:"top-left"},right:{visible:!0,position:"top-right"}},this.side=i,this.options=r.extend({},this.defaultOptions),this.linegraphOptions=n,this.svgElements={},this.dom={},this.groups={},this.amountOfGroups=0,this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups},this.setOptions(e)}var o,s=i(8),d=(o=s)&&o.__esModule?o:{default:o},r=i(2),l=i(14),a=i(16);(n.prototype=new a).clear=function(){this.groups={},this.amountOfGroups=0},n.prototype.addGroup=function(t,e){1!=e.options.excludeFromLegend&&(this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1)},n.prototype.updateGroup=function(t,e){this.groups[t]=e},n.prototype.removeGroup=function(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)},n.prototype._create=function(){this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-legend",this.dom.frame.style.position="absolute",this.dom.frame.style.top="10px",this.dom.frame.style.display="block",this.dom.textArea=document.createElement("div"),this.dom.textArea.className="vis-legend-text",this.dom.textArea.style.position="relative",this.dom.textArea.style.top="0px",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.width=this.options.iconSize+5+"px",this.svg.style.height="100%",this.dom.frame.appendChild(this.svg),this.dom.frame.appendChild(this.dom.textArea)},n.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},n.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},n.prototype.setOptions=function(t){r.selectiveDeepExtend(["enabled","orientation","icons","left","right"],this.options,t)},n.prototype.redraw=function(){var t=0,e=(0,d.default)(this.groups);e.sort(function(t,e){return t<e?-1:1});for(var i=0;i<e.length;i++){var n=e[i];1!=this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&1!=this.linegraphOptions.visibility[n]||t++}if(0==this.options[this.side].visible||0==this.amountOfGroups||0==this.options.enabled||0==t)this.hide();else{if(this.show(),"top-left"==this.options[this.side].position||"bottom-left"==this.options[this.side].position?(this.dom.frame.style.left="4px",this.dom.frame.style.textAlign="left",this.dom.textArea.style.textAlign="left",this.dom.textArea.style.left=this.options.iconSize+15+"px",this.dom.textArea.style.right="",this.svg.style.left="0px",this.svg.style.right=""):(this.dom.frame.style.right="4px",this.dom.frame.style.textAlign="right",this.dom.textArea.style.textAlign="right",this.dom.textArea.style.right=this.options.iconSize+15+"px",this.dom.textArea.style.left="",this.svg.style.right="0px",this.svg.style.left=""),"top-left"==this.options[this.side].position||"top-right"==this.options[this.side].position)this.dom.frame.style.top=4-Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.bottom="";else{var o=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+o+Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.top=""}0==this.options.icons?(this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+"px",this.dom.textArea.style.right="",this.dom.textArea.style.left="",this.svg.style.width="0px"):(this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offsetWidth+10+"px",this.drawLegendIcons());var s="";for(i=0;i<e.length;i++)n=e[i],1!=this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&1!=this.linegraphOptions.visibility[n]||(s+=this.groups[n].content+"<br />");this.dom.textArea.innerHTML=s,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},n.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=(0,d.default)(this.groups);t.sort(function(t,e){return t<e?-1:1}),l.resetElements(this.svgElements);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),n=i,o=this.options.iconSize,s=.75*this.options.iconSize,r=i+.5*s+3;this.svg.style.width=o+5+i+"px";for(var a=0;a<t.length;a++){var h=t[a];1!=this.groups[h].visible||void 0!==this.linegraphOptions.visibility[h]&&1!=this.linegraphOptions.visibility[h]||(this.groups[h].getLegend(o,s,this.framework,n,r),r+=s+this.options.iconSpacing)}}},t.exports=n},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var n="string",o="boolean",s="number",r="object",a={configure:{enabled:{boolean:o},filter:{boolean:o,function:"function"},container:{dom:"dom"},__type__:{object:r,boolean:o,function:"function"}},yAxisOrientation:{string:["left","right"]},defaultGroup:{string:n},sort:{boolean:o},sampling:{boolean:o},stack:{boolean:o},graphHeight:{string:n,number:s},shaded:{enabled:{boolean:o},orientation:{string:["bottom","top","zero","group"]},groupId:{object:r},__type__:{boolean:o,object:r}},style:{string:["line","bar","points"]},barChart:{width:{number:s},minWidth:{number:s},sideBySide:{boolean:o},align:{string:["left","center","right"]},__type__:{object:r}},interpolation:{enabled:{boolean:o},parametrization:{string:["centripetal","chordal","uniform"]},alpha:{number:s},__type__:{object:r,boolean:o}},drawPoints:{enabled:{boolean:o},onRender:{function:"function"},size:{number:s},style:{string:["square","circle"]},__type__:{object:r,boolean:o,function:"function"}},dataAxis:{showMinorLabels:{boolean:o},showMajorLabels:{boolean:o},icons:{boolean:o},width:{string:n,number:s},visible:{boolean:o},alignZeros:{boolean:o},left:{range:{min:{number:s,undefined:"undefined"},max:{number:s,undefined:"undefined"},__type__:{object:r}},format:{function:"function"},title:{text:{string:n,number:s,undefined:"undefined"},style:{string:n,undefined:"undefined"},__type__:{object:r}},__type__:{object:r}},right:{range:{min:{number:s,undefined:"undefined"},max:{number:s,undefined:"undefined"},__type__:{object:r}},format:{function:"function"},title:{text:{string:n,number:s,undefined:"undefined"},style:{string:n,undefined:"undefined"},__type__:{object:r}},__type__:{object:r}},__type__:{object:r}},legend:{enabled:{boolean:o},icons:{boolean:o},left:{visible:{boolean:o},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:r}},right:{visible:{boolean:o},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:r}},__type__:{object:r,boolean:o}},groups:{visibility:{any:"any"},__type__:{object:r}},autoResize:{boolean:o},throttleRedraw:{number:s},clickToUse:{boolean:o},end:{number:s,date:"date",string:n,moment:"moment"},format:{minorLabels:{millisecond:{string:n,undefined:"undefined"},second:{string:n,undefined:"undefined"},minute:{string:n,undefined:"undefined"},hour:{string:n,undefined:"undefined"},weekday:{string:n,undefined:"undefined"},day:{string:n,undefined:"undefined"},month:{string:n,undefined:"undefined"},year:{string:n,undefined:"undefined"},__type__:{object:r}},majorLabels:{millisecond:{string:n,undefined:"undefined"},second:{string:n,undefined:"undefined"},minute:{string:n,undefined:"undefined"},hour:{string:n,undefined:"undefined"},weekday:{string:n,undefined:"undefined"},day:{string:n,undefined:"undefined"},month:{string:n,undefined:"undefined"},year:{string:n,undefined:"undefined"},__type__:{object:r}},__type__:{object:r}},moment:{function:"function"},height:{string:n,number:s},hiddenDates:{start:{date:"date",number:s,string:n,moment:"moment"},end:{date:"date",number:s,string:n,moment:"moment"},repeat:{string:n},__type__:{object:r,array:"array"}},locale:{string:n},locales:{__any__:{any:"any"},__type__:{object:r}},max:{date:"date",number:s,string:n,moment:"moment"},maxHeight:{number:s,string:n},maxMinorChars:{number:s},min:{date:"date",number:s,string:n,moment:"moment"},minHeight:{number:s,string:n},moveable:{boolean:o},multiselect:{boolean:o},orientation:{string:n},showCurrentTime:{boolean:o},showMajorLabels:{boolean:o},showMinorLabels:{boolean:o},start:{date:"date",number:s,string:n,moment:"moment"},timeAxis:{scale:{string:n,undefined:"undefined"},step:{number:s,undefined:"undefined"},__type__:{object:r}},width:{string:n,number:s},zoomable:{boolean:o},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:s},zoomMin:{number:s},zIndex:{number:s},__type__:{object:r}};e.allOptions=a,e.configureOptions={global:{sort:!0,sampling:!0,stack:!1,shaded:{enabled:!1,orientation:["zero","top","bottom","group"]},style:["line","bar","points"],barChart:{width:[50,5,100,5],minWidth:[50,5,100,5],sideBySide:!1,align:["left","center","right"]},interpolation:{enabled:!0,parametrization:["centripetal","chordal","uniform"]},drawPoints:{enabled:!0,size:[6,2,30,1],style:["square","circle"]},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,icons:!1,width:[40,0,200,1],visible:!0,alignZeros:!0,left:{title:{text:"",style:""}},right:{title:{text:"",style:""}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]},right:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]}},autoResize:!0,clickToUse:!1,end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",month:"YYYY",year:""}},height:"",locale:"",max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!0,orientation:["both","bottom","top"],showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,start:"",width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],zIndex:0}}},function(t,e,i){function n(t){return C=t,function(){var t={};if(T=0,I=C.charAt(0),c(),"strict"===P&&(t.strict=!0,c()),"graph"!==P&&"digraph"!==P||(t.type=P,c()),N===M.IDENTIFIER&&(t.id=P,c()),"{"!=P)throw y("Angle bracket { expected");if(c(),p(t),"}"!=P)throw y("Angle bracket } expected");if(c(),""!==P)throw y("End of file expected");return c(),delete t.node,delete t.edge,delete t.graph,t}()}function o(){T++,I=C.charAt(T)}function s(){return C.charAt(T+1)}function r(t){return R.test(t)}function h(t,e){if(t=t||{},e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function a(t,e,i){for(var n=e.split("."),o=t;n.length;){var s=n.shift();n.length?(o[s]||(o[s]={}),o=o[s]):o[s]=i}}function d(t,e){for(var i,n,o=null,s=[t],r=t;r.parent;)s.push(r.parent),r=r.parent;if(r.nodes)for(i=0,n=r.nodes.length;i<n;i++)if(e.id===r.nodes[i].id){o=r.nodes[i];break}for(o||(o={id:e.id},t.node&&(o.attr=h(o.attr,t.node))),i=s.length-1;0<=i;i--){var a=s[i];a.nodes||(a.nodes=[]),-1===a.nodes.indexOf(o)&&a.nodes.push(o)}e.attr&&(o.attr=h(o.attr,e.attr))}function l(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var i=h({},t.edge);e.attr=h(i,e.attr)}}function u(t,e,i,n,o){var s={from:e,to:i,type:n};return t.edge&&(s.attr=h({},t.edge)),s.attr=h(s.attr||{},o),s}function c(){for(N=M.NULL,P="";" "===I||"\t"===I||"\n"===I||"\r"===I;)o();do{var t=!1;if("#"===I){for(var e=T-1;" "===C.charAt(e)||"\t"===C.charAt(e);)e--;if("\n"===C.charAt(e)||""===C.charAt(e)){for(;""!=I&&"\n"!=I;)o();t=!0}}if("/"===I&&"/"===s()){for(;""!=I&&"\n"!=I;)o();t=!0}if("/"===I&&"*"===s()){for(;""!=I;){if("*"===I&&"/"===s()){o(),o();break}o()}t=!0}for(;" "===I||"\t"===I||"\n"===I||"\r"===I;)o()}while(t);if(""!==I){var i=I+s();if(O[i])return N=M.DELIMITER,P=i,o(),void o();if(O[I])return N=M.DELIMITER,P=I,void o();if(r(I)||"-"===I){for(P+=I,o();r(I);)P+=I,o();return"false"===P?P=!1:"true"===P?P=!0:isNaN(Number(P))||(P=Number(P)),void(N=M.IDENTIFIER)}if('"'===I){for(o();""!=I&&('"'!=I||'"'===I&&'"'===s());)'"'===I?(P+=I,o()):"\\"===I&&"n"===s()?(P+="\n",o()):P+=I,o();if('"'!=I)throw y('End of string " expected');return o(),void(N=M.IDENTIFIER)}for(N=M.UNKNOWN;""!=I;)P+=I,o();throw new SyntaxError('Syntax error in part "'+b(P,30)+'"')}N=M.DELIMITER}function p(t){for(;""!==P&&"}"!=P;)f(t),";"===P&&c()}function f(t){var e=m(t);if(e)v(t,e);else if(!function(t){return"node"===P?(c(),t.node=g(),"node"):"edge"===P?(c(),t.edge=g(),"edge"):"graph"===P?(c(),t.graph=g(),"graph"):null}(t)){if(N!=M.IDENTIFIER)throw y("Identifier expected");var i=P;if(c(),"="===P){if(c(),N!=M.IDENTIFIER)throw y("Identifier expected");t[i]=P,c()}else!function(t,e){var i={id:e},n=g();n&&(i.attr=n),d(t,i),v(t,e)}(t,i)}}function m(t){var e=null;if("subgraph"===P&&((e={}).type="subgraph",c(),N===M.IDENTIFIER&&(e.id=P,c())),"{"===P){if(c(),(e=e||{}).parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,p(e),"}"!=P)throw y("Angle bracket } expected");c(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function v(t,e){for(;"->"===P||"--"===P;){var i,n=P;c();var o=m(t);if(o)i=o;else{if(N!=M.IDENTIFIER)throw y("Identifier or subgraph expected");d(t,{id:i=P}),c()}l(t,u(t,e,i,n,g())),e=i}}function g(){for(var t=null,e={dashed:!0,solid:!1,dotted:[1,5]};"["===P;){for(c(),t={};""!==P&&"]"!=P;){if(N!=M.IDENTIFIER)throw y("Attribute name expected");var i=P;if(c(),"="!=P)throw y("Equal sign = expected");if(c(),N!=M.IDENTIFIER)throw y("Attribute value expected");var n=P;"style"===i&&(n=e[n]),a(t,i,n),c(),","==P&&c()}if("]"!=P)throw y("Bracket ] expected");c()}return t}function y(t){return new SyntaxError(t+', got "'+b(P,30)+'" (char '+T+")")}function b(t,e){return t.length<=e?t:t.substr(0,27)+"..."}function _(t,e,i){for(var n=e.split("."),o=n.pop(),s=t,r=0;r<n.length;r++){var a=n[r];a in s||(s[a]={}),s=s[a]}return s[o]=i,t}function w(e,t){var i={};for(var n in e)if(e.hasOwnProperty(n)){var o=t[n];Array.isArray(o)?o.forEach(function(t){_(i,t,e[n])}):_(i,"string"==typeof o?o:n,e[n])}return i}var x,k=i(29),S=(x=k)&&x.__esModule?x:{default:x},D={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},E=(0,S.default)(D);E.color="color.color",E.style="dashes";var M={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},O={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},C="",T=0,I="",P="",N=M.NULL,R=/[a-zA-Z_0-9.:#]/;e.parseDOT=n,e.DOTToGraph=function(t){var e=n(t),s={nodes:[],edges:[],options:{}};if(e.nodes&&e.nodes.forEach(function(t){var e={id:t.id,label:String(t.label||t.id)};h(e,w(t.attr,D)),e.image&&(e.shape="image"),s.nodes.push(e)}),e.edges){function r(t){var e={from:t.from,to:t.to};return h(e,w(t.attr,E)),e.arrows="->"===t.type?"to":void 0,e}e.edges.forEach(function(o){var t,e;t=o.from instanceof Object?o.from.nodes:{id:o.from},e=o.to instanceof Object?o.to.nodes:{id:o.to},o.from instanceof Object&&o.from.edges&&o.from.edges.forEach(function(t){var e=r(t);s.edges.push(e)}),function(e,t,i){Array.isArray(e)?e.forEach(function(e){Array.isArray(t)?t.forEach(function(t){i(e,t)}):i(e,t)}):Array.isArray(t)?t.forEach(function(t){i(e,t)}):i(e,t)}(t,e,function(t,e){var i=u(s,t.id,e.id,o.type,o.attr),n=r(i);s.edges.push(n)}),o.to instanceof Object&&o.to.edges&&o.to.edges.forEach(function(t){var e=r(t);s.edges.push(e)})})}return e.attr&&(s.options=e.attr),s}},function(t,e,i){e.parseGephi=function(t,e){var i=[],n=[],o={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==e&&(void 0!==e.fixed&&(o.nodes.fixed=e.fixed),void 0!==e.parseColor&&(o.nodes.parseColor=e.parseColor),void 0!==e.inheritColor&&(o.edges.inheritColor=e.inheritColor));for(var s=t.edges,r=t.nodes,a=0;a<s.length;a++){var h={},d=s[a];h.id=d.id,h.from=d.source,h.to=d.target,h.attributes=d.attributes,h.label=d.label,h.title=void 0!==d.attributes?d.attributes.title:void 0,"Directed"===d.type&&(h.arrows="to"),d.color&&!1===o.inheritColor&&(h.color=d.color),i.push(h)}for(var l=0;l<r.length;l++){var u={},c=r[l];u.id=c.id,u.attributes=c.attributes,u.x=c.x,u.y=c.y,u.label=c.label,u.title=void 0!==c.attributes?c.attributes.title:c.title,!0===o.nodes.parseColor?u.color=c.color:u.color=void 0!==c.color?{background:c.color,border:c.color,highlight:{background:c.color,border:c.color},hover:{background:c.color,border:c.color}}:void 0,u.size=c.size,u.fixed=o.nodes.fixed&&void 0!==c.x&&void 0!==c.y,n.push(u)}return{nodes:n,edges:i}}},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=n(i(1)),r=n(i(185)),a=((0,s.default)(h,[{key:"_tryloadBrokenUrl",value:function(t,e,i){if(void 0!==t&&void 0!==i){if(void 0===e)return void console.warn("No broken url image defined");i.onerror=function(){console.error("Could not load brokenImage:",e)},i.image.src=e}}},{key:"_redrawWithImage",value:function(t){this.callback&&this.callback(t)}},{key:"load",value:function(t,e){var i=this,n=this.images[t];if(n)return n;var o=new r.default;return(this.images[t]=o).image.onload=function(){i._fixImageCoordinates(o.image),o.init(),i._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",t),i._tryloadBrokenUrl(t,e,o)},o.image.src=t,o}},{key:"_fixImageCoordinates",value:function(t){0===t.width&&(document.body.appendChild(t),t.width=t.offsetWidth,t.height=t.offsetHeight,document.body.removeChild(t))}}]),h);function h(t){(0,o.default)(this,h),this.images={},this.imageBroken={},this.callback=t}e.default=a},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var v=n(i(30)),h=n(i(6)),o=n(i(0)),s=n(i(1)),d=i(2),r=i(48).default,a=i(191).default,l=["bold","ital","boldital","mono"],u=((0,s.default)(c,[{key:"setOptions",value:function(t){if(this.elementOptions=t,this.initFontOptions(t.font),r.isValidLabel(t.label)?this.labelDirty=!0:t.label="",void 0!==t.font&&null!==t.font)if("string"==typeof t.font)this.baseSize=this.fontOptions.size;else if("object"===(0,h.default)(t.font)){var e=t.font.size;void 0!==e&&(this.baseSize=e)}}},{key:"initFontOptions",value:function(t){var i=this;d.forEach(l,function(t){i.fontOptions[t]={}}),c.parseFontString(this.fontOptions,t)?this.fontOptions.vadjust=0:d.forEach(t,function(t,e){null!=t&&"object"!==(void 0===t?"undefined":(0,h.default)(t))&&(i.fontOptions[e]=t)})}},{key:"constrain",value:function(t){var e={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=d.topMost(t,"widthConstraint");if("number"==typeof i)e.maxWdt=Number(i),e.minWdt=Number(i);else if("object"===(void 0===i?"undefined":(0,h.default)(i))){var n=d.topMost(t,["widthConstraint","maximum"]);"number"==typeof n&&(e.maxWdt=Number(n));var o=d.topMost(t,["widthConstraint","minimum"]);"number"==typeof o&&(e.minWdt=Number(o))}var s=d.topMost(t,"heightConstraint");if("number"==typeof s)e.minHgt=Number(s);else if("object"===(void 0===s?"undefined":(0,h.default)(s))){var r=d.topMost(t,["heightConstraint","minimum"]);"number"==typeof r&&(e.minHgt=Number(r));var a=d.topMost(t,["heightConstraint","valign"]);"string"==typeof a&&("top"!==a&&"bottom"!==a||(e.valign=a))}return e}},{key:"update",value:function(t,e){this.setOptions(t,!0),this.propagateFonts(e),d.deepExtend(this.fontOptions,this.constrain(e)),this.fontOptions.chooser=r.choosify("label",e)}},{key:"adjustSizes",value:function(t){var e=t?t.right+t.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=e,this.fontOptions.minWdt-=e);var i=t?t.top+t.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}},{key:"addFontOptionsToPile",value:function(t,e){for(var i=0;i<e.length;++i)this.addFontToPile(t,e[i])}},{key:"addFontToPile",value:function(t,e){if(void 0!==e&&void 0!==e.font&&null!==e.font){var i=e.font;t.push(i)}}},{key:"getBasicOptions",value:function(t){for(var i={},e=0;e<t.length;++e){var n=t[e],o={};c.parseFontString(o,n)&&(n=o),d.forEach(n,function(t,e){void 0!==t&&(i.hasOwnProperty(e)||(-1!==l.indexOf(e)?i[e]={}:i[e]=t))})}return i}},{key:"getFontOption",value:function(t,e,i){for(var n=void 0,o=0;o<t.length;++o){var s=t[o];if(s.hasOwnProperty(e)){if(void 0===(n=s[e])||null===n)continue;var r={};if(c.parseFontString(r,n)&&(n=r),n.hasOwnProperty(i))return n[i]}}if(this.fontOptions.hasOwnProperty(i))return this.fontOptions[i];throw new Error("Did not find value for multi-font for property: '"+i+"'")}},{key:"getFontOptions",value:function(t,e){for(var i={},n=["color","size","face","mod","vadjust"],o=0;o<n.length;++o){var s=n[o];i[s]=this.getFontOption(t,e,s)}return i}},{key:"propagateFonts",value:function(t){var n=this,o=[];this.addFontOptionsToPile(o,t),this.fontOptions=this.getBasicOptions(o);for(var s=0;s<l.length;++s)!function(){var t=l[s],i=n.fontOptions[t],e=n.getFontOptions(o,t);d.forEach(e,function(t,e){i[e]=t}),i.size=Number(i.size),i.vadjust=Number(i.vadjust)}()}},{key:"draw",value:function(t,e,i,n,o){var s=5<arguments.length&&void 0!==arguments[5]?arguments[5]:"middle";if(void 0!==this.elementOptions.label){var r=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&r<this.elementOptions.scaling.label.drawThreshold-1||(r>=this.elementOptions.scaling.label.maxVisible&&(r=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(t,n,o,e,i,s),this._drawBackground(t),this._drawText(t,e,this.size.yLine,s,r))}}},{key:"_drawBackground",value:function(t){if(void 0!==this.fontOptions.background&&"none"!==this.fontOptions.background){t.fillStyle=this.fontOptions.background;var e=this.getSize();t.fillRect(e.left,e.top,e.width,e.height)}}},{key:"_drawText",value:function(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"middle",o=arguments[4],s=this._setAlignment(t,e,i,n),r=(0,v.default)(s,2);e=r[0],i=r[1],t.textAlign="left",e-=this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&("top"===this.fontOptions.valign&&(i-=(this.size.height-this.size.labelHeight)/2),"bottom"===this.fontOptions.valign&&(i+=(this.size.height-this.size.labelHeight)/2));for(var a=0;a<this.lineCount;a++){var h=this.lines[a];if(h&&h.blocks){var d=0;this.isEdgeLabel||"center"===this.fontOptions.align?d+=(this.size.width-h.width)/2:"right"===this.fontOptions.align&&(d+=this.size.width-h.width);for(var l=0;l<h.blocks.length;l++){var u=h.blocks[l];t.font=u.font;var c=this._getColor(u.color,o,u.strokeColor),p=(0,v.default)(c,2),f=p[0],m=p[1];0<u.strokeWidth&&(t.lineWidth=u.strokeWidth,t.strokeStyle=m,t.lineJoin="round"),t.fillStyle=f,0<u.strokeWidth&&t.strokeText(u.text,e+d,i+u.vadjust),t.fillText(u.text,e+d,i+u.vadjust),d+=u.width}i+=h.height}}}},{key:"_setAlignment",value:function(t,e,i,n){return this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&!1===this.pointToSelf?(i=e=0,"top"===this.fontOptions.align?(t.textBaseline="alphabetic",i-=4):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",i+=4):t.textBaseline="middle"):t.textBaseline=n,[e,i]}},{key:"_getColor",value:function(t,e,i){var n=t||"#000000",o=i||"#ffffff";if(e<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-e)));n=d.overrideOpacity(n,s),o=d.overrideOpacity(o,s)}return[n,o]}},{key:"getTextSize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return this._processLabel(t,e,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var t=this.size.left,e=this.size.top-1;if(this.isEdgeLabel){var i=.5*-this.size.width;switch(this.fontOptions.align){case"middle":t=i,e=.5*-this.size.height;break;case"top":t=i,e=-(this.size.height+2);break;case"bottom":t=i,e=2}}return{left:t,top:e,width:this.size.width,height:this.size.height}}},{key:"calculateLabelSize",value:function(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,s=5<arguments.length&&void 0!==arguments[5]?arguments[5]:"middle";this._processLabel(t,e,i),this.size.left=n-.5*this.size.width,this.size.top=o-.5*this.size.height,this.size.yLine=o+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===s&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(t,e,i,n){function o(t,e,i){return"normal"===e?"mod"===i?"":t[i]:void 0!==t[e][i]?t[e][i]:t[i]}var s={color:o(this.fontOptions,n,"color"),size:o(this.fontOptions,n,"size"),face:o(this.fontOptions,n,"face"),mod:o(this.fontOptions,n,"mod"),vadjust:o(this.fontOptions,n,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(e||i)&&("normal"===n&&!0===this.fontOptions.chooser&&this.elementOptions.labelHighlightBold?s.mod="bold":"function"==typeof this.fontOptions.chooser&&this.fontOptions.chooser(s,this.elementOptions.id,e,i));var r="";return void 0!==s.mod&&""!==s.mod&&(r+=s.mod+" "),r+=s.size+"px "+s.face,t.font=r.replace(/"/g,""),s.font=t.font,s.height=s.size,s}},{key:"differentState",value:function(t,e){return t!==this.selectedState||e!==this.hoverState}},{key:"_processLabelText",value:function(t,e,i,n){return new a(t,this,e,i).process(n)}},{key:"_processLabel",value:function(t,e,i){if(!1!==this.labelDirty||this.differentState(e,i)){var n=this._processLabelText(t,e,i,this.elementOptions.label);0<this.fontOptions.minWdt&&n.width<this.fontOptions.minWdt&&(n.width=this.fontOptions.minWdt),this.size.labelHeight=n.height,0<this.fontOptions.minHgt&&n.height<this.fontOptions.minHgt&&(n.height=this.fontOptions.minHgt),this.lines=n.lines,this.lineCount=n.lines.length,this.size.width=n.width,this.size.height=n.height,this.selectedState=e,this.hoverState=i,this.labelDirty=!1}}},{key:"visible",value:function(){return 0!==this.size.width&&0!==this.size.height&&void 0!==this.elementOptions.label&&!(this.fontOptions.size*this.body.view.scale<this.elementOptions.scaling.label.drawThreshold-1)}}],[{key:"parseFontString",value:function(t,e){if(!e||"string"!=typeof e)return!1;var i=e.split(" ");return t.size=i[0].replace("px",""),t.face=i[1],t.color=i[2],!0}}]),c);function c(t,e){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2];(0,o.default)(this,c),this.body=t,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(e),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=i}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var w=n(i(30)),o=n(i(0)),s=n(i(1)),a=i(2),r=i(119).default,h=((0,s.default)(d,[{key:"connect",value:function(){this.from=this.body.nodes[this.options.from],this.to=this.body.nodes[this.options.to]}},{key:"cleanup",value:function(){return!1}},{key:"setOptions",value:function(t){this.options=t,this.from=this.body.nodes[this.options.from],this.to=this.body.nodes[this.options.to],this.id=this.options.id}},{key:"drawLine",value:function(t,e,i,n,o){t.strokeStyle=this.getColor(t,e,i,n),t.lineWidth=e.width,!1!==e.dashes?this._drawDashedLine(t,e,o):this._drawLine(t,e,o)}},{key:"_drawLine",value:function(t,e,i,n,o){if(this.from!=this.to)this._line(t,e,i,n,o);else{var s=this._getCircleData(t),r=(0,w.default)(s,3),a=r[0],h=r[1],d=r[2];this._circle(t,e,a,h,d)}}},{key:"_drawDashedLine",value:function(t,e,i,n,o){t.lineCap="round";var s=[5,5];if(!0===Array.isArray(e.dashes)&&(s=e.dashes),void 0!==t.setLineDash){if(t.save(),t.setLineDash(s),t.lineDashOffset=0,this.from!=this.to)this._line(t,e,i);else{var r=this._getCircleData(t),a=(0,w.default)(r,3),h=a[0],d=a[1],l=a[2];this._circle(t,e,h,d,l)}t.setLineDash([0]),t.lineDashOffset=0,t.restore()}else{if(this.from!=this.to)t.dashedLine(this.from.x,this.from.y,this.to.x,this.to.y,s);else{var u=this._getCircleData(t),c=(0,w.default)(u,3),p=c[0],f=c[1],m=c[2];this._circle(t,e,p,f,m)}this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}}},{key:"findBorderPosition",value:function(t,e,i){return this.from!=this.to?this._findBorderPosition(t,e,i):this._findBorderPositionCircle(t,e,i)}},{key:"findBorderPositions",value:function(t){var e={},i={};if(this.from!=this.to)e=this._findBorderPosition(this.from,t),i=this._findBorderPosition(this.to,t);else{var n=this._getCircleData(t).slice(0,2),o=(0,w.default)(n,2),s=o[0],r=o[1];e=this._findBorderPositionCircle(this.from,t,{x:s,y:r,low:.25,high:.6,direction:-1}),i=this._findBorderPositionCircle(this.from,t,{x:s,y:r,low:.6,high:.8,direction:1})}return{from:e,to:i}}},{key:"_getCircleData",value:function(t){var e=void 0,i=void 0,n=this.from,o=this.options.selfReferenceSize;return void 0!==t&&void 0===n.shape.width&&n.shape.resize(t),i=n.shape.width>n.shape.height?(e=n.x+.5*n.shape.width,n.y-o):(e=n.x+o,n.y-.5*n.shape.height),[e,i,o]}},{key:"_pointOnCircle",value:function(t,e,i,n){var o=2*n*Math.PI;return{x:t+i*Math.cos(o),y:e-i*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(t,e,i){for(var n=i.x,o=i.y,s=i.low,r=i.high,a=i.direction,h=0,d=this.options.selfReferenceSize,l=void 0,u=void 0,c=void 0,p=.5*(s+r);s<=r&&h<10&&(p=.5*(s+r),l=this._pointOnCircle(n,o,d,p),u=Math.atan2(t.y-l.y,t.x-l.x),c=t.distanceToBorder(e,u)-Math.sqrt(Math.pow(l.x-t.x,2)+Math.pow(l.y-t.y,2)),!(Math.abs(c)<.05));)0<c?0<a?s=p:r=p:0<a?r=p:s=p,h++;return l.t=p,l}},{key:"getLineWidth",value:function(t,e){return!0===t?Math.max(this.selectionWidth,.3/this.body.view.scale):!0===e?Math.max(this.hoverWidth,.3/this.body.view.scale):Math.max(this.options.width,.3/this.body.view.scale)}},{key:"getColor",value:function(t,e,i,n){if(!1===e.inheritsColor)return a.overrideOpacity(e.color,e.opacity);if("both"!==e.inheritsColor||this.from.id===this.to.id)return"to"===e.inheritsColor?a.overrideOpacity(this.to.options.color.border,e.opacity):a.overrideOpacity(this.from.options.color.border,e.opacity);var o=t.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),s=void 0,r=void 0;return s=this.from.options.color.highlight.border,r=this.to.options.color.highlight.border,!1===this.from.selected&&!1===this.to.selected?(s=a.overrideOpacity(this.from.options.color.border,e.opacity),r=a.overrideOpacity(this.to.options.color.border,e.opacity)):!0===this.from.selected&&!1===this.to.selected?r=this.to.options.color.border:!1===this.from.selected&&!0===this.to.selected&&(s=this.from.options.color.border),o.addColorStop(0,s),o.addColorStop(1,r),o}},{key:"_circle",value:function(t,e,i,n,o){this.enableShadow(t,e),t.beginPath(),t.arc(i,n,o,0,2*Math.PI,!1),t.stroke(),this.disableShadow(t,e)}},{key:"getDistanceToEdge",value:function(t,e,i,n,o,s,r,a){var h=0;if(this.from!=this.to)h=this._getDistanceToEdge(t,e,i,n,o,s,r);else{var d=this._getCircleData(void 0),l=(0,w.default)(d,3),u=l[0],c=l[1],p=l[2],f=u-o,m=c-s;h=Math.abs(Math.sqrt(f*f+m*m)-p)}return h}},{key:"_getDistanceToLine",value:function(t,e,i,n,o,s){var r=i-t,a=n-e,h=((o-t)*r+(s-e)*a)/(r*r+a*a);1<h?h=1:h<0&&(h=0);var d=t+h*r-o,l=e+h*a-s;return Math.sqrt(d*d+l*l)}},{key:"getArrowData",value:function(t,e,i,n,o,s){var r=void 0,a=void 0,h=void 0,d=void 0,l=void 0,u=void 0,c=void 0,p=s.width;if(c="from"===e?(h=this.from,d=this.to,l=.1,u=s.fromArrowScale,s.fromArrowType):"to"===e?(h=this.to,d=this.from,l=-.1,u=s.toArrowScale,s.toArrowType):(h=this.to,d=this.from,u=s.middleArrowScale,s.middleArrowType),h!=d)if("middle"!==e)if(!0===this.options.smooth.enabled){a=this.findBorderPosition(h,t,{via:i});var f=this.getPoint(Math.max(0,Math.min(1,a.t+l)),i);r=Math.atan2(a.y-f.y,a.x-f.x)}else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.findBorderPosition(h,t);else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.getPoint(.5,i);else{var m=this._getCircleData(t),v=(0,w.default)(m,3),g=v[0],y=v[1],b=v[2];r="from"===e?-2*(a=this.findBorderPosition(this.from,t,{x:g,y:y,low:.25,high:.6,direction:-1})).t*Math.PI+1.5*Math.PI+.1*Math.PI:"to"===e?-2*(a=this.findBorderPosition(this.from,t,{x:g,y:y,low:.6,high:1,direction:1})).t*Math.PI+1.5*Math.PI-1.1*Math.PI:(a=this._pointOnCircle(g,y,b,.175),3.9269908169872414)}"middle"===e&&u<0&&(p*=-1);var _=15*u+3*p;return{point:a,core:{x:a.x-.9*_*Math.cos(r),y:a.y-.9*_*Math.sin(r)},angle:r,length:_,type:c}}},{key:"drawArrowHead",value:function(t,e,i,n,o){t.strokeStyle=this.getColor(t,e,i,n),t.fillStyle=t.strokeStyle,t.lineWidth=e.width,r.draw(t,o),this.enableShadow(t,e),t.fill(),this.disableShadow(t,e)}},{key:"enableShadow",value:function(t,e){!0===e.shadow&&(t.shadowColor=e.shadowColor,t.shadowBlur=e.shadowSize,t.shadowOffsetX=e.shadowX,t.shadowOffsetY=e.shadowY)}},{key:"disableShadow",value:function(t,e){!0===e.shadow&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}}]),d);function d(t,e,i){(0,o.default)(this,d),this.body=e,this.labelModule=i,this.options={},this.setOptions(t),this.colorDirty=!0,this.color={},this.selectionWidth=2,this.hoverWidth=1.5,this.fromPoint=this.from,this.toPoint=this.to}e.default=h},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(4)),a=n(i(5)),h=n(i(0)),d=n(i(1)),l=((0,d.default)(b,null,[{key:"transform",value:function(t,e){t instanceof Array||(t=[t]);for(var i=e.point.x,n=e.point.y,o=e.angle,s=e.length,r=0;r<t.length;++r){var a=t[r],h=a.x*Math.cos(o)-a.y*Math.sin(o),d=a.x*Math.sin(o)+a.y*Math.cos(o);a.x=i+s*h,a.y=n+s*d}}},{key:"drawPath",value:function(t,e){t.beginPath(),t.moveTo(e[0].x,e[0].y);for(var i=1;i<e.length;++i)t.lineTo(e[i].x,e[i].y);t.closePath()}}]),b),u=(o=l,(0,a.default)(y,o),(0,d.default)(y,null,[{key:"draw",value:function(t,e){var i=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];l.transform(i,e),l.drawPath(t,i)}}]),y),c=((0,d.default)(g,null,[{key:"draw",value:function(t,e){var i={x:-.4,y:0};l.transform(i,e),t.circle(i.x,i.y,.4*e.length)}}]),g),p=((0,d.default)(v,null,[{key:"draw",value:function(t,e){var i=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];l.transform(i,e),l.drawPath(t,i)}}]),v),f=((0,d.default)(m,null,[{key:"draw",value:function(t,e){var i;switch(e.type&&(i=e.type.toLowerCase()),i){case"circle":c.draw(t,e);break;case"bar":p.draw(t,e);break;case"arrow":default:u.draw(t,e)}}}]),m);function m(){(0,h.default)(this,m)}function v(){(0,h.default)(this,v)}function g(){(0,h.default)(this,g)}function y(){return(0,h.default)(this,y),(0,r.default)(this,(y.__proto__||(0,s.default)(y)).apply(this,arguments))}function b(){(0,h.default)(this,b)}e.default=f},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=((0,n(i(1)).default)(r,[{key:"setOptions",value:function(t){this.options=t,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"seededRandom",value:function(){var t=1e4*Math.sin(this.randomSeed++);return t-Math.floor(t)}},{key:"solve",value:function(){if(0!==this.options.gravitationalConstant&&0<this.physicsBody.physicsNodeIndices.length){var t=void 0,e=this.body.nodes,i=this.physicsBody.physicsNodeIndices,n=i.length,o=this._formBarnesHutTree(e,i);this.barnesHutTree=o;for(var s=0;s<n;s++)0<(t=e[i[s]]).options.mass&&this._getForceContributions(o.root,t)}}},{key:"_getForceContributions",value:function(t,e){this._getForceContribution(t.children.NW,e),this._getForceContribution(t.children.NE,e),this._getForceContribution(t.children.SW,e),this._getForceContribution(t.children.SE,e)}},{key:"_getForceContribution",value:function(t,e){var i,n,o;0<t.childrenCount&&(i=t.centerOfMass.x-e.x,n=t.centerOfMass.y-e.y,(o=Math.sqrt(i*i+n*n))*t.calcSize>this.thetaInversed?this._calculateForces(o,i,n,e,t):4===t.childrenCount?this._getForceContributions(t,e):t.children.data.id!=e.id&&this._calculateForces(o,i,n,e,t))}},{key:"_calculateForces",value:function(t,e,i,n,o){0===t&&(e=t=.1),this.overlapAvoidanceFactor<1&&n.shape.radius&&(t=Math.max(.1+this.overlapAvoidanceFactor*n.shape.radius,t-n.shape.radius));var s=this.options.gravitationalConstant*o.mass*n.options.mass/Math.pow(t,3),r=e*s,a=i*s;this.physicsBody.forces[n.id].x+=r,this.physicsBody.forces[n.id].y+=a}},{key:"_formBarnesHutTree",value:function(t,e){for(var i=void 0,n=e.length,o=t[e[0]].x,s=t[e[0]].y,r=t[e[0]].x,a=t[e[0]].y,h=1;h<n;h++){var d=t[e[h]],l=d.x,u=d.y;0<d.options.mass&&(l<o&&(o=l),r<l&&(r=l),u<s&&(s=u),a<u&&(a=u))}var c=Math.abs(r-o)-Math.abs(a-s);0<c?(s-=.5*c,a+=.5*c):(o+=.5*c,r-=.5*c);var p=Math.max(1e-5,Math.abs(r-o)),f=.5*p,m=.5*(o+r),v=.5*(s+a),g={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:m-f,maxX:m+f,minY:v-f,maxY:v+f},size:p,calcSize:1/p,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(g.root);for(var y=0;y<n;y++)0<(i=t[e[y]]).options.mass&&this._placeInTree(g.root,i);return g}},{key:"_updateBranchMass",value:function(t,e){var i=t.centerOfMass,n=t.mass+e.options.mass,o=1/n;i.x=i.x*t.mass+e.x*e.options.mass,i.x*=o,i.y=i.y*t.mass+e.y*e.options.mass,i.y*=o,t.mass=n;var s=Math.max(Math.max(e.height,e.radius),e.width);t.maxWidth=t.maxWidth<s?s:t.maxWidth}},{key:"_placeInTree",value:function(t,e,i){1==i&&void 0!==i||this._updateBranchMass(t,e);var n,o=t.children.NW.range;n=o.maxX>e.x?o.maxY>e.y?"NW":"SW":o.maxY>e.y?"NE":"SE",this._placeInRegion(t,e,n)}},{key:"_placeInRegion",value:function(t,e,i){var n=t.children[i];switch(n.childrenCount){case 0:n.children.data=e,n.childrenCount=1,this._updateBranchMass(n,e);break;case 1:n.children.data.x===e.x&&n.children.data.y===e.y?(e.x+=this.seededRandom(),e.y+=this.seededRandom()):(this._splitBranch(n),this._placeInTree(n,e));break;case 4:this._placeInTree(n,e)}}},{key:"_splitBranch",value:function(t){var e=null;1===t.childrenCount&&(e=t.children.data,t.mass=0,t.centerOfMass.x=0,t.centerOfMass.y=0),t.childrenCount=4,t.children.data=null,this._insertRegion(t,"NW"),this._insertRegion(t,"NE"),this._insertRegion(t,"SW"),this._insertRegion(t,"SE"),null!=e&&this._placeInTree(t,e)}},{key:"_insertRegion",value:function(t,e){var i=void 0,n=void 0,o=void 0,s=void 0,r=.5*t.size;switch(e){case"NW":i=t.range.minX,n=t.range.minX+r,o=t.range.minY,s=t.range.minY+r;break;case"NE":i=t.range.minX+r,n=t.range.maxX,o=t.range.minY,s=t.range.minY+r;break;case"SW":i=t.range.minX,n=t.range.minX+r,o=t.range.minY+r,s=t.range.maxY;break;case"SE":i=t.range.minX+r,n=t.range.maxX,o=t.range.minY+r,s=t.range.maxY}t.children[e]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:n,minY:o,maxY:s},size:.5*t.size,calcSize:2*t.calcSize,children:{data:null},maxWidth:0,level:t.level+1,childrenCount:0}}},{key:"_debug",value:function(t,e){void 0!==this.barnesHutTree&&(t.lineWidth=1,this._drawBranch(this.barnesHutTree.root,t,e))}},{key:"_drawBranch",value:function(t,e,i){void 0===i&&(i="#FF0000"),4===t.childrenCount&&(this._drawBranch(t.children.NW,e),this._drawBranch(t.children.NE,e),this._drawBranch(t.children.SE,e),this._drawBranch(t.children.SW,e)),e.strokeStyle=i,e.beginPath(),e.moveTo(t.range.minX,t.range.minY),e.lineTo(t.range.maxX,t.range.minY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.minY),e.lineTo(t.range.maxX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.maxY),e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),r);function r(t,e,i){(0,o.default)(this,r),this.body=t,this.physicsBody=e,this.barnesHutTree,this.setOptions(i),this.randomSeed=5}e.default=s},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=((0,n(i(1)).default)(r,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t=void 0,e=void 0,i=void 0,n=void 0,o=this.body.nodes,s=this.physicsBody.physicsNodeIndices,r=this.physicsBody.forces,a=0;a<s.length;a++)t=-(n=o[s[a]]).x,e=-n.y,i=Math.sqrt(t*t+e*e),this._calculateForces(i,t,e,r,n)}},{key:"_calculateForces",value:function(t,e,i,n,o){var s=0===t?0:this.options.centralGravity/t;n[o.id].x=e*s,n[o.id].y=i*s}}]),r);function r(t,e,i){(0,o.default)(this,r),this.body=t,this.physicsBody=e,this.setOptions(i)}e.default=s},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var n="string",o="boolean",s="number",r="object",a=["arrow","circle","bar"],h={configure:{enabled:{boolean:o},filter:{boolean:o,string:n,array:"array",function:"function"},container:{dom:"dom"},showButton:{boolean:o},__type__:{object:r,boolean:o,string:n,array:"array",function:"function"}},edges:{arrows:{to:{enabled:{boolean:o},scaleFactor:{number:s},type:{string:a},__type__:{object:r,boolean:o}},middle:{enabled:{boolean:o},scaleFactor:{number:s},type:{string:a},__type__:{object:r,boolean:o}},from:{enabled:{boolean:o},scaleFactor:{number:s},type:{string:a},__type__:{object:r,boolean:o}},__type__:{string:["from","to","middle"],object:r}},arrowStrikethrough:{boolean:o},chosen:{label:{boolean:o,function:"function"},edge:{boolean:o,function:"function"},__type__:{object:r,boolean:o}},color:{color:{string:n},highlight:{string:n},hover:{string:n},inherit:{string:["from","to","both"],boolean:o},opacity:{number:s},__type__:{object:r,string:n}},dashes:{boolean:o,array:"array"},font:{color:{string:n},size:{number:s},face:{string:n},background:{string:n},strokeWidth:{number:s},strokeColor:{string:n},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:s},multi:{boolean:o,string:n},bold:{color:{string:n},size:{number:s},face:{string:n},mod:{string:n},vadjust:{number:s},__type__:{object:r,string:n}},boldital:{color:{string:n},size:{number:s},face:{string:n},mod:{string:n},vadjust:{number:s},__type__:{object:r,string:n}},ital:{color:{string:n},size:{number:s},face:{string:n},mod:{string:n},vadjust:{number:s},__type__:{object:r,string:n}},mono:{color:{string:n},size:{number:s},face:{string:n},mod:{string:n},vadjust:{number:s},__type__:{object:r,string:n}},__type__:{object:r,string:n}},hidden:{boolean:o},hoverWidth:{function:"function",number:s},label:{string:n,undefined:"undefined"},labelHighlightBold:{boolean:o},length:{number:s,undefined:"undefined"},physics:{boolean:o},scaling:{min:{number:s},max:{number:s},label:{enabled:{boolean:o},min:{number:s},max:{number:s},maxVisible:{number:s},drawThreshold:{number:s},__type__:{object:r,boolean:o}},customScalingFunction:{function:"function"},__type__:{object:r}},selectionWidth:{function:"function",number:s},selfReferenceSize:{number:s},shadow:{enabled:{boolean:o},color:{string:n},size:{number:s},x:{number:s},y:{number:s},__type__:{object:r,boolean:o}},smooth:{enabled:{boolean:o},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:s},forceDirection:{string:["horizontal","vertical","none"],boolean:o},__type__:{object:r,boolean:o}},title:{string:n,undefined:"undefined"},width:{number:s},widthConstraint:{maximum:{number:s},__type__:{object:r,boolean:o,number:s}},value:{number:s,undefined:"undefined"},__type__:{object:r}},groups:{useDefaultGroups:{boolean:o},__any__:"get from nodes, will be overwritten below",__type__:{object:r}},interaction:{dragNodes:{boolean:o},dragView:{boolean:o},hideEdgesOnDrag:{boolean:o},hideNodesOnDrag:{boolean:o},hover:{boolean:o},keyboard:{enabled:{boolean:o},speed:{x:{number:s},y:{number:s},zoom:{number:s},__type__:{object:r}},bindToWindow:{boolean:o},__type__:{object:r,boolean:o}},multiselect:{boolean:o},navigationButtons:{boolean:o},selectable:{boolean:o},selectConnectedEdges:{boolean:o},hoverConnectedEdges:{boolean:o},tooltipDelay:{number:s},zoomView:{boolean:o},__type__:{object:r}},layout:{randomSeed:{undefined:"undefined",number:s},improvedLayout:{boolean:o},hierarchical:{enabled:{boolean:o},levelSeparation:{number:s},nodeSpacing:{number:s},treeSpacing:{number:s},blockShifting:{boolean:o},edgeMinimization:{boolean:o},parentCentralization:{boolean:o},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},__type__:{object:r,boolean:o}},__type__:{object:r}},manipulation:{enabled:{boolean:o},initiallyActive:{boolean:o},addNode:{boolean:o,function:"function"},addEdge:{boolean:o,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:r,boolean:o,function:"function"}},deleteNode:{boolean:o,function:"function"},deleteEdge:{boolean:o,function:"function"},controlNodeStyle:"get from nodes, will be overwritten below",__type__:{object:r,boolean:o}},nodes:{borderWidth:{number:s},borderWidthSelected:{number:s,undefined:"undefined"},brokenImage:{string:n,undefined:"undefined"},chosen:{label:{boolean:o,function:"function"},node:{boolean:o,function:"function"},__type__:{object:r,boolean:o}},color:{border:{string:n},background:{string:n},highlight:{border:{string:n},background:{string:n},__type__:{object:r,string:n}},hover:{border:{string:n},background:{string:n},__type__:{object:r,string:n}},__type__:{object:r,string:n}},fixed:{x:{boolean:o},y:{boolean:o},__type__:{object:r,boolean:o}},font:{align:{string:n},color:{string:n},size:{number:s},face:{string:n},background:{string:n},strokeWidth:{number:s},strokeColor:{string:n},vadjust:{number:s},multi:{boolean:o,string:n},bold:{color:{string:n},size:{number:s},face:{string:n},mod:{string:n},vadjust:{number:s},__type__:{object:r,string:n}},boldital:{color:{string:n},size:{number:s},face:{string:n},mod:{string:n},vadjust:{number:s},__type__:{object:r,string:n}},ital:{color:{string:n},size:{number:s},face:{string:n},mod:{string:n},vadjust:{number:s},__type__:{object:r,string:n}},mono:{color:{string:n},size:{number:s},face:{string:n},mod:{string:n},vadjust:{number:s},__type__:{object:r,string:n}},__type__:{object:r,string:n}},group:{string:n,number:s,undefined:"undefined"},heightConstraint:{minimum:{number:s},valign:{string:n},__type__:{object:r,boolean:o,number:s}},hidden:{boolean:o},icon:{face:{string:n},code:{string:n},size:{number:s},color:{string:n},__type__:{object:r}},id:{string:n,number:s},image:{selected:{string:n,undefined:"undefined"},unselected:{string:n,undefined:"undefined"},__type__:{object:r,string:n}},label:{string:n,undefined:"undefined"},labelHighlightBold:{boolean:o},level:{number:s,undefined:"undefined"},margin:{top:{number:s},right:{number:s},bottom:{number:s},left:{number:s},__type__:{object:r,number:s}},mass:{number:s},physics:{boolean:o},scaling:{min:{number:s},max:{number:s},label:{enabled:{boolean:o},min:{number:s},max:{number:s},maxVisible:{number:s},drawThreshold:{number:s},__type__:{object:r,boolean:o}},customScalingFunction:{function:"function"},__type__:{object:r}},shadow:{enabled:{boolean:o},color:{string:n},size:{number:s},x:{number:s},y:{number:s},__type__:{object:r,boolean:o}},shape:{string:["ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},shapeProperties:{borderDashes:{boolean:o,array:"array"},borderRadius:{number:s},interpolation:{boolean:o},useImageSize:{boolean:o},useBorderWithImage:{boolean:o},__type__:{object:r}},size:{number:s},title:{string:n,dom:"dom",undefined:"undefined"},value:{number:s,undefined:"undefined"},widthConstraint:{minimum:{number:s},maximum:{number:s},__type__:{object:r,boolean:o,number:s}},x:{number:s},y:{number:s},__type__:{object:r}},physics:{enabled:{boolean:o},barnesHut:{gravitationalConstant:{number:s},centralGravity:{number:s},springLength:{number:s},springConstant:{number:s},damping:{number:s},avoidOverlap:{number:s},__type__:{object:r}},forceAtlas2Based:{gravitationalConstant:{number:s},centralGravity:{number:s},springLength:{number:s},springConstant:{number:s},damping:{number:s},avoidOverlap:{number:s},__type__:{object:r}},repulsion:{centralGravity:{number:s},springLength:{number:s},springConstant:{number:s},nodeDistance:{number:s},damping:{number:s},__type__:{object:r}},hierarchicalRepulsion:{centralGravity:{number:s},springLength:{number:s},springConstant:{number:s},nodeDistance:{number:s},damping:{number:s},__type__:{object:r}},maxVelocity:{number:s},minVelocity:{number:s},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:o},iterations:{number:s},updateInterval:{number:s},onlyDynamicEdges:{boolean:o},fit:{boolean:o},__type__:{object:r,boolean:o}},timestep:{number:s},adaptiveTimestep:{boolean:o},__type__:{object:r,boolean:o}},autoResize:{boolean:o},clickToUse:{boolean:o},locale:{string:n},locales:{__any__:{any:"any"},__type__:{object:r}},height:{string:n},width:{string:n},__type__:{object:r}};h.groups.__any__=h.nodes,h.manipulation.controlNodeStyle=h.nodes;e.allOptions=h,e.configureOptions={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"]}},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"}},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],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"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!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},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{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:{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]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01]}}},function(t,e,i){var n=i(2);n.extend(e,i(159)),n.extend(e,i(177)),n.extend(e,i(181))},function(t,e,i){i(49),i(60),t.exports=i(136)},function(t,e,i){var n=i(126),o=i(127),s=i(31),r=i(25);t.exports=i(79)(Array,"Array",function(t,e){this._t=r(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,i=this._i++;return!t||i>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?i:"values"==e?t[i]:[i,t[i]])},"values"),s.Arguments=s.Array,n("keys"),n("values"),n("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,i){var n=i(54),o=i(39),s=i(59),r={};i(26)(r,i(13)("iterator"),function(){return this}),t.exports=function(t,e,i){t.prototype=n(r,{next:o(1,i)}),s(t,e+" Iterator")}},function(t,e,i){var r=i(20),a=i(27),h=i(33);t.exports=i(21)?Object.defineProperties:function(t,e){a(t);for(var i,n=h(e),o=n.length,s=0;s<o;)r.f(t,i=n[s++],e[i]);return t}},function(t,e,i){var h=i(25),d=i(132),l=i(133);t.exports=function(a){return function(t,e,i){var n,o=h(t),s=d(o.length),r=l(i,s);if(a&&e!=e){for(;r<s;)if((n=o[r++])!=n)return!0}else for(;r<s;r++)if((a||r in o)&&o[r]===e)return a||r||0;return!a&&-1}}},function(t,e,i){var n=i(55),o=Math.min;t.exports=function(t){return 0<t?o(n(t),9007199254740991):0}},function(t,e,i){var n=i(55),o=Math.max,s=Math.min;t.exports=function(t,e){return(t=n(t))<0?o(t+e,0):s(t,e)}},function(t,e,i){var n=i(18).document;t.exports=n&&n.documentElement},function(t,e,i){var h=i(55),d=i(51);t.exports=function(a){return function(t,e){var i,n,o=String(d(t)),s=h(e),r=o.length;return s<0||r<=s?a?"":void 0:(i=o.charCodeAt(s))<55296||56319<i||s+1===r||(n=o.charCodeAt(s+1))<56320||57343<n?a?o.charAt(s):i:a?o.slice(s,s+2):n-56320+(i-55296<<10)+65536}}},function(t,e,i){var n=i(27),o=i(137);t.exports=i(7).getIterator=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return n(e.call(t))}},function(t,e,i){var n=i(86),o=i(13)("iterator"),s=i(31);t.exports=i(7).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||s[n(t)]}},function(t,e,i){i(139);var n=i(7).Object;t.exports=function(t,e){return n.create(t,e)}},function(t,e,i){var n=i(17);n(n.S,"Object",{create:i(54)})},function(t,e,i){i(141),t.exports=i(7).Object.keys},function(t,e,i){var n=i(41),o=i(33);i(87)("keys",function(){return function(t){return o(n(t))}})},function(t,e,i){t.exports={default:i(143),__esModule:!0}},function(t,e,i){i(60),i(49),t.exports=i(61).f("iterator")},function(t,e,i){t.exports={default:i(145),__esModule:!0}},function(t,e,i){i(146),i(151),i(152),i(153),t.exports=i(7).Symbol},function(t,e,i){function n(t){var e=Y[t]=O(L.prototype);return e._k=t,e}function o(t,e){S(t);for(var i,n=x(e=D(e)),o=0,s=n.length;o<s;)$(t,i=n[o++],e[i]);return t}function s(t){var e=H.call(this,t=E(t,!0));return!(this===V&&l(Y,t)&&!l(G,t))&&(!(e||!l(this,t)||!l(Y,t)||l(this,F)&&this[F][t])||e)}function r(t,e){if(t=D(t),e=E(e,!0),t!==V||!l(Y,e)||l(G,e)){var i=N(t,e);return!i||!l(Y,e)||l(t,F)&&t[F][e]||(i.enumerable=!0),i}}function a(t){for(var e,i=A(D(t)),n=[],o=0;i.length>o;)l(Y,e=i[o++])||e==F||e==f||n.push(e);return n}function h(t){for(var e,i=t===V,n=A(i?G:D(t)),o=[],s=0;n.length>s;)!l(Y,e=n[s++])||i&&!l(V,e)||o.push(Y[e]);return o}var d=i(18),l=i(22),u=i(21),c=i(17),p=i(83),f=i(147).KEY,m=i(28),v=i(57),g=i(59),y=i(40),b=i(13),_=i(61),w=i(62),x=i(148),k=i(149),S=i(27),D=i(25),E=i(53),M=i(39),O=i(54),C=i(150),T=i(89),I=i(20),P=i(33),N=T.f,R=I.f,A=C.f,L=d.Symbol,z=d.JSON,B=z&&z.stringify,F=b("_hidden"),j=b("toPrimitive"),H={}.propertyIsEnumerable,W=v("symbol-registry"),Y=v("symbols"),G=v("op-symbols"),V=Object.prototype,U="function"==typeof L,q=d.QObject,X=!q||!q.prototype||!q.prototype.findChild,Z=u&&m(function(){return 7!=O(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(t,e,i){var n=N(V,e);n&&delete V[e],R(t,e,i),n&&t!==V&&R(V,e,n)}:R,K=U&&"symbol"==typeof L.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof L},$=function(t,e,i){return t===V&&$(G,e,i),S(t),e=E(e,!0),S(i),l(Y,e)?(i.enumerable?(l(t,F)&&t[F][e]&&(t[F][e]=!1),i=O(i,{enumerable:M(0,!1)})):(l(t,F)||R(t,F,M(1,{})),t[F][e]=!0),Z(t,e,i)):R(t,e,i)};U||(p((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var e=y(0<arguments.length?arguments[0]:void 0),i=function(t){this===V&&i.call(G,t),l(this,F)&&l(this[F],e)&&(this[F][e]=!1),Z(this,e,M(1,t))};return u&&X&&Z(V,e,{configurable:!0,set:i}),n(e)}).prototype,"toString",function(){return this._k}),T.f=r,I.f=$,i(88).f=C.f=a,i(42).f=s,i(63).f=h,u&&!i(52)&&p(V,"propertyIsEnumerable",s,!0),_.f=function(t){return n(b(t))}),c(c.G+c.W+c.F*!U,{Symbol:L});for(var J="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Q=0;J.length>Q;)b(J[Q++]);for(var tt=P(b.store),et=0;tt.length>et;)w(tt[et++]);c(c.S+c.F*!U,"Symbol",{for:function(t){return l(W,t+="")?W[t]:W[t]=L(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in W)if(W[e]===t)return e},useSetter:function(){X=!0},useSimple:function(){X=!1}}),c(c.S+c.F*!U,"Object",{create:function(t,e){return void 0===e?O(t):o(O(t),e)},defineProperty:$,defineProperties:o,getOwnPropertyDescriptor:r,getOwnPropertyNames:a,getOwnPropertySymbols:h}),z&&c(c.S+c.F*(!U||m(function(){var t=L();return"[null]"!=B([t])||"{}"!=B({a:t})||"{}"!=B(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!K(t)){for(var e,i,n=[t],o=1;o<arguments.length;)n.push(arguments[o++]);return"function"==typeof(e=n[1])&&(i=e),!i&&k(e)||(e=function(t,e){if(i&&(e=i.call(this,t,e)),!K(e))return e}),n[1]=e,B.apply(z,n)}}}),L.prototype[j]||i(26)(L.prototype,j,L.prototype.valueOf),g(L,"Symbol"),g(Math,"Math",!0),g(d.JSON,"JSON",!0)},function(t,e,i){function n(t){a(t,o,{value:{i:"O"+ ++h,w:{}}})}var o=i(40)("meta"),s=i(32),r=i(22),a=i(20).f,h=0,d=Object.isExtensible||function(){return!0},l=!i(28)(function(){return d(Object.preventExtensions({}))}),u=t.exports={KEY:o,NEED:!1,fastKey:function(t,e){if(!s(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!r(t,o)){if(!d(t))return"F";if(!e)return"E";n(t)}return t[o].i},getWeak:function(t,e){if(!r(t,o)){if(!d(t))return!0;if(!e)return!1;n(t)}return t[o].w},onFreeze:function(t){return l&&u.NEED&&d(t)&&!r(t,o)&&n(t),t}}},function(t,e,i){var a=i(33),h=i(63),d=i(42);t.exports=function(t){var e=a(t),i=h.f;if(i)for(var n,o=i(t),s=d.f,r=0;o.length>r;)s.call(t,n=o[r++])&&e.push(n);return e}},function(t,e,i){var n=i(50);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,i){var n=i(25),o=i(88).f,s={}.toString,r="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return r&&"[object Window]"==s.call(t)?function(t){try{return o(t)}catch(t){return r.slice()}}(t):o(n(t))}},function(t,e){},function(t,e,i){i(62)("asyncIterator")},function(t,e,i){i(62)("observable")},function(t,e,i){(function(Ui){Ui.exports=function(){function c(){return Qt.apply(null,arguments)}function r(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function a(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function h(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function o(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function n(t,e){var i,n=[];for(i=0;i<t.length;++i)n.push(e(t[i],i));return n}function p(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function d(t,e){for(var i in e)p(e,i)&&(t[i]=e[i]);return p(e,"toString")&&(t.toString=e.toString),p(e,"valueOf")&&(t.valueOf=e.valueOf),t}function l(t,e,i,n){return yt(t,e,i,n,!0).utc()}function f(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function u(t){if(null==t._isValid){var e=f(t),i=te.call(e.parsedDateParts,function(t){return null!=t}),n=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(n=n&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return n;t._isValid=n}return t._isValid}function m(t){var e=l(NaN);return null!=t?d(f(e),t):f(e).userInvalidated=!0,e}function v(t,e){var i,n,o;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=f(e)),s(e._locale)||(t._locale=e._locale),0<ie.length)for(i=0;i<ie.length;i++)n=ie[i],s(o=e[n])||(t[n]=o);return t}function g(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===ne&&(ne=!0,c.updateOffset(this),ne=!1)}function y(t){return t instanceof g||null!=t&&null!=t._isAMomentObject}function b(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function _(t){var e=+t,i=0;return 0!=e&&isFinite(e)&&(i=b(e)),i}function w(t,e,i){var n,o=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0;for(n=0;n<o;n++)(i&&t[n]!==e[n]||!i&&_(t[n])!==_(e[n]))&&r++;return r+s}function x(t){!1===c.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function t(o,s){var r=!0;return d(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,o),r){for(var t,e=[],i=0;i<arguments.length;i++){if(t="","object"==typeof arguments[i]){for(var n in t+="\n["+i+"] ",arguments[0])t+=n+": "+arguments[0][n]+", ";t=t.slice(0,-2)}else t=arguments[i];e.push(t)}x(o+"\nArguments: "+Array.prototype.slice.call(e).join("")+"\n"+(new Error).stack),r=!1}return s.apply(this,arguments)},s)}function k(t,e){null!=c.deprecationHandler&&c.deprecationHandler(t,e),oe[t]||(x(e),oe[t]=!0)}function S(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function D(t,e){var i,n=d({},t);for(i in e)p(e,i)&&(a(t[i])&&a(e[i])?(n[i]={},d(n[i],t[i]),d(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);for(i in t)p(t,i)&&!p(e,i)&&a(t[i])&&(n[i]=d({},n[i]));return n}function E(t){null!=t&&this.set(t)}function e(t,e){var i=t.toLowerCase();se[i]=se[i+"s"]=se[e]=t}function M(t){return"string"==typeof t?se[t]||se[t.toLowerCase()]:void 0}function O(t){var e,i,n={};for(i in t)p(t,i)&&(e=M(i))&&(n[e]=t[i]);return n}function i(t,e){re[t]=e}function C(t){var e=[];for(var i in t)e.push({unit:i,priority:re[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}function T(t,e,i){var n=""+Math.abs(t),o=e-n.length;return(0<=t?i?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}function I(t,e,i,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),t&&(le[t]=o),e&&(le[e[0]]=function(){return T(o.apply(this,arguments),e[1],e[2])}),i&&(le[i]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function P(t,e){return t.isValid()?(e=N(e,t.localeData()),de[e]=de[e]||function(n){var t,o,s=n.match(ae);for(t=0,o=s.length;t<o;t++)le[s[t]]?s[t]=le[s[t]]:s[t]=(e=s[t],e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,""));var e;return function(t){var e,i="";for(e=0;e<o;e++)i+=S(s[e])?s[e].call(t,n):s[e];return i}}(e),de[e](t)):t.localeData().invalidDate()}function N(t,e){function i(t){return e.longDateFormat(t)||t}var n=5;for(he.lastIndex=0;0<=n&&he.test(t);)t=t.replace(he,i),he.lastIndex=0,n-=1;return t}function R(t,i,n){Me[t]=S(i)?i:function(t,e){return t&&n?n:i}}function A(t,e){return p(Me,t)?Me[t](e._strict,e._locale):new RegExp(function(t){return L(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,o){return e||i||n||o}))}(t))}function L(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function z(t,i){var e,n=i;for("string"==typeof t&&(t=[t]),h(i)&&(n=function(t,e){e[i]=_(t)}),e=0;e<t.length;e++)Oe[t[e]]=n}function B(t,o){z(t,function(t,e,i,n){i._w=i._w||{},o(t,i._w,i,n)})}function F(t){return j(t)?366:365}function j(t){return t%4==0&&t%100!=0||t%400==0}function H(e,i){return function(t){return null!=t?(Y(this,e,t),c.updateOffset(this,i),this):W(this,e)}}function W(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Y(t,e,i){t.isValid()&&!isNaN(i)&&("FullYear"===e&&j(t.year())?t._d["set"+(t._isUTC?"UTC":"")+e](i,t.month(),G(i,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](i))}function G(t,e){if(isNaN(t)||isNaN(e))return NaN;var i=function(t,e){return(t%e+e)%e}(e,12);return t+=(e-i)/12,1===i?j(t)?29:28:31-i%7%2}function V(t,e,i){var n,o,s,r=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=l([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?-1!==(o="MMM"===e?Be.call(this._shortMonthsParse,r):Be.call(this._longMonthsParse,r))?o:null:"MMM"===e?-1!==(o=Be.call(this._shortMonthsParse,r))?o:-1!==(o=Be.call(this._longMonthsParse,r))?o:null:-1!==(o=Be.call(this._longMonthsParse,r))?o:-1!==(o=Be.call(this._shortMonthsParse,r))?o:null}function U(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=_(e);else if(!h(e=t.localeData().monthsParse(e)))return t;return i=Math.min(t.date(),G(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function q(t){return null!=t?(U(this,t),c.updateOffset(this,!0),this):W(this,"Month")}function X(){function t(t,e){return e.length-t.length}var e,i,n=[],o=[],s=[];for(e=0;e<12;e++)i=l([2e3,e]),n.push(this.monthsShort(i,"")),o.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(n.sort(t),o.sort(t),s.sort(t),e=0;e<12;e++)n[e]=L(n[e]),o[e]=L(o[e]);for(e=0;e<24;e++)s[e]=L(s[e]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Z(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&0<=t&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function K(t,e,i){var n=7+e-i;return-(7+Z(t,0,n).getUTCDay()-e)%7+n-1}function $(t,e,i,n,o){var s,r,a=(7+i-n)%7,h=K(t,n,o),d=1+7*(e-1)+a+h;return r=d<=0?F(s=t-1)+d:d>F(t)?(s=t+1,d-F(t)):(s=t,d),{year:s,dayOfYear:r}}function J(t,e,i){var n,o,s=K(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return r<1?(o=t.year()-1,n=r+Q(o,e,i)):r>Q(t.year(),e,i)?(n=r-Q(t.year(),e,i),o=t.year()+1):(o=t.year(),n=r),{week:n,year:o}}function Q(t,e,i){var n=K(t,e,i),o=K(t+1,e,i);return(F(t)-n+o)/7}function tt(t,e,i){var n,o,s,r=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=l([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?-1!==(o="dddd"===e?Be.call(this._weekdaysParse,r):"ddd"===e?Be.call(this._shortWeekdaysParse,r):Be.call(this._minWeekdaysParse,r))?o:null:"dddd"===e?-1!==(o=Be.call(this._weekdaysParse,r))?o:-1!==(o=Be.call(this._shortWeekdaysParse,r))?o:-1!==(o=Be.call(this._minWeekdaysParse,r))?o:null:"ddd"===e?-1!==(o=Be.call(this._shortWeekdaysParse,r))?o:-1!==(o=Be.call(this._weekdaysParse,r))?o:-1!==(o=Be.call(this._minWeekdaysParse,r))?o:null:-1!==(o=Be.call(this._minWeekdaysParse,r))?o:-1!==(o=Be.call(this._weekdaysParse,r))?o:-1!==(o=Be.call(this._shortWeekdaysParse,r))?o:null}function et(){function t(t,e){return e.length-t.length}var e,i,n,o,s,r=[],a=[],h=[],d=[];for(e=0;e<7;e++)i=l([2e3,1]).day(e),n=this.weekdaysMin(i,""),o=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(n),a.push(o),h.push(s),d.push(n),d.push(o),d.push(s);for(r.sort(t),a.sort(t),h.sort(t),d.sort(t),e=0;e<7;e++)a[e]=L(a[e]),h[e]=L(h[e]),d[e]=L(d[e]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function it(){return this.hours()%12||12}function nt(t,e){I(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function ot(t,e){return e._meridiemParse}function st(t){return t?t.toLowerCase().replace("_","-"):t}function rt(t){var e=null;if(!ti[t]&&void 0!==Ui&&Ui&&Ui.exports)try{e=$e._abbr,function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),at(e)}catch(t){}return ti[t]}function at(t,e){var i;return t&&(i=s(e)?dt(t):ht(t,e))&&($e=i),$e._abbr}function ht(t,e){if(null===e)return delete ti[t],null;var i=Qe;if(e.abbr=t,null!=ti[t])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=ti[t]._config;else if(null!=e.parentLocale){if(null==ti[e.parentLocale])return ei[e.parentLocale]||(ei[e.parentLocale]=[]),ei[e.parentLocale].push({name:t,config:e}),null;i=ti[e.parentLocale]._config}return ti[t]=new E(D(i,e)),ei[t]&&ei[t].forEach(function(t){ht(t.name,t.config)}),at(t),ti[t]}function dt(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return $e;if(!r(t)){if(e=rt(t))return e;t=[t]}return function(t){for(var e,i,n,o,s=0;s<t.length;){for(o=st(t[s]).split("-"),e=o.length,i=(i=st(t[s+1]))?i.split("-"):null;0<e;){if(n=rt(o.slice(0,e).join("-")))return n;if(i&&i.length>=e&&w(o,i,!0)>=e-1)break;e--}s++}return null}(t)}function lt(t){var e,i=t._a;return i&&-2===f(t).overflow&&(e=i[Te]<0||11<i[Te]?Te:i[Ie]<1||i[Ie]>G(i[Ce],i[Te])?Ie:i[Pe]<0||24<i[Pe]||24===i[Pe]&&(0!==i[Ne]||0!==i[Re]||0!==i[Ae])?Pe:i[Ne]<0||59<i[Ne]?Ne:i[Re]<0||59<i[Re]?Re:i[Ae]<0||999<i[Ae]?Ae:-1,f(t)._overflowDayOfYear&&(e<Ce||Ie<e)&&(e=Ie),f(t)._overflowWeeks&&-1===e&&(e=Le),f(t)._overflowWeekday&&-1===e&&(e=ze),f(t).overflow=e),t}function ut(t,e,i){return null!=t?t:null!=e?e:i}function ct(t){var e,i,n,o,s=[];if(!t._d){for(n=function(t){var e=new Date(c.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[Ie]&&null==t._a[Te]&&function(t){var e,i,n,o,s,r,a,h;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)s=1,r=4,i=ut(e.GG,t._a[Ce],J(bt(),1,4).year),n=ut(e.W,1),((o=ut(e.E,1))<1||7<o)&&(h=!0);else{s=t._locale._week.dow,r=t._locale._week.doy;var d=J(bt(),s,r);i=ut(e.gg,t._a[Ce],d.year),n=ut(e.w,d.week),null!=e.d?((o=e.d)<0||6<o)&&(h=!0):null!=e.e?(o=e.e+s,(e.e<0||6<e.e)&&(h=!0)):o=s}n<1||n>Q(i,s,r)?f(t)._overflowWeeks=!0:null!=h?f(t)._overflowWeekday=!0:(a=$(i,n,o,s,r),t._a[Ce]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(o=ut(t._a[Ce],n[Ce]),(t._dayOfYear>F(o)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),i=Z(o,0,t._dayOfYear),t._a[Te]=i.getUTCMonth(),t._a[Ie]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=n[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Pe]&&0===t._a[Ne]&&0===t._a[Re]&&0===t._a[Ae]&&(t._nextDay=!0,t._a[Pe]=0),t._d=(t._useUTC?Z:function(t,e,i,n,o,s,r){var a=new Date(t,e,i,n,o,s,r);return t<100&&0<=t&&isFinite(a.getFullYear())&&a.setFullYear(t),a}).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Pe]=24),t._w&&void 0!==t._w.d&&t._w.d!==t._d.getDay()&&(f(t).weekdayMismatch=!0)}}function pt(t){var e,i,n,o,s,r,a=t._i,h=ii.exec(a)||ni.exec(a);if(h){for(f(t).iso=!0,e=0,i=si.length;e<i;e++)if(si[e][1].exec(h[1])){o=si[e][0],n=!1!==si[e][2];break}if(null==o)return void(t._isValid=!1);if(h[3]){for(e=0,i=ri.length;e<i;e++)if(ri[e][1].exec(h[3])){s=(h[2]||" ")+ri[e][0];break}if(null==s)return void(t._isValid=!1)}if(!n&&null!=s)return void(t._isValid=!1);if(h[4]){if(!oi.exec(h[4]))return void(t._isValid=!1);r="Z"}t._f=o+(s||"")+(r||""),vt(t)}else t._isValid=!1}function ft(t,e,i,n,o,s){var r=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),We.indexOf(e),parseInt(i,10),parseInt(n,10),parseInt(o,10)];return s&&r.push(parseInt(s,10)),r}function mt(t){var e=hi.exec(function(t){return t.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t._i));if(e){var i=ft(e[4],e[3],e[2],e[5],e[6],e[7]);if(!function(t,e,i){if(t&&Ue.indexOf(t)!==new Date(e[0],e[1],e[2]).getDay())return f(i).weekdayMismatch=!0,i._isValid=!1;return!0}(e[1],i,t))return;t._a=i,t._tzm=function(t,e,i){if(t)return di[t];if(e)return 0;var n=parseInt(i,10),o=n%100;return(n-o)/100*60+o}(e[8],e[9],e[10]),t._d=Z.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),f(t).rfc2822=!0}else t._isValid=!1}function vt(t){if(t._f!==c.ISO_8601)if(t._f!==c.RFC_2822){t._a=[],f(t).empty=!0;var e,i,n,o,s,r,a,h,d=""+t._i,l=d.length,u=0;for(n=N(t._f,t._locale).match(ae)||[],e=0;e<n.length;e++)o=n[e],(i=(d.match(A(o,t))||[])[0])&&(0<(s=d.substr(0,d.indexOf(i))).length&&f(t).unusedInput.push(s),d=d.slice(d.indexOf(i)+i.length),u+=i.length),le[o]?(i?f(t).empty=!1:f(t).unusedTokens.push(o),r=o,h=t,null!=(a=i)&&p(Oe,r)&&Oe[r](a,h._a,h,r)):t._strict&&!i&&f(t).unusedTokens.push(o);f(t).charsLeftOver=l-u,0<d.length&&f(t).unusedInput.push(d),t._a[Pe]<=12&&!0===f(t).bigHour&&0<t._a[Pe]&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[Pe]=function(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):(null!=t.isPM&&((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0)),e)}(t._locale,t._a[Pe],t._meridiem),ct(t),lt(t)}else mt(t);else pt(t)}function gt(t){var e=t._i,i=t._f;return t._locale=t._locale||dt(t._l),null===e||void 0===i&&""===e?m({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),y(e)?new g(lt(e)):(o(e)?t._d=e:r(i)?function(t){var e,i,n,o,s;if(0===t._f.length)return f(t).invalidFormat=!0,t._d=new Date(NaN);for(o=0;o<t._f.length;o++)s=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[o],vt(e),u(e)&&(s+=f(e).charsLeftOver,s+=10*f(e).unusedTokens.length,f(e).score=s,(null==n||s<n)&&(n=s,i=e));d(t,i||e)}(t):i?vt(t):function(t){var e=t._i;s(e)?t._d=new Date(c.now()):o(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=ai.exec(t._i);if(null!==e)return t._d=new Date(+e[1]);pt(t),!1===t._isValid&&(delete t._isValid,mt(t),!1===t._isValid&&(delete t._isValid,c.createFromInputFallback(t)))}(t):r(e)?(t._a=n(e.slice(0),function(t){return parseInt(t,10)}),ct(t)):a(e)?function(t){if(!t._d){var e=O(t._i);t._a=n([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),ct(t)}}(t):h(e)?t._d=new Date(e):c.createFromInputFallback(t)}(t),u(t)||(t._d=null),t))}function yt(t,e,i,n,o){var s={};return!0!==i&&!1!==i||(n=i,i=void 0),(a(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||r(t)&&0===t.length)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=i,s._i=t,s._f=e,s._strict=n,function(t){var e=new g(lt(gt(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}(s)}function bt(t,e,i,n){return yt(t,e,i,n,!1)}function _t(t,e){var i,n;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return bt();for(i=e[0],n=1;n<e.length;++n)e[n].isValid()&&!e[n][t](i)||(i=e[n]);return i}function wt(t){var e=O(t),i=e.year||0,n=e.quarter||0,o=e.month||0,s=e.week||0,r=e.day||0,a=e.hour||0,h=e.minute||0,d=e.second||0,l=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===Be.call(ci,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var i=!1,n=0;n<ci.length;++n)if(t[ci[n]]){if(i)return!1;parseFloat(t[ci[n]])!==_(t[ci[n]])&&(i=!0)}return!0}(e),this._milliseconds=+l+1e3*d+6e4*h+1e3*a*60*60,this._days=+r+7*s,this._months=+o+3*n+12*i,this._data={},this._locale=dt(),this._bubble()}function xt(t){return t instanceof wt}function kt(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function St(t,i){I(t,0,0,function(){var t=this.utcOffset(),e="+";return t<0&&(t=-t,e="-"),e+T(~~(t/60),2)+i+T(~~t%60,2)})}function Dt(t,e){var i=(e||"").match(t);if(null===i)return null;var n=i[i.length-1]||[],o=(n+"").match(pi)||["-",0,0],s=60*o[1]+_(o[2]);return 0===s?0:"+"===o[0]?s:-s}function Et(t,e){var i,n;return e._isUTC?(i=e.clone(),n=(y(t)||o(t)?t.valueOf():bt(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+n),c.updateOffset(i,!1),i):bt(t).local()}function Mt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ot(){return!!this.isValid()&&this._isUTC&&0===this._offset}function Ct(t,e){var i,n,o,s=t,r=null;return xt(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:h(t)?(s={},e?s[e]=t:s.milliseconds=t):(r=fi.exec(t))?(i="-"===r[1]?-1:1,s={y:0,d:_(r[Ie])*i,h:_(r[Pe])*i,m:_(r[Ne])*i,s:_(r[Re])*i,ms:_(kt(1e3*r[Ae]))*i}):(r=mi.exec(t))?(i="-"===r[1]?-1:(r[1],1),s={y:Tt(r[2],i),M:Tt(r[3],i),w:Tt(r[4],i),d:Tt(r[5],i),h:Tt(r[6],i),m:Tt(r[7],i),s:Tt(r[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(o=function(t,e){var i;return t.isValid()&&e.isValid()?(e=Et(e,t),t.isBefore(e)?i=It(t,e):((i=It(e,t)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}(bt(s.from),bt(s.to)),(s={}).ms=o.milliseconds,s.M=o.months),n=new wt(s),xt(t)&&p(t,"_locale")&&(n._locale=t._locale),n}function Tt(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function It(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Pt(n,o){return function(t,e){var i;return null===e||isNaN(+e)||(k(o,"moment()."+o+"(period, number) is deprecated. Please use moment()."+o+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=t,t=e,e=i),Nt(this,Ct(t="string"==typeof t?+t:t,e),n),this}}function Nt(t,e,i,n){var o=e._milliseconds,s=kt(e._days),r=kt(e._months);t.isValid()&&(n=null==n||n,r&&U(t,W(t,"Month")+r*i),s&&Y(t,"Date",W(t,"Date")+s*i),o&&t._d.setTime(t._d.valueOf()+o*i),n&&c.updateOffset(t,s||r))}function Rt(t,e){var i,n,o=12*(e.year()-t.year())+(e.month()-t.month()),s=t.clone().add(o,"months");return n=e-s<0?(i=t.clone().add(o-1,"months"),(e-s)/(s-i)):(i=t.clone().add(1+o,"months"),(e-s)/(i-s)),-(o+n)||0}function At(t){var e;return void 0===t?this._locale._abbr:(null!=(e=dt(t))&&(this._locale=e),this)}function Lt(){return this._locale}function zt(t,e){I(0,[t,t.length],0,e)}function Bt(t,e,i,n,o){var s;return null==t?J(this,n,o).year:((s=Q(t,n,o))<e&&(e=s),function(t,e,i,n,o){var s=$(t,e,i,n,o),r=Z(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}.call(this,t,e,i,n,o))}function Ft(t,e){e[Ae]=_(1e3*("0."+t))}function jt(t){return t}function Ht(t,e,i,n){var o=dt(),s=l().set(n,e);return o[i](s,t)}function Wt(t,e,i){if(h(t)&&(e=t,t=void 0),t=t||"",null!=e)return Ht(t,e,i,"month");var n,o=[];for(n=0;n<12;n++)o[n]=Ht(t,n,i,"month");return o}function Yt(t,e,i,n){e=("boolean"==typeof t||(i=e=t,t=!1),h(e)&&(i=e,e=void 0),e||"");var o=dt(),s=t?o._week.dow:0;if(null!=i)return Ht(e,(i+s)%7,n,"day");var r,a=[];for(r=0;r<7;r++)a[r]=Ht(e,(r+s)%7,n,"day");return a}function Gt(t,e,i,n){var o=Ct(e,i);return t._milliseconds+=n*o._milliseconds,t._days+=n*o._days,t._months+=n*o._months,t._bubble()}function Vt(t){return t<0?Math.floor(t):Math.ceil(t)}function Ut(t){return 4800*t/146097}function qt(t){return 146097*t/4800}function Xt(t){return function(){return this.as(t)}}function Zt(t){return function(){return this.isValid()?this._data[t]:NaN}}function Kt(t,e,i,n,o){return o.relativeTime(e||1,!!i,t,n)}function $t(t){return(0<t)-(t<0)||+t}function Jt(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i=Gi(this._milliseconds)/1e3,n=Gi(this._days),o=Gi(this._months);t=b(i/60),e=b(t/60),i%=60,t%=60;var s=b(o/12),r=o%=12,a=n,h=e,d=t,l=i?i.toFixed(3).replace(/\.?0+$/,""):"",u=this.asSeconds();if(!u)return"P0D";var c=u<0?"-":"",p=$t(this._months)!==$t(u)?"-":"",f=$t(this._days)!==$t(u)?"-":"",m=$t(this._milliseconds)!==$t(u)?"-":"";return c+"P"+(s?p+s+"Y":"")+(r?p+r+"M":"")+(a?f+a+"D":"")+(h||d||l?"T":"")+(h?m+h+"H":"")+(d?m+d+"M":"")+(l?m+l+"S":"")}var Qt,te;te=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;n<i;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1};var ee,ie=c.momentProperties=[],ne=!1,oe={};c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,ee=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)p(t,e)&&i.push(e);return i};var se={},re={},ae=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,he=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,de={},le={},ue=/\d/,ce=/\d\d/,pe=/\d{3}/,fe=/\d{4}/,me=/[+-]?\d{6}/,ve=/\d\d?/,ge=/\d\d\d\d?/,ye=/\d\d\d\d\d\d?/,be=/\d{1,3}/,_e=/\d{1,4}/,we=/[+-]?\d{1,6}/,xe=/\d+/,ke=/[+-]?\d+/,Se=/Z|[+-]\d\d:?\d\d/gi,De=/Z|[+-]\d\d(?::?\d\d)?/gi,Ee=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Me={},Oe={},Ce=0,Te=1,Ie=2,Pe=3,Ne=4,Re=5,Ae=6,Le=7,ze=8;I("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),I(0,["YY",2],0,function(){return this.year()%100}),I(0,["YYYY",4],0,"year"),I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),e("year","y"),i("year",1),R("Y",ke),R("YY",ve,ce),R("YYYY",_e,fe),R("YYYYY",we,me),R("YYYYYY",we,me),z(["YYYYY","YYYYYY"],Ce),z("YYYY",function(t,e){e[Ce]=2===t.length?c.parseTwoDigitYear(t):_(t)}),z("YY",function(t,e){e[Ce]=c.parseTwoDigitYear(t)}),z("Y",function(t,e){e[Ce]=parseInt(t,10)}),c.parseTwoDigitYear=function(t){return _(t)+(68<_(t)?1900:2e3)};var Be,Fe=H("FullYear",!0);Be=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},I("M",["MM",2],"Mo",function(){return this.month()+1}),I("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),I("MMMM",0,0,function(t){return this.localeData().months(this,t)}),e("month","M"),i("month",8),R("M",ve),R("MM",ve,ce),R("MMM",function(t,e){return e.monthsShortRegex(t)}),R("MMMM",function(t,e){return e.monthsRegex(t)}),z(["M","MM"],function(t,e){e[Te]=_(t)-1}),z(["MMM","MMMM"],function(t,e,i,n){var o=i._locale.monthsParse(t,n,i._strict);null!=o?e[Te]=o:f(i).invalidMonth=t});var je=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,He="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),We="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ye=Ee,Ge=Ee;I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),e("week","w"),e("isoWeek","W"),i("week",5),i("isoWeek",5),R("w",ve),R("ww",ve,ce),R("W",ve),R("WW",ve,ce),B(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=_(t)});I("d",0,"do","day"),I("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),I("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),I("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),e("day","d"),e("weekday","e"),e("isoWeekday","E"),i("day",11),i("weekday",11),i("isoWeekday",11),R("d",ve),R("e",ve),R("E",ve),R("dd",function(t,e){return e.weekdaysMinRegex(t)}),R("ddd",function(t,e){return e.weekdaysShortRegex(t)}),R("dddd",function(t,e){return e.weekdaysRegex(t)}),B(["dd","ddd","dddd"],function(t,e,i,n){var o=i._locale.weekdaysParse(t,n,i._strict);null!=o?e.d=o:f(i).invalidWeekday=t}),B(["d","e","E"],function(t,e,i,n){e[n]=_(t)});var Ve="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ue="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Xe=Ee,Ze=Ee,Ke=Ee;I("H",["HH",2],0,"hour"),I("h",["hh",2],0,it),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+it.apply(this)+T(this.minutes(),2)}),I("hmmss",0,0,function(){return""+it.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),nt("a",!0),nt("A",!1),e("hour","h"),i("hour",13),R("a",ot),R("A",ot),R("H",ve),R("h",ve),R("k",ve),R("HH",ve,ce),R("hh",ve,ce),R("kk",ve,ce),R("hmm",ge),R("hmmss",ye),R("Hmm",ge),R("Hmmss",ye),z(["H","HH"],Pe),z(["k","kk"],function(t,e,i){var n=_(t);e[Pe]=24===n?0:n}),z(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),z(["h","hh"],function(t,e,i){e[Pe]=_(t),f(i).bigHour=!0}),z("hmm",function(t,e,i){var n=t.length-2;e[Pe]=_(t.substr(0,n)),e[Ne]=_(t.substr(n)),f(i).bigHour=!0}),z("hmmss",function(t,e,i){var n=t.length-4,o=t.length-2;e[Pe]=_(t.substr(0,n)),e[Ne]=_(t.substr(n,2)),e[Re]=_(t.substr(o)),f(i).bigHour=!0}),z("Hmm",function(t,e,i){var n=t.length-2;e[Pe]=_(t.substr(0,n)),e[Ne]=_(t.substr(n))}),z("Hmmss",function(t,e,i){var n=t.length-4,o=t.length-2;e[Pe]=_(t.substr(0,n)),e[Ne]=_(t.substr(n,2)),e[Re]=_(t.substr(o))});var $e,Je=H("Hours",!0),Qe={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:We,week:{dow:0,doy:6},weekdays:Ve,weekdaysMin:qe,weekdaysShort:Ue,meridiemParse:/[ap]\.?m?\.?/i},ti={},ei={},ii=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ni=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,oi=/Z|[+-]\d\d(?::?\d\d)?/,si=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ri=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ai=/^\/?Date\((\-?\d+)/i,hi=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,di={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};c.createFromInputFallback=t("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var li=t("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=bt.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:m()}),ui=t("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=bt.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:m()}),ci=["year","quarter","month","week","day","hour","minute","second","millisecond"];St("Z",":"),St("ZZ",""),R("Z",De),R("ZZ",De),z(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Dt(De,t)});var pi=/([\+\-]|\d\d)/gi;c.updateOffset=function(){};var fi=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,mi=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Ct.fn=wt.prototype,Ct.invalid=function(){return Ct(NaN)};var vi=Pt(1,"add"),gi=Pt(-1,"subtract");c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var yi=t("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});I(0,["gg",2],0,function(){return this.weekYear()%100}),I(0,["GG",2],0,function(){return this.isoWeekYear()%100}),zt("gggg","weekYear"),zt("ggggg","weekYear"),zt("GGGG","isoWeekYear"),zt("GGGGG","isoWeekYear"),e("weekYear","gg"),e("isoWeekYear","GG"),i("weekYear",1),i("isoWeekYear",1),R("G",ke),R("g",ke),R("GG",ve,ce),R("gg",ve,ce),R("GGGG",_e,fe),R("gggg",_e,fe),R("GGGGG",we,me),R("ggggg",we,me),B(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=_(t)}),B(["gg","GG"],function(t,e,i,n){e[n]=c.parseTwoDigitYear(t)}),I("Q",0,"Qo","quarter"),e("quarter","Q"),i("quarter",7),R("Q",ue),z("Q",function(t,e){e[Te]=3*(_(t)-1)}),I("D",["DD",2],"Do","date"),e("date","D"),i("date",9),R("D",ve),R("DD",ve,ce),R("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),z(["D","DD"],Ie),z("Do",function(t,e){e[Ie]=_(t.match(ve)[0])});var bi=H("Date",!0);I("DDD",["DDDD",3],"DDDo","dayOfYear"),e("dayOfYear","DDD"),i("dayOfYear",4),R("DDD",be),R("DDDD",pe),z(["DDD","DDDD"],function(t,e,i){i._dayOfYear=_(t)}),I("m",["mm",2],0,"minute"),e("minute","m"),i("minute",14),R("m",ve),R("mm",ve,ce),z(["m","mm"],Ne);var _i=H("Minutes",!1);I("s",["ss",2],0,"second"),e("second","s"),i("second",15),R("s",ve),R("ss",ve,ce),z(["s","ss"],Re);var wi,xi=H("Seconds",!1);for(I("S",0,0,function(){return~~(this.millisecond()/100)}),I(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,function(){return 10*this.millisecond()}),I(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),I(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),I(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),I(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),I(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),e("millisecond","ms"),i("millisecond",16),R("S",be,ue),R("SS",be,ce),R("SSS",be,pe),wi="SSSS";wi.length<=9;wi+="S")R(wi,xe);for(wi="S";wi.length<=9;wi+="S")z(wi,Ft);var ki=H("Milliseconds",!1);I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var Si=g.prototype;Si.add=vi,Si.calendar=function(t,e){var i=t||bt(),n=Et(i,this).startOf("day"),o=c.calendarFormat(this,n)||"sameElse",s=e&&(S(e[o])?e[o].call(this,i):e[o]);return this.format(s||this.localeData().calendar(o,this,bt(i)))},Si.clone=function(){return new g(this)},Si.diff=function(t,e,i){var n,o,s;if(!this.isValid())return NaN;if(!(n=Et(t,this)).isValid())return NaN;switch(o=6e4*(n.utcOffset()-this.utcOffset()),e=M(e)){case"year":s=Rt(this,n)/12;break;case"month":s=Rt(this,n);break;case"quarter":s=Rt(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-o)/864e5;break;case"week":s=(this-n-o)/6048e5;break;default:s=this-n}return i?s:b(s)},Si.endOf=function(t){return void 0===(t=M(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},Si.format=function(t){t=t||(this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var e=P(this,t);return this.localeData().postformat(e)},Si.from=function(t,e){return this.isValid()&&(y(t)&&t.isValid()||bt(t).isValid())?Ct({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Si.fromNow=function(t){return this.from(bt(),t)},Si.to=function(t,e){return this.isValid()&&(y(t)&&t.isValid()||bt(t).isValid())?Ct({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Si.toNow=function(t){return this.to(bt(),t)},Si.get=function(t){return S(this[t=M(t)])?this[t]():this},Si.invalidAt=function(){return f(this).overflow},Si.isAfter=function(t,e){var i=y(t)?t:bt(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=M(s(e)?"millisecond":e))?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},Si.isBefore=function(t,e){var i=y(t)?t:bt(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=M(s(e)?"millisecond":e))?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},Si.isBetween=function(t,e,i,n){return("("===(n=n||"()")[0]?this.isAfter(t,i):!this.isBefore(t,i))&&(")"===n[1]?this.isBefore(e,i):!this.isAfter(e,i))},Si.isSame=function(t,e){var i,n=y(t)?t:bt(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=M(e||"millisecond"))?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},Si.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},Si.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},Si.isValid=function(){return u(this)},Si.lang=yi,Si.locale=At,Si.localeData=Lt,Si.max=ui,Si.min=li,Si.parsingFlags=function(){return d({},f(this))},Si.set=function(t,e){if("object"==typeof t)for(var i=C(t=O(t)),n=0;n<i.length;n++)this[i[n].unit](t[i[n].unit]);else if(S(this[t=M(t)]))return this[t](e);return this},Si.startOf=function(t){switch(t=M(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},Si.subtract=gi,Si.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]},Si.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}},Si.toDate=function(){return new Date(this.valueOf())},Si.toISOString=function(){if(!this.isValid())return null;var t=this.clone().utc();return t.year()<0||9999<t.year()?P(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):S(Date.prototype.toISOString)?this.toDate().toISOString():P(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},Si.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var i="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=e+'[")]';return this.format(i+n+"-MM-DD[T]HH:mm:ss.SSS"+o)},Si.toJSON=function(){return this.isValid()?this.toISOString():null},Si.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Si.unix=function(){return Math.floor(this.valueOf()/1e3)},Si.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Si.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Si.year=Fe,Si.isLeapYear=function(){return j(this.year())},Si.weekYear=function(t){return Bt.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Si.isoWeekYear=function(t){return Bt.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},Si.quarter=Si.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},Si.month=q,Si.daysInMonth=function(){return G(this.year(),this.month())},Si.week=Si.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},Si.isoWeek=Si.isoWeeks=function(t){var e=J(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},Si.weeksInYear=function(){var t=this.localeData()._week;return Q(this.year(),t.dow,t.doy)},Si.isoWeeksInYear=function(){return Q(this.year(),1,4)},Si.date=bi,Si.day=Si.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(i=t,n=this.localeData(),t="string"!=typeof i?i:isNaN(i)?"number"==typeof(i=n.weekdaysParse(i))?i:null:parseInt(i,10),this.add(t-e,"d")):e;var i,n},Si.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},Si.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e=(i=t,n=this.localeData(),"string"==typeof i?n.weekdaysParse(i)%7||7:isNaN(i)?null:i);var i,n;return this.day(this.day()%7?e:e-7)},Si.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},Si.hour=Si.hours=Je,Si.minute=Si.minutes=_i,Si.second=Si.seconds=xi,Si.millisecond=Si.milliseconds=ki,Si.utcOffset=function(t,e,i){var n,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?o:Mt(this);if("string"==typeof t){if(null===(t=Dt(De,t)))return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&e&&(n=Mt(this)),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),o!==t&&(!e||this._changeInProgress?Nt(this,Ct(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this},Si.utc=function(t){return this.utcOffset(0,t)},Si.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Mt(this),"m")),this},Si.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Dt(Se,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},Si.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?bt(t).utcOffset():0,(this.utcOffset()-t)%60==0)},Si.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Si.isLocal=function(){return!!this.isValid()&&!this._isUTC},Si.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Si.isUtc=Ot,Si.isUTC=Ot,Si.zoneAbbr=function(){return this._isUTC?"UTC":""},Si.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Si.dates=t("dates accessor is deprecated. Use date instead.",bi),Si.months=t("months accessor is deprecated. Use month instead",q),Si.years=t("years accessor is deprecated. Use year instead",Fe),Si.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),Si.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=gt(t))._a){var e=t._isUTC?l(t._a):bt(t._a);this._isDSTShifted=this.isValid()&&0<w(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var Di=E.prototype;Di.calendar=function(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return S(n)?n.call(e,i):n},Di.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},Di.invalidDate=function(){return this._invalidDate},Di.ordinal=function(t){return this._ordinal.replace("%d",t)},Di.preparse=jt,Di.postformat=jt,Di.relativeTime=function(t,e,i,n){var o=this._relativeTime[i];return S(o)?o(t,e,i,n):o.replace(/%d/i,t)},Di.pastFuture=function(t,e){var i=this._relativeTime[0<t?"future":"past"];return S(i)?i(e):i.replace(/%s/i,e)},Di.set=function(t){var e,i;for(i in t)S(e=t[i])?this[i]=e:this["_"+i]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Di.months=function(t,e){return t?r(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||je).test(e)?"format":"standalone"][t.month()]:r(this._months)?this._months:this._months.standalone},Di.monthsShort=function(t,e){return t?r(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[je.test(e)?"format":"standalone"][t.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Di.monthsParse=function(t,e,i){var n,o,s;if(this._monthsParseExact)return V.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(o=l([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(s="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}},Di.monthsRegex=function(t){return this._monthsParseExact?(p(this,"_monthsRegex")||X.call(this),t?this._monthsStrictRegex:this._monthsRegex):(p(this,"_monthsRegex")||(this._monthsRegex=Ge),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},Di.monthsShortRegex=function(t){return this._monthsParseExact?(p(this,"_monthsRegex")||X.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(p(this,"_monthsShortRegex")||(this._monthsShortRegex=Ye),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},Di.week=function(t){return J(t,this._week.dow,this._week.doy).week},Di.firstDayOfYear=function(){return this._week.doy},Di.firstDayOfWeek=function(){return this._week.dow},Di.weekdays=function(t,e){return t?r(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:r(this._weekdays)?this._weekdays:this._weekdays.standalone},Di.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},Di.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},Di.weekdaysParse=function(t,e,i){var n,o,s;if(this._weekdaysParseExact)return tt.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=l([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}},Di.weekdaysRegex=function(t){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||et.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(p(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},Di.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||et.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(p(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ze),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Di.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||et.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(p(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ke),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Di.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},Di.meridiem=function(t,e,i){return 11<t?i?"pm":"PM":i?"am":"AM"},at("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===_(t%100/10)?"th":1==e?"st":2==e?"nd":3==e?"rd":"th")}}),c.lang=t("moment.lang is deprecated. Use moment.locale instead.",at),c.langData=t("moment.langData is deprecated. Use moment.localeData instead.",dt);var Ei=Math.abs,Mi=Xt("ms"),Oi=Xt("s"),Ci=Xt("m"),Ti=Xt("h"),Ii=Xt("d"),Pi=Xt("w"),Ni=Xt("M"),Ri=Xt("y"),Ai=Zt("milliseconds"),Li=Zt("seconds"),zi=Zt("minutes"),Bi=Zt("hours"),Fi=Zt("days"),ji=Zt("months"),Hi=Zt("years"),Wi=Math.round,Yi={ss:44,s:45,m:45,h:22,d:26,M:11},Gi=Math.abs,Vi=wt.prototype;return Vi.isValid=function(){return this._isValid},Vi.abs=function(){var t=this._data;return this._milliseconds=Ei(this._milliseconds),this._days=Ei(this._days),this._months=Ei(this._months),t.milliseconds=Ei(t.milliseconds),t.seconds=Ei(t.seconds),t.minutes=Ei(t.minutes),t.hours=Ei(t.hours),t.months=Ei(t.months),t.years=Ei(t.years),this},Vi.add=function(t,e){return Gt(this,t,e,1)},Vi.subtract=function(t,e){return Gt(this,t,e,-1)},Vi.as=function(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=M(t))||"year"===t)return e=this._days+n/864e5,i=this._months+Ut(e),"month"===t?i:i/12;switch(e=this._days+Math.round(qt(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},Vi.asMilliseconds=Mi,Vi.asSeconds=Oi,Vi.asMinutes=Ci,Vi.asHours=Ti,Vi.asDays=Ii,Vi.asWeeks=Pi,Vi.asMonths=Ni,Vi.asYears=Ri,Vi.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12):NaN},Vi._bubble=function(){var t,e,i,n,o,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return 0<=s&&0<=r&&0<=a||s<=0&&r<=0&&a<=0||(s+=864e5*Vt(qt(a)+r),a=r=0),h.milliseconds=s%1e3,t=b(s/1e3),h.seconds=t%60,e=b(t/60),h.minutes=e%60,i=b(e/60),h.hours=i%24,r+=b(i/24),o=b(Ut(r)),a+=o,r-=Vt(qt(o)),n=b(a/12),a%=12,h.days=r,h.months=a,h.years=n,this},Vi.clone=function(){return Ct(this)},Vi.get=function(t){return t=M(t),this.isValid()?this[t+"s"]():NaN},Vi.milliseconds=Ai,Vi.seconds=Li,Vi.minutes=zi,Vi.hours=Bi,Vi.days=Fi,Vi.weeks=function(){return b(this.days()/7)},Vi.months=ji,Vi.years=Hi,Vi.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),i=(n=this,o=!t,s=e,r=Ct(n).abs(),a=Wi(r.as("s")),h=Wi(r.as("m")),d=Wi(r.as("h")),l=Wi(r.as("d")),u=Wi(r.as("M")),c=Wi(r.as("y")),p=a<=Yi.ss&&["s",a]||a<Yi.s&&["ss",a]||h<=1&&["m"]||h<Yi.m&&["mm",h]||d<=1&&["h"]||d<Yi.h&&["hh",d]||l<=1&&["d"]||l<Yi.d&&["dd",l]||u<=1&&["M"]||u<Yi.M&&["MM",u]||c<=1&&["y"]||["yy",c],p[2]=o,p[3]=0<+n,p[4]=s,Kt.apply(null,p));var n,o,s,r,a,h,d,l,u,c,p;return t&&(i=e.pastFuture(+this,i)),e.postformat(i)},Vi.toISOString=Jt,Vi.toString=Jt,Vi.toJSON=Jt,Vi.locale=At,Vi.localeData=Lt,Vi.toIsoString=t("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Jt),Vi.lang=yi,I("X",0,0,"unix"),I("x",0,0,"valueOf"),R("x",ke),R("X",/[+-]?\d+(\.\d{1,3})?/),z("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),z("x",function(t,e,i){i._d=new Date(_(t))}),c.version="2.19.1",function(t){Qt=t}(bt),c.fn=Si,c.min=function(){return _t("isBefore",[].slice.call(arguments,0))},c.max=function(){return _t("isAfter",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=l,c.unix=function(t){return bt(1e3*t)},c.months=function(t,e){return Wt(t,e,"months")},c.isDate=o,c.locale=at,c.invalid=m,c.duration=Ct,c.isMoment=y,c.weekdays=function(t,e,i){return Yt(t,e,i,"weekdays")},c.parseZone=function(){return bt.apply(null,arguments).parseZone()},c.localeData=dt,c.isDuration=xt,c.monthsShort=function(t,e){return Wt(t,e,"monthsShort")},c.weekdaysMin=function(t,e,i){return Yt(t,e,i,"weekdaysMin")},c.defineLocale=ht,c.updateLocale=function(t,e){if(null!=e){var i,n=Qe;null!=ti[t]&&(n=ti[t]._config),e=D(n,e),(i=new E(e)).parentLocale=ti[t],ti[t]=i,at(t)}else null!=ti[t]&&(null!=ti[t].parentLocale?ti[t]=ti[t].parentLocale:null!=ti[t]&&delete ti[t]);return ti[t]},c.locales=function(){return ee(ti)},c.weekdaysShort=function(t,e,i){return Yt(t,e,i,"weekdaysShort")},c.normalizeUnits=M,c.relativeTimeRounding=function(t){return void 0===t?Wi:"function"==typeof t&&(Wi=t,!0)},c.relativeTimeThreshold=function(t,e){return void 0!==Yi[t]&&(void 0===e?Yi[t]:(Yi[t]=e,"s"===t&&(Yi.ss=e-1),!0))},c.calendarFormat=function(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},c.prototype=Si,c}()}).call(e,i(155)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,(t.exports=i).id=156},function(u,t,e){(function(t){function p(t,e){var i=e||0,n=s;return n[t[i++]]+n[t[i++]]+n[t[i++]]+n[t[i++]]+"-"+n[t[i++]]+n[t[i++]]+"-"+n[t[i++]]+n[t[i++]]+"-"+n[t[i++]]+n[t[i++]]+"-"+n[t[i++]]+n[t[i++]]+n[t[i++]]+n[t[i++]]+n[t[i++]]+n[t[i++]]}function e(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||r)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var s=0;s<16;s++)e[n+s]=o[s];return e||p(o)}var r,i="undefined"!=typeof window?window:void 0!==t?t:null;if(i&&i.crypto&&crypto.getRandomValues){var n=new Uint8Array(16);r=function(){return crypto.getRandomValues(n),n}}if(!r){var o=new Array(16);r=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),o[e]=t>>>((3&e)<<3)&255;return o}}for(var s=[],a={},h=0;h<256;h++)s[h]=(h+256).toString(16).substr(1),a[s[h]]=h;var d=r(),f=[1|d[0],d[1],d[2],d[3],d[4],d[5]],m=16383&(d[6]<<8|d[7]),v=0,g=0,l=e;l.v1=function(t,e,i){var n=e&&i||0,o=e||[],s=void 0!==(t=t||{}).clockseq?t.clockseq:m,r=void 0!==t.msecs?t.msecs:(new Date).getTime(),a=void 0!==t.nsecs?t.nsecs:g+1,h=r-v+(a-g)/1e4;if(h<0&&void 0===t.clockseq&&(s=s+1&16383),(h<0||v<r)&&void 0===t.nsecs&&(a=0),1e4<=a)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");v=r,m=s;var d=(1e4*(268435455&(r+=122192928e5))+(g=a))%4294967296;o[n++]=d>>>24&255,o[n++]=d>>>16&255,o[n++]=d>>>8&255,o[n++]=255&d;var l=r/4294967296*1e4&268435455;o[n++]=l>>>8&255,o[n++]=255&l,o[n++]=l>>>24&15|16,o[n++]=l>>>16&255,o[n++]=s>>>8|128,o[n++]=255&s;for(var u=t.node||f,c=0;c<6;c++)o[n+c]=u[c];return e||p(o)},l.v4=e,l.parse=function(t,e,i){var n=e&&i||0,o=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){o<16&&(e[n+o++]=a[t])});o<16;)e[n+o++]=0;return e},l.unparse=p,u.exports=l}).call(t,e(158))},function(WLb,XLb){var YLb;YLb=function(){return this}();try{YLb=YLb||Function("return this")()||eval("this")}catch(WLb){"object"==typeof window&&(YLb=window)}WLb.exports=YLb},function(t,e,i){e.util=i(2),e.DOMutil=i(14),e.DataSet=i(11),e.DataView=i(12),e.Queue=i(43),e.Graph3d=i(161),e.graph3d={Camera:i(95),Filter:i(96),Point2d:i(91),Point3d:i(34),Slider:i(92),StepNumber:i(93)},e.moment=i(9),e.Hammer=i(10),e.keycharm=i(35)},function(t,e,i){var n=i(7),o=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,e,i){function _(t,e,i){if(!(this instanceof _))throw new SyntaxError("Constructor must be called with the new operator");this.containerElement=t,this.dataGroup=new m,this.dataPoints=null,this.create(),a.setDefaults(_.DEFAULTS,this),this.colX=void 0,this.colY=void 0,this.colZ=void 0,this.colValue=void 0,this.setOptions(i),this.setData(e)}function u(t){return"clientX"in t?t.clientX:t.targetTouches[0]&&t.targetTouches[0].clientX||0}function c(t){return"clientY"in t?t.clientY:t.targetTouches[0]&&t.targetTouches[0].clientY||0}var n,o=i(90),l=(n=o)&&n.__esModule?n:{default:n},s=i(44),p=i(2),N=i(34),R=i(91),r=i(92),A=i(93),a=i(94),h=i(15).default,d=i(15).printStyle,f=i(172).allOptions,m=i(173);_.STYLE=a.STYLE,_.DEFAULTS={width:"400px",height:"400px",filterLabel:"time",legendLabel:"value",xLabel:"x",yLabel:"y",zLabel:"z",xValueLabel:function(t){return t},yValueLabel:function(t){return t},zValueLabel:function(t){return t},showXAxis:!0,showYAxis:!0,showZAxis:!0,showGrid:!0,showPerspective:!0,showShadow:!1,keepAspectRatio:!0,verticalRatio:.5,dotSizeRatio:.02,dotSizeMinFraction:.5,dotSizeMaxFraction:2.5,showAnimationControls:void 0,animationInterval:1e3,animationPreload:!1,animationAutoStart:void 0,axisColor:"#4D4D4D",gridColor:"#D3D3D3",xCenter:"55%",yCenter:"50%",style:_.STYLE.DOT,tooltip:!1,tooltipStyle:{content:{padding:"10px",border:"1px solid #4d4d4d",color:"#1a1a1a",background:"rgba(255,255,255,0.7)",borderRadius:"2px",boxShadow:"5px 5px 10px rgba(128,128,128,0.5)"},line:{height:"40px",width:"0",borderLeft:"1px solid #4d4d4d"},dot:{height:"0",width:"0",border:"5px solid #4d4d4d",borderRadius:"5px"}},dataColor:{fill:"#7DC1FF",stroke:"#3267D2",strokeWidth:1},cameraPosition:{horizontal:1,vertical:.5,distance:1.7},showLegend:void 0,backgroundColor:void 0,xBarWidth:void 0,yBarWidth:void 0,valueMin:void 0,valueMax:void 0,xMin:void 0,xMax:void 0,xStep:void 0,yMin:void 0,yMax:void 0,yStep:void 0,zMin:void 0,zMax:void 0,zStep:void 0},s(_.prototype),_.prototype._setScale=function(){this.scale=new N(1/this.xRange.range(),1/this.yRange.range(),1/this.zRange.range()),this.keepAspectRatio&&(this.scale.x<this.scale.y?this.scale.y=this.scale.x:this.scale.x=this.scale.y),this.scale.z*=this.verticalRatio,void 0!==this.valueRange&&(this.scale.value=1/this.valueRange.range());var t=this.xRange.center()*this.scale.x,e=this.yRange.center()*this.scale.y,i=this.zRange.center()*this.scale.z;this.camera.setArmLocation(t,e,i)},_.prototype._convert3Dto2D=function(t){var e=this._convertPointToTranslation(t);return this._convertTranslationToScreen(e)},_.prototype._convertPointToTranslation=function(t){var e=this.camera.getCameraLocation(),i=this.camera.getCameraRotation(),n=t.x*this.scale.x,o=t.y*this.scale.y,s=t.z*this.scale.z,r=e.x,a=e.y,h=e.z,d=Math.sin(i.x),l=Math.cos(i.x),u=Math.sin(i.y),c=Math.cos(i.y),p=Math.sin(i.z),f=Math.cos(i.z);return new N(c*(p*(o-a)+f*(n-r))-u*(s-h),d*(c*(s-h)+u*(p*(o-a)+f*(n-r)))+l*(f*(o-a)-p*(n-r)),l*(c*(s-h)+u*(p*(o-a)+f*(n-r)))-d*(f*(o-a)-p*(n-r)))},_.prototype._convertTranslationToScreen=function(t){var e,i,n=this.eye.x,o=this.eye.y,s=this.eye.z,r=t.x,a=t.y,h=t.z;return i=this.showPerspective?(e=s/h*(r-n),s/h*(a-o)):(e=r*(-s/this.camera.getArmLength()),a*(-s/this.camera.getArmLength())),new R(this.currentXCenter+e*this.frame.canvas.clientWidth,this.currentYCenter-i*this.frame.canvas.clientWidth)},_.prototype._calcTranslations=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.trans=this._convertPointToTranslation(i.point),i.screen=this._convertTranslationToScreen(i.trans);var n=this._convertPointToTranslation(i.bottom);i.dist=this.showPerspective?n.length():-n.z}t.sort(function(t,e){return e.dist-t.dist})},_.prototype._initializeRanges=function(){var t=this.dataGroup;this.xRange=t.xRange,this.yRange=t.yRange,this.zRange=t.zRange,this.valueRange=t.valueRange,this.xStep=t.xStep,this.yStep=t.yStep,this.zStep=t.zStep,this.xBarWidth=t.xBarWidth,this.yBarWidth=t.yBarWidth,this.colX=t.colX,this.colY=t.colY,this.colZ=t.colZ,this.colValue=t.colValue,this._setScale()},_.prototype.getDataPoints=function(t){for(var e=[],i=0;i<t.length;i++){var n=new N;n.x=t[i][this.colX]||0,n.y=t[i][this.colY]||0,n.z=t[i][this.colZ]||0,n.data=t[i],void 0!==this.colValue&&(n.value=t[i][this.colValue]||0);var o={};o.point=n,o.bottom=new N(n.x,n.y,this.zRange.min),o.trans=void 0,o.screen=void 0,e.push(o)}return e},_.prototype._getDataPoints=function(t){var e,i,n,o,s=[];if(this.style===_.STYLE.GRID||this.style===_.STYLE.SURFACE){var r=this.dataGroup.getDistinctValues(this.colX,t),a=this.dataGroup.getDistinctValues(this.colY,t);s=this.getDataPoints(t);var h=[];for(n=0;n<s.length;n++){o=s[n];var d=r.indexOf(o.point.x),l=a.indexOf(o.point.y);void 0===h[d]&&(h[d]=[]),h[d][l]=o}for(e=0;e<h.length;e++)for(i=0;i<h[e].length;i++)h[e][i]&&(h[e][i].pointRight=e<h.length-1?h[e+1][i]:void 0,h[e][i].pointTop=i<h[e].length-1?h[e][i+1]:void 0,h[e][i].pointCross=e<h.length-1&&i<h[e].length-1?h[e+1][i+1]:void 0)}else if(this._checkValueField(t),s=this.getDataPoints(t),this.style===_.STYLE.LINE)for(n=0;n<s.length;n++)0<n&&(s[n-1].pointNext=s[n]);return s},_.prototype.create=function(){for(;this.containerElement.hasChildNodes();)this.containerElement.removeChild(this.containerElement.firstChild);this.frame=document.createElement("div"),this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas);var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t),this.frame.filter=document.createElement("div"),this.frame.filter.style.position="absolute",this.frame.filter.style.bottom="0px",this.frame.filter.style.left="0px",this.frame.filter.style.width="100%",this.frame.appendChild(this.frame.filter);var e=this;p.addEventListener(this.frame.canvas,"mousedown",function(t){e._onMouseDown(t)}),p.addEventListener(this.frame.canvas,"touchstart",function(t){e._onTouchStart(t)}),p.addEventListener(this.frame.canvas,"mousewheel",function(t){e._onWheel(t)}),p.addEventListener(this.frame.canvas,"mousemove",function(t){e._onTooltip(t)}),p.addEventListener(this.frame.canvas,"click",function(t){e._onClick(t)}),this.containerElement.appendChild(this.frame)},_.prototype._setSize=function(t,e){this.frame.style.width=t,this.frame.style.height=e,this._resizeCanvas()},_.prototype._resizeCanvas=function(){this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=this.frame.canvas.clientWidth,this.frame.canvas.height=this.frame.canvas.clientHeight,this.frame.filter.style.width=this.frame.canvas.clientWidth-20+"px"},_.prototype.animationStart=function(){if(this.animationAutoStart&&this.dataGroup.dataFilter){if(!this.frame.filter||!this.frame.filter.slider)throw new Error("No animation available");this.frame.filter.slider.play()}},_.prototype.animationStop=function(){this.frame.filter&&this.frame.filter.slider&&this.frame.filter.slider.stop()},_.prototype._resizeCenter=function(){"%"===this.xCenter.charAt(this.xCenter.length-1)?this.currentXCenter=parseFloat(this.xCenter)/100*this.frame.canvas.clientWidth:this.currentXCenter=parseFloat(this.xCenter),"%"===this.yCenter.charAt(this.yCenter.length-1)?this.currentYCenter=parseFloat(this.yCenter)/100*(this.frame.canvas.clientHeight-this.frame.filter.clientHeight):this.currentYCenter=parseFloat(this.yCenter)},_.prototype.getCameraPosition=function(){var t=this.camera.getArmRotation();return t.distance=this.camera.getArmLength(),t},_.prototype._readData=function(t){this.dataPoints=this.dataGroup.initializeData(this,t,this.style),this._initializeRanges(),this._redrawFilter()},_.prototype.setData=function(t){null!=t&&(this._readData(t),this.redraw(),this.animationStart())},_.prototype.setOptions=function(t){void 0!==t&&(!0===h.validate(t,f)&&console.log("%cErrors have been found in the supplied options object.",d),this.animationStop(),a.setOptions(t,this),this.setPointDrawingMethod(),this._setSize(this.width,this.height),this.setData(this.dataGroup.getDataTable()),this.animationStart())},_.prototype.setPointDrawingMethod=function(){var t=void 0;switch(this.style){case _.STYLE.BAR:t=_.prototype._redrawBarGraphPoint;break;case _.STYLE.BARCOLOR:t=_.prototype._redrawBarColorGraphPoint;break;case _.STYLE.BARSIZE:t=_.prototype._redrawBarSizeGraphPoint;break;case _.STYLE.DOT:t=_.prototype._redrawDotGraphPoint;break;case _.STYLE.DOTLINE:t=_.prototype._redrawDotLineGraphPoint;break;case _.STYLE.DOTCOLOR:t=_.prototype._redrawDotColorGraphPoint;break;case _.STYLE.DOTSIZE:t=_.prototype._redrawDotSizeGraphPoint;break;case _.STYLE.SURFACE:t=_.prototype._redrawSurfaceGraphPoint;break;case _.STYLE.GRID:t=_.prototype._redrawGridGraphPoint;break;case _.STYLE.LINE:t=_.prototype._redrawLineGraphPoint;break;default:throw new Error("Can not determine point drawing method for graph style '"+this.style+"'")}this._pointDrawingMethod=t},_.prototype.redraw=function(){if(void 0===this.dataPoints)throw new Error("Graph data not initialized");this._resizeCanvas(),this._resizeCenter(),this._redrawSlider(),this._redrawClear(),this._redrawAxis(),this._redrawDataGraph(),this._redrawInfo(),this._redrawLegend()},_.prototype._getContext=function(){var t=this.frame.canvas.getContext("2d");return t.lineJoin="round",t.lineCap="round",t},_.prototype._redrawClear=function(){var t=this.frame.canvas;t.getContext("2d").clearRect(0,0,t.width,t.height)},_.prototype._dotSize=function(){return this.frame.clientWidth*this.dotSizeRatio},_.prototype._getLegendWidth=function(){return this.style===_.STYLE.DOTSIZE?this._dotSize()*this.dotSizeMaxFraction:this.style===_.STYLE.BARSIZE?this.xBarWidth:20},_.prototype._redrawLegend=function(){if(!0===this.showLegend&&this.style!==_.STYLE.LINE&&this.style!==_.STYLE.BARSIZE){var t=this.style===_.STYLE.BARSIZE||this.style===_.STYLE.DOTSIZE,e=this.style===_.STYLE.DOTSIZE||this.style===_.STYLE.DOTCOLOR||this.style===_.STYLE.BARCOLOR,i=Math.max(.25*this.frame.clientHeight,100),n=this.margin,o=this._getLegendWidth(),s=this.frame.clientWidth-this.margin,r=s-o,a=n+i,h=this._getContext();if(h.lineWidth=1,!(h.font="14px arial")==t){var d,l=i;for(d=0;d<l;d++){var u=240*((d-0)/(l-0)),c=this._hsv2rgb(u,1,1);h.strokeStyle=c,h.beginPath(),h.moveTo(r,n+d),h.lineTo(s,n+d),h.stroke()}h.strokeStyle=this.axisColor,h.strokeRect(r,n,o,i)}else{var p;this.style===_.STYLE.DOTSIZE?p=o*(this.dotSizeMinFraction/this.dotSizeMaxFraction):(this.style,_.STYLE.BARSIZE),h.strokeStyle=this.axisColor,h.fillStyle=this.dataColor.fill,h.beginPath(),h.moveTo(r,n),h.lineTo(s,n),h.lineTo(r+p,a),h.lineTo(r,a),h.closePath(),h.fill(),h.stroke()}var f,m,v=e?this.valueRange.min:this.zRange.min,g=e?this.valueRange.max:this.zRange.max,y=new A(v,g,(g-v)/5,!0);for(y.start(!0);!y.end();)d=a-(y.getCurrent()-v)/(g-v)*i,f=new R(r-5,d),m=new R(r,d),this._line(h,f,m),h.textAlign="right",h.textBaseline="middle",h.fillStyle=this.axisColor,h.fillText(y.getCurrent(),r-10,d),y.next();h.textAlign="right",h.textBaseline="top";var b=this.legendLabel;h.fillText(b,s,a+this.margin)}},_.prototype._redrawFilter=function(){var t=this.dataGroup.dataFilter,e=this.frame.filter;if(e.innerHTML="",t){var i={visible:this.showAnimationControls},n=new r(e,i);e.slider=n,e.style.padding="10px",n.setValues(t.values),n.setPlayInterval(this.animationInterval);var o=this;n.setOnChangeCallback(function(){var t=o.dataGroup.dataFilter,e=n.getIndex();t.selectValue(e),o.dataPoints=t._getDataPoints(),o.redraw()})}else e.slider=void 0},_.prototype._redrawSlider=function(){void 0!==this.frame.filter.slider&&this.frame.filter.slider.redraw()},_.prototype._redrawInfo=function(){var t=this.dataGroup.getInfo();if(void 0!==t){var e=this._getContext();e.font="14px arial",e.lineStyle="gray",e.fillStyle="gray",e.textAlign="left",e.textBaseline="top";var i=this.margin,n=this.margin;e.fillText(t,i,n)}},_.prototype._line=function(t,e,i,n){void 0!==n&&(t.strokeStyle=n),t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.stroke()},_.prototype.drawAxisLabelX=function(t,e,i,n,o){void 0===o&&(o=0);var s=this._convert3Dto2D(e);0<Math.cos(2*n)?(t.textAlign="center",t.textBaseline="top",s.y+=o):(Math.sin(2*n)<0?t.textAlign="right":t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(i,s.x,s.y)},_.prototype.drawAxisLabelY=function(t,e,i,n,o){void 0===o&&(o=0);var s=this._convert3Dto2D(e);Math.cos(2*n)<0?(t.textAlign="center",t.textBaseline="top",s.y+=o):(0<Math.sin(2*n)?t.textAlign="right":t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(i,s.x,s.y)},_.prototype.drawAxisLabelZ=function(t,e,i,n){void 0===n&&(n=0);var o=this._convert3Dto2D(e);t.textAlign="right",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(i,o.x-n,o.y)},_.prototype._line3d=function(t,e,i,n){var o=this._convert3Dto2D(e),s=this._convert3Dto2D(i);this._line(t,o,s,n)},_.prototype._redrawAxis=function(){var t,e,i,n,o,s,r,a,h,d,l=this._getContext();l.font=24/this.camera.getArmLength()+"px arial";var u,c,p,f=.025/this.scale.x,m=.025/this.scale.y,v=5/this.camera.getArmLength(),g=this.camera.getArmRotation().horizontal,y=new R(Math.cos(g),Math.sin(g)),b=this.xRange,_=this.yRange,w=this.zRange;for(l.lineWidth=1,n=void 0===this.defaultXStep,(i=new A(b.min,b.max,this.xStep,n)).start(!0);!i.end();){var x=i.getCurrent();if(this.showGrid?(t=new N(x,_.min,w.min),e=new N(x,_.max,w.min),this._line3d(l,t,e,this.gridColor)):this.showXAxis&&(t=new N(x,_.min,w.min),e=new N(x,_.min+f,w.min),this._line3d(l,t,e,this.axisColor),t=new N(x,_.max,w.min),e=new N(x,_.max-f,w.min),this._line3d(l,t,e,this.axisColor)),this.showXAxis){r=0<y.x?_.min:_.max,u=new N(x,r,w.min);var k=" "+this.xValueLabel(x)+" ";this.drawAxisLabelX(l,u,k,g,v)}i.next()}for(l.lineWidth=1,n=void 0===this.defaultYStep,(i=new A(_.min,_.max,this.yStep,n)).start(!0);!i.end();){var S=i.getCurrent();if(this.showGrid?(t=new N(b.min,S,w.min),e=new N(b.max,S,w.min),this._line3d(l,t,e,this.gridColor)):this.showYAxis&&(t=new N(b.min,S,w.min),e=new N(b.min+m,S,w.min),this._line3d(l,t,e,this.axisColor),t=new N(b.max,S,w.min),e=new N(b.max-m,S,w.min),this._line3d(l,t,e,this.axisColor)),this.showYAxis){s=0<y.y?b.min:b.max,u=new N(s,S,w.min);var D=" "+this.yValueLabel(S)+" ";this.drawAxisLabelY(l,u,D,g,v)}i.next()}if(this.showZAxis){for(l.lineWidth=1,n=void 0===this.defaultZStep,(i=new A(w.min,w.max,this.zStep,n)).start(!0),s=0<y.x?b.min:b.max,r=y.y<0?_.min:_.max;!i.end();){var E=i.getCurrent(),M=new N(s,r,E),O=this._convert3Dto2D(M);e=new R(O.x-v,O.y),this._line(l,O,e,this.axisColor);var C=this.zValueLabel(E)+" ";this.drawAxisLabelZ(l,M,C,5),i.next()}l.lineWidth=1,t=new N(s,r,w.min),e=new N(s,r,w.max),this._line3d(l,t,e,this.axisColor)}this.showXAxis&&(l.lineWidth=1,c=new N(b.min,_.min,w.min),p=new N(b.max,_.min,w.min),this._line3d(l,c,p,this.axisColor),c=new N(b.min,_.max,w.min),p=new N(b.max,_.max,w.min),this._line3d(l,c,p,this.axisColor));this.showYAxis&&(l.lineWidth=1,t=new N(b.min,_.min,w.min),e=new N(b.min,_.max,w.min),this._line3d(l,t,e,this.axisColor),t=new N(b.max,_.min,w.min),e=new N(b.max,_.max,w.min),this._line3d(l,t,e,this.axisColor));var T=this.xLabel;0<T.length&&this.showXAxis&&(d=.1/this.scale.y,s=(b.max+3*b.min)/4,r=0<y.x?_.min-d:_.max+d,o=new N(s,r,w.min),this.drawAxisLabelX(l,o,T,g));var I=this.yLabel;0<I.length&&this.showYAxis&&(h=.1/this.scale.x,s=0<y.y?b.min-h:b.max+h,r=(_.max+3*_.min)/4,o=new N(s,r,w.min),this.drawAxisLabelY(l,o,I,g));var P=this.zLabel;0<P.length&&this.showZAxis&&(s=0<y.x?b.min:b.max,r=y.y<0?_.min:_.max,a=(w.max+3*w.min)/4,o=new N(s,r,a),this.drawAxisLabelZ(l,o,P,30))},_.prototype._hsv2rgb=function(t,e,i){var n,o,s,r,a,h;switch(r=i*e,a=Math.floor(t/60),h=r*(1-Math.abs(t/60%2-1)),a){case 0:n=r,o=h,s=0;break;case 1:n=h,o=r,s=0;break;case 2:n=0,o=r,s=h;break;case 3:n=0,o=h,s=r;break;case 4:n=h,o=0,s=r;break;case 5:n=r,o=0,s=h;break;default:s=o=n=0}return"RGB("+parseInt(255*n)+","+parseInt(255*o)+","+parseInt(255*s)+")"},_.prototype._getStrokeWidth=function(t){return void 0!==t?this.showPerspective?1/-t.trans.z*this.dataColor.strokeWidth:-this.eye.z/this.camera.getArmLength()*this.dataColor.strokeWidth:this.dataColor.strokeWidth},_.prototype._redrawBar=function(t,e,i,n,o,s){var r,a=this,h=e.point,d=this.zRange.min,l=[{point:new N(h.x-i,h.y-n,h.z)},{point:new N(h.x+i,h.y-n,h.z)},{point:new N(h.x+i,h.y+n,h.z)},{point:new N(h.x-i,h.y+n,h.z)}],u=[{point:new N(h.x-i,h.y-n,d)},{point:new N(h.x+i,h.y-n,d)},{point:new N(h.x+i,h.y+n,d)},{point:new N(h.x-i,h.y+n,d)}];l.forEach(function(t){t.screen=a._convert3Dto2D(t.point)}),u.forEach(function(t){t.screen=a._convert3Dto2D(t.point)});var c=[{corners:l,center:N.avg(u[0].point,u[2].point)},{corners:[l[0],l[1],u[1],u[0]],center:N.avg(u[1].point,u[0].point)},{corners:[l[1],l[2],u[2],u[1]],center:N.avg(u[2].point,u[1].point)},{corners:[l[2],l[3],u[3],u[2]],center:N.avg(u[3].point,u[2].point)},{corners:[l[3],l[0],u[0],u[3]],center:N.avg(u[0].point,u[3].point)}];e.surfaces=c;for(var p=0;p<c.length;p++){r=c[p];var f=this._convertPointToTranslation(r.center);r.dist=this.showPerspective?f.length():-f.z}c.sort(function(t,e){return e.dist-t.dist||(t.corners===l?1:e.corners===l?-1:0)}),t.lineWidth=this._getStrokeWidth(e),t.strokeStyle=s,t.fillStyle=o;for(var m=2;m<c.length;m++)r=c[m],this._polygon(t,r.corners)},_.prototype._polygon=function(t,e,i,n){if(!(e.length<2)){void 0!==i&&(t.fillStyle=i),void 0!==n&&(t.strokeStyle=n),t.beginPath(),t.moveTo(e[0].screen.x,e[0].screen.y);for(var o=1;o<e.length;++o){var s=e[o];t.lineTo(s.screen.x,s.screen.y)}t.closePath(),t.fill(),t.stroke()}},_.prototype._drawCircle=function(t,e,i,n,o){var s=this._calcRadius(e,o);t.lineWidth=this._getStrokeWidth(e),t.strokeStyle=n,t.fillStyle=i,t.beginPath(),t.arc(e.screen.x,e.screen.y,s,0,2*Math.PI,!0),t.fill(),t.stroke()},_.prototype._getColorsRegular=function(t){var e=240*(1-(t.point.z-this.zRange.min)*this.scale.z/this.verticalRatio);return{fill:this._hsv2rgb(e,1,1),border:this._hsv2rgb(e,1,.8)}},_.prototype._getColorsColor=function(t){var e,i;if("string"==typeof t.point.value)e=t.point.value,i=t.point.value;else{var n=240*(1-(t.point.value-this.valueRange.min)*this.scale.value);e=this._hsv2rgb(n,1,1),i=this._hsv2rgb(n,1,.8)}return{fill:e,border:i}},_.prototype._getColorsSize=function(){return{fill:this.dataColor.fill,border:this.dataColor.stroke}},_.prototype._calcRadius=function(t,e){var i;return void 0===e&&(e=this._dotSize()),(i=this.showPerspective?e/-t.trans.z:e*(-this.eye.z/this.camera.getArmLength()))<0&&(i=0),i},_.prototype._redrawBarGraphPoint=function(t,e){var i=this.xBarWidth/2,n=this.yBarWidth/2,o=this._getColorsRegular(e);this._redrawBar(t,e,i,n,o.fill,o.border)},_.prototype._redrawBarColorGraphPoint=function(t,e){var i=this.xBarWidth/2,n=this.yBarWidth/2,o=this._getColorsColor(e);this._redrawBar(t,e,i,n,o.fill,o.border)},_.prototype._redrawBarSizeGraphPoint=function(t,e){var i=(e.point.value-this.valueRange.min)/this.valueRange.range(),n=this.xBarWidth/2*(.8*i+.2),o=this.yBarWidth/2*(.8*i+.2),s=this._getColorsSize();this._redrawBar(t,e,n,o,s.fill,s.border)},_.prototype._redrawDotGraphPoint=function(t,e){var i=this._getColorsRegular(e);this._drawCircle(t,e,i.fill,i.border)},_.prototype._redrawDotLineGraphPoint=function(t,e){var i=this._convert3Dto2D(e.bottom);t.lineWidth=1,this._line(t,i,e.screen,this.gridColor),this._redrawDotGraphPoint(t,e)},_.prototype._redrawDotColorGraphPoint=function(t,e){var i=this._getColorsColor(e);this._drawCircle(t,e,i.fill,i.border)},_.prototype._redrawDotSizeGraphPoint=function(t,e){var i=this._dotSize(),n=(e.point.value-this.valueRange.min)/this.valueRange.range(),o=i*this.dotSizeMinFraction,s=o+(i*this.dotSizeMaxFraction-o)*n,r=this._getColorsSize();this._drawCircle(t,e,r.fill,r.border,s)},_.prototype._redrawSurfaceGraphPoint=function(t,e){var i=e.pointRight,n=e.pointTop,o=e.pointCross;if(void 0!==e&&void 0!==i&&void 0!==n&&void 0!==o){var s,r,a=!0;if(this.showGrayBottom||this.showShadow){var h=N.subtract(o.trans,e.trans),d=N.subtract(n.trans,i.trans),l=N.crossProduct(h,d),u=l.length();a=0<l.z}if(a){var c,p=240*(1-((e.point.z+i.point.z+n.point.z+o.point.z)/4-this.zRange.min)*this.scale.z/this.verticalRatio);r=this.showShadow?(c=Math.min(1+l.x/u/2,1),s=this._hsv2rgb(p,1,c)):(c=1,s=this._hsv2rgb(p,1,c),this.axisColor)}else s="gray",r=this.axisColor;t.lineWidth=this._getStrokeWidth(e);var f=[e,i,o,n];this._polygon(t,f,s,r)}},_.prototype._drawGridLine=function(t,e,i){if(void 0!==e&&void 0!==i){var n=240*(1-((e.point.z+i.point.z)/2-this.zRange.min)*this.scale.z/this.verticalRatio);t.lineWidth=2*this._getStrokeWidth(e),t.strokeStyle=this._hsv2rgb(n,1,1),this._line(t,e.screen,i.screen)}},_.prototype._redrawGridGraphPoint=function(t,e){this._drawGridLine(t,e,e.pointRight),this._drawGridLine(t,e,e.pointTop)},_.prototype._redrawLineGraphPoint=function(t,e){void 0!==e.pointNext&&(t.lineWidth=this._getStrokeWidth(e),t.strokeStyle=this.dataColor.stroke,this._line(t,e.screen,e.pointNext.screen))},_.prototype._redrawDataGraph=function(){var t,e=this._getContext();if(!(void 0===this.dataPoints||this.dataPoints.length<=0))for(this._calcTranslations(this.dataPoints),t=0;t<this.dataPoints.length;t++){var i=this.dataPoints[t];this._pointDrawingMethod.call(this,e,i)}},_.prototype._storeMousePosition=function(t){this.startMouseX=u(t),this.startMouseY=c(t),this._startCameraOffset=this.camera.getOffset()},_.prototype._onMouseDown=function(t){if(t=t||window.event,this.leftButtonDown&&this._onMouseUp(t),this.leftButtonDown=t.which?1===t.which:1===t.button,this.leftButtonDown||this.touchDown){this._storeMousePosition(t),this.startStart=new Date(this.start),this.startEnd=new Date(this.end),this.startArmRotation=this.camera.getArmRotation(),this.frame.style.cursor="move";var e=this;this.onmousemove=function(t){e._onMouseMove(t)},this.onmouseup=function(t){e._onMouseUp(t)},p.addEventListener(document,"mousemove",e.onmousemove),p.addEventListener(document,"mouseup",e.onmouseup),p.preventDefault(t)}},_.prototype._onMouseMove=function(t){this.moving=!0,t=t||window.event;var e=parseFloat(u(t))-this.startMouseX,i=parseFloat(c(t))-this.startMouseY;if(t&&!0===t.ctrlKey){var n=.5*this.frame.clientWidth,o=.5*this.frame.clientHeight,s=(this._startCameraOffset.x||0)-e/n*this.camera.armLength*.8,r=(this._startCameraOffset.y||0)+i/o*this.camera.armLength*.8;this.camera.setOffset(s,r),this._storeMousePosition(t)}else{var a=this.startArmRotation.horizontal+e/200,h=this.startArmRotation.vertical+i/200,d=Math.sin(4/360*2*Math.PI);Math.abs(Math.sin(a))<d&&(a=Math.round(a/Math.PI)*Math.PI-.001),Math.abs(Math.cos(a))<d&&(a=(Math.round(a/Math.PI-.5)+.5)*Math.PI-.001),Math.abs(Math.sin(h))<d&&(h=Math.round(h/Math.PI)*Math.PI),Math.abs(Math.cos(h))<d&&(h=(Math.round(h/Math.PI-.5)+.5)*Math.PI),this.camera.setArmRotation(a,h)}this.redraw();var l=this.getCameraPosition();this.emit("cameraPositionChange",l),p.preventDefault(t)},_.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",this.leftButtonDown=!1,p.removeEventListener(document,"mousemove",this.onmousemove),p.removeEventListener(document,"mouseup",this.onmouseup),p.preventDefault(t)},_.prototype._onClick=function(t){if(this.onclick_callback){if(this.moving)this.moving=!1;else{var e=this.frame.getBoundingClientRect(),i=u(t)-e.left,n=c(t)-e.top,o=this._dataPointFromXY(i,n);o&&this.onclick_callback(o.point.data)}p.preventDefault(t)}},_.prototype._onTooltip=function(t){var e=this.frame.getBoundingClientRect(),i=u(t)-e.left,n=c(t)-e.top;if(this.showTooltip){if(this.tooltipTimeout&&clearTimeout(this.tooltipTimeout),this.leftButtonDown)return void this._hideTooltip();if(this.tooltip&&this.tooltip.dataPoint){var o=this._dataPointFromXY(i,n);o!==this.tooltip.dataPoint&&(o?this._showTooltip(o):this._hideTooltip())}else{var s=this;this.tooltipTimeout=setTimeout(function(){s.tooltipTimeout=null;var t=s._dataPointFromXY(i,n);t&&s._showTooltip(t)},300)}}},_.prototype._onTouchStart=function(t){this.touchDown=!0;var e=this;this.ontouchmove=function(t){e._onTouchMove(t)},this.ontouchend=function(t){e._onTouchEnd(t)},p.addEventListener(document,"touchmove",e.ontouchmove),p.addEventListener(document,"touchend",e.ontouchend),this._onMouseDown(t)},_.prototype._onTouchMove=function(t){this._onMouseMove(t)},_.prototype._onTouchEnd=function(t){this.touchDown=!1,p.removeEventListener(document,"touchmove",this.ontouchmove),p.removeEventListener(document,"touchend",this.ontouchend),this._onMouseUp(t)},_.prototype._onWheel=function(t){var e=0;if((t=t||window.event).wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),e){var i=this.camera.getArmLength()*(1-e/10);this.camera.setArmLength(i),this.redraw(),this._hideTooltip()}var n=this.getCameraPosition();this.emit("cameraPositionChange",n),p.preventDefault(t)},_.prototype._insideTriangle=function(t,e){function i(t){return 0<t?1:t<0?-1:0}var n=e[0],o=e[1],s=e[2],r=i((o.x-n.x)*(t.y-n.y)-(o.y-n.y)*(t.x-n.x)),a=i((s.x-o.x)*(t.y-o.y)-(s.y-o.y)*(t.x-o.x)),h=i((n.x-s.x)*(t.y-s.y)-(n.y-s.y)*(t.x-s.x));return!(0!=r&&0!=a&&r!=a||0!=a&&0!=h&&a!=h||0!=r&&0!=h&&r!=h)},_.prototype._dataPointFromXY=function(t,e){var i,n=null,o=null,s=null,r=new R(t,e);if(this.style===_.STYLE.BAR||this.style===_.STYLE.BARCOLOR||this.style===_.STYLE.BARSIZE)for(i=this.dataPoints.length-1;0<=i;i--){var a=(n=this.dataPoints[i]).surfaces;if(a)for(var h=a.length-1;0<=h;h--){var d=a[h].corners,l=[d[0].screen,d[1].screen,d[2].screen],u=[d[2].screen,d[3].screen,d[0].screen];if(this._insideTriangle(r,l)||this._insideTriangle(r,u))return n}}else for(i=0;i<this.dataPoints.length;i++){var c=(n=this.dataPoints[i]).screen;if(c){var p=Math.abs(t-c.x),f=Math.abs(e-c.y),m=Math.sqrt(p*p+f*f);(null===s||m<s)&&m<100&&(s=m,o=n)}}return o},_.prototype.hasBars=function(t){return t==_.STYLE.BAR||t==_.STYLE.BARCOLOR||t==_.STYLE.BARSIZE},_.prototype._showTooltip=function(t){var e,i,n;this.tooltip?(e=this.tooltip.dom.content,i=this.tooltip.dom.line,n=this.tooltip.dom.dot):(e=document.createElement("div"),(0,l.default)(e.style,{},this.tooltipStyle.content),e.style.position="absolute",i=document.createElement("div"),(0,l.default)(i.style,{},this.tooltipStyle.line),i.style.position="absolute",n=document.createElement("div"),(0,l.default)(n.style,{},this.tooltipStyle.dot),n.style.position="absolute",this.tooltip={dataPoint:null,dom:{content:e,line:i,dot:n}}),this._hideTooltip(),this.tooltip.dataPoint=t,"function"==typeof this.showTooltip?e.innerHTML=this.showTooltip(t.point):e.innerHTML="<table><tr><td>"+this.xLabel+":</td><td>"+t.point.x+"</td></tr><tr><td>"+this.yLabel+":</td><td>"+t.point.y+"</td></tr><tr><td>"+this.zLabel+":</td><td>"+t.point.z+"</td></tr></table>",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(n);var o=e.offsetWidth,s=e.offsetHeight,r=i.offsetHeight,a=n.offsetWidth,h=n.offsetHeight,d=t.screen.x-o/2;d=Math.min(Math.max(d,10),this.frame.clientWidth-10-o),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-r+"px",e.style.left=d+"px",e.style.top=t.screen.y-r-s+"px",n.style.left=t.screen.x-a/2+"px",n.style.top=t.screen.y-h/2+"px"},_.prototype._hideTooltip=function(){if(this.tooltip)for(var t in this.tooltip.dataPoint=null,this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}},_.prototype.setCameraPosition=function(t){a.setCameraPosition(t,this),this.redraw()},_.prototype.setSize=function(t,e){this._setSize(t,e),this.redraw()},t.exports=_},function(t,e,i){i(163),t.exports=i(7).Object.assign},function(t,e,i){var n=i(17);n(n.S+n.F,"Object",{assign:i(164)})},function(t,e,i){var c=i(33),p=i(63),f=i(42),m=i(41),v=i(78),o=Object.assign;t.exports=!o||i(28)(function(){var t={},e={},i=Symbol(),n="abcdefghijklmnopqrst";return t[i]=7,n.split("").forEach(function(t){e[t]=t}),7!=o({},t)[i]||Object.keys(o({},e)).join("")!=n})?function(t,e){for(var i=m(t),n=arguments.length,o=1,s=p.f,r=f.f;o<n;)for(var a,h=v(arguments[o++]),d=s?c(h).concat(s(h)):c(h),l=d.length,u=0;u<l;)r.call(h,a=d[u++])&&(i[a]=h[a]);return i}:o},function(t,e,i){t.exports={default:i(166),__esModule:!0}},function(t,e,i){i(167),t.exports=i(7).Math.sign},function(t,e,i){var n=i(17);n(n.S,"Math",{sign:i(168)})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,i){t.exports={default:i(170),__esModule:!0}},function(t,e,i){i(171);var n=i(7).Object;t.exports=function(t,e,i){return n.defineProperty(t,e,i)}},function(t,e,i){var n=i(17);n(n.S+n.F*!i(21),"Object",{defineProperty:i(20).f})},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var n="string",o="boolean",s="number",r={fill:{string:n},stroke:{string:n},strokeWidth:{number:s},__type__:{string:n,object:"object",undefined:"undefined"}},a={animationAutoStart:{boolean:o,undefined:"undefined"},animationInterval:{number:s},animationPreload:{boolean:o},axisColor:{string:n},backgroundColor:r,xBarWidth:{number:s,undefined:"undefined"},yBarWidth:{number:s,undefined:"undefined"},cameraPosition:{distance:{number:s},horizontal:{number:s},vertical:{number:s},__type__:{object:"object"}},xCenter:{string:n},yCenter:{string:n},dataColor:r,dotSizeMinFraction:{number:s},dotSizeMaxFraction:{number:s},dotSizeRatio:{number:s},filterLabel:{string:n},gridColor:{string:n},onclick:{function:"function"},keepAspectRatio:{boolean:o},xLabel:{string:n},yLabel:{string:n},zLabel:{string:n},legendLabel:{string:n},xMin:{number:s,undefined:"undefined"},yMin:{number:s,undefined:"undefined"},zMin:{number:s,undefined:"undefined"},xMax:{number:s,undefined:"undefined"},yMax:{number:s,undefined:"undefined"},zMax:{number:s,undefined:"undefined"},showAnimationControls:{boolean:o,undefined:"undefined"},showGrid:{boolean:o},showLegend:{boolean:o,undefined:"undefined"},showPerspective:{boolean:o},showShadow:{boolean:o},showXAxis:{boolean:o},showYAxis:{boolean:o},showZAxis:{boolean:o},xStep:{number:s,undefined:"undefined"},yStep:{number:s,undefined:"undefined"},zStep:{number:s,undefined:"undefined"},style:{number:s,string:["bar","bar-color","bar-size","dot","dot-line","dot-color","dot-size","line","grid","surface"]},tooltip:{boolean:o,function:"function"},tooltipStyle:{content:{color:{string:n},background:{string:n},border:{string:n},borderRadius:{string:n},boxShadow:{string:n},padding:{string:n},__type__:{object:"object"}},line:{borderLeft:{string:n},height:{string:n},width:{string:n},__type__:{object:"object"}},dot:{border:{string:n},borderRadius:{string:n},height:{string:n},width:{string:n},__type__:{object:"object"}},__type__:{object:"object"}},xValueLabel:{function:"function"},yValueLabel:{function:"function"},zValueLabel:{function:"function"},valueMax:{number:s,undefined:"undefined"},valueMin:{number:s,undefined:"undefined"},verticalRatio:{number:s},height:{string:n},width:{string:n},__type__:{object:"object"}};e.allOptions=a},function(t,e,i){function n(){this.dataTable=null}var a=i(11),h=i(12),s=i(174),d=i(96),o=i(94),r=i(34);n.prototype.initializeData=function(t,e,i){if(void 0!==e){var n;if(Array.isArray(e)&&(e=new a(e)),!(e instanceof a||e instanceof h))throw new Error("Array, DataSet, or DataView expected");if(0!=(n=e.get()).length){this.style=i,this.dataSet&&this.dataSet.off("*",this._onChange),this.dataSet=e,this.dataTable=n;var o=this;this._onChange=function(){t.setData(o.dataSet)},this.dataSet.on("*",this._onChange),this.colX="x",this.colY="y",this.colZ="z";var s=t.hasBars(i);if(s&&(void 0!==t.defaultXBarWidth?this.xBarWidth=t.defaultXBarWidth:this.xBarWidth=this.getSmallestDifference(n,this.colX)||1,void 0!==t.defaultYBarWidth?this.yBarWidth=t.defaultYBarWidth:this.yBarWidth=this.getSmallestDifference(n,this.colY)||1),this._initializeRange(n,this.colX,t,s),this._initializeRange(n,this.colY,t,s),this._initializeRange(n,this.colZ,t,!1),n[0].hasOwnProperty("style")){this.colValue="style";var r=this.getColumnRange(n,this.colValue);this._setRangeDefaults(r,t.defaultValueMin,t.defaultValueMax),this.valueRange=r}return this.getDataTable()[0].hasOwnProperty("filter")&&void 0===this.dataFilter&&(this.dataFilter=new d(this,"filter",t),this.dataFilter.setOnLoadCallback(function(){t.redraw()})),this.dataFilter?this.dataFilter._getDataPoints():this._getDataPoints(this.getDataTable())}}},n.prototype._collectRangeSettings=function(t,e){if(-1==["x","y","z"].indexOf(t))throw new Error("Column '"+t+"' invalid");var i=t.toUpperCase();return{barWidth:this[t+"BarWidth"],min:e["default"+i+"Min"],max:e["default"+i+"Max"],step:e["default"+i+"Step"],range_label:t+"Range",step_label:t+"Step"}},n.prototype._initializeRange=function(t,e,i,n){var o=this._collectRangeSettings(e,i),s=this.getColumnRange(t,e);n&&"z"!=e&&s.expand(o.barWidth/2),this._setRangeDefaults(s,o.min,o.max),this[o.range_label]=s,this[o.step_label]=void 0!==o.step?o.step:s.range()/5},n.prototype.getDistinctValues=function(t,e){void 0===e&&(e=this.dataTable);for(var i=[],n=0;n<e.length;n++){var o=e[n][t]||0;-1===i.indexOf(o)&&i.push(o)}return i.sort(function(t,e){return t-e})},n.prototype.getSmallestDifference=function(t,e){for(var i=this.getDistinctValues(t,e),n=null,o=1;o<i.length;o++){var s=i[o]-i[o-1];(null==n||s<n)&&(n=s)}return n},n.prototype.getColumnRange=function(t,e){for(var i=new s,n=0;n<t.length;n++){var o=t[n][e];i.adjust(o)}return i},n.prototype.getNumberOfRows=function(){return this.dataTable.length},n.prototype._setRangeDefaults=function(t,e,i){void 0!==e&&(t.min=e),void 0!==i&&(t.max=i),t.max<=t.min&&(t.max=t.min+1)},n.prototype.getDataTable=function(){return this.dataTable},n.prototype.getDataSet=function(){return this.dataSet},n.prototype.getDataPoints=function(t){for(var e=[],i=0;i<t.length;i++){var n=new r;n.x=t[i][this.colX]||0,n.y=t[i][this.colY]||0,n.z=t[i][this.colZ]||0,n.data=t[i],void 0!==this.colValue&&(n.value=t[i][this.colValue]||0);var o={};o.point=n,o.bottom=new r(n.x,n.y,this.zRange.min),o.trans=void 0,o.screen=void 0,e.push(o)}return e},n.prototype.initDataAsMatrix=function(t){var e,i,n,o,s=this.getDistinctValues(this.colX,t),r=this.getDistinctValues(this.colY,t),a=this.getDataPoints(t),h=[];for(n=0;n<a.length;n++){o=a[n];var d=s.indexOf(o.point.x),l=r.indexOf(o.point.y);void 0===h[d]&&(h[d]=[]),h[d][l]=o}for(e=0;e<h.length;e++)for(i=0;i<h[e].length;i++)h[e][i]&&(h[e][i].pointRight=e<h.length-1?h[e+1][i]:void 0,h[e][i].pointTop=i<h[e].length-1?h[e][i+1]:void 0,h[e][i].pointCross=e<h.length-1&&i<h[e].length-1?h[e+1][i+1]:void 0);return a},n.prototype.getInfo=function(){var t=this.dataFilter;if(t)return t.getLabel()+": "+t.getSelectedValue()},n.prototype.reload=function(){this.dataTable&&this.setData(this.dataTable)},n.prototype._getDataPoints=function(t){var e=[];if(this.style===o.STYLE.GRID||this.style===o.STYLE.SURFACE)e=this.initDataAsMatrix(t);else if(this._checkValueField(t),e=this.getDataPoints(t),this.style===o.STYLE.LINE)for(var i=0;i<e.length;i++)0<i&&(e[i-1].pointNext=e[i]);return e},n.prototype._checkValueField=function(t){if(this.style===o.STYLE.BARCOLOR||this.style===o.STYLE.BARSIZE||this.style===o.STYLE.DOTCOLOR||this.style===o.STYLE.DOTSIZE){if(void 0===this.colValue)throw new Error("Expected data to have field 'style' for graph style '"+this.style+"'");if(void 0===t[0][this.colValue])throw new Error("Expected data to have field '"+this.colValue+"' for graph style '"+this.style+"'")}},t.exports=n},function(t,e,i){function n(){this.min=void 0,this.max=void 0}n.prototype.adjust=function(t){void 0!==t&&((void 0===this.min||this.min>t)&&(this.min=t),(void 0===this.max||this.max<t)&&(this.max=t))},n.prototype.combine=function(t){this.add(t.min),this.add(t.max)},n.prototype.expand=function(t){if(void 0!==t){var e=this.min-t,i=this.max+t;if(i<e)throw new Error("Passed expansion value makes range invalid");this.min=e,this.max=i}},n.prototype.range=function(){return this.max-this.min},n.prototype.center=function(){return(this.min+this.max)/2},t.exports=n},function(t,e,i){var n,o,s;o=[],void 0!==(s="function"==typeof(n=function(){var l=null;return function n(o,t){function e(t){return t.match(/[^ ]+/g)}function s(t){if("hammer.input"!==t.type){if(t.srcEvent._handled||(t.srcEvent._handled={}),t.srcEvent._handled[t.type])return;t.srcEvent._handled[t.type]=!0}var e=!1;t.stopPropagation=function(){e=!0};var i=t.srcEvent.stopPropagation.bind(t.srcEvent);"function"==typeof i&&(t.srcEvent.stopPropagation=function(){i(),t.stopPropagation()});for(var n=t.firstTarget=l;n&&!e;){var o=n.hammer;if(o)for(var s,r=0;r<o.length;r++)if(s=o[r]._handlers[t.type])for(var a=0;a<s.length&&!e;a++)s[a](t);n=n.parentNode}}var r=t||{preventDefault:!1};if(o.Manager){var a=o,i=function(t,e){var i=Object.create(r);return e&&a.assign(i,e),n(new a(t,i),i)};return a.assign(i,a),i.Manager=function(t,e){var i=Object.create(r);return e&&a.assign(i,e),n(new a.Manager(t,i),i)},i}var h=Object.create(o),d=o.element;return d.hammer||(d.hammer=[]),d.hammer.push(h),o.on("hammer.input",function(t){!0!==r.preventDefault&&r.preventDefault!==t.pointerType||t.preventDefault(),t.isFirst&&(l=t.target)}),h._handlers={},h.on=function(t,i){return e(t).forEach(function(t){var e=h._handlers[t];e||(h._handlers[t]=e=[],o.on(t,s)),e.push(i)}),h},h.off=function(t,i){return e(t).forEach(function(t){var e=h._handlers[t];e&&(0<(e=i?e.filter(function(t){return t!==i}):[]).length?h._handlers[t]=e:(o.off(t,s),delete h._handlers[t]))}),h},h.emit=function(t,e){l=e.target,o.emit(t,e)},h.destroy=function(){var t=o.element.hammer,e=t.indexOf(h);-1!==e&&t.splice(e,1),t.length||delete o.element.hammer,h._handlers={},o.destroy()},h}})?n.apply(e,o):n)&&(t.exports=s)},function(Yt,Gt,Vt){var Ut;!function(s,o,t,u){function a(t,e,i){return setTimeout(h(t,i),e)}function n(t,e,i){return!!Array.isArray(t)&&(r(t,i[e],i),!0)}function r(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==u)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function e(n,t,e){var o="DEPRECATED METHOD: "+t+"\n"+e+" AT \n";return function(){var t=new Error("get-stack-trace"),e=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=s.console&&(s.console.warn||s.console.log);return i&&i.call(s.console,o,e),n.apply(this,arguments)}}function i(t,e,i){var n,o=e.prototype;(n=t.prototype=Object.create(o)).constructor=t,n._super=o,i&&$(n,i)}function h(t,e){return function(){return t.apply(e,arguments)}}function d(t,e){return typeof t==tt?t.apply(e&&e[0]||u,e):t}function l(t,e){return t===u?e:t}function c(e,t,i){r(v(t),function(t){e.addEventListener(t,i,!1)})}function p(e,t,i){r(v(t),function(t){e.removeEventListener(t,i,!1)})}function f(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function m(t,e){return-1<t.indexOf(e)}function v(t){return t.trim().split(/\s+/g)}function g(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}function y(t){return Array.prototype.slice.call(t,0)}function b(t,i,e){for(var n=[],o=[],s=0;s<t.length;){var r=i?t[s][i]:t[s];g(o,r)<0&&n.push(t[s]),o[s]=r,s++}return e&&(n=i?n.sort(function(t,e){return t[i]>e[i]}):n.sort()),n}function _(t,e){for(var i,n,o=e[0].toUpperCase()+e.slice(1),s=0;s<J.length;){if((n=(i=J[s])?i+o:e)in t)return n;s++}return u}function w(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||s}function x(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){d(e.options.enable,[e])&&i.handler(t)},this.init()}function k(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,s=e&ut&&n-o==0,r=e&(ct|pt)&&n-o==0;i.isFirst=!!s,i.isFinal=!!r,s&&(t.session={}),i.eventType=e,function(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=S(e)),1<o&&!i.firstMultiple?i.firstMultiple=S(e):1===o&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=D(n);e.timeStamp=nt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=C(a,h),e.distance=O(a,h),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},s=t.prevInput||{};e.eventType!==ut&&s.eventType!==ct||(o=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=o.x+(i.x-n.x),e.deltaY=o.y+(i.y-n.y)}(i,e),e.offsetDirection=M(e.deltaX,e.deltaY);var d=E(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=it(d.x)>it(d.y)?d.x:d.y,e.scale=r?function(t,e){return O(e[0],e[1],kt)/O(t[0],t[1],kt)}(r.pointers,n):1,e.rotation=r?function(t,e){return C(e[1],e[0],kt)+C(t[1],t[0],kt)}(r.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,o,s,r=t.lastInterval||e,a=e.timeStamp-r.timeStamp;if(e.eventType!=pt&&(lt<a||r.velocity===u)){var h=e.deltaX-r.deltaX,d=e.deltaY-r.deltaY,l=E(a,h,d);n=l.x,o=l.y,i=it(l.x)>it(l.y)?l.x:l.y,s=M(h,d),t.lastInterval=e}else i=r.velocity,n=r.velocityX,o=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=s}(i,e);var l=t.element;f(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function S(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:et(t.pointers[i].clientX),clientY:et(t.pointers[i].clientY)},i++;return{timeStamp:nt(),pointers:e,center:D(e),deltaX:t.deltaX,deltaY:t.deltaY}}function D(t){var e=t.length;if(1===e)return{x:et(t[0].clientX),y:et(t[0].clientY)};for(var i=0,n=0,o=0;o<e;)i+=t[o].clientX,n+=t[o].clientY,o++;return{x:et(i/e),y:et(n/e)}}function E(t,e,i){return{x:e/t||0,y:i/t||0}}function M(t,e){return t===e?ft:it(t)>=it(e)?t<0?mt:vt:e<0?gt:yt}function O(t,e,i){var n=e[(i=i||xt)[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function C(t,e,i){var n=e[(i=i||xt)[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}function T(){this.evEl=Dt,this.evWin=Et,this.pressed=!1,x.apply(this,arguments)}function I(){this.evEl=Ct,this.evWin=Tt,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function P(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,x.apply(this,arguments)}function N(){this.evTarget=Nt,this.targetIds={},x.apply(this,arguments)}function R(){x.apply(this,arguments);var t=h(this.handler,this);this.touch=new N(this.manager,t),this.mouse=new T(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function A(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var n=this.lastTouches;setTimeout(function(){var t=n.indexOf(i);-1<t&&n.splice(t,1)},Rt)}}function L(t,e){this.manager=t,this.set(e)}function z(t){this.options=$({},this.defaults,t||{}),this.id=rt++,this.manager=null,this.options.enable=l(this.options.enable,!0),this.state=Wt,this.simultaneous={},this.requireFail=[]}function B(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function F(t){return t==yt?"down":t==gt?"up":t==mt?"left":t==vt?"right":""}function j(t,e){var i=e.manager;return i?i.get(t):t}function H(){z.apply(this,arguments)}function W(){H.apply(this,arguments),this.pX=null,this.pY=null}function Y(){H.apply(this,arguments)}function G(){z.apply(this,arguments),this._timer=null,this._input=null}function V(){H.apply(this,arguments)}function U(){H.apply(this,arguments)}function q(){z.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function X(t,e){return(e=e||{}).recognizers=l(e.recognizers,X.defaults.preset),new Z(t,e)}function Z(t,e){this.options=$({},X.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=function(t){return new(t.options.inputClass||(ht?I:dt?N:at?R:T))(t,k)}(this),this.touchAction=new L(this,this.options.touchAction),K(this,!0),r(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function K(i,n){var o,s=i.element;s.style&&(r(i.options.cssProps,function(t,e){o=_(s.style,e),n?(i.oldCssProps[o]=s.style[o],s.style[o]=t):s.style[o]=i.oldCssProps[o]||""}),n||(i.oldCssProps={}))}var $,J=["","webkit","Moz","MS","ms","o"],Q=o.createElement("div"),tt="function",et=Math.round,it=Math.abs,nt=Date.now;$="function"!=typeof Object.assign?function(t){if(t===u||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!==u&&null!==n)for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}:Object.assign;var ot=e(function(t,e,i){for(var n=Object.keys(e),o=0;o<n.length;)(!i||i&&t[n[o]]===u)&&(t[n[o]]=e[n[o]]),o++;return t},"extend","Use `assign`."),st=e(function(t,e){return ot(t,e,!0)},"merge","Use `assign`."),rt=1,at="ontouchstart"in s,ht=_(s,"PointerEvent")!==u,dt=at&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),lt=25,ut=1,ct=4,pt=8,ft=1,mt=2,vt=4,gt=8,yt=16,bt=mt|vt,_t=gt|yt,wt=bt|_t,xt=["x","y"],kt=["clientX","clientY"];x.prototype={handler:function(){},init:function(){this.evEl&&c(this.element,this.evEl,this.domHandler),this.evTarget&&c(this.target,this.evTarget,this.domHandler),this.evWin&&c(w(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&p(this.element,this.evEl,this.domHandler),this.evTarget&&p(this.target,this.evTarget,this.domHandler),this.evWin&&p(w(this.element),this.evWin,this.domHandler)}};var St={mousedown:ut,mousemove:2,mouseup:ct},Dt="mousedown",Et="mousemove mouseup";i(T,x,{handler:function(t){var e=St[t.type];e&ut&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=ct),this.pressed&&(e&ct&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var Mt={pointerdown:ut,pointermove:2,pointerup:ct,pointercancel:pt,pointerout:pt},Ot={2:"touch",3:"pen",4:"mouse",5:"kinect"},Ct="pointerdown",Tt="pointermove pointerup pointercancel";s.MSPointerEvent&&!s.PointerEvent&&(Ct="MSPointerDown",Tt="MSPointerMove MSPointerUp MSPointerCancel"),i(I,x,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=Mt[n],s=Ot[t.pointerType]||t.pointerType,r="touch"==s,a=g(e,t.pointerId,"pointerId");o&ut&&(0===t.button||r)?a<0&&(e.push(t),a=e.length-1):o&(ct|pt)&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))}});var It={touchstart:ut,touchmove:2,touchend:ct,touchcancel:pt};i(P,x,{handler:function(t){var e=It[t.type];if(e===ut&&(this.started=!0),this.started){var i=function(t,e){var i=y(t.touches),n=y(t.changedTouches);return e&(ct|pt)&&(i=b(i.concat(n),"identifier",!0)),[i,n]}.call(this,t,e);e&(ct|pt)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:"touch",srcEvent:t})}}});var Pt={touchstart:ut,touchmove:2,touchend:ct,touchcancel:pt},Nt="touchstart touchmove touchend touchcancel";i(N,x,{handler:function(t){var e=Pt[t.type],i=function(t,e){var i=y(t.touches),n=this.targetIds;if(e&(2|ut)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var o,s,r=y(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return f(t.target,h)}),e===ut)for(o=0;o<s.length;)n[s[o].identifier]=!0,o++;for(o=0;o<r.length;)n[r[o].identifier]&&a.push(r[o]),e&(ct|pt)&&delete n[r[o].identifier],o++;return a.length?[b(s.concat(a),"identifier",!0),a]:void 0}.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:"touch",srcEvent:t})}});var Rt=2500;i(R,x,{handler:function(t,e,i){var n="touch"==i.pointerType,o="mouse"==i.pointerType;if(!(o&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)(function(t,e){t&ut?(this.primaryTouch=e.changedPointers[0].identifier,A.call(this,e)):t&(ct|pt)&&A.call(this,e)}).call(this,e,i);else if(o&&function(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],s=Math.abs(e-o.x),r=Math.abs(i-o.y);if(s<=25&&r<=25)return!0}return!1}.call(this,i))return;this.callback(t,e,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var At=_(Q.style,"touchAction"),Lt=At!==u,zt="manipulation",Bt="none",Ft="pan-x",jt="pan-y",Ht=function(){if(!Lt)return!1;var e={},i=s.CSS&&s.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){e[t]=!i||s.CSS.supports("touch-action",t)}),e}();L.prototype={set:function(t){"compute"==t&&(t=this.compute()),Lt&&this.manager.element.style&&Ht[t]&&(this.manager.element.style[At]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return r(this.manager.recognizers,function(t){d(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(t){if(m(t,Bt))return Bt;var e=m(t,Ft),i=m(t,jt);return e&&i?Bt:e||i?e?Ft:jt:m(t,zt)?zt:"auto"}(e.join(" "))},preventDefaults:function(t){var e=t.srcEvent,i=t.offsetDirection;if(!this.manager.session.prevented){var n=this.actions,o=m(n,Bt)&&!Ht.none,s=m(n,jt)&&!Ht[jt],r=m(n,Ft)&&!Ht[Ft];if(o){var a=1===t.pointers.length,h=t.distance<2,d=t.deltaTime<250;if(a&&h&&d)return}return r&&s?void 0:o||s&&i&bt||r&&i&_t?this.preventSrc(e):void 0}e.preventDefault()},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var Wt=1;z.prototype={defaults:{},set:function(t){return $(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(n(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=j(t,this)).id]||(e[t.id]=t).recognizeWith(this),this},dropRecognizeWith:function(t){return n(t,"dropRecognizeWith",this)||(t=j(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(n(t,"requireFailure",this))return this;var e=this.requireFail;return-1===g(e,t=j(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(n(t,"dropRequireFailure",this))return this;t=j(t,this);var e=g(this.requireFail,t);return-1<e&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return 0<this.requireFail.length},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(e){function t(t){i.manager.emit(t,e)}var i=this,n=this.state;n<8&&t(i.options.event+B(n)),t(i.options.event),e.additionalEvent&&t(e.additionalEvent),8<=n&&t(i.options.event+B(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|Wt)))return!1;t++}return!0},recognize:function(t){var e=$({},t);if(!d(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=Wt),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},i(H,z,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,i=t.eventType,n=6&e,o=this.attrTest(t);return n&&(i&pt||!o)?16|e:n||o?i&ct?8|e:2&e?4|e:2:32}}),i(W,H,{defaults:{event:"pan",threshold:10,pointers:1,direction:wt},getTouchAction:function(){var t=this.options.direction,e=[];return t&bt&&e.push(jt),t&_t&&e.push(Ft),e},directionTest:function(t){var e=this.options,i=!0,n=t.distance,o=t.direction,s=t.deltaX,r=t.deltaY;return o&e.direction||(n=e.direction&bt?(o=0===s?ft:s<0?mt:vt,i=s!=this.pX,Math.abs(t.deltaX)):(o=0===r?ft:r<0?gt:yt,i=r!=this.pY,Math.abs(t.deltaY))),t.direction=o,i&&n>e.threshold&&o&e.direction},attrTest:function(t){return H.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=F(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),i(Y,H,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Bt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),i(G,z,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,o=t.deltaTime>e.time;if(this._input=t,!n||!i||t.eventType&(ct|pt)&&!o)this.reset();else if(t.eventType&ut)this.reset(),this._timer=a(function(){this.state=8,this.tryEmit()},e.time,this);else if(t.eventType&ct)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&ct?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=nt(),this.manager.emit(this.options.event,this._input)))}}),i(V,H,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Bt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),i(U,H,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:bt|_t,pointers:1},getTouchAction:function(){return W.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(bt|_t)?e=t.overallVelocity:i&bt?e=t.overallVelocityX:i&_t&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&it(e)>this.options.velocity&&t.eventType&ct},emit:function(t){var e=F(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),i(q,z,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[zt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,o=t.deltaTime<e.time;if(this.reset(),t.eventType&ut&&0===this.count)return this.failTimeout();if(n&&o&&i){if(t.eventType!=ct)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<e.interval,r=!this.pCenter||O(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,r&&s?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=a(function(){this.state=8,this.tryEmit()},e.interval,this),2):8}return 32},failTimeout:function(){return this._timer=a(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),X.VERSION="2.0.7",X.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[V,{enable:!1}],[Y,{enable:!1},["rotate"]],[U,{direction:bt}],[W,{direction:bt},["swipe"]],[q],[q,{event:"doubletap",taps:2},["tap"]],[G]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Z.prototype={set:function(t){return $(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var i,n=this.recognizers,o=e.curRecognizer;(!o||o&&8&o.state)&&(o=e.curRecognizer=null);for(var s=0;s<n.length;)i=n[s],2===e.stopped||o&&i!=o&&!i.canRecognizeWith(o)?i.reset():i.recognize(t),!o&&14&i.state&&(o=e.curRecognizer=i),s++}},get:function(t){if(t instanceof z)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event==t)return e[i];return null},add:function(t){if(n(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),(t.manager=this).touchAction.update(),t},remove:function(t){if(n(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,i=g(e,t);-1!==i&&(e.splice(i,1),this.touchAction.update())}return this},on:function(t,e){if(t!==u&&e!==u){var i=this.handlers;return r(v(t),function(t){i[t]=i[t]||[],i[t].push(e)}),this}},off:function(t,e){if(t!==u){var i=this.handlers;return r(v(t),function(t){e?i[t]&&i[t].splice(g(i[t],e),1):delete i[t]}),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var i=o.createEvent("Event");i.initEvent(t,!0,!0),(i.gesture=e).target.dispatchEvent(i)}(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](e),n++}},destroy:function(){this.element&&K(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},$(X,{INPUT_START:ut,INPUT_MOVE:2,INPUT_END:ct,INPUT_CANCEL:pt,STATE_POSSIBLE:Wt,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:ft,DIRECTION_LEFT:mt,DIRECTION_RIGHT:vt,DIRECTION_UP:gt,DIRECTION_DOWN:yt,DIRECTION_HORIZONTAL:bt,DIRECTION_VERTICAL:_t,DIRECTION_ALL:wt,Manager:Z,Input:x,TouchAction:L,TouchInput:N,MouseInput:T,PointerEventInput:I,TouchMouseInput:R,SingleTouchInput:P,Recognizer:z,AttrRecognizer:H,Tap:q,Pan:W,Swipe:U,Pinch:Y,Rotate:V,Press:G,on:c,off:p,each:r,merge:st,extend:ot,assign:$,inherit:i,bindFn:h,prefixed:_}),(void 0!==s?s:"undefined"!=typeof self?self:{}).Hammer=X,(Ut=function(){return X}.call(Gt,Vt,Gt,Yt))!==u&&(Yt.exports=Ut)}(window,document)},function(t,e,i){e.util=i(2),e.DOMutil=i(14),e.DataSet=i(11),e.DataView=i(12),e.Queue=i(43),e.Timeline=i(178),e.Graph2d=i(180),e.timeline={Core:i(65),DateUtil:i(36),Range:i(64),stack:i(100),TimeStep:i(66),components:{items:{Item:i(38),BackgroundItem:i(103),BoxItem:i(101),PointItem:i(102),RangeItem:i(70)},BackgroundGroup:i(69),Component:i(16),CurrentTime:i(67),CustomTime:i(46),DataAxis:i(107),DataScale:i(108),GraphGroup:i(109),Group:i(68),ItemSet:i(99),Legend:i(112),LineGraph:i(106),TimeAxis:i(45)}},e.moment=i(9),e.Hammer=i(10),e.keycharm=i(35)},function(t,e,i){function h(t,e,i,n){if(!(this instanceof h))throw new SyntaxError("Constructor must be called with the new operator");if(!(Array.isArray(i)||i instanceof l||i instanceof u)&&i instanceof Object){var o=n;n=i,i=o}n&&n.throttleRedraw&&console.warn('Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var s=this;if(this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:d,width:null,height:null,maxHeight:null,minHeight:null},this.options=v.deepExtend({},this.defaultOptions),this._create(t),!n||n&&void 0===n.rtl){this.dom.root.style.visibility="hidden";for(var r,a=this.dom.root;!r&&a;)r=window.getComputedStyle(a,null).direction,a=a.parentElement;this.options.rtl=r&&"rtl"==r.toLowerCase()}else this.options.rtl=n.rtl;this.options.rollingMode=n&&n.rollingMode,this.options.onInitialDrawComplete=n&&n.onInitialDrawComplete,this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{getScale:function(){return s.timeAxis.step.scale},getStep:function(){return s.timeAxis.step.step},toScreen:s._toScreen.bind(s),toGlobalScreen:s._toGlobalScreen.bind(s),toTime:s._toTime.bind(s),toGlobalTime:s._toGlobalTime.bind(s)}},this.range=new c(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new g(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new y(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new _(this.body,this.options),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.dom.root.onclick=function(t){s.emit("click",s.getEventProperties(t))},this.dom.root.ondblclick=function(t){s.emit("doubleClick",s.getEventProperties(t))},this.dom.root.oncontextmenu=function(t){s.emit("contextmenu",s.getEventProperties(t))},this.dom.root.onmouseover=function(t){s.emit("mouseOver",s.getEventProperties(t))},window.PointerEvent?(this.dom.root.onpointerdown=function(t){s.emit("mouseDown",s.getEventProperties(t))},this.dom.root.onpointermove=function(t){s.emit("mouseMove",s.getEventProperties(t))},this.dom.root.onpointerup=function(t){s.emit("mouseUp",s.getEventProperties(t))}):(this.dom.root.onmousemove=function(t){s.emit("mouseMove",s.getEventProperties(t))},this.dom.root.onmousedown=function(t){s.emit("mouseDown",s.getEventProperties(t))},this.dom.root.onmouseup=function(t){s.emit("mouseUp",s.getEventProperties(t))}),this.initialFitDone=!1,this.on("changed",function(){if(null!=this.itemsData&&!this.options.rollingMode){if(!s.initialFitDone)if(s.initialFitDone=!0,null!=s.options.start||null!=s.options.end){if(null==s.options.start||null==s.options.end)var t=s.getItemRange();var e=null!=s.options.start?s.options.start:t.min,i=null!=s.options.end?s.options.end:t.max;s.setWindow(e,i,{animation:!1})}else s.fit({animation:!1});!s.initialDrawDone&&s.initialRangeChangeDone&&(s.initialDrawDone=!0,s.dom.root.style.visibility="visible",s.options.onInitialDrawComplete&&setTimeout(function(){return s.options.onInitialDrawComplete()},0))}}),n&&this.setOptions(n),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}function p(t){return v.convert(t.data.start,"Date").valueOf()}function f(t){var e=null!=t.data.end?t.data.end:t.data.start;return v.convert(e,"Date").valueOf()}function m(t,e){function i(){return"bottom"==h?s.height-e.top-e.height:e.top}var n=t.props.leftContainer.height,o=t.props.left.height,s=e.parent,r=s.top,a=!0,h=t.timeAxis.options.orientation.axis,d=-1*t._getScrollTop(),l=r+i(),u=e.height;return l<d?r+n<=r+i()+u&&(r+=i()-t.itemSet.options.margin.item.vertical):d+n<l+u?r+=i()+u-n+t.itemSet.options.margin.item.vertical:a=!1,{shouldScroll:a,scrollOffset:r=Math.min(r,o-n),itemTop:l}}var d=i(9),v=i(2),l=i(11),u=i(12),c=i(64),n=i(65),g=i(45),y=i(67),b=i(46),_=i(99),o=i(15).printStyle,s=i(105).allOptions,r=i(105).configureOptions,a=i(71).default,w=i(15).default;(h.prototype=new n)._createConfigurator=function(){return new a(this,this.dom.container,r)},h.prototype.redraw=function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()},h.prototype.setOptions=function(t){if(!0===w.validate(t,s)&&console.log("%cErrors have been found in the supplied options object.",o),n.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;var e=this.itemsData;if(e){var i=this.getSelection();this.setItems(null),this.setItems(e),this.setSelection(i)}}},h.prototype.setItems=function(t){var e;e=t?t instanceof l||t instanceof u?t:new l(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.itemSet&&this.itemSet.setItems(e)},h.prototype.setGroups=function(t){var e;if(t){function i(t){return!1!==t.visible}e=t instanceof l||t instanceof u?new u(t,{filter:i}):new l(t.filter(i))}else e=null;this.groupsData=e,this.itemSet.setGroups(e)},h.prototype.setData=function(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)},h.prototype.setSelection=function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)},h.prototype.getSelection=function(){return this.itemSet&&this.itemSet.getSelection()||[]},h.prototype.focus=function(t,e){if(this.itemsData&&null!=t){var i=Array.isArray(t)?t:[t],n=this.itemsData.getDataSet().get(i,{type:{start:"Date",end:"Date"}}),o=null,s=null;if(n.forEach(function(t){var e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===o||e<o)&&(o=e),(null===s||s<i)&&(s=i)}),null!==o&&null!==s){function r(){var t=m(a,h);t.shouldScroll&&t.itemTop!=l.itemTop&&(a._setScrollTop(-t.scrollOffset),a._redraw())}var a=this,h=this.itemSet.items[i[0]],d=-1*this._getScrollTop(),l=null,u=(o+s)/2,c=Math.max(this.range.end-this.range.start,1.1*(s-o)),p=!e||void 0===e.animation||e.animation;p||(l={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.setRange(u-c/2,u+c/2,{animation:p},function(){r(),setTimeout(r,100)},function(t,e,i){var n=m(a,h);if((l=l||n).itemTop!=n.itemTop||l.shouldScroll){l.itemTop!=n.itemTop&&n.shouldScroll&&(l=n,d=-1*a._getScrollTop());var o=d,s=l.scrollOffset,r=i?s:o+(s-o)*t;a._setScrollTop(-r),e||a._redraw()}})}}},h.prototype.fit=function(t,e){var i,n=!t||void 0===t.animation||t.animation,o=this.itemsData&&this.itemsData.getDataSet();1===o.length&&void 0===o.get()[0].end?(i=this.getDataRange(),this.moveTo(i.min.valueOf(),{animation:n},e)):(i=this.getItemRange(),this.range.setRange(i.min,i.max,{animation:n},e))},h.prototype.getItemRange=function(){var t=this.getDataRange(),s=null!==t.min?t.min.valueOf():null,r=null!==t.max?t.max.valueOf():null,a=null,h=null;if(null!=s&&null!=r){var e=r-s;e<=0&&(e=10);var d=e/this.props.center.width,i={},n=0;if(v.forEach(this.itemSet.items,function(t,e){t.groupShowing&&(i[e]=t.redraw(!0),n=i[e].length)}),0<n)for(var o=0;o<n;o++)v.forEach(i,function(t){t[o]()});if(v.forEach(this.itemSet.items,function(t){var e,i,n=p(t),o=f(t);i=this.options.rtl?(e=n-(t.getWidthRight()+10)*d,o+(t.getWidthLeft()+10)*d):(e=n-(t.getWidthLeft()+10)*d,o+(t.getWidthRight()+10)*d),e<s&&(s=e,a=t),r<i&&(r=i,h=t)}.bind(this)),a&&h){var l=a.getWidthLeft()+10,u=h.getWidthRight()+10,c=this.props.center.width-l-u;0<c&&(r=this.options.rtl?(s=p(a)-u*e/c,f(h)+l*e/c):(s=p(a)-l*e/c,f(h)+u*e/c))}}return{min:null!=s?new Date(s):null,max:null!=r?new Date(r):null}},h.prototype.getDataRange=function(){var n=null,o=null,t=this.itemsData&&this.itemsData.getDataSet();return t&&t.forEach(function(t){var e=v.convert(t.start,"Date").valueOf(),i=v.convert(null!=t.end?t.end:t.start,"Date").valueOf();(null===n||e<n)&&(n=e),(null===o||o<i)&&(o=i)}),{min:null!=n?new Date(n):null,max:null!=o?new Date(o):null}},h.prototype.getEventProperties=function(t){var e,i=t.center?t.center.x:t.clientX,n=t.center?t.center.y:t.clientY;e=this.options.rtl?v.getAbsoluteRight(this.dom.centerContainer)-i:i-v.getAbsoluteLeft(this.dom.centerContainer);var o=n-v.getAbsoluteTop(this.dom.centerContainer),s=this.itemSet.itemFromTarget(t),r=this.itemSet.groupFromTarget(t),a=b.customTimeFromTarget(t),h=this.itemSet.options.snap||null,d=this.body.util.getScale(),l=this.body.util.getStep(),u=this._toTime(e),c=h?h(u,d,l):u,p=v.getTarget(t),f=null;return null!=s?f="item":null!=a?f="custom-time":v.hasParent(p,this.timeAxis.dom.foreground)?f="axis":this.timeAxis2&&v.hasParent(p,this.timeAxis2.dom.foreground)?f="axis":v.hasParent(p,this.itemSet.dom.labelSet)?f="group-label":v.hasParent(p,this.currentTime.bar)?f="current-time":v.hasParent(p,this.dom.center)&&(f="background"),{event:t,item:s?s.id:null,group:r?r.groupId:null,what:f,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:e,y:o,time:u,snappedTime:c}},h.prototype.toggleRollingMode=function(){this.range.rolling?this.range.stopRolling():(null==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())},t.exports=h},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var h=n(i(19)),o=n(i(0)),s=n(i(1)),r=i(10),a=i(37),v=i(2),d=((0,s.default)(l,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){if("string"==typeof t)return{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"}[t]}},{key:"setColor",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i=void 0,n=this._isColorString(t);if(void 0!==n&&(t=n),!0===v.isString(t)){if(!0===v.isValidRGB(t)){var o=t.substr(4).substr(0,t.length-5).split(",");i={r:o[0],g:o[1],b:o[2],a:1}}else if(!0===v.isValidRGBA(t)){var s=t.substr(5).substr(0,t.length-6).split(",");i={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(!0===v.isValidHex(t)){var r=v.hexToRGB(t);i={r:r.r,g:r.g,b:r.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var a=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:a}}if(void 0===i)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: "+(0,h.default)(t));this._setColor(i,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this;!0===(!(0<arguments.length&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=v.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){!0===(!(1<arguments.length&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=v.extend({},t)),this.color=t;var e=v.RGBToHSV(t.r,t.g,t.b),i=2*Math.PI,n=this.r*e.s,o=this.centerCoordinates.x+n*Math.sin(i*e.h),s=this.centerCoordinates.y+n*Math.cos(i*e.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=v.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;var i=v.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.color,e=v.RGBToHSV(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),i.fill(),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.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+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){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){var 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{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(e)}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(t){}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(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="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)}},{key:"_bindHammer",value:function(){var e=this;this.drag={},this.pinch={},this.hammer=new r(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),a.onTouch(this.hammer,function(t){e._moveSelector(t)}),this.hammer.on("tap",function(t){e._moveSelector(t)}),this.hammer.on("panstart",function(t){e._moveSelector(t)}),this.hammer.on("panmove",function(t){e._moveSelector(t)}),this.hammer.on("panend",function(t){e._moveSelector(t)})}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,e,i);var n=void 0,o=void 0,s=void 0,r=void 0;this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;var a=2*Math.PI/360,h=1/this.r,d=void 0;for(s=0;s<360;s++)for(r=0;r<this.r;r++)n=this.centerCoordinates.x+r*Math.sin(a*s),o=this.centerCoordinates.y+r*Math.cos(a*s),d=v.HSVToRGB(s*(1/360),r*h,1),t.fillStyle="rgb("+d.r+","+d.g+","+d.b+")",t.fillRect(n-.5,o-.5,2,2);t.strokeStyle="rgba(0,0,0,1)",t.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),t.stroke(),this.hueCircle=t.getImageData(0,0,e,i)}this.generated=!0}},{key:"_moveSelector",value:function(t){var e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,n=t.center.y-e.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,r=i-s,a=n-o,h=Math.atan2(r,a),d=.98*Math.min(Math.sqrt(r*r+a*a),s),l=Math.cos(h)*d+o,u=Math.sin(h)*d+s;this.colorPickerSelector.style.top=l-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=u-.5*this.colorPickerSelector.clientWidth+"px";var c=h/(2*Math.PI);c=c<0?c+1:c;var p=d/this.r,f=v.RGBToHSV(this.color.r,this.color.g,this.color.b);f.h=c,f.s=p;var m=v.HSVToRGB(f.h,f.s,f.v);m.a=this.color.a,this.color=m,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+")"}}]),l);function l(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1;(0,o.default)(this,l),this.pixelRatio=t,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},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=function(){},this.closeCallback=function(){},this._create()}e.default=d},function(t,e,i){function n(t,e,i,n){if(!(Array.isArray(i)||i instanceof a||i instanceof h)&&i instanceof Object){var o=n;n=i,i=o}n&&n.throttleRedraw&&console.warn('Graph2d option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var s=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:r,width:null,height:null,maxHeight:null,minHeight:null},this.options=c.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{toScreen:s._toScreen.bind(s),toGlobalScreen:s._toGlobalScreen.bind(s),toTime:s._toTime.bind(s),toGlobalTime:s._toGlobalTime.bind(s)}},this.range=new d(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new l(this.body),this.components.push(this.timeAxis),this.currentTime=new u(this.body),this.components.push(this.currentTime),this.linegraph=new f(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){s.emit("click",s.getEventProperties(t))}),this.on("doubletap",function(t){s.emit("doubleClick",s.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){s.emit("contextmenu",s.getEventProperties(t))},n&&this.setOptions(n),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}var r=i(9),c=i(2),a=i(11),h=i(12),d=i(64),o=i(65),l=i(45),u=i(67),p=i(46),f=i(106),s=i(15).printStyle,m=i(113).allOptions,v=i(113).configureOptions,g=i(71).default,y=i(15).default;(n.prototype=new o).setOptions=function(t){!0===y.validate(t,m)&&console.log("%cErrors have been found in the supplied options object.",s),o.prototype.setOptions.call(this,t)},n.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?t instanceof a||t instanceof h?t:new a(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.linegraph&&this.linegraph.setItems(e),i)if(null!=this.options.start||null!=this.options.end){var n=null!=this.options.start?this.options.start:null,o=null!=this.options.end?this.options.end:null;this.setWindow(n,o,{animation:!1})}else this.fit({animation:!1})},n.prototype.setGroups=function(t){var e;e=t?t instanceof a||t instanceof h?t:new a(t):null,this.groupsData=e,this.linegraph.setGroups(e)},n.prototype.getLegend=function(t,e,i){return void 0===e&&(e=15),void 0===i&&(i=15),void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].getLegend(e,i):"cannot find group:'"+t+"'"},n.prototype.isGroupVisible=function(t){return void 0!==this.linegraph.groups[t]&&this.linegraph.groups[t].visible&&(void 0===this.linegraph.options.groups.visibility[t]||1==this.linegraph.options.groups.visibility[t])},n.prototype.getDataRange=function(){var t=null,e=null;for(var i in this.linegraph.groups)if(this.linegraph.groups.hasOwnProperty(i)&&1==this.linegraph.groups[i].visible)for(var n=0;n<this.linegraph.groups[i].itemsData.length;n++){var o=this.linegraph.groups[i].itemsData[n],s=c.convert(o.x,"Date").valueOf();t=null==t?s:s<t?s:t,e=null==e?s:e<s?s:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},n.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=e-c.getAbsoluteLeft(this.dom.centerContainer),o=i-c.getAbsoluteTop(this.dom.centerContainer),s=this._toTime(n),r=p.customTimeFromTarget(t),a=c.getTarget(t),h=null;c.hasParent(a,this.timeAxis.dom.foreground)?h="axis":this.timeAxis2&&c.hasParent(a,this.timeAxis2.dom.foreground)?h="axis":c.hasParent(a,this.linegraph.yAxisLeft.dom.frame)?h="data-axis":c.hasParent(a,this.linegraph.yAxisRight.dom.frame)?h="data-axis":c.hasParent(a,this.linegraph.legendLeft.dom.frame)?h="legend":c.hasParent(a,this.linegraph.legendRight.dom.frame)?h="legend":null!=r?h="custom-time":c.hasParent(a,this.currentTime.bar)?h="current-time":c.hasParent(a,this.dom.center)&&(h="background");var d=[],l=this.linegraph.yAxisLeft,u=this.linegraph.yAxisRight;return!l.hidden&&0<this.itemsData.length&&d.push(l.screenToValue(o)),!u.hidden&&0<this.itemsData.length&&d.push(u.screenToValue(o)),{event:t,what:h,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:n,y:o,time:s,value:d}},n.prototype._createConfigurator=function(){return new g(this,this.dom.container,v)},t.exports=n},function(t,i,e){i.util=e(2),i.DOMutil=e(14),i.DataSet=e(11),i.DataView=e(12),i.Queue=e(43),i.Network=e(182),i.network={Images:e(116),dotparser:e(114),gephiParser:e(115),allOptions:e(122)},i.network.convertDot=function(t){return i.network.dotparser.DOTToGraph(t)},i.network.convertGephi=function(t,e){return i.network.gephiParser.parseGephi(t,e)},i.moment=e(9),i.Hammer=e(10),i.keycharm=e(35)},function(t,e,i){function o(t,e,i){var n=this;if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:d,clickToUse:!1},s.extend(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this),once:this.once.bind(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}}},this.bindEventListeners(),this.images=new l(function(){return n.body.emitter.emit("_requestRedraw")}),this.groups=new u,this.canvas=new g(this.body),this.selectionHandler=new _(this.body,this.canvas),this.interactionHandler=new b(this.body,this.canvas,this.selectionHandler),this.view=new y(this.body,this.canvas),this.renderer=new v(this.body,this.canvas),this.physics=new f(this.body),this.layoutEngine=new w(this.body),this.clustering=new m(this.body),this.manipulation=new x(this.body,this.canvas,this.selectionHandler),this.nodesHandler=new c(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new p(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new C(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(i),this.setData(e)}i(183);var n=i(44),s=i(2),r=i(114),a=i(115),h=i(97),d=i(184),l=i(116).default,u=i(186).default,c=i(187).default,p=i(214).default,f=i(220).default,m=i(227).default,v=i(229).default,g=i(230).default,y=i(231).default,b=i(232).default,_=i(234).default,w=i(235).default,x=i(237).default,k=i(71).default,S=i(15).default,D=i(15).printStyle,E=i(122),M=E.allOptions,O=E.configureOptions,C=i(238).default;n(o.prototype),o.prototype.setOptions=function(t){var e=this;if(void 0!==t){!0===S.validate(t,M)&&console.log("%cErrors have been found in the supplied options object.",D);if(s.selectiveDeepExtend(["locale","locales","clickToUse"],this.options,t),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),void 0!==t.groups&&this.body.emitter.emit("refreshNodes"),"configure"in t&&(this.configurator||(this.configurator=new k(this,this.body.container,O,this.canvas.pixelRatio)),this.configurator.setOptions(t.configure)),this.configurator&&!0===this.configurator.options.enabled){var i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};s.deepExtend(i.nodes,this.nodesHandler.options),s.deepExtend(i.edges,this.edgesHandler.options),s.deepExtend(i.layout,this.layoutEngine.options),s.deepExtend(i.interaction,this.selectionHandler.options),s.deepExtend(i.interaction,this.renderer.options),s.deepExtend(i.interaction,this.interactionHandler.options),s.deepExtend(i.manipulation,this.manipulation.options),s.deepExtend(i.physics,this.physics.options),s.deepExtend(i.global,this.canvas.options),s.deepExtend(i.global,this.options),this.configurator.setModuleOptions(i)}void 0!==t.clickToUse?!0===t.clickToUse?void 0===this.activator&&(this.activator=new h(this.canvas.frame),this.activator.on("change",function(){e.body.emitter.emit("activate")})):(void 0!==this.activator&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}},o.prototype._updateVisibleIndices=function(){var t=this.body.nodes,e=this.body.edges;for(var i in this.body.nodeIndices=[],this.body.edgeIndices=[],t)t.hasOwnProperty(i)&&(this.clustering._isClusteredNode(i)||!1!==t[i].options.hidden||this.body.nodeIndices.push(t[i].id));for(var n in e)if(e.hasOwnProperty(n)){var o=e[n],s=t[o.fromId],r=t[o.toId],a=void 0!==s&&void 0!==r;!this.clustering._isClusteredEdge(n)&&!1===o.options.hidden&&a&&!1===s.options.hidden&&!1===r.options.hidden&&this.body.edgeIndices.push(o.id)}},o.prototype.bindEventListeners=function(){var t=this;this.body.emitter.on("_dataChanged",function(){t.edgesHandler._updateState(),t.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){t.clustering._updateState(),t._updateVisibleIndices(),t._updateValueRange(t.body.nodes),t._updateValueRange(t.body.edges),t.body.emitter.emit("startSimulation"),t.body.emitter.emit("_requestRedraw")})},o.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.dot){console.log("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);");var e=r.DOTToGraph(t.dot);this.setData(e)}else if(t&&t.gephi){console.log("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);");var i=a.parseGephi(t.gephi);this.setData(i)}else this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0),this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")},o.prototype.destroy=function(){for(var t in 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,this.body.nodes)this.body.nodes.hasOwnProperty(t)&&delete this.body.nodes[t];for(var e in this.body.edges)this.body.edges.hasOwnProperty(e)&&delete this.body.edges[e];s.recursiveDOMDelete(this.body.container)},o.prototype._updateValueRange=function(t){var e,i=void 0,n=void 0,o=0;for(e in t)if(t.hasOwnProperty(e)){var s=t[e].getValue();void 0!==s&&(i=void 0===i?s:Math.min(s,i),n=void 0===n?s:Math.max(s,n),o+=s)}if(void 0!==i&&void 0!==n)for(e in t)t.hasOwnProperty(e)&&t[e].setValueRange(i,n,o)},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},o.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},o.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},o.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},o.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},o.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},o.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},o.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},o.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},o.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},o.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},o.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},o.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},o.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},o.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},o.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},o.prototype.editNodeMode=function(){return console.log("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)},o.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},o.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},o.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},o.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},o.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},o.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},o.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},o.prototype.getConnectedNodes=function(t){return void 0!==this.body.nodes[t]?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)},o.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},o.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},o.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},o.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},o.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},o.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},o.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments)},o.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments)},o.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return void 0!==t&&void 0!==t.id?t.id:t},o.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return void 0!==t&&void 0!==t.id?t.id:t},o.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},o.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},o.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.redraw()},o.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},o.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},o.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},o.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},o.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},o.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},o.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},o.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t},t.exports=o},function(t,e,i){"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.circle=function(t,e,i){this.beginPath(),this.arc(t,e,i,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(t,e,i){this.beginPath(),this.rect(t-i,e-i,2*i,2*i),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(t,e,i){this.beginPath(),e+=.275*(i*=1.15);var n=2*i,o=n/2,s=Math.sqrt(3)/6*n,r=Math.sqrt(n*n-o*o);this.moveTo(t,e-(r-s)),this.lineTo(t+o,e+s),this.lineTo(t-o,e+s),this.lineTo(t,e-(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(t,e,i){this.beginPath(),e-=.275*(i*=1.15);var n=2*i,o=n/2,s=Math.sqrt(3)/6*n,r=Math.sqrt(n*n-o*o);this.moveTo(t,e+(r-s)),this.lineTo(t+o,e-s),this.lineTo(t-o,e-s),this.lineTo(t,e+(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(t,e,i){this.beginPath(),e+=.1*(i*=.82);for(var n=0;n<10;n++){var o=n%2==0?1.3*i:.5*i;this.lineTo(t+o*Math.sin(2*n*Math.PI/10),e-o*Math.cos(2*n*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(t,e,i){this.beginPath(),this.lineTo(t,e+i),this.lineTo(t+i,e),this.lineTo(t,e-i),this.lineTo(t-i,e),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(t,e,i,n,o){var s=Math.PI/180;i-2*o<0&&(o=i/2),n-2*o<0&&(o=n/2),this.beginPath(),this.moveTo(t+o,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,270*s,360*s,!1),this.lineTo(t+i,e+n-o),this.arc(t+i-o,e+n-o,o,0,90*s,!1),this.lineTo(t+o,e+n),this.arc(t+o,e+n-o,o,90*s,180*s,!1),this.lineTo(t,e+o),this.arc(t+o,e+o,o,180*s,270*s,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse_vis=function(t,e,i,n){var o=i/2*.5522848,s=n/2*.5522848,r=t+i,a=e+n,h=t+i/2,d=e+n/2;this.beginPath(),this.moveTo(t,d),this.bezierCurveTo(t,d-s,h-o,e,h,e),this.bezierCurveTo(h+o,e,r,d-s,r,d),this.bezierCurveTo(r,d+s,h+o,a,h,a),this.bezierCurveTo(h-o,a,t,d+s,t,d),this.closePath()},CanvasRenderingContext2D.prototype.database=function(t,e,i,n){var o=n*(1/3),s=i/2*.5522848,r=o/2*.5522848,a=t+i,h=e+o,d=t+i/2,l=e+o/2,u=e+(n-o/2),c=e+n;this.beginPath(),this.moveTo(a,l),this.bezierCurveTo(a,l+r,d+s,h,d,h),this.bezierCurveTo(d-s,h,t,l+r,t,l),this.bezierCurveTo(t,l-r,d-s,e,d,e),this.bezierCurveTo(d+s,e,a,l-r,a,l),this.lineTo(a,u),this.bezierCurveTo(a,u+r,d+s,c,d,c),this.bezierCurveTo(d-s,c,t,u+r,t,u),this.lineTo(t,l)},CanvasRenderingContext2D.prototype.dashedLine=function(t,e,i,n,o){this.beginPath(),this.moveTo(t,e);for(var s=o.length,r=i-t,a=n-e,h=a/r,d=Math.sqrt(r*r+a*a),l=0,u=!0,c=0,p=o[0];.1<=d;)d<(p=o[l++%s])&&(p=d),c=Math.sqrt(p*p/(1+h*h)),t+=c=r<0?-c:c,e+=h*c,!0===u?this.lineTo(t,e):this.moveTo(t,e),d-=p,u=!u},CanvasRenderingContext2D.prototype.hexagon=function(t,e,i){this.beginPath();var n=2*Math.PI/6;this.moveTo(t+i,e);for(var o=1;o<6;o++)this.lineTo(t+i*Math.cos(n*o),e+i*Math.sin(n*o));this.closePath()})},function(t,e,i){e.en={edit:"Edit",del:"Delete selected",back:"Back",addNode:"Add Node",addEdge:"Add Edge",editNode:"Edit Node",editEdge:"Edit Edge",addDescription:"Click in an empty space to place a new node.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",createEdgeError:"Cannot link edges to a cluster.",deleteClusterError:"Clusters cannot be deleted.",editClusterError:"Clusters cannot be edited."},e.en_EN=e.en,e.en_US=e.en,e.de={edit:"Editieren",del:"Lösche Auswahl",back:"Zurück",addNode:"Knoten hinzufügen",addEdge:"Kante hinzufügen",editNode:"Knoten editieren",editEdge:"Kante editieren",addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",deleteClusterError:"Cluster können nicht gelöscht werden.",editClusterError:"Cluster können nicht editiert werden."},e.de_DE=e.de,e.es={edit:"Editar",del:"Eliminar selección",back:"Átras",addNode:"Añadir nodo",addEdge:"Añadir arista",editNode:"Editar nodo",editEdge:"Editar arista",addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",createEdgeError:"No se puede conectar una arista a un grupo.",deleteClusterError:"No es posible eliminar grupos.",editClusterError:"No es posible editar grupos."},e.es_ES=e.es,e.it={edit:"Modifica",del:"Cancella la selezione",back:"Indietro",addNode:"Aggiungi un nodo",addEdge:"Aggiungi un vertice",editNode:"Modifica il nodo",editEdge:"Modifica il vertice",addDescription:"Clicca per aggiungere un nuovo nodo",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",createEdgeError:"Non si possono collegare vertici ad un cluster",deleteClusterError:"I cluster non possono essere cancellati",editClusterError:"I clusters non possono essere modificati."},e.it_IT=e.it,e.nl={edit:"Wijzigen",del:"Selectie verwijderen",back:"Terug",addNode:"Node toevoegen",addEdge:"Link toevoegen",editNode:"Node wijzigen",editEdge:"Link wijzigen",addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",createEdgeError:"Kan geen link maken naar een cluster.",deleteClusterError:"Clusters kunnen niet worden verwijderd.",editClusterError:"Clusters kunnen niet worden aangepast."},e.nl_NL=e.nl,e.nl_BE=e.nl,e["pt-br"]={edit:"Editar",del:"Remover selecionado",back:"Voltar",addNode:"Adicionar nó",addEdge:"Adicionar aresta",editNode:"Editar nó",editEdge:"Editar aresta",addDescription:"Clique em um espaço em branco para adicionar um novo nó",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",createEdgeError:"Não foi possível linkar arestas a um cluster.",deleteClusterError:"Clusters não puderam ser removidos.",editClusterError:"Clusters não puderam ser editados."},e["pt-BR"]=e["pt-br"],e.pt_BR=e["pt-br"],e.pt_br=e["pt-br"],e.ru={edit:"Редактировать",del:"Удалить выбранное",back:"Назад",addNode:"Добавить узел",addEdge:"Добавить ребро",editNode:"Редактировать узел",editEdge:"Редактировать ребро",addDescription:"Кликните в свободное место, чтобы добавить новый узел.",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",createEdgeError:"Невозможно соединить ребра в кластер.",deleteClusterError:"Кластеры не могут быть удалены",editClusterError:"Кластеры недоступны для редактирования."},e.ru_RU=e.ru,e.cn={edit:"编辑",del:"删除选定",back:"返回",addNode:"添加节点",addEdge:"添加连接线",editNode:"编辑节点",editEdge:"编辑连接线",addDescription:"单击空白处放置新节点。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",createEdgeError:"无法将连接线连接到群集。",deleteClusterError:"无法删除群集。",editClusterError:"无法编辑群集。"},e.zh_CN=e.cn},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=((0,n(i(1)).default)(r,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var t=this.image.width,e=this.image.height;this.width=t,this.height=e;var i=Math.floor(e/2),n=Math.floor(e/4),o=Math.floor(e/8),s=Math.floor(e/16),r=Math.floor(t/2),a=Math.floor(t/4),h=Math.floor(t/8),d=Math.floor(t/16);this.canvas.width=3*a,this.canvas.height=i,this.coordinates=[[0,0,r,i],[r,0,a,n],[r,n,h,o],[5*h,n,d,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return void 0!==this.coordinates}},{key:"_fillMipMap",value:function(){var t=this.canvas.getContext("2d"),e=this.coordinates[0];t.drawImage(this.image,e[0],e[1],e[2],e[3]);for(var i=1;i<this.NUM_ITERATIONS;i++){var n=this.coordinates[i-1],o=this.coordinates[i];t.drawImage(this.canvas,n[0],n[1],n[2],n[3],o[0],o[1],o[2],o[3])}}},{key:"drawImageAtPosition",value:function(t,e,i,n,o,s){if(this.initialized())if(2<e){e*=.5;for(var r=0;2<e&&r<this.NUM_ITERATIONS;)e*=.5,r+=1;r>=this.NUM_ITERATIONS&&(r=this.NUM_ITERATIONS-1);var a=this.coordinates[r];t.drawImage(this.canvas,a[0],a[1],a[2],a[3],i,n,o,s)}else t.drawImage(this.image,i,n,o,s)}}]),r);function r(){(0,o.default)(this,r),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}e.default=s},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=n(i(1)),r=i(2),a=((0,s.default)(h,[{key:"setOptions",value:function(t){var e=["useDefaultGroups"];if(void 0!==t)for(var i in t)if(t.hasOwnProperty(i)&&-1===e.indexOf(i)){var n=t[i];this.add(i,n)}}},{key:"clear",value:function(){this.groups={},this.groupsArray=[]}},{key:"get",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=this.groups[t];if(void 0===i&&e)if(!1===this.options.useDefaultGroups&&0<this.groupsArray.length){var n=this.groupIndex%this.groupsArray.length;this.groupIndex++,(i={}).color=this.groups[this.groupsArray[n]],this.groups[t]=i}else{var o=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,(i={}).color=this.defaultGroups[o],this.groups[t]=i}return i}},{key:"add",value:function(t,e){return this.groups[t]=e,this.groupsArray.push(t),e}}]),h);function h(){(0,o.default)(this,h),this.clear(),this.defaultIndex=0,this.groupsArray=[],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},r.extend(this.options,this.defaultOptions)}e.default=a},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var s=n(i(0)),o=n(i(1)),r=i(2),a=i(11),h=i(12),d=i(47).default,l=((0,o.default)(u,[{key:"bindEventListeners",value:function(){var i=this;this.body.emitter.on("refreshNodes",this.refresh.bind(this)),this.body.emitter.on("refresh",this.refresh.bind(this)),this.body.emitter.on("destroy",function(){r.forEach(i.nodesListeners,function(t,e){i.body.data.nodes&&i.body.data.nodes.off(e,t)}),delete i.body.functions.createNode,delete i.nodesListeners.add,delete i.nodesListeners.update,delete i.nodesListeners.remove,delete i.nodesListeners})}},{key:"setOptions",value:function(t){if(void 0!==t){if(d.parseOptions(this.options,t),void 0!==t.shape)for(var e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&this.body.nodes[e].updateShape();if(void 0!==t.font)for(var i in this.body.nodes)this.body.nodes.hasOwnProperty(i)&&(this.body.nodes[i].updateLabelModule(),this.body.nodes[i].needsRefresh());if(void 0!==t.size)for(var n in this.body.nodes)this.body.nodes.hasOwnProperty(n)&&this.body.nodes[n].needsRefresh();void 0===t.hidden&&void 0===t.physics||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=this.body.data.nodes;if(t instanceof a||t instanceof h)this.body.data.nodes=t;else if(Array.isArray(t))this.body.data.nodes=new a,this.body.data.nodes.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new a}if(i&&r.forEach(this.nodesListeners,function(t,e){i.off(e,t)}),this.body.nodes={},this.body.data.nodes){var n=this;r.forEach(this.nodesListeners,function(t,e){n.body.data.nodes.on(e,t)});var o=this.body.data.nodes.getIds();this.add(o,!0)}!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=void 0,n=[],o=0;o<t.length;o++){i=t[o];var s=this.body.data.nodes.get(i),r=this.create(s);n.push(r),this.body.nodes[i]=r}this.layoutEngine.positionInitially(n),!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(t,e,n){for(var i=this.body.nodes,o=!1,s=0;s<t.length;s++){var r=t[s],a=i[r],h=e[s];void 0!==a?a.setOptions(h)&&(o=!0):(o=!0,a=this.create(h),i[r]=a)}o||void 0===n||(o=e.some(function(t,e){var i=n[e];return i&&i.level!==t.level})),!0===o?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(t){for(var e=this.body.nodes,i=0;i<t.length;i++)delete e[t[i]];this.body.emitter.emit("_dataChanged")}},{key:"create",value:function(t){return new(1<arguments.length&&void 0!==arguments[1]?arguments[1]:d)(t,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var n=this,o=0<arguments.length&&void 0!==arguments[0]&&arguments[0];r.forEach(this.body.nodes,function(t,e){var i=n.body.data.nodes.get(e);void 0!==i&&(!0===o&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(i))})}},{key:"getPositions",value:function(t){var e={};if(void 0!==t){if(!0===Array.isArray(t)){for(var i=0;i<t.length;i++)if(void 0!==this.body.nodes[t[i]]){var n=this.body.nodes[t[i]];e[t[i]]={x:Math.round(n.x),y:Math.round(n.y)}}}else if(void 0!==this.body.nodes[t]){var o=this.body.nodes[t];e[t]={x:Math.round(o.x),y:Math.round(o.y)}}}else for(var s=0;s<this.body.nodeIndices.length;s++){var r=this.body.nodes[this.body.nodeIndices[s]];e[this.body.nodeIndices[s]]={x:Math.round(r.x),y:Math.round(r.y)}}return e}},{key:"storePositions",value:function(){var t=[],e=this.body.data.nodes.getDataSet();for(var i in e._data)if(e._data.hasOwnProperty(i)){var n=this.body.nodes[i];e._data[i].x==Math.round(n.x)&&e._data[i].y==Math.round(n.y)||t.push({id:n.id,x:Math.round(n.x),y:Math.round(n.y)})}e.update(t)}},{key:"getBoundingBox",value:function(t){if(void 0!==this.body.nodes[t])return this.body.nodes[t].shape.boundingBox}},{key:"getConnectedNodes",value:function(t,e){var i=[];if(void 0!==this.body.nodes[t])for(var n=this.body.nodes[t],o={},s=0;s<n.edges.length;s++){var r=n.edges[s];"to"!==e&&r.toId==n.id?void 0===o[r.fromId]&&(i.push(r.fromId),o[r.fromId]=!0):"from"!==e&&r.fromId==n.id&&void 0===o[r.toId]&&(i.push(r.toId),o[r.toId]=!0)}return i}},{key:"getConnectedEdges",value:function(t){var e=[];if(void 0!==this.body.nodes[t])for(var i=this.body.nodes[t],n=0;n<i.edges.length;n++)e.push(i.edges[n].id);else console.log("NodeId provided for getConnectedEdges does not exist. Provided: ",t);return e}},{key:"moveNode",value:function(t,e,i){var n=this;void 0!==this.body.nodes[t]?(this.body.nodes[t].x=Number(e),this.body.nodes[t].y=Number(i),setTimeout(function(){n.body.emitter.emit("startSimulation")},0)):console.log("Node id supplied to moveNode does not exist. Provided: ",t)}}]),u);function u(t,e,i,n){var o=this;if((0,s.default)(this,u),this.body=t,this.images=e,this.groups=i,this.layoutEngine=n,this.body.functions.createNode=this.create.bind(this),this.nodesListeners={add:function(t,e){o.add(e.items)},update:function(t,e){o.update(e.items,e.data,e.oldData)},remove:function(t,e){o.remove(e.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:2,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},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,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(t,e,i,n){if(e===t)return.5;var o=1/(e-t);return Math.max(0,(n-t)*o)}},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},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=r.bridgeObject(this.defaultOptions),this.bindEventListeners()}e.default=l},function(t,e,i){t.exports={default:i(189),__esModule:!0}},function(t,e,i){i(49),i(60),t.exports=i(190)},function(t,e,i){var n=i(86),o=i(13)("iterator"),s=i(31);t.exports=i(7).isIterable=function(t){var e=Object(t);return void 0!==e[o]||"@@iterator"in e||s.hasOwnProperty(n(e))}},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var h=n(i(0)),o=n(i(1)),d=i(192).default,f=i(48).default,s=((0,o.default)(l,[{key:"process",value:function(t){if(!f.isValidLabel(t))return this.lines.finalize();var e=this.parent.fontOptions;t=(t=t.replace(/\r\n/g,"\n")).replace(/\r/g,"\n");var i=String(t).split("\n"),n=i.length;if(e.multi)for(var o=0;o<n;o++){var s=this.splitBlocks(i[o],e.multi);if(void 0!==s)if(0!==s.length){if(0<e.maxWdt)for(var r=0;r<s.length;r++){var a=s[r].mod,h=s[r].text;this.splitStringIntoLines(h,a,!0)}else for(var d=0;d<s.length;d++){var l=s[d].mod,u=s[d].text;this.lines.append(u,l)}this.lines.newLine()}else this.lines.newLine("")}else if(0<e.maxWdt)for(var c=0;c<n;c++)this.splitStringIntoLines(i[c]);else for(var p=0;p<n;p++)this.lines.newLine(i[p]);return this.lines.finalize()}},{key:"decodeMarkupSystem",value:function(t){var e="none";return"markdown"===t||"md"===t?e="markdown":!0!==t&&"html"!==t||(e="html"),e}},{key:"splitHtmlBlocks",value:function(t){for(var e=[],i={bold:!1,ital:!1,mono:!1,spacing:!1,position:0,buffer:"",modStack:[],mod:function(){return 0===this.modStack.length?"normal":this.modStack[0]},modName:function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":i.bold&&i.ital?"boldital":i.bold?"bold":i.ital?"ital":void 0},emitBlock:function(){this.spacing&&(this.add(" "),this.spacing=!1),0<this.buffer.length&&(e.push({text:this.buffer,mod:this.modName()}),this.buffer="")},add:function(t){" "===t&&(i.spacing=!0),i.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=t&&(this.buffer+=t)}};i.position<t.length;){var n=t.charAt(i.position);/[ \t]/.test(n)?i.mono?i.add(n):i.spacing=!0:/</.test(n)?i.mono||i.bold||!/<b>/.test(t.substr(i.position,3))?i.mono||i.ital||!/<i>/.test(t.substr(i.position,3))?!i.mono&&/<code>/.test(t.substr(i.position,6))?(i.emitBlock(),i.mono=!0,i.modStack.unshift("mono"),i.position+=5):!i.mono&&"bold"===i.mod()&&/<\/b>/.test(t.substr(i.position,4))?(i.emitBlock(),i.bold=!1,i.modStack.shift(),i.position+=3):!i.mono&&"ital"===i.mod()&&/<\/i>/.test(t.substr(i.position,4))?(i.emitBlock(),i.ital=!1,i.modStack.shift(),i.position+=3):"mono"===i.mod()&&/<\/code>/.test(t.substr(i.position,7))?(i.emitBlock(),i.mono=!1,i.modStack.shift(),i.position+=6):i.add(n):(i.emitBlock(),i.ital=!0,i.modStack.unshift("ital"),i.position+=2):(i.emitBlock(),i.bold=!0,i.modStack.unshift("bold"),i.position+=2):/&/.test(n)?/</.test(t.substr(i.position,4))?(i.add("<"),i.position+=3):/&/.test(t.substr(i.position,5))?(i.add("&"),i.position+=4):i.add("&"):i.add(n),i.position++}return i.emitBlock(),e}},{key:"splitMarkdownBlocks",value:function(t){for(var e=[],i={bold:!1,ital:!1,mono:!1,beginable:!0,spacing:!1,position:0,buffer:"",modStack:[],mod:function(){return 0===this.modStack.length?"normal":this.modStack[0]},modName:function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":i.bold&&i.ital?"boldital":i.bold?"bold":i.ital?"ital":void 0},emitBlock:function(){this.spacing&&(this.add(" "),this.spacing=!1),0<this.buffer.length&&(e.push({text:this.buffer,mod:this.modName()}),this.buffer="")},add:function(t){" "===t&&(i.spacing=!0),i.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=t&&(this.buffer+=t)}};i.position<t.length;){var n=t.charAt(i.position);/[ \t]/.test(n)?(i.mono?i.add(n):i.spacing=!0,i.beginable=!0):/\\/.test(n)?i.position<t.length+1&&(i.position++,n=t.charAt(i.position),/ \t/.test(n)?i.spacing=!0:(i.add(n),i.beginable=!1)):i.mono||i.bold||!i.beginable&&!i.spacing||!/\*/.test(n)?i.mono||i.ital||!i.beginable&&!i.spacing||!/\_/.test(n)?!i.mono&&(i.beginable||i.spacing)&&/`/.test(n)?(i.emitBlock(),i.mono=!0,i.modStack.unshift("mono")):!i.mono&&"bold"===i.mod()&&/\*/.test(n)?i.position===t.length-1||/[.,_` \t\n]/.test(t.charAt(i.position+1))?(i.emitBlock(),i.bold=!1,i.modStack.shift()):i.add(n):!i.mono&&"ital"===i.mod()&&/\_/.test(n)?i.position===t.length-1||/[.,*` \t\n]/.test(t.charAt(i.position+1))?(i.emitBlock(),i.ital=!1,i.modStack.shift()):i.add(n):i.mono&&"mono"===i.mod()&&/`/.test(n)?i.position===t.length-1||/[.,*_ \t\n]/.test(t.charAt(i.position+1))?(i.emitBlock(),i.mono=!1,i.modStack.shift()):i.add(n):(i.add(n),i.beginable=!1):(i.emitBlock(),i.ital=!0,i.modStack.unshift("ital")):(i.emitBlock(),i.bold=!0,i.modStack.unshift("bold")),i.position++}return i.emitBlock(),e}},{key:"splitBlocks",value:function(t,e){var i=this.decodeMarkupSystem(e);return"none"===i?[{text:t,mod:"normal"}]:"markdown"===i?this.splitMarkdownBlocks(t):"html"===i?this.splitHtmlBlocks(t):void 0}},{key:"overMaxWidth",value:function(t){var e=this.ctx.measureText(t).width;return this.lines.curWidth()+e>this.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(t){for(var e="",i=0;i<t.length;){var n=e+(""===e?"":" ")+t[i];if(this.overMaxWidth(n))break;e=n,i++}return i}},{key:"getLongestFitWord",value:function(t){for(var e=0;e<t.length&&!this.overMaxWidth(t.slice(0,e));)e++;return e}},{key:"splitStringIntoLines",value:function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"normal",i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=(t=(t=t.replace(/^( +)/g,"$1\r")).replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r")).split("\r");0<n.length;){var o=this.getLongestFit(n);if(0===o){var s=n[0],r=this.getLongestFitWord(s);this.lines.newLine(s.slice(0,r),e),n[0]=s.slice(r)}else{var a=o;" "===n[o-1]?o--:" "===n[a]&&a++;var h=n.slice(0,o).join("");o==n.length&&i?this.lines.append(h,e):this.lines.newLine(h,e),n=n.slice(a)}}}}]),l);function l(o,t,s,r){var a=this;(0,h.default)(this,l),this.ctx=o,this.parent=t;this.lines=new d(function(t,e){if(void 0===t)return 0;var i=a.parent.getFormattingValues(o,s,r,e),n=0;return""!==t&&(n=a.ctx.measureText(t).width),{width:n,values:i}})}e.default=s},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var h=n(i(90)),o=n(i(0)),s=((0,n(i(1)).default)(r,[{key:"_add",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"normal";void 0===this.lines[t]&&(this.lines[t]={width:0,height:0,blocks:[]});var n=e;void 0!==e&&""!==e||(n=" ");var o=this.measureText(n,i),s=(0,h.default)({},o.values);s.text=e,s.width=o.width,s.mod=i,void 0!==e&&""!==e||(s.width=0),this.lines[t].blocks.push(s),this.lines[t].width+=s.width}},{key:"curWidth",value:function(){var t=this.lines[this.current];return void 0===t?0:t.width}},{key:"append",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e)}},{key:"newLine",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e),this.current++}},{key:"determineLineHeights",value:function(){for(var t=0;t<this.lines.length;t++){var e=this.lines[t],i=0;if(void 0!==e.blocks)for(var n=0;n<e.blocks.length;n++){var o=e.blocks[n];i<o.height&&(i=o.height)}e.height=i}}},{key:"determineLabelSize",value:function(){for(var t=0,e=0,i=0;i<this.lines.length;i++){var n=this.lines[i];n.width>t&&(t=n.width),e+=n.height}this.width=t,this.height=e}},{key:"removeEmptyBlocks",value:function(){for(var t=[],e=0;e<this.lines.length;e++){var i=this.lines[e];if(0!==i.blocks.length&&(e!==this.lines.length-1||0!==i.width)){var n={};(0,h.default)(n,i),n.blocks=[];for(var o=void 0,s=[],r=0;r<i.blocks.length;r++){var a=i.blocks[r];0!==a.width?s.push(a):void 0===o&&(o=a)}0===s.length&&void 0!==o&&s.push(o),n.blocks=s,t.push(n)}}return t}},{key:"finalize",value:function(){this.determineLineHeights(),this.determineLabelSize();var t=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:t}}}]),r);function r(t){(0,o.default)(this,r),this.measureText=t,this.current=0,this.width=0,this.height=0,this.lines=[]}e.default=s},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(23)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"resize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.selected,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var n=this.getDimensionsFromLabel(t,e,i);this.width=n.width+this.margin.right+this.margin.left,this.height=n.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,n,o,s){this.resize(t,n,o),this.left=e-this.width/2,this.top=i-this.height/2,this.initContextForDraw(t,s),t.roundRect(this.left,this.top,this.width,this.height,s.borderRadius),this.performFill(t,s),this.updateBoundingBox(e,i,t,n,o),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,o)}},{key:"updateBoundingBox",value:function(t,e,i,n,o){this._updateBoundingBox(t,e,i,n,o);var s=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(s)}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+i}}]),c);function c(t,e,i){(0,r.default)(this,c);var n=(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i));return n._setMargins(i),n}e.default=u},function(t,e,i){i(195),t.exports=i(7).Object.getPrototypeOf},function(t,e,i){var n=i(41),o=i(85);i(87)("getPrototypeOf",function(){return function(t){return o(n(t))}})},function(t,e,i){t.exports={default:i(197),__esModule:!0}},function(t,e,i){i(198),t.exports=i(7).Object.setPrototypeOf},function(t,e,i){var n=i(17);n(n.S,"Object",{setPrototypeOf:i(199).set})},function(t,e,o){function s(t,e){if(n(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")}var i=o(32),n=o(27);t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,i,n){try{(n=o(80)(Function.call,o(89).f(Object.prototype,"__proto__").set,2))(t,[]),i=!(t instanceof Array)}catch(t){i=!0}return function(t,e){return s(t,e),i?t.__proto__=e:n(t,e),t}}({},!1):void 0),check:s}},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(73)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"resize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.selected,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var n=this.getDimensionsFromLabel(t,e,i),o=Math.max(n.width+this.margin.right+this.margin.left,n.height+this.margin.top+this.margin.bottom);this.options.size=o/2,this.width=o,this.height=o,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,n,o,s){this.resize(t,n,o),this.left=e-this.width/2,this.top=i-this.height/2,this._drawRawCircle(t,e,i,s),this.updateBoundingBox(e,i),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,i,n,o)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),.5*this.width}}]),c);function c(t,e,i){(0,r.default)(this,c);var n=(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i));return n._setMargins(i),n}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,r=n(i(3)),a=n(i(0)),s=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(73)),u=(o=l.default,(0,d.default)(c,o),(0,s.default)(c,[{key:"resize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.selected,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var n=2*this.options.size;return this.width=n,this.height=n,void(this.radius=.5*this.width)}this.needsRefresh(e,i)&&this._resizeImage()}},{key:"draw",value:function(t,e,i,n,o,s){this.switchImages(n),this.resize(),this.left=e-this.width/2,this.top=i-this.height/2,this._drawRawCircle(t,e,i,s),t.save(),t.clip(),this._drawImageAtPosition(t,s),t.restore(),this._drawImageLabel(t,e,i,n,o),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+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)}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),.5*this.width}}]),c);function c(t,e,i,n,o){(0,a.default)(this,c);var s=(0,h.default)(this,(c.__proto__||(0,r.default)(c)).call(this,t,e,i));return s.setImages(n,o),s}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(23)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"resize",value:function(t,e,i){if(this.needsRefresh(e,i)){var n=this.getDimensionsFromLabel(t,e,i).width+this.margin.right+this.margin.left;this.width=n,this.height=n,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,n,o,s){this.resize(t,n,o),this.left=e-this.width/2,this.top=i-this.height/2,this.initContextForDraw(t,s),t.database(e-this.width/2,i-this.height/2,this.width,this.height),this.performFill(t,s),this.updateBoundingBox(e,i,t,n,o),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),c);function c(t,e,i){(0,r.default)(this,c);var n=(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i));return n._setMargins(i),n}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(24)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"draw",value:function(t,e,i,n,o,s){this._drawShape(t,"diamond",4,e,i,n,o,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(24)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"draw",value:function(t,e,i,n,o,s){this._drawShape(t,"circle",2,e,i,n,o,s)}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),this.options.size}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(23)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"resize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.selected,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var n=this.getDimensionsFromLabel(t,e,i);this.height=2*n.height,this.width=n.width+n.height,this.radius=.5*this.width}}},{key:"draw",value:function(t,e,i,n,o,s){this.resize(t,n,o),this.left=e-.5*this.width,this.top=i-.5*this.height,this.initContextForDraw(t,s),t.ellipse_vis(this.left,this.top,this.width,this.height),this.performFill(t,s),this.updateBoundingBox(e,i,t,n,o),this.labelModule.draw(t,e,i,n,o)}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=.5*this.width,n=.5*this.height,o=Math.sin(e)*i,s=Math.cos(e)*n;return i*n/Math.sqrt(o*o+s*s)}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(23)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"resize",value:function(t,e,i){this.needsRefresh(e,i)&&(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)}},{key:"draw",value:function(t,e,i,n,o,s){this.resize(t,n,o),this.options.icon.size=this.options.icon.size||50,this.left=e-this.width/2,this.top=i-this.height/2,this._icon(t,e,i,n,o,s),void 0!==this.options.label&&this.labelModule.draw(t,this.left+this.iconSize.width/2+this.margin.left,i+this.height/2+5,n),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-.5*this.options.icon.size,this.boundingBox.left=t-.5*this.options.icon.size,this.boundingBox.right=t+.5*this.options.icon.size,this.boundingBox.bottom=e+.5*this.options.icon.size,void 0!==this.options.label&&0<this.labelModule.size.width&&(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))}},{key:"_icon",value:function(t,e,i,n,o,s){var r=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=(n?"bold ":"")+r+"px "+this.options.icon.face,t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t,s),t.fillText(this.options.icon.code,e,i),this.disableShadow(t,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.")}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),c);function c(t,e,i){(0,r.default)(this,c);var n=(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i));return n._setMargins(i),n}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,r=n(i(3)),a=n(i(0)),s=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(73)),u=(o=l.default,(0,d.default)(c,o),(0,s.default)(c,[{key:"resize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.selected,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var n=2*this.options.size;return this.width=n,void(this.height=n)}this.needsRefresh(e,i)&&this._resizeImage()}},{key:"draw",value:function(t,e,i,n,o,s){if(this.switchImages(n),this.resize(),this.left=e-this.width/2,this.top=i-this.height/2,!0===this.options.shapeProperties.useBorderWithImage){var r=this.options.borderWidth,a=this.options.borderWidthSelected||2*this.options.borderWidth,h=(n?a:r)/this.body.view.scale;t.lineWidth=Math.min(this.width,h),t.beginPath(),t.strokeStyle=n?this.options.color.highlight.border:o?this.options.color.hover.border:this.options.color.border,t.fillStyle=n?this.options.color.highlight.background:o?this.options.color.hover.background:this.options.color.background,t.rect(this.left-.5*t.lineWidth,this.top-.5*t.lineWidth,this.width+t.lineWidth,this.height+t.lineWidth),t.fill(),this.performStroke(t,s),t.closePath()}this._drawImageAtPosition(t,s),this._drawImageLabel(t,e,i,n,o),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.resize(),this._updateBoundingBox(t,e),void 0!==this.options.label&&0<this.labelModule.size.width&&(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))}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),c);function c(t,e,i,n,o){(0,a.default)(this,c);var s=(0,h.default)(this,(c.__proto__||(0,r.default)(c)).call(this,t,e,i));return s.setImages(n,o),s}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(24)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"draw",value:function(t,e,i,n,o,s){this._drawShape(t,"square",2,e,i,n,o,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(24)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"draw",value:function(t,e,i,n,o,s){this._drawShape(t,"hexagon",4,e,i,n,o,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(24)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"draw",value:function(t,e,i,n,o,s){this._drawShape(t,"star",4,e,i,n,o,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(23)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"resize",value:function(t,e,i){this.needsRefresh(e,i)&&(this.textSize=this.labelModule.getTextSize(t,e,i),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)}},{key:"draw",value:function(t,e,i,n,o,s){this.resize(t,n,o),this.left=e-this.width/2,this.top=i-this.height/2,this.enableShadow(t,s),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,o),this.disableShadow(t,s),this.updateBoundingBox(e,i,t,n,o)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),c);function c(t,e,i){(0,r.default)(this,c);var n=(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i));return n._setMargins(i),n}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(24)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"draw",value:function(t,e,i,n,o,s){this._drawShape(t,"triangle",3,e,i,n,o,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(24)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"draw",value:function(t,e,i,n,o,s){this._drawShape(t,"triangleDown",3,e,i,n,o,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=n(i(1)),r=i(2),a=i(11),h=i(12),d=i(74).default,l=((0,s.default)(u,[{key:"bindEventListeners",value:function(){var a=this;this.body.emitter.on("_forceDisableDynamicCurves",function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];"dynamic"===t&&(t="continuous");var i=!1;for(var n in a.body.edges)if(a.body.edges.hasOwnProperty(n)){var o=a.body.edges[n],s=a.body.data.edges._data[n];if(void 0!==s){var r=s.smooth;void 0!==r&&!0===r.enabled&&"dynamic"===r.type&&(void 0===t?o.setOptions({smooth:!1}):o.setOptions({smooth:{type:t}}),i=!0)}}!0===e&&!0===i&&a.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){a.reconnectEdges()}),this.body.emitter.on("refreshEdges",this.refresh.bind(this)),this.body.emitter.on("refresh",this.refresh.bind(this)),this.body.emitter.on("destroy",function(){r.forEach(a.edgesListeners,function(t,e){a.body.data.edges&&a.body.data.edges.off(e,t)}),delete a.body.functions.createEdge,delete a.edgesListeners.add,delete a.edgesListeners.update,delete a.edgesListeners.remove,delete a.edgesListeners})}},{key:"setOptions",value:function(t){if(void 0!==t){d.parseOptions(this.options,t,!0,this.defaultOptions,!0);var e=!1;if(void 0!==t.smooth)for(var i in this.body.edges)this.body.edges.hasOwnProperty(i)&&(e=this.body.edges[i].updateEdgeType()||e);if(void 0!==t.font)for(var n in this.body.edges)this.body.edges.hasOwnProperty(n)&&this.body.edges[n].updateLabelModule();void 0===t.hidden&&void 0===t.physics&&!0!==e||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(t){var i=this,e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=this.body.data.edges;if(t instanceof a||t instanceof h)this.body.data.edges=t;else if(Array.isArray(t))this.body.data.edges=new a,this.body.data.edges.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.edges=new a}if(n&&r.forEach(this.edgesListeners,function(t,e){n.off(e,t)}),this.body.edges={},this.body.data.edges){r.forEach(this.edgesListeners,function(t,e){i.body.data.edges.on(e,t)});var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=this.body.edges,n=this.body.data.edges,o=0;o<t.length;o++){var s=t[o],r=i[s];r&&r.disconnect();var a=n.get(s,{showInternalIds:!0});i[s]=this.create(a)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(t){for(var e=this.body.edges,i=this.body.data.edges,n=!1,o=0;o<t.length;o++){var s=t[o],r=i.get(s),a=e[s];void 0!==a?(a.disconnect(),n=a.setOptions(r)||n,a.connect()):(this.body.edges[s]=this.create(r),n=!0)}!0===n?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(0!==t.length){var i=this.body.edges;r.forEach(t,function(t){var e=i[t];void 0!==e&&e.remove()}),e&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var n=this;r.forEach(this.body.edges,function(t,e){var i=n.body.data.edges._data[e];void 0!==i&&t.setOptions(i)})}},{key:"create",value:function(t){return new d(t,this.body,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var t,e=this.body.nodes,i=this.body.edges;for(t in e)e.hasOwnProperty(t)&&(e[t].edges=[]);for(t in i)if(i.hasOwnProperty(t)){var n=i[t];n.from=null,n.to=null,n.connect()}}},{key:"getConnectedNodes",value:function(t){var e=[];if(void 0!==this.body.edges[t]){var i=this.body.edges[t];void 0!==i.fromId&&e.push(i.fromId),void 0!==i.toId&&e.push(i.toId)}return e}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var o=this,s=[];r.forEach(this.body.edges,function(t,e){var i=o.body.nodes[t.toId],n=o.body.nodes[t.fromId];void 0!==i&&!0===i.isCluster||void 0!==n&&!0===n.isCluster||void 0!==i&&void 0!==n||s.push(e)}),this.remove(s,!1)}},{key:"_addMissingEdges",value:function(){var i=this.body.edges,t=this.body.data.edges,n=[];t.forEach(function(t,e){void 0===i[e]&&n.push(e)}),this.add(n,!0)}}]),u);function u(t,e,i){var n=this;(0,o.default)(this,u),this.body=t,this.images=e,this.groups=i,this.body.functions.createEdge=this.create.bind(this),this.edgesListeners={add:function(t,e){n.add(e.items)},update:function(t,e){n.update(e.items)},remove:function(t,e){n.remove(e.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"}},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(t,e,i,n){if(e===t)return.5;var o=1/(e-t);return Math.max(0,(n-t)*o)}},selectionWidth:1.5,selfReferenceSize:20,shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},r.deepExtend(this.options,this.defaultOptions),this.bindEventListeners()}e.default=l},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,l=n(i(30)),s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),u=n(i(216)),c=(o=u.default,(0,d.default)(p,o),(0,a.default)(p,[{key:"_line",value:function(t,e,i){var n=i[0],o=i[1];this._bezierCurve(t,e,n,o)}},{key:"_getViaCoordinates",value:function(){var t=this.from.x-this.to.x,e=this.from.y-this.to.y,i=void 0,n=void 0,o=void 0,s=void 0,r=this.options.smooth.roundness;return o=(Math.abs(t)>Math.abs(e)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(n=this.from.y,s=this.to.y,i=this.from.x-r*t,this.to.x+r*t):(n=this.from.y-r*e,s=this.to.y+r*e,i=this.from.x,this.to.x),[{x:i,y:n},{x:o,y:s}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,i,n,o,s){var r=6<arguments.length&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates(),a=(0,l.default)(r,2),h=a[0],d=a[1];return this._getDistanceToBezierEdge(t,e,i,n,o,s,h,d)}},{key:"getPoint",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=(0,l.default)(e,2),n=i[0],o=i[1],s=t,r=[];return r[0]=Math.pow(1-s,3),r[1]=3*s*Math.pow(1-s,2),r[2]=3*Math.pow(s,2)*(1-s),r[3]=Math.pow(s,3),{x:r[0]*this.fromPoint.x+r[1]*n.x+r[2]*o.x+r[3]*this.toPoint.x,y:r[0]*this.fromPoint.y+r[1]*n.y+r[2]*o.y+r[3]*this.toPoint.y}}}]),p);function p(t,e,i){return(0,r.default)(this,p),(0,h.default)(this,(p.__proto__||(0,s.default)(p)).call(this,t,e,i))}e.default=c},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(75)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"_getDistanceToBezierEdge",value:function(t,e,i,n,o,s,r,a){var h=1e9,d=void 0,l=void 0,u=void 0,c=void 0,p=void 0,f=t,m=e,v=[0,0,0,0];for(l=1;l<10;l++)u=.1*l,v[0]=Math.pow(1-u,3),v[1]=3*u*Math.pow(1-u,2),v[2]=3*Math.pow(u,2)*(1-u),v[3]=Math.pow(u,3),c=v[0]*t+v[1]*r.x+v[2]*a.x+v[3]*i,p=v[0]*e+v[1]*r.y+v[2]*a.y+v[3]*n,0<l&&(h=(d=this._getDistanceToLine(f,m,c,p,o,s))<h?d:h),f=c,m=p;return h}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,u=n(i(30)),s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(75)),c=(o=l.default,(0,d.default)(p,o),(0,a.default)(p,[{key:"setOptions",value:function(t){var e=!1;this.options.physics!==t.physics&&(e=!0),this.options=t,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(),!0===e&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this.body.nodes[this.options.from],this.to=this.body.nodes[this.options.to],void 0===this.from||void 0===this.to||!1===this.options.physics?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this.body.emitter.off("_repositionBezierNodes",this._boundFunction),void 0!==this.via&&(delete this.body.nodes[this.via.id],!(this.via=void 0))}},{key:"setupSupportNode",value:function(){if(void 0===this.via){var t="edgeId:"+this.id,e=this.body.functions.createNode({id:t,shape:"circle",physics:!0,hidden:!0});this.body.nodes[t]=e,this.via=e,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){void 0!==this.via&&void 0!==this.from&&void 0!==this.to?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):void 0!==this.via&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(t,e,i){this._bezierCurve(t,e,i)}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.via,i=t,n=void 0,o=void 0;if(this.from===this.to){var s=this._getCircleData(this.from),r=(0,u.default)(s,3),a=r[0],h=r[1],d=r[2],l=2*Math.PI*(1-i);n=a+d*Math.sin(l),o=h+d-d*(1-Math.cos(l))}else n=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*e.x+Math.pow(i,2)*this.toPoint.x,o=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*e.y+Math.pow(i,2)*this.toPoint.y;return{x:n,y:o}}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e,this.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,n,o,s){return this._getDistanceToBezierEdge(t,e,i,n,o,s,this.via)}}]),p);function p(t,e,i){(0,r.default)(this,p);var n=(0,h.default)(this,(p.__proto__||(0,s.default)(p)).call(this,t,e,i));return n._boundFunction=function(){n.positionBezierNode()},n.body.emitter.on("_repositionBezierNodes",n._boundFunction),n}e.default=c},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(75)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"_line",value:function(t,e,i){this._bezierCurve(t,e,i)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var t=void 0,e=void 0,i=this.options.smooth.roundness,n=this.options.smooth.type,o=Math.abs(this.from.x-this.to.x),s=Math.abs(this.from.y-this.to.y);if("discrete"===n||"diagonalCross"===n){var r=void 0,a=void 0;r=a=o<=s?i*s:i*o,this.from.x>this.to.x&&(r=-r),this.from.y>=this.to.y&&(a=-a),t=this.from.x+r,e=this.from.y+a,"discrete"===n&&(o<=s?t=o<i*s?this.from.x:t:e=s<i*o?this.from.y:e)}else if("straightCross"===n){var h=(1-i)*o,d=(1-i)*s;o<=s?(h=0,this.from.y<this.to.y&&(d=-d)):(this.from.x<this.to.x&&(h=-h),d=0),t=this.to.x+h,e=this.to.y+d}else if("horizontal"===n){var l=(1-i)*o;this.from.x<this.to.x&&(l=-l),t=this.to.x+l,e=this.from.y}else if("vertical"===n){var u=(1-i)*s;this.from.y<this.to.y&&(u=-u),t=this.from.x,e=this.to.y+u}else if("curvedCW"===n){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var c=Math.sqrt(o*o+s*s),p=Math.PI,f=(Math.atan2(s,o)+(.5*i+.5)*p)%(2*p);t=this.from.x+(.5*i+.5)*c*Math.sin(f),e=this.from.y+(.5*i+.5)*c*Math.cos(f)}else if("curvedCCW"===n){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var m=Math.sqrt(o*o+s*s),v=Math.PI,g=(Math.atan2(s,o)+(.5*-i+.5)*v)%(2*v);t=this.from.x+(.5*i+.5)*m*Math.sin(g),e=this.from.y+(.5*i+.5)*m*Math.cos(g)}else{var y=void 0,b=void 0;y=b=o<=s?i*s:i*o,this.from.x>this.to.x&&(y=-y),this.from.y>=this.to.y&&(b=-b),t=this.from.x+y,e=this.from.y+b,o<=s?t=this.from.x<=this.to.x?this.to.x<t?this.to.x:t:this.to.x>t?this.to.x:t:e=this.from.y>=this.to.y?this.to.y>e?this.to.y:e:this.to.y<e?this.to.y:e}return{x:t,y:e}}},{key:"_findBorderPosition",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return this._findBorderPositionBezier(t,e,i.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,n,o,s){var r=6<arguments.length&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(t,e,i,n,o,s,r)}},{key:"getPoint",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=t;return{x:Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*e.x+Math.pow(i,2)*this.toPoint.x,y:Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*e.y+Math.pow(i,2)*this.toPoint.y}}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(118)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"_line",value:function(t,e){t.beginPath(),t.moveTo(this.fromPoint.x,this.fromPoint.y),t.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(t){return{x:(1-t)*this.fromPoint.x+t*this.toPoint.x,y:(1-t)*this.fromPoint.y+t*this.toPoint.y}}},{key:"_findBorderPosition",value:function(t,e){var i=this.to,n=this.from;t.id===this.from.id&&(i=this.from,n=this.to);var o=Math.atan2(i.y-n.y,i.x-n.x),s=i.x-n.x,r=i.y-n.y,a=Math.sqrt(s*s+r*r),h=(a-t.distanceToBorder(e,o))/a,d={};return d.x=(1-h)*n.x+h*i.x,d.y=(1-h)*n.y+h*i.y,d}},{key:"_getDistanceToEdge",value:function(t,e,i,n,o,s){return this._getDistanceToLine(t,e,i,n,o,s)}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var s=n(i(8)),o=n(i(0)),r=n(i(1)),a=i(120).default,h=i(221).default,d=i(222).default,l=i(223).default,u=i(224).default,c=i(121).default,p=i(225).default,f=i(226).default,m=i(2),v=i(119).default,g=((0,r.default)(y,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("initPhysics",function(){t.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){t.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){t.stopSimulation(),t.ready=!1}),this.body.emitter.on("disablePhysics",function(){t.physicsEnabled=!1,t.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){t.setOptions(t.options),!0===t.ready&&t.startSimulation()}),this.body.emitter.on("startSimulation",function(){!0===t.ready&&t.startSimulation()}),this.body.emitter.on("stopSimulation",function(){t.stopSimulation()}),this.body.emitter.on("destroy",function(){t.stopSimulation(!1),t.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){t.updatePhysicsData()})}},{key:"setOptions",value:function(t){void 0!==t&&(!1===t?(this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation()):!0===t?(this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation()):(this.physicsEnabled=!0,m.selectiveNotDeepExtend(["stabilization"],this.options,t),m.mergeOptions(this.options,t,"stabilization"),void 0===t.enabled&&(this.options.enabled=!0),!1===this.options.enabled&&(this.physicsEnabled=!1,this.stopSimulation()),this.timestep=this.options.timestep)),this.init()}},{key:"init",value:function(){var t;"forceAtlas2Based"===this.options.solver?(t=this.options.forceAtlas2Based,this.nodesSolver=new p(this.body,this.physicsBody,t),this.edgesSolver=new l(this.body,this.physicsBody,t),this.gravitySolver=new f(this.body,this.physicsBody,t)):("repulsion"===this.options.solver?(t=this.options.repulsion,this.nodesSolver=new h(this.body,this.physicsBody,t),this.edgesSolver=new l(this.body,this.physicsBody,t)):"hierarchicalRepulsion"===this.options.solver?(t=this.options.hierarchicalRepulsion,this.nodesSolver=new d(this.body,this.physicsBody,t),this.edgesSolver=new u(this.body,this.physicsBody,t)):(t=this.options.barnesHut,this.nodesSolver=new a(this.body,this.physicsBody,t),this.edgesSolver=new l(this.body,this.physicsBody,t)),this.gravitySolver=new c(this.body,this.physicsBody,t)),this.modelOptions=t}},{key:"initPhysics",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?!0===this.options.stabilization.enabled?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"))}},{key:"startSimulation",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),void 0===this.viewFunction&&(this.viewFunction=this.simulationStep.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))):this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];(this.stabilized=!0)===t&&this._emitStabilized(),void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),!(this.viewFunction=void 0)===t&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var t=Date.now();this.physicsTick(),(Date.now()-t<.4*this.simulationInterval||!0===this.runDoubleSpeed)&&!1===this.stabilized&&(this.physicsTick(),this.runDoubleSpeed=!0),!0===this.stabilized&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.stabilizationIterations;(1<this.stabilizationIterations||!0===this.startedStabilization)&&setTimeout(function(){t.body.emitter.emit("stabilized",{iterations:e}),t.startedStabilization=!1,t.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){!0===this._evaluateStepQuality()?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))}},{key:"physicsTick",value:function(){this._startStabilizing(),!0!==this.stabilized&&(!0===this.adaptiveTimestep&&!0===this.adaptiveTimestepEnabled?(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()),!0===this.stabilized&&this.revert(),this.stabilizationIterations++)}},{key:"updatePhysicsData",value:function(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];var t=this.body.nodes,e=this.body.edges;for(var i in t)t.hasOwnProperty(i)&&!0===t[i].options.physics&&this.physicsBody.physicsNodeIndices.push(t[i].id);for(var n in e)e.hasOwnProperty(n)&&!0===e[n].options.physics&&this.physicsBody.physicsEdgeIndices.push(e[n].id);for(var o=0;o<this.physicsBody.physicsNodeIndices.length;o++){var s=this.physicsBody.physicsNodeIndices[o];this.physicsBody.forces[s]={x:0,y:0},void 0===this.physicsBody.velocities[s]&&(this.physicsBody.velocities[s]={x:0,y:0})}for(var r in this.physicsBody.velocities)void 0===t[r]&&delete this.physicsBody.velocities[r]}},{key:"revert",value:function(){var t=(0,s.default)(this.previousStates),e=this.body.nodes,i=this.physicsBody.velocities;this.referenceState={};for(var n=0;n<t.length;n++){var o=t[n];void 0!==e[o]?!0===e[o].options.physics&&(this.referenceState[o]={positions:{x:e[o].x,y:e[o].y}},i[o].x=this.previousStates[o].vx,i[o].y=this.previousStates[o].vy,e[o].x=this.previousStates[o].x,e[o].y=this.previousStates[o].y):delete this.previousStates[o]}}},{key:"_evaluateStepQuality",value:function(){var t=void 0,e=void 0,i=this.body.nodes,n=this.referenceState;for(var o in this.referenceState)if(this.referenceState.hasOwnProperty(o)&&void 0!==i[o]&&(t=i[o].x-n[o].positions.x,e=i[o].y-n[o].positions.y,.3<Math.sqrt(Math.pow(t,2)+Math.pow(e,2))))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=0,i=0,n=0;n<t.length;n++){var o=t[n],s=this._performStep(o);e=Math.max(e,s),i+=s}this.adaptiveTimestepEnabled=i/t.length<5,this.stabilized=e<this.options.minVelocity}},{key:"calculateComponentVelocity",value:function(t,e,i){t+=(e-this.modelOptions.damping*t)/i*this.timestep;var n=this.options.maxVelocity||1e9;return Math.abs(t)>n&&(t=0<t?n:-n),t}},{key:"_performStep",value:function(t){var e=this.body.nodes[t],i=this.physicsBody.forces[t],n=this.physicsBody.velocities[t];return!(this.previousStates[t]={x:e.x,y:e.y,vx:n.x,vy:n.y})===e.options.fixed.x?(n.x=this.calculateComponentVelocity(n.x,i.x,e.options.mass),e.x+=n.x*this.timestep):(i.x=0,n.x=0),!1===e.options.fixed.y?(n.y=this.calculateComponentVelocity(n.y,i.y,e.options.mass),e.y+=n.y*this.timestep):(i.y=0,n.y=0),Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2))}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)if(t.hasOwnProperty(e)&&t[e].x&&t[e].y){var i=t[e].options.fixed;this.freezeCache[e]={x:i.x,y:i.y},i.x=!0,i.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.options.stabilization.iterations;"number"!=typeof e&&(e=this.options.stabilization.iterations,console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),0!==this.physicsBody.physicsNodeIndices.length?(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,!0===this.options.stabilization.onlyDynamicEdges&&this._freezeNodes(),this.stabilizationIterations=0,setTimeout(function(){return t._stabilizationBatch()},0)):this.ready=!0}},{key:"_startStabilizing",value:function(){return!0!==this.startedStabilization&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0)}},{key:"_stabilizationBatch",value:function(){function t(){return!1===i.stabilized&&i.stabilizationIterations<i.targetIterations}function e(){i.body.emitter.emit("stabilizationProgress",{iterations:i.stabilizationIterations,total:i.targetIterations})}var i=this;this._startStabilizing()&&e();for(var n=0;t()&&n<this.options.stabilization.updateInterval;)this.physicsTick(),n++;e(),t()?setTimeout(this._stabilizationBatch.bind(this),0):this._finalizeStabilization()}},{key:"_finalizeStabilization",value:function(){this.body.emitter.emit("_allowRedraw"),!0===this.options.stabilization.fit&&this.body.emitter.emit("fit"),!0===this.options.stabilization.onlyDynamicEdges&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),!0===this.stabilized?this._emitStabilized():this.startSimulation(),this.ready=!0}},{key:"_drawForces",value:function(t){for(var e=0;e<this.physicsBody.physicsNodeIndices.length;e++){var i=this.physicsBody.physicsNodeIndices[e],n=this.body.nodes[i],o=this.physicsBody.forces[i],s=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.x,2)),r=Math.min(Math.max(5,s),15),a=3*r,h=m.HSVToHex((180-180*Math.min(1,Math.max(0,.03*s)))/360,1,1),d={x:n.x+20*o.x,y:n.y+20*o.y};t.lineWidth=r,t.strokeStyle=h,t.beginPath(),t.moveTo(n.x,n.y),t.lineTo(d.x,d.y),t.stroke();var l=Math.atan2(o.y,o.x);t.fillStyle=h,v.draw(t,{type:"arrow",point:d,angle:l,length:a}),t.fill()}}}]),y);function y(t){(0,o.default)(this,y),this.body=t,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},m.extend(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}e.default=g},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=((0,n(i(1)).default)(r,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t,e,i,n,o,s,r,a,h=this.body.nodes,d=this.physicsBody.physicsNodeIndices,l=this.physicsBody.forces,u=this.options.nodeDistance,c=-2/3/u,p=0;p<d.length-1;p++){r=h[d[p]];for(var f=p+1;f<d.length;f++)t=(a=h[d[f]]).x-r.x,e=a.y-r.y,0===(i=Math.sqrt(t*t+e*e))&&(t=i=.1*Math.random()),i<2*u&&(s=i<.5*u?1:c*i+4/3,n=t*(s/=i),o=e*s,l[r.id].x-=n,l[r.id].y-=o,l[a.id].x+=n,l[a.id].y+=o)}}}]),r);function r(t,e,i){(0,o.default)(this,r),this.body=t,this.physicsBody=e,this.setOptions(i)}e.default=s},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=((0,n(i(1)).default)(r,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){var t,e,i,n,o,s,r,a,h,d,l=this.body.nodes,u=this.physicsBody.physicsNodeIndices,c=this.physicsBody.forces,p=this.options.nodeDistance;for(h=0;h<u.length-1;h++)for(r=l[u[h]],d=h+1;d<u.length;d++)a=l[u[d]],r.level===a.level&&(t=a.x-r.x,e=a.y-r.y,s=(i=Math.sqrt(t*t+e*e))<p?-Math.pow(.05*i,2)+Math.pow(.05*p,2):0,0===i?i=.01:s/=i,n=t*s,o=e*s,c[r.id].x-=n,c[r.id].y-=o,c[a.id].x+=n,c[a.id].y+=o)}}]),r);function r(t,e,i){(0,o.default)(this,r),this.body=t,this.physicsBody=e,this.setOptions(i)}e.default=s},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=((0,n(i(1)).default)(r,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t=void 0,e=void 0,i=this.physicsBody.physicsEdgeIndices,n=this.body.edges,o=void 0,s=void 0,r=void 0,a=0;a<i.length;a++)!0===(e=n[i[a]]).connected&&e.toId!==e.fromId&&void 0!==this.body.nodes[e.toId]&&void 0!==this.body.nodes[e.fromId]&&(void 0!==e.edgeType.via?(t=void 0===e.options.length?this.options.springLength:e.options.length,o=e.to,s=e.edgeType.via,r=e.from,this._calculateSpringForce(o,s,.5*t),this._calculateSpringForce(s,r,.5*t)):(t=void 0===e.options.length?1.5*this.options.springLength:e.options.length,this._calculateSpringForce(e.from,e.to,t)))}},{key:"_calculateSpringForce",value:function(t,e,i){var n=t.x-e.x,o=t.y-e.y,s=Math.max(Math.sqrt(n*n+o*o),.01),r=this.options.springConstant*(i-s)/s,a=n*r,h=o*r;void 0!==this.physicsBody.forces[t.id]&&(this.physicsBody.forces[t.id].x+=a,this.physicsBody.forces[t.id].y+=h),void 0!==this.physicsBody.forces[e.id]&&(this.physicsBody.forces[e.id].x-=a,this.physicsBody.forces[e.id].y-=h)}}]),r);function r(t,e,i){(0,o.default)(this,r),this.body=t,this.physicsBody=e,this.setOptions(i)}e.default=s},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=((0,n(i(1)).default)(r,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t,e,i,n,o,s,r,a,h=this.body.edges,d=this.physicsBody.physicsEdgeIndices,l=this.physicsBody.physicsNodeIndices,u=this.physicsBody.forces,c=0;c<l.length;c++){var p=l[c];u[p].springFx=0,u[p].springFy=0}for(var f=0;f<d.length;f++)!0===(e=h[d[f]]).connected&&(t=void 0===e.options.length?this.options.springLength:e.options.length,i=e.from.x-e.to.x,n=e.from.y-e.to.y,a=0===(a=Math.sqrt(i*i+n*n))?.01:a,o=i*(r=this.options.springConstant*(t-a)/a),s=n*r,e.to.level!=e.from.level?(void 0!==u[e.toId]&&(u[e.toId].springFx-=o,u[e.toId].springFy-=s),void 0!==u[e.fromId]&&(u[e.fromId].springFx+=o,u[e.fromId].springFy+=s)):(void 0!==u[e.toId]&&(u[e.toId].x-=.5*o,u[e.toId].y-=.5*s),void 0!==u[e.fromId]&&(u[e.fromId].x+=.5*o,u[e.fromId].y+=.5*s)));r=1;for(var m,v,g=0;g<l.length;g++){var y=l[g];m=Math.min(r,Math.max(-r,u[y].springFx)),v=Math.min(r,Math.max(-r,u[y].springFy)),u[y].x+=m,u[y].y+=v}for(var b=0,_=0,w=0;w<l.length;w++){var x=l[w];b+=u[x].x,_+=u[x].y}for(var k=b/l.length,S=_/l.length,D=0;D<l.length;D++){var E=l[D];u[E].x-=k,u[E].y-=S}}}]),r);function r(t,e,i){(0,o.default)(this,r),this.body=t,this.physicsBody=e,this.setOptions(i)}e.default=s},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(120)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"_calculateForces",value:function(t,e,i,n,o){0===t&&(e=t=.1*Math.random()),this.overlapAvoidanceFactor<1&&n.shape.radius&&(t=Math.max(.1+this.overlapAvoidanceFactor*n.shape.radius,t-n.shape.radius));var s=n.edges.length+1,r=this.options.gravitationalConstant*o.mass*n.options.mass*s/Math.pow(t,2),a=e*r,h=i*r;this.physicsBody.forces[n.id].x+=a,this.physicsBody.forces[n.id].y+=h}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(i(3)),r=n(i(0)),a=n(i(1)),h=n(i(4)),d=n(i(5)),l=n(i(121)),u=(o=l.default,(0,d.default)(c,o),(0,a.default)(c,[{key:"_calculateForces",value:function(t,e,i,n,o){if(0<t){var s=o.edges.length+1,r=this.options.centralGravity*s*o.options.mass;n[o.id].x=e*r,n[o.id].y=i*r}}}]),c);function c(t,e,i){return(0,r.default)(this,c),(0,h.default)(this,(c.__proto__||(0,s.default)(c)).call(this,t,e,i))}e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var w=n(i(8)),r=n(i(6)),o=n(i(0)),s=n(i(1)),I=i(2),x=i(76).default,g=i(228).default,u=i(74).default,c=i(47).default,a=((0,s.default)(h,[{key:"clusterByHubsize",value:function(t,e){void 0===t?t=this._getHubSize():"object"===(void 0===t?"undefined":(0,r.default)(t))&&(e=this._checkOptions(t),t=this._getHubSize());for(var i=[],n=0;n<this.body.nodeIndices.length;n++){var o=this.body.nodes[this.body.nodeIndices[n]];o.edges.length>=t&&i.push(o.id)}for(var s=0;s<i.length;s++)this.clusterByConnection(i[s],e,!0);this.body.emitter.emit("_dataChanged")}},{key:"cluster",value:function(){var n=this,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(void 0===o.joinCondition)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");o=this._checkOptions(o);var s={},r={};I.forEach(this.body.nodes,function(t,e){var i=x.cloneOptions(t);!0===o.joinCondition(i)&&(s[e]=t,I.forEach(t.edges,function(t){void 0===n.clusteredEdges[t.id]&&(r[t.id]=t)}))}),this._cluster(s,r,o,t)}},{key:"clusterByEdgeCount",value:function(u,c){var p=this,t=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];c=this._checkOptions(c);for(var f=[],m={},v=void 0,g=void 0,y=void 0,e=0;e<this.body.nodeIndices.length;e++){var b,_;!function(t){var i={},e={},n=p.body.nodeIndices[t],o=p.body.nodes[n];if(void 0===m[n]){g=[];for(var s=y=0;s<o.edges.length;s++)v=o.edges[s],void 0===p.clusteredEdges[v.id]&&(v.toId!==v.fromId&&y++,g.push(v));if(y===u){b=function(t){if(void 0===c.joinCondition||null===c.joinCondition)return!0;var e=x.cloneOptions(t);return c.joinCondition(e)};for(var r=!0,a=0;a<g.length;a++){v=g[a];var h=p._getConnectedId(v,n);if(!b(o)){r=!1;break}e[v.id]=v,i[n]=o,i[h]=p.body.nodes[h],m[n]=!0}if(0<(0,w.default)(i).length&&0<(0,w.default)(e).length&&!0===r)if(void 0!==(_=function(){for(var t=0;t<f.length;++t)for(var e in i)if(void 0!==f[t].nodes[e])return f[t]}())){for(var d in i)void 0===_.nodes[d]&&(_.nodes[d]=i[d]);for(var l in e)void 0===_.edges[l]&&(_.edges[l]=e[l])}else f.push({nodes:i,edges:e})}}}(e)}for(e=0;e<f.length;e++)this._cluster(f[e].nodes,f[e].edges,c,!1);!0===t&&this.body.emitter.emit("_dataChanged")}},{key:"clusterOutliers",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(1,t,e)}},{key:"clusterBridges",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(2,t,e)}},{key:"clusterByConnection",value:function(t,e){var i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No nodeId supplied to clusterByConnection!");if(void 0===this.body.nodes[t])throw new Error("The nodeId given to clusterByConnection does not exist!");var n=this.body.nodes[t];void 0===(e=this._checkOptions(e,n)).clusterNodeProperties.x&&(e.clusterNodeProperties.x=n.x),void 0===e.clusterNodeProperties.y&&(e.clusterNodeProperties.y=n.y),void 0===e.clusterNodeProperties.fixed&&(e.clusterNodeProperties.fixed={},e.clusterNodeProperties.fixed.x=n.options.fixed.x,e.clusterNodeProperties.fixed.y=n.options.fixed.y);var o={},s={},r=n.id,a=x.cloneOptions(n);o[r]=n;for(var h=0;h<n.edges.length;h++){var d=n.edges[h];if(void 0===this.clusteredEdges[d.id]){var l=this._getConnectedId(d,r);if(void 0===this.clusteredNodes[l])if(l!==r)if(void 0===e.joinCondition)s[d.id]=d,o[l]=this.body.nodes[l];else{var u=x.cloneOptions(this.body.nodes[l]);!0===e.joinCondition(a,u)&&(s[d.id]=d,o[l]=this.body.nodes[l])}else s[d.id]=d}}var c=(0,w.default)(o).map(function(t){return o[t].id});for(p in o)if(o.hasOwnProperty(p))for(var p=o[p],f=0;f<p.edges.length;f++){var m=p.edges[f];-1<c.indexOf(this._getConnectedId(m,p.id))&&(s[m.id]=m)}this._cluster(o,s,e,i)}},{key:"_createClusterEdges",value:function(t,e,i,n){for(var o=void 0,s=void 0,r=void 0,a=void 0,h=void 0,d=void 0,l=(0,w.default)(t),u=[],c=0;c<l.length;c++){r=t[s=l[c]];for(var p=0;p<r.edges.length;p++)o=r.edges[p],void 0===this.clusteredEdges[o.id]&&(o.toId==o.fromId?e[o.id]=o:d=o.toId==s?(a=i.id,h=o.fromId):(a=o.toId,h=i.id,a),void 0===t[d]&&u.push({edge:o,fromId:h,toId:a}))}for(var f=[],m=0;m<u.length;m++){var v=u[m],g=v.edge,y=function(t){for(var e=0;e<f.length;e++){var i=f[e],n=t.fromId===i.fromId&&t.toId===i.toId,o=t.fromId===i.toId&&t.toId===i.fromId;if(n||o)return i}return null}(v);null===y?(y=this._createClusteredEdge(v.fromId,v.toId,g,n),f.push(y)):y.clusteringEdgeReplacingIds.push(g.id),this.body.edges[g.id].edgeReplacedById=y.id,this._backupEdgeOptions(g),g.setOptions({physics:!1})}}},{key:"_checkOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return void 0===t.clusterEdgeProperties&&(t.clusterEdgeProperties={}),void 0===t.clusterNodeProperties&&(t.clusterNodeProperties={}),t}},{key:"_cluster",value:function(t,e,i){var n=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],o=[];for(var s in t)t.hasOwnProperty(s)&&void 0!==this.clusteredNodes[s]&&o.push(s);for(var r=0;r<o.length;++r)delete t[o[r]];if(0!=(0,w.default)(t).length&&(1!=(0,w.default)(t).length||1==i.clusterNodeProperties.allowSingleNodeCluster)){var a=I.deepExtend({},i.clusterNodeProperties);if(void 0!==i.processProperties){var h=[];for(var d in t)if(t.hasOwnProperty(d)){var l=x.cloneOptions(t[d]);h.push(l)}var u=[];for(var c in e)if(e.hasOwnProperty(c)&&"clusterEdge:"!==c.substr(0,12)){var p=x.cloneOptions(e[c],"edge");u.push(p)}if(!(a=i.processProperties(a,h,u)))throw new Error("The processProperties function does not return properties!")}void 0===a.id&&(a.id="cluster:"+I.randomUUID());var f=a.id;void 0===a.label&&(a.label="cluster");var m=void 0;void 0===a.x&&(m=this._getClusterPosition(t),a.x=m.x),void 0===a.y&&(void 0===m&&(m=this._getClusterPosition(t)),a.y=m.y),a.id=f;var v=this.body.functions.createNode(a,g);v.containedNodes=t,v.containedEdges=e,v.clusterEdgeProperties=i.clusterEdgeProperties,this.body.nodes[a.id]=v,this._clusterEdges(t,e,a,i.clusterEdgeProperties),!(a.id=void 0)===n&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(t){void 0===this.clusteredEdges[t.id]&&(this.clusteredEdges[t.id]={physics:t.options.physics})}},{key:"_restoreEdge",value:function(t){var e=this.clusteredEdges[t.id];void 0!==e&&(t.setOptions({physics:e.physics}),delete this.clusteredEdges[t.id])}},{key:"isCluster",value:function(t){return void 0!==this.body.nodes[t]?!0===this.body.nodes[t].isCluster:(console.log("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(t){for(var e=(0,w.default)(t),i=t[e[0]].x,n=t[e[0]].x,o=t[e[0]].y,s=t[e[0]].y,r=void 0,a=1;a<e.length;a++)i=(r=t[e[a]]).x<i?r.x:i,n=r.x>n?r.x:n,o=r.y<o?r.y:o,s=r.y>s?r.y:s;return{x:.5*(i+n),y:.5*(o+s)}}},{key:"openCluster",value:function(t,e){var i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");var n=this.body.nodes[t];if(void 0===n)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(!0!==n.isCluster||void 0===n.containedNodes||void 0===n.containedEdges)throw new Error("The node:"+t+" is not a valid cluster.");var o=this.findNode(t),s=o.indexOf(t)-1;if(0<=s){var r=o[s];return this.body.nodes[r]._openChildCluster(t),delete this.body.nodes[t],void(!0===i&&this.body.emitter.emit("_dataChanged"))}var a=n.containedNodes,h=n.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var d={},l={x:n.x,y:n.y};for(var u in a)if(a.hasOwnProperty(u)){var c=this.body.nodes[u];d[u]={x:c.x,y:c.y}}var p=e.releaseFunction(l,d);for(var f in a)if(a.hasOwnProperty(f)){var m=this.body.nodes[f];void 0!==p[f]&&(m.x=void 0===p[f].x?n.x:p[f].x,m.y=void 0===p[f].y?n.y:p[f].y)}}else I.forEach(a,function(t){!1===t.options.fixed.x&&(t.x=n.x),!1===t.options.fixed.y&&(t.y=n.y)});for(var v in a)if(a.hasOwnProperty(v)){var g=this.body.nodes[v];g.vx=n.vx,g.vy=n.vy,g.setOptions({physics:!0}),delete this.clusteredNodes[v]}for(var y=[],b=0;b<n.edges.length;b++)y.push(n.edges[b]);for(var _=0;_<y.length;_++){for(var w=y[_],x=this._getConnectedId(w,t),k=this.clusteredNodes[x],S=0;S<w.clusteringEdgeReplacingIds.length;S++){var D=w.clusteringEdgeReplacingIds[S],E=this.body.edges[D];if(void 0!==E)if(void 0!==k){var M=this.body.nodes[k.clusterId];delete h[(M.containedEdges[E.id]=E).id];var O=E.fromId,C=E.toId;E.toId==x?C=k.clusterId:O=k.clusterId,this._createClusteredEdge(O,C,E,M.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(E)}w.remove()}for(var T in h)h.hasOwnProperty(T)&&this._restoreEdge(h[T]);delete this.body.nodes[t],!0===i&&this.body.emitter.emit("_dataChanged")}},{key:"getNodesInCluster",value:function(t){var e=[];if(!0===this.isCluster(t)){var i=this.body.nodes[t].containedNodes;for(var n in i)i.hasOwnProperty(n)&&e.push(this.body.nodes[n].id)}return e}},{key:"findNode",value:function(t){for(var e=[],i=0,n=void 0;void 0!==this.clusteredNodes[t]&&i<100;){if(void 0===(n=this.body.nodes[t]))return[];e.push(n.id),t=this.clusteredNodes[t].clusterId,i++}return void 0===(n=this.body.nodes[t])?[]:(e.push(n.id),e.reverse(),e)}},{key:"updateClusteredNode",value:function(t,e){if(void 0===t)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(void 0===e)throw new Error("No newOptions supplied to updateClusteredNode.");if(void 0===this.body.nodes[t])throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[t].setOptions(e),this.body.emitter.emit("_dataChanged")}},{key:"updateEdge",value:function(t,e){if(void 0===t)throw new Error("No startEdgeId supplied to updateEdge.");if(void 0===e)throw new Error("No newOptions supplied to updateEdge.");if(void 0===this.body.edges[t])throw new Error("The startEdgeId supplied to updateEdge does not exist.");for(var i=this.getClusteredEdges(t),n=0;n<i.length;n++)this.body.edges[i[n]].setOptions(e);this.body.emitter.emit("_dataChanged")}},{key:"getClusteredEdges",value:function(t){for(var e=[],i=0;void 0!==t&&void 0!==this.body.edges[t]&&i<100;)e.push(this.body.edges[t].id),t=this.body.edges[t].edgeReplacedById,i++;return e.reverse(),e}},{key:"getBaseEdge",value:function(t){return this.getBaseEdges(t)[0]}},{key:"getBaseEdges",value:function(t){for(var e=[t],i=[],n=[],o=0;0<e.length&&o<100;){var s=e.pop();if(void 0!==s){var r=this.body.edges[s];if(void 0!==r){o++;var a=r.clusteringEdgeReplacingIds;if(void 0===a)n.push(s);else for(var h=0;h<a.length;++h){var d=a[h];-1===e.indexOf(a)&&-1===i.indexOf(a)&&e.push(d)}i.push(s)}}}return n}},{key:"_getConnectedId",value:function(t,e){return t.toId!=e?t.toId:(t.fromId,t.fromId)}},{key:"_getHubSize",value:function(){for(var t=0,e=0,i=0,n=0,o=0;o<this.body.nodeIndices.length;o++){var s=this.body.nodes[this.body.nodeIndices[o]];s.edges.length>n&&(n=s.edges.length),t+=s.edges.length,e+=Math.pow(s.edges.length,2),i+=1}t/=i;var r=(e/=i)-Math.pow(t,2),a=Math.sqrt(r),h=Math.floor(t+2*a);return n<h&&(h=n),h}},{key:"_createClusteredEdge",value:function(t,e,i,n,o){var s=x.cloneOptions(i,"edge");I.deepExtend(s,n),s.from=t,s.to=e,s.id="clusterEdge:"+I.randomUUID(),void 0!==o&&I.deepExtend(s,o);var r=this.body.functions.createEdge(s);return r.clusteringEdgeReplacingIds=[i.id],r.connect(),this.body.edges[r.id]=r}},{key:"_clusterEdges",value:function(t,e,i,n){if(e instanceof u){var o=e,s={};s[o.id]=o,e=s}if(t instanceof c){var r=t,a={};a[r.id]=r,t=a}if(null==i)throw new Error("_clusterEdges: parameter clusterNode required");for(var h in void 0===n&&(n=i.clusterEdgeProperties),this._createClusterEdges(t,e,i,n),e)if(e.hasOwnProperty(h)&&void 0!==this.body.edges[h]){var d=this.body.edges[h];this._backupEdgeOptions(d),d.setOptions({physics:!1})}for(var l in t)t.hasOwnProperty(l)&&(this.clusteredNodes[l]={clusterId:i.id,node:this.body.nodes[l]},this.body.nodes[l].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(t){if(void 0!==t){var e=this.clusteredNodes[t];if(void 0!==e){var i=e.clusterId;if(void 0!==i)return this.body.nodes[i]}}}},{key:"_filter",value:function(t,e){var i=[];return I.forEach(t,function(t){e(t)&&i.push(t)}),i}},{key:"_updateState",value:function(){function e(e){I.forEach(s.body.nodes,function(t){!0===t.isCluster&&e(t)})}var s=this,t=void 0,i=[],r=[];for(t in this.clusteredNodes)this.clusteredNodes.hasOwnProperty(t)&&void 0===this.body.nodes[t]&&i.push(t);e(function(t){for(var e=0;e<i.length;e++)delete t.containedNodes[i[e]]});for(var n=0;n<i.length;n++)delete this.clusteredNodes[i[n]];I.forEach(this.clusteredEdges,function(t){var e=s.body.edges[t];void 0!==e&&e.endPointsValid()||r.push(t)}),e(function(t){I.forEach(t.containedEdges,function(t,e){t.endPointsValid()||-1!==r.indexOf(e)||r.push(e)})}),I.forEach(this.body.edges,function(t,e){var i=!0,n=t.clusteringEdgeReplacingIds;if(void 0!==n){var o=0;I.forEach(n,function(t){var e=s.body.edges[t];void 0!==e&&e.endPointsValid()&&(o+=1)}),i=0<o}t.endPointsValid()&&i||r.push(e)}),e(function(n){I.forEach(r,function(i){delete n.containedEdges[i],I.forEach(n.edges,function(t,e){t.id!==i?t.clusteringEdgeReplacingIds=s._filter(t.clusteringEdgeReplacingIds,function(t){return-1===r.indexOf(t)}):n.edges[e]=null}),n.edges=s._filter(n.edges,function(t){return null!==t})})}),I.forEach(r,function(t){delete s.clusteredEdges[t]}),I.forEach(r,function(t){delete s.body.edges[t]});var o=(0,w.default)(this.body.edges);I.forEach(o,function(t){var e=s.body.edges[t],i=s._isClusteredNode(e.fromId)||s._isClusteredNode(e.toId);if(i!==s._isClusteredEdge(e.id)){if(!i)throw new Error("remove edge from clustering not implemented!");var n=s._getClusterNodeForNode(e.fromId);void 0!==n&&s._clusterEdges(s.body.nodes[e.fromId],e,n);var o=s._getClusterNodeForNode(e.toId);void 0!==o&&s._clusterEdges(s.body.nodes[e.toId],e,o)}});for(var a=!1,h=!0;h;)!function(){var n=[];e(function(t){var e=(0,w.default)(t.containedNodes).length,i=!0===t.options.allowSingleNodeCluster;(i&&e<1||!i&&e<2)&&n.push(t.id)});for(var t=0;t<n.length;++t)s.openCluster(n[t],{},!1);h=0<n.length,a=a||h}();a&&this._updateState()}},{key:"_isClusteredNode",value:function(t){return void 0!==this.clusteredNodes[t]}},{key:"_isClusteredEdge",value:function(t){return void 0!==this.clusteredEdges[t]}}]),h);function h(t){var e=this;(0,o.default)(this,h),this.body=t,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},I.extend(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){e.clusteredNodes={},e.clusteredEdges={}})}e.default=a},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,a=n(i(3)),h=n(i(0)),s=n(i(1)),d=n(i(4)),r=n(i(5)),l=i(2),u=i(47).default,c=(o=u,(0,r.default)(p,o),(0,s.default)(p,[{key:"_openChildCluster",value:function(t){var n=this,e=this.body.nodes[t];if(void 0===this.containedNodes[t])throw new Error("node with id: "+t+" not in current cluster");if(!e.isCluster)throw new Error("node with id: "+t+" is not a cluster");delete this.containedNodes[t],l.forEach(e.edges,function(t){delete n.containedEdges[t.id]}),l.forEach(e.containedNodes,function(t,e){n.containedNodes[e]=t}),e.containedNodes={},l.forEach(e.containedEdges,function(t,e){n.containedEdges[e]=t}),e.containedEdges={},l.forEach(e.edges,function(i){l.forEach(n.edges,function(e){var t=e.clusteringEdgeReplacingIds.indexOf(i.id);-1!==t&&(l.forEach(i.clusteringEdgeReplacingIds,function(t){e.clusteringEdgeReplacingIds.push(t),n.body.edges[t].edgeReplacedById=e.id}),e.clusteringEdgeReplacingIds.splice(t,1))})}),e.edges=[]}}]),p);function p(t,e,i,n,o,s){(0,h.default)(this,p);var r=(0,d.default)(this,(p.__proto__||(0,a.default)(p)).call(this,t,e,i,n,o,s));return r.isCluster=!0,r.containedNodes={},r.containedEdges={},r}e.default=c},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=n(i(1)),r=i(2),a=((0,s.default)(h,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("dragStart",function(){t.dragging=!0}),this.body.emitter.on("dragEnd",function(){t.dragging=!1}),this.body.emitter.on("_resizeNodes",function(){t._resizeNodes()}),this.body.emitter.on("_redraw",function(){!1===t.renderingActive&&t._redraw()}),this.body.emitter.on("_blockRedraw",function(){t.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){t.allowRedraw=!0,t.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",this._requestRedraw.bind(this)),this.body.emitter.on("_startRendering",function(){t.renderRequests+=1,t.renderingActive=!0,t._startRendering()}),this.body.emitter.on("_stopRendering",function(){t.renderRequests-=1,t.renderingActive=0<t.renderRequests,t.renderTimer=void 0}),this.body.emitter.on("destroy",function(){t.renderRequests=0,t.allowRedraw=!1,!(t.renderingActive=!1)===t.requiresTimeout?clearTimeout(t.renderTimer):window.cancelAnimationFrame(t.renderTimer),t.body.emitter.off()})}},{key:"setOptions",value:function(t){void 0!==t&&r.selectiveDeepExtend(["hideEdgesOnDrag","hideNodesOnDrag"],this.options,t)}},{key:"_requestNextFrame",value:function(t,e){if("undefined"!=typeof window){var i=void 0,n=window;return!0===this.requiresTimeout?i=n.setTimeout(t,e):n.requestAnimationFrame&&(i=n.requestAnimationFrame(t)),i}}},{key:"_startRendering",value:function(){!0===this.renderingActive&&void 0===this.renderTimer&&(this.renderTimer=this._requestNextFrame(this._renderStep.bind(this),this.simulationInterval))}},{key:"_renderStep",value:function(){!0===this.renderingActive&&(!(this.renderTimer=void 0)===this.requiresTimeout&&this._startRendering(),this._redraw(),!1===this.requiresTimeout&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;!0!==this.redrawRequested&&!1===this.renderingActive&&!0===this.allowRedraw&&(this.redrawRequested=!0,this._requestNextFrame(function(){t._redraw(!1)},0))}},{key:"_redraw",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(!0===this.allowRedraw){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1,0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),this.canvas.setTransform();var e=this.canvas.getContext(),i=this.canvas.frame.canvas.clientWidth,n=this.canvas.frame.canvas.clientHeight;if(e.clearRect(0,0,i,n),0===this.canvas.frame.clientWidth)return;e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale),e.beginPath(),this.body.emitter.emit("beforeDrawing",e),e.closePath(),!1===t&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&this._drawEdges(e),(!1===this.dragging||!0===this.dragging&&!1===this.options.hideNodesOnDrag)&&this._drawNodes(e,t),e.beginPath(),this.body.emitter.emit("afterDrawing",e),e.closePath(),e.restore(),!0===t&&e.clearRect(0,0,i,n)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var t=this.canvas.getContext();t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e=this.body.nodes,i=void 0;for(var n in e)e.hasOwnProperty(n)&&((i=e[n]).resize(t),i.updateBoundingBox(t,i.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=this.body.nodes,n=this.body.nodeIndices,o=void 0,s=[],r=this.canvas.DOMtoCanvas({x:-20,y:-20}),a=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+20,y:this.canvas.frame.canvas.clientHeight+20}),h={top:r.y,left:r.x,bottom:a.y,right:a.x},d=0;d<n.length;d++)(o=i[n[d]]).isSelected()?s.push(n[d]):!0===e?o.draw(t):!0===o.isBoundingBoxOverlappingWith(h)?o.draw(t):o.updateBoundingBox(t,o.selected);for(var l=0;l<s.length;l++)(o=i[s[l]]).draw(t)}},{key:"_drawEdges",value:function(t){for(var e=this.body.edges,i=this.body.edgeIndices,n=void 0,o=0;o<i.length;o++)!0===(n=e[i[o]]).connected&&n.draw(t)}},{key:"_determineBrowserMethod",value:function(){if("undefined"!=typeof window){var t=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,-1!=t.indexOf("msie 9.0")?this.requiresTimeout=!0:-1!=t.indexOf("safari")&&t.indexOf("chrome")<=-1&&(this.requiresTimeout=!0)}else this.requiresTimeout=!0}}]),h);function h(t,e){(0,o.default)(this,h),function(){var t;void 0!==window&&(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),window.requestAnimationFrame=void 0===t?function(t){t()}:t}(),this.body=t,this.canvas=e,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideNodesOnDrag:!1},r.extend(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}e.default=a},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=n(i(1)),r=i(10),a=i(37),h=i(2),d=((0,s.default)(l,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.once("resize",function(t){0!==t.width&&(e.body.view.translation.x=.5*t.width),0!==t.height&&(e.body.view.translation.y=.5*t.height)}),this.body.emitter.on("setSize",this.setSize.bind(this)),this.body.emitter.on("destroy",function(){e.hammerFrame.destroy(),e.hammer.destroy(),e._cleanUp()})}},{key:"setOptions",value:function(t){var e=this;void 0!==t&&h.selectiveDeepExtend(["width","height","autoResize"],this.options,t),!0===this.options.autoResize&&(this._cleanUp(),this.resizeTimer=setInterval(function(){!0===e.setSize()&&e.body.emitter.emit("_requestRedraw")},1e3),this.resizeFunction=this._onResize.bind(this),h.addEventListener(window,"resize",this.resizeFunction))}},{key:"_cleanUp",value:function(){void 0!==this.resizeTimer&&clearInterval(this.resizeTimer),h.removeEventListener(window,"resize",this.resizeFunction),this.resizeFunction=void 0}},{key:"_onResize",value:function(){this.setSize(),this.body.emitter.emit("_redraw")}},{key:"_getCameraState",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.pixelRatio;!0===this.initialized&&(this.cameraState.previousWidth=this.frame.canvas.width/t,this.cameraState.previousHeight=this.frame.canvas.height/t,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/t,y:.5*this.frame.canvas.height/t}))}},{key:"_setCameraState",value:function(){if(void 0!==this.cameraState.scale&&0!==this.frame.canvas.clientWidth&&0!==this.frame.canvas.clientHeight&&0!==this.pixelRatio&&0<this.cameraState.previousWidth){var t=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,e=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;1!=t&&1!=e?i=.5*this.cameraState.scale*(t+e):1!=t?i=this.cameraState.scale*t:1!=e&&(i=this.cameraState.scale*e),this.body.view.scale=i;var n=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),o=n.x-this.cameraState.position.x,s=n.y-this.cameraState.position.y;this.body.view.translation.x+=o*this.body.view.scale,this.body.view.translation.y+=s*this.body.view.scale}}},{key:"_prepareValue",value:function(t){if("number"==typeof t)return t+"px";if("string"==typeof t){if(-1!==t.indexOf("%")||-1!==t.indexOf("px"))return t;if(-1===t.indexOf("%"))return t+"px"}throw new Error("Could not use the value supplied for width or height:"+t)}},{key:"_create",value:function(){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=900,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{var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t)}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()}},{key:"_bindHammer",value:function(){var e=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new r(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:r.DIRECTION_ALL}),a.onTouch(this.hammer,function(t){e.body.eventListeners.onTouch(t)}),this.hammer.on("tap",function(t){e.body.eventListeners.onTap(t)}),this.hammer.on("doubletap",function(t){e.body.eventListeners.onDoubleTap(t)}),this.hammer.on("press",function(t){e.body.eventListeners.onHold(t)}),this.hammer.on("panstart",function(t){e.body.eventListeners.onDragStart(t)}),this.hammer.on("panmove",function(t){e.body.eventListeners.onDrag(t)}),this.hammer.on("panend",function(t){e.body.eventListeners.onDragEnd(t)}),this.hammer.on("pinch",function(t){e.body.eventListeners.onPinch(t)}),this.frame.canvas.addEventListener("mousewheel",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("mousemove",function(t){e.body.eventListeners.onMouseMove(t)}),this.frame.canvas.addEventListener("contextmenu",function(t){e.body.eventListeners.onContext(t)}),this.hammerFrame=new r(this.frame),a.onRelease(this.hammerFrame,function(t){e.body.eventListeners.onRelease(t)})}},{key:"setSize",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.options.width,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.options.height;t=this._prepareValue(t),e=this._prepareValue(e);var i=!1,n=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e)this._getCameraState(s),this.frame.style.width=t,this.frame.style.height=e,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=t,this.options.height=e,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{var r=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),a=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);this.frame.canvas.width===r&&this.frame.canvas.height===a||this._getCameraState(s),this.frame.canvas.width!==r&&(this.frame.canvas.width=r,i=!0),this.frame.canvas.height!==a&&(this.frame.canvas.height=a,i=!0)}return!0===i&&(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(n/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");var e=1;return"undefined"!=typeof window&&(e=window.devicePixelRatio||1),e/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(t){return{x:this._XconvertCanvasToDOM(t.x),y:this._YconvertCanvasToDOM(t.y)}}},{key:"DOMtoCanvas",value:function(t){return{x:this._XconvertDOMtoCanvas(t.x),y:this._YconvertDOMtoCanvas(t.y)}}}]),l);function l(t){(0,o.default)(this,l),this.body=t,this.pixelRatio=1,this.resizeTimer=void 0,this.resizeFunction=this._onResize.bind(this),this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},h.extend(this.options,this.defaultOptions),this.bindEventListeners()}e.default=d},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=n(i(1)),r=i(2),u=i(76).default,a=((0,s.default)(h,[{key:"setOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.options=t}},{key:"fit",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{nodes:[]},e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=void 0,n=void 0;if(void 0!==t.nodes&&0!==t.nodes.length||(t.nodes=this.body.nodeIndices),!0===e){var o=0;for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&!0===this.body.nodes[s].predefinedPosition&&(o+=1);if(o>.5*this.body.nodeIndices.length)return void this.fit(t,!1);i=u.getRange(this.body.nodes,t.nodes),n=12.662/(this.body.nodeIndices.length+7.4147)+.0964822,n*=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600)}else{this.body.emitter.emit("_resizeNodes"),i=u.getRange(this.body.nodes,t.nodes);var r=1.1*Math.abs(i.maxX-i.minX),a=1.1*Math.abs(i.maxY-i.minY),h=this.canvas.frame.canvas.clientWidth/r,d=this.canvas.frame.canvas.clientHeight/a;n=h<=d?h:d}1<n?n=1:0===n&&(n=1);var l={position:u.findCenter(i),scale:n,animation:t.animation};this.moveTo(l)}},{key:"focus",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==this.body.nodes[t]){var i={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=i,e.lockedOnNode=t,this.moveTo(e)}else console.log("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){void 0!==t&&(void 0===t.offset&&(t.offset={x:0,y:0}),void 0===t.offset.x&&(t.offset.x=0),void 0===t.offset.y&&(t.offset.y=0),void 0===t.scale&&(t.scale=this.body.view.scale),void 0===t.position&&(t.position=this.getViewPosition()),void 0===t.animation&&(t.animation={duration:0}),!1===t.animation&&(t.animation={duration:0}),!0===t.animation&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),this.animateView(t))}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),!0===t.locked&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i=e.x-t.position.x,n=e.y-t.position.y;this.targetTranslation={x:this.sourceTranslation.x+i*this.targetScale+t.offset.x,y:this.sourceTranslation.y+n*this.targetScale+t.offset.y},0===t.animation.duration?null!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t=this.body.nodes[this.lockedOnNodeId].x,e=this.body.nodes[this.lockedOnNodeId].y,i=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n=i.x-t,o=i.y-e,s=this.body.view.translation,r={x:s.x+n*this.body.view.scale+this.lockedOnNodeOffset.x,y:s.y+o*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=r}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=!0===t?1:this.easingTime;var e=r.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},1<=this.easingTime&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,null!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),h);function h(t,e){var i=this;(0,o.default)(this,h),this.body=t,this.canvas=e,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",this.fit.bind(this)),this.body.emitter.on("animationFinished",function(){i.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",this.releaseNode.bind(this))}e.default=a},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=n(i(1)),r=i(2),a=i(233).default,g=i(104).default,h=((0,s.default)(d,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("destroy",function(){clearTimeout(t.popupTimer),delete t.body.functions.getPointer})}},{key:"setOptions",value:function(t){void 0!==t&&(r.selectiveNotDeepExtend(["hideEdgesOnDrag","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,t),r.mergeOptions(this.options,t,"keyboard"),t.tooltip&&(r.extend(this.options.tooltip,t.tooltip),t.tooltip.color&&(this.options.tooltip.color=r.parseColor(t.tooltip.color)))),this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(t){return{x:t.x-r.getAbsoluteLeft(this.canvas.frame.canvas),y:t.y-r.getAbsoluteTop(this.canvas.frame.canvas)}}},{key:"onTouch",value:function(t){50<(new Date).valueOf()-this.touchTime&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e),this.selectionHandler._generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if(10<(new Date).valueOf()-this.touchTime){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler._generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=this.selectionHandler.getSelection(),o=!1;o=!0===i?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t);var s=this.selectionHandler.getSelection(),r=this._determineDifference(n,s),a=this._determineDifference(s,n);0<r.edges.length&&(this.selectionHandler._generateClickEvent("deselectEdge",e,t,n),o=!0),0<r.nodes.length&&(this.selectionHandler._generateClickEvent("deselectNode",e,t,n),o=!0),0<a.nodes.length&&(this.selectionHandler._generateClickEvent("selectNode",e,t),o=!0),0<a.edges.length&&(this.selectionHandler._generateClickEvent("selectEdge",e,t),o=!0),!0===o&&this.selectionHandler._generateClickEvent("select",e,t)}},{key:"_determineDifference",value:function(t,e){function i(t,e){for(var i=[],n=0;n<t.length;n++){var o=t[n];-1===e.indexOf(o)&&i.push(o)}return i}return{nodes:i(t.nodes,e.nodes),edges:i(t.edges,e.edges)}}},{key:"onDragStart",value:function(t){void 0===this.drag.pointer&&this.onTouch(t);var e=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=r.extend({},this.body.view.translation),(this.drag.nodeId=void 0)!==e&&!0===this.options.dragNodes){this.drag.nodeId=e.id,!1===e.isSelected()&&(this.selectionHandler.unselectAll(),this.selectionHandler.selectObject(e)),this.selectionHandler._generateClickEvent("dragStart",t,this.drag.pointer);var i=this.selectionHandler.selectionObj.nodes;for(var n in i)if(i.hasOwnProperty(n)){var o=i[n],s={id:o.id,node:o,x:o.x,y:o.y,xFixed:o.options.fixed.x,yFixed:o.options.fixed.y};o.options.fixed.x=!0,o.options.fixed.y=!0,this.drag.selection.push(s)}}else this.selectionHandler._generateClickEvent("dragStart",t,this.drag.pointer,void 0,!0)}},{key:"onDrag",value:function(t){var i=this;if(!0!==this.drag.pinched){this.body.emitter.emit("unlockNode");var e=this.getPointer(t.center),n=this.drag.selection;if(n&&n.length&&!0===this.options.dragNodes){this.selectionHandler._generateClickEvent("dragging",t,e);var o=e.x-this.drag.pointer.x,s=e.y-this.drag.pointer.y;n.forEach(function(t){var e=t.node;!1===t.xFixed&&(e.x=i.canvas._XconvertDOMtoCanvas(i.canvas._XconvertCanvasToDOM(t.x)+o)),!1===t.yFixed&&(e.y=i.canvas._YconvertDOMtoCanvas(i.canvas._YconvertCanvasToDOM(t.y)+s))}),this.body.emitter.emit("startSimulation")}else if(!0===this.options.dragView){if(this.selectionHandler._generateClickEvent("dragging",t,e,void 0,!0),void 0===this.drag.pointer)return void this.onDragStart(t);var r=e.x-this.drag.pointer.x,a=e.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+r,y:this.drag.translation.y+a},this.body.emitter.emit("_requestRedraw")}}}},{key:"onDragEnd",value:function(t){this.drag.dragging=!1;var e=this.drag.selection;e&&e.length?(e.forEach(function(t){t.node.options.fixed.x=t.xFixed,t.node.options.fixed.y=t.yFixed}),this.selectionHandler._generateClickEvent("dragEnd",t,this.getPointer(t.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler._generateClickEvent("dragEnd",t,this.getPointer(t.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}},{key:"onPinch",value:function(t){var e=this.getPointer(t.center);this.drag.pinched=!0,void 0===this.pinch.scale&&(this.pinch.scale=1);var i=this.pinch.scale*t.scale;this.zoom(i,e)}},{key:"zoom",value:function(t,e){if(!0===this.options.zoomView){var i=this.body.view.scale;t<1e-5&&(t=1e-5),10<t&&(t=10);var n=void 0;void 0!==this.drag&&!0===this.drag.dragging&&(n=this.canvas.DOMtoCanvas(this.drag.pointer));var o=this.body.view.translation,s=t/i,r=(1-s)*e.x+o.x*s,a=(1-s)*e.y+o.y*s;if(this.body.view.scale=t,this.body.view.translation={x:r,y:a},null!=n){var h=this.canvas.canvasToDOM(n);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),i<t?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:e}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:e})}}},{key:"onMouseWheel",value:function(t){if(!0===this.options.zoomView){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),0!==e){var i=this.body.view.scale,n=e/10;e<0&&(n/=1-n),i*=1+n;var o=this.getPointer({x:t.clientX,y:t.clientY});this.zoom(i,o)}t.preventDefault()}}},{key:"onMouseMove",value:function(t){var e=this,i=this.getPointer({x:t.clientX,y:t.clientY}),n=!1;void 0!==this.popup&&(!1===this.popup.hidden&&this._checkHidePopup(i),!1===this.popup.hidden&&(n=!0,this.popup.setPosition(i.x+3,i.y-5),this.popup.show())),!1===this.options.keyboard.bindToWindow&&!0===this.options.keyboard.enabled&&this.canvas.frame.focus(),!1===n&&(void 0!==this.popupTimer&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=setTimeout(function(){return e._checkShowPopup(i)},this.options.tooltipDelay))),!0===this.options.hover&&this.selectionHandler.hoverObject(t,i)}},{key:"_checkShowPopup",value:function(t){var e=this.canvas._XconvertDOMtoCanvas(t.x),i=this.canvas._YconvertDOMtoCanvas(t.y),n={left:e,top:i,right:e,bottom:i},o=void 0===this.popupObj?void 0:this.popupObj.id,s=!1,r="node";if(void 0===this.popupObj){for(var a=this.body.nodeIndices,h=this.body.nodes,d=void 0,l=[],u=0;u<a.length;u++)!0===(d=h[a[u]]).isOverlappingWith(n)&&void 0!==d.getTitle()&&l.push(a[u]);0<l.length&&(this.popupObj=h[l[l.length-1]],s=!0)}if(void 0===this.popupObj&&!1===s){for(var c=this.body.edgeIndices,p=this.body.edges,f=void 0,m=[],v=0;v<c.length;v++)!0===(f=p[c[v]]).isOverlappingWith(n)&&!0===f.connected&&void 0!==f.getTitle()&&m.push(c[v]);0<m.length&&(this.popupObj=p[m[m.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==o&&(void 0===this.popup&&(this.popup=new g(this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&!0===(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e))){var n=this.selectionHandler.getNodeAt(t);i=void 0!==n&&n.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));!1===i&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),d);function d(t,e,i){(0,o.default)(this,d),this.body=t,this.canvas=e,this.selectionHandler=i,this.navigationHandler=new a(t,e),this.body.eventListeners.onTap=this.onTap.bind(this),this.body.eventListeners.onTouch=this.onTouch.bind(this),this.body.eventListeners.onDoubleTap=this.onDoubleTap.bind(this),this.body.eventListeners.onHold=this.onHold.bind(this),this.body.eventListeners.onDragStart=this.onDragStart.bind(this),this.body.eventListeners.onDrag=this.onDrag.bind(this),this.body.eventListeners.onDragEnd=this.onDragEnd.bind(this),this.body.eventListeners.onMouseWheel=this.onMouseWheel.bind(this),this.body.eventListeners.onPinch=this.onPinch.bind(this),this.body.eventListeners.onMouseMove=this.onMouseMove.bind(this),this.body.eventListeners.onRelease=this.onRelease.bind(this),this.body.eventListeners.onContext=this.onContext.bind(this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=this.getPointer.bind(this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0},r.extend(this.options,this.defaultOptions),this.bindEventListeners()}e.default=h},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=n(i(1)),r=i(10),a=i(37),h=i(35),d=((0,s.default)(l,[{key:"setOptions",value:function(t){void 0!==t&&(this.options=t,this.create())}},{key:"create",value:function(){!0===this.options.navigationButtons?!1===this.iconsCreated&&this.loadNavigationElements():!0===this.iconsCreated&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(0!=this.navigationHammers.length){for(var t=0;t<this.navigationHammers.length;t++)this.navigationHammers[t].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}},{key:"loadNavigationElements",value:function(){var t=this;this.cleanNavigation(),this.navigationDOM={};var e=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],i=["_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(var n=0;n<e.length;n++){this.navigationDOM[e[n]]=document.createElement("div"),this.navigationDOM[e[n]].className="vis-button vis-"+e[n],this.navigationDOM.wrapper.appendChild(this.navigationDOM[e[n]]);var o=new r(this.navigationDOM[e[n]]);"_fit"===i[n]?a.onTouch(o,this._fit.bind(this)):a.onTouch(o,this.bindToRedraw.bind(this,i[n])),this.navigationHammers.push(o)}var s=new r(this.canvas.frame);a.onRelease(s,function(){t._stopMovement()}),this.navigationHammers.push(s),this.iconsCreated=!0}},{key:"bindToRedraw",value:function(t){void 0===this.boundFunctions[t]&&(this.boundFunctions[t]=this[t].bind(this),this.body.emitter.on("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_startRendering"))}},{key:"unbindFromRedraw",value:function(t){void 0!==this.boundFunctions[t]&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[t])}},{key:"_fit",value:function(){700<(new Date).valueOf()-this.touchTime&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)this.boundFunctions.hasOwnProperty(t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var t=this.body.view.scale,e=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=e/t,o=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,s=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=e,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var t=this.body.view.scale,e=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=e/t,o=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,s=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=e,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var t=this;void 0!==this.keycharm&&this.keycharm.destroy(),!0===this.options.keyboard.enabled&&(!0===this.options.keyboard.bindToWindow?this.keycharm=h({container:window,preventDefault:!0}):this.keycharm=h({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),!0===this.activated&&(this.keycharm.bind("up",function(){t.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){t.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){t.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){t.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){t.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){t.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){t.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){t.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){t.unbindFromRedraw("_zoomOut")},"keyup")))}}]),l);function l(t,e){var i=this;(0,o.default)(this,l),this.body=t,this.canvas=e,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){i.activated=!0,i.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){i.activated=!1,i.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){void 0!==i.keycharm&&i.keycharm.destroy()}),this.options={}}e.default=d},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=n(i(1)),r=i(47).default,a=i(74).default,h=i(2),d=((0,s.default)(l,[{key:"setOptions",value:function(t){void 0!==t&&h.selectiveDeepExtend(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,t)}},{key:"selectOnPoint",value:function(t){var e=!1;if(!0===this.options.selectable){var i=this.getNodeAt(t)||this.getEdgeAt(t);this.unselectAll(),void 0!==i&&(e=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return e}},{key:"selectAdditionalOnPoint",value:function(t){var e=!1;if(!0===this.options.selectable){var i=this.getNodeAt(t)||this.getEdgeAt(t);void 0!==i&&((e=!0)===i.isSelected()?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return e}},{key:"_initBaseEvent",value:function(t,e){var i={};return i.pointer={DOM:{x:e.x,y:e.y},canvas:this.canvas.DOMtoCanvas(e)},i.event=t,i}},{key:"_generateClickEvent",value:function(t,e,i,n){var o=4<arguments.length&&void 0!==arguments[4]&&arguments[4],s=this._initBaseEvent(e,i);if(!0===o)s.nodes=[],s.edges=[];else{var r=this.getSelection();s.nodes=r.nodes,s.edges=r.edges}void 0!==n&&(s.previousSelection=n),"click"==t&&(s.items=this.getClickedItems(i)),this.body.emitter.emit(t,s)}},{key:"selectObject",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.options.selectConnectedEdges;return void 0!==t&&(t instanceof r&&!0===e&&this._selectConnectedEdges(t),t.select(),this._addToSelection(t),!0)}},{key:"deselectObject",value:function(t){!0===t.isSelected()&&(t.selected=!1,this._removeFromSelection(t))}},{key:"_getAllNodesOverlappingWith",value:function(t){for(var e=[],i=this.body.nodes,n=0;n<this.body.nodeIndices.length;n++){var o=this.body.nodeIndices[n];i[o].isOverlappingWith(t)&&e.push(o)}return e}},{key:"_pointerToPositionObject",value:function(t){var e=this.canvas.DOMtoCanvas(t);return{left:e.x-1,top:e.y+1,right:e.x+1,bottom:e.y-1}}},{key:"getNodeAt",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=this._pointerToPositionObject(t),n=this._getAllNodesOverlappingWith(i);return 0<n.length?!0===e?this.body.nodes[n[n.length-1]]:n[n.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var i=this.body.edges,n=0;n<this.body.edgeIndices.length;n++){var o=this.body.edgeIndices[n];i[o].isOverlappingWith(t)&&e.push(o)}}},{key:"_getAllEdgesOverlappingWith",value:function(t){var e=[];return this._getEdgesOverlappingWith(t,e),e}},{key:"getEdgeAt",value:function(t){for(var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=this.canvas.DOMtoCanvas(t),n=10,o=null,s=this.body.edges,r=0;r<this.body.edgeIndices.length;r++){var a=this.body.edgeIndices[r],h=s[a];if(h.connected){var d=h.from.x,l=h.from.y,u=h.to.x,c=h.to.y,p=h.edgeType.getDistanceToEdge(d,l,u,c,i.x,i.y);p<n&&(o=a,n=p)}}return null!==o?!0===e?this.body.edges[o]:o:void 0}},{key:"_addToSelection",value:function(t){t instanceof r?this.selectionObj.nodes[t.id]=t:this.selectionObj.edges[t.id]=t}},{key:"_addToHover",value:function(t){t instanceof r?this.hoverObj.nodes[t.id]=t:this.hoverObj.edges[t.id]=t}},{key:"_removeFromSelection",value:function(t){t instanceof r?(delete this.selectionObj.nodes[t.id],this._unselectConnectedEdges(t)):delete this.selectionObj.edges[t.id]}},{key:"unselectAll",value:function(){for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&this.selectionObj.nodes[t].unselect();for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&this.selectionObj.edges[e].unselect();this.selectionObj={nodes:{},edges:{}}}},{key:"_getSelectedNodeCount",value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);return t}},{key:"_getSelectedNode",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return this.selectionObj.nodes[t]}},{key:"_getSelectedEdge",value:function(){for(var t in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(t))return this.selectionObj.edges[t]}},{key:"_getSelectedEdgeCount",value:function(){var t=0;for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(t+=1);return t}},{key:"_getSelectedObjectCount",value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);for(var i in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(i)&&(t+=1);return t}},{key:"_selectionIsEmpty",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return!1;for(var e in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(e))return!1;return!0}},{key:"_clusterInSelection",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t)&&1<this.selectionObj.nodes[t].clusterSize)return!0;return!1}},{key:"_selectConnectedEdges",value:function(t){for(var e=0;e<t.edges.length;e++){var i=t.edges[e];i.select(),this._addToSelection(i)}}},{key:"_hoverConnectedEdges",value:function(t){for(var e=0;e<t.edges.length;e++){var i=t.edges[e];i.hover=!0,this._addToHover(i)}}},{key:"_unselectConnectedEdges",value:function(t){for(var e=0;e<t.edges.length;e++){var i=t.edges[e];i.unselect(),this._removeFromSelection(i)}}},{key:"emitBlurEvent",value:function(t,e,i){var n=this._initBaseEvent(t,e);!0===i.hover&&(i.hover=!1,i instanceof r?(n.node=i.id,this.body.emitter.emit("blurNode",n)):(n.edge=i.id,this.body.emitter.emit("blurEdge",n)))}},{key:"emitHoverEvent",value:function(t,e,i){var n=this._initBaseEvent(t,e),o=!1;return!1===i.hover&&(i.hover=!0,this._addToHover(i),o=!0,i instanceof r?(n.node=i.id,this.body.emitter.emit("hoverNode",n)):(n.edge=i.id,this.body.emitter.emit("hoverEdge",n))),o}},{key:"hoverObject",value:function(t,e){var i=this.getNodeAt(e);void 0===i&&(i=this.getEdgeAt(e));var n=!1;for(var o in this.hoverObj.nodes)this.hoverObj.nodes.hasOwnProperty(o)&&(void 0===i||i instanceof r&&i.id!=o||i instanceof a)&&(this.emitBlurEvent(t,e,this.hoverObj.nodes[o]),delete this.hoverObj.nodes[o],n=!0);for(var s in this.hoverObj.edges)this.hoverObj.edges.hasOwnProperty(s)&&(!0===n?(this.hoverObj.edges[s].hover=!1,delete this.hoverObj.edges[s]):(void 0===i||i instanceof a&&i.id!=s||i instanceof r&&!i.hover)&&(this.emitBlurEvent(t,e,this.hoverObj.edges[s]),delete this.hoverObj.edges[s],n=!0));void 0!==i&&(n=n||this.emitHoverEvent(t,e,i),i instanceof r&&!0===this.options.hoverConnectedEdges&&this._hoverConnectedEdges(i)),!0===n&&this.body.emitter.emit("_requestRedraw")}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodes(),edges:this.getSelectedEdges()}}},{key:"getSelectedNodes",value:function(){var t=[];if(!0===this.options.selectable)for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&t.push(this.selectionObj.nodes[e].id);return t}},{key:"getSelectedEdges",value:function(){var t=[];if(!0===this.options.selectable)for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&t.push(this.selectionObj.edges[e].id);return t}},{key:"setSelection",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=void 0,n=void 0;if(!t||!t.nodes&&!t.edges)throw"Selection must be an object with nodes and/or edges properties";if(!e.unselectAll&&void 0!==e.unselectAll||this.unselectAll(),t.nodes)for(i=0;i<t.nodes.length;i++){n=t.nodes[i];var o=this.body.nodes[n];if(!o)throw new RangeError('Node with id "'+n+'" not found');this.selectObject(o,e.highlightEdges)}if(t.edges)for(i=0;i<t.edges.length;i++){n=t.edges[i];var s=this.body.edges[n];if(!s)throw new RangeError('Edge with id "'+n+'" not found');this.selectObject(s)}this.body.emitter.emit("_requestRedraw")}},{key:"selectNodes",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({nodes:t},{highlightEdges:e})}},{key:"selectEdges",value:function(t){if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({edges:t})}},{key:"updateSelection",value:function(){for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&(this.body.nodes.hasOwnProperty(t)||delete this.selectionObj.nodes[t]);for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(this.body.edges.hasOwnProperty(e)||delete this.selectionObj.edges[e])}},{key:"getClickedItems",value:function(t){for(var e=this.canvas.DOMtoCanvas(t),i=[],n=this.body.nodeIndices,o=this.body.nodes,s=n.length-1;0<=s;s--){var r=o[n[s]].getItemsOnPoint(e);i.push.apply(i,r)}for(var a=this.body.edgeIndices,h=this.body.edges,d=a.length-1;0<=d;d--){var l=h[a[d]].getItemsOnPoint(e);i.push.apply(i,l)}return i}}]),l);function l(t,e){var i=this;(0,o.default)(this,l),this.body=t,this.canvas=e,this.selectionObj={nodes:[],edges:[]},this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},h.extend(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){i.updateSelection()})}e.default=d},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var O=n(i(30)),o=n(i(6)),h=n(i(8)),s=n(i(0)),r=n(i(1)),a=i(2),d=i(76).default,l=i(236),u=l.HorizontalStrategy,c=l.VerticalStrategy,p=((0,r.default)(v,[{key:"addRelation",value:function(t,e){void 0===this.childrenReference[t]&&(this.childrenReference[t]=[]),this.childrenReference[t].push(e),void 0===this.parentReference[e]&&(this.parentReference[e]=[]),this.parentReference[e].push(t)}},{key:"checkIfTree",value:function(){for(var t in this.parentReference)if(1<this.parentReference[t].length)return void(this.isTree=!1);this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(t,e){void 0!==e&&void 0===this.trees[t.id]&&(this.trees[t.id]=e,this.treeIndex=Math.max(e,this.treeIndex))}},{key:"ensureLevel",value:function(t){void 0===this.levels[t]&&(this.levels[t]=0)}},{key:"getMaxLevel",value:function(t){var s=this,r={};return function t(e){if(void 0!==r[e])return r[e];var i=s.levels[e];if(s.childrenReference[e]){var n=s.childrenReference[e];if(0<n.length)for(var o=0;o<n.length;o++)i=Math.max(i,t(n[o]))}return r[e]=i}(t)}},{key:"levelDownstream",value:function(t,e){void 0===this.levels[e.id]&&(void 0===this.levels[t.id]&&(this.levels[t.id]=0),this.levels[e.id]=this.levels[t.id]+1)}},{key:"setMinLevelToZero",value:function(t){var e=1e9;for(var i in t)t.hasOwnProperty(i)&&void 0!==this.levels[i]&&(e=Math.min(this.levels[i],e));for(var n in t)t.hasOwnProperty(n)&&void 0!==this.levels[n]&&(this.levels[n]-=e)}},{key:"getTreeSize",value:function(t,e){var i=1e9,n=-1e9,o=1e9,s=-1e9;for(var r in this.trees)if(this.trees.hasOwnProperty(r)&&this.trees[r]===e){var a=t[r];i=Math.min(a.x,i),n=Math.max(a.x,n),o=Math.min(a.y,o),s=Math.max(a.y,s)}return{min_x:i,max_x:n,min_y:o,max_y:s}}},{key:"hasSameParent",value:function(t,e){var i=this.parentReference[t.id],n=this.parentReference[e.id];if(void 0===i||void 0===n)return!1;for(var o=0;o<i.length;o++)for(var s=0;s<n.length;s++)if(i[o]==n[s])return!0;return!1}},{key:"inSameSubNetwork",value:function(t,e){return this.trees[t.id]===this.trees[e.id]}},{key:"getLevels",value:function(){return(0,h.default)(this.distributionOrdering)}},{key:"addToOrdering",value:function(t,e){void 0===this.distributionOrdering[e]&&(this.distributionOrdering[e]=[]);var i=!1,n=this.distributionOrdering[e];for(var o in n)if(n[o]===t){i=!0;break}i||(this.distributionOrdering[e].push(t),this.distributionIndex[t.id]=this.distributionOrdering[e].length-1)}}]),v),f=((0,r.default)(m,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("_dataChanged",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",function(){e.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",function(){if(!0===e.options.hierarchical.enabled){var t=e.direction.curveType();e.body.emitter.emit("_forceDisableDynamicCurves",t,!1)}})}},{key:"setOptions",value:function(t,e){if(void 0!==t){var i=this.options.hierarchical,n=i.enabled;if(a.selectiveDeepExtend(["randomSeed","improvedLayout"],this.options,t),a.mergeOptions(this.options,t,"hierarchical"),void 0!==t.randomSeed&&(this.initialRandomSeed=t.randomSeed),!0===i.enabled)return!0===n&&this.body.emitter.emit("refresh",!0),"RL"===i.direction||"DU"===i.direction?0<i.levelSeparation&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(!0===n)return this.body.emitter.emit("refresh"),a.deepExtend(e,this.optionsBackup)}return e}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(!0===this.options.hierarchical.enabled){var e=this.optionsBackup.physics;void 0===t.physics||!0===t.physics?(t.physics={enabled:void 0===e.enabled||e.enabled,solver:"hierarchicalRepulsion"},e.enabled=void 0===e.enabled||e.enabled,e.solver=e.solver||"barnesHut"):"object"===(0,o.default)(t.physics)?(e.enabled=void 0===t.physics.enabled||t.physics.enabled,e.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):!1!==t.physics&&(e.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var i=this.direction.curveType();if(void 0===t.edges)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1};else if(void 0===t.edges.smooth)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1;else if("boolean"==typeof t.edges.smooth)this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:i};else{var n=t.edges.smooth;void 0!==n.type&&"dynamic"!==n.type&&(i=n.type),this.optionsBackup.edges={smooth:void 0===n.enabled||n.enabled,type:void 0===n.type?"dynamic":n.type,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection},t.edges.smooth={enabled:void 0===n.enabled||n.enabled,type:i,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return t}},{key:"seededRandom",value:function(){var t=1e4*Math.sin(this.randomSeed++);return t-Math.floor(t)}},{key:"positionInitially",value:function(t){if(!0!==this.options.hierarchical.enabled){this.randomSeed=this.initialRandomSeed;for(var e=t.length+50,i=0;i<t.length;i++){var n=t[i],o=2*Math.PI*this.seededRandom();void 0===n.x&&(n.x=e*Math.cos(o)),void 0===n.y&&(n.y=e*Math.sin(o))}}}},{key:"layoutNetwork",value:function(){if(!0!==this.options.hierarchical.enabled&&!0===this.options.improvedLayout){for(var t=this.body.nodeIndices,e=0,i=0;i<t.length;i++)!0===this.body.nodes[t[i]].predefinedPosition&&(e+=1);if(e<.5*t.length){var n=0,o={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(150<t.length){for(var s=t.length;150<t.length&&n<=10;){n+=1;var r=t.length;if(n%3==0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o),r==t.length&&n%3!=0)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*s)})}10<n&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(t,this.body.edgeIndices,!0),this._shiftToCenter();for(var a=0;a<t.length;a++){var h=this.body.nodes[t[a]];!1===h.predefinedPosition&&(h.x+=70*(.5-this.seededRandom()),h.y+=70*(.5-this.seededRandom()))}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var t=d.getRangeCore(this.body.nodes,this.body.nodeIndices),e=d.findCenter(t),i=0;i<this.body.nodeIndices.length;i++){var n=this.body.nodes[this.body.nodeIndices[i]];n.x-=e.x,n.y-=e.y}}},{key:"_declusterAll",value:function(){for(var t=!0;!0===t;){t=!1;for(var e=0;e<this.body.nodeIndices.length;e++)!0===this.body.nodes[this.body.nodeIndices[e]].isCluster&&(t=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[e],{},!1));!0===t&&this.body.emitter.emit("_dataChanged")}}},{key:"getSeed",value:function(){return this.initialRandomSeed}},{key:"setupHierarchicalLayout",value:function(){if(!0===this.options.hierarchical.enabled&&0<this.body.nodeIndices.length){var t=void 0,e=void 0,i=!1,n=!1;for(e in this.lastNodeOnLevel={},this.hierarchical=new p,this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(void 0!==(t=this.body.nodes[e]).options.level?(i=!0,this.hierarchical.levels[e]=t.options.level):n=!0);if(!0===n&&!0===i)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(!0===n){var o=this.options.hierarchical.sortMethod;"hubsize"===o?this._determineLevelsByHubsize():"directed"===o?this._determineLevelsDirected():"custom"===o&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&this.hierarchical.ensureLevel(s);var r=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){function n(t,e){var i=D.hierarchical.trees;for(var n in i)i.hasOwnProperty(n)&&i[n]===t&&D.direction.shift(n,e)}function k(t,e){if(!e[t.id]&&(e[t.id]=!0,D.hierarchical.childrenReference[t.id])){var i=D.hierarchical.childrenReference[t.id];if(0<i.length)for(var n=0;n<i.length;n++)k(D.body.nodes[i[n]],e)}}function S(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1e9,i=1e9,n=1e9,o=1e9,s=-1e9;for(var r in t)if(t.hasOwnProperty(r)){var a=D.body.nodes[r],h=D.hierarchical.levels[a.id],d=D.direction.getPosition(a),l=D._getSpaceAroundNode(a,t),u=(0,O.default)(l,2),c=u[0],p=u[1];i=Math.min(c,i),n=Math.min(p,n),h<=e&&(o=Math.min(d,o),s=Math.max(d,s))}return[o,s,i,n]}function i(t,e,i){for(var n=D.hierarchical,o=0;o<e.length;o++){var s=e[o],r=n.distributionOrdering[s];if(1<r.length)for(var a=0;a<r.length-1;a++){var h=r[a],d=r[a+1];n.hasSameParent(h,d)&&n.inSameSubNetwork(h,d)&&t(h,d,i)}}}function o(t,e){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=D.direction.getPosition(t),o=D.direction.getPosition(e),s=Math.abs(o-n),r=D.options.hierarchical.nodeSpacing;if(r<s){var a={},h={};k(t,a),k(e,h);var d=function(t,e){var i=D.hierarchical.getMaxLevel(t.id),n=D.hierarchical.getMaxLevel(e.id);return Math.min(i,n)}(t,e),l=S(a,d),u=S(h,d),c=l[1],p=u[0],f=u[2];if(Math.abs(c-p)>r){var m=c-p+r;m<-f+r&&(m=-f+r),m<0&&(D._shiftBlock(e.id,m),(E=!0)===i&&D._centerParent(e))}}}function r(t,h){for(var e=h.id,i=h.edges,n=D.hierarchical.levels[h.id],s=D.options.hierarchical.levelSeparation*D.options.hierarchical.levelSeparation,r={},o=[],a=0;a<i.length;a++){var d=i[a];if(d.toId!=d.fromId){var l=d.toId==e?d.from:d.to;r[i[a].id]=l,D.hierarchical.levels[l.id]<n&&o.push(d)}}function u(t,e){for(var i=0,n=0;n<e.length;n++)if(void 0!==r[e[n].id]){var o=D.direction.getPosition(r[e[n].id])-t;i+=o/Math.sqrt(o*o+s)}return i}function c(t,e){for(var i=0,n=0;n<e.length;n++)if(void 0!==r[e[n].id]){var o=D.direction.getPosition(r[e[n].id])-t;i-=s*Math.pow(o*o+s,-1.5)}return i}function p(t,e){for(var i=D.direction.getPosition(h),n={},o=0;o<t;o++){var s=u(i,e),r=c(i,e);if(void 0!==n[i-=Math.max(-40,Math.min(40,Math.round(s/r)))])break;n[i]=o}return i}var f,m,v,g,y,b,_,w,x=p(t,o);!function(t){var e=D.direction.getPosition(h);if(void 0===M[h.id]){var i={};k(h,i),M[h.id]=i}var n=S(M[h.id]),o=n[2],s=n[3],r=t-e,a=0;0<r?a=Math.min(r,s-D.options.hierarchical.nodeSpacing):r<0&&(a=-Math.min(-r,o-D.options.hierarchical.nodeSpacing)),0!=a&&(D._shiftBlock(h.id,a),E=!0)}(x),x=p(t,i),f=x,m=D.direction.getPosition(h),v=D._getSpaceAroundNode(h),g=(0,O.default)(v,2),y=g[0],b=g[1],0<(_=f-(w=m))?w=Math.min(m+(b-D.options.hierarchical.nodeSpacing),f):_<0&&(w=Math.max(m-(y-D.options.hierarchical.nodeSpacing),f)),w!==m&&(D.direction.setPosition(h,w),E=!0)}var D=this,E=!1,M={};!0===this.options.hierarchical.blockShifting&&(function(){var t=D.hierarchical.getLevels();t=t.reverse();for(var e=0;e<5&&(i(o,t,!(E=!1)),!0===E);e++);}(),function(){for(var t in D.body.nodes)D.body.nodes.hasOwnProperty(t)&&D._centerParent(D.body.nodes[t])}()),!0===this.options.hierarchical.edgeMinimization&&function(){var t=D.hierarchical.getLevels();t=t.reverse();for(var e=0;e<20;e++){E=!1;for(var i=0;i<t.length;i++)for(var n=t[i],o=D.hierarchical.distributionOrdering[n],s=0;s<o.length;s++)r(1e3,o[s]);if(!0!==E)break}}(),!0===this.options.hierarchical.parentCentralization&&function(){var t=D.hierarchical.getLevels();t=t.reverse();for(var e=0;e<t.length;e++)for(var i=t[e],n=D.hierarchical.distributionOrdering[i],o=0;o<n.length;o++)D._centerParent(n[o])}(),function(){for(var t=function(){for(var t=[],e=0;e<D.hierarchical.numTrees();e++)t.push(D.direction.getTreeSize(e));return t}(),e=0,i=0;i<t.length-1;i++)e+=t[i].max-t[i+1].min+D.options.hierarchical.treeSpacing,n(i+1,e)}()}},{key:"_getSpaceAroundNode",value:function(t,e){var i=!0;void 0===e&&(i=!1);var n=this.hierarchical.levels[t.id];if(void 0===n)return[0,0];var o=this.hierarchical.distributionIndex[t.id],s=this.direction.getPosition(t),r=this.hierarchical.distributionOrdering[n],a=1e9,h=1e9;if(0!==o){var d=r[o-1];(!0===i&&void 0===e[d.id]||!1===i)&&(a=s-this.direction.getPosition(d))}if(o!=r.length-1){var l=r[o+1];if(!0===i&&void 0===e[l.id]||!1===i){var u=this.direction.getPosition(l);h=Math.min(h,u-s)}}return[a,h]}},{key:"_centerParent",value:function(t){if(this.hierarchical.parentReference[t.id])for(var e=this.hierarchical.parentReference[t.id],i=0;i<e.length;i++){var n=e[i],o=this.body.nodes[n],s=this.hierarchical.childrenReference[n];if(void 0!==s){var r=this._getCenterPosition(s),a=this.direction.getPosition(o),h=this._getSpaceAroundNode(o),d=(0,O.default)(h,2),l=d[0],u=d[1],c=a-r;(c<0&&Math.abs(c)<u-this.options.hierarchical.nodeSpacing||0<c&&Math.abs(c)<l-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,r)}}}},{key:"_placeNodesByHierarchy",value:function(t){for(var e in this.positionedNodes={},t)if(t.hasOwnProperty(e)){var i=(0,h.default)(t[e]);i=this._indexArrayToNodes(i),this.direction.sort(i);for(var n=0,o=0;o<i.length;o++){var s=i[o];if(void 0===this.positionedNodes[s.id]){var r=this.options.hierarchical.nodeSpacing,a=r*n;0<n&&(a=this.direction.getPosition(i[o-1])+r),this.direction.setPosition(s,a,e),this._validatePositionAndContinue(s,e,a),n++}}}}},{key:"_placeBranchNodes",value:function(t,e){var i=this.hierarchical.childrenReference[t];if(void 0!==i){for(var n=[],o=0;o<i.length;o++)n.push(this.body.nodes[i[o]]);this.direction.sort(n);for(var s=0;s<n.length;s++){var r=n[s],a=this.hierarchical.levels[r.id];if(!(e<a&&void 0===this.positionedNodes[r.id]))return;var h,d=this.options.hierarchical.nodeSpacing;h=0===s?this.direction.getPosition(this.body.nodes[t]):this.direction.getPosition(n[s-1])+d,this.direction.setPosition(r,h,a),this._validatePositionAndContinue(r,a,h)}var l=this._getCenterPosition(n);this.direction.setPosition(this.body.nodes[t],l,e)}}},{key:"_validatePositionAndContinue",value:function(t,e,i){if(this.hierarchical.isTree){if(void 0!==this.lastNodeOnLevel[e]){var n=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[e]]);if(i-n<this.options.hierarchical.nodeSpacing){var o=n+this.options.hierarchical.nodeSpacing-i,s=this._findCommonParent(this.lastNodeOnLevel[e],t.id);this._shiftBlock(s.withChild,o)}}this.lastNodeOnLevel[e]=t.id,this.positionedNodes[t.id]=!0,this._placeBranchNodes(t.id,e)}}},{key:"_indexArrayToNodes",value:function(t){for(var e=[],i=0;i<t.length;i++)e.push(this.body.nodes[t[i]]);return e}},{key:"_getDistribution",value:function(){var t={},e=void 0,i=void 0;for(e in this.body.nodes)if(this.body.nodes.hasOwnProperty(e)){i=this.body.nodes[e];var n=void 0===this.hierarchical.levels[e]?0:this.hierarchical.levels[e];this.direction.fix(i,n),void 0===t[n]&&(t[n]={}),t[n][e]=i}return t}},{key:"_getActiveEdges",value:function(t){var e=this,i=[];return a.forEach(t.edges,function(t){-1!==e.body.edgeIndices.indexOf(t.id)&&i.push(t)}),i}},{key:"_getHubSizes",value:function(){var n=this,o={},t=this.body.nodeIndices;a.forEach(t,function(t){var e=n.body.nodes[t],i=n._getActiveEdges(e).length;o[i]=!0});var e=[];return a.forEach(o,function(t){e.push(Number(t))}),e.sort(function(t,e){return e-t}),e}},{key:"_determineLevelsByHubsize",value:function(){function n(t,e){o.hierarchical.levelDownstream(t,e)}for(var o=this,t=this._getHubSizes(),e=0;e<t.length&&"break"!==function(){var i=t[e];if(0===i)return"break";a.forEach(o.body.nodeIndices,function(t){var e=o.body.nodes[t];i===o._getActiveEdges(e).length&&o._crawlNetwork(n,t)})}();++e);}},{key:"_determineLevelsCustomCallback",value:function(){var s=this;this._crawlNetwork(function(t,e,i){var n=s.hierarchical.levels[t.id];void 0===n&&(n=s.hierarchical.levels[t.id]=1e5);var o=(d.cloneOptions(t,"node"),d.cloneOptions(e,"node"),void d.cloneOptions(i,"edge"));s.hierarchical.levels[e.id]=n+o}),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var s=this;this._crawlNetwork(function(t,e,i){var n=s.hierarchical.levels[t.id],o=s.hierarchical.levels[e.id];(function(e){return a.forEach(s.body.edges,function(t){if(t.toId===e.fromId&&t.fromId===e.toId)return!0}),!1})(i)&&void 0!==n&&void 0!==o||(void 0===n&&(n=s.hierarchical.levels[t.id]=1e4),i.toId==e.id?s.hierarchical.levels[e.id]=n+1:s.hierarchical.levels[e.id]=n-1)}),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var i=this;this._crawlNetwork(function(t,e){i.hierarchical.levels[e.id]>i.hierarchical.levels[t.id]&&i.hierarchical.addRelation(t.id,e.id)}),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){function r(t,e){if(void 0===d[t.id]){a.hierarchical.setTreeIndex(t,e),d[t.id]=!0;for(var i=void 0,n=a._getActiveEdges(t),o=0;o<n.length;o++){var s=n[o];!0===s.connected&&(i=s.toId==t.id?s.from:s.to,t.id!=i.id&&(h(t,i,s),r(i,e)))}}}var a=this,h=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(){},t=arguments[1],d={};if(void 0===t)for(var e=0,i=0;i<this.body.nodeIndices.length;i++){var n=this.body.nodeIndices[i];void 0===d[n]&&(r(this.body.nodes[n],e),e+=1)}else{var o=this.body.nodes[t];if(void 0===o)return void console.error("Node not found:",t);r(o)}}},{key:"_shiftBlock",value:function(t,o){var s=this,r={};!function t(e){if(!r[e]){r[e]=!0,s.direction.shift(e,o);var i=s.hierarchical.childrenReference[e];if(void 0!==i)for(var n=0;n<i.length;n++)t(i[n])}}(t)}},{key:"_findCommonParent",value:function(t,e){var a=this,i={};return function t(e,i){var n=a.hierarchical.parentReference[i];if(void 0!==n)for(var o=0;o<n.length;o++){var s=n[o];e[s]=!0,t(e,s)}}(i,t),function t(e,i){var n=a.hierarchical.parentReference[i];if(void 0!==n)for(var o=0;o<n.length;o++){var s=n[o];if(void 0!==e[s])return{foundParent:s,withChild:i};var r=t(e,s);if(null!==r.foundParent)return r}return{foundParent:null,withChild:i}}(i,e)}},{key:"setDirectionStrategy",value:function(){var t="UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction;this.direction=t?new c(this):new u(this)}},{key:"_getCenterPosition",value:function(t){for(var e=1e9,i=-1e9,n=0;n<t.length;n++){var o=void 0;if(void 0!==t[n].id)o=t[n];else{var s=t[n];o=this.body.nodes[s]}var r=this.direction.getPosition(o);e=Math.min(e,r),i=Math.max(i,r)}return.5*(e+i)}}]),m);function m(t){(0,s.default)(this,m),this.body=t,this.initialRandomSeed=Math.round(1e6*Math.random()),this.randomSeed=this.initialRandomSeed,this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},a.extend(this.options,this.defaultOptions),this.bindEventListeners()}function v(){(0,s.default)(this,v),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}e.default=f},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalStrategy=e.HorizontalStrategy=void 0;var o,s,r=n(i(3)),a=n(i(4)),h=n(i(5)),d=n(i(0)),l=n(i(1)),u=((0,l.default)(v,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(t){return this.fake_use(t),this.abstract()}},{key:"setPosition",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0;this.fake_use(t,e,i),this.abstract()}},{key:"getTreeSize",value:function(t){return this.fake_use(t),this.abstract()}},{key:"sort",value:function(t){this.fake_use(t),this.abstract()}},{key:"fix",value:function(t,e){this.fake_use(t,e),this.abstract()}},{key:"shift",value:function(t,e){this.fake_use(t,e),this.abstract()}}]),v),c=(s=u,(0,h.default)(m,s),(0,l.default)(m,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(t){return t.x}},{key:"setPosition",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==i&&this.layout.hierarchical.addToOrdering(t,i),t.x=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_x,max:e.max_x}}},{key:"sort",value:function(t){t.sort(function(t,e){return void 0===t.x||void 0===e.x?0:t.x-e.x})}},{key:"fix",value:function(t,e){t.y=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.y=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].x+=e}}]),m),p=(o=u,(0,h.default)(f,o),(0,l.default)(f,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(t){return t.y}},{key:"setPosition",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==i&&this.layout.hierarchical.addToOrdering(t,i),t.y=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_y,max:e.max_y}}},{key:"sort",value:function(t){t.sort(function(t,e){return void 0===t.y||void 0===e.y?0:t.y-e.y})}},{key:"fix",value:function(t,e){t.x=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.x=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].y+=e}}]),f);function f(t){(0,d.default)(this,f);var e=(0,a.default)(this,(f.__proto__||(0,r.default)(f)).call(this));return e.layout=t,e}function m(t){(0,d.default)(this,m);var e=(0,a.default)(this,(m.__proto__||(0,r.default)(m)).call(this));return e.layout=t,e}function v(){(0,d.default)(this,v)}e.HorizontalStrategy=p,e.VerticalStrategy=c},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(8)),s=n(i(19)),r=n(i(6)),a=n(i(0)),h=n(i(1)),d=i(2),l=i(10),u=i(37),c=((0,h.default)(p,[{key:"_restore",value:function(){!1!==this.inMode&&(!0===this.options.initiallyActive?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(t,e,i){void 0!==e&&(void 0!==e.locale?this.options.locale=e.locale:this.options.locale=i.locale,void 0!==e.locales?this.options.locales=e.locales:this.options.locales=i.locales),void 0!==t&&("boolean"==typeof t?this.options.enabled=t:(this.options.enabled=!0,d.deepExtend(this.options,t)),!0===this.options.initiallyActive&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){!0===this.editMode?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){this.editMode=!0,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}},{key:"disableEditMode",value:function(){this.editMode=!1,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},!0===this.guiEnabled){this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var t=this.selectionHandler._getSelectedNodeCount(),e=this.selectionHandler._getSelectedEdgeCount(),i=t+e,n=this.options.locales[this.options.locale],o=!1;!1!==this.options.addNode&&(this._createAddNodeButton(n),o=!0),!1!==this.options.addEdge&&(!0===o?this._createSeperator(1):o=!0,this._createAddEdgeButton(n)),1===t&&"function"==typeof this.options.editNode?(!0===o?this._createSeperator(2):o=!0,this._createEditNodeButton(n)):1===e&&0===t&&!1!==this.options.editEdge&&(!0===o?this._createSeperator(3):o=!0,this._createEditEdgeButton(n)),0!==i&&(0<t&&!1!==this.options.deleteNode?(!0===o&&this._createSeperator(4),this._createDeleteButton(n)):0===t&&!1!==this.options.deleteEdge&&(!0===o&&this._createSeperator(4),this._createDeleteButton(n))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addNode",!0===this.guiEnabled){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var e=this;!0!==this.editMode&&this.enableEditMode(),this._clean();var t=this.selectionHandler._getSelectedNode();if(void 0!==t){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(!0!==t.isCluster){var i=d.deepExtend({},t.options,!1);if(i.x=t.x,i.y=t.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(t){null!=t&&"editNode"===e.inMode&&e.body.data.nodes.getDataSet().update(t),e.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addEdge",!0===this.guiEnabled){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",this._dragStartEdge.bind(this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="editEdge","object"!==(0,r.default)(this.options.editEdge)||"function"!=typeof this.options.editEdge.editWithoutDrag||(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0===this.edgeBeingEditedId)){if(!0===this.guiEnabled){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId){var i=this.body.edges[this.edgeBeingEditedId],n=this._getNewTargetNode(i.from.x,i.from.y),o=this._getNewTargetNode(i.to.x,i.to.y);this.temporaryIds.nodes.push(n.id),this.temporaryIds.nodes.push(o.id),this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id),this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id),this._temporaryBindUI("onTouch",this._controlNodeTouch.bind(this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",this._controlNodeDragStart.bind(this)),this._temporaryBindUI("onDrag",this._controlNodeDrag.bind(this)),this._temporaryBindUI("onDragEnd",this._controlNodeDragEnd.bind(this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(t){var e=i.edgeType.findBorderPositions(t);!1===n.selected&&(n.x=e.from.x,n.y=e.from.y),!1===o.selected&&(o.x=e.to.x,o.y=e.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}else{var e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from,e.to)}}},{key:"deleteSelected",value:function(){var e=this;!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="delete";var t=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),n=void 0;if(0<t.length){for(var o=0;o<t.length;o++)if(!0===this.body.nodes[t[o]].isCluster)return void alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);"function"==typeof this.options.deleteNode&&(n=this.options.deleteNode)}else 0<i.length&&"function"==typeof this.options.deleteEdge&&(n=this.options.deleteEdge);if("function"==typeof n){var s={nodes:t,edges:i};if(2!==n.length)throw new Error("The function for delete does not support two arguments (data, callback)");n(s,function(t){null!=t&&"delete"===e.inMode&&(e.body.data.edges.getDataSet().remove(t.edges),e.body.data.nodes.getDataSet().remove(t.nodes)),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(t),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){!0===this.options.enabled?(this.guiEnabled=!0,this._createWrappers(),!1===this.editMode?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",!0===this.editMode?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",!0===this.editMode?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(t,e){var i=d.deepExtend({},this.options.controlNodeStyle);i.id="targetNode"+d.randomUUID(),i.hidden=!1,i.physics=!1,i.x=t,i.y=e;var n=this.body.functions.createNode(i);return n.shape.boundingBox={left:t,right:t,top:e,bottom:e},n}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},d.recursiveDOMDelete(this.editModeDiv);var t=this.options.locales[this.options.locale],e=this._createButton("editMode","vis-button vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(e),this._bindHammerToDiv(e,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){!(this.inMode=!1)===this.guiEnabled&&(d.recursiveDOMDelete(this.editModeDiv),d.recursiveDOMDelete(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(0!=this.manipulationHammers.length){for(var t=0;t<this.manipulationHammers.length;t++)this.manipulationHammers[t].destroy();this.manipulationHammers=[]}}},{key:"_removeManipulationDOM",value:function(){this._clean(),d.recursiveDOMDelete(this.manipulationDiv),d.recursiveDOMDelete(this.editModeDiv),d.recursiveDOMDelete(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}},{key:"_createSeperator",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+t]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+t].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+t])}},{key:"_createAddNodeButton",value:function(t){var e=this._createButton("addNode","vis-button vis-add",t.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.addNodeMode.bind(this))}},{key:"_createAddEdgeButton",value:function(t){var e=this._createButton("addEdge","vis-button vis-connect",t.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.addEdgeMode.bind(this))}},{key:"_createEditNodeButton",value:function(t){var e=this._createButton("editNode","vis-button vis-edit",t.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.editNode.bind(this))}},{key:"_createEditEdgeButton",value:function(t){var e=this._createButton("editEdge","vis-button vis-edit",t.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.editEdgeMode.bind(this))}},{key:"_createDeleteButton",value:function(t){var e;e=this.options.rtl?"vis-button vis-delete-rtl":"vis-button vis-delete";var i=this._createButton("delete",e,t.del||this.options.locales.en.del);this.manipulationDiv.appendChild(i),this._bindHammerToDiv(i,this.deleteSelected.bind(this))}},{key:"_createBackButton",value:function(t){var e=this._createButton("back","vis-button vis-back",t.back||this.options.locales.en.back);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.showManipulatorToolbar.bind(this))}},{key:"_createButton",value:function(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"vis-label";return this.manipulationDOM[t+"Div"]=document.createElement("div"),this.manipulationDOM[t+"Div"].className=e,this.manipulationDOM[t+"Label"]=document.createElement("div"),this.manipulationDOM[t+"Label"].className=n,this.manipulationDOM[t+"Label"].innerHTML=i,this.manipulationDOM[t+"Div"].appendChild(this.manipulationDOM[t+"Label"]),this.manipulationDOM[t+"Div"]}},{key:"_createDescription",value:function(t){this.manipulationDiv.appendChild(this._createButton("description","vis-button vis-none",t))}},{key:"_temporaryBindEvent",value:function(t,e){this.temporaryEventFunctions.push({event:t,boundFunction:e}),this.body.emitter.on(t,e)}},{key:"_temporaryBindUI",value:function(t,e){if(void 0===this.body.eventListeners[t])throw new Error("This UI function does not exist. Typo? You tried: "+t+" possible are: "+(0,s.default)((0,o.default)(this.body.eventListeners)));this.temporaryUIFunctions[t]=this.body.eventListeners[t],this.body.eventListeners[t]=e}},{key:"_unbindTemporaryUIs",value:function(){for(var t in this.temporaryUIFunctions)this.temporaryUIFunctions.hasOwnProperty(t)&&(this.body.eventListeners[t]=this.temporaryUIFunctions[t],delete this.temporaryUIFunctions[t]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var t=0;t<this.temporaryEventFunctions.length;t++){var e=this.temporaryEventFunctions[t].event,i=this.temporaryEventFunctions[t].boundFunction;this.body.emitter.off(e,i)}this.temporaryEventFunctions=[]}},{key:"_bindHammerToDiv",value:function(t,e){var i=new l(t,{});u.onTouch(i,e),this.manipulationHammers.push(i)}},{key:"_cleanupTemporaryNodesAndEdges",value:function(){for(var t=0;t<this.temporaryIds.edges.length;t++){this.body.edges[this.temporaryIds.edges[t]].disconnect(),delete this.body.edges[this.temporaryIds.edges[t]];var e=this.body.edgeIndices.indexOf(this.temporaryIds.edges[t]);-1!==e&&this.body.edgeIndices.splice(e,1)}for(var i=0;i<this.temporaryIds.nodes.length;i++){delete this.body.nodes[this.temporaryIds.nodes[i]];var n=this.body.nodeIndices.indexOf(this.temporaryIds.nodes[i]);-1!==n&&this.body.nodeIndices.splice(n,1)}this.temporaryIds={nodes:[],edges:[]}}},{key:"_controlNodeTouch",value:function(t){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=d.extend({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(t){var e=this.lastTouch,i=this.selectionHandler._pointerToPositionObject(e),n=this.body.nodes[this.temporaryIds.nodes[0]],o=this.body.nodes[this.temporaryIds.nodes[1]],s=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var r=n.isOverlappingWith(i),a=o.isOverlappingWith(i);!0===r?(this.selectedControlNode=n,s.edgeType.from=n):!0===a&&(this.selectedControlNode=o,s.edgeType.to=o),void 0!==this.selectedControlNode&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDrag",value:function(t){this.body.emitter.emit("disablePhysics");var e=this.body.functions.getPointer(t.center),i=this.canvas.DOMtoCanvas(e);if(void 0!==this.selectedControlNode)this.selectedControlNode.x=i.x,this.selectedControlNode.y=i.y;else{var n=e.x-this.lastTouch.x,o=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+n,y:this.lastTouch.translation.y+o}}this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),n=this.body.edges[this.edgeBeingEditedId];if(void 0!==this.selectedControlNode){this.selectionHandler.unselectAll();for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=o.length-1;0<=r;r--)if(o[r]!==this.selectedControlNode.id){s=this.body.nodes[o[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(!0===s.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,n.to.id):this._performEditEdge(n.from.id,s.id)}else n.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(t){if(100<(new Date).valueOf()-this.touchTime){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=d.extend({},this.body.view.translation);var e=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void 0!==i)if(!0===i.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var n=this._getNewTargetNode(i.x,i.y);this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id);var o=this.body.functions.createEdge({id:"connectionEdge"+d.randomUUID(),from:i.id,to:n.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(n.id),this.temporaryIds.edges.push(o.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(t){var e=this.body.functions.getPointer(t.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(e.x),i.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else{var n=e.x-this.lastTouch.x,o=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+n,y:this.lastTouch.translation.y+o}}}},{key:"_finishConnect",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),n=void 0;void 0!==this.temporaryIds.edges[0]&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=o.length-1;0<=r;r--)if(-1===this.temporaryIds.nodes.indexOf(o[r])){s=this.body.nodes[o[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(!0===s.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[n]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(n,s.id)),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(t){var e=this.lastTouch;this.selectionHandler._generateClickEvent("dragStart",t,e,void 0,!0)}},{key:"_performAddNode",value:function(t){var e=this,i={id:d.randomUUID(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(t){null!=t&&"addNode"===e.inMode&&(e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){var i=this,n={from:t,to:e};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(n,function(t){null!=t&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(t,e){var i=this,n={id:this.edgeBeingEditedId,from:t,to:e,label:this.body.data.edges._data[this.edgeBeingEditedId].label},o=this.options.editEdge;if("object"===(void 0===o?"undefined":(0,r.default)(o))&&(o=o.editWithoutDrag),"function"==typeof o){if(2!==o.length)throw new Error("The function for edit does not support two arguments (data, callback)");o(n,function(t){null==t||"editEdge"!==i.inMode?(i.body.edges[n.id].updateEdgeType(),i.body.emitter.emit("_redraw")):(i.body.data.edges.getDataSet().update(t),i.selectionHandler.unselectAll()),i.showManipulatorToolbar()})}else this.body.data.edges.getDataSet().update(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),p);function p(t,e,i){var n=this;(0,a.default)(this,p),this.body=t,this.canvas=e,this.selectionHandler=i,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this.manipulationHammers=[],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}},d.extend(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){n._clean()}),this.body.emitter.on("_dataChanged",this._restore.bind(this)),this.body.emitter.on("_resetData",this._restore.bind(this))}e.default=c},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var v=n(i(30)),o=n(i(0)),s=n(i(1)),r=n(i(239)),a=((0,s.default)(h,[{key:"setOptions",value:function(t){t&&(t.springLength&&(this.springLength=t.springLength),t.springConstant&&(this.springConstant=t.springConstant))}},{key:"solve",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=this.distanceSolver.getDistances(this.body,t,e);this._createL_matrix(n),this._createK_matrix(n),this._createE_matrix();for(var o=0,s=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),r=1e9,a=0,h=0,d=0,l=0,u=0;.01<r&&o<s;){o+=1;var c=this._getHighestEnergyNode(i),p=(0,v.default)(c,4);for(a=p[0],r=p[1],h=p[2],d=p[3],l=r,u=0;1<l&&u<5;){u+=1,this._moveNode(a,h,d);var f=this._getEnergy(a),m=(0,v.default)(f,3);l=m[0],h=m[1],d=m[2]}}}},{key:"_getHighestEnergyNode",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,n=0,o=e[0],s=0,r=0,a=0;a<e.length;a++){var h=e[a];if(!1===i[h].predefinedPosition||!0===i[h].isCluster&&!0===t||!0===i[h].options.fixed.x||!0===i[h].options.fixed.y){var d=this._getEnergy(h),l=(0,v.default)(d,3),u=l[0],c=l[1],p=l[2];n<u&&(n=u,o=h,s=c,r=p)}}return[o,n,s,r]}},{key:"_getEnergy",value:function(t){var e=(0,v.default)(this.E_sums[t],2),i=e[0],n=e[1];return[Math.sqrt(Math.pow(i,2)+Math.pow(n,2)),i,n]}},{key:"_moveNode",value:function(t,e,i){for(var n=this.body.nodeIndices,o=this.body.nodes,s=0,r=0,a=0,h=o[t].x,d=o[t].y,l=this.K_matrix[t],u=this.L_matrix[t],c=0;c<n.length;c++){var p=n[c];if(p!==t){var f=o[p].x,m=o[p].y,v=l[p],g=u[p],y=1/Math.pow(Math.pow(h-f,2)+Math.pow(d-m,2),1.5);s+=v*(1-g*Math.pow(d-m,2)*y),r+=v*(g*(h-f)*(d-m)*y),a+=v*(1-g*Math.pow(h-f,2)*y)}}var b=(e/s+i/r)/(r/s-a/r),_=-(r*b+e)/s;o[t].x+=_,o[t].y+=b,this._updateE_matrix(t)}},{key:"_createL_matrix",value:function(t){var e=this.body.nodeIndices,i=this.springLength;this.L_matrix=[];for(var n=0;n<e.length;n++){this.L_matrix[e[n]]={};for(var o=0;o<e.length;o++)this.L_matrix[e[n]][e[o]]=i*t[e[n]][e[o]]}}},{key:"_createK_matrix",value:function(t){var e=this.body.nodeIndices,i=this.springConstant;this.K_matrix=[];for(var n=0;n<e.length;n++){this.K_matrix[e[n]]={};for(var o=0;o<e.length;o++)this.K_matrix[e[n]][e[o]]=i*Math.pow(t[e[n]][e[o]],-2)}}},{key:"_createE_matrix",value:function(){var t=this.body.nodeIndices,e=this.body.nodes;this.E_matrix={},this.E_sums={};for(var i=0;i<t.length;i++)this.E_matrix[t[i]]=[];for(var n=0;n<t.length;n++){for(var o=t[n],s=e[o].x,r=e[o].y,a=0,h=0,d=n;d<t.length;d++){var l=t[d];if(l!==o){var u=e[l].x,c=e[l].y,p=1/Math.sqrt(Math.pow(s-u,2)+Math.pow(r-c,2));this.E_matrix[o][d]=[this.K_matrix[o][l]*(s-u-this.L_matrix[o][l]*(s-u)*p),this.K_matrix[o][l]*(r-c-this.L_matrix[o][l]*(r-c)*p)],this.E_matrix[l][n]=this.E_matrix[o][d],a+=this.E_matrix[o][d][0],h+=this.E_matrix[o][d][1]}}this.E_sums[o]=[a,h]}}},{key:"_updateE_matrix",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,n=this.E_matrix[t],o=this.K_matrix[t],s=this.L_matrix[t],r=i[t].x,a=i[t].y,h=0,d=0,l=0;l<e.length;l++){var u=e[l];if(u!==t){var c=n[l],p=c[0],f=c[1],m=i[u].x,v=i[u].y,g=1/Math.sqrt(Math.pow(r-m,2)+Math.pow(a-v,2)),y=o[u]*(r-m-s[u]*(r-m)*g),b=o[u]*(a-v-s[u]*(a-v)*g);n[l]=[y,b],h+=y,d+=b;var _=this.E_sums[u];_[0]+=y-p,_[1]+=b-f}}this.E_sums[t]=[h,d]}}]),h);function h(t,e,i){(0,o.default)(this,h),this.body=t,this.springLength=e,this.springConstant=i,this.distanceSolver=new r.default}e.default=a},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(i(0)),s=((0,n(i(1)).default)(r,[{key:"getDistances",value:function(t,e,i){for(var n={},o=t.edges,s=0;s<e.length;s++){var r={};n[e[s]]=r;for(var a=0;a<e.length;a++)r[e[a]]=s==a?0:1e9}for(var h=0;h<i.length;h++){var d=o[i[h]];!0===d.connected&&void 0!==n[d.fromId]&&void 0!==n[d.toId]&&(n[d.fromId][d.toId]=1,n[d.toId][d.fromId]=1)}for(var l=e.length,u=0;u<l;u++)for(var c=e[u],p=n[c],f=0;f<l-1;f++)for(var m=e[f],v=n[m],g=f+1;g<l;g++){var y=e[g],b=n[y],_=Math.min(v[y],v[c]+p[y]);v[y]=_,b[m]=_}return n}}]),r);function r(){(0,o.default)(this,r)}e.default=s}],d$.c=e$,d$.d=function(t,e,i){d$.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},d$.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return d$.d(e,"a",e),e},d$.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},d$.p="",d$(d$.s=123);function d$(t){if(e$[t])return e$[t].exports;var e=e$[t]={i:t,l:!1,exports:{}};return c$[t].call(e.exports,e,e.exports,d$),e.l=!0,e.exports}var c$,e$}),function(t,e){if("function"==typeof define&&define.amd)define(["exports"],e);else if("undefined"!=typeof exports)e(exports);else{var i={};e(i),t.bodyScrollLock=i}}(this,function(t){"use strict";function o(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}Object.defineProperty(t,"__esModule",{value:!0});var r=!1;if("undefined"!=typeof window){var e={get passive(){r=!0}};window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}function a(e){return l.some(function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))})}function h(t){var e=t||window.event;return!!a(e.target)||1<e.touches.length||(e.preventDefault&&e.preventDefault(),!1)}function i(){setTimeout(function(){void 0!==f&&(document.body.style.paddingRight=f,f=void 0),void 0!==p&&(document.body.style.overflow=p,p=void 0)})}var d="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),l=[],u=!1,c=-1,p=void 0,f=void 0;t.disableBodyScroll=function(s,t){if(d){if(!s)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(s&&!l.some(function(t){return t.targetElement===s})){var e={targetElement:s,options:t||{}};l=[].concat(o(l),[e]),s.ontouchstart=function(t){1===t.targetTouches.length&&(c=t.targetTouches[0].clientY)},s.ontouchmove=function(t){var e,i,n,o;1===t.targetTouches.length&&(i=s,o=(e=t).targetTouches[0].clientY-c,a(e.target)||(i&&0===i.scrollTop&&0<o?h(e):(n=i)&&n.scrollHeight-n.scrollTop<=n.clientHeight&&o<0?h(e):e.stopPropagation()))},u||(document.addEventListener("touchmove",h,r?{passive:!1}:void 0),u=!0)}}else{n=t,setTimeout(function(){if(void 0===f){var t=!!n&&!0===n.reserveScrollBarGap,e=window.innerWidth-document.documentElement.clientWidth;t&&0<e&&(f=document.body.style.paddingRight,document.body.style.paddingRight=e+"px")}void 0===p&&(p=document.body.style.overflow,document.body.style.overflow="hidden")});var i={targetElement:s,options:t||{}};l=[].concat(o(l),[i])}var n},t.clearAllBodyScrollLocks=function(){d?(l.forEach(function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null}),u&&(document.removeEventListener("touchmove",h,r?{passive:!1}:void 0),u=!1),l=[],c=-1):(i(),l=[])},t.enableBodyScroll=function(e){if(d){if(!e)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");e.ontouchstart=null,e.ontouchmove=null,l=l.filter(function(t){return t.targetElement!==e}),u&&0===l.length&&(document.removeEventListener("touchmove",h,r?{passive:!1}:void 0),u=!1)}else(l=l.filter(function(t){return t.targetElement!==e})).length||i()}}),String.prototype.splice||(String.prototype.splice=function(t,e,i){return this.slice(0,t)+i+this.slice(t+Math.abs(e))});var Node=function(t){var e=t||{};this.state=e.state||"012345678",this.parent=e.parent||null,this.cost=e.cost||0,this.depth=e.depth||0,this.game=new Game(this.state)};Node.prototype.expand=function(){var n=this,o=[],t=this.game.getAvaliableActionsAndStates();return _.forEach(t,function(t,e){var i={state:t,parent:n,depth:n.depth+1,cost:n.cost+1};o.push(new Node(i))}),o};var Game=function(t){this.state=t||"012345678"};Game.Actions={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right"},Game.DesiredState="123456780",Game.prototype.getAvaliableActionsAndStates=function(){var t={},e=this.state.indexOf("0"),i=Math.floor(e/3),n=e%3;return 0<n&&(t[Game.Actions.LEFT]=this.getNextState(Game.Actions.LEFT)),n<2&&(t[Game.Actions.RIGHT]=this.getNextState(Game.Actions.RIGHT)),0<i&&(t[Game.Actions.UP]=this.getNextState(Game.Actions.UP)),i<2&&(t[Game.Actions.DOWN]=this.getNextState(Game.Actions.DOWN)),t},Game.prototype.getNextState=function(t){var e,i=this.state.indexOf("0");switch(t){case Game.Actions.LEFT:e=i-1;break;case Game.Actions.RIGHT:e=i+1;break;case Game.Actions.UP:e=i-3;break;case Game.Actions.DOWN:e=i+3;break;default:throw new Error("Unexpected action")}var n=this.state.split("");return n[i]=n[e],n[e]="0",n.join("")},Game.prototype.isFinished=function(){return this.state==Game.DesiredState},Game.prototype.randomize=function(){var e=this,i={};if(isNaN(100))return alert("Invalid iteration count, please enter a number");this.state=Game.DesiredState,i[this.state]=!0;var n=function(){var t=_.sample(e.getAvaliableActionsAndStates());return i[t]?n():t};_.times(100,function(){e.state=n()})},Game.prototype.getManhattanDistance=function(){var t=0,e=this.state.indexOf("1"),i=Game.indexToRowColumn(e);t+=Math.abs(0-i.row)+Math.abs(0-i.column);var n=this.state.indexOf("2"),o=Game.indexToRowColumn(n);t+=Math.abs(0-o.row)+Math.abs(1-o.column);var s=this.state.indexOf("3"),r=Game.indexToRowColumn(s);t+=Math.abs(0-r.row)+Math.abs(2-r.column);var a=this.state.indexOf("4"),h=Game.indexToRowColumn(a);t+=Math.abs(1-h.row)+Math.abs(0-h.column);var d=this.state.indexOf("5"),l=Game.indexToRowColumn(d);t+=Math.abs(1-l.row)+Math.abs(1-l.column);var u=this.state.indexOf("6"),c=Game.indexToRowColumn(u);t+=Math.abs(1-c.row)+Math.abs(2-c.column);var p=this.state.indexOf("7"),f=Game.indexToRowColumn(p);t+=Math.abs(2-f.row)+Math.abs(0-f.column);var m=this.state.indexOf("8"),v=Game.indexToRowColumn(m);return t+=Math.abs(2-v.row)+Math.abs(1-v.column)},Game.indexToRowColumn=function(t){return{row:Math.floor(t/3),column:t%3}};var Board={};Board.elements={1:document.getElementById("board-item-1"),2:document.getElementById("board-item-2"),3:document.getElementById("board-item-3"),4:document.getElementById("board-item-4"),5:document.getElementById("board-item-5"),6:document.getElementById("board-item-6"),7:document.getElementById("board-item-7"),8:document.getElementById("board-item-8")},Board.draw=function(t){t.split("").forEach(function(t,e){if("0"!=t){var i=Board.elements[t],n=Math.floor(e/3),o=e%3;i.style.top=n*i.offsetHeight+"px",i.style.left=o*i.offsetWidth+"px"}})},Board.replayTimeout=null,Board.replayAnimationTimeout=null,Board.replay=function(t){Board.clearReplay();var e=t.shift();Board.draw(e),window.network.selectNodes([e]),window.network.focus(e,{scale:.75}),window.isReplaying=!0;var i=document.getElementById("replayButton");i&&(i.textContent="Stop replaying");var n=function(t){var e=t.shift();if(!e)return Board.clearReplay();Board.draw(e),window.network.selectNodes([e]),window.network.focus(e,{scale:.75,animation:!0}),Board.replayAnimationTimeout=setTimeout(n.bind(null,t),1e3)};Board.replayTimeout=setTimeout(function(){n(t)},1e3)},Board.clearReplay=function(){clearTimeout(Board.replayTimeout),clearTimeout(Board.replayAnimationTimeout),boardDiv.classList.remove("animation"),window.isReplaying=!1;var t=document.getElementById("replayButton");t&&(t.textContent="Replay solution")};var Visualization={};Visualization.element=document.getElementById("visualization"),Visualization.draw=function(t){window.network=new vis.Network(Visualization.element,t,{layout:{hierarchical:{direction:"UD",sortMethod:"directed",levelSeparation:150,nodeSpacing:100}},interaction:{dragNodes:!1},physics:{enabled:!1},configure:{filter:function(t,e){return-1!==e.indexOf("hierarchical")},showButton:!1}}),window.network.on("click",function(t){0<t.nodes.length&&(Board.draw(t.nodes[0]),Board.clearReplay())})},Visualization.importData=function(t,e,i,n){var o={nodes:[],edges:[]},s={},r={};function a(t,e){r[e.state]||(o.nodes.push({id:e.state,label:e.state.splice(6,0,"\n").splice(3,0,"\n"),color:s[e.state]?n||"#ccff33":t}),e.parent&&o.edges.push({from:e.parent.state,to:e.state,id:e.parent.state+e.state}),r[e.state]=!0)}if(i){!function t(e){s[e.state]=!0,e.parent&&t(e.parent)}(i),a(null,i)}return _.forEach(t,a.bind(null,"#eee")),_.forEach(e,a.bind(null,null)),o};var SearchType={BREADTH_FIRST:"breadthFirst",UNIFORM_COST:"uniformCost",DEPTH_FIRST:"depthFirst",ITERATIVE_DEEPENING:"iterativeDeepening",GREEDY_BEST:"greedyBest",A_STAR:"aStar"};function search(t){var n=_.assign({node:null,frontierList:[],expandedNodes:{},iteration:0,iterationLimit:1e3,depthLimit:0,expandCheckOptimization:!1,callback:function(){},stepCallback:null,type:SearchType.BREADTH_FIRST,maxFrontierListLength:0,maxExpandedNodesLength:0,iterativeDeepeningIndex:0},t||{});if(Board.draw(n.node.state),n.node.game.isFinished())return n.callback(null,n);var e=n.node.expand();n.expandedNodes[n.node.state]=n.node,n.maxExpandedNodesLength=Math.max(n.maxExpandedNodesLength,_.size(n.expandedNodes));var i=e.filter(function(t){if(n.type==SearchType.ITERATIVE_DEEPENING&&t.depth>n.iterativeDeepeningIndex)return!1;if(n.depthLimit&&t.depth>n.depthLimit)return!1;var e=n.expandedNodes[t.state];if(e&&e.cost<=t.cost)return!1;var i=_.find(n.frontierList,{state:t.state});return!(i&&i.cost<=t.cost)&&(i&&i.cost>t.cost&&_.remove(n.frontierList,i),!0)});if(n.frontierList=n.frontierList.concat(i),n.maxFrontierListLength=Math.max(n.maxFrontierListLength,n.frontierList.length),n.expandCheckOptimization){var o=_.find(i,function(t){return t.game.isFinished()});if(o)return n.callback(null,_.assign({},n,{node:o}))}var s=getNextNode(n);return s?(n.iteration++,n.iterationLimit&&n.iteration>n.iterationLimit?n.callback(new Error("Iteration limit reached"),n):window.searchStopped?(window.searchStopped=!1,n.callback(new Error("Search stopped"),n)):void(n.stepCallback?n.stepCallback(_.assign(n,{node:s})):setTimeout(function(){search(_.assign(n,{node:s}))},0))):n.callback(new Error("Frontier list is empty"),n)}function getNextNode(t){switch(t.type){case SearchType.BREADTH_FIRST:return t.frontierList.shift();case SearchType.DEPTH_FIRST:return t.frontierList.pop();case SearchType.UNIFORM_COST:var e=_.minBy(t.frontierList,function(t){return t.cost});return _.remove(t.frontierList,e),e;case SearchType.ITERATIVE_DEEPENING:var i=t.frontierList.pop();if(i)return i;if(t.iterativeDeepeningIndex++,t.depthLimit&&t.iterativeDeepeningIndex>t.depthLimit)return;return t.frontierList=[],t.expandedNodes={},new Node({state:game.state});case SearchType.GREEDY_BEST:e=_.minBy(t.frontierList,function(t){return t.game.getManhattanDistance()});return _.remove(t.frontierList,e),e;case SearchType.A_STAR:e=_.minBy(t.frontierList,function(t){return t.game.getManhattanDistance()+t.cost});return _.remove(t.frontierList,e),e;default:throw new Error("Unsupported search type")}}var game=new Game;Board.draw(game.state);var boardDiv=document.getElementById("board"),controlsDiv=document.getElementById("controls"),randomizeButton=document.getElementById("randomize"),customInputButton=document.getElementById("customInput"),searchTypeSelectbox=document.getElementById("searchType"),iterationLimitInput=document.getElementById("iterationLimit"),depthLimitInput=document.getElementById("depthLimit"),searchButton=document.getElementById("search"),searchStopButton=document.getElementById("searchStop"),searchStepButton=document.getElementById("searchStep"),expandedNodeCheckbox=document.getElementById("expandedNodeCheck"),searchResultDiv=document.getElementById("searchResult"),visualizationCheckbox=document.getElementById("visualizationCheck"),searchStepOptions=null;function searchCallback(t,e){var i=_.size(e.expandedNodes);if(searchResultDiv.innerHTML=(t||"Solved! Depth: "+e.node.depth)+" <br/>Iteration: "+e.iteration+"<br/><br/>Expanded nodes: "+i+" / "+e.maxExpandedNodesLength+"<br/>Frontier nodes: "+e.frontierList.length+" / "+e.maxFrontierListLength+(t?"":'<br/><br/><button id="replayButton" onclick="replayWinnerNode()">Replay solution</button>'),window.winnerNode=t?null:e.node,searchButton.style.display="block",searchStopButton.style.display="none",Board.draw(e.node.state),visualizationCheckbox.checked){var n=Visualization.importData(e.expandedNodes,e.frontierList,t?null:e.node);Visualization.draw(n)}}function stepCallback(t){searchStepOptions=t,Board.draw(t.node.state);var e=_.size(t.expandedNodes);if(searchResultDiv.innerHTML="Stepped <br/>Iteration: "+t.iteration+"<br/><br/>Expanded nodes: "+e+" / "+t.maxExpandedNodesLength+"<br/>Frontier nodes: "+t.frontierList.length+" / "+t.maxFrontierListLength,visualizationCheckbox.checked)var i=Visualization.importData(t.expandedNodes,t.frontierList,t.node,"#ffb366");Visualization.draw(i)}function replayWinnerNode(){if(!window.winnerNode)return alert("Winner node could not found");if(window.isReplaying)return Board.clearReplay();Board.draw(game.state),setTimeout(function(){boardDiv.classList.add("animation")},5);var e=[],i=function(t){e.unshift(t.state),t.parent&&i(t.parent)};i(window.winnerNode),Board.replay(e)}bodyScrollLock.disableBodyScroll(controlsDiv),randomizeButton.addEventListener("click",function(){Board.clearReplay(),game.randomize(),Board.draw(game.state),searchResultDiv.innerHTML=""},!1),customInputButton.addEventListener("click",function(){Board.clearReplay(),game.state=prompt('Enter game state, from top-left to right-bottom, 10 characters, e.g. "012345678"'),Board.draw(game.state),searchResultDiv.innerHTML=""},!1),searchButton.addEventListener("click",function(){Board.clearReplay(),searchStepOptions=null;var t=new Node({state:game.state}),e=parseInt(iterationLimitInput.value,10),i=parseInt(depthLimitInput.value,10);return isNaN(e)?alert("Invalid iteration limit"):isNaN(i)?alert("Invalid depth limit"):(searchResultDiv.innerHTML="",searchButton.style.display="none",searchStopButton.style.display="block",void search({node:t,iterationLimit:e,depthLimit:i,expandCheckOptimization:expandedNodeCheckbox.checked,type:searchTypeSelectbox.value,callback:searchCallback}))},!1),searchStepButton.addEventListener("click",function(){if(Board.clearReplay(),searchStepOptions)return search(searchStepOptions);var t=new Node({state:game.state}),e=parseInt(iterationLimitInput.value,10),i=parseInt(depthLimitInput.value,10);return isNaN(e)?alert("Invalid iteration limit"):isNaN(i)?alert("Invalid depth limit"):void search({node:t,iterationLimit:e,depthLimit:i,expandCheckOptimization:expandedNodeCheckbox.checked,type:searchTypeSelectbox.value,stepCallback:stepCallback,callback:searchCallback})},!1),searchStopButton.addEventListener("click",function(){Board.clearReplay(),searchResultDiv.innerHTML="",searchButton.style.display="block",searchStopButton.style.display="none",window.searchStopped=!0,setTimeout(function(){window.searchStopped=!1},5),searchStepOptions=null,Board.draw(game.state)},!1);var olay=window.olay={epoch:Date.now(),bufferedEvents:[],addEvent:function(t,e){e=e||{};var i=Date.now()-olay.epoch;olay.bufferedEvents.push({localTime:i,type:t,metadata:e})}};!function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://deniz.co/olay/client-web.js?project=8-puzzle-solver";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}();</script>
</body>
</html>