diff --git a/.eslintignore b/.eslintignore index 5afc2441..19f61244 100644 --- a/.eslintignore +++ b/.eslintignore @@ -27,4 +27,6 @@ test/files /public/src/modules/ace-editor.js /public/src/client/account/header.js /public/src/client/test.js -themes/ \ No newline at end of file +themes/ + +report/ diff --git a/.github/workflows/plato.yaml b/.github/workflows/plato.yaml new file mode 100644 index 00000000..33a9b547 --- /dev/null +++ b/.github/workflows/plato.yaml @@ -0,0 +1,83 @@ +name: Plato + +on: + pull_request: + branches: + - main + +defaults: + run: + shell: bash + +permissions: + contents: read + +jobs: + plato1: + permissions: + checks: write + contents: read + name: Plato + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + node: [16] + runs-on: ${{ matrix.os }} + env: + TEST_ENV: ${{ matrix.test_env || 'production' }} + + services: + mongo: + image: "mongo:3.7" + ports: + # Maps port 27017 on service container to the host + - 27017:27017 + + steps: + - uses: actions/checkout@v3 + + - run: cp install/package.json package.json + + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + + - name: NPM Install + uses: bahmutov/npm-install@v1 + with: + useLockFile: false + + - name: Setup on MongoDB + env: + SETUP: >- + { + "url": "http://127.0.0.1:4567", + "secret": "abcdef", + "admin:username": "admin", + "admin:email": "test@example.org", + "admin:password": "hAN3Eg8W", + "admin:password:confirm": "hAN3Eg8W", + + "database": "mongo", + "mongo:host": "127.0.0.1", + "mongo:port": 27017, + "mongo:username": "", + "mongo:password": "", + "mongo:database": "nodebb" + } + CI: >- + { + "host": "127.0.0.1", + "port": 27017, + "database": "ci_test" + } + run: | + node app --setup="${SETUP}" --ci="${CI}" + + - name: Install Plato + run: npm install -g plato + + - name: Run Plato Tool + run: plato -r -d report public/src/client/topic/postTools.js diff --git a/create_config.sh b/create_config.sh old mode 100755 new mode 100644 index bd9e520f..259acf67 --- a/create_config.sh +++ b/create_config.sh @@ -38,4 +38,3 @@ json_data=$(jq --arg password "$REDIS_PASSWORD" '.redis.password = $password' << echo "$json_data" > "/usr/src/app/config.json" cat /usr/src/app/config.json - diff --git a/report/assets/css/morris.css b/report/assets/css/morris.css new file mode 100644 index 00000000..bc687242 --- /dev/null +++ b/report/assets/css/morris.css @@ -0,0 +1,2 @@ +.morris-hover{position:absolute;z-index:1000;}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255, 255, 255, 0.8);border:solid 2px rgba(230, 230, 230, 0.8);font-family:sans-serif;font-size:12px;text-align:center;}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0;} +.morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0;} diff --git a/report/assets/css/plato-display.css b/report/assets/css/plato-display.css new file mode 100644 index 00000000..92f9cb5c --- /dev/null +++ b/report/assets/css/plato-display.css @@ -0,0 +1,88 @@ + +body { + background: #222222; + margin: 20px; +} + +.reportBlock { + background: #34495e; + color: #ecf0f1; + height: 300px; + position: relative; +} + +.chart { + width: 100%; + height: 300px; + position: absolute; + top: 0; left: 0; + z-index: 0; +} + +.reportContent { + z-index: 10; + position: absolute; + top: 0; left: 0; + width: 100%; +} + +h2.reportTitle { + position: absolute; + top: 0; + left: 0; + color: #7F8181; + font-size: 14px; + font-weight: 200; + padding: 10px; + margin: 0; + text-transform: uppercase; + letter-spacing: 1px; +} + +.reportBlock.lineCount { background-color: #272727; } +.reportBlock.maintainability { background-color: #272727; } +.reportBlock.maintainabilityList, +.reportBlock.locList, +.reportBlock.lintList { + background-color: #2A2A2A; + margin-top: 15px; + padding: 20px 5px; +} + +.reportBlock .chart-label { + display: block; + padding-top: 100px; + text-align: center; + color: #7F8181; + font-size: 14px; + font-weight: 200; + text-transform: uppercase; + letter-spacing: 1px; +} + +.reportBlock strong { + display: block; + font-size: 90%; +} + +.reportBlock li { + border-bottom: 1px solid #323232; +} + +.reportBlock h1 { + margin: 0; + font-size: 60px; + text-align: center; +} + +.reportBlock ul { + margin: 15px !important; +} +.reportBlock h3 { + margin: 5px 15px 0; +} + +.reportBlock li { + line-height: 22px; + font-size: 16px; +} diff --git a/report/assets/css/plato-file.css b/report/assets/css/plato-file.css new file mode 100644 index 00000000..2deb00fa --- /dev/null +++ b/report/assets/css/plato-file.css @@ -0,0 +1,88 @@ +.historical .chart { + height: 200px; +} + +.CodeMirror { + height: auto; +} + +.CodeMirror-scroll { + overflow-x: hidden; + overflow-y: hidden; +} +.CodeMirror-lines { + cursor:default; +} + +.plato-mark { + background-color:rgb(212, 250, 236); + border: 1px dashed red; + border-width:1px 0 1px 0; + cursor:pointer; +} + +.plato-mark.focus { + background-color: rgb(235, 250, 166); +} +.plato-mark.active { + background-color: rgb(158, 180, 255); +} + +.plato-mark-start { + border-left-width:1px; + padding-left:1px; +} +.plato-mark-end { + border-right-width:1px; + padding-right:1px; +} +.plato-gutter { +} + +.plato-gutter-icon { + font-size:16px; + cursor:pointer; + color: #800000; + text-align:center; +} + +.plato-gutter-jshint, .plato-gutter-complexity { + width:14px; +} + +.charts { + margin-top:1em; +} + +.charts .header { + font-weight:normal; + text-align:center; +} + +.chart-header { + font-weight:normal; + text-align:center; +} + +.CodeMirror pre { + z-index:4; +} + +.CodeMirror-linewidget { + background-color: hsl(240, 20%, 96%); + font-size:12px; + box-shadow:inset 10px 10px 10px -12px hsl(240, 20%, 17%); + margin-top:10px; + padding-top:5px; + padding-left:5px; + padding-bottom:2px; +} + +.CodeMirror-linewidget ~ .CodeMirror-linewidget{ + box-shadow:inset 10px 0px 10px -12px hsl(240, 20%, 17%); + margin-top:0px; + padding-top:0px; +} + +.plato-line-widget { +} \ No newline at end of file diff --git a/report/assets/css/plato-overview.css b/report/assets/css/plato-overview.css new file mode 100644 index 00000000..c21277e8 --- /dev/null +++ b/report/assets/css/plato-overview.css @@ -0,0 +1,117 @@ +.chart { + margin: 0 auto; + height: 200px; +} + +.overview .chart { + height: 250px; +} + +.historical .chart { + height:200px; +} + +.chart rect { + cursor:pointer; +} + +.file-list li { + border-bottom:1px solid #ccc; + padding-bottom:10px; + padding-top:10px; +} + +.file-list li:nth-child(odd) { + background-color: hsl(0, 0%, 98%); +} + +.fade-left { + background: -moz-linear-gradient(left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(left, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(left, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* IE10+ */ + background: linear-gradient(to right, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=1 ); /* IE6-9 */ +} + +.file-list li:nth-child(odd) .fade-left { + background: -moz-linear-gradient(left, rgba(249,249,249,1) 0%, rgba(255,255,255,0) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(249,249,249,1)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, rgba(249,249,249,1) 0%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(left, rgba(249,249,249,1) 0%,rgba(255,255,255,0) 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(left, rgba(249,249,249,1) 0%,rgba(255,255,255,0) 100%); /* IE10+ */ + background: linear-gradient(to right, rgba(249,249,249,1) 0%,rgba(255,255,255,0) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f9f9f9', endColorstr='#00ffffff',GradientType=1 ); /* IE6-9 */ +} + +.fadeout { + position: absolute; + height: 50px; + z-index: 10; + float: left; + width:70px +} + +.file { + white-space: nowrap; +} + + +.file-link { + text-align: right; + direction: rtl; + overflow: hidden; + height:40px; + font-size:20px; + color: #334B6D; + display:block; + padding:12px 12px 12px 0; + text-decoration: underline; +} + +.file-link:hover { + color: #3B71B1; +} + +.file-chart label { + width: 75px; + text-align: right; + margin-right: 10px; +} + +.file-chart .chart-value { + margin-left: 3px; + font-size:11px; +} + +.horizontal-bar { + display:inline-block; + height:8px; + border-radius: 0 4px 4px 0; +} + +.threshold-0 .horizontal-bar { + background-color: #01939A; +} +.threshold-1 .horizontal-bar { + background-color: #FFAB00; +} +.threshold-2 .horizontal-bar { + background-color: #FF0700; +} + + +@media (max-width: 767px) { + .file-link { + text-align: center; + } +} + +.complexity, .sloc, .bugs, .lint { + font-weight: normal; +} + +.on { /* marking 'sorting buttons' active */ + font-weight: bold; +} diff --git a/report/assets/css/plato.css b/report/assets/css/plato.css new file mode 100644 index 00000000..625aebc9 --- /dev/null +++ b/report/assets/css/plato.css @@ -0,0 +1,69 @@ + +body { +} + +.navbar { + margin-bottom:0; + padding: 0 20px; + background-color: #f2f2f2; + background-image: none; + border: 1px solid #d4d4d4; + border-radius: 4px; + -webkit-box-shadow: none; + box-shadow: none; + line-height:10px; +} + +.navbar-nav > .active > a { + background-color: rgb(233, 233, 233); +} + +a:visited { + fill:inherit; +} + +.jumbotron { + color:#333; +} + +li { + line-height: 10px; +} + +/* Landscape phone to portrait tablet */ +@media (max-width: 767px) { + .jumbotron h1 { + font-size: 40px; + } +} + +.aggregate-stats { + +} + +.group-header { + text-align:center; +} + + +.aggregate-stats .header { + text-align: center; + color: #5a5a5a; + font-weight:lighter; +} + +.aggregate-stats .stat { + text-align: center; + color: #5a5a5a; + font-size:55px; + line-height:70px; +} + +i.icon[rel=popover] { + font-size:23px; + color: #0088cc; +} + +.popover { + z-index:100000; +} \ No newline at end of file diff --git a/report/assets/css/vendor/bootstrap.css b/report/assets/css/vendor/bootstrap.css new file mode 100755 index 00000000..97fb4747 --- /dev/null +++ b/report/assets/css/vendor/bootstrap.css @@ -0,0 +1,6805 @@ +/*! + * Bootstrap v3.0.0 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + */ + +/*! normalize.css v2.1.0 | MIT License | git.io/normalize */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +audio, +canvas, +video { + display: inline-block; +} + +audio:not([controls]) { + display: none; + height: 0; +} + +[hidden] { + display: none; +} + +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +body { + margin: 0; +} + +a:focus { + outline: thin dotted; +} + +a:active, +a:hover { + outline: 0; +} + +h1 { + margin: 0.67em 0; + font-size: 2em; +} + +abbr[title] { + border-bottom: 1px dotted; +} + +b, +strong { + font-weight: bold; +} + +dfn { + font-style: italic; +} + +hr { + height: 0; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +mark { + color: #000; + background: #ff0; +} + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} + +pre { + white-space: pre-wrap; +} + +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} + +small { + font-size: 80%; +} + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +img { + border: 0; +} + +svg:not(:root) { + overflow: hidden; +} + +figure { + margin: 0; +} + +fieldset { + padding: 0.35em 0.625em 0.75em; + margin: 0 2px; + border: 1px solid #c0c0c0; +} + +legend { + padding: 0; + border: 0; +} + +button, +input, +select, +textarea { + margin: 0; + font-family: inherit; + font-size: 100%; +} + +button, +input { + line-height: normal; +} + +button, +select { + text-transform: none; +} + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} + +button[disabled], +html input[disabled] { + cursor: default; +} + +input[type="checkbox"], +input[type="radio"] { + padding: 0; + box-sizing: border-box; +} + +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} + +textarea { + overflow: auto; + vertical-align: top; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +@media print { + * { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + @page { + margin: 2cm .5cm; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } + .navbar { + display: none; + } + .table td, + .table th { + background-color: #fff !important; + } + .btn > .caret, + .dropup > .btn > .caret { + border-top-color: #000 !important; + } + .label { + border: 1px solid #000; + } + .table { + border-collapse: collapse !important; + } + .table-bordered th, + .table-bordered td { + border: 1px solid #ddd !important; + } +} + +*, +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +html { + font-size: 62.5%; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.428571429; + color: #333333; + background-color: #ffffff; +} + +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +button, +input, +select[multiple], +textarea { + background-image: none; +} + +a { + color: #428bca; + text-decoration: none; +} + +a:hover, +a:focus { + color: #2a6496; + text-decoration: underline; +} + +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +img { + vertical-align: middle; +} + +.img-responsive { + display: block; + height: auto; + max-width: 100%; +} + +.img-rounded { + border-radius: 6px; +} + +.img-thumbnail { + display: inline-block; + height: auto; + max-width: 100%; + padding: 4px; + line-height: 1.428571429; + background-color: #ffffff; + border: 1px solid #dddddd; + border-radius: 4px; + -webkit-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + +.img-circle { + border-radius: 50%; +} + +hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #eeeeee; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0 0 0 0); + border: 0; +} + +p { + margin: 0 0 10px; +} + +.lead { + margin-bottom: 20px; + font-size: 16.099999999999998px; + font-weight: 200; + line-height: 1.4; +} + +@media (min-width: 768px) { + .lead { + font-size: 21px; + } +} + +small { + font-size: 85%; +} + +cite { + font-style: normal; +} + +.text-muted { + color: #999999; +} + +.text-primary { + color: #428bca; +} + +.text-warning { + color: #c09853; +} + +.text-danger { + color: #b94a48; +} + +.text-success { + color: #468847; +} + +.text-info { + color: #3a87ad; +} + +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.text-center { + text-align: center; +} + +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6 { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: 500; + line-height: 1.1; +} + +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small, +.h1 small, +.h2 small, +.h3 small, +.h4 small, +.h5 small, +.h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} + +h1, +h2, +h3 { + margin-top: 20px; + margin-bottom: 10px; +} + +h4, +h5, +h6 { + margin-top: 10px; + margin-bottom: 10px; +} + +h1, +.h1 { + font-size: 36px; +} + +h2, +.h2 { + font-size: 30px; +} + +h3, +.h3 { + font-size: 24px; +} + +h4, +.h4 { + font-size: 18px; +} + +h5, +.h5 { + font-size: 14px; +} + +h6, +.h6 { + font-size: 12px; +} + +h1 small, +.h1 small { + font-size: 24px; +} + +h2 small, +.h2 small { + font-size: 18px; +} + +h3 small, +.h3 small, +h4 small, +.h4 small { + font-size: 14px; +} + +.page-header { + padding-bottom: 9px; + margin: 40px 0 20px; + border-bottom: 1px solid #eeeeee; +} + +ul, +ol { + margin-top: 0; + margin-bottom: 10px; +} + +ul ul, +ol ul, +ul ol, +ol ol { + margin-bottom: 0; +} + +.list-unstyled { + padding-left: 0; + list-style: none; +} + +.list-inline { + padding-left: 0; + list-style: none; +} + +.list-inline > li { + display: inline-block; + padding-right: 5px; + padding-left: 5px; +} + +dl { + margin-bottom: 20px; +} + +dt, +dd { + line-height: 1.428571429; +} + +dt { + font-weight: bold; +} + +dd { + margin-left: 0; +} + +@media (min-width: 768px) { + .dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; + } + .dl-horizontal dd { + margin-left: 180px; + } + .dl-horizontal dd:before, + .dl-horizontal dd:after { + display: table; + content: " "; + } + .dl-horizontal dd:after { + clear: both; + } + .dl-horizontal dd:before, + .dl-horizontal dd:after { + display: table; + content: " "; + } + .dl-horizontal dd:after { + clear: both; + } +} + +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999999; +} + +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} + +blockquote { + padding: 10px 20px; + margin: 0 0 20px; + border-left: 5px solid #eeeeee; +} + +blockquote p { + font-size: 17.5px; + font-weight: 300; + line-height: 1.25; +} + +blockquote p:last-child { + margin-bottom: 0; +} + +blockquote small { + display: block; + line-height: 1.428571429; + color: #999999; +} + +blockquote small:before { + content: '\2014 \00A0'; +} + +blockquote.pull-right { + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; +} + +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} + +blockquote.pull-right small:before { + content: ''; +} + +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} + +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} + +address { + display: block; + margin-bottom: 20px; + font-style: normal; + line-height: 1.428571429; +} + +code, +pre { + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; +} + +code { + padding: 2px 4px; + font-size: 90%; + color: #c7254e; + white-space: nowrap; + background-color: #f9f2f4; + border-radius: 4px; +} + +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 1.428571429; + color: #333333; + word-break: break-all; + word-wrap: break-word; + background-color: #f5f5f5; + border: 1px solid #cccccc; + border-radius: 4px; +} + +pre.prettyprint { + margin-bottom: 20px; +} + +pre code { + padding: 0; + font-size: inherit; + color: inherit; + white-space: pre-wrap; + background-color: transparent; + border: 0; +} + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} + +.container { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} + +.container:before, +.container:after { + display: table; + content: " "; +} + +.container:after { + clear: both; +} + +.container:before, +.container:after { + display: table; + content: " "; +} + +.container:after { + clear: both; +} + +.row { + margin-right: -15px; + margin-left: -15px; +} + +.row:before, +.row:after { + display: table; + content: " "; +} + +.row:after { + clear: both; +} + +.row:before, +.row:after { + display: table; + content: " "; +} + +.row:after { + clear: both; +} + +.col-xs-1, +.col-xs-2, +.col-xs-3, +.col-xs-4, +.col-xs-5, +.col-xs-6, +.col-xs-7, +.col-xs-8, +.col-xs-9, +.col-xs-10, +.col-xs-11, +.col-xs-12, +.col-sm-1, +.col-sm-2, +.col-sm-3, +.col-sm-4, +.col-sm-5, +.col-sm-6, +.col-sm-7, +.col-sm-8, +.col-sm-9, +.col-sm-10, +.col-sm-11, +.col-sm-12, +.col-md-1, +.col-md-2, +.col-md-3, +.col-md-4, +.col-md-5, +.col-md-6, +.col-md-7, +.col-md-8, +.col-md-9, +.col-md-10, +.col-md-11, +.col-md-12, +.col-lg-1, +.col-lg-2, +.col-lg-3, +.col-lg-4, +.col-lg-5, +.col-lg-6, +.col-lg-7, +.col-lg-8, +.col-lg-9, +.col-lg-10, +.col-lg-11, +.col-lg-12 { + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; +} + +.col-xs-1, +.col-xs-2, +.col-xs-3, +.col-xs-4, +.col-xs-5, +.col-xs-6, +.col-xs-7, +.col-xs-8, +.col-xs-9, +.col-xs-10, +.col-xs-11 { + float: left; +} + +.col-xs-1 { + width: 8.333333333333332%; +} + +.col-xs-2 { + width: 16.666666666666664%; +} + +.col-xs-3 { + width: 25%; +} + +.col-xs-4 { + width: 33.33333333333333%; +} + +.col-xs-5 { + width: 41.66666666666667%; +} + +.col-xs-6 { + width: 50%; +} + +.col-xs-7 { + width: 58.333333333333336%; +} + +.col-xs-8 { + width: 66.66666666666666%; +} + +.col-xs-9 { + width: 75%; +} + +.col-xs-10 { + width: 83.33333333333334%; +} + +.col-xs-11 { + width: 91.66666666666666%; +} + +.col-xs-12 { + width: 100%; +} + +@media (min-width: 768px) { + .container { + max-width: 750px; + } + .col-sm-1, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9, + .col-sm-10, + .col-sm-11 { + float: left; + } + .col-sm-1 { + width: 8.333333333333332%; + } + .col-sm-2 { + width: 16.666666666666664%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-4 { + width: 33.33333333333333%; + } + .col-sm-5 { + width: 41.66666666666667%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-7 { + width: 58.333333333333336%; + } + .col-sm-8 { + width: 66.66666666666666%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-10 { + width: 83.33333333333334%; + } + .col-sm-11 { + width: 91.66666666666666%; + } + .col-sm-12 { + width: 100%; + } + .col-sm-push-1 { + left: 8.333333333333332%; + } + .col-sm-push-2 { + left: 16.666666666666664%; + } + .col-sm-push-3 { + left: 25%; + } + .col-sm-push-4 { + left: 33.33333333333333%; + } + .col-sm-push-5 { + left: 41.66666666666667%; + } + .col-sm-push-6 { + left: 50%; + } + .col-sm-push-7 { + left: 58.333333333333336%; + } + .col-sm-push-8 { + left: 66.66666666666666%; + } + .col-sm-push-9 { + left: 75%; + } + .col-sm-push-10 { + left: 83.33333333333334%; + } + .col-sm-push-11 { + left: 91.66666666666666%; + } + .col-sm-pull-1 { + right: 8.333333333333332%; + } + .col-sm-pull-2 { + right: 16.666666666666664%; + } + .col-sm-pull-3 { + right: 25%; + } + .col-sm-pull-4 { + right: 33.33333333333333%; + } + .col-sm-pull-5 { + right: 41.66666666666667%; + } + .col-sm-pull-6 { + right: 50%; + } + .col-sm-pull-7 { + right: 58.333333333333336%; + } + .col-sm-pull-8 { + right: 66.66666666666666%; + } + .col-sm-pull-9 { + right: 75%; + } + .col-sm-pull-10 { + right: 83.33333333333334%; + } + .col-sm-pull-11 { + right: 91.66666666666666%; + } + .col-sm-offset-1 { + margin-left: 8.333333333333332%; + } + .col-sm-offset-2 { + margin-left: 16.666666666666664%; + } + .col-sm-offset-3 { + margin-left: 25%; + } + .col-sm-offset-4 { + margin-left: 33.33333333333333%; + } + .col-sm-offset-5 { + margin-left: 41.66666666666667%; + } + .col-sm-offset-6 { + margin-left: 50%; + } + .col-sm-offset-7 { + margin-left: 58.333333333333336%; + } + .col-sm-offset-8 { + margin-left: 66.66666666666666%; + } + .col-sm-offset-9 { + margin-left: 75%; + } + .col-sm-offset-10 { + margin-left: 83.33333333333334%; + } + .col-sm-offset-11 { + margin-left: 91.66666666666666%; + } +} + +@media (min-width: 992px) { + .container { + max-width: 970px; + } + .col-md-1, + .col-md-2, + .col-md-3, + .col-md-4, + .col-md-5, + .col-md-6, + .col-md-7, + .col-md-8, + .col-md-9, + .col-md-10, + .col-md-11 { + float: left; + } + .col-md-1 { + width: 8.333333333333332%; + } + .col-md-2 { + width: 16.666666666666664%; + } + .col-md-3 { + width: 25%; + } + .col-md-4 { + width: 33.33333333333333%; + } + .col-md-5 { + width: 41.66666666666667%; + } + .col-md-6 { + width: 50%; + } + .col-md-7 { + width: 58.333333333333336%; + } + .col-md-8 { + width: 66.66666666666666%; + } + .col-md-9 { + width: 75%; + } + .col-md-10 { + width: 83.33333333333334%; + } + .col-md-11 { + width: 91.66666666666666%; + } + .col-md-12 { + width: 100%; + } + .col-md-push-0 { + left: auto; + } + .col-md-push-1 { + left: 8.333333333333332%; + } + .col-md-push-2 { + left: 16.666666666666664%; + } + .col-md-push-3 { + left: 25%; + } + .col-md-push-4 { + left: 33.33333333333333%; + } + .col-md-push-5 { + left: 41.66666666666667%; + } + .col-md-push-6 { + left: 50%; + } + .col-md-push-7 { + left: 58.333333333333336%; + } + .col-md-push-8 { + left: 66.66666666666666%; + } + .col-md-push-9 { + left: 75%; + } + .col-md-push-10 { + left: 83.33333333333334%; + } + .col-md-push-11 { + left: 91.66666666666666%; + } + .col-md-pull-0 { + right: auto; + } + .col-md-pull-1 { + right: 8.333333333333332%; + } + .col-md-pull-2 { + right: 16.666666666666664%; + } + .col-md-pull-3 { + right: 25%; + } + .col-md-pull-4 { + right: 33.33333333333333%; + } + .col-md-pull-5 { + right: 41.66666666666667%; + } + .col-md-pull-6 { + right: 50%; + } + .col-md-pull-7 { + right: 58.333333333333336%; + } + .col-md-pull-8 { + right: 66.66666666666666%; + } + .col-md-pull-9 { + right: 75%; + } + .col-md-pull-10 { + right: 83.33333333333334%; + } + .col-md-pull-11 { + right: 91.66666666666666%; + } + .col-md-offset-0 { + margin-left: 0; + } + .col-md-offset-1 { + margin-left: 8.333333333333332%; + } + .col-md-offset-2 { + margin-left: 16.666666666666664%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-offset-4 { + margin-left: 33.33333333333333%; + } + .col-md-offset-5 { + margin-left: 41.66666666666667%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-offset-7 { + margin-left: 58.333333333333336%; + } + .col-md-offset-8 { + margin-left: 66.66666666666666%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-offset-10 { + margin-left: 83.33333333333334%; + } + .col-md-offset-11 { + margin-left: 91.66666666666666%; + } +} + +@media (min-width: 1200px) { + .container { + max-width: 1170px; + } + .col-lg-1, + .col-lg-2, + .col-lg-3, + .col-lg-4, + .col-lg-5, + .col-lg-6, + .col-lg-7, + .col-lg-8, + .col-lg-9, + .col-lg-10, + .col-lg-11 { + float: left; + } + .col-lg-1 { + width: 8.333333333333332%; + } + .col-lg-2 { + width: 16.666666666666664%; + } + .col-lg-3 { + width: 25%; + } + .col-lg-4 { + width: 33.33333333333333%; + } + .col-lg-5 { + width: 41.66666666666667%; + } + .col-lg-6 { + width: 50%; + } + .col-lg-7 { + width: 58.333333333333336%; + } + .col-lg-8 { + width: 66.66666666666666%; + } + .col-lg-9 { + width: 75%; + } + .col-lg-10 { + width: 83.33333333333334%; + } + .col-lg-11 { + width: 91.66666666666666%; + } + .col-lg-12 { + width: 100%; + } + .col-lg-push-0 { + left: auto; + } + .col-lg-push-1 { + left: 8.333333333333332%; + } + .col-lg-push-2 { + left: 16.666666666666664%; + } + .col-lg-push-3 { + left: 25%; + } + .col-lg-push-4 { + left: 33.33333333333333%; + } + .col-lg-push-5 { + left: 41.66666666666667%; + } + .col-lg-push-6 { + left: 50%; + } + .col-lg-push-7 { + left: 58.333333333333336%; + } + .col-lg-push-8 { + left: 66.66666666666666%; + } + .col-lg-push-9 { + left: 75%; + } + .col-lg-push-10 { + left: 83.33333333333334%; + } + .col-lg-push-11 { + left: 91.66666666666666%; + } + .col-lg-pull-0 { + right: auto; + } + .col-lg-pull-1 { + right: 8.333333333333332%; + } + .col-lg-pull-2 { + right: 16.666666666666664%; + } + .col-lg-pull-3 { + right: 25%; + } + .col-lg-pull-4 { + right: 33.33333333333333%; + } + .col-lg-pull-5 { + right: 41.66666666666667%; + } + .col-lg-pull-6 { + right: 50%; + } + .col-lg-pull-7 { + right: 58.333333333333336%; + } + .col-lg-pull-8 { + right: 66.66666666666666%; + } + .col-lg-pull-9 { + right: 75%; + } + .col-lg-pull-10 { + right: 83.33333333333334%; + } + .col-lg-pull-11 { + right: 91.66666666666666%; + } + .col-lg-offset-0 { + margin-left: 0; + } + .col-lg-offset-1 { + margin-left: 8.333333333333332%; + } + .col-lg-offset-2 { + margin-left: 16.666666666666664%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-offset-4 { + margin-left: 33.33333333333333%; + } + .col-lg-offset-5 { + margin-left: 41.66666666666667%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-offset-7 { + margin-left: 58.333333333333336%; + } + .col-lg-offset-8 { + margin-left: 66.66666666666666%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-offset-10 { + margin-left: 83.33333333333334%; + } + .col-lg-offset-11 { + margin-left: 91.66666666666666%; + } +} + +table { + max-width: 100%; + background-color: transparent; +} + +th { + text-align: left; +} + +.table { + width: 100%; + margin-bottom: 20px; +} + +.table thead > tr > th, +.table tbody > tr > th, +.table tfoot > tr > th, +.table thead > tr > td, +.table tbody > tr > td, +.table tfoot > tr > td { + padding: 8px; + line-height: 1.428571429; + vertical-align: top; + border-top: 1px solid #dddddd; +} + +.table thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #dddddd; +} + +.table caption + thead tr:first-child th, +.table colgroup + thead tr:first-child th, +.table thead:first-child tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child td { + border-top: 0; +} + +.table tbody + tbody { + border-top: 2px solid #dddddd; +} + +.table .table { + background-color: #ffffff; +} + +.table-condensed thead > tr > th, +.table-condensed tbody > tr > th, +.table-condensed tfoot > tr > th, +.table-condensed thead > tr > td, +.table-condensed tbody > tr > td, +.table-condensed tfoot > tr > td { + padding: 5px; +} + +.table-bordered { + border: 1px solid #dddddd; +} + +.table-bordered > thead > tr > th, +.table-bordered > tbody > tr > th, +.table-bordered > tfoot > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > td { + border: 1px solid #dddddd; +} + +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td { + border-bottom-width: 2px; +} + +.table-striped > tbody > tr:nth-child(odd) > td, +.table-striped > tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} + +.table-hover > tbody > tr:hover > td, +.table-hover > tbody > tr:hover > th { + background-color: #f5f5f5; +} + +table col[class*="col-"] { + display: table-column; + float: none; +} + +table td[class*="col-"], +table th[class*="col-"] { + display: table-cell; + float: none; +} + +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; +} + +.table > thead > tr > td.success, +.table > tbody > tr > td.success, +.table > tfoot > tr > td.success, +.table > thead > tr > th.success, +.table > tbody > tr > th.success, +.table > tfoot > tr > th.success, +.table > thead > tr.success > td, +.table > tbody > tr.success > td, +.table > tfoot > tr.success > td, +.table > thead > tr.success > th, +.table > tbody > tr.success > th, +.table > tfoot > tr.success > th { + background-color: #dff0d8; + border-color: #d6e9c6; +} + +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, +.table-hover > tbody > tr.success:hover > td { + background-color: #d0e9c6; + border-color: #c9e2b3; +} + +.table > thead > tr > td.danger, +.table > tbody > tr > td.danger, +.table > tfoot > tr > td.danger, +.table > thead > tr > th.danger, +.table > tbody > tr > th.danger, +.table > tfoot > tr > th.danger, +.table > thead > tr.danger > td, +.table > tbody > tr.danger > td, +.table > tfoot > tr.danger > td, +.table > thead > tr.danger > th, +.table > tbody > tr.danger > th, +.table > tfoot > tr.danger > th { + background-color: #f2dede; + border-color: #eed3d7; +} + +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, +.table-hover > tbody > tr.danger:hover > td { + background-color: #ebcccc; + border-color: #e6c1c7; +} + +.table > thead > tr > td.warning, +.table > tbody > tr > td.warning, +.table > tfoot > tr > td.warning, +.table > thead > tr > th.warning, +.table > tbody > tr > th.warning, +.table > tfoot > tr > th.warning, +.table > thead > tr.warning > td, +.table > tbody > tr.warning > td, +.table > tfoot > tr.warning > td, +.table > thead > tr.warning > th, +.table > tbody > tr.warning > th, +.table > tfoot > tr.warning > th { + background-color: #fcf8e3; + border-color: #fbeed5; +} + +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, +.table-hover > tbody > tr.warning:hover > td { + background-color: #faf2cc; + border-color: #f8e5be; +} + +@media (max-width: 768px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-x: scroll; + overflow-y: hidden; + border: 1px solid #dddddd; + } + .table-responsive > .table { + margin-bottom: 0; + background-color: #fff; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > thead > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > thead > tr:last-child > td, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} + +fieldset { + padding: 0; + margin: 0; + border: 0; +} + +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: inherit; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} + +label { + display: inline-block; + margin-bottom: 5px; + font-weight: bold; +} + +input[type="search"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + /* IE8-9 */ + + line-height: normal; +} + +input[type="file"] { + display: block; +} + +select[multiple], +select[size] { + height: auto; +} + +select optgroup { + font-family: inherit; + font-size: inherit; + font-style: inherit; +} + +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +input[type="number"]::-webkit-outer-spin-button, +input[type="number"]::-webkit-inner-spin-button { + height: auto; +} + +.form-control:-moz-placeholder { + color: #999999; +} + +.form-control::-moz-placeholder { + color: #999999; +} + +.form-control:-ms-input-placeholder { + color: #999999; +} + +.form-control::-webkit-input-placeholder { + color: #999999; +} + +.form-control { + display: block; + width: 100%; + height: 34px; + padding: 6px 12px; + font-size: 14px; + line-height: 1.428571429; + color: #555555; + vertical-align: middle; + background-color: #ffffff; + border: 1px solid #cccccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; + transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; +} + +.form-control:focus { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); +} + +.form-control[disabled], +.form-control[readonly], +fieldset[disabled] .form-control { + cursor: not-allowed; + background-color: #eeeeee; +} + +textarea.form-control { + height: auto; +} + +.form-group { + margin-bottom: 15px; +} + +.radio, +.checkbox { + display: block; + min-height: 20px; + padding-left: 20px; + margin-top: 10px; + margin-bottom: 10px; + vertical-align: middle; +} + +.radio label, +.checkbox label { + display: inline; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; +} + +.radio input[type="radio"], +.radio-inline input[type="radio"], +.checkbox input[type="checkbox"], +.checkbox-inline input[type="checkbox"] { + float: left; + margin-left: -20px; +} + +.radio + .radio, +.checkbox + .checkbox { + margin-top: -5px; +} + +.radio-inline, +.checkbox-inline { + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + vertical-align: middle; + cursor: pointer; +} + +.radio-inline + .radio-inline, +.checkbox-inline + .checkbox-inline { + margin-top: 0; + margin-left: 10px; +} + +input[type="radio"][disabled], +input[type="checkbox"][disabled], +.radio[disabled], +.radio-inline[disabled], +.checkbox[disabled], +.checkbox-inline[disabled], +fieldset[disabled] input[type="radio"], +fieldset[disabled] input[type="checkbox"], +fieldset[disabled] .radio, +fieldset[disabled] .radio-inline, +fieldset[disabled] .checkbox, +fieldset[disabled] .checkbox-inline { + cursor: not-allowed; +} + +.input-sm { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} + +select.input-sm { + height: 30px; + line-height: 30px; +} + +textarea.input-sm { + height: auto; +} + +.input-lg { + height: 45px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} + +select.input-lg { + height: 45px; + line-height: 45px; +} + +textarea.input-lg { + height: auto; +} + +.has-warning .help-block, +.has-warning .control-label { + color: #c09853; +} + +.has-warning .form-control { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.has-warning .form-control:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} + +.has-warning .input-group-addon { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} + +.has-error .help-block, +.has-error .control-label { + color: #b94a48; +} + +.has-error .form-control { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.has-error .form-control:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} + +.has-error .input-group-addon { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} + +.has-success .help-block, +.has-success .control-label { + color: #468847; +} + +.has-success .form-control { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.has-success .form-control:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} + +.has-success .input-group-addon { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} + +.form-control-static { + padding-top: 7px; + margin-bottom: 0; +} + +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #737373; +} + +@media (min-width: 768px) { + .form-inline .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .form-control { + display: inline-block; + } + .form-inline .radio, + .form-inline .checkbox { + display: inline-block; + padding-left: 0; + margin-top: 0; + margin-bottom: 0; + } + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { + float: none; + margin-left: 0; + } +} + +.form-horizontal .control-label, +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + padding-top: 7px; + margin-top: 0; + margin-bottom: 0; +} + +.form-horizontal .form-group { + margin-right: -15px; + margin-left: -15px; +} + +.form-horizontal .form-group:before, +.form-horizontal .form-group:after { + display: table; + content: " "; +} + +.form-horizontal .form-group:after { + clear: both; +} + +.form-horizontal .form-group:before, +.form-horizontal .form-group:after { + display: table; + content: " "; +} + +.form-horizontal .form-group:after { + clear: both; +} + +@media (min-width: 768px) { + .form-horizontal .control-label { + text-align: right; + } +} + +.btn { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: normal; + line-height: 1.428571429; + text-align: center; + white-space: nowrap; + vertical-align: middle; + cursor: pointer; + border: 1px solid transparent; + border-radius: 4px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; +} + +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.btn:hover, +.btn:focus { + color: #333333; + text-decoration: none; +} + +.btn:active, +.btn.active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} + +.btn.disabled, +.btn[disabled], +fieldset[disabled] .btn { + pointer-events: none; + cursor: not-allowed; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; +} + +.btn-default { + color: #333333; + background-color: #ffffff; + border-color: #cccccc; +} + +.btn-default:hover, +.btn-default:focus, +.btn-default:active, +.btn-default.active, +.open .dropdown-toggle.btn-default { + color: #333333; + background-color: #ebebeb; + border-color: #adadad; +} + +.btn-default:active, +.btn-default.active, +.open .dropdown-toggle.btn-default { + background-image: none; +} + +.btn-default.disabled, +.btn-default[disabled], +fieldset[disabled] .btn-default, +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled:active, +.btn-default[disabled]:active, +fieldset[disabled] .btn-default:active, +.btn-default.disabled.active, +.btn-default[disabled].active, +fieldset[disabled] .btn-default.active { + background-color: #ffffff; + border-color: #cccccc; +} + +.btn-primary { + color: #ffffff; + background-color: #428bca; + border-color: #357ebd; +} + +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.open .dropdown-toggle.btn-primary { + color: #ffffff; + background-color: #3276b1; + border-color: #285e8e; +} + +.btn-primary:active, +.btn-primary.active, +.open .dropdown-toggle.btn-primary { + background-image: none; +} + +.btn-primary.disabled, +.btn-primary[disabled], +fieldset[disabled] .btn-primary, +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled:active, +.btn-primary[disabled]:active, +fieldset[disabled] .btn-primary:active, +.btn-primary.disabled.active, +.btn-primary[disabled].active, +fieldset[disabled] .btn-primary.active { + background-color: #428bca; + border-color: #357ebd; +} + +.btn-warning { + color: #ffffff; + background-color: #f0ad4e; + border-color: #eea236; +} + +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.open .dropdown-toggle.btn-warning { + color: #ffffff; + background-color: #ed9c28; + border-color: #d58512; +} + +.btn-warning:active, +.btn-warning.active, +.open .dropdown-toggle.btn-warning { + background-image: none; +} + +.btn-warning.disabled, +.btn-warning[disabled], +fieldset[disabled] .btn-warning, +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled:active, +.btn-warning[disabled]:active, +fieldset[disabled] .btn-warning:active, +.btn-warning.disabled.active, +.btn-warning[disabled].active, +fieldset[disabled] .btn-warning.active { + background-color: #f0ad4e; + border-color: #eea236; +} + +.btn-danger { + color: #ffffff; + background-color: #d9534f; + border-color: #d43f3a; +} + +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.open .dropdown-toggle.btn-danger { + color: #ffffff; + background-color: #d2322d; + border-color: #ac2925; +} + +.btn-danger:active, +.btn-danger.active, +.open .dropdown-toggle.btn-danger { + background-image: none; +} + +.btn-danger.disabled, +.btn-danger[disabled], +fieldset[disabled] .btn-danger, +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled:active, +.btn-danger[disabled]:active, +fieldset[disabled] .btn-danger:active, +.btn-danger.disabled.active, +.btn-danger[disabled].active, +fieldset[disabled] .btn-danger.active { + background-color: #d9534f; + border-color: #d43f3a; +} + +.btn-success { + color: #ffffff; + background-color: #5cb85c; + border-color: #4cae4c; +} + +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.open .dropdown-toggle.btn-success { + color: #ffffff; + background-color: #47a447; + border-color: #398439; +} + +.btn-success:active, +.btn-success.active, +.open .dropdown-toggle.btn-success { + background-image: none; +} + +.btn-success.disabled, +.btn-success[disabled], +fieldset[disabled] .btn-success, +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled:active, +.btn-success[disabled]:active, +fieldset[disabled] .btn-success:active, +.btn-success.disabled.active, +.btn-success[disabled].active, +fieldset[disabled] .btn-success.active { + background-color: #5cb85c; + border-color: #4cae4c; +} + +.btn-info { + color: #ffffff; + background-color: #5bc0de; + border-color: #46b8da; +} + +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.open .dropdown-toggle.btn-info { + color: #ffffff; + background-color: #39b3d7; + border-color: #269abc; +} + +.btn-info:active, +.btn-info.active, +.open .dropdown-toggle.btn-info { + background-image: none; +} + +.btn-info.disabled, +.btn-info[disabled], +fieldset[disabled] .btn-info, +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled:active, +.btn-info[disabled]:active, +fieldset[disabled] .btn-info:active, +.btn-info.disabled.active, +.btn-info[disabled].active, +fieldset[disabled] .btn-info.active { + background-color: #5bc0de; + border-color: #46b8da; +} + +.btn-link { + font-weight: normal; + color: #428bca; + cursor: pointer; + border-radius: 0; +} + +.btn-link, +.btn-link:active, +.btn-link[disabled], +fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} + +.btn-link, +.btn-link:hover, +.btn-link:focus, +.btn-link:active { + border-color: transparent; +} + +.btn-link:hover, +.btn-link:focus { + color: #2a6496; + text-decoration: underline; + background-color: transparent; +} + +.btn-link[disabled]:hover, +fieldset[disabled] .btn-link:hover, +.btn-link[disabled]:focus, +fieldset[disabled] .btn-link:focus { + color: #999999; + text-decoration: none; +} + +.btn-lg { + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} + +.btn-sm, +.btn-xs { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} + +.btn-xs { + padding: 1px 5px; +} + +.btn-block { + display: block; + width: 100%; + padding-right: 0; + padding-left: 0; +} + +.btn-block + .btn-block { + margin-top: 5px; +} + +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} + +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} + +.fade.in { + opacity: 1; +} + +.collapse { + display: none; +} + +.collapse.in { + display: block; +} + +.collapsing { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + transition: height 0.35s ease; +} + +@font-face { + font-family: 'Glyphicons Halflings'; + src: url('../../../../../../../Downloads/bootstrap-3.0.0/dist/fonts/glyphicons-halflings-regular.eot'); + src: url('../../../../../../../Downloads/bootstrap-3.0.0/dist/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../../../../../../../Downloads/bootstrap-3.0.0/dist/fonts/glyphicons-halflings-regular.woff') format('woff'), url('../../../../../../../Downloads/bootstrap-3.0.0/dist/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../../../../../../../Downloads/bootstrap-3.0.0/dist/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg'); +} + +.glyphicon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + -webkit-font-smoothing: antialiased; + font-style: normal; + font-weight: normal; + line-height: 1; +} + +.glyphicon-asterisk:before { + content: "\2a"; +} + +.glyphicon-plus:before { + content: "\2b"; +} + +.glyphicon-euro:before { + content: "\20ac"; +} + +.glyphicon-minus:before { + content: "\2212"; +} + +.glyphicon-cloud:before { + content: "\2601"; +} + +.glyphicon-envelope:before { + content: "\2709"; +} + +.glyphicon-pencil:before { + content: "\270f"; +} + +.glyphicon-glass:before { + content: "\e001"; +} + +.glyphicon-music:before { + content: "\e002"; +} + +.glyphicon-search:before { + content: "\e003"; +} + +.glyphicon-heart:before { + content: "\e005"; +} + +.glyphicon-star:before { + content: "\e006"; +} + +.glyphicon-star-empty:before { + content: "\e007"; +} + +.glyphicon-user:before { + content: "\e008"; +} + +.glyphicon-film:before { + content: "\e009"; +} + +.glyphicon-th-large:before { + content: "\e010"; +} + +.glyphicon-th:before { + content: "\e011"; +} + +.glyphicon-th-list:before { + content: "\e012"; +} + +.glyphicon-ok:before { + content: "\e013"; +} + +.glyphicon-remove:before { + content: "\e014"; +} + +.glyphicon-zoom-in:before { + content: "\e015"; +} + +.glyphicon-zoom-out:before { + content: "\e016"; +} + +.glyphicon-off:before { + content: "\e017"; +} + +.glyphicon-signal:before { + content: "\e018"; +} + +.glyphicon-cog:before { + content: "\e019"; +} + +.glyphicon-trash:before { + content: "\e020"; +} + +.glyphicon-home:before { + content: "\e021"; +} + +.glyphicon-file:before { + content: "\e022"; +} + +.glyphicon-time:before { + content: "\e023"; +} + +.glyphicon-road:before { + content: "\e024"; +} + +.glyphicon-download-alt:before { + content: "\e025"; +} + +.glyphicon-download:before { + content: "\e026"; +} + +.glyphicon-upload:before { + content: "\e027"; +} + +.glyphicon-inbox:before { + content: "\e028"; +} + +.glyphicon-play-circle:before { + content: "\e029"; +} + +.glyphicon-repeat:before { + content: "\e030"; +} + +.glyphicon-refresh:before { + content: "\e031"; +} + +.glyphicon-list-alt:before { + content: "\e032"; +} + +.glyphicon-flag:before { + content: "\e034"; +} + +.glyphicon-headphones:before { + content: "\e035"; +} + +.glyphicon-volume-off:before { + content: "\e036"; +} + +.glyphicon-volume-down:before { + content: "\e037"; +} + +.glyphicon-volume-up:before { + content: "\e038"; +} + +.glyphicon-qrcode:before { + content: "\e039"; +} + +.glyphicon-barcode:before { + content: "\e040"; +} + +.glyphicon-tag:before { + content: "\e041"; +} + +.glyphicon-tags:before { + content: "\e042"; +} + +.glyphicon-book:before { + content: "\e043"; +} + +.glyphicon-print:before { + content: "\e045"; +} + +.glyphicon-font:before { + content: "\e047"; +} + +.glyphicon-bold:before { + content: "\e048"; +} + +.glyphicon-italic:before { + content: "\e049"; +} + +.glyphicon-text-height:before { + content: "\e050"; +} + +.glyphicon-text-width:before { + content: "\e051"; +} + +.glyphicon-align-left:before { + content: "\e052"; +} + +.glyphicon-align-center:before { + content: "\e053"; +} + +.glyphicon-align-right:before { + content: "\e054"; +} + +.glyphicon-align-justify:before { + content: "\e055"; +} + +.glyphicon-list:before { + content: "\e056"; +} + +.glyphicon-indent-left:before { + content: "\e057"; +} + +.glyphicon-indent-right:before { + content: "\e058"; +} + +.glyphicon-facetime-video:before { + content: "\e059"; +} + +.glyphicon-picture:before { + content: "\e060"; +} + +.glyphicon-map-marker:before { + content: "\e062"; +} + +.glyphicon-adjust:before { + content: "\e063"; +} + +.glyphicon-tint:before { + content: "\e064"; +} + +.glyphicon-edit:before { + content: "\e065"; +} + +.glyphicon-share:before { + content: "\e066"; +} + +.glyphicon-check:before { + content: "\e067"; +} + +.glyphicon-move:before { + content: "\e068"; +} + +.glyphicon-step-backward:before { + content: "\e069"; +} + +.glyphicon-fast-backward:before { + content: "\e070"; +} + +.glyphicon-backward:before { + content: "\e071"; +} + +.glyphicon-play:before { + content: "\e072"; +} + +.glyphicon-pause:before { + content: "\e073"; +} + +.glyphicon-stop:before { + content: "\e074"; +} + +.glyphicon-forward:before { + content: "\e075"; +} + +.glyphicon-fast-forward:before { + content: "\e076"; +} + +.glyphicon-step-forward:before { + content: "\e077"; +} + +.glyphicon-eject:before { + content: "\e078"; +} + +.glyphicon-chevron-left:before { + content: "\e079"; +} + +.glyphicon-chevron-right:before { + content: "\e080"; +} + +.glyphicon-plus-sign:before { + content: "\e081"; +} + +.glyphicon-minus-sign:before { + content: "\e082"; +} + +.glyphicon-remove-sign:before { + content: "\e083"; +} + +.glyphicon-ok-sign:before { + content: "\e084"; +} + +.glyphicon-question-sign:before { + content: "\e085"; +} + +.glyphicon-info-sign:before { + content: "\e086"; +} + +.glyphicon-screenshot:before { + content: "\e087"; +} + +.glyphicon-remove-circle:before { + content: "\e088"; +} + +.glyphicon-ok-circle:before { + content: "\e089"; +} + +.glyphicon-ban-circle:before { + content: "\e090"; +} + +.glyphicon-arrow-left:before { + content: "\e091"; +} + +.glyphicon-arrow-right:before { + content: "\e092"; +} + +.glyphicon-arrow-up:before { + content: "\e093"; +} + +.glyphicon-arrow-down:before { + content: "\e094"; +} + +.glyphicon-share-alt:before { + content: "\e095"; +} + +.glyphicon-resize-full:before { + content: "\e096"; +} + +.glyphicon-resize-small:before { + content: "\e097"; +} + +.glyphicon-exclamation-sign:before { + content: "\e101"; +} + +.glyphicon-gift:before { + content: "\e102"; +} + +.glyphicon-leaf:before { + content: "\e103"; +} + +.glyphicon-eye-open:before { + content: "\e105"; +} + +.glyphicon-eye-close:before { + content: "\e106"; +} + +.glyphicon-warning-sign:before { + content: "\e107"; +} + +.glyphicon-plane:before { + content: "\e108"; +} + +.glyphicon-random:before { + content: "\e110"; +} + +.glyphicon-comment:before { + content: "\e111"; +} + +.glyphicon-magnet:before { + content: "\e112"; +} + +.glyphicon-chevron-up:before { + content: "\e113"; +} + +.glyphicon-chevron-down:before { + content: "\e114"; +} + +.glyphicon-retweet:before { + content: "\e115"; +} + +.glyphicon-shopping-cart:before { + content: "\e116"; +} + +.glyphicon-folder-close:before { + content: "\e117"; +} + +.glyphicon-folder-open:before { + content: "\e118"; +} + +.glyphicon-resize-vertical:before { + content: "\e119"; +} + +.glyphicon-resize-horizontal:before { + content: "\e120"; +} + +.glyphicon-hdd:before { + content: "\e121"; +} + +.glyphicon-bullhorn:before { + content: "\e122"; +} + +.glyphicon-certificate:before { + content: "\e124"; +} + +.glyphicon-thumbs-up:before { + content: "\e125"; +} + +.glyphicon-thumbs-down:before { + content: "\e126"; +} + +.glyphicon-hand-right:before { + content: "\e127"; +} + +.glyphicon-hand-left:before { + content: "\e128"; +} + +.glyphicon-hand-up:before { + content: "\e129"; +} + +.glyphicon-hand-down:before { + content: "\e130"; +} + +.glyphicon-circle-arrow-right:before { + content: "\e131"; +} + +.glyphicon-circle-arrow-left:before { + content: "\e132"; +} + +.glyphicon-circle-arrow-up:before { + content: "\e133"; +} + +.glyphicon-circle-arrow-down:before { + content: "\e134"; +} + +.glyphicon-globe:before { + content: "\e135"; +} + +.glyphicon-tasks:before { + content: "\e137"; +} + +.glyphicon-filter:before { + content: "\e138"; +} + +.glyphicon-fullscreen:before { + content: "\e140"; +} + +.glyphicon-dashboard:before { + content: "\e141"; +} + +.glyphicon-heart-empty:before { + content: "\e143"; +} + +.glyphicon-link:before { + content: "\e144"; +} + +.glyphicon-phone:before { + content: "\e145"; +} + +.glyphicon-usd:before { + content: "\e148"; +} + +.glyphicon-gbp:before { + content: "\e149"; +} + +.glyphicon-sort:before { + content: "\e150"; +} + +.glyphicon-sort-by-alphabet:before { + content: "\e151"; +} + +.glyphicon-sort-by-alphabet-alt:before { + content: "\e152"; +} + +.glyphicon-sort-by-order:before { + content: "\e153"; +} + +.glyphicon-sort-by-order-alt:before { + content: "\e154"; +} + +.glyphicon-sort-by-attributes:before { + content: "\e155"; +} + +.glyphicon-sort-by-attributes-alt:before { + content: "\e156"; +} + +.glyphicon-unchecked:before { + content: "\e157"; +} + +.glyphicon-expand:before { + content: "\e158"; +} + +.glyphicon-collapse-down:before { + content: "\e159"; +} + +.glyphicon-collapse-up:before { + content: "\e160"; +} + +.glyphicon-log-in:before { + content: "\e161"; +} + +.glyphicon-flash:before { + content: "\e162"; +} + +.glyphicon-log-out:before { + content: "\e163"; +} + +.glyphicon-new-window:before { + content: "\e164"; +} + +.glyphicon-record:before { + content: "\e165"; +} + +.glyphicon-save:before { + content: "\e166"; +} + +.glyphicon-open:before { + content: "\e167"; +} + +.glyphicon-saved:before { + content: "\e168"; +} + +.glyphicon-import:before { + content: "\e169"; +} + +.glyphicon-export:before { + content: "\e170"; +} + +.glyphicon-send:before { + content: "\e171"; +} + +.glyphicon-floppy-disk:before { + content: "\e172"; +} + +.glyphicon-floppy-saved:before { + content: "\e173"; +} + +.glyphicon-floppy-remove:before { + content: "\e174"; +} + +.glyphicon-floppy-save:before { + content: "\e175"; +} + +.glyphicon-floppy-open:before { + content: "\e176"; +} + +.glyphicon-credit-card:before { + content: "\e177"; +} + +.glyphicon-transfer:before { + content: "\e178"; +} + +.glyphicon-cutlery:before { + content: "\e179"; +} + +.glyphicon-header:before { + content: "\e180"; +} + +.glyphicon-compressed:before { + content: "\e181"; +} + +.glyphicon-earphone:before { + content: "\e182"; +} + +.glyphicon-phone-alt:before { + content: "\e183"; +} + +.glyphicon-tower:before { + content: "\e184"; +} + +.glyphicon-stats:before { + content: "\e185"; +} + +.glyphicon-sd-video:before { + content: "\e186"; +} + +.glyphicon-hd-video:before { + content: "\e187"; +} + +.glyphicon-subtitles:before { + content: "\e188"; +} + +.glyphicon-sound-stereo:before { + content: "\e189"; +} + +.glyphicon-sound-dolby:before { + content: "\e190"; +} + +.glyphicon-sound-5-1:before { + content: "\e191"; +} + +.glyphicon-sound-6-1:before { + content: "\e192"; +} + +.glyphicon-sound-7-1:before { + content: "\e193"; +} + +.glyphicon-copyright-mark:before { + content: "\e194"; +} + +.glyphicon-registration-mark:before { + content: "\e195"; +} + +.glyphicon-cloud-download:before { + content: "\e197"; +} + +.glyphicon-cloud-upload:before { + content: "\e198"; +} + +.glyphicon-tree-conifer:before { + content: "\e199"; +} + +.glyphicon-tree-deciduous:before { + content: "\e200"; +} + +.glyphicon-briefcase:before { + content: "\1f4bc"; +} + +.glyphicon-calendar:before { + content: "\1f4c5"; +} + +.glyphicon-pushpin:before { + content: "\1f4cc"; +} + +.glyphicon-paperclip:before { + content: "\1f4ce"; +} + +.glyphicon-camera:before { + content: "\1f4f7"; +} + +.glyphicon-lock:before { + content: "\1f512"; +} + +.glyphicon-bell:before { + content: "\1f514"; +} + +.glyphicon-bookmark:before { + content: "\1f516"; +} + +.glyphicon-fire:before { + content: "\1f525"; +} + +.glyphicon-wrench:before { + content: "\1f527"; +} + +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-bottom: 0 dotted; + border-left: 4px solid transparent; + content: ""; +} + +.dropdown { + position: relative; +} + +.dropdown-toggle:focus { + outline: 0; +} + +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 14px; + list-style: none; + background-color: #ffffff; + border: 1px solid #cccccc; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + background-clip: padding-box; +} + +.dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.dropdown-menu .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} + +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.428571429; + color: #333333; + white-space: nowrap; +} + +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + color: #ffffff; + text-decoration: none; + background-color: #428bca; +} + +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #ffffff; + text-decoration: none; + background-color: #428bca; + outline: 0; +} + +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #999999; +} + +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: not-allowed; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.open > .dropdown-menu { + display: block; +} + +.open > a { + outline: 0; +} + +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.428571429; + color: #999999; +} + +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} + +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} + +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0 dotted; + border-bottom: 4px solid #000000; + content: ""; +} + +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} + +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + right: 0; + left: auto; + } +} + +.btn-default .caret { + border-top-color: #333333; +} + +.btn-primary .caret, +.btn-success .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret { + border-top-color: #fff; +} + +.dropup .btn-default .caret { + border-bottom-color: #333333; +} + +.dropup .btn-primary .caret, +.dropup .btn-success .caret, +.dropup .btn-warning .caret, +.dropup .btn-danger .caret, +.dropup .btn-info .caret { + border-bottom-color: #fff; +} + +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; +} + +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + float: left; +} + +.btn-group > .btn:hover, +.btn-group-vertical > .btn:hover, +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus, +.btn-group > .btn:active, +.btn-group-vertical > .btn:active, +.btn-group > .btn.active, +.btn-group-vertical > .btn.active { + z-index: 2; +} + +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus { + outline: none; +} + +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group { + margin-left: -1px; +} + +.btn-toolbar:before, +.btn-toolbar:after { + display: table; + content: " "; +} + +.btn-toolbar:after { + clear: both; +} + +.btn-toolbar:before, +.btn-toolbar:after { + display: table; + content: " "; +} + +.btn-toolbar:after { + clear: both; +} + +.btn-toolbar .btn-group { + float: left; +} + +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group, +.btn-toolbar > .btn-group + .btn-group { + margin-left: 5px; +} + +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} + +.btn-group > .btn:first-child { + margin-left: 0; +} + +.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + border-bottom-left-radius: 0; + border-top-left-radius: 0; +} + +.btn-group > .btn-group { + float: left; +} + +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} + +.btn-group > .btn-group:first-child > .btn:last-child, +.btn-group > .btn-group:first-child > .dropdown-toggle { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.btn-group > .btn-group:last-child > .btn:first-child { + border-bottom-left-radius: 0; + border-top-left-radius: 0; +} + +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} + +.btn-group-xs > .btn { + padding: 5px 10px; + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} + +.btn-group-sm > .btn { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} + +.btn-group-lg > .btn { + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} + +.btn-group > .btn + .dropdown-toggle { + padding-right: 8px; + padding-left: 8px; +} + +.btn-group > .btn-lg + .dropdown-toggle { + padding-right: 12px; + padding-left: 12px; +} + +.btn-group.open .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} + +.btn .caret { + margin-left: 0; +} + +.btn-lg .caret { + border-width: 5px 5px 0; + border-bottom-width: 0; +} + +.dropup .btn-lg .caret { + border-width: 0 5px 5px; +} + +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group { + display: block; + float: none; + width: 100%; + max-width: 100%; +} + +.btn-group-vertical > .btn-group:before, +.btn-group-vertical > .btn-group:after { + display: table; + content: " "; +} + +.btn-group-vertical > .btn-group:after { + clear: both; +} + +.btn-group-vertical > .btn-group:before, +.btn-group-vertical > .btn-group:after { + display: table; + content: " "; +} + +.btn-group-vertical > .btn-group:after { + clear: both; +} + +.btn-group-vertical > .btn-group > .btn { + float: none; +} + +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; +} + +.btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0; +} + +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-top-right-radius: 0; + border-bottom-left-radius: 4px; + border-top-left-radius: 0; +} + +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} + +.btn-group-vertical > .btn-group:first-child > .btn:last-child, +.btn-group-vertical > .btn-group:first-child > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.btn-group-vertical > .btn-group:last-child > .btn:first-child { + border-top-right-radius: 0; + border-top-left-radius: 0; +} + +.btn-group-justified { + display: table; + width: 100%; + border-collapse: separate; + table-layout: fixed; +} + +.btn-group-justified .btn { + display: table-cell; + float: none; + width: 1%; +} + +[data-toggle="buttons"] > .btn > input[type="radio"], +[data-toggle="buttons"] > .btn > input[type="checkbox"] { + display: none; +} + +.input-group { + position: relative; + display: table; + border-collapse: separate; +} + +.input-group.col { + float: none; + padding-right: 0; + padding-left: 0; +} + +.input-group .form-control { + width: 100%; + margin-bottom: 0; +} + +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + height: 45px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} + +select.input-group-lg > .form-control, +select.input-group-lg > .input-group-addon, +select.input-group-lg > .input-group-btn > .btn { + height: 45px; + line-height: 45px; +} + +textarea.input-group-lg > .form-control, +textarea.input-group-lg > .input-group-addon, +textarea.input-group-lg > .input-group-btn > .btn { + height: auto; +} + +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} + +select.input-group-sm > .form-control, +select.input-group-sm > .input-group-addon, +select.input-group-sm > .input-group-btn > .btn { + height: 30px; + line-height: 30px; +} + +textarea.input-group-sm > .form-control, +textarea.input-group-sm > .input-group-addon, +textarea.input-group-sm > .input-group-btn > .btn { + height: auto; +} + +.input-group-addon, +.input-group-btn, +.input-group .form-control { + display: table-cell; +} + +.input-group-addon:not(:first-child):not(:last-child), +.input-group-btn:not(:first-child):not(:last-child), +.input-group .form-control:not(:first-child):not(:last-child) { + border-radius: 0; +} + +.input-group-addon, +.input-group-btn { + width: 1%; + white-space: nowrap; + vertical-align: middle; +} + +.input-group-addon { + padding: 6px 12px; + font-size: 14px; + font-weight: normal; + line-height: 1; + text-align: center; + background-color: #eeeeee; + border: 1px solid #cccccc; + border-radius: 4px; +} + +.input-group-addon.input-sm { + padding: 5px 10px; + font-size: 12px; + border-radius: 3px; +} + +.input-group-addon.input-lg { + padding: 10px 16px; + font-size: 18px; + border-radius: 6px; +} + +.input-group-addon input[type="radio"], +.input-group-addon input[type="checkbox"] { + margin-top: 0; +} + +.input-group .form-control:first-child, +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.input-group-addon:first-child { + border-right: 0; +} + +.input-group .form-control:last-child, +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child) { + border-bottom-left-radius: 0; + border-top-left-radius: 0; +} + +.input-group-addon:last-child { + border-left: 0; +} + +.input-group-btn { + position: relative; + white-space: nowrap; +} + +.input-group-btn > .btn { + position: relative; +} + +.input-group-btn > .btn + .btn { + margin-left: -4px; +} + +.input-group-btn > .btn:hover, +.input-group-btn > .btn:active { + z-index: 2; +} + +.nav { + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.nav:before, +.nav:after { + display: table; + content: " "; +} + +.nav:after { + clear: both; +} + +.nav:before, +.nav:after { + display: table; + content: " "; +} + +.nav:after { + clear: both; +} + +.nav > li { + position: relative; + display: block; +} + +.nav > li > a { + position: relative; + display: block; + padding: 10px 15px; +} + +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} + +.nav > li.disabled > a { + color: #999999; +} + +.nav > li.disabled > a:hover, +.nav > li.disabled > a:focus { + color: #999999; + text-decoration: none; + cursor: not-allowed; + background-color: transparent; +} + +.nav .open > a, +.nav .open > a:hover, +.nav .open > a:focus { + background-color: #eeeeee; + border-color: #428bca; +} + +.nav .nav-divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} + +.nav > li > a > img { + max-width: none; +} + +.nav-tabs { + border-bottom: 1px solid #dddddd; +} + +.nav-tabs > li { + float: left; + margin-bottom: -1px; +} + +.nav-tabs > li > a { + margin-right: 2px; + line-height: 1.428571429; + border: 1px solid transparent; + border-radius: 4px 4px 0 0; +} + +.nav-tabs > li > a:hover { + border-color: #eeeeee #eeeeee #dddddd; +} + +.nav-tabs > li.active > a, +.nav-tabs > li.active > a:hover, +.nav-tabs > li.active > a:focus { + color: #555555; + cursor: default; + background-color: #ffffff; + border: 1px solid #dddddd; + border-bottom-color: transparent; +} + +.nav-tabs.nav-justified { + width: 100%; + border-bottom: 0; +} + +.nav-tabs.nav-justified > li { + float: none; +} + +.nav-tabs.nav-justified > li > a { + text-align: center; +} + +@media (min-width: 768px) { + .nav-tabs.nav-justified > li { + display: table-cell; + width: 1%; + } +} + +.nav-tabs.nav-justified > li > a { + margin-right: 0; + border-bottom: 1px solid #dddddd; +} + +.nav-tabs.nav-justified > .active > a { + border-bottom-color: #ffffff; +} + +.nav-pills > li { + float: left; +} + +.nav-pills > li > a { + border-radius: 5px; +} + +.nav-pills > li + li { + margin-left: 2px; +} + +.nav-pills > li.active > a, +.nav-pills > li.active > a:hover, +.nav-pills > li.active > a:focus { + color: #ffffff; + background-color: #428bca; +} + +.nav-stacked > li { + float: none; +} + +.nav-stacked > li + li { + margin-top: 2px; + margin-left: 0; +} + +.nav-justified { + width: 100%; +} + +.nav-justified > li { + float: none; +} + +.nav-justified > li > a { + text-align: center; +} + +@media (min-width: 768px) { + .nav-justified > li { + display: table-cell; + width: 1%; + } +} + +.nav-tabs-justified { + border-bottom: 0; +} + +.nav-tabs-justified > li > a { + margin-right: 0; + border-bottom: 1px solid #dddddd; +} + +.nav-tabs-justified > .active > a { + border-bottom-color: #ffffff; +} + +.tabbable:before, +.tabbable:after { + display: table; + content: " "; +} + +.tabbable:after { + clear: both; +} + +.tabbable:before, +.tabbable:after { + display: table; + content: " "; +} + +.tabbable:after { + clear: both; +} + +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} + +.tab-content > .active, +.pill-content > .active { + display: block; +} + +.nav .caret { + border-top-color: #428bca; + border-bottom-color: #428bca; +} + +.nav a:hover .caret { + border-top-color: #2a6496; + border-bottom-color: #2a6496; +} + +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-right-radius: 0; + border-top-left-radius: 0; +} + +.navbar { + position: relative; + z-index: 1000; + min-height: 50px; + margin-bottom: 20px; + border: 1px solid transparent; +} + +.navbar:before, +.navbar:after { + display: table; + content: " "; +} + +.navbar:after { + clear: both; +} + +.navbar:before, +.navbar:after { + display: table; + content: " "; +} + +.navbar:after { + clear: both; +} + +@media (min-width: 768px) { + .navbar { + border-radius: 4px; + } +} + +.navbar-header:before, +.navbar-header:after { + display: table; + content: " "; +} + +.navbar-header:after { + clear: both; +} + +.navbar-header:before, +.navbar-header:after { + display: table; + content: " "; +} + +.navbar-header:after { + clear: both; +} + +@media (min-width: 768px) { + .navbar-header { + float: left; + } +} + +.navbar-collapse { + max-height: 340px; + padding-right: 15px; + padding-left: 15px; + overflow-x: visible; + border-top: 1px solid transparent; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); + -webkit-overflow-scrolling: touch; +} + +.navbar-collapse:before, +.navbar-collapse:after { + display: table; + content: " "; +} + +.navbar-collapse:after { + clear: both; +} + +.navbar-collapse:before, +.navbar-collapse:after { + display: table; + content: " "; +} + +.navbar-collapse:after { + clear: both; +} + +.navbar-collapse.in { + overflow-y: auto; +} + +@media (min-width: 768px) { + .navbar-collapse { + width: auto; + border-top: 0; + box-shadow: none; + } + .navbar-collapse.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important; + } + .navbar-collapse.in { + overflow-y: visible; + } + .navbar-collapse .navbar-nav.navbar-left:first-child { + margin-left: -15px; + } + .navbar-collapse .navbar-nav.navbar-right:last-child { + margin-right: -15px; + } + .navbar-collapse .navbar-text:last-child { + margin-right: 0; + } +} + +.container > .navbar-header, +.container > .navbar-collapse { + margin-right: -15px; + margin-left: -15px; +} + +@media (min-width: 768px) { + .container > .navbar-header, + .container > .navbar-collapse { + margin-right: 0; + margin-left: 0; + } +} + +.navbar-static-top { + border-width: 0 0 1px; +} + +@media (min-width: 768px) { + .navbar-static-top { + border-radius: 0; + } +} + +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + border-width: 0 0 1px; +} + +@media (min-width: 768px) { + .navbar-fixed-top, + .navbar-fixed-bottom { + border-radius: 0; + } +} + +.navbar-fixed-top { + top: 0; + z-index: 1030; +} + +.navbar-fixed-bottom { + bottom: 0; + margin-bottom: 0; +} + +.navbar-brand { + float: left; + padding: 15px 15px; + font-size: 18px; + line-height: 20px; +} + +.navbar-brand:hover, +.navbar-brand:focus { + text-decoration: none; +} + +@media (min-width: 768px) { + .navbar > .container .navbar-brand { + margin-left: -15px; + } +} + +.navbar-toggle { + position: relative; + float: right; + padding: 9px 10px; + margin-top: 8px; + margin-right: 15px; + margin-bottom: 8px; + background-color: transparent; + border: 1px solid transparent; + border-radius: 4px; +} + +.navbar-toggle .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; +} + +.navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px; +} + +@media (min-width: 768px) { + .navbar-toggle { + display: none; + } +} + +.navbar-nav { + margin: 7.5px -15px; +} + +.navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: 20px; +} + +@media (max-width: 767px) { + .navbar-nav .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + box-shadow: none; + } + .navbar-nav .open .dropdown-menu > li > a, + .navbar-nav .open .dropdown-menu .dropdown-header { + padding: 5px 15px 5px 25px; + } + .navbar-nav .open .dropdown-menu > li > a { + line-height: 20px; + } + .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-nav .open .dropdown-menu > li > a:focus { + background-image: none; + } +} + +@media (min-width: 768px) { + .navbar-nav { + float: left; + margin: 0; + } + .navbar-nav > li { + float: left; + } + .navbar-nav > li > a { + padding-top: 15px; + padding-bottom: 15px; + } +} + +@media (min-width: 768px) { + .navbar-left { + float: left !important; + } + .navbar-right { + float: right !important; + } +} + +.navbar-form { + padding: 10px 15px; + margin-top: 8px; + margin-right: -15px; + margin-bottom: 8px; + margin-left: -15px; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); +} + +@media (min-width: 768px) { + .navbar-form .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .form-control { + display: inline-block; + } + .navbar-form .radio, + .navbar-form .checkbox { + display: inline-block; + padding-left: 0; + margin-top: 0; + margin-bottom: 0; + } + .navbar-form .radio input[type="radio"], + .navbar-form .checkbox input[type="checkbox"] { + float: none; + margin-left: 0; + } +} + +@media (max-width: 767px) { + .navbar-form .form-group { + margin-bottom: 5px; + } +} + +@media (min-width: 768px) { + .navbar-form { + width: auto; + padding-top: 0; + padding-bottom: 0; + margin-right: 0; + margin-left: 0; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } +} + +.navbar-nav > li > .dropdown-menu { + margin-top: 0; + border-top-right-radius: 0; + border-top-left-radius: 0; +} + +.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.navbar-nav.pull-right > li > .dropdown-menu, +.navbar-nav > li > .dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.navbar-btn { + margin-top: 8px; + margin-bottom: 8px; +} + +.navbar-text { + float: left; + margin-top: 15px; + margin-bottom: 15px; +} + +@media (min-width: 768px) { + .navbar-text { + margin-right: 15px; + margin-left: 15px; + } +} + +.navbar-default { + background-color: #f8f8f8; + border-color: #e7e7e7; +} + +.navbar-default .navbar-brand { + color: #777777; +} + +.navbar-default .navbar-brand:hover, +.navbar-default .navbar-brand:focus { + color: #5e5e5e; + background-color: transparent; +} + +.navbar-default .navbar-text { + color: #777777; +} + +.navbar-default .navbar-nav > li > a { + color: #777777; +} + +.navbar-default .navbar-nav > li > a:hover, +.navbar-default .navbar-nav > li > a:focus { + color: #333333; + background-color: transparent; +} + +.navbar-default .navbar-nav > .active > a, +.navbar-default .navbar-nav > .active > a:hover, +.navbar-default .navbar-nav > .active > a:focus { + color: #555555; + background-color: #e7e7e7; +} + +.navbar-default .navbar-nav > .disabled > a, +.navbar-default .navbar-nav > .disabled > a:hover, +.navbar-default .navbar-nav > .disabled > a:focus { + color: #cccccc; + background-color: transparent; +} + +.navbar-default .navbar-toggle { + border-color: #dddddd; +} + +.navbar-default .navbar-toggle:hover, +.navbar-default .navbar-toggle:focus { + background-color: #dddddd; +} + +.navbar-default .navbar-toggle .icon-bar { + background-color: #cccccc; +} + +.navbar-default .navbar-collapse, +.navbar-default .navbar-form { + border-color: #e6e6e6; +} + +.navbar-default .navbar-nav > .dropdown > a:hover .caret, +.navbar-default .navbar-nav > .dropdown > a:focus .caret { + border-top-color: #333333; + border-bottom-color: #333333; +} + +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .open > a:hover, +.navbar-default .navbar-nav > .open > a:focus { + color: #555555; + background-color: #e7e7e7; +} + +.navbar-default .navbar-nav > .open > a .caret, +.navbar-default .navbar-nav > .open > a:hover .caret, +.navbar-default .navbar-nav > .open > a:focus .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + +.navbar-default .navbar-nav > .dropdown > a .caret { + border-top-color: #777777; + border-bottom-color: #777777; +} + +@media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #777777; + } + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + color: #333333; + background-color: transparent; + } + .navbar-default .navbar-nav .open .dropdown-menu > .active > a, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #555555; + background-color: #e7e7e7; + } + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #cccccc; + background-color: transparent; + } +} + +.navbar-default .navbar-link { + color: #777777; +} + +.navbar-default .navbar-link:hover { + color: #333333; +} + +.navbar-inverse { + background-color: #222222; + border-color: #080808; +} + +.navbar-inverse .navbar-brand { + color: #999999; +} + +.navbar-inverse .navbar-brand:hover, +.navbar-inverse .navbar-brand:focus { + color: #ffffff; + background-color: transparent; +} + +.navbar-inverse .navbar-text { + color: #999999; +} + +.navbar-inverse .navbar-nav > li > a { + color: #999999; +} + +.navbar-inverse .navbar-nav > li > a:hover, +.navbar-inverse .navbar-nav > li > a:focus { + color: #ffffff; + background-color: transparent; +} + +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:hover, +.navbar-inverse .navbar-nav > .active > a:focus { + color: #ffffff; + background-color: #080808; +} + +.navbar-inverse .navbar-nav > .disabled > a, +.navbar-inverse .navbar-nav > .disabled > a:hover, +.navbar-inverse .navbar-nav > .disabled > a:focus { + color: #444444; + background-color: transparent; +} + +.navbar-inverse .navbar-toggle { + border-color: #333333; +} + +.navbar-inverse .navbar-toggle:hover, +.navbar-inverse .navbar-toggle:focus { + background-color: #333333; +} + +.navbar-inverse .navbar-toggle .icon-bar { + background-color: #ffffff; +} + +.navbar-inverse .navbar-collapse, +.navbar-inverse .navbar-form { + border-color: #101010; +} + +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:hover, +.navbar-inverse .navbar-nav > .open > a:focus { + color: #ffffff; + background-color: #080808; +} + +.navbar-inverse .navbar-nav > .dropdown > a:hover .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .navbar-nav > .dropdown > a .caret { + border-top-color: #999999; + border-bottom-color: #999999; +} + +.navbar-inverse .navbar-nav > .open > a .caret, +.navbar-inverse .navbar-nav > .open > a:hover .caret, +.navbar-inverse .navbar-nav > .open > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +@media (max-width: 767px) { + .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { + border-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { + color: #999999; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { + color: #ffffff; + background-color: transparent; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #ffffff; + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #444444; + background-color: transparent; + } +} + +.navbar-inverse .navbar-link { + color: #999999; +} + +.navbar-inverse .navbar-link:hover { + color: #ffffff; +} + +.breadcrumb { + padding: 8px 15px; + margin-bottom: 20px; + list-style: none; + background-color: #f5f5f5; + border-radius: 4px; +} + +.breadcrumb > li { + display: inline-block; +} + +.breadcrumb > li + li:before { + padding: 0 5px; + color: #cccccc; + content: "/\00a0"; +} + +.breadcrumb > .active { + color: #999999; +} + +.pagination { + display: inline-block; + padding-left: 0; + margin: 20px 0; + border-radius: 4px; +} + +.pagination > li { + display: inline; +} + +.pagination > li > a, +.pagination > li > span { + position: relative; + float: left; + padding: 6px 12px; + margin-left: -1px; + line-height: 1.428571429; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; +} + +.pagination > li:first-child > a, +.pagination > li:first-child > span { + margin-left: 0; + border-bottom-left-radius: 4px; + border-top-left-radius: 4px; +} + +.pagination > li:last-child > a, +.pagination > li:last-child > span { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} + +.pagination > li > a:hover, +.pagination > li > span:hover, +.pagination > li > a:focus, +.pagination > li > span:focus { + background-color: #eeeeee; +} + +.pagination > .active > a, +.pagination > .active > span, +.pagination > .active > a:hover, +.pagination > .active > span:hover, +.pagination > .active > a:focus, +.pagination > .active > span:focus { + z-index: 2; + color: #ffffff; + cursor: default; + background-color: #428bca; + border-color: #428bca; +} + +.pagination > .disabled > span, +.pagination > .disabled > a, +.pagination > .disabled > a:hover, +.pagination > .disabled > a:focus { + color: #999999; + cursor: not-allowed; + background-color: #ffffff; + border-color: #dddddd; +} + +.pagination-lg > li > a, +.pagination-lg > li > span { + padding: 10px 16px; + font-size: 18px; +} + +.pagination-lg > li:first-child > a, +.pagination-lg > li:first-child > span { + border-bottom-left-radius: 6px; + border-top-left-radius: 6px; +} + +.pagination-lg > li:last-child > a, +.pagination-lg > li:last-child > span { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} + +.pagination-sm > li > a, +.pagination-sm > li > span { + padding: 5px 10px; + font-size: 12px; +} + +.pagination-sm > li:first-child > a, +.pagination-sm > li:first-child > span { + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; +} + +.pagination-sm > li:last-child > a, +.pagination-sm > li:last-child > span { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} + +.pager { + padding-left: 0; + margin: 20px 0; + text-align: center; + list-style: none; +} + +.pager:before, +.pager:after { + display: table; + content: " "; +} + +.pager:after { + clear: both; +} + +.pager:before, +.pager:after { + display: table; + content: " "; +} + +.pager:after { + clear: both; +} + +.pager li { + display: inline; +} + +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #ffffff; + border: 1px solid #dddddd; + border-radius: 15px; +} + +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} + +.pager .next > a, +.pager .next > span { + float: right; +} + +.pager .previous > a, +.pager .previous > span { + float: left; +} + +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #999999; + cursor: not-allowed; + background-color: #ffffff; +} + +.label { + display: inline; + padding: .2em .6em .3em; + font-size: 75%; + font-weight: bold; + line-height: 1; + color: #ffffff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; +} + +.label[href]:hover, +.label[href]:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} + +.label:empty { + display: none; +} + +.label-default { + background-color: #999999; +} + +.label-default[href]:hover, +.label-default[href]:focus { + background-color: #808080; +} + +.label-primary { + background-color: #428bca; +} + +.label-primary[href]:hover, +.label-primary[href]:focus { + background-color: #3071a9; +} + +.label-success { + background-color: #5cb85c; +} + +.label-success[href]:hover, +.label-success[href]:focus { + background-color: #449d44; +} + +.label-info { + background-color: #5bc0de; +} + +.label-info[href]:hover, +.label-info[href]:focus { + background-color: #31b0d5; +} + +.label-warning { + background-color: #f0ad4e; +} + +.label-warning[href]:hover, +.label-warning[href]:focus { + background-color: #ec971f; +} + +.label-danger { + background-color: #d9534f; +} + +.label-danger[href]:hover, +.label-danger[href]:focus { + background-color: #c9302c; +} + +.badge { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + line-height: 1; + color: #ffffff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + background-color: #999999; + border-radius: 10px; +} + +.badge:empty { + display: none; +} + +a.badge:hover, +a.badge:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} + +.btn .badge { + position: relative; + top: -1px; +} + +a.list-group-item.active > .badge, +.nav-pills > .active > a > .badge { + color: #428bca; + background-color: #ffffff; +} + +.nav-pills > li > a > .badge { + margin-left: 3px; +} + +.jumbotron { + padding: 30px; + margin-bottom: 30px; + font-size: 21px; + font-weight: 200; + line-height: 2.1428571435; + color: inherit; + background-color: #eeeeee; +} + +.jumbotron h1 { + line-height: 1; + color: inherit; +} + +.jumbotron p { + line-height: 1.4; +} + +.container .jumbotron { + border-radius: 6px; +} + +@media screen and (min-width: 768px) { + .jumbotron { + padding-top: 48px; + padding-bottom: 48px; + } + .container .jumbotron { + padding-right: 60px; + padding-left: 60px; + } + .jumbotron h1 { + font-size: 63px; + } +} + +.thumbnail { + display: inline-block; + display: block; + height: auto; + max-width: 100%; + padding: 4px; + line-height: 1.428571429; + background-color: #ffffff; + border: 1px solid #dddddd; + border-radius: 4px; + -webkit-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + +.thumbnail > img { + display: block; + height: auto; + max-width: 100%; +} + +a.thumbnail:hover, +a.thumbnail:focus { + border-color: #428bca; +} + +.thumbnail > img { + margin-right: auto; + margin-left: auto; +} + +.thumbnail .caption { + padding: 9px; + color: #333333; +} + +.alert { + padding: 15px; + margin-bottom: 20px; + border: 1px solid transparent; + border-radius: 4px; +} + +.alert h4 { + margin-top: 0; + color: inherit; +} + +.alert .alert-link { + font-weight: bold; +} + +.alert > p, +.alert > ul { + margin-bottom: 0; +} + +.alert > p + p { + margin-top: 5px; +} + +.alert-dismissable { + padding-right: 35px; +} + +.alert-dismissable .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; +} + +.alert-success { + color: #468847; + background-color: #dff0d8; + border-color: #d6e9c6; +} + +.alert-success hr { + border-top-color: #c9e2b3; +} + +.alert-success .alert-link { + color: #356635; +} + +.alert-info { + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1; +} + +.alert-info hr { + border-top-color: #a6e1ec; +} + +.alert-info .alert-link { + color: #2d6987; +} + +.alert-warning { + color: #c09853; + background-color: #fcf8e3; + border-color: #fbeed5; +} + +.alert-warning hr { + border-top-color: #f8e5be; +} + +.alert-warning .alert-link { + color: #a47e3c; +} + +.alert-danger { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} + +.alert-danger hr { + border-top-color: #e6c1c7; +} + +.alert-danger .alert-link { + color: #953b39; +} + +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} + +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f5f5f5; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); +} + +.progress-bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + color: #ffffff; + text-align: center; + background-color: #428bca; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-transition: width 0.6s ease; + transition: width 0.6s ease; +} + +.progress-striped .progress-bar { + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 40px 40px; +} + +.progress.active .progress-bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} + +.progress-bar-success { + background-color: #5cb85c; +} + +.progress-striped .progress-bar-success { + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-bar-info { + background-color: #5bc0de; +} + +.progress-striped .progress-bar-info { + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-bar-warning { + background-color: #f0ad4e; +} + +.progress-striped .progress-bar-warning { + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-bar-danger { + background-color: #d9534f; +} + +.progress-striped .progress-bar-danger { + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.media, +.media-body { + overflow: hidden; + zoom: 1; +} + +.media, +.media .media { + margin-top: 15px; +} + +.media:first-child { + margin-top: 0; +} + +.media-object { + display: block; +} + +.media-heading { + margin: 0 0 5px; +} + +.media > .pull-left { + margin-right: 10px; +} + +.media > .pull-right { + margin-left: 10px; +} + +.media-list { + padding-left: 0; + list-style: none; +} + +.list-group { + padding-left: 0; + margin-bottom: 20px; +} + +.list-group-item { + position: relative; + display: block; + padding: 10px 15px; + margin-bottom: -1px; + background-color: #ffffff; + border: 1px solid #dddddd; +} + +.list-group-item:first-child { + border-top-right-radius: 4px; + border-top-left-radius: 4px; +} + +.list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} + +.list-group-item > .badge { + float: right; +} + +.list-group-item > .badge + .badge { + margin-right: 5px; +} + +a.list-group-item { + color: #555555; +} + +a.list-group-item .list-group-item-heading { + color: #333333; +} + +a.list-group-item:hover, +a.list-group-item:focus { + text-decoration: none; + background-color: #f5f5f5; +} + +.list-group-item.active, +.list-group-item.active:hover, +.list-group-item.active:focus { + z-index: 2; + color: #ffffff; + background-color: #428bca; + border-color: #428bca; +} + +.list-group-item.active .list-group-item-heading, +.list-group-item.active:hover .list-group-item-heading, +.list-group-item.active:focus .list-group-item-heading { + color: inherit; +} + +.list-group-item.active .list-group-item-text, +.list-group-item.active:hover .list-group-item-text, +.list-group-item.active:focus .list-group-item-text { + color: #e1edf7; +} + +.list-group-item-heading { + margin-top: 0; + margin-bottom: 5px; +} + +.list-group-item-text { + margin-bottom: 0; + line-height: 1.3; +} + +.panel { + margin-bottom: 20px; + background-color: #ffffff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); +} + +.panel-body { + padding: 15px; +} + +.panel-body:before, +.panel-body:after { + display: table; + content: " "; +} + +.panel-body:after { + clear: both; +} + +.panel-body:before, +.panel-body:after { + display: table; + content: " "; +} + +.panel-body:after { + clear: both; +} + +.panel > .list-group { + margin-bottom: 0; +} + +.panel > .list-group .list-group-item { + border-width: 1px 0; +} + +.panel > .list-group .list-group-item:first-child { + border-top-right-radius: 0; + border-top-left-radius: 0; +} + +.panel > .list-group .list-group-item:last-child { + border-bottom: 0; +} + +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; +} + +.panel > .table { + margin-bottom: 0; +} + +.panel > .panel-body + .table { + border-top: 1px solid #dddddd; +} + +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} + +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 16px; +} + +.panel-title > a { + color: inherit; +} + +.panel-footer { + padding: 10px 15px; + background-color: #f5f5f5; + border-top: 1px solid #dddddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} + +.panel-group .panel { + margin-bottom: 0; + overflow: hidden; + border-radius: 4px; +} + +.panel-group .panel + .panel { + margin-top: 5px; +} + +.panel-group .panel-heading { + border-bottom: 0; +} + +.panel-group .panel-heading + .panel-collapse .panel-body { + border-top: 1px solid #dddddd; +} + +.panel-group .panel-footer { + border-top: 0; +} + +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid #dddddd; +} + +.panel-default { + border-color: #dddddd; +} + +.panel-default > .panel-heading { + color: #333333; + background-color: #f5f5f5; + border-color: #dddddd; +} + +.panel-default > .panel-heading + .panel-collapse .panel-body { + border-top-color: #dddddd; +} + +.panel-default > .panel-footer + .panel-collapse .panel-body { + border-bottom-color: #dddddd; +} + +.panel-primary { + border-color: #428bca; +} + +.panel-primary > .panel-heading { + color: #ffffff; + background-color: #428bca; + border-color: #428bca; +} + +.panel-primary > .panel-heading + .panel-collapse .panel-body { + border-top-color: #428bca; +} + +.panel-primary > .panel-footer + .panel-collapse .panel-body { + border-bottom-color: #428bca; +} + +.panel-success { + border-color: #d6e9c6; +} + +.panel-success > .panel-heading { + color: #468847; + background-color: #dff0d8; + border-color: #d6e9c6; +} + +.panel-success > .panel-heading + .panel-collapse .panel-body { + border-top-color: #d6e9c6; +} + +.panel-success > .panel-footer + .panel-collapse .panel-body { + border-bottom-color: #d6e9c6; +} + +.panel-warning { + border-color: #fbeed5; +} + +.panel-warning > .panel-heading { + color: #c09853; + background-color: #fcf8e3; + border-color: #fbeed5; +} + +.panel-warning > .panel-heading + .panel-collapse .panel-body { + border-top-color: #fbeed5; +} + +.panel-warning > .panel-footer + .panel-collapse .panel-body { + border-bottom-color: #fbeed5; +} + +.panel-danger { + border-color: #eed3d7; +} + +.panel-danger > .panel-heading { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} + +.panel-danger > .panel-heading + .panel-collapse .panel-body { + border-top-color: #eed3d7; +} + +.panel-danger > .panel-footer + .panel-collapse .panel-body { + border-bottom-color: #eed3d7; +} + +.panel-info { + border-color: #bce8f1; +} + +.panel-info > .panel-heading { + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1; +} + +.panel-info > .panel-heading + .panel-collapse .panel-body { + border-top-color: #bce8f1; +} + +.panel-info > .panel-footer + .panel-collapse .panel-body { + border-bottom-color: #bce8f1; +} + +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} + +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} + +.well-lg { + padding: 24px; + border-radius: 6px; +} + +.well-sm { + padding: 9px; + border-radius: 3px; +} + +.close { + float: right; + font-size: 21px; + font-weight: bold; + line-height: 1; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} + +.close:hover, +.close:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.5; + filter: alpha(opacity=50); +} + +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} + +.modal-open { + overflow: hidden; +} + +body.modal-open, +.modal-open .navbar-fixed-top, +.modal-open .navbar-fixed-bottom { + margin-right: 15px; +} + +.modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + display: none; + overflow: auto; + overflow-y: scroll; +} + +.modal.fade .modal-dialog { + -webkit-transform: translate(0, -25%); + -ms-transform: translate(0, -25%); + transform: translate(0, -25%); + -webkit-transition: -webkit-transform 0.3s ease-out; + -moz-transition: -moz-transform 0.3s ease-out; + -o-transition: -o-transform 0.3s ease-out; + transition: transform 0.3s ease-out; +} + +.modal.in .modal-dialog { + -webkit-transform: translate(0, 0); + -ms-transform: translate(0, 0); + transform: translate(0, 0); +} + +.modal-dialog { + z-index: 1050; + width: auto; + padding: 10px; + margin-right: auto; + margin-left: auto; +} + +.modal-content { + position: relative; + background-color: #ffffff; + border: 1px solid #999999; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 6px; + outline: none; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); + box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); + background-clip: padding-box; +} + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1030; + background-color: #000000; +} + +.modal-backdrop.fade { + opacity: 0; + filter: alpha(opacity=0); +} + +.modal-backdrop.in { + opacity: 0.5; + filter: alpha(opacity=50); +} + +.modal-header { + min-height: 16.428571429px; + padding: 15px; + border-bottom: 1px solid #e5e5e5; +} + +.modal-header .close { + margin-top: -2px; +} + +.modal-title { + margin: 0; + line-height: 1.428571429; +} + +.modal-body { + position: relative; + padding: 20px; +} + +.modal-footer { + padding: 19px 20px 20px; + margin-top: 15px; + text-align: right; + border-top: 1px solid #e5e5e5; +} + +.modal-footer:before, +.modal-footer:after { + display: table; + content: " "; +} + +.modal-footer:after { + clear: both; +} + +.modal-footer:before, +.modal-footer:after { + display: table; + content: " "; +} + +.modal-footer:after { + clear: both; +} + +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} + +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} + +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} + +@media screen and (min-width: 768px) { + .modal-dialog { + right: auto; + left: 50%; + width: 600px; + padding-top: 30px; + padding-bottom: 30px; + } + .modal-content { + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); + } +} + +.tooltip { + position: absolute; + z-index: 1030; + display: block; + font-size: 12px; + line-height: 1.4; + opacity: 0; + filter: alpha(opacity=0); + visibility: visible; +} + +.tooltip.in { + opacity: 0.9; + filter: alpha(opacity=90); +} + +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} + +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} + +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} + +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} + +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + border-radius: 4px; +} + +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-top-color: #000000; + border-width: 5px 5px 0; +} + +.tooltip.top-left .tooltip-arrow { + bottom: 0; + left: 5px; + border-top-color: #000000; + border-width: 5px 5px 0; +} + +.tooltip.top-right .tooltip-arrow { + right: 5px; + bottom: 0; + border-top-color: #000000; + border-width: 5px 5px 0; +} + +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-right-color: #000000; + border-width: 5px 5px 5px 0; +} + +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-left-color: #000000; + border-width: 5px 0 5px 5px; +} + +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-bottom-color: #000000; + border-width: 0 5px 5px; +} + +.tooltip.bottom-left .tooltip-arrow { + top: 0; + left: 5px; + border-bottom-color: #000000; + border-width: 0 5px 5px; +} + +.tooltip.bottom-right .tooltip-arrow { + top: 0; + right: 5px; + border-bottom-color: #000000; + border-width: 0 5px 5px; +} + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; + white-space: normal; + background-color: #ffffff; + border: 1px solid #cccccc; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + background-clip: padding-box; +} + +.popover.top { + margin-top: -10px; +} + +.popover.right { + margin-left: 10px; +} + +.popover.bottom { + margin-top: 10px; +} + +.popover.left { + margin-left: -10px; +} + +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; +} + +.popover-content { + padding: 9px 14px; +} + +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.popover .arrow { + border-width: 11px; +} + +.popover .arrow:after { + border-width: 10px; + content: ""; +} + +.popover.top .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999999; + border-top-color: rgba(0, 0, 0, 0.25); + border-bottom-width: 0; +} + +.popover.top .arrow:after { + bottom: 1px; + margin-left: -10px; + border-top-color: #ffffff; + border-bottom-width: 0; + content: " "; +} + +.popover.right .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999999; + border-right-color: rgba(0, 0, 0, 0.25); + border-left-width: 0; +} + +.popover.right .arrow:after { + bottom: -10px; + left: 1px; + border-right-color: #ffffff; + border-left-width: 0; + content: " "; +} + +.popover.bottom .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-bottom-color: #999999; + border-bottom-color: rgba(0, 0, 0, 0.25); + border-top-width: 0; +} + +.popover.bottom .arrow:after { + top: 1px; + margin-left: -10px; + border-bottom-color: #ffffff; + border-top-width: 0; + content: " "; +} + +.popover.left .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-left-color: #999999; + border-left-color: rgba(0, 0, 0, 0.25); + border-right-width: 0; +} + +.popover.left .arrow:after { + right: 1px; + bottom: -10px; + border-left-color: #ffffff; + border-right-width: 0; + content: " "; +} + +.carousel { + position: relative; +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} + +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + height: auto; + max-width: 100%; + line-height: 1; +} + +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} + +.carousel-inner > .active { + left: 0; +} + +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} + +.carousel-inner > .next { + left: 100%; +} + +.carousel-inner > .prev { + left: -100%; +} + +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} + +.carousel-inner > .active.left { + left: -100%; +} + +.carousel-inner > .active.right { + left: 100%; +} + +.carousel-control { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 15%; + font-size: 20px; + color: #ffffff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); + opacity: 0.5; + filter: alpha(opacity=50); +} + +.carousel-control.left { + background-image: -webkit-gradient(linear, 0 top, 100% top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.0001))); + background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.5) 0), color-stop(rgba(0, 0, 0, 0.0001) 100%)); + background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.0001) 100%); + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.0001) 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); +} + +.carousel-control.right { + right: 0; + left: auto; + background-image: -webkit-gradient(linear, 0 top, 100% top, from(rgba(0, 0, 0, 0.0001)), to(rgba(0, 0, 0, 0.5))); + background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.0001) 0), color-stop(rgba(0, 0, 0, 0.5) 100%)); + background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0, rgba(0, 0, 0, 0.5) 100%); + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0, rgba(0, 0, 0, 0.5) 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); +} + +.carousel-control:hover, +.carousel-control:focus { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} + +.carousel-control .icon-prev, +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-left, +.carousel-control .glyphicon-chevron-right { + position: absolute; + top: 50%; + left: 50%; + z-index: 5; + display: inline-block; +} + +.carousel-control .icon-prev, +.carousel-control .icon-next { + width: 20px; + height: 20px; + margin-top: -10px; + margin-left: -10px; + font-family: serif; +} + +.carousel-control .icon-prev:before { + content: '\2039'; +} + +.carousel-control .icon-next:before { + content: '\203a'; +} + +.carousel-indicators { + position: absolute; + bottom: 10px; + left: 50%; + z-index: 15; + width: 60%; + padding-left: 0; + margin-left: -30%; + text-align: center; + list-style: none; +} + +.carousel-indicators li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + cursor: pointer; + border: 1px solid #ffffff; + border-radius: 10px; +} + +.carousel-indicators .active { + width: 12px; + height: 12px; + margin: 0; + background-color: #ffffff; +} + +.carousel-caption { + position: absolute; + right: 15%; + bottom: 20px; + left: 15%; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #ffffff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); +} + +.carousel-caption .btn { + text-shadow: none; +} + +@media screen and (min-width: 768px) { + .carousel-control .icon-prev, + .carousel-control .icon-next { + width: 30px; + height: 30px; + margin-top: -15px; + margin-left: -15px; + font-size: 30px; + } + .carousel-caption { + right: 20%; + left: 20%; + padding-bottom: 30px; + } + .carousel-indicators { + bottom: 20px; + } +} + +.clearfix:before, +.clearfix:after { + display: table; + content: " "; +} + +.clearfix:after { + clear: both; +} + +.pull-right { + float: right !important; +} + +.pull-left { + float: left !important; +} + +.hide { + display: none !important; +} + +.show { + display: block !important; +} + +.invisible { + visibility: hidden; +} + +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.affix { + position: fixed; +} + +@-ms-viewport { + width: device-width; +} + +@media screen and (max-width: 400px) { + @-ms-viewport { + width: 320px; + } +} + +.hidden { + display: none !important; + visibility: hidden !important; +} + +.visible-xs { + display: none !important; +} + +tr.visible-xs { + display: none !important; +} + +th.visible-xs, +td.visible-xs { + display: none !important; +} + +@media (max-width: 767px) { + .visible-xs { + display: block !important; + } + tr.visible-xs { + display: table-row !important; + } + th.visible-xs, + td.visible-xs { + display: table-cell !important; + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .visible-xs.visible-sm { + display: block !important; + } + tr.visible-xs.visible-sm { + display: table-row !important; + } + th.visible-xs.visible-sm, + td.visible-xs.visible-sm { + display: table-cell !important; + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .visible-xs.visible-md { + display: block !important; + } + tr.visible-xs.visible-md { + display: table-row !important; + } + th.visible-xs.visible-md, + td.visible-xs.visible-md { + display: table-cell !important; + } +} + +@media (min-width: 1200px) { + .visible-xs.visible-lg { + display: block !important; + } + tr.visible-xs.visible-lg { + display: table-row !important; + } + th.visible-xs.visible-lg, + td.visible-xs.visible-lg { + display: table-cell !important; + } +} + +.visible-sm { + display: none !important; +} + +tr.visible-sm { + display: none !important; +} + +th.visible-sm, +td.visible-sm { + display: none !important; +} + +@media (max-width: 767px) { + .visible-sm.visible-xs { + display: block !important; + } + tr.visible-sm.visible-xs { + display: table-row !important; + } + th.visible-sm.visible-xs, + td.visible-sm.visible-xs { + display: table-cell !important; + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm { + display: block !important; + } + tr.visible-sm { + display: table-row !important; + } + th.visible-sm, + td.visible-sm { + display: table-cell !important; + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .visible-sm.visible-md { + display: block !important; + } + tr.visible-sm.visible-md { + display: table-row !important; + } + th.visible-sm.visible-md, + td.visible-sm.visible-md { + display: table-cell !important; + } +} + +@media (min-width: 1200px) { + .visible-sm.visible-lg { + display: block !important; + } + tr.visible-sm.visible-lg { + display: table-row !important; + } + th.visible-sm.visible-lg, + td.visible-sm.visible-lg { + display: table-cell !important; + } +} + +.visible-md { + display: none !important; +} + +tr.visible-md { + display: none !important; +} + +th.visible-md, +td.visible-md { + display: none !important; +} + +@media (max-width: 767px) { + .visible-md.visible-xs { + display: block !important; + } + tr.visible-md.visible-xs { + display: table-row !important; + } + th.visible-md.visible-xs, + td.visible-md.visible-xs { + display: table-cell !important; + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .visible-md.visible-sm { + display: block !important; + } + tr.visible-md.visible-sm { + display: table-row !important; + } + th.visible-md.visible-sm, + td.visible-md.visible-sm { + display: table-cell !important; + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md { + display: block !important; + } + tr.visible-md { + display: table-row !important; + } + th.visible-md, + td.visible-md { + display: table-cell !important; + } +} + +@media (min-width: 1200px) { + .visible-md.visible-lg { + display: block !important; + } + tr.visible-md.visible-lg { + display: table-row !important; + } + th.visible-md.visible-lg, + td.visible-md.visible-lg { + display: table-cell !important; + } +} + +.visible-lg { + display: none !important; +} + +tr.visible-lg { + display: none !important; +} + +th.visible-lg, +td.visible-lg { + display: none !important; +} + +@media (max-width: 767px) { + .visible-lg.visible-xs { + display: block !important; + } + tr.visible-lg.visible-xs { + display: table-row !important; + } + th.visible-lg.visible-xs, + td.visible-lg.visible-xs { + display: table-cell !important; + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .visible-lg.visible-sm { + display: block !important; + } + tr.visible-lg.visible-sm { + display: table-row !important; + } + th.visible-lg.visible-sm, + td.visible-lg.visible-sm { + display: table-cell !important; + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .visible-lg.visible-md { + display: block !important; + } + tr.visible-lg.visible-md { + display: table-row !important; + } + th.visible-lg.visible-md, + td.visible-lg.visible-md { + display: table-cell !important; + } +} + +@media (min-width: 1200px) { + .visible-lg { + display: block !important; + } + tr.visible-lg { + display: table-row !important; + } + th.visible-lg, + td.visible-lg { + display: table-cell !important; + } +} + +.hidden-xs { + display: block !important; +} + +tr.hidden-xs { + display: table-row !important; +} + +th.hidden-xs, +td.hidden-xs { + display: table-cell !important; +} + +@media (max-width: 767px) { + .hidden-xs { + display: none !important; + } + tr.hidden-xs { + display: none !important; + } + th.hidden-xs, + td.hidden-xs { + display: none !important; + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .hidden-xs.hidden-sm { + display: none !important; + } + tr.hidden-xs.hidden-sm { + display: none !important; + } + th.hidden-xs.hidden-sm, + td.hidden-xs.hidden-sm { + display: none !important; + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-xs.hidden-md { + display: none !important; + } + tr.hidden-xs.hidden-md { + display: none !important; + } + th.hidden-xs.hidden-md, + td.hidden-xs.hidden-md { + display: none !important; + } +} + +@media (min-width: 1200px) { + .hidden-xs.hidden-lg { + display: none !important; + } + tr.hidden-xs.hidden-lg { + display: none !important; + } + th.hidden-xs.hidden-lg, + td.hidden-xs.hidden-lg { + display: none !important; + } +} + +.hidden-sm { + display: block !important; +} + +tr.hidden-sm { + display: table-row !important; +} + +th.hidden-sm, +td.hidden-sm { + display: table-cell !important; +} + +@media (max-width: 767px) { + .hidden-sm.hidden-xs { + display: none !important; + } + tr.hidden-sm.hidden-xs { + display: none !important; + } + th.hidden-sm.hidden-xs, + td.hidden-sm.hidden-xs { + display: none !important; + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important; + } + tr.hidden-sm { + display: none !important; + } + th.hidden-sm, + td.hidden-sm { + display: none !important; + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-sm.hidden-md { + display: none !important; + } + tr.hidden-sm.hidden-md { + display: none !important; + } + th.hidden-sm.hidden-md, + td.hidden-sm.hidden-md { + display: none !important; + } +} + +@media (min-width: 1200px) { + .hidden-sm.hidden-lg { + display: none !important; + } + tr.hidden-sm.hidden-lg { + display: none !important; + } + th.hidden-sm.hidden-lg, + td.hidden-sm.hidden-lg { + display: none !important; + } +} + +.hidden-md { + display: block !important; +} + +tr.hidden-md { + display: table-row !important; +} + +th.hidden-md, +td.hidden-md { + display: table-cell !important; +} + +@media (max-width: 767px) { + .hidden-md.hidden-xs { + display: none !important; + } + tr.hidden-md.hidden-xs { + display: none !important; + } + th.hidden-md.hidden-xs, + td.hidden-md.hidden-xs { + display: none !important; + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .hidden-md.hidden-sm { + display: none !important; + } + tr.hidden-md.hidden-sm { + display: none !important; + } + th.hidden-md.hidden-sm, + td.hidden-md.hidden-sm { + display: none !important; + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important; + } + tr.hidden-md { + display: none !important; + } + th.hidden-md, + td.hidden-md { + display: none !important; + } +} + +@media (min-width: 1200px) { + .hidden-md.hidden-lg { + display: none !important; + } + tr.hidden-md.hidden-lg { + display: none !important; + } + th.hidden-md.hidden-lg, + td.hidden-md.hidden-lg { + display: none !important; + } +} + +.hidden-lg { + display: block !important; +} + +tr.hidden-lg { + display: table-row !important; +} + +th.hidden-lg, +td.hidden-lg { + display: table-cell !important; +} + +@media (max-width: 767px) { + .hidden-lg.hidden-xs { + display: none !important; + } + tr.hidden-lg.hidden-xs { + display: none !important; + } + th.hidden-lg.hidden-xs, + td.hidden-lg.hidden-xs { + display: none !important; + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .hidden-lg.hidden-sm { + display: none !important; + } + tr.hidden-lg.hidden-sm { + display: none !important; + } + th.hidden-lg.hidden-sm, + td.hidden-lg.hidden-sm { + display: none !important; + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-lg.hidden-md { + display: none !important; + } + tr.hidden-lg.hidden-md { + display: none !important; + } + th.hidden-lg.hidden-md, + td.hidden-lg.hidden-md { + display: none !important; + } +} + +@media (min-width: 1200px) { + .hidden-lg { + display: none !important; + } + tr.hidden-lg { + display: none !important; + } + th.hidden-lg, + td.hidden-lg { + display: none !important; + } +} + +.visible-print { + display: none !important; +} + +tr.visible-print { + display: none !important; +} + +th.visible-print, +td.visible-print { + display: none !important; +} + +@media print { + .visible-print { + display: block !important; + } + tr.visible-print { + display: table-row !important; + } + th.visible-print, + td.visible-print { + display: table-cell !important; + } + .hidden-print { + display: none !important; + } + tr.hidden-print { + display: none !important; + } + th.hidden-print, + td.hidden-print { + display: none !important; + } +} \ No newline at end of file diff --git a/report/assets/css/vendor/codemirror.css b/report/assets/css/vendor/codemirror.css new file mode 100644 index 00000000..bf995f48 --- /dev/null +++ b/report/assets/css/vendor/codemirror.css @@ -0,0 +1,239 @@ +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; +} +.CodeMirror-scroll { + /* Set scrolling behaviour here */ + overflow: auto; +} + +/* PADDING */ + +.CodeMirror-lines { + padding: 4px 0; /* Vertical padding around content */ +} +.CodeMirror pre { + padding: 0 4px; /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler { + background-color: white; /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; +} +.CodeMirror-linenumbers {} +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; +} + +/* CURSOR */ + +.CodeMirror pre.CodeMirror-cursor { + border-left: 1px solid black; +} +/* Shown when moving in bi-directional text */ +.CodeMirror pre.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} +.cm-keymap-fat-cursor pre.CodeMirror-cursor { + width: auto; + border: 0; + background: transparent; + background: rgba(0, 200, 0, .4); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800); +} +/* Kludge to turn off filter in ie9+, which also accepts rgba */ +.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) { + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} +/* Can style cursor different in overwrite (non-insert) mode */ +.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {} + +/* DEFAULT THEME */ + +.cm-s-default .cm-keyword {color: #708;} +.cm-s-default .cm-atom {color: #219;} +.cm-s-default .cm-number {color: #164;} +.cm-s-default .cm-def {color: #00f;} +.cm-s-default .cm-variable {color: black;} +.cm-s-default .cm-variable-2 {color: #05a;} +.cm-s-default .cm-variable-3 {color: #085;} +.cm-s-default .cm-property {color: black;} +.cm-s-default .cm-operator {color: black;} +.cm-s-default .cm-comment {color: #a50;} +.cm-s-default .cm-string {color: #a11;} +.cm-s-default .cm-string-2 {color: #f50;} +.cm-s-default .cm-meta {color: #555;} +.cm-s-default .cm-error {color: #f00;} +.cm-s-default .cm-qualifier {color: #555;} +.cm-s-default .cm-builtin {color: #30a;} +.cm-s-default .cm-bracket {color: #997;} +.cm-s-default .cm-tag {color: #170;} +.cm-s-default .cm-attribute {color: #00c;} +.cm-s-default .cm-header {color: blue;} +.cm-s-default .cm-quote {color: #090;} +.cm-s-default .cm-hr {color: #999;} +.cm-s-default .cm-link {color: #00c;} + +.cm-negative {color: #d44;} +.cm-positive {color: #292;} +.cm-header, .cm-strong {font-weight: bold;} +.cm-em {font-style: italic;} +.cm-emstrong {font-style: italic; font-weight: bold;} +.cm-link {text-decoration: underline;} + +.cm-invalidchar {color: #f00;} + +div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} +div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror { + line-height: 1; + position: relative; + overflow: hidden; +} + +.CodeMirror-scroll { + /* 30px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror, and the paddings in .CodeMirror-sizer */ + margin-bottom: -30px; margin-right: -30px; + padding-bottom: 30px; padding-right: 30px; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; +} +.CodeMirror-sizer { + position: relative; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actuall scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler { + position: absolute; + z-index: 6; + display: none; +} +.CodeMirror-vscrollbar { + right: 0; top: 0; + overflow-x: hidden; + overflow-y: scroll; +} +.CodeMirror-hscrollbar { + bottom: 0; left: 0; + overflow-y: hidden; + overflow-x: scroll; +} +.CodeMirror-scrollbar-filler { + right: 0; bottom: 0; + z-index: 6; +} + +.CodeMirror-gutters { + position: absolute; left: 0; top: 0; + height: 100%; + z-index: 3; +} +.CodeMirror-gutter { + height: 100%; + display: inline-block; + /* Hack to make IE7 behave */ + *zoom:1; + *display:inline; +} +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; +} + +.CodeMirror-lines { + cursor: text; +} +.CodeMirror pre { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; -webkit-border-radius: 0; -o-border-radius: 0; border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; +} +.CodeMirror-wrap pre { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; +} +.CodeMirror-linebackground { + position: absolute; + left: 0; right: 0; top: 0; bottom: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; +} + +.CodeMirror-wrap .CodeMirror-scroll { + overflow-x: hidden; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; height: 0px; + overflow: hidden; + visibility: hidden; +} +.CodeMirror-measure pre { position: static; } + +.CodeMirror pre.CodeMirror-cursor { + position: absolute; + visibility: hidden; + border-right: none; + width: 0; +} +.CodeMirror-focused pre.CodeMirror-cursor { + visibility: visible; +} + +.CodeMirror-selected { background: #d9d9d9; } +.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } + +.CodeMirror-searching { + background: #ffa; + background: rgba(255, 255, 0, .4); +} + +/* IE7 hack to prevent it from returning funny offsetTops on the spans */ +.CodeMirror span { *vertical-align: text-bottom; } + +@media print { + /* Hide the cursor when printing */ + .CodeMirror pre.CodeMirror-cursor { + visibility: hidden; + } +} diff --git a/report/assets/css/vendor/font-awesome.css b/report/assets/css/vendor/font-awesome.css new file mode 100755 index 00000000..3280ad45 --- /dev/null +++ b/report/assets/css/vendor/font-awesome.css @@ -0,0 +1,303 @@ +/* Font Awesome + the iconic font designed for use with Twitter Bootstrap + ------------------------------------------------------- + The full suite of pictographic icons, examples, and documentation + can be found at: http://fortawesome.github.com/Font-Awesome/ + + License + ------------------------------------------------------- + The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0: + http://creativecommons.org/licenses/by/3.0/ A mention of + 'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable + source code is considered acceptable attribution (most common on the web). + If human readable source code is not available to the end user, a mention in + an 'About' or 'Credits' screen is considered acceptable (most common in desktop + or mobile software). + + Contact + ------------------------------------------------------- + Email: dave@davegandy.com + Twitter: http://twitter.com/fortaweso_me + Work: http://lemonwi.se co-founder + + */ +@font-face { + font-family: "FontAwesome"; + src: url('../../font/fontawesome-webfont.eot'); + src: url('../../font/fontawesome-webfont.eot?#iefix') format('eot'), url('../../font/fontawesome-webfont.woff') format('woff'), url('../../font/fontawesome-webfont.ttf') format('truetype'), url('../../font/fontawesome-webfont.svg#FontAwesome') format('svg'); + font-weight: normal; + font-style: normal; +} + +/* Font Awesome styles + ------------------------------------------------------- */ +[class^="icon-"]:before, [class*=" icon-"]:before { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + display: inline-block; + text-decoration: inherit; +} +a [class^="icon-"], a [class*=" icon-"] { + display: inline-block; + text-decoration: inherit; +} +/* makes the font 33% larger relative to the icon container */ +.icon-large:before { + vertical-align: top; + font-size: 1.3333333333333333em; +} +.btn [class^="icon-"], .btn [class*=" icon-"] { + /* keeps button heights with and without icons the same */ + + line-height: .9em; +} +li [class^="icon-"], li [class*=" icon-"] { + display: inline-block; + width: 1.25em; + text-align: center; +} +li .icon-large[class^="icon-"], li .icon-large[class*=" icon-"] { + /* 1.5 increased font size for icon-large * 1.25 width */ + + width: 1.875em; +} +li[class^="icon-"], li[class*=" icon-"] { + margin-left: 0; + list-style-type: none; +} +li[class^="icon-"]:before, li[class*=" icon-"]:before { + text-indent: -2em; + text-align: center; +} +li[class^="icon-"].icon-large:before, li[class*=" icon-"].icon-large:before { + text-indent: -1.3333333333333333em; +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.icon-glass:before { content: "\f000"; } +.icon-music:before { content: "\f001"; } +.icon-search:before { content: "\f002"; } +.icon-envelope:before { content: "\f003"; } +.icon-heart:before { content: "\f004"; } +.icon-star:before { content: "\f005"; } +.icon-star-empty:before { content: "\f006"; } +.icon-user:before { content: "\f007"; } +.icon-film:before { content: "\f008"; } +.icon-th-large:before { content: "\f009"; } +.icon-th:before { content: "\f00a"; } +.icon-th-list:before { content: "\f00b"; } +.icon-ok:before { content: "\f00c"; } +.icon-remove:before { content: "\f00d"; } +.icon-zoom-in:before { content: "\f00e"; } + +.icon-zoom-out:before { content: "\f010"; } +.icon-off:before { content: "\f011"; } +.icon-signal:before { content: "\f012"; } +.icon-cog:before { content: "\f013"; } +.icon-trash:before { content: "\f014"; } +.icon-home:before { content: "\f015"; } +.icon-file:before { content: "\f016"; } +.icon-time:before { content: "\f017"; } +.icon-road:before { content: "\f018"; } +.icon-download-alt:before { content: "\f019"; } +.icon-download:before { content: "\f01a"; } +.icon-upload:before { content: "\f01b"; } +.icon-inbox:before { content: "\f01c"; } +.icon-play-circle:before { content: "\f01d"; } +.icon-repeat:before { content: "\f01e"; } + +/* \f020 doesn't work in Safari. all shifted one down */ +.icon-refresh:before { content: "\f021"; } +.icon-list-alt:before { content: "\f022"; } +.icon-lock:before { content: "\f023"; } +.icon-flag:before { content: "\f024"; } +.icon-headphones:before { content: "\f025"; } +.icon-volume-off:before { content: "\f026"; } +.icon-volume-down:before { content: "\f027"; } +.icon-volume-up:before { content: "\f028"; } +.icon-qrcode:before { content: "\f029"; } +.icon-barcode:before { content: "\f02a"; } +.icon-tag:before { content: "\f02b"; } +.icon-tags:before { content: "\f02c"; } +.icon-book:before { content: "\f02d"; } +.icon-bookmark:before { content: "\f02e"; } +.icon-print:before { content: "\f02f"; } + +.icon-camera:before { content: "\f030"; } +.icon-font:before { content: "\f031"; } +.icon-bold:before { content: "\f032"; } +.icon-italic:before { content: "\f033"; } +.icon-text-height:before { content: "\f034"; } +.icon-text-width:before { content: "\f035"; } +.icon-align-left:before { content: "\f036"; } +.icon-align-center:before { content: "\f037"; } +.icon-align-right:before { content: "\f038"; } +.icon-align-justify:before { content: "\f039"; } +.icon-list:before { content: "\f03a"; } +.icon-indent-left:before { content: "\f03b"; } +.icon-indent-right:before { content: "\f03c"; } +.icon-facetime-video:before { content: "\f03d"; } +.icon-picture:before { content: "\f03e"; } + +.icon-pencil:before { content: "\f040"; } +.icon-map-marker:before { content: "\f041"; } +.icon-adjust:before { content: "\f042"; } +.icon-tint:before { content: "\f043"; } +.icon-edit:before { content: "\f044"; } +.icon-share:before { content: "\f045"; } +.icon-check:before { content: "\f046"; } +.icon-move:before { content: "\f047"; } +.icon-step-backward:before { content: "\f048"; } +.icon-fast-backward:before { content: "\f049"; } +.icon-backward:before { content: "\f04a"; } +.icon-play:before { content: "\f04b"; } +.icon-pause:before { content: "\f04c"; } +.icon-stop:before { content: "\f04d"; } +.icon-forward:before { content: "\f04e"; } + +.icon-fast-forward:before { content: "\f050"; } +.icon-step-forward:before { content: "\f051"; } +.icon-eject:before { content: "\f052"; } +.icon-chevron-left:before { content: "\f053"; } +.icon-chevron-right:before { content: "\f054"; } +.icon-plus-sign:before { content: "\f055"; } +.icon-minus-sign:before { content: "\f056"; } +.icon-remove-sign:before { content: "\f057"; } +.icon-ok-sign:before { content: "\f058"; } +.icon-question-sign:before { content: "\f059"; } +.icon-info-sign:before { content: "\f05a"; } +.icon-screenshot:before { content: "\f05b"; } +.icon-remove-circle:before { content: "\f05c"; } +.icon-ok-circle:before { content: "\f05d"; } +.icon-ban-circle:before { content: "\f05e"; } + +.icon-arrow-left:before { content: "\f060"; } +.icon-arrow-right:before { content: "\f061"; } +.icon-arrow-up:before { content: "\f062"; } +.icon-arrow-down:before { content: "\f063"; } +.icon-share-alt:before { content: "\f064"; } +.icon-resize-full:before { content: "\f065"; } +.icon-resize-small:before { content: "\f066"; } +.icon-plus:before { content: "\f067"; } +.icon-minus:before { content: "\f068"; } +.icon-asterisk:before { content: "\f069"; } +.icon-exclamation-sign:before { content: "\f06a"; } +.icon-gift:before { content: "\f06b"; } +.icon-leaf:before { content: "\f06c"; } +.icon-fire:before { content: "\f06d"; } +.icon-eye-open:before { content: "\f06e"; } + +.icon-eye-close:before { content: "\f070"; } +.icon-warning-sign:before { content: "\f071"; } +.icon-plane:before { content: "\f072"; } +.icon-calendar:before { content: "\f073"; } +.icon-random:before { content: "\f074"; } +.icon-comment:before { content: "\f075"; } +.icon-magnet:before { content: "\f076"; } +.icon-chevron-up:before { content: "\f077"; } +.icon-chevron-down:before { content: "\f078"; } +.icon-retweet:before { content: "\f079"; } +.icon-shopping-cart:before { content: "\f07a"; } +.icon-folder-close:before { content: "\f07b"; } +.icon-folder-open:before { content: "\f07c"; } +.icon-resize-vertical:before { content: "\f07d"; } +.icon-resize-horizontal:before { content: "\f07e"; } + +.icon-bar-chart:before { content: "\f080"; } +.icon-twitter-sign:before { content: "\f081"; } +.icon-facebook-sign:before { content: "\f082"; } +.icon-camera-retro:before { content: "\f083"; } +.icon-key:before { content: "\f084"; } +.icon-cogs:before { content: "\f085"; } +.icon-comments:before { content: "\f086"; } +.icon-thumbs-up:before { content: "\f087"; } +.icon-thumbs-down:before { content: "\f088"; } +.icon-star-half:before { content: "\f089"; } +.icon-heart-empty:before { content: "\f08a"; } +.icon-signout:before { content: "\f08b"; } +.icon-linkedin-sign:before { content: "\f08c"; } +.icon-pushpin:before { content: "\f08d"; } +.icon-external-link:before { content: "\f08e"; } + +.icon-signin:before { content: "\f090"; } +.icon-trophy:before { content: "\f091"; } +.icon-github-sign:before { content: "\f092"; } +.icon-upload-alt:before { content: "\f093"; } +.icon-lemon:before { content: "\f094"; } +.icon-phone:before { content: "\f095"; } +.icon-check-empty:before { content: "\f096"; } +.icon-bookmark-empty:before { content: "\f097"; } +.icon-phone-sign:before { content: "\f098"; } +.icon-twitter:before { content: "\f099"; } +.icon-facebook:before { content: "\f09a"; } +.icon-github:before { content: "\f09b"; } +.icon-unlock:before { content: "\f09c"; } +.icon-credit-card:before { content: "\f09d"; } +.icon-rss:before { content: "\f09e"; } + +.icon-hdd:before { content: "\f0a0"; } +.icon-bullhorn:before { content: "\f0a1"; } +.icon-bell:before { content: "\f0a2"; } +.icon-certificate:before { content: "\f0a3"; } +.icon-hand-right:before { content: "\f0a4"; } +.icon-hand-left:before { content: "\f0a5"; } +.icon-hand-up:before { content: "\f0a6"; } +.icon-hand-down:before { content: "\f0a7"; } +.icon-circle-arrow-left:before { content: "\f0a8"; } +.icon-circle-arrow-right:before { content: "\f0a9"; } +.icon-circle-arrow-up:before { content: "\f0aa"; } +.icon-circle-arrow-down:before { content: "\f0ab"; } +.icon-globe:before { content: "\f0ac"; } +.icon-wrench:before { content: "\f0ad"; } +.icon-tasks:before { content: "\f0ae"; } + +.icon-filter:before { content: "\f0b0"; } +.icon-briefcase:before { content: "\f0b1"; } +.icon-fullscreen:before { content: "\f0b2"; } + +.icon-group:before { content: "\f0c0"; } +.icon-link:before { content: "\f0c1"; } +.icon-cloud:before { content: "\f0c2"; } +.icon-beaker:before { content: "\f0c3"; } +.icon-cut:before { content: "\f0c4"; } +.icon-copy:before { content: "\f0c5"; } +.icon-paper-clip:before { content: "\f0c6"; } +.icon-save:before { content: "\f0c7"; } +.icon-sign-blank:before { content: "\f0c8"; } +.icon-reorder:before { content: "\f0c9"; } +.icon-list-ul:before { content: "\f0ca"; } +.icon-list-ol:before { content: "\f0cb"; } +.icon-strikethrough:before { content: "\f0cc"; } +.icon-underline:before { content: "\f0cd"; } +.icon-table:before { content: "\f0ce"; } + +.icon-magic:before { content: "\f0d0"; } +.icon-truck:before { content: "\f0d1"; } +.icon-pinterest:before { content: "\f0d2"; } +.icon-pinterest-sign:before { content: "\f0d3"; } +.icon-google-plus-sign:before { content: "\f0d4"; } +.icon-google-plus:before { content: "\f0d5"; } +.icon-money:before { content: "\f0d6"; } +.icon-caret-down:before { content: "\f0d7"; } +.icon-caret-up:before { content: "\f0d8"; } +.icon-caret-left:before { content: "\f0d9"; } +.icon-caret-right:before { content: "\f0da"; } +.icon-columns:before { content: "\f0db"; } +.icon-sort:before { content: "\f0dc"; } +.icon-sort-down:before { content: "\f0dd"; } +.icon-sort-up:before { content: "\f0de"; } + +.icon-envelope-alt:before { content: "\f0e0"; } +.icon-linkedin:before { content: "\f0e1"; } +.icon-undo:before { content: "\f0e2"; } +.icon-legal:before { content: "\f0e3"; } +.icon-dashboard:before { content: "\f0e4"; } +.icon-comment-alt:before { content: "\f0e5"; } +.icon-comments-alt:before { content: "\f0e6"; } +.icon-bolt:before { content: "\f0e7"; } +.icon-sitemap:before { content: "\f0e8"; } +.icon-umbrella:before { content: "\f0e9"; } +.icon-paste:before { content: "\f0ea"; } + +.icon-user-md:before { content: "\f200"; } diff --git a/report/assets/css/vendor/morris.css b/report/assets/css/vendor/morris.css new file mode 100644 index 00000000..99a71344 --- /dev/null +++ b/report/assets/css/vendor/morris.css @@ -0,0 +1,2 @@ +.morris-hover{position:absolute;z-index:1000;}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255, 255, 255, 0.8);border:solid 2px rgba(230, 230, 230, 0.8);font-family:sans-serif;font-size:12px;text-align:center;}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0;} +.morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0;} \ No newline at end of file diff --git a/report/assets/font/fontawesome-webfont.eot b/report/assets/font/fontawesome-webfont.eot new file mode 100755 index 00000000..89070c1e Binary files /dev/null and b/report/assets/font/fontawesome-webfont.eot differ diff --git a/report/assets/font/fontawesome-webfont.svg b/report/assets/font/fontawesome-webfont.svg new file mode 100755 index 00000000..1245f92c --- /dev/null +++ b/report/assets/font/fontawesome-webfont.svg @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/report/assets/font/fontawesome-webfont.ttf b/report/assets/font/fontawesome-webfont.ttf new file mode 100755 index 00000000..c17e9f8d Binary files /dev/null and b/report/assets/font/fontawesome-webfont.ttf differ diff --git a/report/assets/font/fontawesome-webfont.woff b/report/assets/font/fontawesome-webfont.woff new file mode 100755 index 00000000..09f2469a Binary files /dev/null and b/report/assets/font/fontawesome-webfont.woff differ diff --git a/report/assets/scripts/bundles/codemirror.js b/report/assets/scripts/bundles/codemirror.js new file mode 100644 index 00000000..e7be94ef --- /dev/null +++ b/report/assets/scripts/bundles/codemirror.js @@ -0,0 +1,98 @@ +window.CodeMirror = (function () { + 'use strict'; + + function a(e, f) { if (!(this instanceof a)) return new a(e, f); this.options = f = f || {}; for (const h in _d)!f.hasOwnProperty(h) && _d.hasOwnProperty(h) && (f[h] = _d[h]); l(f); const j = this.display = b(e); j.wrapper.CodeMirror = this, i(this), f.autofocus && !Rd && _(this), this.view = c(new Dc([new Cc([rc('', null, R(j))])])), this.nextOpId = 0, d(this), g(this), f.lineWrapping && (this.display.wrapper.className += ' CodeMirror-wrap'), this.setValue(f.value || ''), Ed && setTimeout(ed($, this, !0), 20), this.view.history = Kc(), bb(this); let k; try { k = document.activeElement == j.input; } catch (m) {}k || f.autofocus && !Rd ? setTimeout(ed(rb, this), 20) : sb(this), V(this, function () { for (const a in $d)$d.propertyIsEnumerable(a) && $d[a](this, f[a], ae); for (let b = 0; b < ee.length; ++b)ee[b](this); })(); } function b(a) { const b = {}; const c = b.input = hd('textarea', null, null, 'position: absolute; padding: 0; width: 1px; height: 1em; outline: none;'); c.setAttribute('wrap', 'off'), c.setAttribute('autocorrect', 'off'), c.setAttribute('autocapitalize', 'off'), b.inputDiv = hd('div', [c], null, 'overflow: hidden; position: relative; width: 3px; height: 0px;'), b.scrollbarH = hd('div', [hd('div', null, null, 'height: 1px')], 'CodeMirror-hscrollbar'), b.scrollbarV = hd('div', [hd('div', null, null, 'width: 1px')], 'CodeMirror-vscrollbar'), b.scrollbarFiller = hd('div', null, 'CodeMirror-scrollbar-filler'), b.lineDiv = hd('div'), b.selectionDiv = hd('div', null, null, 'position: relative; z-index: 1'), b.cursor = hd('pre', ' ', 'CodeMirror-cursor'), b.otherCursor = hd('pre', ' ', 'CodeMirror-cursor CodeMirror-secondarycursor'), b.measure = hd('div', null, 'CodeMirror-measure'), b.lineSpace = hd('div', [b.measure, b.selectionDiv, b.lineDiv, b.cursor, b.otherCursor], null, 'position: relative; outline: none'), b.mover = hd('div', [hd('div', [b.lineSpace], 'CodeMirror-lines')], null, 'position: relative'), b.sizer = hd('div', [b.mover], 'CodeMirror-sizer'), b.heightForcer = hd('div', ' ', null, `position: absolute; height: ${je}px`), b.gutters = hd('div', null, 'CodeMirror-gutters'), b.lineGutter = null; const d = hd('div', [b.sizer, b.heightForcer, b.gutters], null, 'position: relative; min-height: 100%'); return b.scroller = hd('div', [d], 'CodeMirror-scroll'), b.scroller.setAttribute('tabIndex', '-1'), b.wrapper = hd('div', [b.inputDiv, b.scrollbarH, b.scrollbarV, b.scrollbarFiller, b.scroller], 'CodeMirror'), Fd && (b.gutters.style.zIndex = -1, b.scroller.style.paddingRight = 0), a.appendChild ? a.appendChild(b.wrapper) : a(b.wrapper), Qd && (c.style.width = '0px'), Hd || (b.scroller.draggable = !0), Md ? (b.inputDiv.style.height = '1px', b.inputDiv.style.position = 'absolute') : Fd && (b.scrollbarH.style.minWidth = b.scrollbarV.style.minWidth = '18px'), b.viewOffset = b.showingFrom = b.showingTo = b.lastSizeC = 0, b.lineNumWidth = b.lineNumInnerWidth = b.lineNumChars = null, b.prevInput = '', b.alignWidgets = !1, b.pollingFast = !1, b.poll = new Zc(), b.draggingText = !1, b.cachedCharWidth = b.cachedTextHeight = null, b.measureLineCache = [], b.measureLineCachePos = 0, b.inaccurateSelection = !1, b.pasteIncoming = !1, b; } function c(a) { const b = { line: 0, ch: 0 }; return { doc: a, frontier: 0, highlight: new Zc(), sel: { from: b, to: b, head: b, anchor: b, shift: !1, extend: !1 }, scrollTop: 0, scrollLeft: 0, overwrite: !1, focused: !1, maxLine: Ec(a, 0), maxLineLength: 0, maxLineChanged: !1, suppressEdits: !1, goalColumn: null, cantEdit: !1, keyMaps: [] }; } function d(b) { const c = b.view.doc; b.view.mode = a.getMode(b.options, b.options.mode), c.iter(0, c.size, (a) => { a.stateAfter = null; }), b.view.frontier = 0, C(b, 100); } function e(a) { const b = a.view.doc; const c = R(a.display); if (a.options.lineWrapping) { a.display.wrapper.className += ' CodeMirror-wrap'; const d = a.display.scroller.clientWidth / S(a.display) - 3; b.iter(0, b.size, (a) => { if (a.height != 0) { const b = Math.ceil(a.text.length / d) || 1; b != 1 && Fc(a, b * c); } }), a.display.sizer.style.minWidth = ''; } else a.display.wrapper.className = a.display.wrapper.className.replace(' CodeMirror-wrap', ''), k(a.view), b.iter(0, b.size, (a) => { a.height != 0 && Fc(a, c); }); W(a, 0, b.size), L(a), setTimeout(() => { m(a.display, a.view.doc.height); }, 100); } function f(a) { const b = ge[a.options.keyMap].style; a.display.wrapper.className = a.display.wrapper.className.replace(/\s*cm-keymap-\S+/g, '') + (b ? ` cm-keymap-${b}` : ''); } function g(a) { a.display.wrapper.className = a.display.wrapper.className.replace(/\s*cm-s-\S+/g, '') + a.options.theme.replace(/(^|\s)\s*/g, ' cm-s-'), L(a); } function h(a) { i(a), s(a, !0); } function i(a) { const b = a.display.gutters; const c = a.options.gutters; id(b); for (var d = 0; d < c.length; ++d) { const e = c[d]; const f = b.appendChild(hd('div', null, `CodeMirror-gutter ${e}`)); e == 'CodeMirror-linenumbers' && (a.display.lineGutter = f, f.style.width = `${a.display.lineNumWidth || 1}px`); }b.style.display = d ? '' : 'none'; } function j(a, b) { if (b.height == 0) return 0; for (var c, d = b.text.length, e = b; c = hc(e);) { var f = c.find(); e = Ec(a, f.from.line), d += f.from.ch - f.to.ch; } for (e = b; c = ic(e);) { var f = c.find(); d -= e.text.length - f.from.ch, e = Ec(a, f.to.line), d += e.text.length - f.to.ch; } return d; } function k(a) { a.maxLine = Ec(a.doc, 0), a.maxLineLength = j(a.doc, a.maxLine), a.maxLineChanged = !0, a.doc.iter(1, a.doc.size, (b) => { const c = j(a.doc, b); c > a.maxLineLength && (a.maxLineLength = c, a.maxLine = b); }); } function l(a) { for (var b = !1, c = 0; c < a.gutters.length; ++c)a.gutters[c] == 'CodeMirror-linenumbers' && (a.lineNumbers ? b = !0 : a.gutters.splice(c--, 1)); !b && a.lineNumbers && a.gutters.push('CodeMirror-linenumbers'); } function m(a, b) { const c = b + 2 * G(a); a.sizer.style.minHeight = a.heightForcer.style.top = `${c}px`; const d = Math.max(c, a.scroller.scrollHeight); const e = a.scroller.scrollWidth > a.scroller.clientWidth; const f = d > a.scroller.clientHeight; f ? (a.scrollbarV.style.display = 'block', a.scrollbarV.style.bottom = e ? `${ld(a.measure)}px` : '0', a.scrollbarV.firstChild.style.height = `${d - a.scroller.clientHeight + a.scrollbarV.clientHeight}px`) : a.scrollbarV.style.display = '', e ? (a.scrollbarH.style.display = 'block', a.scrollbarH.style.right = f ? `${ld(a.measure)}px` : '0', a.scrollbarH.firstChild.style.width = `${a.scroller.scrollWidth - a.scroller.clientWidth + a.scrollbarH.clientWidth}px`) : a.scrollbarH.style.display = '', e && f ? (a.scrollbarFiller.style.display = 'block', a.scrollbarFiller.style.height = a.scrollbarFiller.style.width = `${ld(a.measure)}px`) : a.scrollbarFiller.style.display = '', Nd && ld(a.measure) === 0 && (a.scrollbarV.style.minWidth = a.scrollbarH.style.minHeight = Od ? '18px' : '12px'); } function n(a, b, c) { let d = a.scroller.scrollTop; let e = a.wrapper.clientHeight; typeof c === 'number' ? d = c : c && (d = c.top, e = c.bottom - c.top), d = Math.floor(d - G(a)); const f = Math.ceil(d + e); return { from: Hc(b, d), to: Hc(b, f) }; } function o(a) { const b = a.display; if (b.alignWidgets || b.gutters.firstChild) { for (var c = r(b) - b.scroller.scrollLeft + a.view.scrollLeft, d = b.gutters.offsetWidth, e = `${c}px`, f = b.lineDiv.firstChild; f; f = f.nextSibling) if (f.alignable) for (let g = 0, h = f.alignable; g < h.length; ++g)h[g].style.left = e; b.gutters.style.left = `${c + d}px`; } } function p(a) { if (!a.options.lineNumbers) return !1; const b = a.view.doc; const c = q(a.options, b.size - 1); const d = a.display; if (c.length != d.lineNumChars) { const e = d.measure.appendChild(hd('div', [hd('div', c)], 'CodeMirror-linenumber CodeMirror-gutter-elt')); const f = e.firstChild.offsetWidth; const g = e.offsetWidth - f; return d.lineGutter.style.width = '', d.lineNumInnerWidth = Math.max(f, d.lineGutter.offsetWidth - g), d.lineNumWidth = d.lineNumInnerWidth + g, d.lineNumChars = d.lineNumInnerWidth ? c.length : -1, d.lineGutter.style.width = `${d.lineNumWidth}px`, !0; } return !1; } function q(a, b) { return String(a.lineNumberFormatter(b + a.firstLineNumber)); } function r(a) { return a.scroller.getBoundingClientRect().left - a.sizer.getBoundingClientRect().left; } function s(a, b, c) { const d = a.display.showingFrom; const e = a.display.showingTo; const f = t(a, b, c); return f && (Xc(a, a, 'update', a), (a.display.showingFrom != d || a.display.showingTo != e) && Xc(a, a, 'viewportChange', a, a.display.showingFrom, a.display.showingTo)), y(a), m(a.display, a.view.doc.height), f; } function t(a, b, c) { const d = a.display; const e = a.view.doc; if (!d.wrapper.clientWidth) return d.showingFrom = d.showingTo = d.viewOffset = 0, void 0; const f = n(d, e, c); if (!(b !== !0 && b.length == 0 && f.from > d.showingFrom && f.to < d.showingTo)) { if (b && p(a) && (b = !0), d.sizer.style.marginLeft = d.scrollbarH.style.left = `${d.gutters.offsetWidth}px`, b !== !0 && Ud) for (var g = 0; g < b.length; ++g) for (var h, i = b[g]; h = hc(Ec(e, i.from));) { var j = h.find().from.line; i.diff && (i.diff -= i.from - j), i.from = j; } let k = b === !0 ? 0 : 1 / 0; if (a.options.lineNumbers && b && b !== !0) for (var g = 0; g < b.length; ++g) if (b[g].diff) { k = b[g].from; break; } var j = Math.max(f.from - a.options.viewportMargin, 0); let l = Math.min(e.size, f.to + a.options.viewportMargin); if (d.showingFrom < j && j - d.showingFrom < 20 && (j = d.showingFrom), d.showingTo > l && d.showingTo - l < 20 && (l = Math.min(e.size, d.showingTo)), Ud) for (j = Gc(jc(e, Ec(e, j))); l < e.size && kc(Ec(e, l));)++l; for (var m = b === !0 ? [] : u([{ from: d.showingFrom, to: d.showingTo }], b), o = 0, g = 0; g < m.length; ++g) { const q = m[g]; q.from < j && (q.from = j), q.to > l && (q.to = l), q.from >= q.to ? m.splice(g--, 1) : o += q.to - q.from; } if (o != l - j || j != d.showingFrom || l != d.showingTo) { m.sort((a, b) => a.from - b.from), 0.7 * (l - j) > o && (d.lineDiv.style.display = 'none'), w(a, j, l, m, k), d.lineDiv.style.display = ''; const r = j != d.showingFrom || l != d.showingTo || d.lastSizeC != d.wrapper.clientHeight; r && (d.lastSizeC = d.wrapper.clientHeight), d.showingFrom = j, d.showingTo = l, C(a, 100); for (var s, t = d.lineDiv.offsetTop, v = d.lineDiv.firstChild; v; v = v.nextSibling) if (v.lineObj) { if (Fd) { const x = v.offsetTop + v.offsetHeight; s = x - t, t = x; } else { const y = v.getBoundingClientRect(); s = y.bottom - y.top; } const z = v.lineObj.height - s; s < 2 && (s = R(d)), (z > 0.001 || z < -0.001) && Fc(v.lineObj, s); } return d.viewOffset = Ic(a, Ec(e, j)), d.mover.style.top = `${d.viewOffset}px`, !0; } } } function u(a, b) { for (let c = 0, d = b.length || 0; d > c; ++c) { for (var e = b[c], f = [], g = e.diff || 0, h = 0, i = a.length; i > h; ++h) { const j = a[h]; e.to <= j.from && e.diff ? f.push({ from: j.from + g, to: j.to + g }) : e.to <= j.from || e.from >= j.to ? f.push(j) : (e.from > j.from && f.push({ from: j.from, to: e.from }), e.to < j.to && f.push({ from: e.to + g, to: j.to + g })); }a = f; } return a; } function v(a) { for (var b = a.display, c = {}, d = {}, e = b.gutters.firstChild, f = 0; e; e = e.nextSibling, ++f)c[a.options.gutters[f]] = e.offsetLeft, d[a.options.gutters[f]] = e.offsetWidth; return { fixedPos: r(b), gutterTotalWidth: b.gutters.offsetWidth, gutterLeft: c, gutterWidth: d, wrapperWidth: b.wrapper.clientWidth }; } function w(a, b, c, d, e) { function f(b) { const c = b.nextSibling; return Hd && Sd && a.display.currentWheelTarget == b ? (b.style.display = 'none', b.lineObj = null) : j.removeChild(b), c; } const g = v(a); const h = a.display; const i = a.options.lineNumbers; d.length || Ed || Hd && a.display.currentWheelTarget || id(h.lineDiv); var j = h.lineDiv; let k = j.firstChild; let l = d.shift(); let m = b; for (a.view.doc.iter(b, c, (b) => { if (l && l.to == m && (l = d.shift()), kc(b))b.height != 0 && Fc(b, 0); else if (l && l.from <= m && l.to > m) { for (;k.lineObj != b;)k = f(k); i && m >= e && k.lineNumber && kd(k.lineNumber, q(a.options, m)), k = k.nextSibling; } else { const c = x(a, b, m, g); j.insertBefore(c, k), c.lineObj = b; }++m; }); k;)k = f(k); } function x(a, b, c, d) { const e = xc(a, b); const f = b.gutterMarkers; const g = a.display; if (!(a.options.lineNumbers || f || b.bgClass || b.wrapClass || b.widgets && b.widgets.length)) return e; const h = hd('div', null, b.wrapClass, 'position: relative'); if (a.options.lineNumbers || f) { var i = h.appendChild(hd('div', null, null, `position: absolute; left: ${d.fixedPos}px`)); if (h.alignable = [i], !a.options.lineNumbers || f && f['CodeMirror-linenumbers'] || (h.lineNumber = i.appendChild(hd('div', q(a.options, c), 'CodeMirror-linenumber CodeMirror-gutter-elt', `left: ${d.gutterLeft['CodeMirror-linenumbers']}px; width: ${g.lineNumInnerWidth}px`))), f) for (let j = 0; j < a.options.gutters.length; ++j) { const k = a.options.gutters[j]; const l = f.hasOwnProperty(k) && f[k]; l && i.appendChild(hd('div', [l], 'CodeMirror-gutter-elt', `left: ${d.gutterLeft[k]}px; width: ${d.gutterWidth[k]}px`)); } } if (b.bgClass && h.appendChild(hd('div', ' ', `${b.bgClass} CodeMirror-linebackground`)), h.appendChild(e), b.widgets) for (let m = 0, n = b.widgets; m < n.length; ++m) { const o = n[m]; const p = hd('div', [o.node], 'CodeMirror-linewidget'); if (p.widget = o, o.noHScroll) { (h.alignable || (h.alignable = [])).push(p); let r = d.wrapperWidth; p.style.left = `${d.fixedPos}px`, o.coverGutter || (r -= d.gutterTotalWidth, p.style.paddingLeft = `${d.gutterTotalWidth}px`), p.style.width = `${r}px`; }o.coverGutter && (p.style.zIndex = 5, p.style.position = 'relative', o.noHScroll || (p.style.marginLeft = `${-d.gutterTotalWidth}px`)), o.above ? h.insertBefore(p, a.options.lineNumbers && b.height != 0 ? i : e) : h.appendChild(p); } return Fd && (h.style.zIndex = 2), h; } function y(a) { const b = a.display; const c = zb(a.view.sel.from, a.view.sel.to); c || a.options.showCursorWhenSelecting ? z(a) : b.cursor.style.display = b.otherCursor.style.display = 'none', c ? b.selectionDiv.style.display = 'none' : A(a); const d = O(a, a.view.sel.head, 'div'); const e = b.wrapper.getBoundingClientRect(); const f = b.lineDiv.getBoundingClientRect(); b.inputDiv.style.top = `${Math.max(0, Math.min(b.wrapper.clientHeight - 10, d.top + f.top - e.top))}px`, b.inputDiv.style.left = `${Math.max(0, Math.min(b.wrapper.clientWidth - 10, d.left + f.left - e.left))}px`; } function z(a) { const b = a.display; const c = O(a, a.view.sel.head, 'div'); b.cursor.style.left = `${c.left}px`, b.cursor.style.top = `${c.top}px`, b.cursor.style.height = `${Math.max(0, c.bottom - c.top) * a.options.cursorHeight}px`, b.cursor.style.display = '', c.other ? (b.otherCursor.style.display = '', b.otherCursor.style.left = `${c.other.left}px`, b.otherCursor.style.top = `${c.other.top}px`, b.otherCursor.style.height = `${0.85 * (c.other.bottom - c.other.top)}px`) : b.otherCursor.style.display = 'none'; } function A(a) { function b(a, b, c, d) { b < 0 && (b = 0), g.appendChild(hd('div', null, 'CodeMirror-selected', `position: absolute; left: ${a}px; top: ${b}px; width: ${c == null ? h - a : c}px; height: ${d - b}px`)); } function c(c, d, f, g) { function j(b) { return N(a, { line: c, ch: b }, 'div', k); } var k = Ec(e, c); const l = k.text.length; let m = g ? 1 / 0 : -1 / 0; return nd(Jc(k), d || 0, f == null ? l : f, (a, c, e) => { const k = j(e == 'rtl' ? c - 1 : a); const n = j(e == 'rtl' ? a : c - 1); let o = k.left; let p = n.right; n.top - k.top > 3 && (b(o, k.top, null, k.bottom), o = i, k.bottom < n.top && b(o, k.bottom, null, n.top)), f == null && c == l && (p = h), d == null && a == 0 && (o = i), m = g ? Math.min(n.top, m) : Math.max(n.bottom, m), i + 1 > o && (o = i), b(o, n.top, p - o, n.bottom); }), m; } const d = a.display; var e = a.view.doc; const f = a.view.sel; var g = document.createDocumentFragment(); var h = d.lineSpace.offsetWidth; var i = H(a.display); if (f.from.line == f.to.line)c(f.from.line, f.from.ch, f.to.ch); else { for (var j, k, l = Ec(e, f.from.line), m = l, n = [f.from.line, f.from.ch]; j = ic(m);) { const o = j.find(); if (n.push(o.from.ch, o.to.line, o.to.ch), o.to.line == f.to.line) { n.push(f.to.ch), k = !0; break; }m = Ec(e, o.to.line); } if (k) for (let p = 0; p < n.length; p += 3)c(n[p], n[p + 1], n[p + 2]); else { let q; let r; const s = Ec(e, f.to.line); q = f.from.ch ? c(f.from.line, f.from.ch, null, !1) : Ic(a, l) - d.viewOffset, r = f.to.ch ? c(f.to.line, hc(s) ? null : 0, f.to.ch, !0) : Ic(a, s) - d.viewOffset, r > q && b(i, q, null, r); } }jd(d.selectionDiv, g), d.selectionDiv.style.display = ''; } function B(a) { const b = a.display; clearInterval(b.blinker); let c = !0; b.cursor.style.visibility = b.otherCursor.style.visibility = '', b.blinker = setInterval(() => { b.cursor.offsetHeight && (b.cursor.style.visibility = b.otherCursor.style.visibility = (c = !c) ? '' : 'hidden'); }, a.options.cursorBlinkRate); } function C(a, b) { a.view.frontier < a.display.showingTo && a.view.highlight.set(b, ed(D, a)); } function D(a) { const b = a.view; const c = b.doc; if (!(b.frontier >= a.display.showingTo)) { let d; const e = +new Date() + a.options.workTime; const f = Tb(b.mode, F(a, b.frontier)); const g = []; c.iter(b.frontier, Math.min(c.size, a.display.showingTo + 500), c => (b.frontier >= a.display.showingFrom ? (uc(a, c, f) && b.frontier >= a.display.showingFrom && (d && d.end == b.frontier ? d.end++ : g.push(d = { start: b.frontier, end: b.frontier + 1 })), c.stateAfter = Tb(b.mode, f)) : (vc(a, c, f), c.stateAfter = b.frontier % 5 == 0 ? Tb(b.mode, f) : null), ++b.frontier, +new Date() > e ? (C(a, a.options.workDelay), !0) : void 0)), g.length && V(a, function () { for (let a = 0; a < g.length; ++a)W(this, g[a].start, g[a].end); })(); } } function E(a, b) { for (var c, d, e = a.view.doc, f = b, g = b - 100; f > g; --f) { if (f == 0) return 0; const h = Ec(e, f - 1); if (h.stateAfter) return f; const i = $c(h.text, null, a.options.tabSize); (d == null || c > i) && (d = f - 1, c = i); } return d; } function F(a, b) { const c = a.view; let d = E(a, b); let e = d && Ec(c.doc, d - 1).stateAfter; return e = e ? Tb(c.mode, e) : Ub(c.mode), c.doc.iter(d, b, (f) => { vc(a, f, e); const g = d == b - 1 || d % 5 == 0 || d >= c.showingFrom && d < c.showingTo; f.stateAfter = g ? Tb(c.mode, e) : null, ++d; }), e; } function G(a) { return a.lineSpace.offsetTop; } function H(a) { const b = jd(a.measure, hd('pre')).appendChild(hd('span', 'x')); return b.offsetLeft; } function I(a, b, c, d) { for (var d = d || J(a, b), e = -1, f = c; ;f += e) { var g = d[f]; if (g) break; e < 0 && f == 0 && (e = 1); } return { left: c > f ? g.right : g.left, right: f > c ? g.left : g.right, top: g.top, bottom: g.bottom }; } function J(a, b) { for (var c = a.display, d = a.display.measureLineCache, e = 0; e < d.length; ++e) { var f = d[e]; if (f.text == b.text && f.markedSpans == b.markedSpans && c.scroller.clientWidth == f.width) return f.measure; } const g = K(a, b); var f = { text: b.text, width: c.scroller.clientWidth, markedSpans: b.markedSpans, measure: g }; return d.length == 16 ? d[++c.measureLineCachePos % 16] = f : d.push(f), g; } function K(a, b) { const c = a.display; const d = dd(b.text.length); const e = xc(a, b, d); if (Ed && !Fd && !a.options.lineWrapping && e.childNodes.length > 100) { for (var f = document.createDocumentFragment(), g = 10, h = e.childNodes.length, i = 0, j = Math.ceil(h / g); j > i; ++i) { for (var k = hd('div', null, null, 'display: inline-block'), l = 0; g > l && h; ++l)k.appendChild(e.firstChild), --h; f.appendChild(k); }e.appendChild(f); }jd(c.measure, e); for (var m, n = c.lineDiv.getBoundingClientRect(), o = [], p = dd(b.text.length), q = e.offsetHeight, i = 0; i < d.length; ++i) if (m = d[i]) { for (var r = m.getBoundingClientRect(), s = Math.max(0, r.top - n.top), t = Math.min(r.bottom - n.top, q), l = 0; l < o.length; l += 2) { const u = o[l]; const v = o[l + 1]; if (!(u > t || s > v) && (s >= u && v >= t || u >= s && t >= v || Math.min(t, v) - Math.max(s, u) >= t - s >> 1)) { o[l] = Math.min(s, u), o[l + 1] = Math.max(t, v); break; } }l == o.length && o.push(s, t), p[i] = { left: r.left - n.left, right: r.right - n.left, top: l }; } for (var m, i = 0; i < p.length; ++i) if (m = p[i]) { const w = m.top; m.top = o[w], m.bottom = o[w + 1]; } return p; } function L(a) { a.display.measureLineCache.length = a.display.measureLineCachePos = 0, a.display.cachedCharWidth = a.display.cachedTextHeight = null, a.view.maxLineChanged = !0; } function M(a, b, c, d) { if (b.widgets) for (let e = 0; e < b.widgets.length; ++e) if (b.widgets[e].above) { const f = b.widgets[e].node.offsetHeight; c.top += f, c.bottom += f; } if (d == 'line') return c; d || (d = 'local'); let g = Ic(a, b); if (d != 'local' && (g -= a.display.viewOffset), d == 'page') { const h = a.display.lineSpace.getBoundingClientRect(); g += h.top + (window.pageYOffset || (document.documentElement || document.body).scrollTop); const i = h.left + (window.pageXOffset || (document.documentElement || document.body).scrollLeft); c.left += i, c.right += i; } return c.top += g, c.bottom += g, c; } function N(a, b, c, d) { return d || (d = Ec(a.view.doc, b.line)), M(a, d, I(a, d, b.ch), c); } function O(a, b, c, d, e) { function f(b, f) { const g = I(a, d, b, e); return f ? g.left = g.right : g.right = g.left, M(a, d, g, c); }d = d || Ec(a.view.doc, b.line), e || (e = J(a, d)); const g = Jc(d); const h = b.ch; if (!g) return f(h); for (var i, j, k = g[0].level, l = 0; l < g.length; ++l) { var m; var n; const o = g[l]; const p = o.level % 2; if (o.from < h && o.to > h) return f(h, p); const q = p ? o.to : o.from; const r = p ? o.from : o.to; if (q == h)n = l && o.level < (m = g[l - 1]).level ? f(m.level % 2 ? m.from : m.to - 1, !0) : f(p && o.from != o.to ? h - 1 : h), p == k ? i = n : j = n; else if (r == h) { var m = l < g.length - 1 && g[l + 1]; if (!p && m && m.from == m.to) continue; n = m && o.level < m.level ? f(m.level % 2 ? m.to - 1 : m.from) : f(p ? h : h - 1, !0), p == k ? i = n : j = n; } } return k && !h && (j = f(g[0].to - 1)), i ? (j && (i.other = j), i) : j; } function P(a, b, c) { const d = a.view.doc; if (c += a.display.viewOffset, c < 0) return { line: 0, ch: 0, outside: !0 }; let e = Hc(d, c); if (e >= d.size) return { line: d.size - 1, ch: Ec(d, d.size - 1).text.length }; for (b < 0 && (b = 0); ;) { const f = Ec(d, e); const g = Q(a, f, e, b, c); const h = ic(f); if (!h || g.ch != rd(f)) return g; e = h.find().to.line; } } function Q(a, b, c, d, e) { function f(d) { const e = O(a, { line: c, ch: d }, 'line', b, j); return h = !0, g > e.bottom ? Math.max(0, e.left - i) : g < e.top ? e.left + i : (h = !1, e.left); } var g = e - Ic(a, b); var h = !1; var i = a.display.wrapper.clientWidth; var j = J(a, b); const k = Jc(b); let l = b.text.length; let m = qd(b); let n = rd(b); let o = H(a.display); let p = f(n); if (d > p) return { line: c, ch: n, outside: h }; for (;;) { if (k ? n == m || n == ud(b, m, 1) : n - m <= 1) { for (var q = p - d > d - o, r = q ? m : n; ne.test(b.text.charAt(r));)++r; return { line: c, ch: r, after: q, outside: h }; } const s = Math.ceil(l / 2); let t = m + s; if (k) { t = m; for (let u = 0; s > u; ++u)t = ud(b, t, 1); } const v = f(t); v > d ? (n = t, p = v, h && (p += 1e3), l -= s) : (m = t, o = v, l = s); } } function R(a) { if (a.cachedTextHeight != null) return a.cachedTextHeight; if (wd == null) { wd = hd('pre'); for (let b = 0; b < 49; ++b)wd.appendChild(document.createTextNode('x')), wd.appendChild(hd('br')); wd.appendChild(document.createTextNode('x')); }jd(a.measure, wd); const c = wd.offsetHeight / 50; return c > 3 && (a.cachedTextHeight = c), id(a.measure), c || 1; } function S(a) { if (a.cachedCharWidth != null) return a.cachedCharWidth; const b = hd('span', 'x'); const c = hd('pre', [b]); jd(a.measure, c); const d = b.offsetWidth; return d > 2 && (a.cachedCharWidth = d), d || 10; } function T(a) { a.curOp ? ++a.curOp.depth : a.curOp = { depth: 1, changes: [], delayedCallbacks: [], updateInput: null, userSelChange: null, textChanged: null, selectionChanged: !1, updateMaxLine: !1, id: ++a.nextOpId }; } function U(a) { const b = a.curOp; if (!--b.depth) { a.curOp = null; const c = a.view; const d = a.display; if (b.updateMaxLine && k(c), c.maxLineChanged && !a.options.lineWrapping) { const e = I(a, c.maxLine, c.maxLine.text.length).right; d.sizer.style.minWidth = `${e + 3 + je}px`, c.maxLineChanged = !1; } let f; let g; if (b.selectionChanged) { const h = O(a, c.sel.head); f = Mb(a, h.left, h.top, h.left, h.bottom); }(b.changes.length || f && f.scrollTop != null) && (g = s(a, b.changes, f && f.scrollTop)), !g && b.selectionChanged && y(a), f && Jb(a), b.selectionChanged && B(a), c.focused && b.updateInput && $(a, b.userSelChange), b.textChanged && Wc(a, 'change', a, b.textChanged), b.selectionChanged && Wc(a, 'cursorActivity', a); for (let i = 0; i < b.delayedCallbacks.length; ++i)b.delayedCallbacks[i](a); } } function V(a, b) { return function () { const c = a || this; T(c); try { var d = b.apply(c, arguments); } finally { U(c); } return d; }; } function W(a, b, c, d) { a.curOp.changes.push({ from: b, to: c, diff: d }); } function X(a) { a.view.pollingFast || a.display.poll.set(a.options.pollInterval, () => { Z(a), a.view.focused && X(a); }); } function Y(a) { function b() { const d = Z(a); d || c ? (a.display.pollingFast = !1, X(a)) : (c = !0, a.display.poll.set(60, b)); } var c = !1; a.display.pollingFast = !0, a.display.poll.set(20, b); } function Z(a) { const b = a.display.input; const c = a.display.prevInput; const d = a.view; const e = d.sel; if (!d.focused || te(b) || ab(a)) return !1; const f = b.value; if (f == c && zb(e.from, e.to)) return !1; T(a), d.sel.shift = !1; for (var g = 0, h = Math.min(c.length, f.length); h > g && c[g] == f[g];)++g; let i = e.from; let j = e.to; g < c.length ? i = { line: i.line, ch: i.ch - (c.length - g) } : d.overwrite && zb(i, j) && !a.display.pasteIncoming && (j = { line: j.line, ch: Math.min(Ec(a.view.doc, j.line).text.length, j.ch + (f.length - g)) }); const k = a.curOp.updateInput; return ub(a, i, j, se(f.slice(g)), 'end', a.display.pasteIncoming ? 'paste' : 'input', { from: i, to: j }), a.curOp.updateInput = k, f.length > 1e3 ? b.value = a.display.prevInput = '' : a.display.prevInput = f, U(a), a.display.pasteIncoming = !1, !0; } function $(a, b) { let c; let d; const e = a.view; zb(e.sel.from, e.sel.to) ? b && (a.display.prevInput = a.display.input.value = '') : (a.display.prevInput = '', c = ue && (e.sel.to.line - e.sel.from.line > 100 || (d = a.getSelection()).length > 1e3), a.display.input.value = c ? '-' : d || a.getSelection(), e.focused && bd(a.display.input)), a.display.inaccurateSelection = c; } function _(a) { a.options.readOnly == 'nocursor' || !Ed && document.activeElement == a.display.input || a.display.input.focus(); } function ab(a) { return a.options.readOnly || a.view.cantEdit; } function bb(a) { function b() { a.view.focused && setTimeout(ed(_, a), 0); } function c(b) { a.options.onDragEvent && a.options.onDragEvent(a, Nc(b)) || Qc(b); } function d() { e.inaccurateSelection && (e.prevInput = '', e.inaccurateSelection = !1, e.input.value = a.getSelection(), bd(e.input)); } var e = a.display; Uc(e.scroller, 'mousedown', V(a, eb)), Uc(e.scroller, 'dblclick', V(a, Oc)), Uc(e.lineSpace, 'selectstart', (a) => { cb(e, a) || Oc(a); }), Dd || Uc(e.scroller, 'contextmenu', (b) => { tb(a, b); }), Uc(e.scroller, 'scroll', () => { ib(a, e.scroller.scrollTop), jb(a, e.scroller.scrollLeft, !0), Wc(a, 'scroll', a); }), Uc(e.scrollbarV, 'scroll', () => { ib(a, e.scrollbarV.scrollTop); }), Uc(e.scrollbarH, 'scroll', () => { jb(a, e.scrollbarH.scrollLeft); }), Uc(e.scroller, 'mousewheel', (b) => { kb(a, b); }), Uc(e.scroller, 'DOMMouseScroll', (b) => { kb(a, b); }), Uc(e.scrollbarH, 'mousedown', b), Uc(e.scrollbarV, 'mousedown', b), Uc(e.wrapper, 'scroll', () => { e.wrapper.scrollTop = e.wrapper.scrollLeft = 0; }), Uc(window, 'resize', function f() { e.cachedCharWidth = e.cachedTextHeight = null, L(a), e.wrapper.parentNode ? s(a, !0) : Vc(window, 'resize', f); }), Uc(e.input, 'keyup', V(a, (b) => { a.options.onKeyEvent && a.options.onKeyEvent(a, Nc(b)) || Tc(b, 'keyCode') == 16 && (a.view.sel.shift = !1); })), Uc(e.input, 'input', ed(Y, a)), Uc(e.input, 'keydown', V(a, pb)), Uc(e.input, 'keypress', V(a, qb)), Uc(e.input, 'focus', ed(rb, a)), Uc(e.input, 'blur', ed(sb, a)), a.options.dragDrop && (Uc(e.scroller, 'dragstart', (b) => { hb(a, b); }), Uc(e.scroller, 'dragenter', c), Uc(e.scroller, 'dragover', c), Uc(e.scroller, 'drop', V(a, fb))), Uc(e.scroller, 'paste', () => { _(a), Y(a); }), Uc(e.input, 'paste', () => { e.pasteIncoming = !0, Y(a); }), Uc(e.input, 'cut', d), Uc(e.input, 'copy', d), Md && Uc(e.sizer, 'mouseup', () => { document.activeElement == e.input && e.input.blur(), _(a); }); } function cb(a, b) { for (let c = Rc(b); c != a.wrapper; c = c.parentNode) if (/\bCodeMirror-(?:line)?widget\b/.test(c.className) || c.parentNode == a.sizer && c != a.mover) return !0; } function db(a, b, c) { const d = a.display; if (!c) { const e = Rc(b); if (e == d.scrollbarH || e == d.scrollbarH.firstChild || e == d.scrollbarV || e == d.scrollbarV.firstChild || e == d.scrollbarFiller) return null; } let f; let g; const h = d.lineSpace.getBoundingClientRect(); try { f = b.clientX, g = b.clientY; } catch (b) { return null; } return P(a, f - h.left, g - h.top); } function eb(a) { + function b(a) { if (l == 'single') return Fb(e, Db(i, j), a), void 0; if (q = Db(i, q), r = Db(i, r), l == 'double') { const b = Qb(Ec(i, a.line).text, a); Ab(a, q) ? Fb(e, b.from, r) : Fb(e, q, b.to); } else l == 'triple' && (Ab(a, q) ? Fb(e, r, Db(i, { line: a.line, ch: 0 })) : Fb(e, q, Db(i, { line: a.line + 1, ch: 0 }))); } function c(a) { const d = ++t; const h = db(e, a, !0); if (h) if (zb(h, o)) { const j = a.clientY < s.top ? -20 : a.clientY > s.bottom ? 20 : 0; j && setTimeout(V(e, () => { t == d && (f.scroller.scrollTop += j, c(a)); }), 50); } else { g.focused || rb(e), o = h, b(h); const k = n(f, i); (h.line >= k.to || h.line < k.from) && setTimeout(V(e, () => { t == d && c(a); }), 150); } } function d(a) { t = 1 / 0; const c = db(e, a); c && b(c), Oc(a), _(e), Vc(document, 'mousemove', u), Vc(document, 'mouseup', v); } var e = this; var f = e.display; var g = e.view; const h = g.sel; var i = g.doc; if (h.shift = Tc(a, 'shiftKey'), cb(f, a)) return Hd || (f.scroller.draggable = !1, setTimeout(() => { f.scroller.draggable = !0; }, 100)), void 0; if (!gb(e, a)) { + var j = db(e, a); switch (Sc(a)) { case 3: return Dd && tb.call(e, e, a), void 0; case 2: return j && Fb(e, j), setTimeout(ed(_, e), 20), Oc(a), void 0; } if (!j) return Rc(a) == f.scroller && Oc(a), void 0; g.focused || rb(e); const k = +new Date(); var + l = 'single'; if (yd && yd.time > k - 400 && zb(yd.pos, j))l = 'triple', Oc(a), setTimeout(ed(_, e), 20), Rb(e, j.line); else if (xd && xd.time > k - 400 && zb(xd.pos, j)) { l = 'double', yd = { time: k, pos: j }, Oc(a); const m = Qb(Ec(i, j.line).text, j); Fb(e, m.from, m.to); } else xd = { time: k, pos: j }; var o = j; if (e.options.dragDrop && oe && !ab(e) && !zb(h.from, h.to) && !Ab(j, h.from) && !Ab(h.to, j) && l == 'single') { var p = V(e, (b) => { Hd && (f.scroller.draggable = !1), g.draggingText = !1, Vc(document, 'mouseup', p), Vc(f.scroller, 'drop', p), Math.abs(a.clientX - b.clientX) + Math.abs(a.clientY - b.clientY) < 10 && (Oc(b), Fb(e, j), _(e)); }); return Hd && (f.scroller.draggable = !0), g.draggingText = p, f.scroller.dragDrop && f.scroller.dragDrop(), Uc(document, 'mouseup', p), Uc(f.scroller, 'drop', p), void 0; }Oc(a), l == 'single' && Fb(e, Db(i, j)); var q = h.from; var r = h.to; var s = f.wrapper.getBoundingClientRect(); var t = 0; var u = V(e, (a) => { Ed || Sc(a) ? c(a) : d(a); }); var v = V(e, d); Uc(document, 'mousemove', u), Uc(document, 'mouseup', v); + } + } function fb(a) { const b = this; if (!b.options.onDragEvent || !b.options.onDragEvent(b, Nc(a))) { Oc(a); let c = db(b, a, !0); const d = a.dataTransfer.files; if (c && !ab(b)) if (d && d.length && window.FileReader && window.File) for (var e = d.length, f = Array(e), g = 0, h = function (a, d) { const h = new FileReader(); h.onload = function () { f[d] = h.result, ++g == e && (c = Db(b.view.doc, c), V(b, () => { const a = yb(b, f.join(''), c, c, 'paste'); Gb(b, c, a); })()); }, h.readAsText(a); }, i = 0; e > i; ++i)h(d[i], i); else { if (b.view.draggingText && !Ab(c, b.view.sel.from) && !Ab(b.view.sel.to, c)) return b.view.draggingText(a), Ed && setTimeout(ed(_, b), 50), void 0; try { var f = a.dataTransfer.getData('Text'); if (f) { const j = b.view.sel.from; const k = b.view.sel.to; Gb(b, c, c), b.view.draggingText && yb(b, '', j, k, 'paste'), b.replaceSelection(f, null, 'paste'), _(b), rb(b); } } catch (a) {} } } } function gb(a, b) { const c = a.display; try { var d = b.clientX; var e = b.clientY; } catch (b) { return !1; } if (d >= Math.floor(c.gutters.getBoundingClientRect().right)) return !1; if (Oc(b), !Yc(a, 'gutterClick')) return !0; const f = c.lineDiv.getBoundingClientRect(); if (e > f.bottom) return !0; e -= f.top - c.viewOffset; for (let g = 0; g < a.options.gutters.length; ++g) { const h = c.gutters.childNodes[g]; if (h && h.getBoundingClientRect().right >= d) { const i = Hc(a.view.doc, e); const j = a.options.gutters[g]; Xc(a, a, 'gutterClick', a, i, j, b); break; } } return !0; } function hb(a, b) { const c = a.getSelection(); b.dataTransfer.setData('Text', c), b.dataTransfer.setDragImage && !Ld && b.dataTransfer.setDragImage(hd('img'), 0, 0); } function ib(a, b) { Math.abs(a.view.scrollTop - b) < 2 || (a.view.scrollTop = b, Dd || s(a, [], b), a.display.scroller.scrollTop != b && (a.display.scroller.scrollTop = b), a.display.scrollbarV.scrollTop != b && (a.display.scrollbarV.scrollTop = b), Dd && s(a, [])); } function jb(a, b, c) { (c ? b == a.view.scrollLeft : Math.abs(a.view.scrollLeft - b) < 2) || (a.view.scrollLeft = b, o(a), a.display.scroller.scrollLeft != b && (a.display.scroller.scrollLeft = b), a.display.scrollbarH.scrollLeft != b && (a.display.scrollbarH.scrollLeft = b)); } function kb(a, b) { let c = b.wheelDeltaX; let d = b.wheelDeltaY; if (c == null && b.detail && b.axis == b.HORIZONTAL_AXIS && (c = b.detail), d == null && b.detail && b.axis == b.VERTICAL_AXIS ? d = b.detail : d == null && (d = b.wheelDelta), d && Sd && Hd) for (let e = b.target; e != f; e = e.parentNode) if (e.lineObj) { a.display.currentWheelTarget = e; break; } var f = a.display.scroller; if (c && !Dd && !Kd && Wd != null) return d && ib(a, Math.max(0, Math.min(f.scrollTop + d * Wd, f.scrollHeight - f.clientHeight))), jb(a, Math.max(0, Math.min(f.scrollLeft + c * Wd, f.scrollWidth - f.clientWidth))), Oc(b), Bd = null, void 0; if (d && Wd != null) { const g = d * Wd; let h = a.view.scrollTop; let i = h + a.display.wrapper.clientHeight; g < 0 ? h = Math.max(0, h + g - 50) : i = Math.min(a.view.doc.height, i + g + 50), s(a, [], { top: h, bottom: i }); }Vd < 20 && (Bd == null ? (Bd = f.scrollLeft, Cd = f.scrollTop, zd = c, Ad = d, setTimeout(() => { if (Bd != null) { const a = f.scrollLeft - Bd; const b = f.scrollTop - Cd; const c = b && Ad && b / Ad || a && zd && a / zd; Bd = Cd = null, c && (Wd = (Wd * Vd + c) / (Vd + 1), ++Vd); } }, 200)) : (zd += c, Ad += d)); } function lb(a, b, c) { if (typeof b === 'string' && (b = fe[b], !b)) return !1; a.display.pollingFast && Z(a) && (a.display.pollingFast = !1); const d = a.view; const e = d.sel.shift; try { ab(a) && (d.suppressEdits = !0), c && (d.sel.shift = !1), b(a); } catch (f) { if (f != ke) throw f; return !1; } finally { d.sel.shift = e, d.suppressEdits = !1; } return !0; } function mb(a) { const b = a.view.keyMaps.slice(0); return b.push(a.options.keyMap), a.options.extraKeys && b.unshift(a.options.extraKeys), b; } function nb(a, b) { function c() { i = !0; } const d = Vb(a.options.keyMap); const e = d.auto; clearTimeout(Xd), e && !Xb(b) && (Xd = setTimeout(() => { Vb(a.options.keyMap) == d && (a.options.keyMap = e.call ? e.call(null, a) : e); }, 50)); let f = ve[Tc(b, 'keyCode')]; let g = !1; const h = Sd && (Kd || Id); if (f == null || b.altGraphKey) return !1; Tc(b, 'altKey') && (f = `Alt-${f}`), Tc(b, h ? 'metaKey' : 'ctrlKey') && (f = `Ctrl-${f}`), Tc(b, h ? 'ctrlKey' : 'metaKey') && (f = `Cmd-${f}`); var i = !1; const j = mb(a); return g = Tc(b, 'shiftKey') ? Wb(`Shift-${f}`, j, b => lb(a, b, !0), c) || Wb(f, j, b => (typeof b === 'string' && /^go[A-Z]/.test(b) ? lb(a, b) : void 0), c) : Wb(f, j, b => lb(a, b), c), i && (g = !1), g && (Oc(b), B(a), Gd && (b.oldKeyCode = b.keyCode, b.keyCode = 0)), g; } function ob(a, b, c) { const d = Wb(`'${c}'`, mb(a), b => lb(a, b, !0)); return d && (Oc(b), B(a)), d; } function pb(a) { const b = this; if (b.view.focused || rb(b), Ed && a.keyCode == 27 && (a.returnValue = !1), !b.options.onKeyEvent || !b.options.onKeyEvent(b, Nc(a))) { const c = Tc(a, 'keyCode'); b.view.sel.shift = c == 16 || Tc(a, 'shiftKey'); const d = nb(b, a); Kd && (Zd = d ? c : null, d || c != 88 || ue || !Tc(a, Sd ? 'metaKey' : 'ctrlKey') || b.replaceSelection('')); } } function qb(a) { const b = this; if (!b.options.onKeyEvent || !b.options.onKeyEvent(b, Nc(a))) { const c = Tc(a, 'keyCode'); const d = Tc(a, 'charCode'); if (Kd && c == Zd) return Zd = null, Oc(a), void 0; if (!(Kd && (!a.which || a.which < 10) || Md) || !nb(b, a)) { const e = String.fromCharCode(d == null ? c : d); this.options.electricChars && this.view.mode.electricChars && this.options.smartIndent && !ab(this) && this.view.mode.electricChars.indexOf(e) > -1 && setTimeout(V(b, () => { Nb(b, b.view.sel.to.line, 'smart'); }), 75), ob(b, a, e) || Y(b); } } } function rb(a) { a.options.readOnly != 'nocursor' && (a.view.focused || (Wc(a, 'focus', a), a.view.focused = !0, a.display.scroller.className.search(/\bCodeMirror-focused\b/) == -1 && (a.display.scroller.className += ' CodeMirror-focused'), $(a, !0)), X(a), B(a)); } function sb(a) { a.view.focused && (Wc(a, 'blur', a), a.view.focused = !1, a.display.scroller.className = a.display.scroller.className.replace(' CodeMirror-focused', '')), clearInterval(a.display.blinker), setTimeout(() => { a.view.focused || (a.view.sel.shift = !1); }, 150); } function tb(a, b) { + function c() { + if (d.inputDiv.style.position = 'relative', d.input.style.cssText = h, Gd && (d.scrollbarV.scrollTop = d.scroller.scrollTop = g), X(a), d.input.selectionStart != null) { + clearTimeout(Yd); + const b = d.input.value = ` ${zb(e.from, e.to) ? '' : d.input.value}`; let c = 0; d.prevInput = ' ', d.input.selectionStart = 1, d.input.selectionEnd = b.length, Yd = setTimeout(function f() { d.prevInput == ' ' && d.input.selectionStart == 0 ? V(a, fe.selectAll)(a) : c++ < 10 ? Yd = setTimeout(f, 500) : $(a); }, 200); + } + } var d = a.display; var e = a.view.sel; const f = db(a, b); var g = d.scroller.scrollTop; if (f && !Kd) { (zb(e.from, e.to) || Ab(f, e.from) || !Ab(f, e.to)) && V(a, Gb)(a, f, f); var h = d.input.style.cssText; d.inputDiv.style.position = 'absolute', d.input.style.cssText = `position: fixed; width: 30px; height: 30px; top: ${b.clientY - 5}px; left: ${b.clientX - 5}px; z-index: 1000; background: white; outline: none;border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`, _(a), $(a, !0), zb(e.from, e.to) && (d.input.value = d.prevInput = ' '), Dd ? (Qc(b), Uc(window, 'mouseup', function i() { Vc(window, 'mouseup', i), setTimeout(c, 20); })) : setTimeout(c, 50); } + } function ub(a, b, c, d, e, f) { const g = Td && fc(a.view.doc, b, c); if (!g) return vb(a, b, c, d, e, f); for (let h = g.length - 1; h >= 1; --h)vb(a, g[h].from, g[h].to, [''], f); return g.length ? vb(a, g[0].from, g[0].to, d, e, f) : void 0; } function vb(a, b, c, d, e, f) { if (!a.view.suppressEdits) { const g = a.view; const h = g.doc; const i = []; h.iter(b.line, c.line + 1, (a) => { i.push(oc(a.text, a.markedSpans)); }); const j = g.sel.from; const k = g.sel.to; const l = ec(nc(i[0]), nc(ad(i)), b.ch, c.ch, d); const m = xb(a, b, c, l, e, f); return g.history && Lc(a, b.line, d.length, i, f, j, k, g.sel.from, g.sel.to), m; } } function wb(a, b) { const c = a.view.doc; const d = a.view.history; const e = (b == 'undo' ? d.done : d.undone).pop(); if (e) { for (var f = { events: [], fromBefore: e.fromAfter, toBefore: e.toAfter, fromAfter: e.fromBefore, toAfter: e.toBefore }, g = e.events.length - 1; g >= 0; g -= 1) { d.dirtyCounter += b == 'undo' ? -1 : 1; const h = e.events[g]; var i = []; const j = h.start + h.added; c.iter(h.start, j, (a) => { i.push(oc(a.text, a.markedSpans)); }), f.events.push({ start: h.start, added: h.old.length, old: i }); const k = g ? null : { from: e.fromBefore, to: e.toBefore }; xb(a, { line: h.start, ch: 0 }, { line: j - 1, ch: Ec(c, j - 1).text.length }, h.old, k, b); }(b == 'undo' ? d.undone : d.done).push(f); } } function xb(a, b, c, d, e, f) { const g = a.view; const h = g.doc; const i = a.display; if (!g.suppressEdits) { const k = c.line - b.line; const l = Ec(h, b.line); const m = Ec(h, c.line); let n = !1; let o = b.line; a.options.lineWrapping || (o = Gc(jc(h, l)), h.iter(o, c.line + 1, a => (j(h, a) == g.maxLineLength ? (n = !0, !0) : void 0))); const p = ad(d); const q = R(i); if (b.ch == 0 && c.ch == 0 && mc(p) == '') { for (var r = [], s = 0, t = d.length - 1; t > s; ++s)r.push(rc(mc(d[s]), nc(d[s]), q)); sc(a, m, m.text, nc(p)), k && h.remove(b.line, k, a), r.length && h.insert(b.line, r); } else if (l == m) if (d.length == 1)sc(a, l, l.text.slice(0, b.ch) + mc(d[0]) + l.text.slice(c.ch), nc(d[0])); else { for (var r = [], s = 1, t = d.length - 1; t > s; ++s)r.push(rc(mc(d[s]), nc(d[s]), q)); r.push(rc(mc(p) + l.text.slice(c.ch), nc(p), q)), sc(a, l, l.text.slice(0, b.ch) + mc(d[0]), nc(d[0])), h.insert(b.line + 1, r); } else if (d.length == 1)sc(a, l, l.text.slice(0, b.ch) + mc(d[0]) + m.text.slice(c.ch), nc(d[0])), h.remove(b.line + 1, k, a); else { var r = []; sc(a, l, l.text.slice(0, b.ch) + mc(d[0]), nc(d[0])), sc(a, m, mc(p) + m.text.slice(c.ch), nc(p)); for (var s = 1, t = d.length - 1; t > s; ++s)r.push(rc(mc(d[s]), nc(d[s]), q)); k > 1 && h.remove(b.line + 1, k - 1, a), h.insert(b.line + 1, r); } if (a.options.lineWrapping) { const u = Math.max(5, i.scroller.clientWidth / S(i) - 3); h.iter(b.line, b.line + d.length, (a) => { if (a.height != 0) { const b = (Math.ceil(a.text.length / u) || 1) * q; b != a.height && Fc(a, b); } }); } else h.iter(o, b.line + d.length, (a) => { const b = j(h, a); b > g.maxLineLength && (g.maxLine = a, g.maxLineLength = b, g.maxLineChanged = !0, n = !1); }), n && (a.curOp.updateMaxLine = !0); g.frontier = Math.min(g.frontier, b.line), C(a, 400); const v = d.length - k - 1; if (W(a, b.line, c.line + 1, v), Yc(a, 'change')) { for (var s = 0; s < d.length; ++s) typeof d[s] !== 'string' && (d[s] = d[s].text); const w = { from: b, to: c, text: d, origin: f }; if (a.curOp.textChanged) { for (var x = a.curOp.textChanged; x.next; x = x.next);x.next = w; } else a.curOp.textChanged = w; } let y; let z; const A = { line: b.line + d.length - 1, ch: mc(p).length + (d.length == 1 ? b.ch : 0) }; if (e && typeof e !== 'string')e.from ? (y = e.from, z = e.to) : y = z = e; else if (e == 'end')y = z = A; else if (e == 'start')y = z = b; else if (e == 'around')y = b, z = A; else { const B = function (a) { if (Ab(a, b)) return a; if (!Ab(c, a)) return A; const d = a.line + v; let e = a.ch; return a.line == c.line && (e += mc(p).length - (c.ch - (c.line == b.line ? b.ch : 0))), { line: d, ch: e }; }; y = B(g.sel.from), z = B(g.sel.to); } return Gb(a, y, z, null, !0), A; } } function yb(a, b, c, d, e) { if (d || (d = c), Ab(d, c)) { const f = d; d = c, c = f; } return ub(a, c, d, se(b), null, e); } function zb(a, b) { return a.line == b.line && a.ch == b.ch; } function Ab(a, b) { return a.line < b.line || a.line == b.line && a.ch < b.ch; } function Bb(a) { return { line: a.line, ch: a.ch }; } function Cb(a, b) { return Math.max(0, Math.min(b, a.size - 1)); } function Db(a, b) { if (b.line < 0) return { line: 0, ch: 0 }; if (b.line >= a.size) return { line: a.size - 1, ch: Ec(a, a.size - 1).text.length }; const c = b.ch; const d = Ec(a, b.line).text.length; return c == null || c > d ? { line: b.line, ch: d } : c < 0 ? { line: b.line, ch: 0 } : b; } function Eb(a, b) { return b >= 0 && b < a.size; } function Fb(a, b, c, d) { const e = a.view.sel; if (e.shift || e.extend) { let f = e.anchor; if (c) { const g = Ab(b, f); g != Ab(c, f) ? (f = b, b = c) : g != Ab(b, c) && (b = c); }Gb(a, f, b, d); } else Gb(a, b, c || b, d); a.curOp.userSelChange = !0; } function Gb(a, b, c, d, e) { a.view.goalColumn = null; const f = a.view.sel; if ((e || !zb(b, f.anchor)) && (b = Ib(a, b, d, e != 'push')), (e || !zb(c, f.head)) && (c = Ib(a, c, d, e != 'push')), !zb(f.anchor, b) || !zb(f.head, c)) { f.anchor = b, f.head = c; const g = Ab(c, b); f.from = g ? c : b, f.to = g ? b : c, a.curOp.updateInput = !0, a.curOp.selectionChanged = !0; } } function Hb(a) { Gb(a, a.view.sel.from, a.view.sel.to, null, 'push'); } function Ib(a, b, c, d) { const e = a.view.doc; let f = !1; let g = b; let h = c || 1; a.view.cantEdit = !1; a:for (;;) { var i; const j = Ec(e, g.line); if (j.markedSpans) { for (var k = 0; k < j.markedSpans.length; ++k) { const l = j.markedSpans[k]; const m = l.marker; if ((l.from == null || (m.inclusiveLeft ? l.from <= g.ch : l.from < g.ch)) && (l.to == null || (m.inclusiveRight ? l.to >= g.ch : l.to > g.ch))) { if (d && m.clearOnEnter) { (i || (i = [])).push(m); continue; } if (!m.atomic) continue; let n = m.find()[h < 0 ? 'from' : 'to']; if (zb(n, g) && (n.ch += h, n.ch < 0 ? n = n.line ? Db(e, { line: n.line - 1 }) : null : n.ch > j.text.length && (n = n.line < e.size - 1 ? { line: n.line + 1, ch: 0 } : null), !n)) { if (f) return d ? (a.view.cantEdit = !0, { line: 0, ch: 0 }) : Ib(a, b, c, !0); f = !0, n = b, h = -h; }g = n; continue a; } } if (i) for (var k = 0; k < i.length; ++k)i[k].clear(); } return g; } } function Jb(a) { const b = a.view; const c = Kb(a, b.sel.head); if (b.focused) { const d = a.display; const e = d.sizer.getBoundingClientRect(); let f = null; if (c.top + e.top < 0 ? f = !0 : c.bottom + e.top > (window.innerHeight || document.documentElement.clientHeight) && (f = !1), f != null && !Pd) { const g = d.cursor.style.display == 'none'; g && (d.cursor.style.display = '', d.cursor.style.left = `${c.left}px`, d.cursor.style.top = `${c.top - d.viewOffset}px`), d.cursor.scrollIntoView(f), g && (d.cursor.style.display = 'none'); } } } function Kb(a, b) { for (;;) { let c = !1; const d = O(a, b); const e = Mb(a, d.left, d.top, d.left, d.bottom); const f = a.view.scrollTop; const g = a.view.scrollLeft; if (e.scrollTop != null && (ib(a, e.scrollTop), Math.abs(a.view.scrollTop - f) > 1 && (c = !0)), e.scrollLeft != null && (jb(a, e.scrollLeft), Math.abs(a.view.scrollLeft - g) > 1 && (c = !0)), !c) return d; } } function Lb(a, b, c, d, e) { const f = Mb(a, b, c, d, e); f.scrollTop != null && ib(a, f.scrollTop), f.scrollLeft != null && jb(a, f.scrollLeft); } function Mb(a, b, c, d, e) { const f = a.display; const g = G(f); c += g, e += g; const h = f.scroller.clientHeight - je; const i = f.scroller.scrollTop; const j = {}; const k = a.view.doc.height + 2 * g; const l = g + 10 > c; const m = e + g > k - 10; i > c ? j.scrollTop = l ? 0 : Math.max(0, c) : e > i + h && (j.scrollTop = (m ? k : e) - h); const n = f.scroller.clientWidth - je; const o = f.scroller.scrollLeft; b += f.gutters.offsetWidth, d += f.gutters.offsetWidth; const p = f.gutters.offsetWidth; const q = p + 10 > b; return o + p > b || q ? (q && (b = 0), j.scrollLeft = Math.max(0, b - 10 - p)) : d > n + o - 3 && (j.scrollLeft = d + 10 - n), j; } function Nb(a, b, c, d) { const e = a.view.doc; if (c || (c = 'add'), c == 'smart') if (a.view.mode.indent) var f = F(a, b); else c = 'prev'; let g; const h = a.options.tabSize; const i = Ec(e, b); const j = $c(i.text, null, h); const k = i.text.match(/^\s*/)[0]; if (c == 'smart' && (g = a.view.mode.indent(f, i.text.slice(k.length), i.text), g == ke)) { if (!d) return; c = 'prev'; }c == 'prev' ? g = b ? $c(Ec(e, b - 1).text, null, h) : 0 : c == 'add' ? g = j + a.options.indentUnit : c == 'subtract' && (g = j - a.options.indentUnit), g = Math.max(0, g); let l = ''; let m = 0; if (a.options.indentWithTabs) for (let n = Math.floor(g / h); n; --n)m += h, l += ' '; g > m && (l += _c(g - m)), l != k && yb(a, l, { line: b, ch: 0 }, { line: b, ch: k.length }, 'input'), i.stateAfter = null; } function Ob(a, b, c) { let d = b; let e = b; const f = a.view.doc; return typeof b === 'number' ? e = Ec(f, Cb(f, b)) : d = Gc(b), d == null ? null : c(e, d) ? (W(a, d, d + 1), e) : null; } function Pb(a, b, c, d) { function e() { const a = i + b; return a < 0 || a == g.size ? !1 : (i = a, k = Ec(g, a)); } function f(a) { const c = (d ? ud : vd)(k, j, b, !0); if (c == null) { if (a || !e()) return !1; j = d ? (b < 0 ? rd : qd)(k) : b < 0 ? k.text.length : 0; } else j = c; return !0; } var g = a.view.doc; const h = a.view.sel.head; var i = h.line; var j = h.ch; var k = Ec(g, i); if (c == 'char')f(); else if (c == 'column')f(!0); else if (c == 'word') for (let l = !1; !(b < 0) || f();) { if (fd(k.text.charAt(j)))l = !0; else if (l) { b < 0 && (b = 1, f()); break; } if (b > 0 && !f()) break; } return Ib(a, { line: i, ch: j }, b, !0); } function Qb(a, b) { let c = b.ch; let d = b.ch; if (a) { b.after === !1 || d == a.length ? --c : ++d; for (var e = a.charAt(c), f = fd(e) ? fd : /\s/.test(e) ? function (a) { return /\s/.test(a); } : function (a) { return !/\s/.test(a) && !fd(a); }; c > 0 && f(a.charAt(c - 1));)--c; for (;d < a.length && f(a.charAt(d));)++d; } return { from: { line: b.line, ch: c }, to: { line: b.line, ch: d } }; } function Rb(a, b) { Fb(a, { line: b, ch: 0 }, Db(a.view.doc, { line: b + 1, ch: 0 })); } function Sb(b, c, d, e) { a.defaults[b] = c, d && ($d[b] = e ? function (a, b, c) { c != ae && d(a, b, c); } : d); } function Tb(a, b) { if (b === !0) return b; if (a.copyState) return a.copyState(b); const c = {}; for (const d in b) { let e = b[d]; e instanceof Array && (e = e.concat([])), c[d] = e; } return c; } function Ub(a, b, c) { return a.startState ? a.startState(b, c) : !0; } function Vb(a) { return typeof a === 'string' ? ge[a] : a; } function Wb(a, b, c, d) { function e(b) { b = Vb(b); const f = b[a]; if (f === !1) return d && d(), !0; if (f != null && c(f)) return !0; if (b.nofallthrough) return d && d(), !0; const g = b.fallthrough; if (g == null) return !1; if (Object.prototype.toString.call(g) != '[object Array]') return e(g); for (let h = 0, i = g.length; i > h; ++h) if (e(g[h])) return !0; return !1; } for (let f = 0; f < b.length; ++f) if (e(b[f])) return !0; } function Xb(a) { const b = ve[Tc(a, 'keyCode')]; return b == 'Ctrl' || b == 'Alt' || b == 'Shift' || b == 'Mod'; } function Yb(a, b) { this.pos = this.start = 0, this.string = a, this.tabSize = b || 8; } function Zb(a, b) { this.lines = [], this.type = b, this.cm = a; } function $b(a, b, c, d, e) { const f = a.view.doc; const g = new Zb(a, e); if (e == 'range' && !Ab(b, c)) return g; if (d) for (const h in d)d.hasOwnProperty(h) && (g[h] = d[h]); g.replacedWith && (g.collapsed = !0, g.replacedWith = hd('span', [g.replacedWith], 'CodeMirror-widget')), g.collapsed && (Ud = !0); let i; let j; let k = b.line; let l = 0; if (f.iter(k, c.line + 1, (a) => { const d = { from: null, to: null, marker: g }; l += a.text.length, k == b.line && (d.from = b.ch, l -= b.ch), k == c.line && (d.to = c.ch, l -= a.text.length - c.ch), g.collapsed && (k == c.line && (j = gc(a, c.ch)), k == b.line ? i = gc(a, b.ch) : Fc(a, 0)), bc(a, d), g.collapsed && k == b.line && kc(a) && Fc(a, 0), ++k; }), g.readOnly && (Td = !0, (a.view.history.done.length || a.view.history.undone.length) && a.clearHistory()), g.collapsed) { if (i != j) throw new Error('Inserting collapsed marker overlapping an existing one'); g.size = l, g.atomic = !0; } return (g.className || g.startStyle || g.endStyle || g.collapsed) && W(a, b.line, c.line + 1), g.atomic && Hb(a), g; } function _b(a, b) { if (a) for (let c = 0; c < a.length; ++c) { const d = a[c]; if (d.marker == b) return d; } } function ac(a, b) { for (var c, d = 0; d < a.length; ++d)a[d] != b && (c || (c = [])).push(a[d]); return c; } function bc(a, b) { a.markedSpans = a.markedSpans ? a.markedSpans.concat([b]) : [b], b.marker.lines.push(a); } function cc(a, b) { if (a) for (var c, d = 0; d < a.length; ++d) { const e = a[d]; const f = e.marker; const g = e.from == null || (f.inclusiveLeft ? e.from <= b : e.from < b); if (g || f.type == 'bookmark' && e.from == b) { const h = e.to == null || (f.inclusiveRight ? e.to >= b : e.to > b); (c || (c = [])).push({ from: e.from, to: h ? null : e.to, marker: f }); } } return c; } function dc(a, b, c) { if (a) for (var d, e = 0; e < a.length; ++e) { const f = a[e]; const g = f.marker; const h = f.to == null || (g.inclusiveRight ? f.to >= c : f.to > c); if (h || g.type == 'bookmark' && f.from == c && f.from != b) { const i = f.from == null || (g.inclusiveLeft ? f.from <= c : f.from < c); (d || (d = [])).push({ from: i ? null : f.from - c, to: f.to == null ? null : f.to - c, marker: g }); } } return d; } function ec(a, b, c, d, e) { if (!a && !b) return e; let f = cc(a, c); const g = dc(b, c, d); const h = e.length == 1; const i = ad(e).length + (h ? c : 0); if (f) for (var j = 0; j < f.length; ++j) { var k = f[j]; if (k.to == null) { var l = _b(g, k.marker); l ? h && (k.to = l.to == null ? null : l.to + i) : k.to = c; } } if (g) for (var j = 0; j < g.length; ++j) { var k = g[j]; if (k.to != null && (k.to += i), k.from == null) { var l = _b(f, k.marker); l || (k.from = i, h && (f || (f = [])).push(k)); } else k.from += i, h && (f || (f = [])).push(k); } const m = [oc(e[0], f)]; if (!h) { let n; const o = e.length - 2; if (o > 0 && f) for (var j = 0; j < f.length; ++j)f[j].to == null && (n || (n = [])).push({ from: null, to: null, marker: f[j].marker }); for (var j = 0; o > j; ++j)m.push(oc(e[j + 1], n)); m.push(oc(ad(e), g)); } return m; } function fc(a, b, c) { let d = null; if (a.iter(b.line, c.line + 1, (a) => { if (a.markedSpans) for (let b = 0; b < a.markedSpans.length; ++b) { const c = a.markedSpans[b].marker; !c.readOnly || d && cd(d, c) != -1 || (d || (d = [])).push(c); } }), !d) return null; for (var e = [{ from: b, to: c }], f = 0; f < d.length; ++f) for (let g = d[f].find(), h = 0; h < e.length; ++h) { const i = e[h]; if (Ab(g.from, i.to) && !Ab(g.to, i.from)) { const j = [h, 1]; Ab(i.from, g.from) && j.push({ from: i.from, to: g.from }), Ab(g.to, i.to) && j.push({ from: g.to, to: i.to }), e.splice.apply(e, j), h += j.length - 1; } } return e; } function gc(a, b) { let c; const d = Ud && a.markedSpans; if (d) for (var e, f = 0; f < d.length; ++f)e = d[f], e.marker.collapsed && (e.from == null || e.from < b) && (e.to == null || e.to > b) && (!c || c.width < e.marker.width) && (c = e.marker); return c; } function hc(a) { return gc(a, -1); } function ic(a) { return gc(a, a.text.length + 1); } function jc(a, b) { for (var c; c = hc(b);)b = Ec(a, c.find().from.line); return b; } function kc(a) { const b = Ud && a.markedSpans; if (b) for (var c, d = 0; d < b.length; ++d) if (c = b[d], c.marker.collapsed) { if (c.from == null) return !0; if (c.from == 0 && c.marker.inclusiveLeft && lc(a, c)) return !0; } } function lc(a, b) { if (b.to == null || b.marker.inclusiveRight && b.to == a.text.length) return !0; for (var c, d = 0; d < a.markedSpans.length; ++d) if (c = a.markedSpans[d], c.marker.collapsed && c.from == b.to && (c.marker.inclusiveLeft || b.marker.inclusiveRight) && lc(a, c)) return !0; } function mc(a) { return typeof a === 'string' ? a : a.text; } function nc(a) { if (typeof a === 'string') return null; for (var b = a.markedSpans, c = null, d = 0; d < b.length; ++d)b[d].marker.explicitlyCleared ? c || (c = b.slice(0, d)) : c && c.push(b[d]); return c ? c.length ? c : null : b; } function oc(a, b) { return b ? { text: a, markedSpans: b } : a; } function pc(a) { const b = a.markedSpans; if (b) { for (let c = 0; c < b.length; ++c) { const d = b[c].marker.lines; const e = cd(d, a); d.splice(e, 1); }a.markedSpans = null; } } function qc(a, b) { if (b) { for (let c = 0; c < b.length; ++c)b[c].marker.lines.push(a); a.markedSpans = b; } } function rc(a, b, c) { const d = { text: a, height: c }; return qc(d, b), kc(d) && (d.height = 0), d; } function sc(a, b, c, d) { b.text = c, b.stateAfter = b.styles = null, b.order != null && (b.order = null), pc(b), qc(b, d), kc(b) ? b.height = 0 : b.height || (b.height = R(a.display)), Xc(a, b, 'change'); } function tc(a) { a.parent = null, pc(a); } function uc(a, b, c) { const d = a.view.mode; const e = a.options.flattenSpans; let f = !b.styles; let g = 0; let h = ''; let i = null; const j = new Yb(b.text, a.options.tabSize); const k = b.styles || (b.styles = []); for (b.text == '' && d.blankLine && d.blankLine(c); !j.eol();) { const l = d.token(j, c); const m = j.current(); if (j.start = j.pos, e && i == l ? h += m : (h && (f = f || g >= k.length || h != k[g] || i != k[g + 1], k[g++] = h, k[g++] = i), h = m, i = l), j.pos > 5e3) break; } return h && (f = f || g >= k.length || h != k[g] || i != k[g + 1], k[g++] = h, k[g++] = i), j.pos > 5e3 && (k[g++] = b.text.slice(j.pos), k[g++] = null), g != k.length && (k.length = g, f = !0), f; } function vc(a, b, c) { const d = a.view.mode; const e = new Yb(b.text, a.options.tabSize); for (b.text == '' && d.blankLine && d.blankLine(c); !e.eol() && e.pos <= 5e3;)d.token(e, c), e.start = e.pos; } function wc(a) { return a ? he[a] || (he[a] = `cm-${a.replace(/ +/g, ' cm-')}`) : null; } function xc(a, b, c) { for (var d, e, f, g = b, h = !0; d = hc(g);)h = !1, g = Ec(a.view.doc, d.find().from.line), e || (e = g); const i = { pre: hd('pre'), col: 0, pos: 0, display: !c, measure: null, addedOne: !1, cm: a }; g.textClass && (i.pre.className = g.textClass); do { g.styles || uc(a, g, g.stateAfter = F(a, Gc(g))), i.measure = g == b && c, i.pos = 0, i.addToken = i.measure ? zc : yc, c && f && g != b && !i.addedOne && (c[0] = i.pre.appendChild(md(a.display.measure)), i.addedOne = !0); var j = Bc(g, i); f = g == e, j && (g = Ec(a.view.doc, j.to.line), h = !1); } while (j); return c && !i.addedOne && (c[0] = i.pre.appendChild(h ? hd('span', ' ') : md(a.display.measure))), i.pre.firstChild || kc(b) || i.pre.appendChild(document.createTextNode(' ')), i.pre; } function yc(a, b, c, d, e) { if (b) { if (ie.test(b)) for (var f = document.createDocumentFragment(), g = 0; ;) { ie.lastIndex = g; const h = ie.exec(b); const i = h ? h.index - g : b.length - g; if (i && (f.appendChild(document.createTextNode(b.slice(g, g + i))), a.col += i), !h) break; if (g += i + 1, h[0] == ' ') { const j = a.cm.options.tabSize; const k = j - a.col % j; f.appendChild(hd('span', _c(k), 'cm-tab')), a.col += k; } else { const l = hd('span', '•', 'cm-invalidchar'); l.title = `\\u${h[0].charCodeAt(0).toString(16)}`, f.appendChild(l), a.col += 1; } } else { a.col += b.length; var f = document.createTextNode(b); } if (c || d || e || a.measure) { let m = c || ''; return d && (m += d), e && (m += e), a.pre.appendChild(hd('span', [f], m)); }a.pre.appendChild(f); } } function zc(a, b, c, d, e) { for (let f = 0; f < b.length; ++f)f && f < b.length - 1 && a.cm.options.lineWrapping && pe.test(b.slice(f - 1, f + 1)) && a.pre.appendChild(hd('wbr')), a.measure[a.pos++] = yc(a, b.charAt(f), c, f == 0 && d, f == b.length - 1 && e); b.length && (a.addedOne = !0); } function Ac(a, b, c) { c && (a.display || (c = c.cloneNode(!0)), a.pre.appendChild(c), a.measure && b && (a.measure[a.pos] = c, a.addedOne = !0)), a.pos += b; } function Bc(a, b) { const c = a.styles; const d = a.markedSpans; if (d) for (var e, f, g, h, i, j = a.text, k = j.length, l = 0, m = 0, n = '', o = 0; ;) { if (o == l) { f = g = h = '', i = null, o = 1 / 0; for (var p = null, q = 0; q < d.length; ++q) { const r = d[q]; const s = r.marker; r.from <= l && (r.to == null || r.to > l) ? (r.to != null && o > r.to && (o = r.to, g = ''), s.className && (f += ` ${s.className}`), s.startStyle && r.from == l && (h += ` ${s.startStyle}`), s.endStyle && r.to == o && (g += ` ${s.endStyle}`), s.collapsed && (!i || i.marker.width < s.width) && (i = r)) : r.from > l && o > r.from && (o = r.from), s.type == 'bookmark' && r.from == l && s.replacedWith && (p = s.replacedWith); } if (i && (i.from || 0) == l && (Ac(b, (i.to == null ? k : i.to) - l, i.from != null && i.marker.replacedWith), i.to == null)) return i.marker.find(); p && !i && Ac(b, 0, p); } if (l >= k) break; for (let t = Math.min(k, o); ;) { if (n) { const u = l + n.length; if (!i) { const v = u > t ? n.slice(0, t - l) : n; b.addToken(b, v, e + f, h, l + v.length == o ? g : ''); } if (u >= t) { n = n.slice(t - l), l = t; break; }l = u, h = ''; }n = c[m++], e = wc(c[m++]); } } else for (var m = 0; m < c.length; m += 2)b.addToken(b, c[m], wc(c[m + 1])); } function Cc(a) { this.lines = a, this.parent = null; for (var b = 0, c = a.length, d = 0; c > b; ++b)a[b].parent = this, d += a[b].height; this.height = d; } function Dc(a) { this.children = a; for (var b = 0, c = 0, d = 0, e = a.length; e > d; ++d) { const f = a[d]; b += f.chunkSize(), c += f.height, f.parent = this; } this.size = b, this.height = c, this.parent = null; } function Ec(a, b) { for (;!a.lines;) for (let c = 0; ;++c) { const d = a.children[c]; const e = d.chunkSize(); if (e > b) { a = d; break; }b -= e; } return a.lines[b]; } function Fc(a, b) { for (let c = b - a.height, d = a; d; d = d.parent)d.height += c; } function Gc(a) { if (a.parent == null) return null; for (var b = a.parent, c = cd(b.lines, a), d = b.parent; d; b = d, d = d.parent) for (let e = 0; d.children[e] != b; ++e)c += d.children[e].chunkSize(); return c; } function Hc(a, b) { let c = 0; a:do { for (var d = 0, e = a.children.length; e > d; ++d) { const f = a.children[d]; const g = f.height; if (g > b) { a = f; continue a; }b -= g, c += f.chunkSize(); } return c; } while (!a.lines); for (var d = 0, e = a.lines.length; e > d; ++d) { const h = a.lines[d]; const i = h.height; if (i > b) break; b -= i; } return c + d; } function Ic(a, b) { b = jc(a.view.doc, b); for (var c = 0, d = b.parent, e = 0; e < d.lines.length; ++e) { const f = d.lines[e]; if (f == b) break; c += f.height; } for (let g = d.parent; g; d = g, g = d.parent) for (var e = 0; e < g.children.length; ++e) { const h = g.children[e]; if (h == d) break; c += h.height; } return c; } function Jc(a) { let b = a.order; return b == null && (b = a.order = we(a.text)), b; } function Kc() { return { done: [], undone: [], lastTime: 0, lastOp: null, lastOrigin: null, dirtyCounter: 0 }; } function Lc(a, b, c, d, e, f, g, h, i) { + const j = a.view.history; j.undone.length = 0; const k = +new Date(); let + l = ad(j.done); if (l && (j.lastOp == a.curOp.id || j.lastOrigin == e && (e == 'input' || e == 'delete') && j.lastTime > k - 600)) { const m = ad(l.events); if (m.start > b + d.length || m.start + m.added < b)l.events.push({ start: b, added: c, old: d }); else { for (var n = Math.max(0, m.start - b), o = Math.max(0, b + d.length - (m.start + m.added)), p = n; p > 0; --p)m.old.unshift(d[p - 1]); for (var p = o; p > 0; --p)m.old.push(d[d.length - p]); n && (m.start = b), m.added += c - (d.length - n - o); }l.fromAfter = h, l.toAfter = i; } else { for (l = { events: [{ start: b, added: c, old: d }], fromBefore: f, toBefore: g, fromAfter: h, toAfter: i }, j.done.push(l); j.done.length > a.options.undoDepth;)j.done.shift(); j.dirtyCounter < 0 ? j.dirtyCounter = 0 / 0 : j.dirtyCounter++; }j.lastTime = k, j.lastOp = a.curOp.id, j.lastOrigin = e; + } function Mc() { Qc(this); } function Nc(a) { return a.stop || (a.stop = Mc), a; } function Oc(a) { a.preventDefault ? a.preventDefault() : a.returnValue = !1; } function Pc(a) { a.stopPropagation ? a.stopPropagation() : a.cancelBubble = !0; } function Qc(a) { Oc(a), Pc(a); } function Rc(a) { return a.target || a.srcElement; } function Sc(a) { let b = a.which; return b == null && (1 & a.button ? b = 1 : 2 & a.button ? b = 3 : 4 & a.button && (b = 2)), Sd && a.ctrlKey && b == 1 && (b = 3), b; } function Tc(a, b) { const c = a.override && a.override.hasOwnProperty(b); return c ? a.override[b] : a[b]; } function Uc(a, b, c) { if (a.addEventListener)a.addEventListener(b, c, !1); else if (a.attachEvent)a.attachEvent(`on${b}`, c); else { const d = a._handlers || (a._handlers = {}); const e = d[b] || (d[b] = []); e.push(c); } } function Vc(a, b, c) { if (a.removeEventListener)a.removeEventListener(b, c, !1); else if (a.detachEvent)a.detachEvent(`on${b}`, c); else { const d = a._handlers && a._handlers[b]; if (!d) return; for (let e = 0; e < d.length; ++e) if (d[e] == c) { d.splice(e, 1); break; } } } function Wc(a, b) { const c = a._handlers && a._handlers[b]; if (c) for (let d = Array.prototype.slice.call(arguments, 2), e = 0; e < c.length; ++e)c[e].apply(null, d); } function Xc(a, b, c) { function d(a) { return function () { a.apply(null, f); }; } const e = b._handlers && b._handlers[c]; if (e) for (var f = Array.prototype.slice.call(arguments, 3), g = a.curOp && a.curOp.delayedCallbacks, h = 0; h < e.length; ++h)g ? g.push(d(e[h])) : e[h].apply(null, f); } function Yc(a, b) { const c = a._handlers && a._handlers[b]; return c && c.length > 0; } function Zc() { this.id = null; } function $c(a, b, c) { b == null && (b = a.search(/[^\s\u00a0]/), b == -1 && (b = a.length)); for (var d = 0, e = 0; b > d; ++d)a.charAt(d) == ' ' ? e += c - e % c : ++e; return e; } function _c(a) { for (;le.length <= a;)le.push(`${ad(le)} `); return le[a]; } function ad(a) { return a[a.length - 1]; } function bd(a) { Qd ? (a.selectionStart = 0, a.selectionEnd = a.value.length) : a.select(); } function cd(a, b) { if (a.indexOf) return a.indexOf(b); for (let c = 0, d = a.length; d > c; ++c) if (a[c] == b) return c; return -1; } function dd(a) { for (var b = [], c = 0; a > c; ++c)b.push(void 0); return b; } function ed(a) { const b = Array.prototype.slice.call(arguments, 1); return function () { return a.apply(null, b); }; } function fd(a) { return /\w/.test(a) || a > '€' && (a.toUpperCase() != a.toLowerCase() || me.test(a)); } function gd(a) { let b = 0; for (const c in a)a.hasOwnProperty(c) && a[c] && ++b; return !b; } function hd(a, b, c, d) { const e = document.createElement(a); if (c && (e.className = c), d && (e.style.cssText = d), typeof b === 'string')kd(e, b); else if (b) for (let f = 0; f < b.length; ++f)e.appendChild(b[f]); return e; } function id(a) { return a.innerHTML = '', a; } function jd(a, b) { return id(a).appendChild(b); } function kd(a, b) { Gd ? (a.innerHTML = '', a.appendChild(document.createTextNode(b))) : a.textContent = b; } function ld(a) { if (qe != null) return qe; const b = hd('div', null, null, 'width: 50px; height: 50px; overflow-x: scroll'); return jd(a, b), b.offsetWidth && (qe = b.offsetHeight - b.clientHeight), qe || 0; } function md(a) { if (re == null) { const b = hd('span', '​'); jd(a, hd('span', [b, document.createTextNode('x')])), a.firstChild.offsetHeight != 0 && (re = b.offsetWidth <= 1 && b.offsetHeight > 2 && !Fd); } return re ? hd('span', '​') : hd('span', ' ', null, 'display: inline-block; width: 1px; margin-right: -1px'); } function nd(a, b, c, d) { if (!a) return d(b, c, 'ltr'); for (let e = 0; e < a.length; ++e) { const f = a[e]; f.from < c && f.to > b && d(Math.max(f.from, b), Math.min(f.to, c), f.level == 1 ? 'rtl' : 'ltr'); } } function od(a) { return a.level % 2 ? a.to : a.from; } function pd(a) { return a.level % 2 ? a.from : a.to; } function qd(a) { const b = Jc(a); return b ? od(b[0]) : 0; } function rd(a) { const b = Jc(a); return b ? pd(ad(b)) : a.text.length; } function sd(a, b) { const c = Ec(a.view.doc, b); const d = jc(a.view.doc, c); d != c && (b = Gc(d)); const e = Jc(d); const f = e ? e[0].level % 2 ? rd(d) : qd(d) : 0; return { line: b, ch: f }; } function td(a, b) { for (var c, d; c = ic(d = Ec(a.view.doc, b));)b = c.find().to.line; const e = Jc(d); const f = e ? e[0].level % 2 ? qd(d) : rd(d) : d.text.length; return { line: b, ch: f }; } function ud(a, b, c, d) { const e = Jc(a); if (!e) return vd(a, b, c, d); for (var f = d ? function (b, c) { do b += c; while (b > 0 && ne.test(a.text.charAt(b))); return b; } : function (a, b) { return a + b; }, g = e[0].level, h = 0; h < e.length; ++h) { var i = e[h]; const j = i.level % 2 == g; if (i.from < b && i.to > b || j && (i.from == b || i.to == b)) break; } for (var k = f(b, i.level % 2 ? -c : c); k != null;) if (i.level % 2 == g) { if (!(k < i.from || k > i.to)) break; i = e[h += c], k = i && (c > 0 == i.level % 2 ? f(i.to, -1) : f(i.from, 1)); } else if (k == od(i))i = e[--h], k = i && pd(i); else { if (k != pd(i)) break; i = e[++h], k = i && od(i); } return k < 0 || k > a.text.length ? null : k; } function vd(a, b, c, d) { let e = b + c; if (d) for (;e > 0 && ne.test(a.text.charAt(e));)e += c; return e < 0 || e > a.text.length ? null : e; } let wd; let xd; let yd; let zd; let Ad; let Bd; let Cd; var Dd = /gecko\/\d/i.test(navigator.userAgent); var Ed = /MSIE \d/.test(navigator.userAgent); var Fd = /MSIE [1-7]\b/.test(navigator.userAgent); var Gd = /MSIE [1-8]\b/.test(navigator.userAgent); var Hd = /WebKit\//.test(navigator.userAgent); var Id = Hd && /Qt\/\d+\.\d+/.test(navigator.userAgent); const Jd = /Chrome\//.test(navigator.userAgent); var Kd = /Opera\//.test(navigator.userAgent); var Ld = /Apple Computer/.test(navigator.vendor); var Md = /KHTML\//.test(navigator.userAgent); var Nd = /Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent); var Od = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent); var Pd = /PhantomJS/.test(navigator.userAgent); var Qd = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent); var Rd = Qd || /Android|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent); var Sd = Qd || /Mac/.test(navigator.platform); var Td = !1; var Ud = !1; var Vd = 0; var Wd = null; Ed ? Wd = -0.53 : Dd ? Wd = 15 : Jd ? Wd = -0.7 : Ld && (Wd = -1 / 3); let Xd; let Yd; var Zd = null; a.prototype = { + getValue: function (a) { const b = []; const c = this.view.doc; return c.iter(0, c.size, (a) => { b.push(a.text); }), b.join(a || '\n'); }, + setValue: V(null, function (a) { const b = this.view.doc; const c = { line: 0, ch: 0 }; const d = Ec(b, b.size - 1).text.length; vb(this, c, { line: b.size - 1, ch: d }, se(a), c, c, 'setValue'); }), + getSelection: function (a) { return this.getRange(this.view.sel.from, this.view.sel.to, a); }, + replaceSelection: V(null, function (a, b, c) { const d = this.view.sel; ub(this, d.from, d.to, se(a), b || 'around', c); }), + focus: function () { window.focus(), _(this), rb(this), Y(this); }, + setOption: function (a, b) { const c = this.options; const d = c[a]; (c[a] != b || a == 'mode') && (c[a] = b, $d.hasOwnProperty(a) && V(this, $d[a])(this, b, d)); }, + getOption: function (a) { return this.options[a]; }, + getMode: function () { return this.view.mode; }, + addKeyMap: function (a) { this.view.keyMaps.push(a); }, + removeKeyMap: function (a) { for (let b = this.view.keyMaps, c = 0; c < b.length; ++c) if ((typeof a === 'string' ? b[c].name : b[c]) == a) return b.splice(c, 1), !0; }, + undo: V(null, function () { wb(this, 'undo'); }), + redo: V(null, function () { wb(this, 'redo'); }), + indentLine: V(null, function (a, b, c) { typeof b !== 'string' && (b = b == null ? this.options.smartIndent ? 'smart' : 'prev' : b ? 'add' : 'subtract'), Eb(this.view.doc, a) && Nb(this, a, b, c); }), + indentSelection: V(null, function (a) { const b = this.view.sel; if (zb(b.from, b.to)) return Nb(this, b.from.line, a); for (let c = b.to.line - (b.to.ch ? 0 : 1), d = b.from.line; c >= d; ++d)Nb(this, d, a); }), + historySize: function () { const a = this.view.history; return { undo: a.done.length, redo: a.undone.length }; }, + clearHistory: function () { this.view.history = Kc(); }, + markClean: function () { this.view.history.dirtyCounter = 0, this.view.history.lastOp = this.view.history.lastOrigin = null; }, + isClean: function () { return this.view.history.dirtyCounter == 0; }, + getHistory: function () { function a(a) { for (var b, c = 0, d = []; c < a.length; ++c) { const e = a[c]; d.push({ events: b = [], fromBefore: e.fromBefore, toBefore: e.toBefore, fromAfter: e.fromAfter, toAfter: e.toAfter }); for (let f = 0, g = e.events; f < g.length; ++f) { const h = []; const i = g[f]; b.push({ start: i.start, added: i.added, old: h }); for (let j = 0; j < i.old.length; ++j)h.push(mc(i.old[j])); } } return d; } const b = this.view.history; return { done: a(b.done), undone: a(b.undone) }; }, + setHistory: function (a) { const b = this.view.history = Kc(); b.done = a.done, b.undone = a.undone; }, + getTokenAt: function (a) { const b = this.view.doc; a = Db(b, a); for (var c = F(this, a.line), d = this.view.mode, e = Ec(b, a.line), f = new Yb(e.text, this.options.tabSize); f.pos < a.ch && !f.eol();) { f.start = f.pos; var g = d.token(f, c); } return { start: f.start, end: f.pos, string: f.current(), className: g || null, type: g || null, state: c }; }, + getStateAfter: function (a) { const b = this.view.doc; return a = Cb(b, a == null ? b.size - 1 : a), F(this, a + 1); }, + cursorCoords: function (a, b) { let c; const d = this.view.sel; return c = a == null ? d.head : typeof a === 'object' ? Db(this.view.doc, a) : a ? d.from : d.to, O(this, c, b || 'page'); }, + charCoords: function (a, b) { return N(this, Db(this.view.doc, a), b || 'page'); }, + coordsChar: function (a) { const b = this.display.lineSpace.getBoundingClientRect(); return P(this, a.left - b.left, a.top - b.top); }, + defaultTextHeight: function () { return R(this.display); }, + markText: V(null, function (a, b, c) { return $b(this, Db(this.view.doc, a), Db(this.view.doc, b), c, 'range'); }), + setBookmark: V(null, function (a, b) { return a = Db(this.view.doc, a), $b(this, a, a, b ? { replacedWith: b } : {}, 'bookmark'); }), + findMarksAt: function (a) { const b = this.view.doc; a = Db(b, a); const c = []; const d = Ec(b, a.line).markedSpans; if (d) for (let e = 0; e < d.length; ++e) { const f = d[e]; (f.from == null || f.from <= a.ch) && (f.to == null || f.to >= a.ch) && c.push(f.marker); } return c; }, + setGutterMarker: V(null, function (a, b, c) { return Ob(this, a, (a) => { const d = a.gutterMarkers || (a.gutterMarkers = {}); return d[b] = c, !c && gd(d) && (a.gutterMarkers = null), !0; }); }), + clearGutter: V(null, function (a) { let b = 0; const c = this; const d = c.view.doc; d.iter(0, d.size, (d) => { d.gutterMarkers && d.gutterMarkers[a] && (d.gutterMarkers[a] = null, W(c, b, b + 1), gd(d.gutterMarkers) && (d.gutterMarkers = null)), ++b; }); }), + addLineClass: V(null, function (a, b, c) { return Ob(this, a, (a) => { const d = b == 'text' ? 'textClass' : b == 'background' ? 'bgClass' : 'wrapClass'; if (a[d]) { if (new RegExp(`\\b${c}\\b`).test(a[d])) return !1; a[d] += ` ${c}`; } else a[d] = c; return !0; }); }), + removeLineClass: V(null, function (a, b, c) { return Ob(this, a, (a) => { const d = b == 'text' ? 'textClass' : b == 'background' ? 'bgClass' : 'wrapClass'; const e = a[d]; if (!e) return !1; if (c == null)a[d] = null; else { const f = e.replace(new RegExp(`^${c}\\b\\s*|\\s*\\b${c}\\b`), ''); if (f == e) return !1; a[d] = f || null; } return !0; }); }), + addLineWidget: V(null, function (a, b, c) { const d = c || {}; return d.node = b, d.noHScroll && (this.display.alignWidgets = !0), Ob(this, a, a => ((a.widgets || (a.widgets = [])).push(d), d.line = a, !0)), d; }), + removeLineWidget: V(null, function (a) { const b = a.line.widgets; const c = Gc(a.line); if (c != null) { for (let d = 0; d < b.length; ++d)b[d] == a && b.splice(d--, 1); W(this, c, c + 1); } }), + lineInfo: function (a) { if (typeof a === 'number') { if (!Eb(this.view.doc, a)) return null; var b = a; if (a = Ec(this.view.doc, a), !a) return null; } else { var b = Gc(a); if (b == null) return null; } return { line: b, handle: a, text: a.text, gutterMarkers: a.gutterMarkers, textClass: a.textClass, bgClass: a.bgClass, wrapClass: a.wrapClass, widgets: a.widgets }; }, + getViewport: function () { return { from: this.display.showingFrom, to: this.display.showingTo }; }, + addWidget: function (a, b, c, d, e) { const f = this.display; a = O(this, Db(this.view.doc, a)); let g = a.top; let h = a.left; if (b.style.position = 'absolute', f.sizer.appendChild(b), d == 'over')g = a.top; else if (d == 'near') { const i = Math.max(f.wrapper.clientHeight, this.view.doc.height); const j = Math.max(f.sizer.clientWidth, f.lineSpace.clientWidth); a.bottom + b.offsetHeight > i && a.top > b.offsetHeight && (g = a.top - b.offsetHeight), h + b.offsetWidth > j && (h = j - b.offsetWidth); }b.style.top = `${g + G(f)}px`, b.style.left = b.style.right = '', e == 'right' ? (h = f.sizer.clientWidth - b.offsetWidth, b.style.right = '0px') : (e == 'left' ? h = 0 : e == 'middle' && (h = (f.sizer.clientWidth - b.offsetWidth) / 2), b.style.left = `${h}px`), c && Lb(this, h, g, h + b.offsetWidth, g + b.offsetHeight); }, + lineCount: function () { return this.view.doc.size; }, + clipPos: function (a) { return Db(this.view.doc, a); }, + getCursor: function (a) { let b; const c = this.view.sel; return b = a == null || a == 'head' ? c.head : a == 'anchor' ? c.anchor : a == 'end' || a === !1 ? c.to : c.from, Bb(b); }, + somethingSelected: function () { return !zb(this.view.sel.from, this.view.sel.to); }, + setCursor: V(null, function (a, b, c) { const d = Db(this.view.doc, typeof a === 'number' ? { line: a, ch: b || 0 } : a); c ? Fb(this, d) : Gb(this, d, d); }), + setSelection: V(null, function (a, b) { const c = this.view.doc; Gb(this, Db(c, a), Db(c, b || a)); }), + extendSelection: V(null, function (a, b) { const c = this.view.doc; Fb(this, Db(c, a), b && Db(c, b)); }), + setExtending: function (a) { this.view.sel.extend = a; }, + getLine: function (a) { const b = this.getLineHandle(a); return b && b.text; }, + getLineHandle: function (a) { const b = this.view.doc; return Eb(b, a) ? Ec(b, a) : void 0; }, + getLineNumber: function (a) { return Gc(a); }, + setLine: V(null, function (a, b) { Eb(this.view.doc, a) && yb(this, b, { line: a, ch: 0 }, { line: a, ch: Ec(this.view.doc, a).text.length }); }), + removeLine: V(null, function (a) { Eb(this.view.doc, a) && yb(this, '', { line: a, ch: 0 }, Db(this.view.doc, { line: a + 1, ch: 0 })); }), + replaceRange: V(null, function (a, b, c) { const d = this.view.doc; return b = Db(d, b), c = c ? Db(d, c) : b, yb(this, a, b, c); }), + getRange: function (a, b, c) { + const d = this.view.doc; a = Db(d, a), b = Db(d, b); const e = a.line; const f = b.line; if (e == f) return Ec(d, e).text.slice(a.ch, b.ch); const g = [Ec(d, e).text.slice(a.ch)]; return d.iter(e + 1, f, (a) => { + g.push(a.text); + }), g.push(Ec(d, f).text.slice(0, b.ch)), g.join(c || '\n'); + }, + triggerOnKeyDown: V(null, pb), + execCommand: function (a) { return fe[a](this); }, + moveH: V(null, function (a, b) { const c = this.view.sel; let d = a < 0 ? c.from : c.to; (c.shift || c.extend || zb(c.from, c.to)) && (d = Pb(this, a, b, !0)), Fb(this, d, d, a); }), + deleteH: V(null, function (a, b) { const c = this.view.sel; zb(c.from, c.to) ? yb(this, '', c.from, Pb(this, a, b, !1), 'delete') : yb(this, '', c.from, c.to, 'delete'), this.curOp.userSelChange = !0; }), + moveV: V(null, function (a, b) { let c; const d = this.view; const e = d.doc; const f = this.display; const g = d.sel.head; const h = O(this, g, 'div'); let i = h.left; if (d.goalColumn != null && (i = d.goalColumn), b == 'page') { const j = Math.min(f.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); c = h.top + a * j; } else b == 'line' && (c = a > 0 ? h.bottom + 3 : h.top - 3); do { var k = P(this, i, c); c += 5 * a; } while (k.outside && (a < 0 ? c > 0 : c < e.height)); b == 'page' && (f.scrollbarV.scrollTop += N(this, k, 'div').top - h.top), Fb(this, k, k, a), d.goalColumn = i; }), + toggleOverwrite: function () { (this.view.overwrite = !this.view.overwrite) ? this.display.cursor.className += ' CodeMirror-overwrite' : this.display.cursor.className = this.display.cursor.className.replace(' CodeMirror-overwrite', ''); }, + posFromIndex: function (a) { let b; let c = 0; const d = this.view.doc; return d.iter(0, d.size, (d) => { const e = d.text.length + 1; return e > a ? (b = a, !0) : (a -= e, ++c, void 0); }), Db(d, { line: c, ch: b }); }, + indexFromPos: function (a) { if (a.line < 0 || a.ch < 0) return 0; let b = a.ch; return this.view.doc.iter(0, a.line, (a) => { b += a.text.length + 1; }), b; }, + scrollTo: function (a, b) { a != null && (this.display.scrollbarH.scrollLeft = this.display.scroller.scrollLeft = a), b != null && (this.display.scrollbarV.scrollTop = this.display.scroller.scrollTop = b), s(this, []); }, + getScrollInfo: function () { const a = this.display.scroller; const b = je; return { left: a.scrollLeft, top: a.scrollTop, height: a.scrollHeight - b, width: a.scrollWidth - b, clientHeight: a.clientHeight - b, clientWidth: a.clientWidth - b }; }, + scrollIntoView: function (a) { typeof a === 'number' && (a = { line: a, ch: 0 }), a = a ? Db(this.view.doc, a) : this.view.sel.head, Kb(this, a); }, + setSize: function (a, b) { function c(a) { return typeof a === 'number' || /^\d+$/.test(String(a)) ? `${a}px` : a; }a != null && (this.display.wrapper.style.width = c(a)), b != null && (this.display.wrapper.style.height = c(b)), this.refresh(); }, + on: function (a, b) { Uc(this, a, b); }, + off: function (a, b) { Vc(this, a, b); }, + operation: function (a) { return V(this, a)(); }, + refresh: function () { L(this), this.display.scroller.scrollHeight > this.view.scrollTop && (this.display.scrollbarV.scrollTop = this.display.scroller.scrollTop = this.view.scrollTop), s(this, !0); }, + getInputField: function () { return this.display.input; }, + getWrapperElement: function () { return this.display.wrapper; }, + getScrollerElement: function () { return this.display.scroller; }, + getGutterElement: function () { return this.display.gutters; }, + }; var $d = a.optionHandlers = {}; var _d = a.defaults = {}; var ae = a.Init = { toString: function () { return 'CodeMirror.Init'; } }; Sb('value', '', (a, b) => { a.setValue(b); }, !0), Sb('mode', null, d, !0), Sb('indentUnit', 2, d, !0), Sb('indentWithTabs', !1), Sb('smartIndent', !0), Sb('tabSize', 4, (a) => { d(a), L(a), s(a, !0); }, !0), Sb('electricChars', !0), Sb('theme', 'default', (a) => { g(a), h(a); }, !0), Sb('keyMap', 'default', f), Sb('extraKeys', null), Sb('onKeyEvent', null), Sb('onDragEvent', null), Sb('lineWrapping', !1, e, !0), Sb('gutters', [], (a) => { l(a.options), h(a); }, !0), Sb('lineNumbers', !1, (a) => { l(a.options), h(a); }, !0), Sb('firstLineNumber', 1, h, !0), Sb('lineNumberFormatter', a => a, h, !0), Sb('showCursorWhenSelecting', !1, y, !0), Sb('readOnly', !1, (a, b) => { b == 'nocursor' ? (sb(a), a.display.input.blur()) : b || $(a, !0); }), Sb('dragDrop', !0), Sb('cursorBlinkRate', 530), Sb('cursorHeight', 1), Sb('workTime', 100), Sb('workDelay', 100), Sb('flattenSpans', !0), Sb('pollInterval', 100), Sb('undoDepth', 40), Sb('viewportMargin', 10, (a) => { a.refresh(); }, !0), Sb('tabindex', null, (a, b) => { a.display.input.tabIndex = b || ''; }), Sb('autofocus', null); const be = a.modes = {}; const ce = a.mimeModes = {}; a.defineMode = function (b, c) { if (a.defaults.mode || b == 'null' || (a.defaults.mode = b), arguments.length > 2) { c.dependencies = []; for (let d = 2; d < arguments.length; ++d)c.dependencies.push(arguments[d]); }be[b] = c; }, a.defineMIME = function (a, b) { ce[a] = b; }, a.resolveMode = function (b) { if (typeof b === 'string' && ce.hasOwnProperty(b))b = ce[b]; else if (typeof b === 'string' && /^[\w\-]+\/[\w\-]+\+xml$/.test(b)) return a.resolveMode('application/xml'); return typeof b === 'string' ? { name: b } : b || { name: 'null' }; }, a.getMode = function (b, c) { var c = a.resolveMode(c); const d = be[c.name]; if (!d) return a.getMode(b, 'text/plain'); const e = d(b, c); if (de.hasOwnProperty(c.name)) { const f = de[c.name]; for (const g in f)f.hasOwnProperty(g) && (e.hasOwnProperty(g) && (e[`_${g}`] = e[g]), e[g] = f[g]); } return e.name = c.name, e; }, a.defineMode('null', () => ({ token: function (a) { a.skipToEnd(); } })), a.defineMIME('text/plain', 'null'); var de = a.modeExtensions = {}; a.extendMode = function (a, b) { const c = de.hasOwnProperty(a) ? de[a] : de[a] = {}; for (const d in b)b.hasOwnProperty(d) && (c[d] = b[d]); }, a.defineExtension = function (b, c) { a.prototype[b] = c; }, a.defineOption = Sb; var ee = []; a.defineInitHook = function (a) { ee.push(a); }, a.copyState = Tb, a.startState = Ub, a.innerMode = function (a, b) { for (;a.innerMode;) { var c = a.innerMode(b); b = c.state, a = c.mode; } return c || { mode: a, state: b }; }; var fe = a.commands = { selectAll: function (a) { a.setSelection({ line: 0, ch: 0 }, { line: a.lineCount() - 1 }); }, killLine: function (a) { const b = a.getCursor(!0); const c = a.getCursor(!1); const d = !zb(b, c); d || a.getLine(b.line).length != b.ch ? a.replaceRange('', b, d ? c : { line: b.line }, 'delete') : a.replaceRange('', b, { line: b.line + 1, ch: 0 }, 'delete'); }, deleteLine: function (a) { const b = a.getCursor().line; a.replaceRange('', { line: b, ch: 0 }, { line: b }, 'delete'); }, undo: function (a) { a.undo(); }, redo: function (a) { a.redo(); }, goDocStart: function (a) { a.extendSelection({ line: 0, ch: 0 }); }, goDocEnd: function (a) { a.extendSelection({ line: a.lineCount() - 1 }); }, goLineStart: function (a) { a.extendSelection(sd(a, a.getCursor().line)); }, goLineStartSmart: function (a) { const b = a.getCursor(); const c = sd(a, b.line); const d = a.getLineHandle(c.line); const e = Jc(d); if (e && e[0].level != 0)a.extendSelection(c); else { const f = Math.max(0, d.text.search(/\S/)); const g = b.line == c.line && b.ch <= f && b.ch; a.extendSelection({ line: c.line, ch: g ? 0 : f }); } }, goLineEnd: function (a) { a.extendSelection(td(a, a.getCursor().line)); }, goLineUp: function (a) { a.moveV(-1, 'line'); }, goLineDown: function (a) { a.moveV(1, 'line'); }, goPageUp: function (a) { a.moveV(-1, 'page'); }, goPageDown: function (a) { a.moveV(1, 'page'); }, goCharLeft: function (a) { a.moveH(-1, 'char'); }, goCharRight: function (a) { a.moveH(1, 'char'); }, goColumnLeft: function (a) { a.moveH(-1, 'column'); }, goColumnRight: function (a) { a.moveH(1, 'column'); }, goWordLeft: function (a) { a.moveH(-1, 'word'); }, goWordRight: function (a) { a.moveH(1, 'word'); }, delCharBefore: function (a) { a.deleteH(-1, 'char'); }, delCharAfter: function (a) { a.deleteH(1, 'char'); }, delWordBefore: function (a) { a.deleteH(-1, 'word'); }, delWordAfter: function (a) { a.deleteH(1, 'word'); }, indentAuto: function (a) { a.indentSelection('smart'); }, indentMore: function (a) { a.indentSelection('add'); }, indentLess: function (a) { a.indentSelection('subtract'); }, insertTab: function (a) { a.replaceSelection(' ', 'end', 'input'); }, defaultTab: function (a) { a.somethingSelected() ? a.indentSelection('add') : a.replaceSelection(' ', 'end', 'input'); }, transposeChars: function (a) { const b = a.getCursor(); const c = a.getLine(b.line); b.ch > 0 && b.ch < c.length - 1 && a.replaceRange(c.charAt(b.ch) + c.charAt(b.ch - 1), { line: b.line, ch: b.ch - 1 }, { line: b.line, ch: b.ch + 1 }); }, newlineAndIndent: function (a) { V(a, () => { a.replaceSelection('\n', 'end', 'input'), a.indentLine(a.getCursor().line, null, !0); })(); }, toggleOverwrite: function (a) { a.toggleOverwrite(); } }; var ge = a.keyMap = {}; ge.basic = { Left: 'goCharLeft', Right: 'goCharRight', Up: 'goLineUp', Down: 'goLineDown', End: 'goLineEnd', Home: 'goLineStartSmart', PageUp: 'goPageUp', PageDown: 'goPageDown', Delete: 'delCharAfter', Backspace: 'delCharBefore', Tab: 'defaultTab', 'Shift-Tab': 'indentAuto', Enter: 'newlineAndIndent', Insert: 'toggleOverwrite' }, ge.pcDefault = { 'Ctrl-A': 'selectAll', 'Ctrl-D': 'deleteLine', 'Ctrl-Z': 'undo', 'Shift-Ctrl-Z': 'redo', 'Ctrl-Y': 'redo', 'Ctrl-Home': 'goDocStart', 'Alt-Up': 'goDocStart', 'Ctrl-End': 'goDocEnd', 'Ctrl-Down': 'goDocEnd', 'Ctrl-Left': 'goWordLeft', 'Ctrl-Right': 'goWordRight', 'Alt-Left': 'goLineStart', 'Alt-Right': 'goLineEnd', 'Ctrl-Backspace': 'delWordBefore', 'Ctrl-Delete': 'delWordAfter', 'Ctrl-S': 'save', 'Ctrl-F': 'find', 'Ctrl-G': 'findNext', 'Shift-Ctrl-G': 'findPrev', 'Shift-Ctrl-F': 'replace', 'Shift-Ctrl-R': 'replaceAll', 'Ctrl-[': 'indentLess', 'Ctrl-]': 'indentMore', fallthrough: 'basic' }, ge.macDefault = { 'Cmd-A': 'selectAll', 'Cmd-D': 'deleteLine', 'Cmd-Z': 'undo', 'Shift-Cmd-Z': 'redo', 'Cmd-Y': 'redo', 'Cmd-Up': 'goDocStart', 'Cmd-End': 'goDocEnd', 'Cmd-Down': 'goDocEnd', 'Alt-Left': 'goWordLeft', 'Alt-Right': 'goWordRight', 'Cmd-Left': 'goLineStart', 'Cmd-Right': 'goLineEnd', 'Alt-Backspace': 'delWordBefore', 'Ctrl-Alt-Backspace': 'delWordAfter', 'Alt-Delete': 'delWordAfter', 'Cmd-S': 'save', 'Cmd-F': 'find', 'Cmd-G': 'findNext', 'Shift-Cmd-G': 'findPrev', 'Cmd-Alt-F': 'replace', 'Shift-Cmd-Alt-F': 'replaceAll', 'Cmd-[': 'indentLess', 'Cmd-]': 'indentMore', fallthrough: ['basic', 'emacsy'] }, ge.default = Sd ? ge.macDefault : ge.pcDefault, ge.emacsy = { 'Ctrl-F': 'goCharRight', 'Ctrl-B': 'goCharLeft', 'Ctrl-P': 'goLineUp', 'Ctrl-N': 'goLineDown', 'Alt-F': 'goWordRight', 'Alt-B': 'goWordLeft', 'Ctrl-A': 'goLineStart', 'Ctrl-E': 'goLineEnd', 'Ctrl-V': 'goPageDown', 'Shift-Ctrl-V': 'goPageUp', 'Ctrl-D': 'delCharAfter', 'Ctrl-H': 'delCharBefore', 'Alt-D': 'delWordAfter', 'Alt-Backspace': 'delWordBefore', 'Ctrl-K': 'killLine', 'Ctrl-T': 'transposeChars' }, a.isModifierKey = Xb, a.fromTextArea = function (b, c) { function d() { b.value = i.getValue(); } if (c || (c = {}), c.value = b.value, !c.tabindex && b.tabindex && (c.tabindex = b.tabindex), c.autofocus == null) { let e = document.body; try { e = document.activeElement; } catch (f) {}c.autofocus = e == b || b.getAttribute('autofocus') != null && e == document.body; } if (b.form) { Uc(b.form, 'submit', d); const g = b.form; var h = g.submit; try { g.submit = function j() { d(), g.submit = h, g.submit(), g.submit = j; }; } catch (f) {} }b.style.display = 'none'; var i = a((a) => { b.parentNode.insertBefore(a, b.nextSibling); }, c); return i.save = d, i.getTextArea = function () { return b; }, i.toTextArea = function () { d(), b.parentNode.removeChild(i.getWrapperElement()), b.style.display = '', b.form && (Vc(b.form, 'submit', d), typeof b.form.submit === 'function' && (b.form.submit = h)); }, i; }, Yb.prototype = { eol: function () { return this.pos >= this.string.length; }, sol: function () { return this.pos == 0; }, peek: function () { return this.string.charAt(this.pos) || void 0; }, next: function () { return this.pos < this.string.length ? this.string.charAt(this.pos++) : void 0; }, eat: function (a) { const b = this.string.charAt(this.pos); if (typeof a === 'string') var c = b == a; else var c = b && (a.test ? a.test(b) : a(b)); return c ? (++this.pos, b) : void 0; }, eatWhile: function (a) { for (var b = this.pos; this.eat(a););return this.pos > b; }, eatSpace: function () { for (var a = this.pos; /[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos; return this.pos > a; }, skipToEnd: function () { this.pos = this.string.length; }, skipTo: function (a) { const b = this.string.indexOf(a, this.pos); return b > -1 ? (this.pos = b, !0) : void 0; }, backUp: function (a) { this.pos -= a; }, column: function () { return $c(this.string, this.start, this.tabSize); }, indentation: function () { return $c(this.string, null, this.tabSize); }, match: function (a, b, c) { if (typeof a !== 'string') { const d = this.string.slice(this.pos).match(a); return d && d.index > 0 ? null : (d && b !== !1 && (this.pos += d[0].length), d); } const e = function (a) { return c ? a.toLowerCase() : a; }; return e(this.string).indexOf(e(a), this.pos) == this.pos ? (b !== !1 && (this.pos += a.length), !0) : void 0; }, current: function () { return this.string.slice(this.start, this.pos); } }, a.StringStream = Yb, Zb.prototype.clear = function () { if (!this.explicitlyCleared) { T(this.cm); for (var a = null, b = null, c = 0; c < this.lines.length; ++c) { const d = this.lines[c]; const e = _b(d.markedSpans, this); e.to != null && (b = Gc(d)), d.markedSpans = ac(d.markedSpans, e), e.from != null ? a = Gc(d) : this.collapsed && !kc(d) && Fc(d, R(this.cm.display)); }a != null && W(this.cm, a, b + 1), this.lines.length = 0, this.explicitlyCleared = !0, this.collapsed && this.cm.view.cantEdit && (this.cm.view.cantEdit = !1, Hb(this.cm)), U(this.cm), Xc(this.cm, this, 'clear'); } }, Zb.prototype.find = function () { for (var a, b, c = 0; c < this.lines.length; ++c) { const d = this.lines[c]; const e = _b(d.markedSpans, this); if (e.from != null || e.to != null) { const f = Gc(d); e.from != null && (a = { line: f, ch: e.from }), e.to != null && (b = { line: f, ch: e.to }); } } return this.type == 'bookmark' ? a : a && { from: a, to: b }; }, window.lineIsHidden = kc; var he = {}; var ie = /[\t\u0000-\u0019\u200b\u2028\u2029\uFEFF]/g; Cc.prototype = { chunkSize: function () { return this.lines.length; }, remove: function (a, b, c) { for (let d = a, e = a + b; e > d; ++d) { const f = this.lines[d]; this.height -= f.height, tc(f), Xc(c, f, 'delete'); } this.lines.splice(a, b); }, collapse: function (a) { a.splice.apply(a, [a.length, 0].concat(this.lines)); }, insertHeight: function (a, b, c) { this.height += c, this.lines = this.lines.slice(0, a).concat(b).concat(this.lines.slice(a)); for (let d = 0, e = b.length; e > d; ++d)b[d].parent = this; }, iterN: function (a, b, c) { for (let d = a + b; d > a; ++a) if (c(this.lines[a])) return !0; } }, Dc.prototype = { chunkSize: function () { return this.size; }, remove: function (a, b, c) { this.size -= b; for (let d = 0; d < this.children.length; ++d) { const e = this.children[d]; const f = e.chunkSize(); if (f > a) { const g = Math.min(b, f - a); const h = e.height; if (e.remove(a, g, c), this.height -= h - e.height, f == g && (this.children.splice(d--, 1), e.parent = null), (b -= g) == 0) break; a = 0; } else a -= f; } if (this.size - b < 25) { const i = []; this.collapse(i), this.children = [new Cc(i)], this.children[0].parent = this; } }, collapse: function (a) { for (let b = 0, c = this.children.length; c > b; ++b) this.children[b].collapse(a); }, insert: function (a, b) { for (var c = 0, d = 0, e = b.length; e > d; ++d)c += b[d].height; this.insertHeight(a, b, c); }, insertHeight: function (a, b, c) { this.size += b.length, this.height += c; for (let d = 0, e = this.children.length; e > d; ++d) { const f = this.children[d]; const g = f.chunkSize(); if (g >= a) { if (f.insertHeight(a, b, c), f.lines && f.lines.length > 50) { for (;f.lines.length > 50;) { const h = f.lines.splice(f.lines.length - 25, 25); const i = new Cc(h); f.height -= i.height, this.children.splice(d + 1, 0, i), i.parent = this; } this.maybeSpill(); } break; }a -= g; } }, maybeSpill: function () { if (!(this.children.length <= 10)) { let a = this; do { const b = a.children.splice(a.children.length - 5, 5); const c = new Dc(b); if (a.parent) { a.size -= c.size, a.height -= c.height; const d = cd(a.parent.children, a); a.parent.children.splice(d + 1, 0, c); } else { const e = new Dc(a.children); e.parent = a, a.children = [e, c], a = e; }c.parent = a.parent; } while (a.children.length > 10); a.parent.maybeSpill(); } }, iter: function (a, b, c) { this.iterN(a, b - a, c); }, iterN: function (a, b, c) { for (let d = 0, e = this.children.length; e > d; ++d) { const f = this.children[d]; const g = f.chunkSize(); if (g > a) { const h = Math.min(b, g - a); if (f.iterN(a, h, c)) return !0; if ((b -= h) == 0) break; a = 0; } else a -= g; } } }, a.e_stop = Qc, a.e_preventDefault = Oc, a.e_stopPropagation = Pc, a.on = Uc, a.off = Vc, a.signal = Wc; var je = 30; var ke = a.Pass = { toString: function () { return 'CodeMirror.Pass'; } }; Zc.prototype = { set: function (a, b) { clearTimeout(this.id), this.id = setTimeout(b, a); } }, a.countColumn = $c; var le = ['']; var me = /[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc]/; var ne = /[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\uA670-\uA672\uA674-\uA67D\uA69F]/; var oe = (function () { if (Gd) return !1; const a = hd('div'); return 'draggable' in a || 'dragDrop' in a; }()); var pe = /^$/; Dd ? pe = /$'/ : Ld ? pe = /\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/ : Jd && (pe = /\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/); let qe; let re; var se = '\n\nb'.split(/\n/).length != 3 ? function (a) { for (var b = 0, c = [], d = a.length; d >= b;) { let e = a.indexOf('\n', b); e == -1 && (e = a.length); const f = a.slice(b, a.charAt(e - 1) == '\r' ? e - 1 : e); const g = f.indexOf('\r'); g != -1 ? (c.push(f.slice(0, g)), b += g + 1) : (c.push(f), b = e + 1); } return c; } : function (a) { return a.split(/\r\n?|\n/); }; a.splitLines = se; var te = window.getSelection ? function (a) { try { return a.selectionStart != a.selectionEnd; } catch (b) { return !1; } } : function (a) { try { var b = a.ownerDocument.selection.createRange(); } catch (c) {} return b && b.parentElement() == a ? b.compareEndPoints('StartToEnd', b) != 0 : !1; }; var ue = (function () { const a = hd('div'); return 'oncopy' in a ? !0 : (a.setAttribute('oncopy', 'return;'), typeof a.oncopy === 'function'); }()); var ve = { 3: 'Enter', 8: 'Backspace', 9: 'Tab', 13: 'Enter', 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 19: 'Pause', 20: 'CapsLock', 27: 'Esc', 32: 'Space', 33: 'PageUp', 34: 'PageDown', 35: 'End', 36: 'Home', 37: 'Left', 38: 'Up', 39: 'Right', 40: 'Down', 44: 'PrintScrn', 45: 'Insert', 46: 'Delete', 59: ';', 91: 'Mod', 92: 'Mod', 93: 'Mod', 109: '-', 107: '=', 127: 'Delete', 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\', 221: ']', 222: "'", 63276: 'PageUp', 63277: 'PageDown', 63275: 'End', 63273: 'Home', 63234: 'Left', 63232: 'Up', 63235: 'Right', 63233: 'Down', 63302: 'Insert', 63272: 'Delete' }; a.keyNames = ve, (function () { for (var a = 0; a < 10; a++)ve[a + 48] = String(a); for (var a = 65; a <= 90; a++)ve[a] = String.fromCharCode(a); for (var a = 1; a <= 12; a++)ve[a + 111] = ve[a + 63235] = `F${a}`; }()); var we = (function () { function a(a) { return a <= 255 ? b.charAt(a) : a >= 1424 && a <= 1524 ? 'R' : a >= 1536 && a <= 1791 ? c.charAt(a - 1536) : a >= 1792 && a <= 2220 ? 'r' : 'L'; } var b = 'bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL'; var c = 'rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr'; const d = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; const e = /[stwN]/; const f = /[LRr]/; const g = /[Lb1n]/; const h = /[1n]/; return function (b) { if (!d.test(b)) return !1; for (var c, i = b.length, j = [], k = null, l = 0; i > l; ++l)j.push(c = a(b.charCodeAt(l))), k == null && (c == 'L' ? k = 'L' : (c == 'R' || c == 'r') && (k = 'R')); k == null && (k = 'L'); for (var l = 0, m = k; i > l; ++l) { var c = j[l]; c == 'm' ? j[l] = m : m = c; } for (var l = 0, n = k; i > l; ++l) { var c = j[l]; c == '1' && n == 'r' ? j[l] = 'n' : f.test(c) && (n = c, c == 'r' && (j[l] = 'R')); } for (var l = 1, m = j[0]; i - 1 > l; ++l) { var c = j[l]; c == '+' && m == '1' && j[l + 1] == '1' ? j[l] = '1' : c != ',' || m != j[l + 1] || m != '1' && m != 'n' || (j[l] = m), m = c; } for (var l = 0; i > l; ++l) { var c = j[l]; if (c == ',')j[l] = 'N'; else if (c == '%') { for (var o = l + 1; i > o && j[o] == '%'; ++o);for (var p = l && j[l - 1] == '!' || i - 1 > o && j[o] == '1' ? '1' : 'N', q = l; o > q; ++q)j[q] = p; l = o - 1; } } for (var l = 0, n = k; i > l; ++l) { var c = j[l]; n == 'L' && c == '1' ? j[l] = 'L' : f.test(c) && (n = c); } for (var l = 0; i > l; ++l) if (e.test(j[l])) { for (var o = l + 1; i > o && e.test(j[o]); ++o);for (var r = (l ? j[l - 1] : k) == 'L', s = (i - 1 > o ? j[o] : k) == 'L', p = r || s ? 'L' : 'R', q = l; o > q; ++q)j[q] = p; l = o - 1; } for (var t, u = [], l = 0; i > l;) if (g.test(j[l])) { const v = l; for (++l; i > l && g.test(j[l]); ++l);u.push({ from: v, to: l, level: 0 }); } else { let w = l; const x = u.length; for (++l; i > l && j[l] != 'L'; ++l);for (var q = w; l > q;) if (h.test(j[q])) { q > w && u.splice(x, 0, { from: w, to: q, level: 1 }); const y = q; for (++q; l > q && h.test(j[q]); ++q);u.splice(x, 0, { from: y, to: q, level: 2 }), w = q; } else ++q; l > w && u.splice(x, 0, { from: w, to: l, level: 1 }); } return u[0].level == 1 && (t = b.match(/^\s+/)) && (u[0].from = t[0].length, u.unshift({ from: 0, to: t[0].length, level: 0 })), ad(u).level == 1 && (t = b.match(/\s+$/)) && (ad(u).to -= t[0].length, u.push({ from: i - t[0].length, to: i, level: 0 })), u[0].level != ad(u).level && u.push({ from: i, to: i, level: u[0].level }), u; }; }()); return a.version = '3.0', a; +}()), CodeMirror.defineMode('javascript', (a, b) => { function c(a, b, c) { return b.tokenize = c, c(a, b); } function d(a, b) { for (var c, d = !1; (c = a.next()) != null;) { if (c == b && !d) return !1; d = !d && c == '\\'; } return d; } function e(a, b, c) { return M = a, N = c, b; } function f(a, b) { const f = a.next(); if (f == '"' || f == "'") return c(a, b, g(f)); if (/[\[\]{}\(\),;\:\.]/.test(f)) return e(f); if (f == '0' && a.eat(/x/i)) return a.eatWhile(/[\da-f]/i), e('number', 'number'); if (/\d/.test(f) || f == '-' && a.eat(/\d/)) return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/), e('number', 'number'); if (f == '/') return a.eat('*') ? c(a, b, h) : a.eat('/') ? (a.skipToEnd(), e('comment', 'comment')) : b.lastType == 'operator' || b.lastType == 'keyword c' || /^[\[{}\(,;:]$/.test(b.lastType) ? (d(a, '/'), a.eatWhile(/[gimy]/), e('regexp', 'string-2')) : (a.eatWhile(S), e('operator', null, a.current())); if (f == '#') return a.skipToEnd(), e('error', 'error'); if (S.test(f)) return a.eatWhile(S), e('operator', null, a.current()); a.eatWhile(/[\w\$_]/); const i = a.current(); const j = R.propertyIsEnumerable(i) && R[i]; return j && b.lastType != '.' ? e(j.type, j.style, i) : e('variable', 'variable', i); } function g(a) { return function (b, c) { return d(b, a) || (c.tokenize = f), e('string', 'string'); }; } function h(a, b) { for (var c, d = !1; c = a.next();) { if (c == '/' && d) { b.tokenize = f; break; }d = c == '*'; } return e('comment', 'comment'); } function i(a, b, c, d, e, f) { this.indented = a, this.column = b, this.type = c, this.prev = e, this.info = f, d != null && (this.align = d); } function j(a, b) { for (let c = a.localVars; c; c = c.next) if (c.name == b) return !0; } function k(a, b, c, d, e) { const f = a.cc; for (U.state = a, U.stream = e, U.marked = null, U.cc = f, a.lexical.hasOwnProperty('align') || (a.lexical.align = !0); ;) { const g = f.length ? f.pop() : P ? u : t; if (g(c, d)) { for (;f.length && f[f.length - 1].lex;)f.pop()(); return U.marked ? U.marked : c == 'variable' && j(a, d) ? 'variable-2' : b; } } } function l() { for (let a = arguments.length - 1; a >= 0; a--)U.cc.push(arguments[a]); } function m() { return l.apply(null, arguments), !0; } function n(a) { const b = U.state; if (b.context) { U.marked = 'def'; for (let c = b.localVars; c; c = c.next) if (c.name == a) return; b.localVars = { name: a, next: b.localVars }; } } function o() { U.state.context = { prev: U.state.context, vars: U.state.localVars }, U.state.localVars = V; } function p() { U.state.localVars = U.state.context.vars, U.state.context = U.state.context.prev; } function q(a, b) { const c = function () { const c = U.state; c.lexical = new i(c.indented, U.stream.column(), a, null, c.lexical, b); }; return c.lex = !0, c; } function r() { const a = U.state; a.lexical.prev && (a.lexical.type == ')' && (a.indented = a.lexical.indented), a.lexical = a.lexical.prev); } function s(a) { return function (b) { return b == a ? m() : a == ';' ? l() : m(arguments.callee); }; } function t(a) { return a == 'var' ? m(q('vardef'), E, s(';'), r) : a == 'keyword a' ? m(q('form'), u, t, r) : a == 'keyword b' ? m(q('form'), t, r) : a == '{' ? m(q('}'), B, r) : a == ';' ? m() : a == 'function' ? m(K) : a == 'for' ? m(q('form'), s('('), q(')'), G, s(')'), r, t, r) : a == 'variable' ? m(q('stat'), x) : a == 'switch' ? m(q('form'), u, q('}', 'switch'), s('{'), B, r, r) : a == 'case' ? m(u, s(':')) : a == 'default' ? m(s(':')) : a == 'catch' ? m(q('form'), o, s('('), L, s(')'), t, r, p) : l(q('stat'), u, s(';'), r); } function u(a) { return T.hasOwnProperty(a) ? m(w) : a == 'function' ? m(K) : a == 'keyword c' ? m(v) : a == '(' ? m(q(')'), v, s(')'), r, w) : a == 'operator' ? m(u) : a == '[' ? m(q(']'), A(u, ']'), r, w) : a == '{' ? m(q('}'), A(z, '}'), r, w) : m(); } function v(a) { return a.match(/[;\}\)\],]/) ? l() : l(u); } function w(a, b) { if (a == 'operator' && /\+\+|--/.test(b)) return m(w); if (a == 'operator' && b == '?') return m(u, s(':'), u); if (a != ';') return a == '(' ? m(q(')'), A(u, ')'), r, w) : a == '.' ? m(y, w) : a == '[' ? m(q(']'), u, s(']'), r, w) : void 0; } function x(a) { return a == ':' ? m(r, t) : l(w, s(';'), r); } function y(a) { return a == 'variable' ? (U.marked = 'property', m()) : void 0; } function z(a) { return a == 'variable' && (U.marked = 'property'), T.hasOwnProperty(a) ? m(s(':'), u) : void 0; } function A(a, b) { function c(d) { return d == ',' ? m(a, c) : d == b ? m() : m(s(b)); } return function (d) { return d == b ? m() : l(a, c); }; } function B(a) { return a == '}' ? m() : l(t, B); } function C(a) { return a == ':' ? m(D) : l(); } function D(a) { return a == 'variable' ? (U.marked = 'variable-3', m()) : l(); } function E(a, b) { return a == 'variable' ? (n(b), Q ? m(C, F) : m(F)) : l(); } function F(a, b) { return b == '=' ? m(u, F) : a == ',' ? m(E) : void 0; } function G(a) { return a == 'var' ? m(E, s(';'), I) : a == ';' ? m(I) : a == 'variable' ? m(H) : m(I); } function H(a, b) { return b == 'in' ? m(u) : m(w, I); } function I(a, b) { return a == ';' ? m(J) : b == 'in' ? m(u) : m(u, s(';'), J); } function J(a) { a != ')' && m(u); } function K(a, b) { return a == 'variable' ? (n(b), m(K)) : a == '(' ? m(q(')'), o, A(L, ')'), r, t, p) : void 0; } function L(a, b) { return a == 'variable' ? (n(b), Q ? m(C) : m()) : void 0; } let M; let N; const O = a.indentUnit; var P = b.json; var Q = b.typescript; var R = (function () { function a(a) { return { type: a, style: 'keyword' }; } const b = a('keyword a'); const c = a('keyword b'); const d = a('keyword c'); const e = a('operator'); const f = { type: 'atom', style: 'atom' }; const g = { if: b, while: b, with: b, else: c, do: c, try: c, finally: c, return: d, break: d, continue: d, new: d, delete: d, throw: d, var: a('var'), const: a('var'), let: a('var'), function: a('function'), catch: a('catch'), for: a('for'), switch: a('switch'), case: a('case'), default: a('default'), in: e, typeof: e, instanceof: e, true: f, false: f, null: f, undefined: f, NaN: f, Infinity: f }; if (Q) { const h = { type: 'variable', style: 'variable-3' }; const i = { interface: a('interface'), class: a('class'), extends: a('extends'), constructor: a('constructor'), public: a('public'), private: a('private'), protected: a('protected'), static: a('static'), super: a('super'), string: h, number: h, bool: h, any: h }; for (const j in i)g[j] = i[j]; } return g; }()); var S = /[+\-*&%=<>!?|]/; var T = { atom: !0, number: !0, variable: !0, string: !0, regexp: !0 }; var U = { state: null, column: null, marked: null, cc: null }; var V = { name: 'this', next: { name: 'arguments' } }; return r.lex = !0, { startState: function (a) { return { tokenize: f, lastType: null, cc: [], lexical: new i((a || 0) - O, 0, 'block', !1), localVars: b.localVars, context: b.localVars && { vars: b.localVars }, indented: 0 }; }, token: function (a, b) { if (a.sol() && (b.lexical.hasOwnProperty('align') || (b.lexical.align = !1), b.indented = a.indentation()), a.eatSpace()) return null; const c = b.tokenize(a, b); return M == 'comment' ? c : (b.lastType = M, k(b, c, M, N, a)); }, indent: function (a, b) { if (a.tokenize == h) return CodeMirror.Pass; if (a.tokenize != f) return 0; const c = b && b.charAt(0); let d = a.lexical; d.type == 'stat' && c == '}' && (d = d.prev); const e = d.type; const g = c == e; return e == 'vardef' ? d.indented + (a.lastType == 'operator' || a.lastType == ',' ? 4 : 0) : e == 'form' && c == '{' ? d.indented : e == 'form' ? d.indented + O : e == 'stat' ? d.indented + (a.lastType == 'operator' || a.lastType == ',' ? O : 0) : d.info != 'switch' || g ? d.align ? d.column + (g ? 0 : 1) : d.indented + (g ? 0 : O) : d.indented + (/^(?:case|default)\b/.test(b) ? O : 2 * O); }, electricChars: ':{}', jsonMode: P }; }), CodeMirror.defineMIME('text/javascript', 'javascript'), CodeMirror.defineMIME('application/json', { name: 'javascript', json: !0 }), CodeMirror.defineMIME('text/typescript', { name: 'javascript', typescript: !0 }), CodeMirror.defineMIME('application/typescript', { name: 'javascript', typescript: !0 }), (function () { function a(a, b, c, d) { if (this.atOccurrence = !1, this.cm = a, d == null && typeof b === 'string' && (d = !1), c = c ? a.clipPos(c) : { line: 0, ch: 0 }, this.pos = { from: c, to: c }, typeof b !== 'string')b.global || (b = new RegExp(b.source, b.ignoreCase ? 'ig' : 'g')), this.matches = function (c, d) { if (c) { b.lastIndex = 0; for (var e = a.getLine(d.line).slice(0, d.ch), f = b.exec(e), g = 0; f;) { g += f.index + 1, e = e.slice(g), b.lastIndex = 0; const h = b.exec(e); if (!h) break; f = h; }g--; } else { b.lastIndex = d.ch; var e = a.getLine(d.line); var f = b.exec(e); var g = f && f.index; } return f ? { from: { line: d.line, ch: g }, to: { line: d.line, ch: g + f[0].length }, match: f } : void 0; }; else { d && (b = b.toLowerCase()); const e = d ? function (a) { return a.toLowerCase(); } : function (a) { return a; }; const f = b.split('\n'); this.matches = f.length == 1 ? function (c, d) { let f; const g = e(a.getLine(d.line)); const h = b.length; return (c ? d.ch >= h && (f = g.lastIndexOf(b, d.ch - h)) != -1 : (f = g.indexOf(b, d.ch)) != -1) ? { from: { line: d.line, ch: f }, to: { line: d.line, ch: f + h } } : void 0; } : function (b, c) { let d = c.line; let g = b ? f.length - 1 : 0; let h = f[g]; let i = e(a.getLine(d)); const j = b ? i.indexOf(h) + h.length : i.lastIndexOf(h); if (!(b ? j >= c.ch || j != h.length : j <= c.ch || j != i.length - h.length)) for (;;) { if (b ? !d : d == a.lineCount() - 1) return; if (i = e(a.getLine(d += b ? -1 : 1)), h = f[b ? --g : ++g], !(g > 0 && g < f.length - 1)) { const k = b ? i.lastIndexOf(h) : i.indexOf(h) + h.length; if (b ? k != i.length - h.length : k != h.length) return; const l = { line: c.line, ch: j }; const m = { line: d, ch: k }; return { from: b ? m : l, to: b ? l : m }; } if (i != h) return; } }; } }a.prototype = { findNext: function () { return this.find(!1); }, findPrevious: function () { return this.find(!0); }, find: function (a) { function b(a) { const b = { line: a, ch: 0 }; return c.pos = { from: b, to: b }, c.atOccurrence = !1, !1; } for (var c = this, d = this.cm.clipPos(a ? this.pos.from : this.pos.to); ;) { if (this.pos = this.matches(a, d)) return this.atOccurrence = !0, this.pos.match || !0; if (a) { if (!d.line) return b(0); d = { line: d.line - 1, ch: this.cm.getLine(d.line - 1).length }; } else { const e = this.cm.lineCount(); if (d.line == e - 1) return b(e); d = { line: d.line + 1, ch: 0 }; } } }, from: function () { return this.atOccurrence ? this.pos.from : void 0; }, to: function () { return this.atOccurrence ? this.pos.to : void 0; }, replace: function (a) { const b = this; this.atOccurrence && (b.pos.to = this.cm.replaceRange(a, b.pos.from, b.pos.to)); } }, CodeMirror.defineExtension('getSearchCursor', function (b, c, d) { return new a(this, b, c, d); }); }()); diff --git a/report/assets/scripts/bundles/core-bundle.js b/report/assets/scripts/bundles/core-bundle.js new file mode 100644 index 00000000..e2c51685 --- /dev/null +++ b/report/assets/scripts/bundles/core-bundle.js @@ -0,0 +1,108 @@ +!(function (a, b) { + function c(a) { const b = ob[a] = {}; return $.each(a.split(bb), (a, c) => { b[c] = !0; }), b; } function d(a, c, d) { if (d === b && a.nodeType === 1) { const e = `data-${c.replace(qb, '-$1').toLowerCase()}`; if (d = a.getAttribute(e), typeof d === 'string') { try { d = d === 'true' ? !0 : d === 'false' ? !1 : d === 'null' ? null : `${+d}` === d ? +d : pb.test(d) ? $.parseJSON(d) : d; } catch (f) {}$.data(a, c, d); } else d = b; } return d; } function e(a) { let b; for (b in a) if ((b !== 'data' || !$.isEmptyObject(a[b])) && b !== 'toJSON') return !1; return !0; } function f() { return !1; } function g() { return !0; } function h(a) { return !a || !a.parentNode || a.parentNode.nodeType === 11; } function i(a, b) { do a = a[b]; while (a && a.nodeType !== 1); return a; } function j(a, b, c) { if (b = b || 0, $.isFunction(b)) return $.grep(a, (a, d) => { const e = !!b.call(a, d, a); return e === c; }); if (b.nodeType) return $.grep(a, a => a === b === c); if (typeof b === 'string') { const d = $.grep(a, a => a.nodeType === 1); if (Kb.test(b)) return $.filter(b, d, !c); b = $.filter(b, d); } return $.grep(a, a => $.inArray(a, b) >= 0 === c); } function k(a) { const b = Nb.split('|'); const c = a.createDocumentFragment(); if (c.createElement) for (;b.length;)c.createElement(b.pop()); return c; } function l(a, b) { return a.getElementsByTagName(b)[0] || a.appendChild(a.ownerDocument.createElement(b)); } function m(a, b) { if (b.nodeType === 1 && $.hasData(a)) { let c; let d; let e; const f = $._data(a); const g = $._data(b, f); const h = f.events; if (h) { delete g.handle, g.events = {}; for (c in h) for (d = 0, e = h[c].length; e > d; d++)$.event.add(b, c, h[c][d]); }g.data && (g.data = $.extend({}, g.data)); } } function n(a, b) { let c; b.nodeType === 1 && (b.clearAttributes && b.clearAttributes(), b.mergeAttributes && b.mergeAttributes(a), c = b.nodeName.toLowerCase(), c === 'object' ? (b.parentNode && (b.outerHTML = a.outerHTML), $.support.html5Clone && a.innerHTML && !$.trim(b.innerHTML) && (b.innerHTML = a.innerHTML)) : c === 'input' && Xb.test(a.type) ? (b.defaultChecked = b.checked = a.checked, b.value !== a.value && (b.value = a.value)) : c === 'option' ? b.selected = a.defaultSelected : c === 'input' || c === 'textarea' ? b.defaultValue = a.defaultValue : c === 'script' && b.text !== a.text && (b.text = a.text), b.removeAttribute($.expando)); } function o(a) { return typeof a.getElementsByTagName !== 'undefined' ? a.getElementsByTagName('*') : typeof a.querySelectorAll !== 'undefined' ? a.querySelectorAll('*') : []; } function p(a) { Xb.test(a.type) && (a.defaultChecked = a.checked); } function q(a, b) { if (b in a) return b; for (var c = b.charAt(0).toUpperCase() + b.slice(1), d = b, e = rc.length; e--;) if (b = rc[e] + c, b in a) return b; return d; } function r(a, b) { return a = b || a, $.css(a, 'display') === 'none' || !$.contains(a.ownerDocument, a); } function s(a, b) { for (var c, d, e = [], f = 0, g = a.length; g > f; f++)c = a[f], c.style && (e[f] = $._data(c, 'olddisplay'), b ? (!e[f] && c.style.display === 'none' && (c.style.display = ''), c.style.display === '' && r(c) && (e[f] = $._data(c, 'olddisplay', w(c.nodeName)))) : (d = cc(c, 'display'), !e[f] && d !== 'none' && $._data(c, 'olddisplay', d))); for (f = 0; g > f; f++)c = a[f], c.style && (b && c.style.display !== 'none' && c.style.display !== '' || (c.style.display = b ? e[f] || '' : 'none')); return a; } function t(a, b, c) { const d = kc.exec(b); return d ? Math.max(0, d[1] - (c || 0)) + (d[2] || 'px') : b; } function u(a, b, c, d) { for (var e = c === (d ? 'border' : 'content') ? 4 : b === 'width' ? 1 : 0, f = 0; e < 4; e += 2)c === 'margin' && (f += $.css(a, c + qc[e], !0)), d ? (c === 'content' && (f -= parseFloat(cc(a, `padding${qc[e]}`)) || 0), c !== 'margin' && (f -= parseFloat(cc(a, `border${qc[e]}Width`)) || 0)) : (f += parseFloat(cc(a, `padding${qc[e]}`)) || 0, c !== 'padding' && (f += parseFloat(cc(a, `border${qc[e]}Width`)) || 0)); return f; } function v(a, b, c) { let d = b === 'width' ? a.offsetWidth : a.offsetHeight; let e = !0; const f = $.support.boxSizing && $.css(a, 'boxSizing') === 'border-box'; if (d <= 0 || d == null) { if (d = cc(a, b), (d < 0 || d == null) && (d = a.style[b]), lc.test(d)) return d; e = f && ($.support.boxSizingReliable || d === a.style[b]), d = parseFloat(d) || 0; } return `${d + u(a, b, c || (f ? 'border' : 'content'), e)}px`; } function w(a) { if (nc[a]) return nc[a]; let b = $(`<${a}>`).appendTo(P.body); let c = b.css('display'); return b.remove(), (c === 'none' || c === '') && (dc = P.body.appendChild(dc || $.extend(P.createElement('iframe'), { frameBorder: 0, width: 0, height: 0 })), ec && dc.createElement || (ec = (dc.contentWindow || dc.contentDocument).document, ec.write(''), ec.close()), b = ec.body.appendChild(ec.createElement(a)), c = cc(b, 'display'), P.body.removeChild(dc)), nc[a] = c, c; } function x(a, b, c, d) { let e; if ($.isArray(b))$.each(b, (b, e) => { c || uc.test(a) ? d(a, e) : x(`${a}[${typeof e === 'object' ? b : ''}]`, e, c, d); }); else if (c || $.type(b) !== 'object')d(a, b); else for (e in b)x(`${a}[${e}]`, b[e], c, d); } function y(a) { return function (b, c) { typeof b !== 'string' && (c = b, b = '*'); let d; let e; let f; const g = b.toLowerCase().split(bb); let h = 0; const i = g.length; if ($.isFunction(c)) for (;i > h; h++)d = g[h], f = /^\+/.test(d), f && (d = d.substr(1) || '*'), e = a[d] = a[d] || [], e[f ? 'unshift' : 'push'](c); }; } function z(a, c, d, e, f, g) { f = f || c.dataTypes[0], g = g || {}, g[f] = !0; for (var h, i = a[f], j = 0, k = i ? i.length : 0, l = a === Kc; k > j && (l || !h); j++)h = i[j](c, d, e), typeof h === 'string' && (!l || g[h] ? h = b : (c.dataTypes.unshift(h), h = z(a, c, d, e, h, g))); return (l || !h) && !g['*'] && (h = z(a, c, d, e, '*', g)), h; } function A(a, c) { let d; let e; const f = $.ajaxSettings.flatOptions || {}; for (d in c)c[d] !== b && ((f[d] ? a : e || (e = {}))[d] = c[d]); e && $.extend(!0, a, e); } function B(a, c, d) { let e; let f; let g; let h; const i = a.contents; const j = a.dataTypes; const k = a.responseFields; for (f in k)f in d && (c[k[f]] = d[f]); for (;j[0] === '*';)j.shift(), e === b && (e = a.mimeType || c.getResponseHeader('content-type')); if (e) for (f in i) if (i[f] && i[f].test(e)) { j.unshift(f); break; } if (j[0] in d)g = j[0]; else { for (f in d) { if (!j[0] || a.converters[`${f} ${j[0]}`]) { g = f; break; }h || (h = f); }g = g || h; } return g ? (g !== j[0] && j.unshift(g), d[g]) : void 0; } function C(a, b) { let c; let d; let e; let f; const g = a.dataTypes.slice(); let h = g[0]; const i = {}; let j = 0; if (a.dataFilter && (b = a.dataFilter(b, a.dataType)), g[1]) for (c in a.converters)i[c.toLowerCase()] = a.converters[c]; for (;e = g[++j];) if (e !== '*') { if (h !== '*' && h !== e) { if (c = i[`${h} ${e}`] || i[`* ${e}`], !c) for (d in i) if (f = d.split(' '), f[1] === e && (c = i[`${h} ${f[0]}`] || i[`* ${f[0]}`])) { c === !0 ? c = i[d] : i[d] !== !0 && (e = f[0], g.splice(j--, 0, e)); break; } if (c !== !0) if (c && a.throws)b = c(b); else try { b = c(b); } catch (k) { return { state: 'parsererror', error: c ? k : `No conversion from ${h} to ${e}` }; } }h = e; } return { state: 'success', data: b }; } function D() { try { return new a.XMLHttpRequest(); } catch (b) {} } function E() { try { return new a.ActiveXObject('Microsoft.XMLHTTP'); } catch (b) {} } function F() { return setTimeout(() => { Vc = b; }, 0), Vc = $.now(); } function G(a, b) { $.each(b, (b, c) => { for (let d = (_c[b] || []).concat(_c['*']), e = 0, f = d.length; f > e; e++) if (d[e].call(a, b, c)) return; }); } function H(a, b, c) { let d; let e = 0; const f = $c.length; const g = $.Deferred().always(() => { delete h.elem; }); var h = function () { for (var b = Vc || F(), c = Math.max(0, i.startTime + i.duration - b), d = c / i.duration || 0, e = 1 - d, f = 0, h = i.tweens.length; h > f; f++)i.tweens[f].run(e); return g.notifyWith(a, [i, e, c]), e < 1 && h ? c : (g.resolveWith(a, [i]), !1); }; var i = g.promise({ elem: a, props: $.extend({}, b), opts: $.extend(!0, { specialEasing: {} }, c), originalProperties: b, originalOptions: c, startTime: Vc || F(), duration: c.duration, tweens: [], createTween: function (b, c) { const d = $.Tween(a, i.opts, b, c, i.opts.specialEasing[b] || i.opts.easing); return i.tweens.push(d), d; }, stop: function (b) { for (let c = 0, d = b ? i.tweens.length : 0; d > c; c++)i.tweens[c].run(1); return b ? g.resolveWith(a, [i, b]) : g.rejectWith(a, [i, b]), this; } }); const j = i.props; for (I(j, i.opts.specialEasing); f > e; e++) if (d = $c[e].call(i, a, j, i.opts)) return d; return G(i, j), $.isFunction(i.opts.start) && i.opts.start.call(a, i), $.fx.timer($.extend(h, { anim: i, queue: i.opts.queue, elem: a })), i.progress(i.opts.progress).done(i.opts.done, i.opts.complete).fail(i.opts.fail).always(i.opts.always); } function I(a, b) { let c; let d; let e; let f; let g; for (c in a) if (d = $.camelCase(c), e = b[d], f = a[c], $.isArray(f) && (e = f[1], f = a[c] = f[0]), c !== d && (a[d] = f, delete a[c]), g = $.cssHooks[d], g && 'expand' in g) { f = g.expand(f), delete a[d]; for (c in f)c in a || (a[c] = f[c], b[c] = e); } else b[d] = e; } function J(a, b, c) { let d; let e; let f; let g; let h; let i; let j; let k; let l; const m = this; const n = a.style; const o = {}; const p = []; let q = a.nodeType && r(a); c.queue || (k = $._queueHooks(a, 'fx'), k.unqueued == null && (k.unqueued = 0, l = k.empty.fire, k.empty.fire = function () { k.unqueued || l(); }), k.unqueued++, m.always(() => { m.always(() => { k.unqueued--, $.queue(a, 'fx').length || k.empty.fire(); }); })), a.nodeType === 1 && ('height' in b || 'width' in b) && (c.overflow = [n.overflow, n.overflowX, n.overflowY], $.css(a, 'display') === 'inline' && $.css(a, 'float') === 'none' && ($.support.inlineBlockNeedsLayout && w(a.nodeName) !== 'inline' ? n.zoom = 1 : n.display = 'inline-block')), c.overflow && (n.overflow = 'hidden', $.support.shrinkWrapBlocks || m.done(() => { n.overflow = c.overflow[0], n.overflowX = c.overflow[1], n.overflowY = c.overflow[2]; })); for (d in b) if (f = b[d], Xc.exec(f)) { if (delete b[d], i = i || f === 'toggle', f === (q ? 'hide' : 'show')) continue; p.push(d); } if (g = p.length) { h = $._data(a, 'fxshow') || $._data(a, 'fxshow', {}), 'hidden' in h && (q = h.hidden), i && (h.hidden = !q), q ? $(a).show() : m.done(() => { $(a).hide(); }), m.done(() => { let b; $.removeData(a, 'fxshow', !0); for (b in o)$.style(a, b, o[b]); }); for (d = 0; g > d; d++)e = p[d], j = m.createTween(e, q ? h[e] : 0), o[e] = h[e] || $.style(a, e), e in h || (h[e] = j.start, q && (j.end = j.start, j.start = e === 'width' || e === 'height' ? 1 : 0)); } } function K(a, b, c, d, e) { return new K.prototype.init(a, b, c, d, e); } function L(a, b) { let c; const d = { height: a }; let e = 0; for (b = b ? 1 : 0; e < 4; e += 2 - b)c = qc[e], d[`margin${c}`] = d[`padding${c}`] = a; return b && (d.opacity = d.width = a), d; } function M(a) { return $.isWindow(a) ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : !1; } let N; let O; var P = a.document; const Q = a.location; const R = a.navigator; const S = a.jQuery; const T = a.$; const U = Array.prototype.push; const V = Array.prototype.slice; const W = Array.prototype.indexOf; const X = Object.prototype.toString; const Y = Object.prototype.hasOwnProperty; const Z = String.prototype.trim; var $ = function (a, b) { return new $.fn.init(a, b, N); }; const _ = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; const ab = /\S/; var bb = /\s+/; const cb = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; const db = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/; const eb = /^<(\w+)\s*\/?>(?:<\/\1>|)$/; const fb = /^[\],:{}\s]*$/; const gb = /(?:^|:|,)(?:\s*\[)+/g; const hb = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g; const ib = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g; const jb = /^-ms-/; const kb = /-([\da-z])/gi; const lb = function (a, b) { return (`${b}`).toUpperCase(); }; const mb = function () { P.addEventListener ? (P.removeEventListener('DOMContentLoaded', mb, !1), $.ready()) : P.readyState === 'complete' && (P.detachEvent('onreadystatechange', mb), $.ready()); }; const nb = {}; $.fn = $.prototype = { constructor: $, init: function (a, c, d) { let e; let f; let g; if (!a) return this; if (a.nodeType) return this.context = this[0] = a, this.length = 1, this; if (typeof a === 'string') { if (e = a.charAt(0) === '<' && a.charAt(a.length - 1) === '>' && a.length >= 3 ? [null, a, null] : db.exec(a), e && (e[1] || !c)) { if (e[1]) return c = c instanceof $ ? c[0] : c, g = c && c.nodeType ? c.ownerDocument || c : P, a = $.parseHTML(e[1], g, !0), eb.test(e[1]) && $.isPlainObject(c) && this.attr.call(a, c, !0), $.merge(this, a); if (f = P.getElementById(e[2]), f && f.parentNode) { if (f.id !== e[2]) return d.find(a); this.length = 1, this[0] = f; } return this.context = P, this.selector = a, this; } return !c || c.jquery ? (c || d).find(a) : this.constructor(c).find(a); } return $.isFunction(a) ? d.ready(a) : (a.selector !== b && (this.selector = a.selector, this.context = a.context), $.makeArray(a, this)); }, selector: '', jquery: '1.8.3', length: 0, size: function () { return this.length; }, toArray: function () { return V.call(this); }, get: function (a) { return a == null ? this.toArray() : a < 0 ? this[this.length + a] : this[a]; }, pushStack: function (a, b, c) { const d = $.merge(this.constructor(), a); return d.prevObject = this, d.context = this.context, b === 'find' ? d.selector = this.selector + (this.selector ? ' ' : '') + c : b && (d.selector = `${this.selector}.${b}(${c})`), d; }, each: function (a, b) { return $.each(this, a, b); }, ready: function (a) { return $.ready.promise().done(a), this; }, eq: function (a) { return a = +a, a === -1 ? this.slice(a) : this.slice(a, a + 1); }, first: function () { return this.eq(0); }, last: function () { return this.eq(-1); }, slice: function () { return this.pushStack(V.apply(this, arguments), 'slice', V.call(arguments).join(',')); }, map: function (a) { return this.pushStack($.map(this, (b, c) => a.call(b, c, b))); }, end: function () { return this.prevObject || this.constructor(null); }, push: U, sort: [].sort, splice: [].splice }, $.fn.init.prototype = $.fn, $.extend = $.fn.extend = function () { let a; let c; let d; let e; let f; let g; let h = arguments[0] || {}; let i = 1; const j = arguments.length; let k = !1; for (typeof h === 'boolean' && (k = h, h = arguments[1] || {}, i = 2), typeof h !== 'object' && !$.isFunction(h) && (h = {}), j === i && (h = this, --i); j > i; i++) if ((a = arguments[i]) != null) for (c in a)d = h[c], e = a[c], h !== e && (k && e && ($.isPlainObject(e) || (f = $.isArray(e))) ? (f ? (f = !1, g = d && $.isArray(d) ? d : []) : g = d && $.isPlainObject(d) ? d : {}, h[c] = $.extend(k, g, e)) : e !== b && (h[c] = e)); return h; }, $.extend({ noConflict: function (b) { return a.$ === $ && (a.$ = T), b && a.jQuery === $ && (a.jQuery = S), $; }, isReady: !1, readyWait: 1, holdReady: function (a) { a ? $.readyWait++ : $.ready(!0); }, ready: function (a) { if (a === !0 ? !--$.readyWait : !$.isReady) { if (!P.body) return setTimeout($.ready, 1); $.isReady = !0, a !== !0 && --$.readyWait > 0 || (O.resolveWith(P, [$]), $.fn.trigger && $(P).trigger('ready').off('ready')); } }, isFunction: function (a) { return $.type(a) === 'function'; }, isArray: Array.isArray || function (a) { return $.type(a) === 'array'; }, isWindow: function (a) { return a != null && a == a.window; }, isNumeric: function (a) { return !isNaN(parseFloat(a)) && isFinite(a); }, type: function (a) { return a == null ? String(a) : nb[X.call(a)] || 'object'; }, isPlainObject: function (a) { if (!a || $.type(a) !== 'object' || a.nodeType || $.isWindow(a)) return !1; try { if (a.constructor && !Y.call(a, 'constructor') && !Y.call(a.constructor.prototype, 'isPrototypeOf')) return !1; } catch (c) { return !1; } let d; for (d in a);return d === b || Y.call(a, d); }, isEmptyObject: function (a) { let b; for (b in a) return !1; return !0; }, error: function (a) { throw new Error(a); }, parseHTML: function (a, b, c) { let d; return a && typeof a === 'string' ? (typeof b === 'boolean' && (c = b, b = 0), b = b || P, (d = eb.exec(a)) ? [b.createElement(d[1])] : (d = $.buildFragment([a], b, c ? null : []), $.merge([], (d.cacheable ? $.clone(d.fragment) : d.fragment).childNodes))) : null; }, parseJSON: function (b) { return b && typeof b === 'string' ? (b = $.trim(b), a.JSON && a.JSON.parse ? a.JSON.parse(b) : fb.test(b.replace(hb, '@').replace(ib, ']').replace(gb, '')) ? new Function(`return ${b}`)() : ($.error(`Invalid JSON: ${b}`), void 0)) : null; }, parseXML: function (c) { let d; let e; if (!c || typeof c !== 'string') return null; try { a.DOMParser ? (e = new DOMParser(), d = e.parseFromString(c, 'text/xml')) : (d = new ActiveXObject('Microsoft.XMLDOM'), d.async = 'false', d.loadXML(c)); } catch (f) { d = b; } return (!d || !d.documentElement || d.getElementsByTagName('parsererror').length) && $.error(`Invalid XML: ${c}`), d; }, noop: function () {}, globalEval: function (b) { b && ab.test(b) && (a.execScript || function (b) { a.eval.call(a, b); })(b); }, camelCase: function (a) { return a.replace(jb, 'ms-').replace(kb, lb); }, nodeName: function (a, b) { return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase(); }, each: function (a, c, d) { let e; let f = 0; const g = a.length; const h = g === b || $.isFunction(a); if (d) if (h) { for (e in a) if (c.apply(a[e], d) === !1) break; } else for (;g > f && c.apply(a[f++], d) !== !1;);else if (h) { for (e in a) if (c.call(a[e], e, a[e]) === !1) break; } else for (;g > f && c.call(a[f], f, a[f++]) !== !1;);return a; }, trim: Z && !Z.call(' ') ? function (a) { return a == null ? '' : Z.call(a); } : function (a) { return a == null ? '' : (`${a}`).replace(cb, ''); }, makeArray: function (a, b) { let c; const d = b || []; return a != null && (c = $.type(a), a.length == null || c === 'string' || c === 'function' || c === 'regexp' || $.isWindow(a) ? U.call(d, a) : $.merge(d, a)), d; }, inArray: function (a, b, c) { let d; if (b) { if (W) return W.call(b, a, c); for (d = b.length, c = c ? c < 0 ? Math.max(0, d + c) : c : 0; d > c; c++) if (c in b && b[c] === a) return c; } return -1; }, merge: function (a, c) { const d = c.length; let e = a.length; let f = 0; if (typeof d === 'number') for (;d > f; f++)a[e++] = c[f]; else for (;c[f] !== b;)a[e++] = c[f++]; return a.length = e, a; }, grep: function (a, b, c) { let d; const e = []; let f = 0; const g = a.length; for (c = !!c; g > f; f++)d = !!b(a[f], f), c !== d && e.push(a[f]); return e; }, map: function (a, c, d) { let e; let f; const g = []; let h = 0; const i = a.length; const j = a instanceof $ || i !== b && typeof i === 'number' && (i > 0 && a[0] && a[i - 1] || i === 0 || $.isArray(a)); if (j) for (;i > h; h++)e = c(a[h], h, d), e != null && (g[g.length] = e); else for (f in a)e = c(a[f], f, d), e != null && (g[g.length] = e); return g.concat.apply([], g); }, guid: 1, proxy: function (a, c) { let d; let e; let f; return typeof c === 'string' && (d = a[c], c = a, a = d), $.isFunction(a) ? (e = V.call(arguments, 2), f = function () { return a.apply(c, e.concat(V.call(arguments))); }, f.guid = a.guid = a.guid || $.guid++, f) : b; }, access: function (a, c, d, e, f, g, h) { let i; const j = d == null; let k = 0; const l = a.length; if (d && typeof d === 'object') { for (k in d)$.access(a, c, k, d[k], 1, g, e); f = 1; } else if (e !== b) { if (i = h === b && $.isFunction(e), j && (i ? (i = c, c = function (a, b, c) { return i.call($(a), c); }) : (c.call(a, e), c = null)), c) for (;l > k; k++)c(a[k], d, i ? e.call(a[k], k, c(a[k], d)) : e, h); f = 1; } return f ? a : j ? c.call(a) : l ? c(a[0], d) : g; }, now: function () { return (new Date()).getTime(); } }), $.ready.promise = function (b) { if (!O) if (O = $.Deferred(), P.readyState === 'complete')setTimeout($.ready, 1); else if (P.addEventListener)P.addEventListener('DOMContentLoaded', mb, !1), a.addEventListener('load', $.ready, !1); else { P.attachEvent('onreadystatechange', mb), a.attachEvent('onload', $.ready); let c = !1; try { c = a.frameElement == null && P.documentElement; } catch (d) {}c && c.doScroll && (function e() { if (!$.isReady) { try { c.doScroll('left'); } catch (a) { return setTimeout(e, 50); }$.ready(); } }()); } return O.promise(b); }, $.each('Boolean Number String Function Array Date RegExp Object'.split(' '), (a, b) => { nb[`[object ${b}]`] = b.toLowerCase(); }), N = $(P); var ob = {}; $.Callbacks = function (a) { a = typeof a === 'string' ? ob[a] || c(a) : $.extend({}, a); let d; let e; let f; let g; let h; let i; let j = []; let k = !a.once && []; const l = function (b) { for (d = a.memory && b, e = !0, i = g || 0, g = 0, h = j.length, f = !0; j && h > i; i++) if (j[i].apply(b[0], b[1]) === !1 && a.stopOnFalse) { d = !1; break; }f = !1, j && (k ? k.length && l(k.shift()) : d ? j = [] : m.disable()); }; var m = { add: function () { if (j) { const b = j.length; !(function c(b) { $.each(b, (b, d) => { const e = $.type(d); e === 'function' ? (!a.unique || !m.has(d)) && j.push(d) : d && d.length && e !== 'string' && c(d); }); }(arguments)), f ? h = j.length : d && (g = b, l(d)); } return this; }, remove: function () { return j && $.each(arguments, (a, b) => { for (var c; (c = $.inArray(b, j, c)) > -1;)j.splice(c, 1), f && (h >= c && h--, i >= c && i--); }), this; }, has: function (a) { return $.inArray(a, j) > -1; }, empty: function () { return j = [], this; }, disable: function () { return j = k = d = b, this; }, disabled: function () { return !j; }, lock: function () { return k = b, d || m.disable(), this; }, locked: function () { return !k; }, fireWith: function (a, b) { return b = b || [], b = [a, b.slice ? b.slice() : b], j && (!e || k) && (f ? k.push(b) : l(b)), this; }, fire: function () { return m.fireWith(this, arguments), this; }, fired: function () { return !!e; } }; return m; }, $.extend({ Deferred: function (a) { const b = [['resolve', 'done', $.Callbacks('once memory'), 'resolved'], ['reject', 'fail', $.Callbacks('once memory'), 'rejected'], ['notify', 'progress', $.Callbacks('memory')]]; let c = 'pending'; var d = { state: function () { return c; }, always: function () { return e.done(arguments).fail(arguments), this; }, then: function () { let a = arguments; return $.Deferred((c) => { $.each(b, (b, d) => { const f = d[0]; const g = a[b]; e[d[1]]($.isFunction(g) ? function () { const a = g.apply(this, arguments); a && $.isFunction(a.promise) ? a.promise().done(c.resolve).fail(c.reject).progress(c.notify) : c[`${f}With`](this === e ? c : this, [a]); } : c[f]); }), a = null; }).promise(); }, promise: function (a) { return a != null ? $.extend(a, d) : d; } }; var e = {}; return d.pipe = d.then, $.each(b, (a, f) => { const g = f[2]; const h = f[3]; d[f[1]] = g.add, h && g.add(() => { c = h; }, b[1 ^ a][2].disable, b[2][2].lock), e[f[0]] = g.fire, e[`${f[0]}With`] = g.fireWith; }), d.promise(e), a && a.call(e, e), e; }, when: function (a) { let b; let c; let d; let e = 0; const f = V.call(arguments); const g = f.length; let h = g !== 1 || a && $.isFunction(a.promise) ? g : 0; const i = h === 1 ? a : $.Deferred(); const j = function (a, c, d) { return function (e) { c[a] = this, d[a] = arguments.length > 1 ? V.call(arguments) : e, d === b ? i.notifyWith(c, d) : --h || i.resolveWith(c, d); }; }; if (g > 1) for (b = new Array(g), c = new Array(g), d = new Array(g); g > e; e++)f[e] && $.isFunction(f[e].promise) ? f[e].promise().done(j(e, d, f)).fail(i.reject).progress(j(e, c, b)) : --h; return h || i.resolveWith(d, f), i.promise(); } }), $.support = (function () { let b; let c; let d; let e; let f; let g; let h; let i; let j; let k; let l; let m = P.createElement('div'); if (m.setAttribute('className', 't'), m.innerHTML = "
a", c = m.getElementsByTagName('*'), d = m.getElementsByTagName('a')[0], !c || !d || !c.length) return {}; e = P.createElement('select'), f = e.appendChild(P.createElement('option')), g = m.getElementsByTagName('input')[0], d.style.cssText = 'top:1px;float:left;opacity:.5', b = { leadingWhitespace: m.firstChild.nodeType === 3, tbody: !m.getElementsByTagName('tbody').length, htmlSerialize: !!m.getElementsByTagName('link').length, style: /top/.test(d.getAttribute('style')), hrefNormalized: d.getAttribute('href') === '/a', opacity: /^0.5/.test(d.style.opacity), cssFloat: !!d.style.cssFloat, checkOn: g.value === 'on', optSelected: f.selected, getSetAttribute: m.className !== 't', enctype: !!P.createElement('form').enctype, html5Clone: P.createElement('nav').cloneNode(!0).outerHTML !== '<:nav>', boxModel: P.compatMode === 'CSS1Compat', submitBubbles: !0, changeBubbles: !0, focusinBubbles: !1, deleteExpando: !0, noCloneEvent: !0, inlineBlockNeedsLayout: !1, shrinkWrapBlocks: !1, reliableMarginRight: !0, boxSizingReliable: !0, pixelPosition: !1 }, g.checked = !0, b.noCloneChecked = g.cloneNode(!0).checked, e.disabled = !0, b.optDisabled = !f.disabled; try { delete m.test; } catch (n) { b.deleteExpando = !1; } if (!m.addEventListener && m.attachEvent && m.fireEvent && (m.attachEvent('onclick', l = function () { b.noCloneEvent = !1; }), m.cloneNode(!0).fireEvent('onclick'), m.detachEvent('onclick', l)), g = P.createElement('input'), g.value = 't', g.setAttribute('type', 'radio'), b.radioValue = g.value === 't', g.setAttribute('checked', 'checked'), g.setAttribute('name', 't'), m.appendChild(g), h = P.createDocumentFragment(), h.appendChild(m.lastChild), b.checkClone = h.cloneNode(!0).cloneNode(!0).lastChild.checked, b.appendChecked = g.checked, h.removeChild(g), h.appendChild(m), m.attachEvent) for (j in { submit: !0, change: !0, focusin: !0 })i = `on${j}`, k = i in m, k || (m.setAttribute(i, 'return;'), k = typeof m[i] === 'function'), b[`${j}Bubbles`] = k; return $(() => { let c; let d; let e; let f; const g = 'padding:0;margin:0;border:0;display:block;overflow:hidden;'; const h = P.getElementsByTagName('body')[0]; h && (c = P.createElement('div'), c.style.cssText = 'visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px', h.insertBefore(c, h.firstChild), d = P.createElement('div'), c.appendChild(d), d.innerHTML = '
t
', e = d.getElementsByTagName('td'), e[0].style.cssText = 'padding:0;margin:0;border:0;display:none', k = e[0].offsetHeight === 0, e[0].style.display = '', e[1].style.display = 'none', b.reliableHiddenOffsets = k && e[0].offsetHeight === 0, d.innerHTML = '', d.style.cssText = 'box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;', b.boxSizing = d.offsetWidth === 4, b.doesNotIncludeMarginInBodyOffset = h.offsetTop !== 1, a.getComputedStyle && (b.pixelPosition = (a.getComputedStyle(d, null) || {}).top !== '1%', b.boxSizingReliable = (a.getComputedStyle(d, null) || { width: '4px' }).width === '4px', f = P.createElement('div'), f.style.cssText = d.style.cssText = g, f.style.marginRight = f.style.width = '0', d.style.width = '1px', d.appendChild(f), b.reliableMarginRight = !parseFloat((a.getComputedStyle(f, null) || {}).marginRight)), typeof d.style.zoom !== 'undefined' && (d.innerHTML = '', d.style.cssText = `${g}width:1px;padding:1px;display:inline;zoom:1`, b.inlineBlockNeedsLayout = d.offsetWidth === 3, d.style.display = 'block', d.style.overflow = 'visible', d.innerHTML = '
', d.firstChild.style.width = '5px', b.shrinkWrapBlocks = d.offsetWidth !== 3, c.style.zoom = 1), h.removeChild(c), c = d = e = f = null); }), h.removeChild(m), c = d = e = f = g = h = m = null, b; }()); var pb = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/; var qb = /([A-Z])/g; $.extend({ cache: {}, deletedIds: [], uuid: 0, expando: `jQuery${($.fn.jquery + Math.random()).replace(/\D/g, '')}`, noData: { embed: !0, object: 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000', applet: !0 }, hasData: function (a) { return a = a.nodeType ? $.cache[a[$.expando]] : a[$.expando], !!a && !e(a); }, data: function (a, c, d, e) { if ($.acceptData(a)) { let f; let g; const h = $.expando; const i = typeof c === 'string'; const j = a.nodeType; const k = j ? $.cache : a; let l = j ? a[h] : a[h] && h; if (l && k[l] && (e || k[l].data) || !i || d !== b) return l || (j ? a[h] = l = $.deletedIds.pop() || $.guid++ : l = h), k[l] || (k[l] = {}, j || (k[l].toJSON = $.noop)), (typeof c === 'object' || typeof c === 'function') && (e ? k[l] = $.extend(k[l], c) : k[l].data = $.extend(k[l].data, c)), f = k[l], e || (f.data || (f.data = {}), f = f.data), d !== b && (f[$.camelCase(c)] = d), i ? (g = f[c], g == null && (g = f[$.camelCase(c)])) : g = f, g; } }, removeData: function (a, b, c) { if ($.acceptData(a)) { let d; let f; let g; const h = a.nodeType; const i = h ? $.cache : a; const j = h ? a[$.expando] : $.expando; if (i[j]) { if (b && (d = c ? i[j] : i[j].data)) { $.isArray(b) || (b in d ? b = [b] : (b = $.camelCase(b), b = b in d ? [b] : b.split(' '))); for (f = 0, g = b.length; g > f; f++) delete d[b[f]]; if (!(c ? e : $.isEmptyObject)(d)) return; }(c || (delete i[j].data, e(i[j]))) && (h ? $.cleanData([a], !0) : $.support.deleteExpando || i != i.window ? delete i[j] : i[j] = null); } } }, _data: function (a, b, c) { return $.data(a, b, c, !0); }, acceptData: function (a) { const b = a.nodeName && $.noData[a.nodeName.toLowerCase()]; return !b || b !== !0 && a.getAttribute('classid') === b; } }), $.fn.extend({ data: function (a, c) { let e; let f; let g; let h; let i; const j = this[0]; let k = 0; let l = null; if (a === b) { if (this.length && (l = $.data(j), j.nodeType === 1 && !$._data(j, 'parsedAttrs'))) { for (g = j.attributes, i = g.length; i > k; k++)h = g[k].name, h.indexOf('data-') || (h = $.camelCase(h.substring(5)), d(j, h, l[h])); $._data(j, 'parsedAttrs', !0); } return l; } return typeof a === 'object' ? this.each(function () { $.data(this, a); }) : (e = a.split('.', 2), e[1] = e[1] ? `.${e[1]}` : '', f = `${e[1]}!`, $.access(this, function (c) { return c === b ? (l = this.triggerHandler(`getData${f}`, [e[0]]), l === b && j && (l = $.data(j, a), l = d(j, a, l)), l === b && e[1] ? this.data(e[0]) : l) : (e[1] = c, this.each(function () { const b = $(this); b.triggerHandler(`setData${f}`, e), $.data(this, a, c), b.triggerHandler(`changeData${f}`, e); }), void 0); }, null, c, arguments.length > 1, null, !1)); }, removeData: function (a) { return this.each(function () { $.removeData(this, a); }); } }), $.extend({ queue: function (a, b, c) { let d; return a ? (b = `${b || 'fx'}queue`, d = $._data(a, b), c && (!d || $.isArray(c) ? d = $._data(a, b, $.makeArray(c)) : d.push(c)), d || []) : void 0; }, dequeue: function (a, b) { b = b || 'fx'; const c = $.queue(a, b); let d = c.length; let e = c.shift(); const f = $._queueHooks(a, b); const g = function () { $.dequeue(a, b); }; e === 'inprogress' && (e = c.shift(), d--), e && (b === 'fx' && c.unshift('inprogress'), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire(); }, _queueHooks: function (a, b) { const c = `${b}queueHooks`; return $._data(a, c) || $._data(a, c, { empty: $.Callbacks('once memory').add(() => { $.removeData(a, `${b}queue`, !0), $.removeData(a, c, !0); }) }); } }), $.fn.extend({ queue: function (a, c) { let d = 2; return typeof a !== 'string' && (c = a, a = 'fx', d--), arguments.length < d ? $.queue(this[0], a) : c === b ? this : this.each(function () { const b = $.queue(this, a, c); $._queueHooks(this, a), a === 'fx' && b[0] !== 'inprogress' && $.dequeue(this, a); }); }, dequeue: function (a) { return this.each(function () { $.dequeue(this, a); }); }, delay: function (a, b) { return a = $.fx ? $.fx.speeds[a] || a : a, b = b || 'fx', this.queue(b, (b, c) => { const d = setTimeout(b, a); c.stop = function () { clearTimeout(d); }; }); }, clearQueue: function (a) { return this.queue(a || 'fx', []); }, promise: function (a, c) { let d; let e = 1; const f = $.Deferred(); const g = this; let h = this.length; const i = function () { --e || f.resolveWith(g, [g]); }; for (typeof a !== 'string' && (c = a, a = b), a = a || 'fx'; h--;)d = $._data(g[h], `${a}queueHooks`), d && d.empty && (e++, d.empty.add(i)); return i(), f.promise(c); } }); let rb; let sb; let tb; const ub = /[\t\r\n]/g; const vb = /\r/g; const wb = /^(?:button|input)$/i; const xb = /^(?:button|input|object|select|textarea)$/i; const yb = /^a(?:rea|)$/i; const zb = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i; const Ab = $.support.getSetAttribute; $.fn.extend({ attr: function (a, b) { return $.access(this, $.attr, a, b, arguments.length > 1); }, removeAttr: function (a) { return this.each(function () { $.removeAttr(this, a); }); }, prop: function (a, b) { return $.access(this, $.prop, a, b, arguments.length > 1); }, removeProp: function (a) { return a = $.propFix[a] || a, this.each(function () { try { this[a] = b, delete this[a]; } catch (c) {} }); }, addClass: function (a) { let b; let c; let d; let e; let f; let g; let h; if ($.isFunction(a)) return this.each(function (b) { $(this).addClass(a.call(this, b, this.className)); }); if (a && typeof a === 'string') for (b = a.split(bb), c = 0, d = this.length; d > c; c++) if (e = this[c], e.nodeType === 1) if (e.className || b.length !== 1) { for (f = ` ${e.className} `, g = 0, h = b.length; h > g; g++)f.indexOf(` ${b[g]} `) < 0 && (f += `${b[g]} `); e.className = $.trim(f); } else e.className = a; return this; }, removeClass: function (a) { let c; let d; let e; let f; let g; let h; let i; if ($.isFunction(a)) return this.each(function (b) { $(this).removeClass(a.call(this, b, this.className)); }); if (a && typeof a === 'string' || a === b) for (c = (a || '').split(bb), h = 0, i = this.length; i > h; h++) if (e = this[h], e.nodeType === 1 && e.className) { for (d = (` ${e.className} `).replace(ub, ' '), f = 0, g = c.length; g > f; f++) for (;d.indexOf(` ${c[f]} `) >= 0;)d = d.replace(` ${c[f]} `, ' '); e.className = a ? $.trim(d) : ''; } return this; }, toggleClass: function (a, b) { const c = typeof a; const d = typeof b === 'boolean'; return $.isFunction(a) ? this.each(function (c) { $(this).toggleClass(a.call(this, c, this.className, b), b); }) : this.each(function () { if (c === 'string') for (var e, f = 0, g = $(this), h = b, i = a.split(bb); e = i[f++];)h = d ? h : !g.hasClass(e), g[h ? 'addClass' : 'removeClass'](e); else (c === 'undefined' || c === 'boolean') && (this.className && $._data(this, '__className__', this.className), this.className = this.className || a === !1 ? '' : $._data(this, '__className__') || ''); }); }, hasClass: function (a) { for (let b = ` ${a} `, c = 0, d = this.length; d > c; c++) if (this[c].nodeType === 1 && (` ${this[c].className} `).replace(ub, ' ').indexOf(b) >= 0) return !0; return !1; }, val: function (a) { let c; let d; let e; const f = this[0]; { if (arguments.length) return e = $.isFunction(a), this.each(function (d) { let f; const g = $(this); this.nodeType === 1 && (f = e ? a.call(this, d, g.val()) : a, f == null ? f = '' : typeof f === 'number' ? f += '' : $.isArray(f) && (f = $.map(f, a => (a == null ? '' : `${a}`))), c = $.valHooks[this.type] || $.valHooks[this.nodeName.toLowerCase()], c && 'set' in c && c.set(this, f, 'value') !== b || (this.value = f)); }); if (f) return c = $.valHooks[f.type] || $.valHooks[f.nodeName.toLowerCase()], c && 'get' in c && (d = c.get(f, 'value')) !== b ? d : (d = f.value, typeof d === 'string' ? d.replace(vb, '') : d == null ? '' : d); } } }), $.extend({ valHooks: { option: { get: function (a) { const b = a.attributes.value; return !b || b.specified ? a.value : a.text; } }, select: { get: function (a) { for (var b, c, d = a.options, e = a.selectedIndex, f = a.type === 'select-one' || e < 0, g = f ? null : [], h = f ? e + 1 : d.length, i = e < 0 ? h : f ? e : 0; h > i; i++) if (c = d[i], !(!c.selected && i !== e || ($.support.optDisabled ? c.disabled : c.getAttribute('disabled') !== null) || c.parentNode.disabled && $.nodeName(c.parentNode, 'optgroup'))) { if (b = $(c).val(), f) return b; g.push(b); } return g; }, set: function (a, b) { const c = $.makeArray(b); return $(a).find('option').each(function () { this.selected = $.inArray($(this).val(), c) >= 0; }), c.length || (a.selectedIndex = -1), c; } } }, attrFn: {}, attr: function (a, c, d, e) { let f; let g; let h; const i = a.nodeType; if (a && i !== 3 && i !== 8 && i !== 2) return e && $.isFunction($.fn[c]) ? $(a)[c](d) : typeof a.getAttribute === 'undefined' ? $.prop(a, c, d) : (h = i !== 1 || !$.isXMLDoc(a), h && (c = c.toLowerCase(), g = $.attrHooks[c] || (zb.test(c) ? sb : rb)), d !== b ? d === null ? ($.removeAttr(a, c), void 0) : g && 'set' in g && h && (f = g.set(a, d, c)) !== b ? f : (a.setAttribute(c, `${d}`), d) : g && 'get' in g && h && (f = g.get(a, c)) !== null ? f : (f = a.getAttribute(c), f === null ? b : f)); }, removeAttr: function (a, b) { let c; let d; let e; let f; let g = 0; if (b && a.nodeType === 1) for (d = b.split(bb); g < d.length; g++)e = d[g], e && (c = $.propFix[e] || e, f = zb.test(e), f || $.attr(a, e, ''), a.removeAttribute(Ab ? e : c), f && c in a && (a[c] = !1)); }, attrHooks: { type: { set: function (a, b) { if (wb.test(a.nodeName) && a.parentNode)$.error("type property can't be changed"); else if (!$.support.radioValue && b === 'radio' && $.nodeName(a, 'input')) { const c = a.value; return a.setAttribute('type', b), c && (a.value = c), b; } } }, value: { get: function (a, b) { return rb && $.nodeName(a, 'button') ? rb.get(a, b) : b in a ? a.value : null; }, set: function (a, b, c) { return rb && $.nodeName(a, 'button') ? rb.set(a, b, c) : (a.value = b, void 0); } } }, propFix: { tabindex: 'tabIndex', readonly: 'readOnly', for: 'htmlFor', class: 'className', maxlength: 'maxLength', cellspacing: 'cellSpacing', cellpadding: 'cellPadding', rowspan: 'rowSpan', colspan: 'colSpan', usemap: 'useMap', frameborder: 'frameBorder', contenteditable: 'contentEditable' }, prop: function (a, c, d) { let e; let f; let g; const h = a.nodeType; if (a && h !== 3 && h !== 8 && h !== 2) return g = h !== 1 || !$.isXMLDoc(a), g && (c = $.propFix[c] || c, f = $.propHooks[c]), d !== b ? f && 'set' in f && (e = f.set(a, d, c)) !== b ? e : a[c] = d : f && 'get' in f && (e = f.get(a, c)) !== null ? e : a[c]; }, propHooks: { tabIndex: { get: function (a) { const c = a.getAttributeNode('tabindex'); return c && c.specified ? parseInt(c.value, 10) : xb.test(a.nodeName) || yb.test(a.nodeName) && a.href ? 0 : b; } } } }), sb = { get: function (a, c) { let d; const e = $.prop(a, c); return e === !0 || typeof e !== 'boolean' && (d = a.getAttributeNode(c)) && d.nodeValue !== !1 ? c.toLowerCase() : b; }, set: function (a, b, c) { let d; return b === !1 ? $.removeAttr(a, c) : (d = $.propFix[c] || c, d in a && (a[d] = !0), a.setAttribute(c, c.toLowerCase())), c; } }, Ab || (tb = { name: !0, id: !0, coords: !0 }, rb = $.valHooks.button = { get: function (a, c) { let d; return d = a.getAttributeNode(c), d && (tb[c] ? d.value !== '' : d.specified) ? d.value : b; }, set: function (a, b, c) { let d = a.getAttributeNode(c); return d || (d = P.createAttribute(c), a.setAttributeNode(d)), d.value = `${b}`; } }, $.each(['width', 'height'], (a, b) => { + $.attrHooks[b] = $.extend($.attrHooks[b], { + set: function (a, c) { + return c === '' ? (a.setAttribute(b, 'auto'), c) : void 0; + }, + }); + }), $.attrHooks.contenteditable = { get: rb.get, set: function (a, b, c) { b === '' && (b = 'false'), rb.set(a, b, c); } }), $.support.hrefNormalized || $.each(['href', 'src', 'width', 'height'], (a, c) => { $.attrHooks[c] = $.extend($.attrHooks[c], { get: function (a) { const d = a.getAttribute(c, 2); return d === null ? b : d; } }); }), $.support.style || ($.attrHooks.style = { get: function (a) { return a.style.cssText.toLowerCase() || b; }, set: function (a, b) { return a.style.cssText = `${b}`; } }), $.support.optSelected || ($.propHooks.selected = $.extend($.propHooks.selected, { get: function (a) { const b = a.parentNode; return b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex), null; } })), $.support.enctype || ($.propFix.enctype = 'encoding'), $.support.checkOn || $.each(['radio', 'checkbox'], function () { $.valHooks[this] = { get: function (a) { return a.getAttribute('value') === null ? 'on' : a.value; } }; }), $.each(['radio', 'checkbox'], function () { $.valHooks[this] = $.extend($.valHooks[this], { set: function (a, b) { return $.isArray(b) ? a.checked = $.inArray($(a).val(), b) >= 0 : void 0; } }); }); const Bb = /^(?:textarea|input|select)$/i; const Cb = /^([^\.]*|)(?:\.(.+)|)$/; const Db = /(?:^|\s)hover(\.\S+|)\b/; const Eb = /^key/; const Fb = /^(?:mouse|contextmenu)|click/; const Gb = /^(?:focusinfocus|focusoutblur)$/; const Hb = function (a) { return $.event.special.hover ? a : a.replace(Db, 'mouseenter$1 mouseleave$1'); }; $.event = { add: function (a, c, d, e, f) { let g; let h; let i; let j; let k; let l; let m; let n; let o; let p; let q; if (a.nodeType !== 3 && a.nodeType !== 8 && c && d && (g = $._data(a))) { for (d.handler && (o = d, d = o.handler, f = o.selector), d.guid || (d.guid = $.guid++), i = g.events, i || (g.events = i = {}), h = g.handle, h || (g.handle = h = function (a) { return typeof $ === 'undefined' || a && $.event.triggered === a.type ? b : $.event.dispatch.apply(h.elem, arguments); }, h.elem = a), c = $.trim(Hb(c)).split(' '), j = 0; j < c.length; j++)k = Cb.exec(c[j]) || [], l = k[1], m = (k[2] || '').split('.').sort(), q = $.event.special[l] || {}, l = (f ? q.delegateType : q.bindType) || l, q = $.event.special[l] || {}, n = $.extend({ type: l, origType: k[1], data: e, handler: d, guid: d.guid, selector: f, needsContext: f && $.expr.match.needsContext.test(f), namespace: m.join('.') }, o), p = i[l], p || (p = i[l] = [], p.delegateCount = 0, q.setup && q.setup.call(a, e, m, h) !== !1 || (a.addEventListener ? a.addEventListener(l, h, !1) : a.attachEvent && a.attachEvent(`on${l}`, h))), q.add && (q.add.call(a, n), n.handler.guid || (n.handler.guid = d.guid)), f ? p.splice(p.delegateCount++, 0, n) : p.push(n), $.event.global[l] = !0; a = null; } }, global: {}, remove: function (a, b, c, d, e) { let f; let g; let h; let i; let j; let k; let l; let m; let n; let o; let p; const q = $.hasData(a) && $._data(a); if (q && (m = q.events)) { for (b = $.trim(Hb(b || '')).split(' '), f = 0; f < b.length; f++) if (g = Cb.exec(b[f]) || [], h = i = g[1], j = g[2], h) { for (n = $.event.special[h] || {}, h = (d ? n.delegateType : n.bindType) || h, o = m[h] || [], k = o.length, j = j ? new RegExp(`(^|\\.)${j.split('.').sort().join('\\.(?:.*\\.|)')}(\\.|$)`) : null, l = 0; l < o.length; l++)p = o[l], !(!e && i !== p.origType || c && c.guid !== p.guid || j && !j.test(p.namespace) || d && d !== p.selector && (d !== '**' || !p.selector) || (o.splice(l--, 1), p.selector && o.delegateCount--, !n.remove || !n.remove.call(a, p))); o.length === 0 && k !== o.length && ((!n.teardown || n.teardown.call(a, j, q.handle) === !1) && $.removeEvent(a, h, q.handle), delete m[h]); } else for (h in m)$.event.remove(a, h + b[f], c, d, !0); $.isEmptyObject(m) && (delete q.handle, $.removeData(a, 'events', !0)); } }, customEvent: { getData: !0, setData: !0, changeData: !0 }, trigger: function (c, d, e, f) { if (!e || e.nodeType !== 3 && e.nodeType !== 8) { let g; let h; let i; let j; let k; let l; let m; let n; let o; let p; let q = c.type || c; let r = []; if (Gb.test(q + $.event.triggered)) return; if (q.indexOf('!') >= 0 && (q = q.slice(0, -1), h = !0), q.indexOf('.') >= 0 && (r = q.split('.'), q = r.shift(), r.sort()), (!e || $.event.customEvent[q]) && !$.event.global[q]) return; if (c = typeof c === 'object' ? c[$.expando] ? c : new $.Event(q, c) : new $.Event(q), c.type = q, c.isTrigger = !0, c.exclusive = h, c.namespace = r.join('.'), c.namespace_re = c.namespace ? new RegExp(`(^|\\.)${r.join('\\.(?:.*\\.|)')}(\\.|$)`) : null, l = q.indexOf(':') < 0 ? `on${q}` : '', !e) { g = $.cache; for (i in g)g[i].events && g[i].events[q] && $.event.trigger(c, d, g[i].handle.elem, !0); return; } if (c.result = b, c.target || (c.target = e), d = d != null ? $.makeArray(d) : [], d.unshift(c), m = $.event.special[q] || {}, m.trigger && m.trigger.apply(e, d) === !1) return; if (o = [[e, m.bindType || q]], !f && !m.noBubble && !$.isWindow(e)) { for (p = m.delegateType || q, j = Gb.test(p + q) ? e : e.parentNode, k = e; j; j = j.parentNode)o.push([j, p]), k = j; k === (e.ownerDocument || P) && o.push([k.defaultView || k.parentWindow || a, p]); } for (i = 0; i < o.length && !c.isPropagationStopped(); i++)j = o[i][0], c.type = o[i][1], n = ($._data(j, 'events') || {})[c.type] && $._data(j, 'handle'), n && n.apply(j, d), n = l && j[l], n && $.acceptData(j) && n.apply && n.apply(j, d) === !1 && c.preventDefault(); return c.type = q, !(f || c.isDefaultPrevented() || m._default && m._default.apply(e.ownerDocument, d) !== !1 || q === 'click' && $.nodeName(e, 'a') || !$.acceptData(e) || !l || !e[q] || (q === 'focus' || q === 'blur') && c.target.offsetWidth === 0 || $.isWindow(e) || (k = e[l], k && (e[l] = null), $.event.triggered = q, e[q](), $.event.triggered = b, !k || !(e[l] = k))), c.result; } }, dispatch: function (c) { c = $.event.fix(c || a.event); let d; let e; let f; let g; let h; let i; let j; let k; let l; const m = ($._data(this, 'events') || {})[c.type] || []; const n = m.delegateCount; const o = V.call(arguments); const p = !c.exclusive && !c.namespace; const q = $.event.special[c.type] || {}; const r = []; if (o[0] = c, c.delegateTarget = this, !q.preDispatch || q.preDispatch.call(this, c) !== !1) { if (n && (!c.button || c.type !== 'click')) for (f = c.target; f != this; f = f.parentNode || this) if (f.disabled !== !0 || c.type !== 'click') { for (h = {}, j = [], d = 0; n > d; d++)k = m[d], l = k.selector, h[l] === b && (h[l] = k.needsContext ? $(l, this).index(f) >= 0 : $.find(l, this, null, [f]).length), h[l] && j.push(k); j.length && r.push({ elem: f, matches: j }); } for (m.length > n && r.push({ elem: this, matches: m.slice(n) }), d = 0; d < r.length && !c.isPropagationStopped(); d++) for (i = r[d], c.currentTarget = i.elem, e = 0; e < i.matches.length && !c.isImmediatePropagationStopped(); e++)k = i.matches[e], (p || !c.namespace && !k.namespace || c.namespace_re && c.namespace_re.test(k.namespace)) && (c.data = k.data, c.handleObj = k, g = (($.event.special[k.origType] || {}).handle || k.handler).apply(i.elem, o), g !== b && (c.result = g, g === !1 && (c.preventDefault(), c.stopPropagation()))); return q.postDispatch && q.postDispatch.call(this, c), c.result; } }, props: 'attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which'.split(' '), fixHooks: {}, keyHooks: { props: 'char charCode key keyCode'.split(' '), filter: function (a, b) { return a.which == null && (a.which = b.charCode != null ? b.charCode : b.keyCode), a; } }, mouseHooks: { props: 'button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement'.split(' '), filter: function (a, c) { let d; let e; let f; const g = c.button; const h = c.fromElement; return a.pageX == null && c.clientX != null && (d = a.target.ownerDocument || P, e = d.documentElement, f = d.body, a.pageX = c.clientX + (e && e.scrollLeft || f && f.scrollLeft || 0) - (e && e.clientLeft || f && f.clientLeft || 0), a.pageY = c.clientY + (e && e.scrollTop || f && f.scrollTop || 0) - (e && e.clientTop || f && f.clientTop || 0)), !a.relatedTarget && h && (a.relatedTarget = h === a.target ? c.toElement : h), !a.which && g !== b && (a.which = 1 & g ? 1 : 2 & g ? 3 : 4 & g ? 2 : 0), a; } }, fix: function (a) { if (a[$.expando]) return a; let b; let c; const d = a; const e = $.event.fixHooks[a.type] || {}; const f = e.props ? this.props.concat(e.props) : this.props; for (a = $.Event(d), b = f.length; b;)c = f[--b], a[c] = d[c]; return a.target || (a.target = d.srcElement || P), a.target.nodeType === 3 && (a.target = a.target.parentNode), a.metaKey = !!a.metaKey, e.filter ? e.filter(a, d) : a; }, special: { load: { noBubble: !0 }, focus: { delegateType: 'focusin' }, blur: { delegateType: 'focusout' }, beforeunload: { setup: function (a, b, c) { $.isWindow(this) && (this.onbeforeunload = c); }, teardown: function (a, b) { this.onbeforeunload === b && (this.onbeforeunload = null); } } }, simulate: function (a, b, c, d) { const e = $.extend(new $.Event(), c, { type: a, isSimulated: !0, originalEvent: {} }); d ? $.event.trigger(e, null, b) : $.event.dispatch.call(b, e), e.isDefaultPrevented() && c.preventDefault(); } }, $.event.handle = $.event.dispatch, $.removeEvent = P.removeEventListener ? function (a, b, c) { a.removeEventListener && a.removeEventListener(b, c, !1); } : function (a, b, c) { const d = `on${b}`; a.detachEvent && (typeof a[d] === 'undefined' && (a[d] = null), a.detachEvent(d, c)); }, $.Event = function (a, b) { return this instanceof $.Event ? (a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || a.returnValue === !1 || a.getPreventDefault && a.getPreventDefault() ? g : f) : this.type = a, b && $.extend(this, b), this.timeStamp = a && a.timeStamp || $.now(), this[$.expando] = !0, void 0) : new $.Event(a, b); }, $.Event.prototype = { preventDefault: function () { this.isDefaultPrevented = g; const a = this.originalEvent; a && (a.preventDefault ? a.preventDefault() : a.returnValue = !1); }, stopPropagation: function () { this.isPropagationStopped = g; const a = this.originalEvent; a && (a.stopPropagation && a.stopPropagation(), a.cancelBubble = !0); }, stopImmediatePropagation: function () { this.isImmediatePropagationStopped = g, this.stopPropagation(); }, isDefaultPrevented: f, isPropagationStopped: f, isImmediatePropagationStopped: f }, $.each({ mouseenter: 'mouseover', mouseleave: 'mouseout' }, (a, b) => { $.event.special[a] = { delegateType: b, bindType: b, handle: function (a) { { var c; var d = this; var e = a.relatedTarget; var f = a.handleObj; f.selector; } return (!e || e !== d && !$.contains(d, e)) && (a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b), c; } }; }), $.support.submitBubbles || ($.event.special.submit = { setup: function () { return $.nodeName(this, 'form') ? !1 : ($.event.add(this, 'click._submit keypress._submit', (a) => { const c = a.target; const d = $.nodeName(c, 'input') || $.nodeName(c, 'button') ? c.form : b; d && !$._data(d, '_submit_attached') && ($.event.add(d, 'submit._submit', (a) => { a._submit_bubble = !0; }), $._data(d, '_submit_attached', !0)); }), void 0); }, postDispatch: function (a) { a._submit_bubble && (delete a._submit_bubble, this.parentNode && !a.isTrigger && $.event.simulate('submit', this.parentNode, a, !0)); }, teardown: function () { return $.nodeName(this, 'form') ? !1 : ($.event.remove(this, '._submit'), void 0); } }), $.support.changeBubbles || ($.event.special.change = { setup: function () { return Bb.test(this.nodeName) ? ((this.type === 'checkbox' || this.type === 'radio') && ($.event.add(this, 'propertychange._change', function (a) { a.originalEvent.propertyName === 'checked' && (this._just_changed = !0); }), $.event.add(this, 'click._change', function (a) { this._just_changed && !a.isTrigger && (this._just_changed = !1), $.event.simulate('change', this, a, !0); })), !1) : ($.event.add(this, 'beforeactivate._change', (a) => { const b = a.target; Bb.test(b.nodeName) && !$._data(b, '_change_attached') && ($.event.add(b, 'change._change', function (a) { this.parentNode && !a.isSimulated && !a.isTrigger && $.event.simulate('change', this.parentNode, a, !0); }), $._data(b, '_change_attached', !0)); }), void 0); }, handle: function (a) { const b = a.target; return this !== b || a.isSimulated || a.isTrigger || b.type !== 'radio' && b.type !== 'checkbox' ? a.handleObj.handler.apply(this, arguments) : void 0; }, teardown: function () { return $.event.remove(this, '._change'), !Bb.test(this.nodeName); } }), $.support.focusinBubbles || $.each({ focus: 'focusin', blur: 'focusout' }, (a, b) => { let c = 0; const d = function (a) { $.event.simulate(b, a.target, $.event.fix(a), !0); }; $.event.special[b] = { setup: function () { c++ === 0 && P.addEventListener(a, d, !0); }, teardown: function () { --c === 0 && P.removeEventListener(a, d, !0); } }; }), $.fn.extend({ on: function (a, c, d, e, g) { let h; let i; if (typeof a === 'object') { typeof c !== 'string' && (d = d || c, c = b); for (i in a) this.on(i, c, d, a[i], g); return this; } if (d == null && e == null ? (e = c, d = c = b) : e == null && (typeof c === 'string' ? (e = d, d = b) : (e = d, d = c, c = b)), e === !1)e = f; else if (!e) return this; return g === 1 && (h = e, e = function (a) { return $().off(a), h.apply(this, arguments); }, e.guid = h.guid || (h.guid = $.guid++)), this.each(function () { $.event.add(this, a, e, d, c); }); }, one: function (a, b, c, d) { return this.on(a, b, c, d, 1); }, off: function (a, c, d) { let e; let g; if (a && a.preventDefault && a.handleObj) return e = a.handleObj, $(a.delegateTarget).off(e.namespace ? `${e.origType}.${e.namespace}` : e.origType, e.selector, e.handler), this; if (typeof a === 'object') { for (g in a) this.off(g, c, a[g]); return this; } return (c === !1 || typeof c === 'function') && (d = c, c = b), d === !1 && (d = f), this.each(function () { $.event.remove(this, a, d, c); }); }, bind: function (a, b, c) { return this.on(a, null, b, c); }, unbind: function (a, b) { return this.off(a, null, b); }, live: function (a, b, c) { return $(this.context).on(a, this.selector, b, c), this; }, die: function (a, b) { return $(this.context).off(a, this.selector || '**', b), this; }, delegate: function (a, b, c, d) { return this.on(b, a, c, d); }, undelegate: function (a, b, c) { return arguments.length === 1 ? this.off(a, '**') : this.off(b, a || '**', c); }, trigger: function (a, b) { return this.each(function () { $.event.trigger(a, b, this); }); }, triggerHandler: function (a, b) { return this[0] ? $.event.trigger(a, b, this[0], !0) : void 0; }, toggle: function (a) { const b = arguments; const c = a.guid || $.guid++; let d = 0; const e = function (c) { const e = ($._data(this, `lastToggle${a.guid}`) || 0) % d; return $._data(this, `lastToggle${a.guid}`, e + 1), c.preventDefault(), b[e].apply(this, arguments) || !1; }; for (e.guid = c; d < b.length;)b[d++].guid = c; return this.click(e); }, hover: function (a, b) { return this.mouseenter(a).mouseleave(b || a); } }), $.each('blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu'.split(' '), (a, b) => { $.fn[b] = function (a, c) { return c == null && (c = a, a = null), arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b); }, Eb.test(b) && ($.event.fixHooks[b] = $.event.keyHooks), Fb.test(b) && ($.event.fixHooks[b] = $.event.mouseHooks); }), (function (a, b) { function c(a, b, c, d) { c = c || [], b = b || F; let e; let f; let g; let h; const i = b.nodeType; if (!a || typeof a !== 'string') return c; if (i !== 1 && i !== 9) return []; if (g = v(b), !g && !d && (e = cb.exec(a))) if (h = e[1]) { if (i === 9) { if (f = b.getElementById(h), !f || !f.parentNode) return c; if (f.id === h) return c.push(f), c; } else if (b.ownerDocument && (f = b.ownerDocument.getElementById(h)) && w(b, f) && f.id === h) return c.push(f), c; } else { if (e[2]) return K.apply(c, L.call(b.getElementsByTagName(a), 0)), c; if ((h = e[3]) && mb && b.getElementsByClassName) return K.apply(c, L.call(b.getElementsByClassName(h), 0)), c; } return p(a.replace(Z, '$1'), b, c, d, g); } function d(a) { return function (b) { const c = b.nodeName.toLowerCase(); return c === 'input' && b.type === a; }; } function e(a) { return function (b) { const c = b.nodeName.toLowerCase(); return (c === 'input' || c === 'button') && b.type === a; }; } function f(a) { return N(b => (b = +b, N((c, d) => { for (var e, f = a([], c.length, b), g = f.length; g--;)c[e = f[g]] && (c[e] = !(d[e] = c[e])); }))); } function g(a, b, c) { if (a === b) return c; for (let d = a.nextSibling; d;) { if (d === b) return -1; d = d.nextSibling; } return 1; } function h(a, b) { let d; let e; let f; let g; let h; let i; let j; const k = Q[D][`${a} `]; if (k) return b ? 0 : k.slice(0); for (h = a, i = [], j = t.preFilter; h;) { (!d || (e = _.exec(h))) && (e && (h = h.slice(e[0].length) || h), i.push(f = [])), d = !1, (e = ab.exec(h)) && (f.push(d = new E(e.shift())), h = h.slice(d.length), d.type = e[0].replace(Z, ' ')); for (g in t.filter)(e = hb[g].exec(h)) && (!j[g] || (e = j[g](e))) && (f.push(d = new E(e.shift())), h = h.slice(d.length), d.type = g, d.matches = e); if (!d) break; } return b ? h.length : h ? c.error(a) : Q(a, i).slice(0); } function i(a, b, c) { const d = b.dir; const e = c && b.dir === 'parentNode'; const f = I++; return b.first ? function (b, c, f) { for (;b = b[d];) if (e || b.nodeType === 1) return a(b, c, f); } : function (b, c, g) { if (g) { for (;b = b[d];) if ((e || b.nodeType === 1) && a(b, c, g)) return b; } else for (var h, i = `${H} ${f} `, j = i + r; b = b[d];) if (e || b.nodeType === 1) { if ((h = b[D]) === j) return b.sizset; if (typeof h === 'string' && h.indexOf(i) === 0) { if (b.sizset) return b; } else { if (b[D] = j, a(b, c, g)) return b.sizset = !0, b; b.sizset = !1; } } }; } function j(a) { return a.length > 1 ? function (b, c, d) { for (let e = a.length; e--;) if (!a[e](b, c, d)) return !1; return !0; } : a[0]; } function k(a, b, c, d, e) { for (var f, g = [], h = 0, i = a.length, j = b != null; i > h; h++)(f = a[h]) && (!c || c(f, d, e)) && (g.push(f), j && b.push(h)); return g; } function l(a, b, c, d, e, f) { return d && !d[D] && (d = l(d)), e && !e[D] && (e = l(e, f)), N((f, g, h, i) => { let j; let l; let m; const n = []; const p = []; const q = g.length; const r = f || o(b || '*', h.nodeType ? [h] : h, []); const s = !a || !f && b ? r : k(r, n, a, h, i); let t = c ? e || (f ? a : q || d) ? [] : g : s; if (c && c(s, t, h, i), d) for (j = k(t, p), d(j, [], h, i), l = j.length; l--;)(m = j[l]) && (t[p[l]] = !(s[p[l]] = m)); if (f) { if (e || a) { if (e) { for (j = [], l = t.length; l--;)(m = t[l]) && j.push(s[l] = m); e(null, t = [], j, i); } for (l = t.length; l--;)(m = t[l]) && (j = e ? M.call(f, m) : n[l]) > -1 && (f[j] = !(g[j] = m)); } } else t = k(t === g ? t.splice(q, t.length) : t), e ? e(null, g, t, i) : K.apply(g, t); }); } function m(a) { for (var b, c, d, e = a.length, f = t.relative[a[0].type], g = f || t.relative[' '], h = f ? 1 : 0, k = i(a => a === b, g, !0), n = i(a => M.call(b, a) > -1, g, !0), o = [function (a, c, d) { return !f && (d || c !== A) || ((b = c).nodeType ? k(a, c, d) : n(a, c, d)); }]; e > h; h++) if (c = t.relative[a[h].type])o = [i(j(o), c)]; else { if (c = t.filter[a[h].type].apply(null, a[h].matches), c[D]) { for (d = ++h; e > d && !t.relative[a[d].type]; d++);return l(h > 1 && j(o), h > 1 && a.slice(0, h - 1).join('').replace(Z, '$1'), c, d > h && m(a.slice(h, d)), e > d && m(a = a.slice(d)), e > d && a.join('')); }o.push(c); } return j(o); } function n(a, b) { const d = b.length > 0; const e = a.length > 0; const f = function (g, h, i, j, l) { let m; let n; let o; let p = []; let q = 0; let s = '0'; const u = g && []; const v = l != null; const w = A; const x = g || e && t.find.TAG('*', l && h.parentNode || h); const y = H += w == null ? 1 : Math.E; for (v && (A = h !== F && h, r = f.el); (m = x[s]) != null; s++) { if (e && m) { for (n = 0; o = a[n]; n++) if (o(m, h, i)) { j.push(m); break; }v && (H = y, r = ++f.el); }d && ((m = !o && m) && q--, g && u.push(m)); } if (q += s, d && s !== q) { for (n = 0; o = b[n]; n++)o(u, p, h, i); if (g) { if (q > 0) for (;s--;)!u[s] && !p[s] && (p[s] = J.call(j)); p = k(p); }K.apply(j, p), v && !g && p.length > 0 && q + b.length > 1 && c.uniqueSort(j); } return v && (H = y, A = w), u; }; return f.el = 0, d ? N(f) : f; } function o(a, b, d) { for (let e = 0, f = b.length; f > e; e++)c(a, b[e], d); return d; } function p(a, b, c, d, e) { { var f; var g; var i; var j; var k; var l = h(a); l.length; } if (!d && l.length === 1) { if (g = l[0] = l[0].slice(0), g.length > 2 && (i = g[0]).type === 'ID' && b.nodeType === 9 && !e && t.relative[g[1].type]) { if (b = t.find.ID(i.matches[0].replace(gb, ''), b, e)[0], !b) return c; a = a.slice(g.shift().length); } for (f = hb.POS.test(a) ? -1 : g.length - 1; f >= 0 && (i = g[f], !t.relative[j = i.type]); f--) if ((k = t.find[j]) && (d = k(i.matches[0].replace(gb, ''), db.test(g[0].type) && b.parentNode || b, e))) { if (g.splice(f, 1), a = d.length && g.join(''), !a) return K.apply(c, L.call(d, 0)), c; break; } } return x(a, l)(d, b, e, c, db.test(a)), c; } function q() {} let r; let s; let t; let u; let v; let w; let x; let y; let z; let A; let B = !0; const C = 'undefined'; var D = (`sizcache${Math.random()}`).replace('.', ''); var E = String; var F = a.document; const G = F.documentElement; var H = 0; var I = 0; var J = [].pop; var K = [].push; var L = [].slice; var M = [].indexOf || function (a) { for (let b = 0, c = this.length; c > b; b++) if (this[b] === a) return b; return -1; }; var N = function (a, b) { return a[D] = b == null || b, a; }; const O = function () { const a = {}; const b = []; return N((c, d) => (b.push(c) > t.cacheLength && delete a[b.shift()], a[`${c} `] = d), a); }; const P = O(); var Q = O(); const R = O(); const S = '[\\x20\\t\\r\\n\\f]'; const T = '(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+'; const U = T.replace('w', 'w#'); const V = '([*^$|!~]?=)'; const W = `\\[${S}*(${T})${S}*(?:${V}${S}*(?:(['"])((?:\\\\.|[^\\\\])*?)\\3|(${U})|)|)${S}*\\]`; const X = `:(${T})(?:\\((?:(['"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:${W})|[^:]|\\\\.)*|.*))\\)|)`; const Y = `:(even|odd|eq|gt|lt|nth|first|last)(?:\\(${S}*((?:-\\d)?\\d*)${S}*\\)|)(?=[^-]|$)`; var Z = new RegExp(`^${S}+|((?:^|[^\\\\])(?:\\\\.)*)${S}+$`, 'g'); var _ = new RegExp(`^${S}*,${S}*`); var ab = new RegExp(`^${S}*([\\x20\\t\\r\\n\\f>+~])${S}*`); const bb = new RegExp(X); var cb = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/; var db = /[\x20\t\r\n\f]*[+~]/; const eb = /h\d/i; const fb = /input|select|textarea|button/i; var gb = /\\(?!\\)/g; var hb = { ID: new RegExp(`^#(${T})`), CLASS: new RegExp(`^\\.(${T})`), NAME: new RegExp(`^\\[name=['"]?(${T})['"]?\\]`), TAG: new RegExp(`^(${T.replace('w', 'w*')})`), ATTR: new RegExp(`^${W}`), PSEUDO: new RegExp(`^${X}`), POS: new RegExp(Y, 'i'), CHILD: new RegExp(`^:(only|nth|first|last)-child(?:\\(${S}*(even|odd|(([+-]|)(\\d*)n|)${S}*(?:([+-]|)${S}*(\\d+)|))${S}*\\)|)`, 'i'), needsContext: new RegExp(`^${S}*[>+~]|${Y}`, 'i') }; const ib = function (a) { let b = F.createElement('div'); try { return a(b); } catch (c) { return !1; } finally { b = null; } }; const jb = ib(a => (a.appendChild(F.createComment('')), !a.getElementsByTagName('*').length)); const kb = ib(a => (a.innerHTML = "", a.firstChild && typeof a.firstChild.getAttribute !== C && a.firstChild.getAttribute('href') === '#')); const lb = ib((a) => { a.innerHTML = ''; const b = typeof a.lastChild.getAttribute('multiple'); return b !== 'boolean' && b !== 'string'; }); var mb = ib(a => (a.innerHTML = "", a.getElementsByClassName && a.getElementsByClassName('e').length ? (a.lastChild.className = 'e', a.getElementsByClassName('e').length === 2) : !1)); const nb = ib((a) => { a.id = D + 0, a.innerHTML = `
`, G.insertBefore(a, G.firstChild); const b = F.getElementsByName && F.getElementsByName(D).length === 2 + F.getElementsByName(D + 0).length; return s = !F.getElementById(D), G.removeChild(a), b; }); try { L.call(G.childNodes, 0)[0].nodeType; } catch (ob) { L = function (a) { for (var b, c = []; b = this[a]; a++)c.push(b); return c; }; }c.matches = function (a, b) { return c(a, null, null, b); }, c.matchesSelector = function (a, b) { return c(b, null, null, [a]).length > 0; }, u = c.getText = function (a) { let b; let c = ''; let d = 0; const e = a.nodeType; if (e) { if (e === 1 || e === 9 || e === 11) { if (typeof a.textContent === 'string') return a.textContent; for (a = a.firstChild; a; a = a.nextSibling)c += u(a); } else if (e === 3 || e === 4) return a.nodeValue; } else for (;b = a[d]; d++)c += u(b); return c; }, v = c.isXML = function (a) { const b = a && (a.ownerDocument || a).documentElement; return b ? b.nodeName !== 'HTML' : !1; }, w = c.contains = G.contains ? function (a, b) { const c = a.nodeType === 9 ? a.documentElement : a; const d = b && b.parentNode; return a === d || !!(d && d.nodeType === 1 && c.contains && c.contains(d)); } : G.compareDocumentPosition ? function (a, b) { return b && !!(16 & a.compareDocumentPosition(b)); } : function (a, b) { for (;b = b.parentNode;) if (b === a) return !0; return !1; }, c.attr = function (a, b) { let c; const d = v(a); return d || (b = b.toLowerCase()), (c = t.attrHandle[b]) ? c(a) : d || lb ? a.getAttribute(b) : (c = a.getAttributeNode(b), c ? typeof a[b] === 'boolean' ? a[b] ? b : null : c.specified ? c.value : null : null); }, t = c.selectors = { cacheLength: 50, createPseudo: N, match: hb, attrHandle: kb ? {} : { href: function (a) { return a.getAttribute('href', 2); }, type: function (a) { return a.getAttribute('type'); } }, find: { ID: s ? function (a, b, c) { if (typeof b.getElementById !== C && !c) { const d = b.getElementById(a); return d && d.parentNode ? [d] : []; } } : function (a, c, d) { if (typeof c.getElementById !== C && !d) { const e = c.getElementById(a); return e ? e.id === a || typeof e.getAttributeNode !== C && e.getAttributeNode('id').value === a ? [e] : b : []; } }, TAG: jb ? function (a, b) { return typeof b.getElementsByTagName !== C ? b.getElementsByTagName(a) : void 0; } : function (a, b) { const c = b.getElementsByTagName(a); if (a === '*') { for (var d, e = [], f = 0; d = c[f]; f++)d.nodeType === 1 && e.push(d); return e; } return c; }, NAME: nb && function (a, b) { return typeof b.getElementsByName !== C ? b.getElementsByName(name) : void 0; }, CLASS: mb && function (a, b, c) { return typeof b.getElementsByClassName === C || c ? void 0 : b.getElementsByClassName(a); } }, relative: { '>': { dir: 'parentNode', first: !0 }, ' ': { dir: 'parentNode' }, '+': { dir: 'previousSibling', first: !0 }, '~': { dir: 'previousSibling' } }, preFilter: { ATTR: function (a) { return a[1] = a[1].replace(gb, ''), a[3] = (a[4] || a[5] || '').replace(gb, ''), a[2] === '~=' && (a[3] = ` ${a[3]} `), a.slice(0, 4); }, CHILD: function (a) { return a[1] = a[1].toLowerCase(), a[1] === 'nth' ? (a[2] || c.error(a[0]), a[3] = +(a[3] ? a[4] + (a[5] || 1) : 2 * (a[2] === 'even' || a[2] === 'odd')), a[4] = +(a[6] + a[7] || a[2] === 'odd')) : a[2] && c.error(a[0]), a; }, PSEUDO: function (a) { let b; let c; return hb.CHILD.test(a[0]) ? null : (a[3] ? a[2] = a[3] : (b = a[4]) && (bb.test(b) && (c = h(b, !0)) && (c = b.indexOf(')', b.length - c) - b.length) && (b = b.slice(0, c), a[0] = a[0].slice(0, c)), a[2] = b), a.slice(0, 3)); } }, filter: { ID: s ? function (a) { return a = a.replace(gb, ''), function (b) { return b.getAttribute('id') === a; }; } : function (a) { return a = a.replace(gb, ''), function (b) { const c = typeof b.getAttributeNode !== C && b.getAttributeNode('id'); return c && c.value === a; }; }, TAG: function (a) { return a === '*' ? function () { return !0; } : (a = a.replace(gb, '').toLowerCase(), function (b) { return b.nodeName && b.nodeName.toLowerCase() === a; }); }, CLASS: function (a) { let b = P[D][`${a} `]; return b || (b = new RegExp(`(^|${S})${a}(${S}|$)`)) && P(a, a => b.test(a.className || typeof a.getAttribute !== C && a.getAttribute('class') || '')); }, ATTR: function (a, b, d) { return function (e) { let f = c.attr(e, a); return f == null ? b === '!=' : b ? (f += '', b === '=' ? f === d : b === '!=' ? f !== d : b === '^=' ? d && f.indexOf(d) === 0 : b === '*=' ? d && f.indexOf(d) > -1 : b === '$=' ? d && f.substr(f.length - d.length) === d : b === '~=' ? (` ${f} `).indexOf(d) > -1 : b === '|=' ? f === d || f.substr(0, d.length + 1) === `${d}-` : !1) : !0; }; }, CHILD: function (a, b, c, d) { return a === 'nth' ? function (a) { let b; let e; const f = a.parentNode; if (c === 1 && d === 0) return !0; if (f) for (e = 0, b = f.firstChild; b && (b.nodeType !== 1 || (e++, a !== b)); b = b.nextSibling);return e -= d, e === c || e % c === 0 && e / c >= 0; } : function (b) { let c = b; switch (a) { case 'only': case 'first': for (;c = c.previousSibling;) if (c.nodeType === 1) return !1; if (a === 'first') return !0; c = b; case 'last': for (;c = c.nextSibling;) if (c.nodeType === 1) return !1; return !0; } }; }, PSEUDO: function (a, b) { let d; const e = t.pseudos[a] || t.setFilters[a.toLowerCase()] || c.error(`unsupported pseudo: ${a}`); return e[D] ? e(b) : e.length > 1 ? (d = [a, a, '', b], t.setFilters.hasOwnProperty(a.toLowerCase()) ? N((a, c) => { for (var d, f = e(a, b), g = f.length; g--;)d = M.call(a, f[g]), a[d] = !(c[d] = f[g]); }) : function (a) { return e(a, 0, d); }) : e; } }, pseudos: { not: N((a) => { const b = []; const c = []; const d = x(a.replace(Z, '$1')); return d[D] ? N((a, b, c, e) => { for (var f, g = d(a, null, e, []), h = a.length; h--;)(f = g[h]) && (a[h] = !(b[h] = f)); }) : function (a, e, f) { return b[0] = a, d(b, null, f, c), !c.pop(); }; }), has: N(a => function (b) { return c(a, b).length > 0; }), contains: N(a => function (b) { return (b.textContent || b.innerText || u(b)).indexOf(a) > -1; }), enabled: function (a) { return a.disabled === !1; }, disabled: function (a) { return a.disabled === !0; }, checked: function (a) { const b = a.nodeName.toLowerCase(); return b === 'input' && !!a.checked || b === 'option' && !!a.selected; }, selected: function (a) { return a.parentNode && a.parentNode.selectedIndex, a.selected === !0; }, parent: function (a) { return !t.pseudos.empty(a); }, empty: function (a) { let b; for (a = a.firstChild; a;) { if (a.nodeName > '@' || (b = a.nodeType) === 3 || b === 4) return !1; a = a.nextSibling; } return !0; }, header: function (a) { return eb.test(a.nodeName); }, text: function (a) { let b; let c; return a.nodeName.toLowerCase() === 'input' && (b = a.type) === 'text' && ((c = a.getAttribute('type')) == null || c.toLowerCase() === b); }, radio: d('radio'), checkbox: d('checkbox'), file: d('file'), password: d('password'), image: d('image'), submit: e('submit'), reset: e('reset'), button: function (a) { const b = a.nodeName.toLowerCase(); return b === 'input' && a.type === 'button' || b === 'button'; }, input: function (a) { return fb.test(a.nodeName); }, focus: function (a) { const b = a.ownerDocument; return a === b.activeElement && (!b.hasFocus || b.hasFocus()) && !!(a.type || a.href || ~a.tabIndex); }, active: function (a) { return a === a.ownerDocument.activeElement; }, first: f(() => [0]), last: f((a, b) => [b - 1]), eq: f((a, b, c) => [c < 0 ? c + b : c]), even: f((a, b) => { for (let c = 0; b > c; c += 2)a.push(c); return a; }), odd: f((a, b) => { for (let c = 1; b > c; c += 2)a.push(c); return a; }), lt: f((a, b, c) => { for (let d = c < 0 ? c + b : c; --d >= 0;)a.push(d); return a; }), gt: f((a, b, c) => { for (let d = c < 0 ? c + b : c; ++d < b;)a.push(d); return a; }) } }, y = G.compareDocumentPosition ? function (a, b) { return a === b ? (z = !0, 0) : (a.compareDocumentPosition && b.compareDocumentPosition ? 4 & a.compareDocumentPosition(b) : a.compareDocumentPosition) ? -1 : 1; } : function (a, b) { if (a === b) return z = !0, 0; if (a.sourceIndex && b.sourceIndex) return a.sourceIndex - b.sourceIndex; let c; let d; const e = []; const f = []; const h = a.parentNode; const i = b.parentNode; let j = h; if (h === i) return g(a, b); if (!h) return -1; if (!i) return 1; for (;j;)e.unshift(j), j = j.parentNode; for (j = i; j;)f.unshift(j), j = j.parentNode; c = e.length, d = f.length; for (var k = 0; c > k && d > k; k++) if (e[k] !== f[k]) return g(e[k], f[k]); return k === c ? g(a, f[k], -1) : g(e[k], b, 1); }, [0, 0].sort(y), B = !z, c.uniqueSort = function (a) { let b; const c = []; let d = 1; let e = 0; if (z = B, a.sort(y), z) { for (;b = a[d]; d++)b === a[d - 1] && (e = c.push(d)); for (;e--;)a.splice(c[e], 1); } return a; }, c.error = function (a) { throw new Error(`Syntax error, unrecognized expression: ${a}`); }, x = c.compile = function (a, b) { let c; const d = []; const e = []; let f = R[D][`${a} `]; if (!f) { for (b || (b = h(a)), c = b.length; c--;)f = m(b[c]), f[D] ? d.push(f) : e.push(f); f = R(a, n(e, d)); } return f; }, F.querySelectorAll && (function () { let a; const b = p; const d = /'|\\/g; const e = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g; let f = [':focus']; let g = [':active']; const i = G.matchesSelector || G.mozMatchesSelector || G.webkitMatchesSelector || G.oMatchesSelector || G.msMatchesSelector; ib((a) => { a.innerHTML = "", a.querySelectorAll('[selected]').length || f.push(`\\[${S}*(?:checked|disabled|ismap|multiple|readonly|selected|value)`), a.querySelectorAll(':checked').length || f.push(':checked'); }), ib((a) => { a.innerHTML = "

", a.querySelectorAll("[test^='']").length && f.push(`[*^$]=${S}*(?:""|'')`), a.innerHTML = "", a.querySelectorAll(':enabled').length || f.push(':enabled', ':disabled'); }), f = new RegExp(f.join('|')), p = function (a, c, e, g, i) { if (!g && !i && !f.test(a)) { let j; let k; let l = !0; let m = D; let n = c; let o = c.nodeType === 9 && a; if (c.nodeType === 1 && c.nodeName.toLowerCase() !== 'object') { for (j = h(a), (l = c.getAttribute('id')) ? m = l.replace(d, '\\$&') : c.setAttribute('id', m), m = `[id='${m}'] `, k = j.length; k--;)j[k] = m + j[k].join(''); n = db.test(a) && c.parentNode || c, o = j.join(','); } if (o) try { return K.apply(e, L.call(n.querySelectorAll(o), 0)), e; } catch (p) {} finally { l || c.removeAttribute('id'); } } return b(a, c, e, g, i); }, i && (ib((b) => { a = i.call(b, 'div'); try { i.call(b, "[test!='']:sizzle"), g.push('!=', X); } catch (c) {} }), g = new RegExp(g.join('|')), c.matchesSelector = function (b, d) { if (d = d.replace(e, "='$1']"), !v(b) && !g.test(d) && !f.test(d)) try { const h = i.call(b, d); if (h || a || b.document && b.document.nodeType !== 11) return h; } catch (j) {} return c(d, null, null, [b]).length > 0; }); }()), t.pseudos.nth = t.pseudos.eq, t.filters = q.prototype = t.pseudos, t.setFilters = new q(), c.attr = $.attr, $.find = c, $.expr = c.selectors, $.expr[':'] = $.expr.pseudos, $.unique = c.uniqueSort, $.text = c.getText, $.isXMLDoc = c.isXML, $.contains = c.contains; }(a)); const Ib = /Until$/; const Jb = /^(?:parents|prev(?:Until|All))/; var Kb = /^.[^:#\[\.,]*$/; const Lb = $.expr.match.needsContext; const Mb = { children: !0, contents: !0, next: !0, prev: !0 }; $.fn.extend({ find: function (a) { let b; let c; let d; let e; let f; let g; const h = this; if (typeof a !== 'string') return $(a).filter(function () { for (b = 0, c = h.length; c > b; b++) if ($.contains(h[b], this)) return !0; }); for (g = this.pushStack('', 'find', a), b = 0, c = this.length; c > b; b++) if (d = g.length, $.find(a, this[b], g), b > 0) for (e = d; e < g.length; e++) for (f = 0; d > f; f++) if (g[f] === g[e]) { g.splice(e--, 1); break; } return g; }, has: function (a) { let b; const c = $(a, this); const d = c.length; return this.filter(function () { for (b = 0; d > b; b++) if ($.contains(this, c[b])) return !0; }); }, not: function (a) { return this.pushStack(j(this, a, !1), 'not', a); }, filter: function (a) { return this.pushStack(j(this, a, !0), 'filter', a); }, is: function (a) { return !!a && (typeof a === 'string' ? Lb.test(a) ? $(a, this.context).index(this[0]) >= 0 : $.filter(a, this).length > 0 : this.filter(a).length > 0); }, closest: function (a, b) { for (var c, d = 0, e = this.length, f = [], g = Lb.test(a) || typeof a !== 'string' ? $(a, b || this.context) : 0; e > d; d++) for (c = this[d]; c && c.ownerDocument && c !== b && c.nodeType !== 11;) { if (g ? g.index(c) > -1 : $.find.matchesSelector(c, a)) { f.push(c); break; }c = c.parentNode; } return f = f.length > 1 ? $.unique(f) : f, this.pushStack(f, 'closest', a); }, index: function (a) { return a ? typeof a === 'string' ? $.inArray(this[0], $(a)) : $.inArray(a.jquery ? a[0] : a, this) : this[0] && this[0].parentNode ? this.prevAll().length : -1; }, add: function (a, b) { const c = typeof a === 'string' ? $(a, b) : $.makeArray(a && a.nodeType ? [a] : a); const d = $.merge(this.get(), c); return this.pushStack(h(c[0]) || h(d[0]) ? d : $.unique(d)); }, addBack: function (a) { return this.add(a == null ? this.prevObject : this.prevObject.filter(a)); } }), $.fn.andSelf = $.fn.addBack, $.each({ parent: function (a) { const b = a.parentNode; return b && b.nodeType !== 11 ? b : null; }, parents: function (a) { return $.dir(a, 'parentNode'); }, parentsUntil: function (a, b, c) { return $.dir(a, 'parentNode', c); }, next: function (a) { return i(a, 'nextSibling'); }, prev: function (a) { return i(a, 'previousSibling'); }, nextAll: function (a) { return $.dir(a, 'nextSibling'); }, prevAll: function (a) { return $.dir(a, 'previousSibling'); }, nextUntil: function (a, b, c) { return $.dir(a, 'nextSibling', c); }, prevUntil: function (a, b, c) { return $.dir(a, 'previousSibling', c); }, siblings: function (a) { return $.sibling((a.parentNode || {}).firstChild, a); }, children: function (a) { return $.sibling(a.firstChild); }, contents: function (a) { return $.nodeName(a, 'iframe') ? a.contentDocument || a.contentWindow.document : $.merge([], a.childNodes); } }, (a, b) => { $.fn[a] = function (c, d) { let e = $.map(this, b, c); return Ib.test(a) || (d = c), d && typeof d === 'string' && (e = $.filter(d, e)), e = this.length > 1 && !Mb[a] ? $.unique(e) : e, this.length > 1 && Jb.test(a) && (e = e.reverse()), this.pushStack(e, a, V.call(arguments).join(',')); }; }), $.extend({ filter: function (a, b, c) { return c && (a = `:not(${a})`), b.length === 1 ? $.find.matchesSelector(b[0], a) ? [b[0]] : [] : $.find.matches(a, b); }, dir: function (a, c, d) { for (var e = [], f = a[c]; f && f.nodeType !== 9 && (d === b || f.nodeType !== 1 || !$(f).is(d));)f.nodeType === 1 && e.push(f), f = f[c]; return e; }, sibling: function (a, b) { for (var c = []; a; a = a.nextSibling)a.nodeType === 1 && a !== b && c.push(a); return c; } }); var Nb = 'abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video'; const Ob = / jQuery\d+="(?:null|\d+)"/g; const Pb = /^\s+/; const Qb = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi; const Rb = /<([\w:]+)/; const Sb = /]`, 'i'); var Xb = /^(?:checkbox|radio)$/; const Yb = /checked\s*(?:[^=]|=\s*.checked.)/i; const Zb = /\/(java|ecma)script/i; const $b = /^\s*\s*$/g; const _b = { option: [1, "'], legend: [1, '
', '
'], thead: [1, '', '
'], tr: [2, '', '
'], td: [3, '', '
'], col: [2, '', '
'], area: [1, '', ''], _default: [0, '', ''] }; const ac = k(P); const bc = ac.appendChild(P.createElement('div')); + _b.optgroup = _b.option, _b.tbody = _b.tfoot = _b.colgroup = _b.caption = _b.thead, _b.th = _b.td, $.support.htmlSerialize || (_b._default = [1, 'X
', '
']), $.fn.extend({ text: function (a) { return $.access(this, function (a) { return a === b ? $.text(this) : this.empty().append((this[0] && this[0].ownerDocument || P).createTextNode(a)); }, null, a, arguments.length); }, wrapAll: function (a) { if ($.isFunction(a)) return this.each(function (b) { $(this).wrapAll(a.call(this, b)); }); if (this[0]) { const b = $(a, this[0].ownerDocument).eq(0).clone(!0); this[0].parentNode && b.insertBefore(this[0]), b.map(function () { for (var a = this; a.firstChild && a.firstChild.nodeType === 1;)a = a.firstChild; return a; }).append(this); } return this; }, wrapInner: function (a) { return $.isFunction(a) ? this.each(function (b) { $(this).wrapInner(a.call(this, b)); }) : this.each(function () { const b = $(this); const c = b.contents(); c.length ? c.wrapAll(a) : b.append(a); }); }, wrap: function (a) { const b = $.isFunction(a); return this.each(function (c) { $(this).wrapAll(b ? a.call(this, c) : a); }); }, unwrap: function () { return this.parent().each(function () { $.nodeName(this, 'body') || $(this).replaceWith(this.childNodes); }).end(); }, append: function () { return this.domManip(arguments, !0, function (a) { (this.nodeType === 1 || this.nodeType === 11) && this.appendChild(a); }); }, prepend: function () { return this.domManip(arguments, !0, function (a) { (this.nodeType === 1 || this.nodeType === 11) && this.insertBefore(a, this.firstChild); }); }, before: function () { if (!h(this[0])) return this.domManip(arguments, !1, function (a) { this.parentNode.insertBefore(a, this); }); if (arguments.length) { const a = $.clean(arguments); return this.pushStack($.merge(a, this), 'before', this.selector); } }, after: function () { if (!h(this[0])) return this.domManip(arguments, !1, function (a) { this.parentNode.insertBefore(a, this.nextSibling); }); if (arguments.length) { const a = $.clean(arguments); return this.pushStack($.merge(this, a), 'after', this.selector); } }, remove: function (a, b) { for (var c, d = 0; (c = this[d]) != null; d++)(!a || $.filter(a, [c]).length) && (!b && c.nodeType === 1 && ($.cleanData(c.getElementsByTagName('*')), $.cleanData([c])), c.parentNode && c.parentNode.removeChild(c)); return this; }, empty: function () { for (var a, b = 0; (a = this[b]) != null; b++) for (a.nodeType === 1 && $.cleanData(a.getElementsByTagName('*')); a.firstChild;)a.removeChild(a.firstChild); return this; }, clone: function (a, b) { return a = a == null ? !1 : a, b = b == null ? a : b, this.map(function () { return $.clone(this, a, b); }); }, html: function (a) { return $.access(this, function (a) { let c = this[0] || {}; let d = 0; const e = this.length; if (a === b) return c.nodeType === 1 ? c.innerHTML.replace(Ob, '') : b; if (!(typeof a !== 'string' || Ub.test(a) || !$.support.htmlSerialize && Wb.test(a) || !$.support.leadingWhitespace && Pb.test(a) || _b[(Rb.exec(a) || ['', ''])[1].toLowerCase()])) { a = a.replace(Qb, '<$1>'); try { for (;e > d; d++)c = this[d] || {}, c.nodeType === 1 && ($.cleanData(c.getElementsByTagName('*')), c.innerHTML = a); c = 0; } catch (f) {} }c && this.empty().append(a); }, null, a, arguments.length); }, replaceWith: function (a) { return h(this[0]) ? this.length ? this.pushStack($($.isFunction(a) ? a() : a), 'replaceWith', a) : this : $.isFunction(a) ? this.each(function (b) { const c = $(this); const d = c.html(); c.replaceWith(a.call(this, b, d)); }) : (typeof a !== 'string' && (a = $(a).detach()), this.each(function () { const b = this.nextSibling; const c = this.parentNode; $(this).remove(), b ? $(b).before(a) : $(c).append(a); })); }, detach: function (a) { return this.remove(a, !0); }, domManip: function (a, c, d) { a = [].concat.apply([], a); let e; let f; let g; let h; let i = 0; const j = a[0]; const k = []; const m = this.length; if (!$.support.checkClone && m > 1 && typeof j === 'string' && Yb.test(j)) return this.each(function () { $(this).domManip(a, c, d); }); if ($.isFunction(j)) return this.each(function (e) { const f = $(this); a[0] = j.call(this, e, c ? f.html() : b), f.domManip(a, c, d); }); if (this[0]) { if (e = $.buildFragment(a, this, k), g = e.fragment, f = g.firstChild, g.childNodes.length === 1 && (g = f), f) for (c = c && $.nodeName(f, 'tr'), h = e.cacheable || m - 1; m > i; i++)d.call(c && $.nodeName(this[i], 'table') ? l(this[i], 'tbody') : this[i], i === h ? g : $.clone(g, !0, !0)); g = f = null, k.length && $.each(k, (a, b) => { b.src ? $.ajax ? $.ajax({ url: b.src, type: 'GET', dataType: 'script', async: !1, global: !1, throws: !0 }) : $.error('no ajax') : $.globalEval((b.text || b.textContent || b.innerHTML || '').replace($b, '')), b.parentNode && b.parentNode.removeChild(b); }); } return this; } }), $.buildFragment = function (a, c, d) { let e; let f; let g; const h = a[0]; return c = c || P, c = !c.nodeType && c[0] || c, c = c.ownerDocument || c, a.length === 1 && typeof h === 'string' && h.length < 512 && c === P && h.charAt(0) === '<' && !Vb.test(h) && ($.support.checkClone || !Yb.test(h)) && ($.support.html5Clone || !Wb.test(h)) && (f = !0, e = $.fragments[h], g = e !== b), e || (e = c.createDocumentFragment(), $.clean(a, c, e, d), f && ($.fragments[h] = g && e)), { fragment: e, cacheable: f }; }, $.fragments = {}, $.each({ appendTo: 'append', prependTo: 'prepend', insertBefore: 'before', insertAfter: 'after', replaceAll: 'replaceWith' }, (a, b) => { $.fn[a] = function (c) { let d; let e = 0; let f = []; const g = $(c); const h = g.length; const i = this.length === 1 && this[0].parentNode; if ((i == null || i && i.nodeType === 11 && i.childNodes.length === 1) && h === 1) return g[b](this[0]), this; for (;h > e; e++)d = (e > 0 ? this.clone(!0) : this).get(), $(g[e])[b](d), f = f.concat(d); return this.pushStack(f, a, g.selector); }; }), $.extend({ clone: function (a, b, c) { let d; let e; let f; let g; if ($.support.html5Clone || $.isXMLDoc(a) || !Wb.test(`<${a.nodeName}>`) ? g = a.cloneNode(!0) : (bc.innerHTML = a.outerHTML, bc.removeChild(g = bc.firstChild)), !($.support.noCloneEvent && $.support.noCloneChecked || a.nodeType !== 1 && a.nodeType !== 11 || $.isXMLDoc(a))) for (n(a, g), d = o(a), e = o(g), f = 0; d[f]; ++f)e[f] && n(d[f], e[f]); if (b && (m(a, g), c)) for (d = o(a), e = o(g), f = 0; d[f]; ++f)m(d[f], e[f]); return d = e = null, g; }, clean: function (a, b, c, d) { let e; let f; let g; let h; let i; let j; let l; let m; let n; let o; let q; let r = b === P && ac; const s = []; for (b && typeof b.createDocumentFragment !== 'undefined' || (b = P), e = 0; (g = a[e]) != null; e++) if (typeof g === 'number' && (g += ''), g) { if (typeof g === 'string') if (Tb.test(g)) { for (r = r || k(b), l = b.createElement('div'), r.appendChild(l), g = g.replace(Qb, '<$1>'), h = (Rb.exec(g) || ['', ''])[1].toLowerCase(), i = _b[h] || _b._default, j = i[0], l.innerHTML = i[1] + g + i[2]; j--;)l = l.lastChild; if (!$.support.tbody) for (m = Sb.test(g), n = h !== 'table' || m ? i[1] !== '' || m ? [] : l.childNodes : l.firstChild && l.firstChild.childNodes, f = n.length - 1; f >= 0; --f)$.nodeName(n[f], 'tbody') && !n[f].childNodes.length && n[f].parentNode.removeChild(n[f]); !$.support.leadingWhitespace && Pb.test(g) && l.insertBefore(b.createTextNode(Pb.exec(g)[0]), l.firstChild), g = l.childNodes, l.parentNode.removeChild(l); } else g = b.createTextNode(g); g.nodeType ? s.push(g) : $.merge(s, g); } if (l && (g = l = r = null), !$.support.appendChecked) for (e = 0; (g = s[e]) != null; e++)$.nodeName(g, 'input') ? p(g) : typeof g.getElementsByTagName !== 'undefined' && $.grep(g.getElementsByTagName('input'), p); if (c) for (o = function (a) { return !a.type || Zb.test(a.type) ? d ? d.push(a.parentNode ? a.parentNode.removeChild(a) : a) : c.appendChild(a) : void 0; }, e = 0; (g = s[e]) != null; e++)$.nodeName(g, 'script') && o(g) || (c.appendChild(g), typeof g.getElementsByTagName !== 'undefined' && (q = $.grep($.merge([], g.getElementsByTagName('script')), o), s.splice.apply(s, [e + 1, 0].concat(q)), e += q.length)); return s; }, cleanData: function (a, b) { for (var c, d, e, f, g = 0, h = $.expando, i = $.cache, j = $.support.deleteExpando, k = $.event.special; (e = a[g]) != null; g++) if ((b || $.acceptData(e)) && (d = e[h], c = d && i[d])) { if (c.events) for (f in c.events)k[f] ? $.event.remove(e, f) : $.removeEvent(e, f, c.handle); i[d] && (delete i[d], j ? delete e[h] : e.removeAttribute ? e.removeAttribute(h) : e[h] = null, $.deletedIds.push(d)); } } }), (function () { let a; let b; $.uaMatch = function (a) { a = a.toLowerCase(); const b = /(chrome)[ \/]([\w.]+)/.exec(a) || /(webkit)[ \/]([\w.]+)/.exec(a) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a) || /(msie) ([\w.]+)/.exec(a) || a.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a) || []; return { browser: b[1] || '', version: b[2] || '0' }; }, a = $.uaMatch(R.userAgent), b = {}, a.browser && (b[a.browser] = !0, b.version = a.version), b.chrome ? b.webkit = !0 : b.webkit && (b.safari = !0), $.browser = b, $.sub = function () { function a(b, c) { return new a.fn.init(b, c); }$.extend(!0, a, this), a.superclass = this, a.fn = a.prototype = this(), a.fn.constructor = a, a.sub = this.sub, a.fn.init = function (c, d) { return d && d instanceof $ && !(d instanceof a) && (d = a(d)), $.fn.init.call(this, c, d, b); }, a.fn.init.prototype = a.fn; var b = a(P); return a; }; }()); let cc; let dc; let ec; const fc = /alpha\([^)]*\)/i; const gc = /opacity=([^)]*)/; const hc = /^(top|right|bottom|left)$/; const ic = /^(none|table(?!-c[ea]).+)/; const jc = /^margin/; var kc = new RegExp(`^(${_})(.*)$`, 'i'); var lc = new RegExp(`^(${_})(?!px)[a-z%]+$`, 'i'); const mc = new RegExp(`^([-+])=(${_})`, 'i'); var nc = { BODY: 'block' }; const oc = { position: 'absolute', visibility: 'hidden', display: 'block' }; const pc = { letterSpacing: 0, fontWeight: 400 }; var qc = ['Top', 'Right', 'Bottom', 'Left']; var rc = ['Webkit', 'O', 'Moz', 'ms']; const sc = $.fn.toggle; $.fn.extend({ css: function (a, c) { return $.access(this, (a, c, d) => (d !== b ? $.style(a, c, d) : $.css(a, c)), a, c, arguments.length > 1); }, show: function () { return s(this, !0); }, hide: function () { return s(this); }, toggle: function (a, b) { const c = typeof a === 'boolean'; return $.isFunction(a) && $.isFunction(b) ? sc.apply(this, arguments) : this.each(function () { (c ? a : r(this)) ? $(this).show() : $(this).hide(); }); } }), $.extend({ cssHooks: { opacity: { get: function (a, b) { if (b) { const c = cc(a, 'opacity'); return c === '' ? '1' : c; } } } }, cssNumber: { fillOpacity: !0, fontWeight: !0, lineHeight: !0, opacity: !0, orphans: !0, widows: !0, zIndex: !0, zoom: !0 }, cssProps: { float: $.support.cssFloat ? 'cssFloat' : 'styleFloat' }, style: function (a, c, d, e) { if (a && a.nodeType !== 3 && a.nodeType !== 8 && a.style) { let f; let g; let h; const i = $.camelCase(c); const j = a.style; if (c = $.cssProps[i] || ($.cssProps[i] = q(j, i)), h = $.cssHooks[c] || $.cssHooks[i], d === b) return h && 'get' in h && (f = h.get(a, !1, e)) !== b ? f : j[c]; if (g = typeof d, g === 'string' && (f = mc.exec(d)) && (d = (f[1] + 1) * f[2] + parseFloat($.css(a, c)), g = 'number'), !(d == null || g === 'number' && isNaN(d) || (g === 'number' && !$.cssNumber[i] && (d += 'px'), h && 'set' in h && (d = h.set(a, d, e)) === b))) try { j[c] = d; } catch (k) {} } }, css: function (a, c, d, e) { let f; let g; let h; const i = $.camelCase(c); return c = $.cssProps[i] || ($.cssProps[i] = q(a.style, i)), h = $.cssHooks[c] || $.cssHooks[i], h && 'get' in h && (f = h.get(a, !0, e)), f === b && (f = cc(a, c)), f === 'normal' && c in pc && (f = pc[c]), d || e !== b ? (g = parseFloat(f), d || $.isNumeric(g) ? g || 0 : f) : f; }, swap: function (a, b, c) { let d; let e; const f = {}; for (e in b)f[e] = a.style[e], a.style[e] = b[e]; d = c.call(a); for (e in b)a.style[e] = f[e]; return d; } }), a.getComputedStyle ? cc = function (b, c) { let d; let e; let f; let g; const h = a.getComputedStyle(b, null); const i = b.style; return h && (d = h.getPropertyValue(c) || h[c], d === '' && !$.contains(b.ownerDocument, b) && (d = $.style(b, c)), lc.test(d) && jc.test(c) && (e = i.width, f = i.minWidth, g = i.maxWidth, i.minWidth = i.maxWidth = i.width = d, d = h.width, i.width = e, i.minWidth = f, i.maxWidth = g)), d; } : P.documentElement.currentStyle && (cc = function (a, b) { let c; let d; let e = a.currentStyle && a.currentStyle[b]; const f = a.style; return e == null && f && f[b] && (e = f[b]), lc.test(e) && !hc.test(b) && (c = f.left, d = a.runtimeStyle && a.runtimeStyle.left, d && (a.runtimeStyle.left = a.currentStyle.left), f.left = b === 'fontSize' ? '1em' : e, e = `${f.pixelLeft}px`, f.left = c, d && (a.runtimeStyle.left = d)), e === '' ? 'auto' : e; }), $.each(['height', 'width'], (a, b) => { $.cssHooks[b] = { get: function (a, c, d) { return c ? a.offsetWidth === 0 && ic.test(cc(a, 'display')) ? $.swap(a, oc, () => v(a, b, d)) : v(a, b, d) : void 0; }, set: function (a, c, d) { return t(a, c, d ? u(a, b, d, $.support.boxSizing && $.css(a, 'boxSizing') === 'border-box') : 0); } }; }), $.support.opacity || ($.cssHooks.opacity = { get: function (a, b) { return gc.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || '') ? `${0.01 * parseFloat(RegExp.$1)}` : b ? '1' : ''; }, set: function (a, b) { const c = a.style; const d = a.currentStyle; const e = $.isNumeric(b) ? `alpha(opacity=${100 * b})` : ''; const f = d && d.filter || c.filter || ''; c.zoom = 1, b >= 1 && $.trim(f.replace(fc, '')) === '' && c.removeAttribute && (c.removeAttribute('filter'), d && !d.filter) || (c.filter = fc.test(f) ? f.replace(fc, e) : `${f} ${e}`); } }), $(() => { $.support.reliableMarginRight || ($.cssHooks.marginRight = { get: function (a, b) { return $.swap(a, { display: 'inline-block' }, () => (b ? cc(a, 'marginRight') : void 0)); } }), !$.support.pixelPosition && $.fn.position && $.each(['top', 'left'], (a, b) => { $.cssHooks[b] = { get: function (a, c) { if (c) { const d = cc(a, b); return lc.test(d) ? `${$(a).position()[b]}px` : d; } } }; }); }), $.expr && $.expr.filters && ($.expr.filters.hidden = function (a) { return a.offsetWidth === 0 && a.offsetHeight === 0 || !$.support.reliableHiddenOffsets && (a.style && a.style.display || cc(a, 'display')) === 'none'; }, $.expr.filters.visible = function (a) { return !$.expr.filters.hidden(a); }), $.each({ margin: '', padding: '', border: 'Width' }, (a, b) => { $.cssHooks[a + b] = { expand: function (c) { let d; const e = typeof c === 'string' ? c.split(' ') : [c]; const f = {}; for (d = 0; d < 4; d++)f[a + qc[d] + b] = e[d] || e[d - 2] || e[0]; return f; } }, jc.test(a) || ($.cssHooks[a + b].set = t); }); const tc = /%20/g; var uc = /\[\]$/; const vc = /\r?\n/g; const wc = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i; const xc = /^(?:select|textarea)/i; $.fn.extend({ serialize: function () { return $.param(this.serializeArray()); }, serializeArray: function () { return this.map(function () { return this.elements ? $.makeArray(this.elements) : this; }).filter(function () { return this.name && !this.disabled && (this.checked || xc.test(this.nodeName) || wc.test(this.type)); }).map(function (a, b) { const c = $(this).val(); return c == null ? null : $.isArray(c) ? $.map(c, a => ({ name: b.name, value: a.replace(vc, '\r\n') })) : { name: b.name, value: c.replace(vc, '\r\n') }; }).get(); } }), $.param = function (a, c) { let d; const e = []; const f = function (a, b) { b = $.isFunction(b) ? b() : b == null ? '' : b, e[e.length] = `${encodeURIComponent(a)}=${encodeURIComponent(b)}`; }; if (c === b && (c = $.ajaxSettings && $.ajaxSettings.traditional), $.isArray(a) || a.jquery && !$.isPlainObject(a))$.each(a, function () { f(this.name, this.value); }); else for (d in a)x(d, a[d], c, f); return e.join('&').replace(tc, '+'); }; let yc; let zc; const Ac = /#.*$/; const Bc = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm; const Cc = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/; const Dc = /^(?:GET|HEAD)$/; const Ec = /^\/\//; const Fc = /\?/; const Gc = /)<[^<]*)*<\/script>/gi; const Hc = /([?&])_=[^&]*/; const Ic = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/; const Jc = $.fn.load; var Kc = {}; const Lc = {}; const Mc = ['*/'] + ['*']; try { zc = Q.href; } catch (Nc) { zc = P.createElement('a'), zc.href = '', zc = zc.href; }yc = Ic.exec(zc.toLowerCase()) || [], $.fn.load = function (a, c, d) { if (typeof a !== 'string' && Jc) return Jc.apply(this, arguments); if (!this.length) return this; let e; let f; let g; const h = this; const i = a.indexOf(' '); return i >= 0 && (e = a.slice(i, a.length), a = a.slice(0, i)), $.isFunction(c) ? (d = c, c = b) : c && typeof c === 'object' && (f = 'POST'), $.ajax({ url: a, type: f, dataType: 'html', data: c, complete: function (a, b) { d && h.each(d, g || [a.responseText, b, a]); } }).done(function (a) { g = arguments, h.html(e ? $('
').append(a.replace(Gc, '')).find(e) : a); }), this; }, $.each('ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend'.split(' '), (a, b) => { $.fn[b] = function (a) { return this.on(b, a); }; }), $.each(['get', 'post'], (a, c) => { $[c] = function (a, d, e, f) { return $.isFunction(d) && (f = f || e, e = d, d = b), $.ajax({ type: c, url: a, data: d, success: e, dataType: f }); }; }), $.extend({ getScript: function (a, c) { return $.get(a, b, c, 'script'); }, getJSON: function (a, b, c) { return $.get(a, b, c, 'json'); }, ajaxSetup: function (a, b) { return b ? A(a, $.ajaxSettings) : (b = a, a = $.ajaxSettings), A(a, b), a; }, ajaxSettings: { url: zc, isLocal: Cc.test(yc[1]), global: !0, type: 'GET', contentType: 'application/x-www-form-urlencoded; charset=UTF-8', processData: !0, async: !0, accepts: { xml: 'application/xml, text/xml', html: 'text/html', text: 'text/plain', json: 'application/json, text/javascript', '*': Mc }, contents: { xml: /xml/, html: /html/, json: /json/ }, responseFields: { xml: 'responseXML', text: 'responseText' }, converters: { '* text': a.String, 'text html': !0, 'text json': $.parseJSON, 'text xml': $.parseXML }, flatOptions: { context: !0, url: !0 } }, ajaxPrefilter: y(Kc), ajaxTransport: y(Lc), ajax: function (a, c) { function d(a, c, d, g) { let j; let l; let s; let t; let v; let x = c; u !== 2 && (u = 2, i && clearTimeout(i), h = b, f = g || '', w.readyState = a > 0 ? 4 : 0, d && (t = B(m, w, d)), a >= 200 && a < 300 || a === 304 ? (m.ifModified && (v = w.getResponseHeader('Last-Modified'), v && ($.lastModified[e] = v), v = w.getResponseHeader('Etag'), v && ($.etag[e] = v)), a === 304 ? (x = 'notmodified', j = !0) : (j = C(m, t), x = j.state, l = j.data, s = j.error, j = !s)) : (s = x, (!x || a) && (x = 'error', a < 0 && (a = 0))), w.status = a, w.statusText = `${c || x}`, j ? p.resolveWith(n, [l, x, w]) : p.rejectWith(n, [w, x, s]), w.statusCode(r), r = b, k && o.trigger(`ajax${j ? 'Success' : 'Error'}`, [w, m, j ? l : s]), q.fireWith(n, [w, x]), k && (o.trigger('ajaxComplete', [w, m]), --$.active || $.event.trigger('ajaxStop'))); } typeof a === 'object' && (c = a, a = b), c = c || {}; let e; let f; let g; let h; let i; let j; let k; let l; var m = $.ajaxSetup({}, c); var n = m.context || m; var o = n !== m && (n.nodeType || n instanceof $) ? $(n) : $.event; var p = $.Deferred(); var q = $.Callbacks('once memory'); var r = m.statusCode || {}; const s = {}; const t = {}; var u = 0; let v = 'canceled'; var w = { readyState: 0, setRequestHeader: function (a, b) { if (!u) { const c = a.toLowerCase(); a = t[c] = t[c] || a, s[a] = b; } return this; }, getAllResponseHeaders: function () { return u === 2 ? f : null; }, getResponseHeader: function (a) { let c; if (u === 2) { if (!g) for (g = {}; c = Bc.exec(f);)g[c[1].toLowerCase()] = c[2]; c = g[a.toLowerCase()]; } return c === b ? null : c; }, overrideMimeType: function (a) { return u || (m.mimeType = a), this; }, abort: function (a) { return a = a || v, h && h.abort(a), d(0, a), this; } }; if (p.promise(w), w.success = w.done, w.error = w.fail, w.complete = q.add, w.statusCode = function (a) { if (a) { let b; if (u < 2) for (b in a)r[b] = [r[b], a[b]]; else b = a[w.status], w.always(b); } return this; }, m.url = (`${a || m.url}`).replace(Ac, '').replace(Ec, `${yc[1]}//`), m.dataTypes = $.trim(m.dataType || '*').toLowerCase().split(bb), m.crossDomain == null && (j = Ic.exec(m.url.toLowerCase()), m.crossDomain = !(!j || j[1] === yc[1] && j[2] === yc[2] && (j[3] || (j[1] === 'http:' ? 80 : 443)) == (yc[3] || (yc[1] === 'http:' ? 80 : 443)))), m.data && m.processData && typeof m.data !== 'string' && (m.data = $.param(m.data, m.traditional)), z(Kc, m, c, w), u === 2) return w; if (k = m.global, m.type = m.type.toUpperCase(), m.hasContent = !Dc.test(m.type), k && $.active++ === 0 && $.event.trigger('ajaxStart'), !m.hasContent && (m.data && (m.url += (Fc.test(m.url) ? '&' : '?') + m.data, delete m.data), e = m.url, m.cache === !1)) { const x = $.now(); const y = m.url.replace(Hc, `$1_=${x}`); m.url = y + (y === m.url ? `${Fc.test(m.url) ? '&' : '?'}_=${x}` : ''); }(m.data && m.hasContent && m.contentType !== !1 || c.contentType) && w.setRequestHeader('Content-Type', m.contentType), m.ifModified && (e = e || m.url, $.lastModified[e] && w.setRequestHeader('If-Modified-Since', $.lastModified[e]), $.etag[e] && w.setRequestHeader('If-None-Match', $.etag[e])), w.setRequestHeader('Accept', m.dataTypes[0] && m.accepts[m.dataTypes[0]] ? m.accepts[m.dataTypes[0]] + (m.dataTypes[0] !== '*' ? `, ${Mc}; q=0.01` : '') : m.accepts['*']); for (l in m.headers)w.setRequestHeader(l, m.headers[l]); if (!m.beforeSend || m.beforeSend.call(n, w, m) !== !1 && u !== 2) { v = 'abort'; for (l in { success: 1, error: 1, complete: 1 })w[l](m[l]); if (h = z(Lc, m, c, w)) { w.readyState = 1, k && o.trigger('ajaxSend', [w, m]), m.async && m.timeout > 0 && (i = setTimeout(() => { w.abort('timeout'); }, m.timeout)); try { u = 1, h.send(s, d); } catch (A) { if (!(u < 2)) throw A; d(-1, A); } } else d(-1, 'No Transport'); return w; } return w.abort(); }, active: 0, lastModified: {}, etag: {} }); const Oc = []; const Pc = /\?/; const Qc = /(=)\?(?=&|$)|\?\?/; let Rc = $.now(); $.ajaxSetup({ jsonp: 'callback', jsonpCallback: function () { const a = Oc.pop() || `${$.expando}_${Rc++}`; return this[a] = !0, a; } }), $.ajaxPrefilter('json jsonp', (c, d, e) => { let f; let g; let h; const i = c.data; const j = c.url; const k = c.jsonp !== !1; const l = k && Qc.test(j); const m = k && !l && typeof i === 'string' && !(c.contentType || '').indexOf('application/x-www-form-urlencoded') && Qc.test(i); return c.dataTypes[0] === 'jsonp' || l || m ? (f = c.jsonpCallback = $.isFunction(c.jsonpCallback) ? c.jsonpCallback() : c.jsonpCallback, g = a[f], l ? c.url = j.replace(Qc, `$1${f}`) : m ? c.data = i.replace(Qc, `$1${f}`) : k && (c.url += `${(Pc.test(j) ? '&' : '?') + c.jsonp}=${f}`), c.converters['script json'] = function () { return h || $.error(`${f} was not called`), h[0]; }, c.dataTypes[0] = 'json', a[f] = function () { h = arguments; }, e.always(() => { a[f] = g, c[f] && (c.jsonpCallback = d.jsonpCallback, Oc.push(f)), h && $.isFunction(g) && g(h[0]), h = g = b; }), 'script') : void 0; }), $.ajaxSetup({ accepts: { script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript' }, contents: { script: /javascript|ecmascript/ }, converters: { 'text script': function (a) { return $.globalEval(a), a; } } }), $.ajaxPrefilter('script', (a) => { a.cache === b && (a.cache = !1), a.crossDomain && (a.type = 'GET', a.global = !1); }), $.ajaxTransport('script', (a) => { if (a.crossDomain) { let c; const d = P.head || P.getElementsByTagName('head')[0] || P.documentElement; return { send: function (e, f) { c = P.createElement('script'), c.async = 'async', a.scriptCharset && (c.charset = a.scriptCharset), c.src = a.url, c.onload = c.onreadystatechange = function (a, e) { (e || !c.readyState || /loaded|complete/.test(c.readyState)) && (c.onload = c.onreadystatechange = null, d && c.parentNode && d.removeChild(c), c = b, e || f(200, 'success')); }, d.insertBefore(c, d.firstChild); }, abort: function () { c && c.onload(0, 1); } }; } }); let Sc; const Tc = a.ActiveXObject ? function () { for (const a in Sc)Sc[a](0, 1); } : !1; let Uc = 0; $.ajaxSettings.xhr = a.ActiveXObject ? function () { return !this.isLocal && D() || E(); } : D, (function (a) { $.extend($.support, { ajax: !!a, cors: !!a && 'withCredentials' in a }); }($.ajaxSettings.xhr())), $.support.ajax && $.ajaxTransport((c) => { if (!c.crossDomain || $.support.cors) { let d; return { send: function (e, f) { let g; let h; const i = c.xhr(); if (c.username ? i.open(c.type, c.url, c.async, c.username, c.password) : i.open(c.type, c.url, c.async), c.xhrFields) for (h in c.xhrFields)i[h] = c.xhrFields[h]; c.mimeType && i.overrideMimeType && i.overrideMimeType(c.mimeType), !c.crossDomain && !e['X-Requested-With'] && (e['X-Requested-With'] = 'XMLHttpRequest'); try { for (h in e)i.setRequestHeader(h, e[h]); } catch (j) {}i.send(c.hasContent && c.data || null), d = function (a, e) { let h; let j; let k; let l; let m; try { if (d && (e || i.readyState === 4)) if (d = b, g && (i.onreadystatechange = $.noop, Tc && delete Sc[g]), e)i.readyState !== 4 && i.abort(); else { h = i.status, k = i.getAllResponseHeaders(), l = {}, m = i.responseXML, m && m.documentElement && (l.xml = m); try { l.text = i.responseText; } catch (n) {} try { j = i.statusText; } catch (n) { j = ''; }h || !c.isLocal || c.crossDomain ? h === 1223 && (h = 204) : h = l.text ? 200 : 404; } } catch (o) { e || f(-1, o); }l && f(h, j, l, k); }, c.async ? i.readyState === 4 ? setTimeout(d, 0) : (g = ++Uc, Tc && (Sc || (Sc = {}, $(a).unload(Tc)), Sc[g] = d), i.onreadystatechange = d) : d(); }, abort: function () { d && d(0, 1); } }; } }); let Vc; let Wc; var Xc = /^(?:toggle|show|hide)$/; const Yc = new RegExp(`^(?:([-+])=|)(${_})([a-z%]*)$`, 'i'); const Zc = /queueHooks$/; var $c = [J]; var _c = { '*': [function (a, b) { let c; let d; const e = this.createTween(a, b); const f = Yc.exec(b); const g = e.cur(); let h = +g || 0; let i = 1; let j = 20; if (f) { if (c = +f[2], d = f[3] || ($.cssNumber[a] ? '' : 'px'), d !== 'px' && h) { h = $.css(e.elem, a, !0) || c || 1; do i = i || '.5', h /= i, $.style(e.elem, a, h + d); while (i !== (i = e.cur() / g) && i !== 1 && --j); }e.unit = d, e.start = h, e.end = f[1] ? h + (f[1] + 1) * c : c; } return e; }] }; $.Animation = $.extend(H, { tweener: function (a, b) { $.isFunction(a) ? (b = a, a = ['*']) : a = a.split(' '); for (var c, d = 0, e = a.length; e > d; d++)c = a[d], _c[c] = _c[c] || [], _c[c].unshift(b); }, prefilter: function (a, b) { b ? $c.unshift(a) : $c.push(a); } }), $.Tween = K, K.prototype = { constructor: K, init: function (a, b, c, d, e, f) { this.elem = a, this.prop = c, this.easing = e || 'swing', this.options = b, this.start = this.now = this.cur(), this.end = d, this.unit = f || ($.cssNumber[c] ? '' : 'px'); }, cur: function () { const a = K.propHooks[this.prop]; return a && a.get ? a.get(this) : K.propHooks._default.get(this); }, run: function (a) { let b; const c = K.propHooks[this.prop]; return this.pos = b = this.options.duration ? $.easing[this.easing](a, this.options.duration * a, 0, 1, this.options.duration) : a, this.now = (this.end - this.start) * b + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), c && c.set ? c.set(this) : K.propHooks._default.set(this), this; } }, K.prototype.init.prototype = K.prototype, K.propHooks = { _default: { get: function (a) { let b; return a.elem[a.prop] == null || a.elem.style && a.elem.style[a.prop] != null ? (b = $.css(a.elem, a.prop, !1, ''), b && b !== 'auto' ? b : 0) : a.elem[a.prop]; }, set: function (a) { $.fx.step[a.prop] ? $.fx.step[a.prop](a) : a.elem.style && (a.elem.style[$.cssProps[a.prop]] != null || $.cssHooks[a.prop]) ? $.style(a.elem, a.prop, a.now + a.unit) : a.elem[a.prop] = a.now; } } }, K.propHooks.scrollTop = K.propHooks.scrollLeft = { set: function (a) { a.elem.nodeType && a.elem.parentNode && (a.elem[a.prop] = a.now); } }, $.each(['toggle', 'show', 'hide'], (a, b) => { const c = $.fn[b]; $.fn[b] = function (d, e, f) { return d == null || typeof d === 'boolean' || !a && $.isFunction(d) && $.isFunction(e) ? c.apply(this, arguments) : this.animate(L(b, !0), d, e, f); }; }), $.fn.extend({ + fadeTo: function (a, b, c, d) { + return this.filter(r).css('opacity', 0).show().end() + .animate({ opacity: b }, a, c, d); + }, + animate: function (a, b, c, d) { const e = $.isEmptyObject(a); const f = $.speed(b, c, d); const g = function () { const b = H(this, $.extend({}, a), f); e && b.stop(!0); }; return e || f.queue === !1 ? this.each(g) : this.queue(f.queue, g); }, + stop: function (a, c, d) { const e = function (a) { const b = a.stop; delete a.stop, b(d); }; return typeof a !== 'string' && (d = c, c = a, a = b), c && a !== !1 && this.queue(a || 'fx', []), this.each(function () { let b = !0; let c = a != null && `${a}queueHooks`; const f = $.timers; const g = $._data(this); if (c)g[c] && g[c].stop && e(g[c]); else for (c in g)g[c] && g[c].stop && Zc.test(c) && e(g[c]); for (c = f.length; c--;)f[c].elem === this && (a == null || f[c].queue === a) && (f[c].anim.stop(d), b = !1, f.splice(c, 1)); (b || !d) && $.dequeue(this, a); }); }, + }), $.each({ slideDown: L('show'), slideUp: L('hide'), slideToggle: L('toggle'), fadeIn: { opacity: 'show' }, fadeOut: { opacity: 'hide' }, fadeToggle: { opacity: 'toggle' } }, (a, b) => { $.fn[a] = function (a, c, d) { return this.animate(b, a, c, d); }; }), $.speed = function (a, b, c) { const d = a && typeof a === 'object' ? $.extend({}, a) : { complete: c || !c && b || $.isFunction(a) && a, duration: a, easing: c && b || b && !$.isFunction(b) && b }; return d.duration = $.fx.off ? 0 : typeof d.duration === 'number' ? d.duration : d.duration in $.fx.speeds ? $.fx.speeds[d.duration] : $.fx.speeds._default, (d.queue == null || d.queue === !0) && (d.queue = 'fx'), d.old = d.complete, d.complete = function () { $.isFunction(d.old) && d.old.call(this), d.queue && $.dequeue(this, d.queue); }, d; }, $.easing = { linear: function (a) { return a; }, swing: function (a) { return 0.5 - Math.cos(a * Math.PI) / 2; } }, $.timers = [], $.fx = K.prototype.init, $.fx.tick = function () { let a; const c = $.timers; let d = 0; for (Vc = $.now(); d < c.length; d++)a = c[d], !a() && c[d] === a && c.splice(d--, 1); c.length || $.fx.stop(), Vc = b; }, $.fx.timer = function (a) { a() && $.timers.push(a) && !Wc && (Wc = setInterval($.fx.tick, $.fx.interval)); }, $.fx.interval = 13, $.fx.stop = function () { clearInterval(Wc), Wc = null; }, $.fx.speeds = { slow: 600, fast: 200, _default: 400 }, $.fx.step = {}, $.expr && $.expr.filters && ($.expr.filters.animated = function (a) { return $.grep($.timers, b => a === b.elem).length; }); const ad = /^(?:body|html)$/i; $.fn.offset = function (a) { if (arguments.length) return a === b ? this : this.each(function (b) { $.offset.setOffset(this, a, b); }); let c; let d; let e; let f; let g; let h; let i; let j = { top: 0, left: 0 }; const k = this[0]; const l = k && k.ownerDocument; if (l) return (d = l.body) === k ? $.offset.bodyOffset(k) : (c = l.documentElement, $.contains(c, k) ? (typeof k.getBoundingClientRect !== 'undefined' && (j = k.getBoundingClientRect()), e = M(l), f = c.clientTop || d.clientTop || 0, g = c.clientLeft || d.clientLeft || 0, h = e.pageYOffset || c.scrollTop, i = e.pageXOffset || c.scrollLeft, { top: j.top + h - f, left: j.left + i - g }) : j); }, $.offset = { bodyOffset: function (a) { let b = a.offsetTop; let c = a.offsetLeft; return $.support.doesNotIncludeMarginInBodyOffset && (b += parseFloat($.css(a, 'marginTop')) || 0, c += parseFloat($.css(a, 'marginLeft')) || 0), { top: b, left: c }; }, setOffset: function (a, b, c) { const d = $.css(a, 'position'); d === 'static' && (a.style.position = 'relative'); let e; let f; const g = $(a); const h = g.offset(); const i = $.css(a, 'top'); const j = $.css(a, 'left'); const k = (d === 'absolute' || d === 'fixed') && $.inArray('auto', [i, j]) > -1; const l = {}; let m = {}; k ? (m = g.position(), e = m.top, f = m.left) : (e = parseFloat(i) || 0, f = parseFloat(j) || 0), $.isFunction(b) && (b = b.call(a, c, h)), b.top != null && (l.top = b.top - h.top + e), b.left != null && (l.left = b.left - h.left + f), 'using' in b ? b.using.call(a, l) : g.css(l); } }, $.fn.extend({ position: function () { if (this[0]) { const a = this[0]; const b = this.offsetParent(); const c = this.offset(); const d = ad.test(b[0].nodeName) ? { top: 0, left: 0 } : b.offset(); return c.top -= parseFloat($.css(a, 'marginTop')) || 0, c.left -= parseFloat($.css(a, 'marginLeft')) || 0, d.top += parseFloat($.css(b[0], 'borderTopWidth')) || 0, d.left += parseFloat($.css(b[0], 'borderLeftWidth')) || 0, { top: c.top - d.top, left: c.left - d.left }; } }, offsetParent: function () { return this.map(function () { for (var a = this.offsetParent || P.body; a && !ad.test(a.nodeName) && $.css(a, 'position') === 'static';)a = a.offsetParent; return a || P.body; }); } }), $.each({ scrollLeft: 'pageXOffset', scrollTop: 'pageYOffset' }, (a, c) => { const d = /Y/.test(c); $.fn[a] = function (e) { return $.access(this, (a, e, f) => { const g = M(a); return f === b ? g ? c in g ? g[c] : g.document.documentElement[e] : a[e] : (g ? g.scrollTo(d ? $(g).scrollLeft() : f, d ? f : $(g).scrollTop()) : a[e] = f, void 0); }, a, e, arguments.length, null); }; }), $.each({ Height: 'height', Width: 'width' }, (a, c) => { $.each({ padding: `inner${a}`, content: c, '': `outer${a}` }, (d, e) => { $.fn[e] = function (e, f) { const g = arguments.length && (d || typeof e !== 'boolean'); const h = d || (e === !0 || f === !0 ? 'margin' : 'border'); return $.access(this, (c, d, e) => { let f; return $.isWindow(c) ? c.document.documentElement[`client${a}`] : c.nodeType === 9 ? (f = c.documentElement, Math.max(c.body[`scroll${a}`], f[`scroll${a}`], c.body[`offset${a}`], f[`offset${a}`], f[`client${a}`])) : e === b ? $.css(c, d, e, h) : $.style(c, d, e, h); }, c, g ? e : b, g, null); }; }); }), a.jQuery = a.$ = $, typeof define === 'function' && define.amd && define.amd.jQuery && define('jquery', [], () => $); +}(window)), (function (a, b) { + function c(a) { return a && typeof a === 'object' && a.__wrapped__ ? a : this instanceof c ? (this.__wrapped__ = a, void 0) : new c(a); } function d(a, b, c) { b || (b = 0); const d = a.length; const e = d - b >= (c || db); if (e) for (var f = {}, c = b - 1; ++c < d;) { const g = `${a[c]}`; (xb.call(f, g) ? f[g] : f[g] = []).push(a[c]); } return function (c) { if (e) { const d = `${c}`; return xb.call(f, d) && P(f[d], c) > -1; } return P(a, c, b) > -1; }; } function e(a) { return a.charCodeAt(0); } function f(a, b) { const c = a.b; const d = b.b; var { a } = a; var b = b.a; if (a !== b) { if (a > b || typeof a === 'undefined') return 1; if (b > a || typeof b === 'undefined') return -1; } return d > c ? -1 : 1; } function g(a, b, c) { function d() { let h = arguments; let i = f ? this : b; return e || (a = b[g]), c.length && (h = h.length ? c.concat(n(h)) : c), this instanceof d ? (m.prototype = a.prototype, i = new m(), m.prototype = null, h = a.apply(i, h), x(h) ? h : i) : a.apply(i, h); } var e = w(a); var f = !c; var g = b; return f && (c = b), e || (b = a), d; } function h(a, b, c) { return a ? typeof a !== 'function' ? function (b) { return b[a]; } : typeof b !== 'undefined' ? c ? function (c, d, e, f) { return a.call(b, c, d, e, f); } : function (c, d, e) { return a.call(b, c, d, e); } : a : U; } function i() { for (var a, b = { b: '', c: '', e: Z, f: Ub, g: '', h: Wb, i: Zb, j: sb, k: '', l: !0 }, c = 0; a = arguments[c]; c++) for (var d in a)b[d] = a[d]; if (a = b.a, b.d = /^[^,]+/.exec(a)[0], c = Function, d = `var i,l=${b.d},t=${b.d};if(!${b.d})return t;${b.k};`, b.b ? (d += "var m=l.length;i=-1;if(typeof m=='number'){", b.i && (d += "if(k(l)){l=l.split('')}"), d += `while(++i (b = !xb.call(d, c), !1)), !1 === b) : (jc(a, (a, c) => { b = c; }), !1 === b || xb.call(a, b)) : b; } function r(a) { const b = []; return kc(a, (a, c) => { b.push(c); }), b; } function s(a, b, c, d, e) { if (a == null) return a; if (c && (b = !1), c = x(a)) { var f = Ab.call(a); if (!ac[f] || $b && l(a)) return a; var g = oc(a); } if (!c || !b) return c ? g ? n(a) : ic({}, a) : a; switch (c = bc[f], f) { case Lb: case Mb: return new c(+a); case Nb: case Qb: return new c(a); case Pb: return c(a.source, kb.exec(a)); } for (d || (d = []), e || (e = []), f = d.length; f--;) if (d[f] == a) return e[f]; const h = g ? c(a.length) : {}; return d.push(a), e.push(h), (g ? G : kc)(a, (a, c) => { h[c] = s(a, b, null, d, e); }), g && (xb.call(a, 'index') && (h.index = a.index), xb.call(a, 'input') && (h.input = a.input)), h; } function t(a) { const b = []; return jc(a, (a, c) => { w(a) && b.push(c); }), b.sort(); } function u(a) { const b = {}; return kc(a, (a, c) => { b[a] = c; }), b; } function v(a, b, c, d) { + if (a === b) return a !== 0 || 1 / a == 1 / b; if (a == null || b == null) return a === b; var e = Ab.call(a); let f = Ab.call(b); if (e == Jb && (e = Ob), f == Jb && (f = Ob), e != f) return !1; switch (e) { case Lb: case Mb: return +a == +b; case Nb: return a != +a ? b != +b : a == 0 ? 1 / a == 1 / b : a == +b; case Pb: case Qb: return a == `${b}`; } if (f = e == Kb, !f) { + if (a.__wrapped__ || b.__wrapped__) return v(a.__wrapped__ || a, b.__wrapped__ || b); if (e != Ob || $b && (l(a) || l(b))) return !1; var e = !Xb && p(a) ? Object : a.constructor; const g = !Xb && p(b) ? Object : b.constructor; if (!(e == g || w(e) && e instanceof e && w(g) && g instanceof g)) return !1; + } for (c || (c = []), d || (d = []), e = c.length; e--;) if (c[e] == a) return d[e] == b; let h = !0; let i = 0; if (c.push(a), d.push(b), f) { if (i = a.length, h = i == b.length) for (;i-- && (h = v(a[i], b[i], c, d)););return h; } return jc(a, (a, e, f) => (xb.call(f, e) ? (i++, h = xb.call(b, e) && v(a, b[e], c, d)) : void 0)), h && jc(b, (a, b, c) => (xb.call(c, b) ? h = --i > -1 : void 0)), h; + } function w(a) { return typeof a === 'function'; } function x(a) { return a ? cc[typeof a] : !1; } function y(a) { return typeof a === 'number' || Ab.call(a) == Nb; } function z(a) { return typeof a === 'string' || Ab.call(a) == Qb; } function A(a, b, c) { const d = arguments; let e = 0; let f = 2; let g = d[3]; let h = d[4]; for (c !== cb && (g = [], h = [], typeof c !== 'number' && (f = d.length)); ++e < f;)kc(d[e], (b, c) => { let d; let e; let f; if (b && ((e = oc(b)) || pc(b))) { for (var i = g.length; i-- && !(d = g[i] == b););d ? a[c] = h[i] : (g.push(b), h.push((f = a[c], f = e ? oc(f) ? f : [] : pc(f) ? f : {})), a[c] = A(f, b, cb, g, h)); } else b != null && (a[c] = b); }); return a; } function B(a) { const b = []; return kc(a, (a) => { b.push(a); }), b; } function C(a, b, c) { let d = -1; const e = a ? a.length : 0; let f = !1; var c = (c < 0 ? Gb(0, e + c) : c) || 0; return typeof e === 'number' ? f = (z(a) ? a.indexOf(b, c) : P(a, b, c)) > -1 : hc(a, a => (++d >= c ? !(f = a === b) : void 0)), f; } function D(a, b, c) { let d = !0; var b = h(b, c); if (oc(a)) for (var c = -1, e = a.length; ++c < e && (d = !!b(a[c], c, a)););else hc(a, (a, c, e) => d = !!b(a, c, e)); return d; } function E(a, b, c) { const d = []; var b = h(b, c); if (oc(a)) for (var c = -1, e = a.length; ++c < e;) { const f = a[c]; b(f, c, a) && d.push(f); } else hc(a, (a, c, e) => { b(a, c, e) && d.push(a); }); return d; } function F(a, b, c) { let d; var b = h(b, c); return G(a, (a, c, e) => (b(a, c, e) ? (d = a, !1) : void 0)), d; } function G(a, b, c) { if (b && typeof c === 'undefined' && oc(a)) for (var c = -1, d = a.length; ++c < d && !1 !== b(a[c], c, a););else hc(a, b, c); return a; } function H(a, b, c) { let d = -1; const e = a ? a.length : 0; const f = Array(typeof e === 'number' ? e : 0); var b = h(b, c); if (oc(a)) for (;++d < e;)f[d] = b(a[d], d, a); else hc(a, (a, c, e) => { f[++d] = b(a, c, e); }); return f; } function I(a, b, c) { let d = -1 / 0; let f = -1; const g = a ? a.length : 0; let i = d; if (b || !oc(a))b = !b && z(a) ? e : h(b, c), hc(a, (a, c, e) => { c = b(a, c, e), c > d && (d = c, i = a); }); else for (;++f < g;)a[f] > i && (i = a[f]); return i; } function J(a, b) { return H(a, `${b}`); } function K(a, b, c, d) { let e = arguments.length < 3; var b = h(b, d, cb); if (oc(a)) { let f = -1; const g = a.length; for (e && (c = a[++f]); ++f < g;)c = b(c, a[f], f, a); } else hc(a, (a, d, f) => { c = e ? (e = !1, a) : b(c, a, d, f); }); return c; } function L(a, b, c, d) { + let e = a; var f = a ? a.length : 0; let g = arguments.length < 3; if (typeof f !== 'number') { + var i = qc(a); + var f = i.length; + } else Zb && z(a) && (e = a.split('')); return b = h(b, d, cb), G(a, (a, d, h) => { d = i ? i[--f] : --f, c = g ? (g = !1, e[d]) : b(c, e[d], d, h); }), c; + } function M(a, b, c) { let d; var b = h(b, c); if (oc(a)) for (var c = -1, e = a.length; ++c < e && !(d = b(a[c], c, a)););else hc(a, (a, c, e) => !(d = b(a, c, e))); return !!d; } function N(a, b, c) { if (a) { const d = a.length; return b == null || c ? a[0] : n(a, 0, Hb(Gb(0, b), d)); } } function O(a, b) { for (var c = -1, d = a ? a.length : 0, e = []; ++c < d;) { const f = a[c]; oc(f) ? yb.apply(e, b ? f : O(f)) : e.push(f); } return e; } function P(a, b, c) { let d = -1; const e = a ? a.length : 0; if (typeof c === 'number')d = (c < 0 ? Gb(0, e + c) : c || 0) - 1; else if (c) return d = R(a, b), a[d] === b ? d : -1; for (;++d < e;) if (a[d] === b) return d; return -1; } function Q(a, b, c) { return n(a, b == null || c ? 1 : Gb(0, b)); } function R(a, b, c, d) { for (var e = 0, f = a ? a.length : e, c = c ? h(c, d) : U, b = c(b); f > e;)d = e + f >>> 1, c(a[d]) < b ? e = d + 1 : f = d; return e; } function S(a, b, c, d) { + let e = -1; const f = a ? a.length : 0; const g = []; let i = g; typeof b === 'function' && (d = c, c = b, b = !1); const j = !b && f >= 75; if (j) var k = {}; for (c && (i = [], c = h(c, d)); ++e < f;) { + var d = a[e]; const l = c ? c(d, e, a) : d; if (j) { + var m = `${l}`; + var m = xb.call(k, m) ? !(i = k[m]) : i = k[m] = []; + } (b ? !e || i[i.length - 1] !== l : m || P(i, l) < 0) && ((c || j) && i.push(l), g.push(d)); + } return g; + } function T(a, b) { return Tb || Bb && arguments.length > 2 ? Bb.call.apply(Bb, arguments) : g(a, b, n(arguments, 2)); } function U(a) { return a; } function V(a) { G(t(a), (b) => { const d = c[b] = a[b]; c.prototype[b] = function () { let a = [this.__wrapped__]; return yb.apply(a, arguments), a = d.apply(c, a), new c(a); }; }); } function W() { return this.__wrapped__; } const X = typeof exports === 'object' && exports; const Y = typeof global === 'object' && global; Y.global === Y && (a = Y); let Z; let $; const _ = []; const ab = new function () {}(); let bb = 0; var cb = ab; var db = 30; const eb = a._; const fb = /[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/; const gb = /&(?:amp|lt|gt|quot|#x27);/g; const hb = /\b__p\+='';/g; const ib = /\b(__p\+=)''\+/g; const jb = /(__e\(.*?\)|\b__t\))\+'';/g; var kb = /\w*$/; const lb = /(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g; const mb = RegExp(`^${(`${ab.valueOf}`).replace(/[.*+?^=!:${}()|[\]\/\\]/g, '\\$&').replace(/valueOf|for [^\]]+/g, '.+?')}$`); const nb = /\$\{((?:(?=\\?)\\?[\s\S])*?)}/g; const ob = /<%=([\s\S]+?)%>/g; const pb = /($^)/; const qb = /[&<>"']/g; const rb = /['\n\r\t\u2028\u2029\\]/g; var sb = 'constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf'.split(' '); const tb = Math.ceil; const ub = _.concat; const vb = Math.floor; var wb = mb.test(wb = Object.getPrototypeOf) && wb; var xb = ab.hasOwnProperty; var yb = _.push; var zb = ab.propertyIsEnumerable; var Ab = ab.toString; var Bb = mb.test(Bb = n.bind) && Bb; var Cb = mb.test(Cb = Array.isArray) && Cb; const Db = a.isFinite; const Eb = a.isNaN; var Fb = mb.test(Fb = Object.keys) && Fb; var Gb = Math.max; var Hb = Math.min; const Ib = Math.random; var Jb = '[object Arguments]'; var Kb = '[object Array]'; var Lb = '[object Boolean]'; var Mb = '[object Date]'; var Nb = '[object Number]'; var Ob = '[object Object]'; var Pb = '[object RegExp]'; var Qb = '[object String]'; const Rb = !!a.attachEvent; const Sb = Bb && !/\n|true/.test(Bb + Rb); var Tb = Bb && !Sb; var Ub = Fb && (Rb || Sb); var Vb = (Vb = { 0: 1, length: 1 }, _.splice.call(Vb, 0, 1), Vb[0]); var Wb = !0; !(function () { function a() { this.x = 1; } const b = []; a.prototype = { valueOf: 1, y: 1 }; for (var c in new a())b.push(c); for (c in arguments)Wb = !c; Z = !/valueOf/.test(b), $ = b[0] != 'x'; }(1)); var Xb = arguments.constructor == Object; const Yb = !p(arguments); var Zb = 'x'[0] + Object('x')[0] != 'xx'; try { var $b = Ab.call(document) == Ob; } catch (_b) {} var ac = { '[object Function]': !1 }; ac[Jb] = ac[Kb] = ac[Lb] = ac[Mb] = ac[Nb] = ac[Ob] = ac[Pb] = ac[Qb] = !0; var bc = {}; bc[Kb] = Array, bc[Lb] = Boolean, bc[Mb] = Date, bc[Ob] = Object, bc[Nb] = Number, bc[Pb] = RegExp, bc[Qb] = String; var cc = { boolean: !1, function: !0, object: !0, number: !1, string: !1, undefined: !1 }; var dc = { '\\': '\\', "'": "'", '\n': 'n', '\r': 'r', ' ': 't', '\u2028': 'u2028', '\u2029': 'u2029' }; c.templateSettings = { escape: /<%-([\s\S]+?)%>/g, evaluate: /<%([\s\S]+?)%>/g, interpolate: ob, variable: '' }; const ec = { a: 'o,v,g', k: "for(var a=1,b=typeof g=='number'?2:arguments.length;a': '>', '"': '"', "'": ''' }; var mc = u(lc); const nc = i(ec, { g: `if(t[i]==null)${ec.g}` }); var oc = Cb || function (a) { return Xb && a instanceof Array || Ab.call(a) == Kb; }; w(/x/) && (w = function (a) { return a instanceof Function || Ab.call(a) == '[object Function]'; }); var pc = wb ? function (a) { if (!a || typeof a !== 'object') return !1; const b = a.valueOf; var c = typeof b === 'function' && (c = wb(b)) && wb(c); return c ? a == c || wb(a) == c && !p(a) : q(a); } : q; var qc = Fb ? function (a) { return typeof a === 'function' && zb.call(a, 'prototype') ? r(a) : x(a) ? Fb(a) : []; } : r; c.after = function (a, b) { return a < 1 ? b() : function () { return --a < 1 ? b.apply(this, arguments) : void 0; }; }, c.assign = ic, c.bind = T, c.bindAll = function (a) { for (let b = arguments, c = b.length > 1 ? 0 : (b = t(a), -1), d = b.length; ++c < d;) { const e = b[c]; a[e] = T(a[e], a); } return a; }, c.bindKey = function (a, b) { return g(a, b, n(arguments, 2)); }, c.compact = function (a) { for (var b = -1, c = a ? a.length : 0, d = []; ++b < c;) { const e = a[b]; e && d.push(e); } return d; }, c.compose = function () { const a = arguments; return function () { for (var b = arguments, c = a.length; c--;)b = [a[c].apply(this, b)]; return b[0]; }; }, c.countBy = function (a, b, c) { const d = {}; var b = h(b, c); return G(a, (a, c, e) => { c = b(a, c, e), xb.call(d, c) ? d[c]++ : d[c] = 1; }), d; }, c.debounce = function (a, b, c) { function d() { h = null, c || (f = a.apply(g, e)); } let e; let f; let g; let h; return function () { const i = c && !h; return e = arguments, g = this, clearTimeout(h), h = setTimeout(d, b), i && (f = a.apply(g, e)), f; }; }, c.defaults = nc, c.defer = function (a) { const c = n(arguments, 1); return setTimeout(() => { a.apply(b, c); }, 1); }, c.delay = function (a, c) { const d = n(arguments, 2); return setTimeout(() => { a.apply(b, d); }, c); }, c.difference = function (a) { for (var b = -1, c = a ? a.length : 0, e = ub.apply(_, arguments), e = d(e, c), f = []; ++b < c;) { const g = a[b]; e(g) || f.push(g); } return f; }, c.filter = E, c.flatten = O, c.forEach = G, c.forIn = jc, c.forOwn = kc, c.functions = t, c.groupBy = function (a, b, c) { const d = {}; var b = h(b, c); return G(a, (a, c, e) => { c = b(a, c, e), (xb.call(d, c) ? d[c] : d[c] = []).push(a); }), d; }, c.initial = function (a, b, c) { if (!a) return []; const d = a.length; return n(a, 0, Hb(Gb(0, d - (b == null || c ? 1 : b || 0)), d)); }, c.intersection = function (a) { + const b = arguments; const c = b.length; const e = { 0: {} }; let f = -1; const g = a ? a.length : 0; const h = g >= 100; const i = []; let j = i; a:for (;++f < g;) { + const k = a[f]; if (h) { + var l = `${k}`; + var l = xb.call(e[0], l) ? !(j = e[0][l]) : j = e[0][l] = []; + } if (l || P(j, k) < 0) { h && j.push(k); for (let m = c; --m;) if (!(e[m] || (e[m] = d(b[m], 0, 100)))(k)) continue a; i.push(k); } + } return i; + }, c.invert = u, c.invoke = function (a, b) { const c = n(arguments, 2); const d = typeof b === 'function'; const e = []; return G(a, (a) => { e.push((d ? b : a[b]).apply(a, c)); }), e; }, c.keys = qc, c.map = H, c.max = I, c.memoize = function (a, b) { const c = {}; return function () { const d = b ? b.apply(this, arguments) : arguments[0]; return xb.call(c, d) ? c[d] : c[d] = a.apply(this, arguments); }; }, c.merge = A, c.min = function (a, b, c) { let d = 1 / 0; let f = -1; const g = a ? a.length : 0; let i = d; if (b || !oc(a))b = !b && z(a) ? e : h(b, c), hc(a, (a, c, e) => { c = b(a, c, e), d > c && (d = c, i = a); }); else for (;++f < g;)a[f] < i && (i = a[f]); return i; }, c.object = function (a, b) { for (var c = -1, d = a ? a.length : 0, e = {}; ++c < d;) { const f = a[c]; b ? e[f] = b[c] : e[f[0]] = f[1]; } return e; }, c.omit = function (a, b, c) { const d = typeof b === 'function'; const e = {}; if (d)b = h(b, c); else var f = ub.apply(_, arguments); return jc(a, (a, c, g) => { (d ? !b(a, c, g) : P(f, c, 1) < 0) && (e[c] = a); }), e; }, c.once = function (a) { let b; let c = !1; return function () { return c ? b : (c = !0, b = a.apply(this, arguments), a = null, b); }; }, c.pairs = function (a) { const b = []; return kc(a, (a, c) => { b.push([c, a]); }), b; }, c.partial = function (a) { return g(a, n(arguments, 1)); }, c.pick = function (a, b, c) { const d = {}; if (typeof b !== 'function') for (let e = 0, f = ub.apply(_, arguments), g = f.length; ++e < g;) { const i = f[e]; i in a && (d[i] = a[i]); } else b = h(b, c), jc(a, (a, c, e) => { b(a, c, e) && (d[c] = a); }); return d; }, c.pluck = J, c.range = function (a, b, c) { a = +a || 0, c = +c || 1, b == null && (b = a, a = 0); for (var d = -1, b = Gb(0, tb((b - a) / c)), e = Array(b); ++d < b;)e[d] = a, a += c; return e; }, c.reject = function (a, b, c) { return b = h(b, c), E(a, (a, c, d) => !b(a, c, d)); }, c.rest = Q, c.shuffle = function (a) { let b = -1; const c = Array(a ? a.length : 0); return G(a, (a) => { const d = vb(Ib() * (++b + 1)); c[b] = c[d], c[d] = a; }), c; }, c.sortBy = function (a, b, c) { const d = []; var b = h(b, c); for (G(a, (a, c, e) => { d.push({ a: b(a, c, e), b: c, c: a }); }), a = d.length, d.sort(f); a--;)d[a] = d[a].c; return d; }, c.tap = function (a, b) { return b(a), a; }, c.throttle = function (a, b) { + function c() { h = new Date(), g = null, e = a.apply(f, d); } let d; let e; let f; let g; var h = 0; return function () { + const i = new Date(); const + j = b - (i - h); return d = arguments, f = this, j <= 0 ? (clearTimeout(g), g = null, h = i, e = a.apply(f, d)) : g || (g = setTimeout(c, j)), e; + }; + }, c.times = function (a, b, c) { for (var a = +a || 0, d = -1, e = Array(a); ++d < a;)e[d] = b.call(c, d); return e; }, c.toArray = function (a) { return typeof (a ? a.length : 0) === 'number' ? Zb && z(a) ? a.split('') : n(a) : B(a); }, c.union = function () { return S(ub.apply(_, arguments)); }, c.uniq = S, c.values = B, c.where = function (a, b) { const c = qc(b); return E(a, (a) => { for (let d = c.length; d--;) { var e = a[c[d]] === b[c[d]]; if (!e) break; } return !!e; }); }, c.without = function (a) { for (var b = -1, c = a ? a.length : 0, e = d(arguments, 1, 20), f = []; ++b < c;) { const g = a[b]; e(g) || f.push(g); } return f; }, c.wrap = function (a, b) { return function () { const c = [a]; return yb.apply(c, arguments), b.apply(this, c); }; }, c.zip = function (a) { for (var b = -1, c = a ? I(J(arguments, 'length')) : 0, d = Array(c); ++b < c;)d[b] = J(arguments, b); return d; }, c.collect = H, c.drop = Q, c.each = G, c.extend = ic, c.methods = t, c.select = E, c.tail = Q, c.unique = S, V(c), c.clone = s, c.cloneDeep = function (a) { return s(a, !0); }, c.contains = C, c.escape = function (a) { return a == null ? '' : (`${a}`).replace(qb, k); }, c.every = D, c.find = F, c.has = function (a, b) { return a ? xb.call(a, b) : !1; }, c.identity = U, c.indexOf = P, c.isArguments = p, c.isArray = oc, c.isBoolean = function (a) { return !0 === a || !1 === a || Ab.call(a) == Lb; }, c.isDate = function (a) { return a instanceof Date || Ab.call(a) == Mb; }, c.isElement = function (a) { return a ? a.nodeType === 1 : !1; }, c.isEmpty = function (a) { let b = !0; if (!a) return b; const c = Ab.call(a); const d = a.length; return c == Kb || c == Qb || c == Jb || Yb && p(a) || c == Ob && typeof d === 'number' && w(a.splice) ? !d : (kc(a, () => b = !1), b); }, c.isEqual = v, c.isFinite = function (a) { return Db(a) && !Eb(parseFloat(a)); }, c.isFunction = w, c.isNaN = function (a) { return y(a) && a != +a; }, c.isNull = function (a) { return a === null; }, c.isNumber = y, c.isObject = x, c.isPlainObject = pc, c.isRegExp = function (a) { return a instanceof RegExp || Ab.call(a) == Pb; }, c.isString = z, c.isUndefined = function (a) { return typeof a === 'undefined'; }, c.lastIndexOf = function (a, b, c) { let d = a ? a.length : 0; for (typeof c === 'number' && (d = (c < 0 ? Gb(0, d + c) : Hb(c, d - 1)) + 1); d--;) if (a[d] === b) return d; return -1; }, c.mixin = V, c.noConflict = function () { return a._ = eb, this; }, c.random = function (a, b) { return a == null && b == null && (b = 1), a = +a || 0, b == null && (b = a, a = 0), a + vb(Ib() * ((+b || 0) - a + 1)); }, c.reduce = K, c.reduceRight = L, c.result = function (a, b) { const c = a ? a[b] : null; return w(c) ? a[b]() : c; }, c.size = function (a) { const b = a ? a.length : 0; return typeof b === 'number' ? b : qc(a).length; }, c.some = M, c.sortedIndex = R, c.template = function (a, b, d) { a || (a = ''), d || (d = {}); let e; let f; const g = c.templateSettings; let h = 0; const i = d.interpolate || g.interpolate || pb; let k = "__p+='"; let l = d.variable || g.variable; const m = l; a.replace(RegExp(`${(d.escape || g.escape || pb).source}|${i.source}|${(i === ob ? nb : pb).source}|${(d.evaluate || g.evaluate || pb).source}|$`, 'g'), (b, c, d, f, g, i) => (d || (d = f), k += a.slice(h, i).replace(rb, j), c && (k += `'+__e(${c})+'`), g && (k += `';${g};__p+='`), d && (k += `'+((__t=(${d}))==null?'':__t)+'`), e || (e = g || fb.test(c || d)), h = i + b.length, b)), k += "';\n", m || (l = 'obj', e ? k = `with(${l}){${k}}` : (d = RegExp(`(\\(\\s*)${l}\\.${l}\\b`, 'g'), k = k.replace(lb, `$&${l}.`).replace(d, '$1__d'))), k = (e ? k.replace(hb, '') : k).replace(ib, '$1').replace(jb, '$1;'), k = `function(${l}){${m ? '' : `${l}||(${l}={});`}var __t,__p='',__e=_.escape${e ? ",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}" : `${m ? '' : `,__d=${l}.${l}||${l}`};`}${k}return __p}`; try { f = Function('_', `return ${k}`)(c); } catch (n) { throw n.source = k, n; } return b ? f(b) : (f.source = k, f); }, c.unescape = function (a) { return a == null ? '' : (`${a}`).replace(gb, o); }, c.uniqueId = function (a) { return (a == null ? '' : `${a}`) + ++bb; }, c.all = D, c.any = M, c.detect = F, c.foldl = K, c.foldr = L, c.include = C, c.inject = K, kc(c, (a, b) => { c.prototype[b] || (c.prototype[b] = function () { const b = [this.__wrapped__]; return yb.apply(b, arguments), a.apply(c, b); }); }), c.first = N, c.last = function (a, b, c) { if (a) { const d = a.length; return b == null || c ? a[d - 1] : n(a, Gb(0, d - b)); } }, c.take = N, c.head = N, kc(c, (a, b) => { c.prototype[b] || (c.prototype[b] = function (b, d) { const e = a(this.__wrapped__, b, d); return b == null || d ? e : new c(e); }); }), c.VERSION = '1.0.0-rc.3', c.prototype.toString = function () { return `${this.__wrapped__}`; }, c.prototype.value = W, c.prototype.valueOf = W, hc(['join', 'pop', 'shift'], (a) => { const b = _[a]; c.prototype[a] = function () { return b.apply(this.__wrapped__, arguments); }; }), hc(['push', 'reverse', 'sort', 'unshift'], (a) => { const b = _[a]; c.prototype[a] = function () { return b.apply(this.__wrapped__, arguments), this; }; }), hc(['concat', 'slice', 'splice'], (a) => { const b = _[a]; c.prototype[a] = function () { const a = b.apply(this.__wrapped__, arguments); return new c(a); }; }), Vb && hc(['pop', 'shift', 'splice'], (a) => { const b = _[a]; const d = a == 'splice'; c.prototype[a] = function () { const a = this.__wrapped__; const e = b.apply(a, arguments); return a.length === 0 && delete a[0], d ? new c(e) : e; }; }), typeof define === 'function' && typeof define.amd === 'object' && define.amd ? (a._ = c, define(() => c)) : X ? typeof module === 'object' && module && module.exports == X ? (module.exports = c)._ = c : X._ = c : a._ = c; +}(this)), (function (a) { let b; let c; const d = '0.3.4'; const e = 'hasOwnProperty'; const f = /[\.\/]/; const g = '*'; const h = function () {}; const i = function (a, b) { return a - b; }; const j = { n: {} }; const k = function (a, d) { let e; const f = c; const g = Array.prototype.slice.call(arguments, 2); const h = k.listeners(a); let j = 0; const l = []; const m = {}; const n = []; const o = b; b = a, c = 0; for (var p = 0, q = h.length; q > p; p++)'zIndex' in h[p] && (l.push(h[p].zIndex), h[p].zIndex < 0 && (m[h[p].zIndex] = h[p])); for (l.sort(i); l[j] < 0;) if (e = m[l[j++]], n.push(e.apply(d, g)), c) return c = f, n; for (p = 0; q > p; p++) if (e = h[p], 'zIndex' in e) if (e.zIndex == l[j]) { if (n.push(e.apply(d, g)), c) break; do if (j++, e = m[l[j]], e && n.push(e.apply(d, g)), c) break; while (e); } else m[e.zIndex] = e; else if (n.push(e.apply(d, g)), c) break; return c = f, b = o, n.length ? n : null; }; k.listeners = function (a) { let b; let c; let d; let e; let h; let i; let k; let l; const m = a.split(f); let n = j; let o = [n]; let p = []; for (e = 0, h = m.length; h > e; e++) { for (l = [], i = 0, k = o.length; k > i; i++) for (n = o[i].n, c = [n[m[e]], n[g]], d = 2; d--;)b = c[d], b && (l.push(b), p = p.concat(b.f || [])); o = l; } return p; }, k.on = function (a, b) { for (var c = a.split(f), d = j, e = 0, g = c.length; g > e; e++)d = d.n, !d[c[e]] && (d[c[e]] = { n: {} }), d = d[c[e]]; for (d.f = d.f || [], e = 0, g = d.f.length; g > e; e++) if (d.f[e] == b) return h; return d.f.push(b), function (a) { +a == +a && (b.zIndex = +a); }; }, k.stop = function () { c = 1; }, k.nt = function (a) { return a ? new RegExp(`(?:\\.|\\/|^)${a}(?:\\.|\\/|$)`).test(b) : b; }, k.off = k.unbind = function (a, b) { let c; let d; let h; let i; let k; let l; let m; const n = a.split(f); const o = [j]; for (i = 0, k = n.length; k > i; i++) for (l = 0; l < o.length; l += h.length - 2) { if (h = [l, 1], c = o[l].n, n[i] != g)c[n[i]] && h.push(c[n[i]]); else for (d in c)c[e](d) && h.push(c[d]); o.splice.apply(o, h); } for (i = 0, k = o.length; k > i; i++) for (c = o[i]; c.n;) { if (b) { if (c.f) { for (l = 0, m = c.f.length; m > l; l++) if (c.f[l] == b) { c.f.splice(l, 1); break; }!c.f.length && delete c.f; } for (d in c.n) if (c.n[e](d) && c.n[d].f) { const p = c.n[d].f; for (l = 0, m = p.length; m > l; l++) if (p[l] == b) { p.splice(l, 1); break; }!p.length && delete c.n[d].f; } } else { delete c.f; for (d in c.n)c.n[e](d) && c.n[d].f && delete c.n[d].f; }c = c.n; } }, k.once = function (a, b) { const c = function () { const d = b.apply(this, arguments); return k.unbind(a, c), d; }; return k.on(a, c); }, k.version = d, k.toString = function () { return `You are running Eve ${d}`; }, typeof module !== 'undefined' && module.exports ? module.exports = k : typeof define !== 'undefined' ? define('eve', [], () => k) : a.eve = k; }(this)), (function () { + function a(a) { for (let b = 0; b < fc.length; b++)fc[b].el.paper == a && fc.splice(b--, 1); } function b(a, b, c, e, g, h) { + c = Z(c); let i; let j; let k; let l; let m; let n; let o = a.ms; const p = {}; const q = {}; const s = {}; if (e) for (v = 0, w = fc.length; w > v; v++) { var t = fc[v]; if (t.el.id == b.id && t.anim == a) { t.percent != c ? (fc.splice(v, 1), k = 1) : j = t, b.attr(t.totalOrigin); break; } } else e = +q; for (var v = 0, w = a.percents.length; w > v; v++) { if (a.percents[v] == c || a.percents[v] > e * a.top) { c = a.percents[v], m = a.percents[v - 1] || 0, o = o / a.top * (c - m), l = a.percents[v + 1], i = a.anim[c]; break; }e && b.attr(a.anim[a.percents[v]]); } if (i) { + if (j)j.initstatus = e, j.start = new Date() - j.ms * e; else { + for (const y in i) { + if (i[x](y) && (bb[x](y) || b.paper.customAttributes[x](y))) { + switch (p[y] = b.attr(y), p[y] == null && (p[y] = ab[y]), q[y] = i[y], bb[y]) { + case R: s[y] = (q[y] - p[y]) / o; break; case 'colour': p[y] = r.getRGB(p[y]); var z = r.getRGB(q[y]); s[y] = { r: (z.r - p[y].r) / o, g: (z.g - p[y].g) / o, b: (z.b - p[y].b) / o }; break; case 'path': var A = Ib(p[y], q[y]); var B = A[1]; for (p[y] = A[0], s[y] = [], v = 0, w = p[y].length; w > v; v++) { s[y][v] = [0]; for (var D = 1, E = p[y][v].length; E > D; D++)s[y][v][D] = (B[v][D] - p[y][v][D]) / o; } break; case 'transform': var F = b._; var I = Nb(F[y], q[y]); if (I) for (p[y] = I.from, q[y] = I.to, s[y] = [], s[y].real = !0, v = 0, w = p[y].length; w > v; v++) for (s[y][v] = [p[y][v][0]], D = 1, E = p[y][v].length; E > D; D++)s[y][v][D] = (q[y][v][D] - p[y][v][D]) / o; else { + const J = b.matrix || new f(); const + K = { _: { transform: F.transform }, getBBox: function () { return b.getBBox(1); } }; p[y] = [J.a, J.b, J.c, J.d, J.e, J.f], Lb(K, q[y]), q[y] = K._.transform, s[y] = [(K.matrix.a - J.a) / o, (K.matrix.b - J.b) / o, (K.matrix.c - J.c) / o, (K.matrix.d - J.d) / o, (K.matrix.e - J.e) / o, (K.matrix.f - J.f) / o]; + } break; case 'csv': var L = G(i[y])[H](u); var M = G(p[y])[H](u); if (y == 'clip-rect') for (p[y] = M, s[y] = [], v = M.length; v--;)s[y][v] = (L[v] - p[y][v]) / o; q[y] = L; break; default: for (L = [][C](i[y]), M = [][C](p[y]), s[y] = [], v = b.paper.customAttributes[y].length; v--;)s[y][v] = ((L[v] || 0) - (M[v] || 0)) / o; + } + } + } const N = i.easing; let O = r.easing_formulas[N]; if (!O) if (O = G(N).match(X), O && O.length == 5) { const P = O; O = function (a) { return d(a, +P[1], +P[2], +P[3], +P[4], o); }; } else O = lb; if (n = i.start || a.start || +new Date(), t = { anim: a, percent: c, timestamp: n, start: n + (a.del || 0), status: 0, initstatus: e || 0, stop: !1, ms: o, easing: O, from: p, diff: s, to: q, el: b, callback: i.callback, prev: m, next: l, repeat: h || a.times, origin: b.attr(), totalOrigin: g }, fc.push(t), e && !j && !k && (t.stop = !0, t.start = new Date() - o * e, fc.length == 1)) return hc(); k && (t.start = new Date() - t.ms * e), fc.length == 1 && gc(hc); + }eve(`raphael.anim.start.${b.id}`, b, a); + } + } function c(a, b) { const c = []; const d = {}; if (this.ms = b, this.times = 1, a) { for (const e in a)a[x](e) && (d[Z(e)] = a[e], c.push(Z(e))); c.sort(jb); } this.anim = d, this.top = c[c.length - 1], this.percents = c; } function d(a, b, c, d, e, f) { function g(a, b) { let c; let d; let e; let f; let g; let h; for (e = a, h = 0; h < 8; h++) { if (f = i(e) - a, O(f) < b) return e; if (g = (3 * l * e + 2 * k) * e + j, O(g) < 1e-6) break; e -= f / g; } if (c = 0, d = 1, e = a, c > e) return c; if (e > d) return d; for (;d > c;) { if (f = i(e), O(f - a) < b) return e; a > f ? c = e : d = e, e = (d - c) / 2 + c; } return e; } function h(a, b) { const c = g(a, b); return ((o * c + n) * c + m) * c; } function i(a) { return ((l * a + k) * a + j) * a; } var j = 3 * b; var k = 3 * (d - b) - j; var l = 1 - j - k; var m = 3 * c; var n = 3 * (e - c) - m; var o = 1 - m - n; return h(a, 1 / (200 * f)); } function e() { return `${this.x + F + this.y + F + this.width} × ${this.height}`; } function f(a, b, c, d, e, f) { a != null ? (this.a = +a, this.b = +b, this.c = +c, this.d = +d, this.e = +e, this.f = +f) : (this.a = 1, this.b = 0, this.c = 0, this.d = 1, this.e = 0, this.f = 0); } function g(a, b, c) { a = r._path2curve(a), b = r._path2curve(b); for (var d, e, f, g, i, j, k, l, m, n, o = c ? 0 : [], p = 0, q = a.length; q > p; p++) { const s = a[p]; if (s[0] == 'M')d = i = s[1], e = j = s[2]; else { s[0] == 'C' ? (m = [d, e].concat(s.slice(1)), d = m[6], e = m[7]) : (m = [d, e, d, e, i, j, i, j], d = i, e = j); for (let t = 0, u = b.length; u > t; t++) { const v = b[t]; if (v[0] == 'M')f = k = v[1], g = l = v[2]; else { v[0] == 'C' ? (n = [f, g].concat(v.slice(1)), f = n[6], g = n[7]) : (n = [f, g, f, g, k, l, k, l], f = k, g = l); const w = h(m, n, c); if (c)o += w; else { for (let x = 0, y = w.length; y > x; x++)w[x].segment1 = p, w[x].segment2 = t, w[x].bez1 = m, w[x].bez2 = n; o = o.concat(w); } } } } } return o; } function h(a, b, c) { const d = r.bezierBBox(a); const e = r.bezierBBox(b); if (!r.isBBoxIntersect(d, e)) return c ? 0 : []; for (var f = k.apply(0, a), g = k.apply(0, b), h = ~~(f / 5), j = ~~(g / 5), l = [], m = [], n = {}, o = c ? 0 : [], p = 0; h + 1 > p; p++) { var q = r.findDotsAtSegment.apply(r, a.concat(p / h)); l.push({ x: q.x, y: q.y, t: p / h }); } for (p = 0; j + 1 > p; p++)q = r.findDotsAtSegment.apply(r, b.concat(p / j)), m.push({ x: q.x, y: q.y, t: p / j }); for (p = 0; h > p; p++) for (let s = 0; j > s; s++) { const t = l[p]; const u = l[p + 1]; const v = m[s]; const w = m[s + 1]; const x = O(u.x - t.x) < 0.001 ? 'y' : 'x'; const y = O(w.x - v.x) < 0.001 ? 'y' : 'x'; const z = i(t.x, t.y, u.x, u.y, v.x, v.y, w.x, w.y); if (z) { if (n[z.x.toFixed(4)] == z.y.toFixed(4)) continue; n[z.x.toFixed(4)] = z.y.toFixed(4); const A = t.t + O((z[x] - t[x]) / (u[x] - t[x])) * (u.t - t.t); const B = v.t + O((z[y] - v[y]) / (w[y] - v[y])) * (w.t - v.t); A >= 0 && A <= 1 && B >= 0 && B <= 1 && (c ? o++ : o.push({ x: z.x, y: z.y, t1: A, t2: B })); } } return o; } function i(a, b, c, d, e, f, g, h) { if (!(M(a, c) < N(e, g) || N(a, c) > M(e, g) || M(b, d) < N(f, h) || N(b, d) > M(f, h))) { const i = (a * d - b * c) * (e - g) - (a - c) * (e * h - f * g); const j = (a * d - b * c) * (f - h) - (b - d) * (e * h - f * g); const k = (a - c) * (f - h) - (b - d) * (e - g); if (!k) return; const l = i / k; const m = j / k; const n = +l.toFixed(2); const o = +m.toFixed(2); if (n < +N(a, c).toFixed(2) || n > +M(a, c).toFixed(2) || n < +N(e, g).toFixed(2) || n > +M(e, g).toFixed(2) || o < +N(b, d).toFixed(2) || o > +M(b, d).toFixed(2) || o < +N(f, h).toFixed(2) || o > +M(f, h).toFixed(2)) return; return { x: l, y: m }; } } function j(a, b, c, d, e, f, g, h, i) { if (!(i < 0 || k(a, b, c, d, e, f, g, h) < i)) { let j; const l = 1; let m = l / 2; let n = l - m; const o = 0.01; for (j = k(a, b, c, d, e, f, g, h, n); O(j - i) > o;)m /= 2, n += (i > j ? 1 : -1) * m, j = k(a, b, c, d, e, f, g, h, n); return n; } } function k(a, b, c, d, e, f, g, h, i) { i == null && (i = 1), i = i > 1 ? 1 : i < 0 ? 0 : i; for (var j = i / 2, k = 12, m = [-0.1252, 0.1252, -0.3678, 0.3678, -0.5873, 0.5873, -0.7699, 0.7699, -0.9041, 0.9041, -0.9816, 0.9816], n = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472], o = 0, p = 0; k > p; p++) { const q = j * m[p] + j; const r = l(q, a, c, e, g); const s = l(q, b, d, f, h); const t = r * r + s * s; o += n[p] * L.sqrt(t); } return j * o; } function l(a, b, c, d, e) { const f = -3 * b + 9 * c - 9 * d + 3 * e; const g = a * f + 6 * b - 12 * c + 6 * d; return a * g - 3 * b + 3 * c; } function m(a, b) { for (var c = [], d = 0, e = a.length; e - 2 * !b > d; d += 2) { const f = [{ x: +a[d - 2], y: +a[d - 1] }, { x: +a[d], y: +a[d + 1] }, { x: +a[d + 2], y: +a[d + 3] }, { x: +a[d + 4], y: +a[d + 5] }]; b ? d ? e - 4 == d ? f[3] = { x: +a[0], y: +a[1] } : e - 2 == d && (f[2] = { x: +a[0], y: +a[1] }, f[3] = { x: +a[2], y: +a[3] }) : f[0] = { x: +a[e - 2], y: +a[e - 1] } : e - 4 == d ? f[3] = f[2] : d || (f[0] = { x: +a[d], y: +a[d + 1] }), c.push(['C', (-f[0].x + 6 * f[1].x + f[2].x) / 6, (-f[0].y + 6 * f[1].y + f[2].y) / 6, (f[1].x + 6 * f[2].x - f[3].x) / 6, (f[1].y + 6 * f[2].y - f[3].y) / 6, f[2].x, f[2].y]); } return c; } function n() { return this.hex; } function o(a, b, c) { function d() { const e = Array.prototype.slice.call(arguments, 0); const f = e.join('␀'); const g = d.cache = d.cache || {}; const h = d.count = d.count || []; return g[x](f) ? (p(h, f), c ? c(g[f]) : g[f]) : (h.length >= 1e3 && delete g[h.shift()], h.push(f), g[f] = a[B](b, e), c ? c(g[f]) : g[f]); } return d; } function p(a, b) { for (let c = 0, d = a.length; d > c; c++) if (a[c] === b) return a.push(a.splice(c, 1)[0]); } function q(a) { if (Object(a) !== a) return a; const b = new a.constructor(); for (const c in a)a[x](c) && (b[c] = q(a[c])); return b; } function r(a) { if (r.is(a, 'function')) return s ? a() : eve.on('raphael.DOMload', a); if (r.is(a, T)) return r._engine.create[B](r, a.splice(0, 3 + r.is(a[0], R))).add(a); const b = Array.prototype.slice.call(arguments, 0); if (r.is(b[b.length - 1], 'function')) { const c = b.pop(); return s ? c.call(r._engine.create[B](r, b)) : eve.on('raphael.DOMload', () => { c.call(r._engine.create[B](r, b)); }); } return r._engine.create[B](r, arguments); }r.version = '2.1.0', r.eve = eve; let s; let t; var u = /[, ]+/; const v = { circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1 }; const w = /\{(\d+)\}/g; var x = 'hasOwnProperty'; const y = { doc: document, win: window }; const z = { was: Object.prototype[x].call(y.win, 'Raphael'), is: y.win.Raphael }; const A = function () { this.ca = this.customAttributes = {}; }; var B = 'apply'; var C = 'concat'; const D = 'createTouch' in y.doc; const E = ''; var F = ' '; var G = String; var H = 'split'; const I = 'click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel'[H](F); const J = { mousedown: 'touchstart', mousemove: 'touchmove', mouseup: 'touchend' }; const K = G.prototype.toLowerCase; var L = Math; var M = L.max; var N = L.min; var O = L.abs; const P = L.pow; const Q = L.PI; var R = 'number'; const S = 'string'; var T = 'array'; const U = Object.prototype.toString; const V = (r._ISURL = /^url\(['"]?([^\)]+?)['"]?\)$/i, /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i); const W = { NaN: 1, Infinity: 1, '-Infinity': 1 }; var X = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/; const Y = L.round; var Z = parseFloat; const $ = parseInt; const _ = G.prototype.toUpperCase; var ab = r._availableAttrs = { 'arrow-end': 'none', 'arrow-start': 'none', blur: 0, 'clip-rect': '0 0 1e9 1e9', cursor: 'default', cx: 0, cy: 0, fill: '#fff', 'fill-opacity': 1, font: '10px "Arial"', 'font-family': '"Arial"', 'font-size': '10', 'font-style': 'normal', 'font-weight': 400, gradient: 0, height: 0, href: 'http://raphaeljs.com/', 'letter-spacing': 0, opacity: 1, path: 'M0,0', r: 0, rx: 0, ry: 0, src: '', stroke: '#000', 'stroke-dasharray': '', 'stroke-linecap': 'butt', 'stroke-linejoin': 'butt', 'stroke-miterlimit': 0, 'stroke-opacity': 1, 'stroke-width': 1, target: '_blank', 'text-anchor': 'middle', title: 'Raphael', transform: '', width: 0, x: 0, y: 0 }; var bb = r._availableAnimAttrs = { blur: R, 'clip-rect': 'csv', cx: R, cy: R, fill: 'colour', 'fill-opacity': R, 'font-size': R, height: R, opacity: R, path: 'path', r: R, rx: R, ry: R, stroke: 'colour', 'stroke-opacity': R, 'stroke-width': R, transform: 'transform', width: R, x: R, y: R }; const cb = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/; const db = { hs: 1, rg: 1 }; const eb = /,?([achlmqrstvxz]),?/gi; const fb = /([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi; const gb = /([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi; const hb = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi; const ib = (r._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/, {}); var jb = function (a, b) { return Z(a) - Z(b); }; const kb = function () {}; var lb = function (a) { return a; }; const mb = r._rectPath = function (a, b, c, d, e) { return e ? [['M', a + e, b], ['l', c - 2 * e, 0], ['a', e, e, 0, 0, 1, e, e], ['l', 0, d - 2 * e], ['a', e, e, 0, 0, 1, -e, e], ['l', 2 * e - c, 0], ['a', e, e, 0, 0, 1, -e, -e], ['l', 0, 2 * e - d], ['a', e, e, 0, 0, 1, e, -e], ['z']] : [['M', a, b], ['l', c, 0], ['l', 0, d], ['l', -c, 0], ['z']]; }; const nb = function (a, b, c, d) { return d == null && (d = c), [['M', a, b], ['m', 0, -d], ['a', c, d, 0, 1, 1, 0, 2 * d], ['a', c, d, 0, 1, 1, 0, -2 * d], ['z']]; }; const ob = r._getPath = { path: function (a) { return a.attr('path'); }, circle: function (a) { const b = a.attrs; return nb(b.cx, b.cy, b.r); }, ellipse: function (a) { const b = a.attrs; return nb(b.cx, b.cy, b.rx, b.ry); }, rect: function (a) { const b = a.attrs; return mb(b.x, b.y, b.width, b.height, b.r); }, image: function (a) { const b = a.attrs; return mb(b.x, b.y, b.width, b.height); }, text: function (a) { const b = a._getBBox(); return mb(b.x, b.y, b.width, b.height); } }; const pb = r.mapPath = function (a, b) { if (!b) return a; let c; let d; let e; let f; let g; let h; let i; for (a = Ib(a), e = 0, g = a.length; g > e; e++) for (i = a[e], f = 1, h = i.length; h > f; f += 2)c = b.x(i[f], i[f + 1]), d = b.y(i[f], i[f + 1]), i[f] = c, i[f + 1] = d; return a; }; if (r._g = y, r.type = y.win.SVGAngle || y.doc.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1') ? 'SVG' : 'VML', r.type == 'VML') { let qb; let rb = y.doc.createElement('div'); if (rb.innerHTML = '', qb = rb.firstChild, qb.style.behavior = 'url(#default#VML)', !qb || typeof qb.adj !== 'object') return r.type = E; rb = null; }r.svg = !(r.vml = r.type == 'VML'), r._Paper = A, r.fn = t = A.prototype = r.prototype, r._id = 0, r._oid = 0, r.is = function (a, b) { return b = K.call(b), b == 'finite' ? !W[x](+a) : b == 'array' ? a instanceof Array : b == 'null' && a === null || b === typeof a && a !== null || b == 'object' && a === Object(a) || b == 'array' && Array.isArray && Array.isArray(a) || U.call(a).slice(8, -1).toLowerCase() == b; }, r.angle = function (a, b, c, d, e, f) { if (e == null) { const g = a - c; const h = b - d; return g || h ? (180 + 180 * L.atan2(-h, -g) / Q + 360) % 360 : 0; } return r.angle(a, b, e, f) - r.angle(c, d, e, f); }, r.rad = function (a) { return a % 360 * Q / 180; }, r.deg = function (a) { return 180 * a / Q % 360; }, r.snapTo = function (a, b, c) { if (c = r.is(c, 'finite') ? c : 10, r.is(a, T)) { for (let d = a.length; d--;) if (O(a[d] - b) <= c) return a[d]; } else { a = +a; const e = b % a; if (c > e) return b - e; if (e > a - c) return b - e + a; } return b; }; r.createUUID = (function (a, b) { return function () { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(a, b).toUpperCase(); }; }(/[xy]/g, (a) => { const b = 16 * L.random() | 0; const c = a == 'x' ? b : 3 & b | 8; return c.toString(16); })); r.setWindow = function (a) { eve('raphael.setWindow', r, y.win, a), y.win = a, y.doc = y.win.document, r._engine.initWin && r._engine.initWin(y.win); }; let sb = function (a) { if (r.vml) { let b; const c = /^\s+|\s+$/g; try { const d = new ActiveXObject('htmlfile'); d.write(''), d.close(), b = d.body; } catch (e) { b = createPopup().document.body; } const f = b.createTextRange(); sb = o((a) => { try { b.style.color = G(a).replace(c, E); let d = f.queryCommandValue('ForeColor'); return d = (255 & d) << 16 | 65280 & d | (16711680 & d) >>> 16, `#${(`000000${d.toString(16)}`).slice(-6)}`; } catch (e) { return 'none'; } }); } else { const g = y.doc.createElement('i'); g.title = 'Raphaël Colour Picker', g.style.display = 'none', y.doc.body.appendChild(g), sb = o(a => (g.style.color = a, y.doc.defaultView.getComputedStyle(g, E).getPropertyValue('color'))); } return sb(a); }; const tb = function () { return `hsb(${[this.h, this.s, this.b]})`; }; const ub = function () { return `hsl(${[this.h, this.s, this.l]})`; }; const vb = function () { return this.hex; }; const wb = function (a, b, c) { if (b == null && r.is(a, 'object') && 'r' in a && 'g' in a && 'b' in a && (c = a.b, b = a.g, a = a.r), b == null && r.is(a, S)) { const d = r.getRGB(a); a = d.r, b = d.g, c = d.b; } return (a > 1 || b > 1 || c > 1) && (a /= 255, b /= 255, c /= 255), [a, b, c]; }; const xb = function (a, b, c, d) { a *= 255, b *= 255, c *= 255; const e = { r: a, g: b, b: c, hex: r.rgb(a, b, c), toString: vb }; return r.is(d, 'finite') && (e.opacity = d), e; }; r.color = function (a) { + let b; return r.is(a, 'object') && 'h' in a && 's' in a && 'b' in a ? (b = r.hsb2rgb(a), a.r = b.r, a.g = b.g, a.b = b.b, a.hex = b.hex) : r.is(a, 'object') && 'h' in a && 's' in a && 'l' in a ? (b = r.hsl2rgb(a), a.r = b.r, a.g = b.g, a.b = b.b, a.hex = b.hex) : (r.is(a, 'string') && (a = r.getRGB(a)), r.is(a, 'object') && 'r' in a && 'g' in a && 'b' in a ? (b = r.rgb2hsl(a), a.h = b.h, a.s = b.s, a.l = b.l, b = r.rgb2hsb(a), a.v = b.b) : (a = { hex: 'none' }, a.r = a.g = a.b = a.h = a.s = a.v = a.l = -1)), a.toString = vb, a; + }, r.hsb2rgb = function (a, b, c, d) { this.is(a, 'object') && 'h' in a && 's' in a && 'b' in a && (c = a.b, b = a.s, a = a.h, d = a.o), a *= 360; let e; let f; let g; let h; let i; return a = a % 360 / 60, i = c * b, h = i * (1 - O(a % 2 - 1)), e = f = g = c - i, a = ~~a, e += [i, h, 0, 0, h, i][a], f += [h, i, i, h, 0, 0][a], g += [0, 0, h, i, i, h][a], xb(e, f, g, d); }, r.hsl2rgb = function (a, b, c, d) { this.is(a, 'object') && 'h' in a && 's' in a && 'l' in a && (c = a.l, b = a.s, a = a.h), (a > 1 || b > 1 || c > 1) && (a /= 360, b /= 100, c /= 100), a *= 360; let e; let f; let g; let h; let i; return a = a % 360 / 60, i = 2 * b * (c < 0.5 ? c : 1 - c), h = i * (1 - O(a % 2 - 1)), e = f = g = c - i / 2, a = ~~a, e += [i, h, 0, 0, h, i][a], f += [h, i, i, h, 0, 0][a], g += [0, 0, h, i, i, h][a], xb(e, f, g, d); }, r.rgb2hsb = function (a, b, c) { c = wb(a, b, c), a = c[0], b = c[1], c = c[2]; let d; let e; let f; let g; return f = M(a, b, c), g = f - N(a, b, c), d = g == 0 ? null : f == a ? (b - c) / g : f == b ? (c - a) / g + 2 : (a - b) / g + 4, d = (d + 360) % 6 * 60 / 360, e = g == 0 ? 0 : g / f, { h: d, s: e, b: f, toString: tb }; }, r.rgb2hsl = function (a, b, c) { c = wb(a, b, c), a = c[0], b = c[1], c = c[2]; let d; let e; let f; let g; let h; let i; return g = M(a, b, c), h = N(a, b, c), i = g - h, d = i == 0 ? null : g == a ? (b - c) / i : g == b ? (c - a) / i + 2 : (a - b) / i + 4, d = (d + 360) % 6 * 60 / 360, f = (g + h) / 2, e = i == 0 ? 0 : f < 0.5 ? i / (2 * f) : i / (2 - 2 * f), { h: d, s: e, l: f, toString: ub }; }, r._path2string = function () { return this.join(',').replace(eb, '$1'); }; r._preload = function (a, b) { const c = y.doc.createElement('img'); c.style.cssText = 'position:absolute;left:-9999em;top:-9999em', c.onload = function () { b.call(this), this.onload = null, y.doc.body.removeChild(this); }, c.onerror = function () { y.doc.body.removeChild(this); }, y.doc.body.appendChild(c), c.src = a; }; r.getRGB = o((a) => { if (!a || (a = G(a)).indexOf('-') + 1) return { r: -1, g: -1, b: -1, hex: 'none', error: 1, toString: n }; if (a == 'none') return { r: -1, g: -1, b: -1, hex: 'none', toString: n }; !db[x](a.toLowerCase().substring(0, 2)) && a.charAt() != '#' && (a = sb(a)); let b; let c; let d; let e; let f; let g; let h = a.match(V); return h ? (h[2] && (d = $(h[2].substring(5), 16), c = $(h[2].substring(3, 5), 16), b = $(h[2].substring(1, 3), 16)), h[3] && (d = $((f = h[3].charAt(3)) + f, 16), c = $((f = h[3].charAt(2)) + f, 16), b = $((f = h[3].charAt(1)) + f, 16)), h[4] && (g = h[4][H](cb), b = Z(g[0]), g[0].slice(-1) == '%' && (b *= 2.55), c = Z(g[1]), g[1].slice(-1) == '%' && (c *= 2.55), d = Z(g[2]), g[2].slice(-1) == '%' && (d *= 2.55), h[1].toLowerCase().slice(0, 4) == 'rgba' && (e = Z(g[3])), g[3] && g[3].slice(-1) == '%' && (e /= 100)), h[5] ? (g = h[5][H](cb), b = Z(g[0]), g[0].slice(-1) == '%' && (b *= 2.55), c = Z(g[1]), g[1].slice(-1) == '%' && (c *= 2.55), d = Z(g[2]), g[2].slice(-1) == '%' && (d *= 2.55), (g[0].slice(-3) == 'deg' || g[0].slice(-1) == '°') && (b /= 360), h[1].toLowerCase().slice(0, 4) == 'hsba' && (e = Z(g[3])), g[3] && g[3].slice(-1) == '%' && (e /= 100), r.hsb2rgb(b, c, d, e)) : h[6] ? (g = h[6][H](cb), b = Z(g[0]), g[0].slice(-1) == '%' && (b *= 2.55), c = Z(g[1]), g[1].slice(-1) == '%' && (c *= 2.55), d = Z(g[2]), g[2].slice(-1) == '%' && (d *= 2.55), (g[0].slice(-3) == 'deg' || g[0].slice(-1) == '°') && (b /= 360), h[1].toLowerCase().slice(0, 4) == 'hsla' && (e = Z(g[3])), g[3] && g[3].slice(-1) == '%' && (e /= 100), r.hsl2rgb(b, c, d, e)) : (h = { r: b, g: c, b: d, toString: n }, h.hex = `#${(16777216 | d | c << 8 | b << 16).toString(16).slice(1)}`, r.is(e, 'finite') && (h.opacity = e), h)) : { r: -1, g: -1, b: -1, hex: 'none', error: 1, toString: n }; }, r), r.hsb = o((a, b, c) => r.hsb2rgb(a, b, c).hex), r.hsl = o((a, b, c) => r.hsl2rgb(a, b, c).hex), r.rgb = o((a, b, c) => `#${(16777216 | c | b << 8 | a << 16).toString(16).slice(1)}`), r.getColor = function (a) { const b = this.getColor.start = this.getColor.start || { h: 0, s: 1, b: a || 0.75 }; const c = this.hsb2rgb(b.h, b.s, b.b); return b.h += 0.075, b.h > 1 && (b.h = 0, b.s -= 0.2, b.s <= 0 && (this.getColor.start = { h: 0, s: 1, b: b.b })), c.hex; }, r.getColor.reset = function () { delete this.start; }, r.parsePathString = function (a) { if (!a) return null; const b = yb(a); if (b.arr) return Ab(b.arr); const c = { a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0 }; let d = []; return r.is(a, T) && r.is(a[0], T) && (d = Ab(a)), d.length || G(a).replace(fb, (a, b, e) => { const f = []; let g = b.toLowerCase(); if (e.replace(hb, (a, b) => { b && f.push(+b); }), g == 'm' && f.length > 2 && (d.push([b][C](f.splice(0, 2))), g = 'l', b = b == 'm' ? 'l' : 'L'), g == 'r')d.push([b][C](f)); else for (;f.length >= c[g] && (d.push([b][C](f.splice(0, c[g]))), c[g]);); }), d.toString = r._path2string, b.arr = Ab(d), d; }, r.parseTransformString = o((a) => { if (!a) return null; let b = []; return r.is(a, T) && r.is(a[0], T) && (b = Ab(a)), b.length || G(a).replace(gb, (a, c, d) => { { var e = []; K.call(c); }d.replace(hb, (a, b) => { b && e.push(+b); }), b.push([c][C](e)); }), b.toString = r._path2string, b; }); var yb = function (a) { const b = yb.ps = yb.ps || {}; return b[a] ? b[a].sleep = 100 : b[a] = { sleep: 100 }, setTimeout(() => { for (const c in b)b[x](c) && c != a && (b[c].sleep--, !b[c].sleep && delete b[c]); }), b[a]; }; r.findDotsAtSegment = function (a, b, c, d, e, f, g, h, i) { const j = 1 - i; const k = j ** 3; const l = j ** 2; const m = i * i; const n = m * i; const o = k * a + 3 * l * i * c + 3 * j * i * i * e + n * g; const p = k * b + 3 * l * i * d + 3 * j * i * i * f + n * h; const q = a + 2 * i * (c - a) + m * (e - 2 * c + a); const r = b + 2 * i * (d - b) + m * (f - 2 * d + b); const s = c + 2 * i * (e - c) + m * (g - 2 * e + c); const t = d + 2 * i * (f - d) + m * (h - 2 * f + d); const u = j * a + i * c; const v = j * b + i * d; const w = j * e + i * g; const x = j * f + i * h; let y = 90 - 180 * L.atan2(q - s, r - t) / Q; return (q > s || t > r) && (y += 180), { x: o, y: p, m: { x: q, y: r }, n: { x: s, y: t }, start: { x: u, y: v }, end: { x: w, y: x }, alpha: y }; }, r.bezierBBox = function (a, b, c, d, e, f, g, h) { r.is(a, 'array') || (a = [a, b, c, d, e, f, g, h]); const i = Hb.apply(null, a); return { x: i.min.x, y: i.min.y, x2: i.max.x, y2: i.max.y, width: i.max.x - i.min.x, height: i.max.y - i.min.y }; }, r.isPointInsideBBox = function (a, b, c) { return b >= a.x && b <= a.x2 && c >= a.y && c <= a.y2; }, r.isBBoxIntersect = function (a, b) { const c = r.isPointInsideBBox; return c(b, a.x, a.y) || c(b, a.x2, a.y) || c(b, a.x, a.y2) || c(b, a.x2, a.y2) || c(a, b.x, b.y) || c(a, b.x2, b.y) || c(a, b.x, b.y2) || c(a, b.x2, b.y2) || (a.x < b.x2 && a.x > b.x || b.x < a.x2 && b.x > a.x) && (a.y < b.y2 && a.y > b.y || b.y < a.y2 && b.y > a.y); }, r.pathIntersection = function (a, b) { return g(a, b); }, r.pathIntersectionNumber = function (a, b) { return g(a, b, 1); }, r.isPointInsidePath = function (a, b, c) { const d = r.pathBBox(a); return r.isPointInsideBBox(d, b, c) && g(a, [['M', b, c], ['H', d.x2 + 10]], 1) % 2 == 1; }, r._removedFactory = function (a) { return function () { eve('raphael.log', null, `Raphaël: you are calling to method “${a}” of removed object`, a); }; }; const zb = r.pathBBox = function (a) { const b = yb(a); if (b.bbox) return b.bbox; if (!a) return { x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0 }; a = Ib(a); for (var c, d = 0, e = 0, f = [], g = [], h = 0, i = a.length; i > h; h++) if (c = a[h], c[0] == 'M')d = c[1], e = c[2], f.push(d), g.push(e); else { const j = Hb(d, e, c[1], c[2], c[3], c[4], c[5], c[6]); f = f[C](j.min.x, j.max.x), g = g[C](j.min.y, j.max.y), d = c[5], e = c[6]; } const k = N[B](0, f); const l = N[B](0, g); const m = M[B](0, f); const n = M[B](0, g); const o = { x: k, y: l, x2: m, y2: n, width: m - k, height: n - l }; return b.bbox = q(o), o; }; var Ab = function (a) { const b = q(a); return b.toString = r._path2string, b; }; const Bb = r._pathToRelative = function (a) { const b = yb(a); if (b.rel) return Ab(b.rel); r.is(a, T) && r.is(a && a[0], T) || (a = r.parsePathString(a)); const c = []; let d = 0; let e = 0; let f = 0; let g = 0; let h = 0; a[0][0] == 'M' && (d = a[0][1], e = a[0][2], f = d, g = e, h++, c.push(['M', d, e])); for (let i = h, j = a.length; j > i; i++) { let k = c[i] = []; const l = a[i]; if (l[0] != K.call(l[0])) switch (k[0] = K.call(l[0]), k[0]) { case 'a': k[1] = l[1], k[2] = l[2], k[3] = l[3], k[4] = l[4], k[5] = l[5], k[6] = +(l[6] - d).toFixed(3), k[7] = +(l[7] - e).toFixed(3); break; case 'v': k[1] = +(l[1] - e).toFixed(3); break; case 'm': f = l[1], g = l[2]; default: for (let m = 1, n = l.length; n > m; m++)k[m] = +(l[m] - (m % 2 ? d : e)).toFixed(3); } else { k = c[i] = [], l[0] == 'm' && (f = l[1] + d, g = l[2] + e); for (let o = 0, p = l.length; p > o; o++)c[i][o] = l[o]; } const q = c[i].length; switch (c[i][0]) { case 'z': d = f, e = g; break; case 'h': d += +c[i][q - 1]; break; case 'v': e += +c[i][q - 1]; break; default: d += +c[i][q - 2], e += +c[i][q - 1]; } } return c.toString = r._path2string, b.rel = Ab(c), c; }; const Cb = r._pathToAbsolute = function (a) { const b = yb(a); if (b.abs) return Ab(b.abs); if (r.is(a, T) && r.is(a && a[0], T) || (a = r.parsePathString(a)), !a || !a.length) return [['M', 0, 0]]; let c = []; let d = 0; let e = 0; let f = 0; let g = 0; let h = 0; a[0][0] == 'M' && (d = +a[0][1], e = +a[0][2], f = d, g = e, h++, c[0] = ['M', d, e]); for (var i, j, k = a.length == 3 && a[0][0] == 'M' && a[1][0].toUpperCase() == 'R' && a[2][0].toUpperCase() == 'Z', l = h, n = a.length; n > l; l++) { if (c.push(i = []), j = a[l], j[0] != _.call(j[0])) switch (i[0] = _.call(j[0]), i[0]) { case 'A': i[1] = j[1], i[2] = j[2], i[3] = j[3], i[4] = j[4], i[5] = j[5], i[6] = +(j[6] + d), i[7] = +(j[7] + e); break; case 'V': i[1] = +j[1] + e; break; case 'H': i[1] = +j[1] + d; break; case 'R': for (var o = [d, e][C](j.slice(1)), p = 2, q = o.length; q > p; p++)o[p] = +o[p] + d, o[++p] = +o[p] + e; c.pop(), c = c[C](m(o, k)); break; case 'M': f = +j[1] + d, g = +j[2] + e; default: for (p = 1, q = j.length; q > p; p++)i[p] = +j[p] + (p % 2 ? d : e); } else if (j[0] == 'R')o = [d, e][C](j.slice(1)), c.pop(), c = c[C](m(o, k)), i = ['R'][C](j.slice(-2)); else for (let s = 0, t = j.length; t > s; s++)i[s] = j[s]; switch (i[0]) { case 'Z': d = f, e = g; break; case 'H': d = i[1]; break; case 'V': e = i[1]; break; case 'M': f = i[i.length - 2], g = i[i.length - 1]; default: d = i[i.length - 2], e = i[i.length - 1]; } } return c.toString = r._path2string, b.abs = Ab(c), c; }; const Db = function (a, b, c, d) { return [a, b, c, d, c, d]; }; const Eb = function (a, b, c, d, e, f) { const g = 1 / 3; const h = 2 / 3; return [g * a + h * c, g * b + h * d, g * e + h * c, g * f + h * d, e, f]; }; const Fb = function (a, b, c, d, e, f, g, h, i, j) { let k; const l = 120 * Q / 180; const m = Q / 180 * (+e || 0); let n = []; const p = o((a, b, c) => { const d = a * L.cos(c) - b * L.sin(c); const e = a * L.sin(c) + b * L.cos(c); return { x: d, y: e }; }); if (j)y = j[0], z = j[1], w = j[2], x = j[3]; else { k = p(a, b, -m), a = k.x, b = k.y, k = p(h, i, -m), h = k.x, i = k.y; const q = (L.cos(Q / 180 * e), L.sin(Q / 180 * e), (a - h) / 2); const r = (b - i) / 2; let s = q * q / (c * c) + r * r / (d * d); s > 1 && (s = L.sqrt(s), c = s * c, d = s * d); const t = c * c; const u = d * d; const v = (f == g ? -1 : 1) * L.sqrt(O((t * u - t * r * r - u * q * q) / (t * r * r + u * q * q))); var w = v * c * r / d + (a + h) / 2; var x = v * -d * q / c + (b + i) / 2; var y = L.asin(((b - x) / d).toFixed(9)); var z = L.asin(((i - x) / d).toFixed(9)); y = w > a ? Q - y : y, z = w > h ? Q - z : z, y < 0 && (y = 2 * Q + y), z < 0 && (z = 2 * Q + z), g && y > z && (y -= 2 * Q), !g && z > y && (z -= 2 * Q); } let A = z - y; if (O(A) > l) { const B = z; const D = h; const E = i; z = y + l * (g && z > y ? 1 : -1), h = w + c * L.cos(z), i = x + d * L.sin(z), n = Fb(h, i, c, d, e, 0, g, D, E, [z, B, w, x]); }A = z - y; const F = L.cos(y); const G = L.sin(y); const I = L.cos(z); const J = L.sin(z); const K = L.tan(A / 4); const M = 4 / 3 * c * K; const N = 4 / 3 * d * K; const P = [a, b]; const R = [a + M * G, b - N * F]; const S = [h + M * J, i - N * I]; const T = [h, i]; if (R[0] = 2 * P[0] - R[0], R[1] = 2 * P[1] - R[1], j) return [R, S, T][C](n); n = [R, S, T][C](n).join()[H](','); for (var U = [], V = 0, W = n.length; W > V; V++)U[V] = V % 2 ? p(n[V - 1], n[V], m).y : p(n[V], n[V + 1], m).x; return U; }; const Gb = function (a, b, c, d, e, f, g, h, i) { const j = 1 - i; return { x: j ** 3 * a + 3 * j ** 2 * i * c + 3 * j * i * i * e + i ** 3 * g, y: j ** 3 * b + 3 * j ** 2 * i * d + 3 * j * i * i * f + i ** 3 * h }; }; var Hb = o((a, b, c, d, e, f, g, h) => { let i; let j = e - 2 * c + a - (g - 2 * e + c); let k = 2 * (c - a) - 2 * (e - c); let l = a - c; let m = (-k + L.sqrt(k * k - 4 * j * l)) / 2 / j; let n = (-k - L.sqrt(k * k - 4 * j * l)) / 2 / j; const o = [b, h]; const p = [a, g]; return O(m) > '1e12' && (m = 0.5), O(n) > '1e12' && (n = 0.5), m > 0 && m < 1 && (i = Gb(a, b, c, d, e, f, g, h, m), p.push(i.x), o.push(i.y)), n > 0 && n < 1 && (i = Gb(a, b, c, d, e, f, g, h, n), p.push(i.x), o.push(i.y)), j = f - 2 * d + b - (h - 2 * f + d), k = 2 * (d - b) - 2 * (f - d), l = b - d, m = (-k + L.sqrt(k * k - 4 * j * l)) / 2 / j, n = (-k - L.sqrt(k * k - 4 * j * l)) / 2 / j, O(m) > '1e12' && (m = 0.5), O(n) > '1e12' && (n = 0.5), m > 0 && m < 1 && (i = Gb(a, b, c, d, e, f, g, h, m), p.push(i.x), o.push(i.y)), n > 0 && n < 1 && (i = Gb(a, b, c, d, e, f, g, h, n), p.push(i.x), o.push(i.y)), { min: { x: N[B](0, p), y: N[B](0, o) }, max: { x: M[B](0, p), y: M[B](0, o) } }; }); var Ib = r._path2curve = o((a, b) => { const c = !b && yb(a); if (!b && c.curve) return Ab(c.curve); for (var d = Cb(a), e = b && Cb(b), f = { x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null }, g = { x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null }, h = (function (a, b) { let c; let d; if (!a) return ['C', b.x, b.y, b.x, b.y, b.x, b.y]; switch (!(a[0] in { T: 1, Q: 1 }) && (b.qx = b.qy = null), a[0]) { case 'M': b.X = a[1], b.Y = a[2]; break; case 'A': a = ['C'][C](Fb[B](0, [b.x, b.y][C](a.slice(1)))); break; case 'S': c = b.x + (b.x - (b.bx || b.x)), d = b.y + (b.y - (b.by || b.y)), a = ['C', c, d][C](a.slice(1)); break; case 'T': b.qx = b.x + (b.x - (b.qx || b.x)), b.qy = b.y + (b.y - (b.qy || b.y)), a = ['C'][C](Eb(b.x, b.y, b.qx, b.qy, a[1], a[2])); break; case 'Q': b.qx = a[1], b.qy = a[2], a = ['C'][C](Eb(b.x, b.y, a[1], a[2], a[3], a[4])); break; case 'L': a = ['C'][C](Db(b.x, b.y, a[1], a[2])); break; case 'H': a = ['C'][C](Db(b.x, b.y, a[1], b.y)); break; case 'V': a = ['C'][C](Db(b.x, b.y, b.x, a[1])); break; case 'Z': a = ['C'][C](Db(b.x, b.y, b.X, b.Y)); } return a; }), i = function (a, b) { if (a[b].length > 7) { a[b].shift(); for (let c = a[b]; c.length;)a.splice(b++, 0, ['C'][C](c.splice(0, 6))); a.splice(b, 1), l = M(d.length, e && e.length || 0); } }, j = function (a, b, c, f, g) { a && b && a[g][0] == 'M' && b[g][0] != 'M' && (b.splice(g, 0, ['M', f.x, f.y]), c.bx = 0, c.by = 0, c.x = a[g][1], c.y = a[g][2], l = M(d.length, e && e.length || 0)); }, k = 0, l = M(d.length, e && e.length || 0); l > k; k++) { d[k] = h(d[k], f), i(d, k), e && (e[k] = h(e[k], g)), e && i(e, k), j(d, e, f, g, k), j(e, d, g, f, k); const m = d[k]; const n = e && e[k]; const o = m.length; const p = e && n.length; f.x = m[o - 2], f.y = m[o - 1], f.bx = Z(m[o - 4]) || f.x, f.by = Z(m[o - 3]) || f.y, g.bx = e && (Z(n[p - 4]) || g.x), g.by = e && (Z(n[p - 3]) || g.y), g.x = e && n[p - 2], g.y = e && n[p - 1]; } return e || (c.curve = Ab(d)), e ? [d, e] : d; }, null, Ab); const Jb = (r._parseDots = o((a) => { for (var b = [], c = 0, d = a.length; d > c; c++) { const e = {}; const f = a[c].match(/^([^:]*):?([\d\.]*)/); if (e.color = r.getRGB(f[1]), e.color.error) return null; e.color = e.color.hex, f[2] && (e.offset = `${f[2]}%`), b.push(e); } for (c = 1, d = b.length - 1; d > c; c++) if (!b[c].offset) { for (var g = Z(b[c - 1].offset || 0), h = 0, i = c + 1; d > i; i++) if (b[i].offset) { h = b[i].offset; break; }h || (h = 100, i = d), h = Z(h); for (let j = (h - g) / (i - c + 1); i > c; c++)g += j, b[c].offset = `${g}%`; } return b; }), r._tear = function (a, b) { a == b.top && (b.top = a.prev), a == b.bottom && (b.bottom = a.next), a.next && (a.next.prev = a.prev), a.prev && (a.prev.next = a.next); }); const Kb = (r._tofront = function (a, b) { b.top !== a && (Jb(a, b), a.next = null, a.prev = b.top, b.top.next = a, b.top = a); }, r._toback = function (a, b) { b.bottom !== a && (Jb(a, b), a.next = b.bottom, a.prev = null, b.bottom.prev = a, b.bottom = a); }, r._insertafter = function (a, b, c) { Jb(a, c), b == c.top && (c.top = a), b.next && (b.next.prev = a), a.next = b.next, a.prev = b, b.next = a; }, r._insertbefore = function (a, b, c) { Jb(a, c), b == c.bottom && (c.bottom = a), b.prev && (b.prev.next = a), a.prev = b.prev, b.prev = a, a.next = b; }, r.toMatrix = function (a, b) { const c = zb(a); const d = { _: { transform: E }, getBBox: function () { return c; } }; return Lb(d, b), d.matrix; }); var Lb = (r.transformPath = function (a, b) { return pb(a, Kb(a, b)); }, r._extractTransform = function (a, b) { if (b == null) return a._.transform; b = G(b).replace(/\.{3}|\u2026/g, a._.transform || E); const c = r.parseTransformString(b); let d = 0; let e = 0; let g = 0; let h = 1; let i = 1; const j = a._; const k = new f(); if (j.transform = c || [], c) for (let l = 0, m = c.length; m > l; l++) { var n; var o; var p; var q; var s; const t = c[l]; const u = t.length; const v = G(t[0]).toLowerCase(); const w = t[0] != v; const x = w ? k.invert() : 0; v == 't' && u == 3 ? w ? (n = x.x(0, 0), o = x.y(0, 0), p = x.x(t[1], t[2]), q = x.y(t[1], t[2]), k.translate(p - n, q - o)) : k.translate(t[1], t[2]) : v == 'r' ? u == 2 ? (s = s || a.getBBox(1), k.rotate(t[1], s.x + s.width / 2, s.y + s.height / 2), d += t[1]) : u == 4 && (w ? (p = x.x(t[2], t[3]), q = x.y(t[2], t[3]), k.rotate(t[1], p, q)) : k.rotate(t[1], t[2], t[3]), d += t[1]) : v == 's' ? u == 2 || u == 3 ? (s = s || a.getBBox(1), k.scale(t[1], t[u - 1], s.x + s.width / 2, s.y + s.height / 2), h *= t[1], i *= t[u - 1]) : u == 5 && (w ? (p = x.x(t[3], t[4]), q = x.y(t[3], t[4]), k.scale(t[1], t[2], p, q)) : k.scale(t[1], t[2], t[3], t[4]), h *= t[1], i *= t[2]) : v == 'm' && u == 7 && k.add(t[1], t[2], t[3], t[4], t[5], t[6]), j.dirtyT = 1, a.matrix = k; }a.matrix = k, j.sx = h, j.sy = i, j.deg = d, j.dx = e = k.e, j.dy = g = k.f, h == 1 && i == 1 && !d && j.bbox ? (j.bbox.x += +e, j.bbox.y += +g) : j.dirtyT = 1; }); const Mb = function (a) { const b = a[0]; switch (b.toLowerCase()) { case 't': return [b, 0, 0]; case 'm': return [b, 1, 0, 0, 1, 0, 0]; case 'r': return a.length == 4 ? [b, 0, a[2], a[3]] : [b, 0]; case 's': return a.length == 5 ? [b, 1, 1, a[3], a[4]] : a.length == 3 ? [b, 1, 1] : [b, 1]; } }; var Nb = r._equaliseTransform = function (a, b) { b = G(b).replace(/\.{3}|\u2026/g, a), a = r.parseTransformString(a) || [], b = r.parseTransformString(b) || []; for (var c, d, e, f, g = M(a.length, b.length), h = [], i = [], j = 0; g > j; j++) { if (e = a[j] || Mb(b[j]), f = b[j] || Mb(e), e[0] != f[0] || e[0].toLowerCase() == 'r' && (e[2] != f[2] || e[3] != f[3]) || e[0].toLowerCase() == 's' && (e[3] != f[3] || e[4] != f[4])) return; for (h[j] = [], i[j] = [], c = 0, d = M(e.length, f.length); d > c; c++)c in e && (h[j][c] = e[c]), c in f && (i[j][c] = f[c]); } return { from: h, to: i }; }; r._getContainer = function (a, b, c, d) { let e; return e = d != null || r.is(a, 'object') ? a : y.doc.getElementById(a), e != null ? e.tagName ? b == null ? { container: e, width: e.style.pixelWidth || e.offsetWidth, height: e.style.pixelHeight || e.offsetHeight } : { container: e, width: b, height: c } : { container: 1, x: a, y: b, width: c, height: d } : void 0; }, r.pathToRelative = Bb, r._engine = {}, r.path2curve = Ib, r.matrix = function (a, b, c, d, e, g) { return new f(a, b, c, d, e, g); }, (function (a) { function b(a) { const b = L.sqrt(c(a)); a[0] && (a[0] /= b), a[1] && (a[1] /= b); } function c(a) { return a[0] * a[0] + a[1] * a[1]; }a.add = function (a, b, c, d, e, g) { let h; let i; let j; let k; const l = [[], [], []]; const m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]]; let n = [[a, c, e], [b, d, g], [0, 0, 1]]; for (a && a instanceof f && (n = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]]), h = 0; h < 3; h++) for (i = 0; i < 3; i++) { for (k = 0, j = 0; j < 3; j++)k += m[h][j] * n[j][i]; l[h][i] = k; } this.a = l[0][0], this.b = l[1][0], this.c = l[0][1], this.d = l[1][1], this.e = l[0][2], this.f = l[1][2]; }, a.invert = function () { const a = this; const b = a.a * a.d - a.b * a.c; return new f(a.d / b, -a.b / b, -a.c / b, a.a / b, (a.c * a.f - a.d * a.e) / b, (a.b * a.e - a.a * a.f) / b); }, a.clone = function () { return new f(this.a, this.b, this.c, this.d, this.e, this.f); }, a.translate = function (a, b) { this.add(1, 0, 0, 1, a, b); }, a.scale = function (a, b, c, d) { b == null && (b = a), (c || d) && this.add(1, 0, 0, 1, c, d), this.add(a, 0, 0, b, 0, 0), (c || d) && this.add(1, 0, 0, 1, -c, -d); }, a.rotate = function (a, b, c) { a = r.rad(a), b = b || 0, c = c || 0; const d = +L.cos(a).toFixed(9); const e = +L.sin(a).toFixed(9); this.add(d, e, -e, d, b, c), this.add(1, 0, 0, 1, -b, -c); }, a.x = function (a, b) { return a * this.a + b * this.c + this.e; }, a.y = function (a, b) { return a * this.b + b * this.d + this.f; }, a.get = function (a) { return +this[G.fromCharCode(97 + a)].toFixed(4); }, a.toString = function () { return r.svg ? `matrix(${[this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join()})` : [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join(); }, a.toFilter = function () { return `progid:DXImageTransform.Microsoft.Matrix(M11=${this.get(0)}, M12=${this.get(2)}, M21=${this.get(1)}, M22=${this.get(3)}, Dx=${this.get(4)}, Dy=${this.get(5)}, sizingmethod='auto expand')`; }, a.offset = function () { return [this.e.toFixed(4), this.f.toFixed(4)]; }, a.split = function () { const a = {}; a.dx = this.e, a.dy = this.f; const d = [[this.a, this.c], [this.b, this.d]]; a.scalex = L.sqrt(c(d[0])), b(d[0]), a.shear = d[0][0] * d[1][0] + d[0][1] * d[1][1], d[1] = [d[1][0] - d[0][0] * a.shear, d[1][1] - d[0][1] * a.shear], a.scaley = L.sqrt(c(d[1])), b(d[1]), a.shear /= a.scaley; const e = -d[0][1]; const f = d[1][1]; return f < 0 ? (a.rotate = r.deg(L.acos(f)), e < 0 && (a.rotate = 360 - a.rotate)) : a.rotate = r.deg(L.asin(e)), a.isSimple = !(+a.shear.toFixed(9) || a.scalex.toFixed(9) != a.scaley.toFixed(9) && a.rotate), a.isSuperSimple = !+a.shear.toFixed(9) && a.scalex.toFixed(9) == a.scaley.toFixed(9) && !a.rotate, a.noRotation = !+a.shear.toFixed(9) && !a.rotate, a; }, a.toTransformString = function (a) { const b = a || this[H](); return b.isSimple ? (b.scalex = +b.scalex.toFixed(4), b.scaley = +b.scaley.toFixed(4), b.rotate = +b.rotate.toFixed(4), (b.dx || b.dy ? `t${[b.dx, b.dy]}` : E) + (b.scalex != 1 || b.scaley != 1 ? `s${[b.scalex, b.scaley, 0, 0]}` : E) + (b.rotate ? `r${[b.rotate, 0, 0]}` : E)) : `m${[this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)]}`; }; }(f.prototype)); const Ob = navigator.userAgent.match(/Version\/(.*?)\s/) || navigator.userAgent.match(/Chrome\/(\d+)/); t.safari = navigator.vendor == 'Apple Computer, Inc.' && (Ob && Ob[1] < 4 || navigator.platform.slice(0, 2) == 'iP') || navigator.vendor == 'Google Inc.' && Ob && Ob[1] < 8 ? function () { const a = this.rect(-99, -99, this.width + 99, this.height + 99).attr({ stroke: 'none' }); setTimeout(() => { a.remove(); }); } : kb; for (var Pb = function () { this.returnValue = !1; }, Qb = function () { return this.originalEvent.preventDefault(); }, Rb = function () { this.cancelBubble = !0; }, Sb = function () { return this.originalEvent.stopPropagation(); }, Tb = (function () { return y.doc.addEventListener ? function (a, b, c, d) { const e = D && J[b] ? J[b] : b; const f = function (e) { const f = y.doc.documentElement.scrollTop || y.doc.body.scrollTop; const g = y.doc.documentElement.scrollLeft || y.doc.body.scrollLeft; const h = e.clientX + g; const i = e.clientY + f; if (D && J[x](b)) for (let j = 0, k = e.targetTouches && e.targetTouches.length; k > j; j++) if (e.targetTouches[j].target == a) { const l = e; e = e.targetTouches[j], e.originalEvent = l, e.preventDefault = Qb, e.stopPropagation = Sb; break; } return c.call(d, e, h, i); }; return a.addEventListener(e, f, !1), function () { return a.removeEventListener(e, f, !1), !0; }; } : y.doc.attachEvent ? function (a, b, c, d) { const e = function (a) { a = a || y.win.event; const b = y.doc.documentElement.scrollTop || y.doc.body.scrollTop; const e = y.doc.documentElement.scrollLeft || y.doc.body.scrollLeft; const f = a.clientX + e; const g = a.clientY + b; return a.preventDefault = a.preventDefault || Pb, a.stopPropagation = a.stopPropagation || Rb, c.call(d, a, f, g); }; a.attachEvent(`on${b}`, e); const f = function () { return a.detachEvent(`on${b}`, e), !0; }; return f; } : void 0; }()), Ub = [], Vb = function (a) { for (var b, c = a.clientX, d = a.clientY, e = y.doc.documentElement.scrollTop || y.doc.body.scrollTop, f = y.doc.documentElement.scrollLeft || y.doc.body.scrollLeft, g = Ub.length; g--;) { if (b = Ub[g], D) { for (var h, i = a.touches.length; i--;) if (h = a.touches[i], h.identifier == b.el._drag.id) { c = h.clientX, d = h.clientY, (a.originalEvent ? a.originalEvent : a).preventDefault(); break; } } else a.preventDefault(); var j; const k = b.el.node; const l = k.nextSibling; const m = k.parentNode; const n = k.style.display; y.win.opera && m.removeChild(k), k.style.display = 'none', j = b.el.paper.getElementByPoint(c, d), k.style.display = n, y.win.opera && (l ? m.insertBefore(k, l) : m.appendChild(k)), j && eve(`raphael.drag.over.${b.el.id}`, b.el, j), c += f, d += e, eve(`raphael.drag.move.${b.el.id}`, b.move_scope || b.el, c - b.el._drag.x, d - b.el._drag.y, c, d, a); } }, Wb = function (a) { r.unmousemove(Vb).unmouseup(Wb); for (var b, c = Ub.length; c--;)b = Ub[c], b.el._drag = {}, eve(`raphael.drag.end.${b.el.id}`, b.end_scope || b.start_scope || b.move_scope || b.el, a); Ub = []; }, Xb = r.el = {}, Yb = I.length; Yb--;)(function (a) { r[a] = Xb[a] = function (b, c) { return r.is(b, 'function') && (this.events = this.events || [], this.events.push({ name: a, f: b, unbind: Tb(this.shape || this.node || y.doc, a, b, c || this) })), this; }, r[`un${a}`] = Xb[`un${a}`] = function (b) { for (let c = this.events || [], d = c.length; d--;) if (c[d].name == a && c[d].f == b) return c[d].unbind(), c.splice(d, 1), !c.length && delete this.events, this; return this; }; }(I[Yb])); Xb.data = function (a, b) { const c = ib[this.id] = ib[this.id] || {}; if (arguments.length == 1) { if (r.is(a, 'object')) { for (const d in a)a[x](d) && this.data(d, a[d]); return this; } return eve(`raphael.data.get.${this.id}`, this, c[a], a), c[a]; } return c[a] = b, eve(`raphael.data.set.${this.id}`, this, b, a), this; }, Xb.removeData = function (a) { return a == null ? ib[this.id] = {} : ib[this.id] && delete ib[this.id][a], this; }, Xb.hover = function (a, b, c, d) { return this.mouseover(a, c).mouseout(b, d || c); }, Xb.unhover = function (a, b) { return this.unmouseover(a).unmouseout(b); }; const Zb = []; Xb.drag = function (a, b, c, d, e, f) { function g(g) { (g.originalEvent || g).preventDefault(); const h = y.doc.documentElement.scrollTop || y.doc.body.scrollTop; const i = y.doc.documentElement.scrollLeft || y.doc.body.scrollLeft; this._drag.x = g.clientX + i, this._drag.y = g.clientY + h, this._drag.id = g.identifier, !Ub.length && r.mousemove(Vb).mouseup(Wb), Ub.push({ el: this, move_scope: d, start_scope: e, end_scope: f }), b && eve.on(`raphael.drag.start.${this.id}`, b), a && eve.on(`raphael.drag.move.${this.id}`, a), c && eve.on(`raphael.drag.end.${this.id}`, c), eve(`raphael.drag.start.${this.id}`, e || d || this, g.clientX + i, g.clientY + h, g); } return this._drag = {}, Zb.push({ el: this, start: g }), this.mousedown(g), this; }, Xb.onDragOver = function (a) { a ? eve.on(`raphael.drag.over.${this.id}`, a) : eve.unbind(`raphael.drag.over.${this.id}`); }, Xb.undrag = function () { for (let a = Zb.length; a--;)Zb[a].el == this && (this.unmousedown(Zb[a].start), Zb.splice(a, 1), eve.unbind(`raphael.drag.*.${this.id}`)); !Zb.length && r.unmousemove(Vb).unmouseup(Wb); }, t.circle = function (a, b, c) { const d = r._engine.circle(this, a || 0, b || 0, c || 0); return this.__set__ && this.__set__.push(d), d; }, t.rect = function (a, b, c, d, e) { const f = r._engine.rect(this, a || 0, b || 0, c || 0, d || 0, e || 0); return this.__set__ && this.__set__.push(f), f; }, t.ellipse = function (a, b, c, d) { const e = r._engine.ellipse(this, a || 0, b || 0, c || 0, d || 0); return this.__set__ && this.__set__.push(e), e; }, t.path = function (a) { a && !r.is(a, S) && !r.is(a[0], T) && (a += E); const b = r._engine.path(r.format[B](r, arguments), this); return this.__set__ && this.__set__.push(b), b; }, t.image = function (a, b, c, d, e) { const f = r._engine.image(this, a || 'about:blank', b || 0, c || 0, d || 0, e || 0); return this.__set__ && this.__set__.push(f), f; }, t.text = function (a, b, c) { const d = r._engine.text(this, a || 0, b || 0, G(c)); return this.__set__ && this.__set__.push(d), d; }, t.set = function (a) { !r.is(a, 'array') && (a = Array.prototype.splice.call(arguments, 0, arguments.length)); const b = new jc(a); return this.__set__ && this.__set__.push(b), b; }, t.setStart = function (a) { this.__set__ = a || this.set(); }, t.setFinish = function () { const a = this.__set__; return delete this.__set__, a; }, t.setSize = function (a, b) { return r._engine.setSize.call(this, a, b); }, t.setViewBox = function (a, b, c, d, e) { return r._engine.setViewBox.call(this, a, b, c, d, e); }, t.top = t.bottom = null, t.raphael = r; const $b = function (a) { const b = a.getBoundingClientRect(); const c = a.ownerDocument; const d = c.body; const e = c.documentElement; const f = e.clientTop || d.clientTop || 0; const g = e.clientLeft || d.clientLeft || 0; const h = b.top + (y.win.pageYOffset || e.scrollTop || d.scrollTop) - f; const i = b.left + (y.win.pageXOffset || e.scrollLeft || d.scrollLeft) - g; return { y: h, x: i }; }; t.getElementByPoint = function (a, b) { const c = this; const d = c.canvas; let e = y.doc.elementFromPoint(a, b); if (y.win.opera && e.tagName == 'svg') { const f = $b(d); const g = d.createSVGRect(); g.x = a - f.x, g.y = b - f.y, g.width = g.height = 1; const h = d.getIntersectionList(g, null); h.length && (e = h[h.length - 1]); } if (!e) return null; for (;e.parentNode && e != d.parentNode && !e.raphael;)e = e.parentNode; return e == c.canvas.parentNode && (e = d), e = e && e.raphael ? c.getById(e.raphaelid) : null; }, t.getById = function (a) { for (let b = this.bottom; b;) { if (b.id == a) return b; b = b.next; } return null; }, t.forEach = function (a, b) { for (let c = this.bottom; c;) { if (a.call(b, c) === !1) return this; c = c.next; } return this; }, t.getElementsByPoint = function (a, b) { const c = this.set(); return this.forEach((d) => { d.isPointInside(a, b) && c.push(d); }), c; }, Xb.isPointInside = function (a, b) { const c = this.realPath = this.realPath || ob[this.type](this); return r.isPointInsidePath(c, a, b); }, Xb.getBBox = function (a) { if (this.removed) return {}; const b = this._; return a ? ((b.dirty || !b.bboxwt) && (this.realPath = ob[this.type](this), b.bboxwt = zb(this.realPath), b.bboxwt.toString = e, b.dirty = 0), b.bboxwt) : ((b.dirty || b.dirtyT || !b.bbox) && ((b.dirty || !this.realPath) && (b.bboxwt = 0, this.realPath = ob[this.type](this)), b.bbox = zb(pb(this.realPath, this.matrix)), b.bbox.toString = e, b.dirty = b.dirtyT = 0), b.bbox); }, Xb.clone = function () { if (this.removed) return null; const a = this.paper[this.type]().attr(this.attr()); return this.__set__ && this.__set__.push(a), a; }, Xb.glow = function (a) { if (this.type == 'text') return null; a = a || {}; const b = { width: (a.width || 10) + (+this.attr('stroke-width') || 1), fill: a.fill || !1, opacity: a.opacity || 0.5, offsetx: a.offsetx || 0, offsety: a.offsety || 0, color: a.color || '#000' }; const c = b.width / 2; const d = this.paper; const e = d.set(); let f = this.realPath || ob[this.type](this); f = this.matrix ? pb(f, this.matrix) : f; for (let g = 1; c + 1 > g; g++)e.push(d.path(f).attr({ stroke: b.color, fill: b.fill ? b.color : 'none', 'stroke-linejoin': 'round', 'stroke-linecap': 'round', 'stroke-width': +(b.width / c * g).toFixed(3), opacity: +(b.opacity / c).toFixed(3) })); return e.insertBefore(this).translate(b.offsetx, b.offsety); }; const _b = function (a, b, c, d, e, f, g, h, i) { return i == null ? k(a, b, c, d, e, f, g, h) : r.findDotsAtSegment(a, b, c, d, e, f, g, h, j(a, b, c, d, e, f, g, h, i)); }; const ac = function (a, b) { return function (c, d, e) { c = Ib(c); for (var f, g, h, i, j, k = '', l = {}, m = 0, n = 0, o = c.length; o > n; n++) { if (h = c[n], h[0] == 'M')f = +h[1], g = +h[2]; else { if (i = _b(f, g, h[1], h[2], h[3], h[4], h[5], h[6]), m + i > d) { if (b && !l.start) { if (j = _b(f, g, h[1], h[2], h[3], h[4], h[5], h[6], d - m), k += [`C${j.start.x}`, j.start.y, j.m.x, j.m.y, j.x, j.y], e) return k; l.start = k, k = [`M${j.x}`, `${j.y}C${j.n.x}`, j.n.y, j.end.x, j.end.y, h[5], h[6]].join(), m += i, f = +h[5], g = +h[6]; continue; } if (!a && !b) return j = _b(f, g, h[1], h[2], h[3], h[4], h[5], h[6], d - m), { x: j.x, y: j.y, alpha: j.alpha }; }m += i, f = +h[5], g = +h[6]; }k += h.shift() + h; } return l.end = k, j = a ? m : b ? l : r.findDotsAtSegment(f, g, h[0], h[1], h[2], h[3], h[4], h[5], 1), j.alpha && (j = { x: j.x, y: j.y, alpha: j.alpha }), j; }; }; const bc = ac(1); const cc = ac(); const dc = ac(0, 1); r.getTotalLength = bc, r.getPointAtLength = cc, r.getSubpath = function (a, b, c) { if (this.getTotalLength(a) - c < 1e-6) return dc(a, b).end; const d = dc(a, c, 1); return b ? dc(d, b).end : d; }, Xb.getTotalLength = function () { return this.type == 'path' ? this.node.getTotalLength ? this.node.getTotalLength() : bc(this.attrs.path) : void 0; }, Xb.getPointAtLength = function (a) { return this.type == 'path' ? cc(this.attrs.path, a) : void 0; }, Xb.getSubpath = function (a, b) { return this.type == 'path' ? r.getSubpath(this.attrs.path, a, b) : void 0; }; const ec = r.easing_formulas = { linear: function (a) { return a; }, '<': function (a) { return a ** 1.7; }, '>': function (a) { return a ** 0.48; }, '<>': function (a) { const b = 0.48 - a / 1.04; const c = L.sqrt(0.1734 + b * b); const d = c - b; const e = O(d) ** (1 / 3) * (d < 0 ? -1 : 1); const f = -c - b; const g = O(f) ** (1 / 3) * (f < 0 ? -1 : 1); const h = e + g + 0.5; return 3 * (1 - h) * h * h + h * h * h; }, backIn: function (a) { const b = 1.70158; return a * a * ((b + 1) * a - b); }, backOut: function (a) { a -= 1; const b = 1.70158; return a * a * ((b + 1) * a + b) + 1; }, elastic: function (a) { return a == !!a ? a : 2 ** (-10 * a) * L.sin(2 * (a - 0.075) * Q / 0.3) + 1; }, bounce: function (a) { let b; const c = 7.5625; const d = 2.75; return 1 / d > a ? b = c * a * a : 2 / d > a ? (a -= 1.5 / d, b = c * a * a + 0.75) : 2.5 / d > a ? (a -= 2.25 / d, b = c * a * a + 0.9375) : (a -= 2.625 / d, b = c * a * a + 0.984375), b; } }; ec.easeIn = ec['ease-in'] = ec['<'], ec.easeOut = ec['ease-out'] = ec['>'], ec.easeInOut = ec['ease-in-out'] = ec['<>'], ec['back-in'] = ec.backIn, ec['back-out'] = ec.backOut; var fc = []; var gc = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (a) { setTimeout(a, 16); }; var hc = function () { for (let a = +new Date(), c = 0; c < fc.length; c++) { const d = fc[c]; if (!d.el.removed && !d.paused) { var e; var f; let g = a - d.start; var h = d.ms; const i = d.easing; var j = d.from; var k = d.diff; const l = d.to; var m = (d.t, d.el); const n = {}; const o = {}; if (d.initstatus ? (g = (d.initstatus * d.anim.top - d.prev) / (d.percent - d.prev) * h, d.status = d.initstatus, delete d.initstatus, d.stop && fc.splice(c--, 1)) : d.status = (d.prev + (d.percent - d.prev) * (g / h)) / d.anim.top, !(g < 0)) if (h > g) { var p = i(g / h); for (var q in j) if (j[x](q)) { switch (bb[q]) { case R: e = +j[q] + p * h * k[q]; break; case 'colour': e = `rgb(${[ic(Y(j[q].r + p * h * k[q].r)), ic(Y(j[q].g + p * h * k[q].g)), ic(Y(j[q].b + p * h * k[q].b))].join(',')})`; break; case 'path': e = []; for (var s = 0, t = j[q].length; t > s; s++) { e[s] = [j[q][s][0]]; for (var u = 1, v = j[q][s].length; v > u; u++)e[s][u] = +j[q][s][u] + p * h * k[q][s][u]; e[s] = e[s].join(F); }e = e.join(F); break; case 'transform': if (k[q].real) for (e = [], s = 0, t = j[q].length; t > s; s++) for (e[s] = [j[q][s][0]], u = 1, v = j[q][s].length; v > u; u++)e[s][u] = j[q][s][u] + p * h * k[q][s][u]; else { const w = function (a) { return +j[q][a] + p * h * k[q][a]; }; e = [['m', w(0), w(1), w(2), w(3), w(4), w(5)]]; } break; case 'csv': if (q == 'clip-rect') for (e = [], s = 4; s--;)e[s] = +j[q][s] + p * h * k[q][s]; break; default: var y = [][C](j[q]); for (e = [], s = m.paper.customAttributes[q].length; s--;)e[s] = +y[s] + p * h * k[q][s]; }n[q] = e; }m.attr(n), (function (a, b, c) { setTimeout(() => { eve(`raphael.anim.frame.${a}`, b, c); }); }(m.id, m, d.anim)); } else { if ((function (a, b, c) { setTimeout(() => { eve(`raphael.anim.frame.${b.id}`, b, c), eve(`raphael.anim.finish.${b.id}`, b, c), r.is(a, 'function') && a.call(b); }); }(d.callback, m, d.anim)), m.attr(l), fc.splice(c--, 1), d.repeat > 1 && !d.next) { for (f in l)l[x](f) && (o[f] = d.totalOrigin[f]); d.el.attr(o), b(d.anim, d.el, d.anim.percents[0], null, d.totalOrigin, d.repeat - 1); }d.next && !d.stop && b(d.anim, d.el, d.next, null, d.totalOrigin, d.repeat); } } }r.svg && m && m.paper && m.paper.safari(), fc.length && gc(hc); }; var ic = function (a) { return a > 255 ? 255 : a < 0 ? 0 : a; }; Xb.animateWith = function (a, d, e, f, g, h) { const i = this; if (i.removed) return h && h.call(i), i; const j = e instanceof c ? e : r.animation(e, f, g, h); b(j, i, j.percents[0], null, i.attr()); for (let k = 0, l = fc.length; l > k; k++) if (fc[k].anim == d && fc[k].el == a) { fc[l - 1].start = fc[k].start; break; } return i; }, Xb.onAnimation = function (a) { return a ? eve.on(`raphael.anim.frame.${this.id}`, a) : eve.unbind(`raphael.anim.frame.${this.id}`), this; }, c.prototype.delay = function (a) { const b = new c(this.anim, this.ms); return b.times = this.times, b.del = +a || 0, b; }, c.prototype.repeat = function (a) { const b = new c(this.anim, this.ms); return b.del = this.del, b.times = L.floor(M(a, 0)) || 1, b; }, r.animation = function (a, b, d, e) { if (a instanceof c) return a; (r.is(d, 'function') || !d) && (e = e || d || null, d = null), a = Object(a), b = +b || 0; let f; let g; const h = {}; for (g in a)a[x](g) && Z(g) != g && `${Z(g)}%` != g && (f = !0, h[g] = a[g]); return f ? (d && (h.easing = d), e && (h.callback = e), new c({ 100: h }, b)) : new c(a, b); }, Xb.animate = function (a, d, e, f) { const g = this; if (g.removed) return f && f.call(g), g; const h = a instanceof c ? a : r.animation(a, d, e, f); return b(h, g, h.percents[0], null, g.attr()), g; }, Xb.setTime = function (a, b) { return a && b != null && this.status(a, N(b, a.ms) / a.ms), this; }, Xb.status = function (a, c) { let d; let e; const f = []; let g = 0; if (c != null) return b(a, this, -1, N(c, 1)), this; for (d = fc.length; d > g; g++) if (e = fc[g], e.el.id == this.id && (!a || e.anim == a)) { if (a) return e.status; f.push({ anim: e.anim, status: e.status }); } return a ? 0 : f; }, Xb.pause = function (a) { for (let b = 0; b < fc.length; b++)fc[b].el.id == this.id && (!a || fc[b].anim == a) && eve(`raphael.anim.pause.${this.id}`, this, fc[b].anim) !== !1 && (fc[b].paused = !0); return this; }, Xb.resume = function (a) { for (let b = 0; b < fc.length; b++) if (fc[b].el.id == this.id && (!a || fc[b].anim == a)) { const c = fc[b]; eve(`raphael.anim.resume.${this.id}`, this, c.anim) !== !1 && (delete c.paused, this.status(c.anim, c.status)); } return this; }, Xb.stop = function (a) { for (let b = 0; b < fc.length; b++)fc[b].el.id == this.id && (!a || fc[b].anim == a) && eve(`raphael.anim.stop.${this.id}`, this, fc[b].anim) !== !1 && fc.splice(b--, 1); return this; }, eve.on('raphael.remove', a), eve.on('raphael.clear', a), Xb.toString = function () { return 'Raphaël’s object'; }; var jc = function (a) { if (this.items = [], this.length = 0, this.type = 'set', a) for (let b = 0, c = a.length; c > b; b++)a[b] && (a[b].constructor == Xb.constructor || a[b].constructor == jc) && (this[this.items.length] = this.items[this.items.length] = a[b], this.length++); }; const kc = jc.prototype; kc.push = function () { + for (var a, b, c = 0, d = arguments.length; d > c; c++)a = arguments[c], a && (a.constructor == Xb.constructor || a.constructor == jc) && (b = this.items.length, this[b] = this.items[b] = a, this.length++); + return this; + }, kc.pop = function () { return this.length && delete this[this.length--], this.items.pop(); }, kc.forEach = function (a, b) { for (let c = 0, d = this.items.length; d > c; c++) if (a.call(b, this.items[c], c) === !1) return this; return this; }; for (const lc in Xb)Xb[x](lc) && (kc[lc] = (function (a) { return function () { const b = arguments; return this.forEach((c) => { c[a][B](c, b); }); }; }(lc))); kc.attr = function (a, b) { if (a && r.is(a, T) && r.is(a[0], 'object')) for (let c = 0, d = a.length; d > c; c++) this.items[c].attr(a[c]); else for (let e = 0, f = this.items.length; f > e; e++) this.items[e].attr(a, b); return this; }, kc.clear = function () { for (;this.length;) this.pop(); }, kc.splice = function (a, b) { a = a < 0 ? M(this.length + a, 0) : a, b = M(0, N(this.length - a, b)); let c; const d = []; const e = []; const f = []; for (c = 2; c < arguments.length; c++)f.push(arguments[c]); for (c = 0; b > c; c++)e.push(this[a + c]); for (;c < this.length - a; c++)d.push(this[a + c]); const g = f.length; for (c = 0; c < g + d.length; c++) this.items[a + c] = this[a + c] = g > c ? f[c] : d[c - g]; for (c = this.items.length = this.length -= b - g; this[c];) delete this[c++]; return new jc(e); }, kc.exclude = function (a) { for (let b = 0, c = this.length; c > b; b++) if (this[b] == a) return this.splice(b, 1), !0; }, kc.animate = function (a, b, c, d) { (r.is(c, 'function') || !c) && (d = c || null); let e; let f; let g = this.items.length; let h = g; const i = this; if (!g) return this; d && (f = function () { !--g && d.call(i); }), c = r.is(c, S) ? c : f; const j = r.animation(a, b, c, f); for (e = this.items[--h].animate(j); h--;) this.items[h] && !this.items[h].removed && this.items[h].animateWith(e, j, j); return this; }, kc.insertAfter = function (a) { for (let b = this.items.length; b--;) this.items[b].insertAfter(a); return this; }, kc.getBBox = function () { for (var a = [], b = [], c = [], d = [], e = this.items.length; e--;) if (!this.items[e].removed) { const f = this.items[e].getBBox(); a.push(f.x), b.push(f.y), c.push(f.x + f.width), d.push(f.y + f.height); } return a = N[B](0, a), b = N[B](0, b), c = M[B](0, c), d = M[B](0, d), { x: a, y: b, x2: c, y2: d, width: c - a, height: d - b }; }, kc.clone = function (a) { a = new jc(); for (let b = 0, c = this.items.length; c > b; b++)a.push(this.items[b].clone()); return a; }, kc.toString = function () { return 'Raphaël‘s set'; }, r.registerFont = function (a) { if (!a.face) return a; this.fonts = this.fonts || {}; const b = { w: a.w, face: {}, glyphs: {} }; const c = a.face['font-family']; for (const d in a.face)a.face[x](d) && (b.face[d] = a.face[d]); if (this.fonts[c] ? this.fonts[c].push(b) : this.fonts[c] = [b], !a.svg) { b.face['units-per-em'] = $(a.face['units-per-em'], 10); for (const e in a.glyphs) if (a.glyphs[x](e)) { const f = a.glyphs[e]; if (b.glyphs[e] = { w: f.w, k: {}, d: f.d && `M${f.d.replace(/[mlcxtrv]/g, a => ({ l: 'L', c: 'C', x: 'z', t: 'm', r: 'l', v: 'c' }[a] || 'M'))}z` }, f.k) for (const g in f.k)f[x](g) && (b.glyphs[e].k[g] = f.k[g]); } } return a; }, t.getFont = function (a, b, c, d) { if (d = d || 'normal', c = c || 'normal', b = +b || { normal: 400, bold: 700, lighter: 300, bolder: 800 }[b] || 400, r.fonts) { let e = r.fonts[a]; if (!e) { const f = new RegExp(`(^|\\s)${a.replace(/[^\w\d\s+!~.:_-]/g, E)}(\\s|$)`, 'i'); for (const g in r.fonts) if (r.fonts[x](g) && f.test(g)) { e = r.fonts[g]; break; } } let h; if (e) for (let i = 0, j = e.length; j > i && (h = e[i], h.face['font-weight'] != b || h.face['font-style'] != c && h.face['font-style'] || h.face['font-stretch'] != d); i++);return h; } }, t.print = function (a, b, c, d, e, f, g) { f = f || 'middle', g = M(N(g || 0, 1), -1); let h; const i = G(c)[H](E); let j = 0; let k = 0; let l = E; if (r.is(d, c) && (d = this.getFont(d)), d) { h = (e || 16) / d.face['units-per-em']; for (let m = d.face.bbox[H](u), n = +m[0], o = m[3] - m[1], p = 0, q = +m[1] + (f == 'baseline' ? o + +d.face.descent : o / 2), s = 0, t = i.length; t > s; s++) { if (i[s] == '\n')j = 0, w = 0, k = 0, p += o; else { const v = k && d.glyphs[i[s - 1]] || {}; var w = d.glyphs[i[s]]; j += k ? (v.w || d.w) + (v.k && v.k[i[s]] || 0) + d.w * g : 0, k = 1; }w && w.d && (l += r.transformPath(w.d, ['t', j * h, p * h, 's', h, h, n, q, 't', (a - n) / h, (b - q) / h])); } } return this.path(l).attr({ fill: '#000', stroke: 'none' }); }, t.add = function (a) { if (r.is(a, 'array')) for (var b, c = this.set(), d = 0, e = a.length; e > d; d++)b = a[d] || {}, v[x](b.type) && c.push(this[b.type]().attr(b)); return c; }, r.format = function (a, b) { const c = r.is(b, T) ? [0][C](b) : arguments; return a && r.is(a, S) && c.length - 1 && (a = a.replace(w, (a, b) => (c[++b] == null ? E : c[b]))), a || E; }, r.fullfill = (function () { const a = /\{([^\}]+)\}/g; const b = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g; const c = function (a, c, d) { let e = d; return c.replace(b, (a, b, c, d, f) => { b = b || d, e && (b in e && (e = e[b]), typeof e === 'function' && f && (e = e())); }), e = `${e == null || e == d ? a : e}`; }; return function (b, d) { return String(b).replace(a, (a, b) => c(a, b, d)); }; }()), r.ninja = function () { return z.was ? y.win.Raphael = z.is : delete Raphael, r; }, r.st = kc, (function (a, b, c) { function d() { /in/.test(a.readyState) ? setTimeout(d, 9) : r.eve('raphael.DOMload'); }a.readyState == null && a.addEventListener && (a.addEventListener(b, c = function () { a.removeEventListener(b, c, !1), a.readyState = 'complete'; }, !1), a.readyState = 'loading'), d(); }(document, 'DOMContentLoaded')), z.was ? y.win.Raphael = r : Raphael = r, eve.on('raphael.DOMload', () => { s = !0; }); +}()), window.Raphael.svg && (function (a) { const b = 'hasOwnProperty'; const c = String; const d = parseFloat; const e = parseInt; const f = Math; const g = f.max; const h = f.abs; const i = f.pow; const j = /[, ]+/; const k = a.eve; const l = ''; const m = ' '; const n = 'http://www.w3.org/1999/xlink'; const o = { block: 'M5,0 0,2.5 5,5z', classic: 'M5,0 0,2.5 5,5 3.5,3 3.5,2z', diamond: 'M2.5,0 5,2.5 2.5,5 0,2.5z', open: 'M6,1 1,3.5 6,6', oval: 'M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z' }; const p = {}; a.toString = function () { return `Your browser supports SVG.\nYou are running Raphaël ${this.version}`; }; const q = function (d, e) { if (e) { typeof d === 'string' && (d = q(d)); for (const f in e)e[b](f) && (f.substring(0, 6) == 'xlink:' ? d.setAttributeNS(n, f.substring(6), c(e[f])) : d.setAttribute(f, c(e[f]))); } else d = a._g.doc.createElementNS('http://www.w3.org/2000/svg', d), d.style && (d.style.webkitTapHighlightColor = 'rgba(0,0,0,0)'); return d; }; const r = function (b, e) { let j = 'linear'; let k = b.id + e; let m = 0.5; let n = 0.5; const o = b.node; const p = b.paper; const r = o.style; let s = a._g.doc.getElementById(k); if (!s) { if (e = c(e).replace(a._radial_gradient, (a, b, c) => { if (j = 'radial', b && c) { m = d(b), n = d(c); const e = 2 * (n > 0.5) - 1; (m - 0.5) ** 2 + (n - 0.5) ** 2 > 0.25 && (n = f.sqrt(0.25 - (m - 0.5) ** 2) * e + 0.5) && n != 0.5 && (n = n.toFixed(5) - 1e-5 * e); } return l; }), e = e.split(/\s*\-\s*/), j == 'linear') { let t = e.shift(); if (t = -d(t), isNaN(t)) return null; var u = [0, 0, f.cos(a.rad(t)), f.sin(a.rad(t))]; const v = 1 / (g(h(u[2]), h(u[3])) || 1); u[2] *= v, u[3] *= v, u[2] < 0 && (u[0] = -u[2], u[2] = 0), u[3] < 0 && (u[1] = -u[3], u[3] = 0); } const w = a._parseDots(e); if (!w) return null; if (k = k.replace(/[\(\)\s,\xb0#]/g, '_'), b.gradient && k != b.gradient.id && (p.defs.removeChild(b.gradient), delete b.gradient), !b.gradient) { s = q(`${j}Gradient`, { id: k }), b.gradient = s, q(s, j == 'radial' ? { fx: m, fy: n } : { x1: u[0], y1: u[1], x2: u[2], y2: u[3], gradientTransform: b.matrix.invert() }), p.defs.appendChild(s); for (let x = 0, y = w.length; y > x; x++)s.appendChild(q('stop', { offset: w[x].offset ? w[x].offset : x ? '100%' : '0%', 'stop-color': w[x].color || '#fff' })); } } return q(o, { fill: `url(#${k})`, opacity: 1, 'fill-opacity': 1 }), r.fill = l, r.opacity = 1, r.fillOpacity = 1, 1; }; const s = function (a) { const b = a.getBBox(1); q(a.pattern, { patternTransform: `${a.matrix.invert()} translate(${b.x},${b.y})` }); }; const t = function (d, e, f) { if (d.type == 'path') { for (var g, h, i, j, k, m = c(e).toLowerCase().split('-'), n = d.paper, r = f ? 'end' : 'start', s = d.node, t = d.attrs, u = t['stroke-width'], v = m.length, w = 'classic', x = 3, y = 3, z = 5; v--;) switch (m[v]) { case 'block': case 'classic': case 'oval': case 'diamond': case 'open': case 'none': w = m[v]; break; case 'wide': y = 5; break; case 'narrow': y = 2; break; case 'long': x = 5; break; case 'short': x = 2; } if (w == 'open' ? (x += 2, y += 2, z += 2, i = 1, j = f ? 4 : 1, k = { fill: 'none', stroke: t.stroke }) : (j = i = x / 2, k = { fill: t.stroke, stroke: 'none' }), d._.arrows ? f ? (d._.arrows.endPath && p[d._.arrows.endPath]--, d._.arrows.endMarker && p[d._.arrows.endMarker]--) : (d._.arrows.startPath && p[d._.arrows.startPath]--, d._.arrows.startMarker && p[d._.arrows.startMarker]--) : d._.arrows = {}, w != 'none') { const A = `raphael-marker-${w}`; const B = `raphael-marker-${r}${w}${x}${y}`; a._g.doc.getElementById(A) ? p[A]++ : (n.defs.appendChild(q(q('path'), { 'stroke-linecap': 'round', d: o[w], id: A })), p[A] = 1); let C; let D = a._g.doc.getElementById(B); D ? (p[B]++, C = D.getElementsByTagName('use')[0]) : (D = q(q('marker'), { id: B, markerHeight: y, markerWidth: x, orient: 'auto', refX: j, refY: y / 2 }), C = q(q('use'), { 'xlink:href': `#${A}`, transform: `${f ? `rotate(180 ${x / 2} ${y / 2}) ` : l}scale(${x / z},${y / z})`, 'stroke-width': (1 / ((x / z + y / z) / 2)).toFixed(4) }), D.appendChild(C), n.defs.appendChild(D), p[B] = 1), q(C, k); const E = i * (w != 'diamond' && w != 'oval'); f ? (g = d._.arrows.startdx * u || 0, h = a.getTotalLength(t.path) - E * u) : (g = E * u, h = a.getTotalLength(t.path) - (d._.arrows.enddx * u || 0)), k = {}, k[`marker-${r}`] = `url(#${B})`, (h || g) && (k.d = Raphael.getSubpath(t.path, g, h)), q(s, k), d._.arrows[`${r}Path`] = A, d._.arrows[`${r}Marker`] = B, d._.arrows[`${r}dx`] = E, d._.arrows[`${r}Type`] = w, d._.arrows[`${r}String`] = e; } else f ? (g = d._.arrows.startdx * u || 0, h = a.getTotalLength(t.path) - g) : (g = 0, h = a.getTotalLength(t.path) - (d._.arrows.enddx * u || 0)), d._.arrows[`${r}Path`] && q(s, { d: Raphael.getSubpath(t.path, g, h) }), delete d._.arrows[`${r}Path`], delete d._.arrows[`${r}Marker`], delete d._.arrows[`${r}dx`], delete d._.arrows[`${r}Type`], delete d._.arrows[`${r}String`]; for (k in p) if (p[b](k) && !p[k]) { const F = a._g.doc.getElementById(k); F && F.parentNode.removeChild(F); } } }; const u = { '': [0], none: [0], '-': [3, 1], '.': [1, 1], '-.': [3, 1, 1, 1], '-..': [3, 1, 1, 1, 1, 1], '. ': [1, 3], '- ': [4, 3], '--': [8, 3], '- .': [4, 3, 1, 3], '--.': [8, 3, 1, 3], '--..': [8, 3, 1, 3, 1, 3] }; const v = function (a, b, d) { if (b = u[c(b).toLowerCase()]) { for (var e = a.attrs['stroke-width'] || '1', f = { round: e, square: e, butt: 0 }[a.attrs['stroke-linecap'] || d['stroke-linecap']] || 0, g = [], h = b.length; h--;)g[h] = b[h] * e + (h % 2 ? 1 : -1) * f; q(a.node, { 'stroke-dasharray': g.join(',') }); } }; const w = function (d, f) { const i = d.node; const k = d.attrs; const m = i.style.visibility; i.style.visibility = 'hidden'; for (let o in f) if (f[b](o)) { if (!a._availableAttrs[b](o)) continue; let p = f[o]; switch (k[o] = p, o) { case 'blur': d.blur(p); break; case 'href': case 'title': case 'target': var u = i.parentNode; if (u.tagName.toLowerCase() != 'a') { const w = q('a'); u.insertBefore(w, i), w.appendChild(i), u = w; }o == 'target' ? u.setAttributeNS(n, 'show', p == 'blank' ? 'new' : p) : u.setAttributeNS(n, o, p); break; case 'cursor': i.style.cursor = p; break; case 'transform': d.transform(p); break; case 'arrow-start': t(d, p); break; case 'arrow-end': t(d, p, 1); break; case 'clip-rect': var x = c(p).split(j); if (x.length == 4) { d.clip && d.clip.parentNode.parentNode.removeChild(d.clip.parentNode); var z = q('clipPath'); const A = q('rect'); z.id = a.createUUID(), q(A, { x: x[0], y: x[1], width: x[2], height: x[3] }), z.appendChild(A), d.paper.defs.appendChild(z), q(i, { 'clip-path': `url(#${z.id})` }), d.clip = A; } if (!p) { const B = i.getAttribute('clip-path'); if (B) { const C = a._g.doc.getElementById(B.replace(/(^url\(#|\)$)/g, l)); C && C.parentNode.removeChild(C), q(i, { 'clip-path': l }), delete d.clip; } } break; case 'path': d.type == 'path' && (q(i, { d: p ? k.path = a._pathToAbsolute(p) : 'M0,0' }), d._.dirty = 1, d._.arrows && ('startString' in d._.arrows && t(d, d._.arrows.startString), 'endString' in d._.arrows && t(d, d._.arrows.endString, 1))); break; case 'width': if (i.setAttribute(o, p), d._.dirty = 1, !k.fx) break; o = 'x', p = k.x; case 'x': k.fx && (p = -k.x - (k.width || 0)); case 'rx': if (o == 'rx' && d.type == 'rect') break; case 'cx': i.setAttribute(o, p), d.pattern && s(d), d._.dirty = 1; break; case 'height': if (i.setAttribute(o, p), d._.dirty = 1, !k.fy) break; o = 'y', p = k.y; case 'y': k.fy && (p = -k.y - (k.height || 0)); case 'ry': if (o == 'ry' && d.type == 'rect') break; case 'cy': i.setAttribute(o, p), d.pattern && s(d), d._.dirty = 1; break; case 'r': d.type == 'rect' ? q(i, { rx: p, ry: p }) : i.setAttribute(o, p), d._.dirty = 1; break; case 'src': d.type == 'image' && i.setAttributeNS(n, 'href', p); break; case 'stroke-width': (d._.sx != 1 || d._.sy != 1) && (p /= g(h(d._.sx), h(d._.sy)) || 1), d.paper._vbSize && (p *= d.paper._vbSize), i.setAttribute(o, p), k['stroke-dasharray'] && v(d, k['stroke-dasharray'], f), d._.arrows && ('startString' in d._.arrows && t(d, d._.arrows.startString), 'endString' in d._.arrows && t(d, d._.arrows.endString, 1)); break; case 'stroke-dasharray': v(d, p, f); break; case 'fill': var D = c(p).match(a._ISURL); if (D) { z = q('pattern'); var E = q('image'); z.id = a.createUUID(), q(z, { x: 0, y: 0, patternUnits: 'userSpaceOnUse', height: 1, width: 1 }), q(E, { x: 0, y: 0, 'xlink:href': D[1] }), z.appendChild(E), (function (b) { a._preload(D[1], function () { const a = this.offsetWidth; const c = this.offsetHeight; q(b, { width: a, height: c }), q(E, { width: a, height: c }), d.paper.safari(); }); }(z)), d.paper.defs.appendChild(z), q(i, { fill: `url(#${z.id})` }), d.pattern = z, d.pattern && s(d); break; } var F = a.getRGB(p); if (F.error) { if ((d.type == 'circle' || d.type == 'ellipse' || c(p).charAt() != 'r') && r(d, p)) { if ('opacity' in k || 'fill-opacity' in k) { var G = a._g.doc.getElementById(i.getAttribute('fill').replace(/^url\(#|\)$/g, l)); if (G) { var H = G.getElementsByTagName('stop'); q(H[H.length - 1], { 'stop-opacity': ('opacity' in k ? k.opacity : 1) * ('fill-opacity' in k ? k['fill-opacity'] : 1) }); } }k.gradient = p, k.fill = 'none'; break; } } else delete f.gradient, delete k.gradient, !a.is(k.opacity, 'undefined') && a.is(f.opacity, 'undefined') && q(i, { opacity: k.opacity }), !a.is(k['fill-opacity'], 'undefined') && a.is(f['fill-opacity'], 'undefined') && q(i, { 'fill-opacity': k['fill-opacity'] }); F[b]('opacity') && q(i, { 'fill-opacity': F.opacity > 1 ? F.opacity / 100 : F.opacity }); case 'stroke': F = a.getRGB(p), i.setAttribute(o, F.hex), o == 'stroke' && F[b]('opacity') && q(i, { 'stroke-opacity': F.opacity > 1 ? F.opacity / 100 : F.opacity }), o == 'stroke' && d._.arrows && ('startString' in d._.arrows && t(d, d._.arrows.startString), 'endString' in d._.arrows && t(d, d._.arrows.endString, 1)); break; case 'gradient': (d.type == 'circle' || d.type == 'ellipse' || c(p).charAt() != 'r') && r(d, p); break; case 'opacity': k.gradient && !k[b]('stroke-opacity') && q(i, { 'stroke-opacity': p > 1 ? p / 100 : p }); case 'fill-opacity': if (k.gradient) { G = a._g.doc.getElementById(i.getAttribute('fill').replace(/^url\(#|\)$/g, l)), G && (H = G.getElementsByTagName('stop'), q(H[H.length - 1], { 'stop-opacity': p })); break; } default: o == 'font-size' && (p = `${e(p, 10)}px`); var I = o.replace(/(\-.)/g, a => a.substring(1).toUpperCase()); i.style[I] = p, d._.dirty = 1, i.setAttribute(o, p); } }y(d, f), i.style.visibility = m; }; const x = 1.2; var y = function (d, f) { if (d.type == 'text' && (f[b]('text') || f[b]('font') || f[b]('font-size') || f[b]('x') || f[b]('y'))) { const g = d.attrs; const h = d.node; const i = h.firstChild ? e(a._g.doc.defaultView.getComputedStyle(h.firstChild, l).getPropertyValue('font-size'), 10) : 10; if (f[b]('text')) { for (g.text = f.text; h.firstChild;)h.removeChild(h.firstChild); for (var j, k = c(f.text).split('\n'), m = [], n = 0, o = k.length; o > n; n++)j = q('tspan'), n && q(j, { dy: i * x, x: g.x }), j.appendChild(a._g.doc.createTextNode(k[n])), h.appendChild(j), m[n] = j; } else for (m = h.getElementsByTagName('tspan'), n = 0, o = m.length; o > n; n++)n ? q(m[n], { dy: i * x, x: g.x }) : q(m[0], { dy: 0 }); q(h, { x: g.x, y: g.y }), d._.dirty = 1; const p = d._getBBox(); const r = g.y - (p.y + p.height / 2); r && a.is(r, 'finite') && q(m[0], { dy: r }); } }; const z = function (b, c) { this[0] = this.node = b, b.raphael = !0, this.id = a._oid++, b.raphaelid = this.id, this.matrix = a.matrix(), this.realPath = null, this.paper = c, this.attrs = this.attrs || {}, this._ = { transform: [], sx: 1, sy: 1, deg: 0, dx: 0, dy: 0, dirty: 1 }, !c.bottom && (c.bottom = this), this.prev = c.top, c.top && (c.top.next = this), c.top = this, this.next = null; }; const A = a.el; z.prototype = A, A.constructor = z, a._engine.path = function (a, b) { const c = q('path'); b.canvas && b.canvas.appendChild(c); const d = new z(c, b); return d.type = 'path', w(d, { fill: 'none', stroke: '#000', path: a }), d; }, A.rotate = function (a, b, e) { if (this.removed) return this; if (a = c(a).split(j), a.length - 1 && (b = d(a[1]), e = d(a[2])), a = d(a[0]), e == null && (b = e), b == null || e == null) { const f = this.getBBox(1); b = f.x + f.width / 2, e = f.y + f.height / 2; } return this.transform(this._.transform.concat([['r', a, b, e]])), this; }, A.scale = function (a, b, e, f) { if (this.removed) return this; if (a = c(a).split(j), a.length - 1 && (b = d(a[1]), e = d(a[2]), f = d(a[3])), a = d(a[0]), b == null && (b = a), f == null && (e = f), e == null || f == null) var g = this.getBBox(1); return e = e == null ? g.x + g.width / 2 : e, f = f == null ? g.y + g.height / 2 : f, this.transform(this._.transform.concat([['s', a, b, e, f]])), this; }, A.translate = function (a, b) { return this.removed ? this : (a = c(a).split(j), a.length - 1 && (b = d(a[1])), a = d(a[0]) || 0, b = +b || 0, this.transform(this._.transform.concat([['t', a, b]])), this); }, A.transform = function (c) { const d = this._; if (c == null) return d.transform; if (a._extractTransform(this, c), this.clip && q(this.clip, { transform: this.matrix.invert() }), this.pattern && s(this), this.node && q(this.node, { transform: this.matrix }), d.sx != 1 || d.sy != 1) { const e = this.attrs[b]('stroke-width') ? this.attrs['stroke-width'] : 1; this.attr({ 'stroke-width': e }); } return this; }, A.hide = function () { return !this.removed && this.paper.safari(this.node.style.display = 'none'), this; }, A.show = function () { return !this.removed && this.paper.safari(this.node.style.display = ''), this; }, A.remove = function () { if (!this.removed && this.node.parentNode) { const b = this.paper; b.__set__ && b.__set__.exclude(this), k.unbind(`raphael.*.*.${this.id}`), this.gradient && b.defs.removeChild(this.gradient), a._tear(this, b), this.node.parentNode.tagName.toLowerCase() == 'a' ? this.node.parentNode.parentNode.removeChild(this.node.parentNode) : this.node.parentNode.removeChild(this.node); for (const c in this) this[c] = typeof this[c] === 'function' ? a._removedFactory(c) : null; this.removed = !0; } }, A._getBBox = function () { if (this.node.style.display == 'none') { this.show(); var a = !0; } let b = {}; try { b = this.node.getBBox(); } catch (c) {} finally { b = b || {}; } return a && this.hide(), b; }, A.attr = function (c, d) { if (this.removed) return this; if (c == null) { const e = {}; for (const f in this.attrs) this.attrs[b](f) && (e[f] = this.attrs[f]); return e.gradient && e.fill == 'none' && (e.fill = e.gradient) && delete e.gradient, e.transform = this._.transform, e; } if (d == null && a.is(c, 'string')) { if (c == 'fill' && this.attrs.fill == 'none' && this.attrs.gradient) return this.attrs.gradient; if (c == 'transform') return this._.transform; for (var g = c.split(j), h = {}, i = 0, l = g.length; l > i; i++)c = g[i], h[c] = c in this.attrs ? this.attrs[c] : a.is(this.paper.customAttributes[c], 'function') ? this.paper.customAttributes[c].def : a._availableAttrs[c]; return l - 1 ? h : h[g[0]]; } if (d == null && a.is(c, 'array')) { for (h = {}, i = 0, l = c.length; l > i; i++)h[c[i]] = this.attr(c[i]); return h; } if (d != null) { var m = {}; m[c] = d; } else c != null && a.is(c, 'object') && (m = c); for (var n in m)k(`raphael.attr.${n}.${this.id}`, this, m[n]); for (n in this.paper.customAttributes) if (this.paper.customAttributes[b](n) && m[b](n) && a.is(this.paper.customAttributes[n], 'function')) { const o = this.paper.customAttributes[n].apply(this, [].concat(m[n])); this.attrs[n] = m[n]; for (const p in o)o[b](p) && (m[p] = o[p]); } return w(this, m), this; }, A.toFront = function () { if (this.removed) return this; this.node.parentNode.tagName.toLowerCase() == 'a' ? this.node.parentNode.parentNode.appendChild(this.node.parentNode) : this.node.parentNode.appendChild(this.node); const b = this.paper; return b.top != this && a._tofront(this, b), this; }, A.toBack = function () { if (this.removed) return this; const b = this.node.parentNode; b.tagName.toLowerCase() == 'a' ? b.parentNode.insertBefore(this.node.parentNode, this.node.parentNode.parentNode.firstChild) : b.firstChild != this.node && b.insertBefore(this.node, this.node.parentNode.firstChild), a._toback(this, this.paper); this.paper; return this; }, A.insertAfter = function (b) { if (this.removed) return this; const c = b.node || b[b.length - 1].node; return c.nextSibling ? c.parentNode.insertBefore(this.node, c.nextSibling) : c.parentNode.appendChild(this.node), a._insertafter(this, b, this.paper), this; }, A.insertBefore = function (b) { if (this.removed) return this; const c = b.node || b[0].node; return c.parentNode.insertBefore(this.node, c), a._insertbefore(this, b, this.paper), this; }, A.blur = function (b) { const c = this; if (+b !== 0) { const d = q('filter'); const e = q('feGaussianBlur'); c.attrs.blur = b, d.id = a.createUUID(), q(e, { stdDeviation: +b || 1.5 }), d.appendChild(e), c.paper.defs.appendChild(d), c._blur = d, q(c.node, { filter: `url(#${d.id})` }); } else c._blur && (c._blur.parentNode.removeChild(c._blur), delete c._blur, delete c.attrs.blur), c.node.removeAttribute('filter'); }, a._engine.circle = function (a, b, c, d) { const e = q('circle'); a.canvas && a.canvas.appendChild(e); const f = new z(e, a); return f.attrs = { cx: b, cy: c, r: d, fill: 'none', stroke: '#000' }, f.type = 'circle', q(e, f.attrs), f; }, a._engine.rect = function (a, b, c, d, e, f) { const g = q('rect'); a.canvas && a.canvas.appendChild(g); const h = new z(g, a); return h.attrs = { x: b, y: c, width: d, height: e, r: f || 0, rx: f || 0, ry: f || 0, fill: 'none', stroke: '#000' }, h.type = 'rect', q(g, h.attrs), h; }, a._engine.ellipse = function (a, b, c, d, e) { const f = q('ellipse'); a.canvas && a.canvas.appendChild(f); const g = new z(f, a); return g.attrs = { cx: b, cy: c, rx: d, ry: e, fill: 'none', stroke: '#000' }, g.type = 'ellipse', q(f, g.attrs), g; }, a._engine.image = function (a, b, c, d, e, f) { const g = q('image'); q(g, { x: c, y: d, width: e, height: f, preserveAspectRatio: 'none' }), g.setAttributeNS(n, 'href', b), a.canvas && a.canvas.appendChild(g); const h = new z(g, a); return h.attrs = { x: c, y: d, width: e, height: f, src: b }, h.type = 'image', h; }, a._engine.text = function (b, c, d, e) { const f = q('text'); b.canvas && b.canvas.appendChild(f); const g = new z(f, b); return g.attrs = { x: c, y: d, 'text-anchor': 'middle', text: e, font: a._availableAttrs.font, stroke: 'none', fill: '#000' }, g.type = 'text', w(g, g.attrs), g; }, a._engine.setSize = function (a, b) { return this.width = a || this.width, this.height = b || this.height, this.canvas.setAttribute('width', this.width), this.canvas.setAttribute('height', this.height), this._viewBox && this.setViewBox.apply(this, this._viewBox), this; }, a._engine.create = function () { const b = a._getContainer.apply(0, arguments); let c = b && b.container; let d = b.x; let e = b.y; let f = b.width; let g = b.height; if (!c) throw new Error('SVG container not found.'); let h; const i = q('svg'); const j = 'overflow:hidden;'; return d = d || 0, e = e || 0, f = f || 512, g = g || 342, q(i, { height: g, version: 1.1, width: f, xmlns: 'http://www.w3.org/2000/svg' }), c == 1 ? (i.style.cssText = `${j}position:absolute;left:${d}px;top:${e}px`, a._g.doc.body.appendChild(i), h = 1) : (i.style.cssText = `${j}position:relative`, c.firstChild ? c.insertBefore(i, c.firstChild) : c.appendChild(i)), c = new a._Paper(), c.width = f, c.height = g, c.canvas = i, c.clear(), c._left = c._top = 0, h && (c.renderfix = function () {}), c.renderfix(), c; }, a._engine.setViewBox = function (a, b, c, d, e) { k('raphael.setViewBox', this, this._viewBox, [a, b, c, d, e]); let f; let h; let i = g(c / this.width, d / this.height); let j = this.top; const l = e ? 'meet' : 'xMinYMin'; for (a == null ? (this._vbSize && (i = 1), delete this._vbSize, f = `0 0 ${this.width}${m}${this.height}`) : (this._vbSize = i, f = a + m + b + m + c + m + d), q(this.canvas, { viewBox: f, preserveAspectRatio: l }); i && j;)h = 'stroke-width' in j.attrs ? j.attrs['stroke-width'] : 1, j.attr({ 'stroke-width': h }), j._.dirty = 1, j._.dirtyT = 1, j = j.prev; return this._viewBox = [a, b, c, d, !!e], this; }, a.prototype.renderfix = function () { let a; const b = this.canvas; const c = b.style; try { a = b.getScreenCTM() || b.createSVGMatrix(); } catch (d) { a = b.createSVGMatrix(); } const e = -a.e % 1; const f = -a.f % 1; (e || f) && (e && (this._left = (this._left + e) % 1, c.left = `${this._left}px`), f && (this._top = (this._top + f) % 1, c.top = `${this._top}px`)); }, a.prototype.clear = function () { a.eve('raphael.clear', this); for (var b = this.canvas; b.firstChild;)b.removeChild(b.firstChild); this.bottom = this.top = null, (this.desc = q('desc')).appendChild(a._g.doc.createTextNode(`Created with Raphaël ${a.version}`)), b.appendChild(this.desc), b.appendChild(this.defs = q('defs')); }, a.prototype.remove = function () { k('raphael.remove', this), this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); for (const b in this) this[b] = typeof this[b] === 'function' ? a._removedFactory(b) : null; }; const B = a.st; for (const C in A)A[b](C) && !B[b](C) && (B[C] = (function (a) { return function () { const b = arguments; return this.forEach((c) => { c[a].apply(c, b); }); }; }(C))); }(window.Raphael)), window.Raphael.vml && (function (a) { + const b = 'hasOwnProperty'; const c = String; const d = parseFloat; const e = Math; const f = e.round; const g = e.max; const h = e.min; const i = e.abs; const j = 'fill'; const k = /[, ]+/; const l = a.eve; const m = ' progid:DXImageTransform.Microsoft'; const n = ' '; const o = ''; const p = { M: 'm', L: 'l', C: 'c', Z: 'x', m: 't', l: 'r', c: 'v', z: 'x' }; const q = /([clmz]),?([^clmz]*)/gi; const r = / progid:\S+Blur\([^\)]+\)/g; const s = /-?[^,\s-]+/g; const t = 'position:absolute;left:0;top:0;width:1px;height:1px'; const u = 21600; const v = { path: 1, rect: 1, image: 1 }; const w = { circle: 1, ellipse: 1 }; const x = function (b) { let d = /[ahqstv]/gi; let e = a._pathToAbsolute; if (c(b).match(d) && (e = a._path2curve), d = /[clmz]/g, e == a._pathToAbsolute && !c(b).match(d)) { var g = c(b).replace(q, (a, b, c) => { let d = []; const e = b.toLowerCase() == 'm'; let g = p[b]; return c.replace(s, (a) => { e && d.length == 2 && (g += d + p[b == 'm' ? 'l' : 'L'], d = []), d.push(f(a * u)); }), g + d; }); return g; } let h; let i; const j = e(b); g = []; for (let k = 0, l = j.length; l > k; k++) { h = j[k], i = j[k][0].toLowerCase(), i == 'z' && (i = 'x'); for (let m = 1, r = h.length; r > m; m++)i += f(h[m] * u) + (m != r - 1 ? ',' : o); g.push(i); } return g.join(n); }; const y = function (b, c, d) { const e = a.matrix(); return e.rotate(-b, 0.5, 0.5), { dx: e.x(c, d), dy: e.y(c, d) }; }; const z = function (a, b, c, d, e, f) { const g = a._; const h = a.matrix; const k = g.fillpos; const l = a.node; const m = l.style; let o = 1; let p = ''; const q = u / b; const r = u / c; if (m.visibility = 'hidden', b && c) { if (l.coordsize = i(q) + n + i(r), m.rotation = f * (b * c < 0 ? -1 : 1), f) { var s = y(f, d, e); d = s.dx, e = s.dy; } if (b < 0 && (p += 'x'), c < 0 && (p += ' y') && (o = -1), m.flip = p, l.coordorigin = d * -q + n + e * -r, k || g.fillsize) { let t = l.getElementsByTagName(j); t = t && t[0], l.removeChild(t), k && (s = y(f, h.x(k[0], k[1]), h.y(k[0], k[1])), t.position = s.dx * o + n + s.dy * o), g.fillsize && (t.size = g.fillsize[0] * i(b) + n + g.fillsize[1] * i(c)), l.appendChild(t); }m.visibility = 'visible'; } }; a.toString = function () { return `Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël ${this.version}`; }; const A = function (a, b, d) { for (var e = c(b).toLowerCase().split('-'), f = d ? 'end' : 'start', g = e.length, h = 'classic', i = 'medium', j = 'medium'; g--;) switch (e[g]) { case 'block': case 'classic': case 'oval': case 'diamond': case 'open': case 'none': h = e[g]; break; case 'wide': case 'narrow': j = e[g]; break; case 'long': case 'short': i = e[g]; } const k = a.node.getElementsByTagName('stroke')[0]; k[`${f}arrow`] = h, k[`${f}arrowlength`] = i, k[`${f}arrowwidth`] = j; }; const B = function (e, i) { e.attrs = e.attrs || {}; const l = e.node; const m = e.attrs; let p = l.style; const q = v[e.type] && (i.x != m.x || i.y != m.y || i.width != m.width || i.height != m.height || i.cx != m.cx || i.cy != m.cy || i.rx != m.rx || i.ry != m.ry || i.r != m.r); const r = w[e.type] && (m.cx != i.cx || m.cy != i.cy || m.r != i.r || m.rx != i.rx || m.ry != i.ry); const s = e; for (const t in i)i[b](t) && (m[t] = i[t]); if (q && (m.path = a._getPath[e.type](e), e._.dirty = 1), i.href && (l.href = i.href), i.title && (l.title = i.title), i.target && (l.target = i.target), i.cursor && (p.cursor = i.cursor), 'blur' in i && e.blur(i.blur), (i.path && e.type == 'path' || q) && (l.path = x(~c(m.path).toLowerCase().indexOf('r') ? a._pathToAbsolute(m.path) : m.path), e.type == 'image' && (e._.fillpos = [m.x, m.y], e._.fillsize = [m.width, m.height], z(e, 1, 1, 0, 0, 0))), 'transform' in i && e.transform(i.transform), r) { const y = +m.cx; const B = +m.cy; const D = +m.rx || +m.r || 0; const E = +m.ry || +m.r || 0; l.path = a.format('ar{0},{1},{2},{3},{4},{1},{4},{1}x', f((y - D) * u), f((B - E) * u), f((y + D) * u), f((B + E) * u), f(y * u)); } if ('clip-rect' in i) { const G = c(i['clip-rect']).split(k); if (G.length == 4) { G[2] = +G[2] + +G[0], G[3] = +G[3] + +G[1]; const H = l.clipRect || a._g.doc.createElement('div'); const I = H.style; I.clip = a.format('rect({1}px {2}px {3}px {0}px)', G), l.clipRect || (I.position = 'absolute', I.top = 0, I.left = 0, I.width = `${e.paper.width}px`, I.height = `${e.paper.height}px`, l.parentNode.insertBefore(H, l), H.appendChild(l), l.clipRect = H); }i['clip-rect'] || l.clipRect && (l.clipRect.style.clip = 'auto'); } if (e.textpath) { const J = e.textpath.style; i.font && (J.font = i.font), i['font-family'] && (J.fontFamily = `"${i['font-family'].split(',')[0].replace(/^['"]+|['"]+$/g, o)}"`), i['font-size'] && (J.fontSize = i['font-size']), i['font-weight'] && (J.fontWeight = i['font-weight']), i['font-style'] && (J.fontStyle = i['font-style']); } if ('arrow-start' in i && A(s, i['arrow-start']), 'arrow-end' in i && A(s, i['arrow-end'], 1), i.opacity != null || i['stroke-width'] != null || i.fill != null || i.src != null || i.stroke != null || i['stroke-width'] != null || i['stroke-opacity'] != null || i['fill-opacity'] != null || i['stroke-dasharray'] != null || i['stroke-miterlimit'] != null || i['stroke-linejoin'] != null || i['stroke-linecap'] != null) { let K = l.getElementsByTagName(j); let L = !1; if (K = K && K[0], !K && (L = K = F(j)), e.type == 'image' && i.src && (K.src = i.src), i.fill && (K.on = !0), (K.on == null || i.fill == 'none' || i.fill === null) && (K.on = !1), K.on && i.fill) { const M = c(i.fill).match(a._ISURL); if (M) { K.parentNode == l && l.removeChild(K), K.rotate = !0, K.src = M[1], K.type = 'tile'; const N = e.getBBox(1); K.position = N.x + n + N.y, e._.fillpos = [N.x, N.y], a._preload(M[1], function () { e._.fillsize = [this.offsetWidth, this.offsetHeight]; }); } else K.color = a.getRGB(i.fill).hex, K.src = o, K.type = 'solid', a.getRGB(i.fill).error && (s.type in { circle: 1, ellipse: 1 } || c(i.fill).charAt() != 'r') && C(s, i.fill, K) && (m.fill = 'none', m.gradient = i.fill, K.rotate = !1); } if ('fill-opacity' in i || 'opacity' in i) { var O = ((+m['fill-opacity'] + 1 || 2) - 1) * ((+m.opacity + 1 || 2) - 1) * ((+a.getRGB(i.fill).o + 1 || 2) - 1); O = h(g(O, 0), 1), K.opacity = O, K.src && (K.color = 'none'); }l.appendChild(K); let P = l.getElementsByTagName('stroke') && l.getElementsByTagName('stroke')[0]; let Q = !1; !P && (Q = P = F('stroke')), (i.stroke && i.stroke != 'none' || i['stroke-width'] || i['stroke-opacity'] != null || i['stroke-dasharray'] || i['stroke-miterlimit'] || i['stroke-linejoin'] || i['stroke-linecap']) && (P.on = !0), (i.stroke == 'none' || i.stroke === null || P.on == null || i.stroke == 0 || i['stroke-width'] == 0) && (P.on = !1); const R = a.getRGB(i.stroke); P.on && i.stroke && (P.color = R.hex), O = ((+m['stroke-opacity'] + 1 || 2) - 1) * ((+m.opacity + 1 || 2) - 1) * ((+R.o + 1 || 2) - 1); let S = 0.75 * (d(i['stroke-width']) || 1); if (O = h(g(O, 0), 1), i['stroke-width'] == null && (S = m['stroke-width']), i['stroke-width'] && (P.weight = S), S && S < 1 && (O *= S) && (P.weight = 1), P.opacity = O, i['stroke-linejoin'] && (P.joinstyle = i['stroke-linejoin'] || 'miter'), P.miterlimit = i['stroke-miterlimit'] || 8, i['stroke-linecap'] && (P.endcap = i['stroke-linecap'] == 'butt' ? 'flat' : i['stroke-linecap'] == 'square' ? 'square' : 'round'), i['stroke-dasharray']) { const T = { '-': 'shortdash', '.': 'shortdot', '-.': 'shortdashdot', '-..': 'shortdashdotdot', '. ': 'dot', '- ': 'dash', '--': 'longdash', '- .': 'dashdot', '--.': 'longdashdot', '--..': 'longdashdotdot' }; P.dashstyle = T[b](i['stroke-dasharray']) ? T[i['stroke-dasharray']] : o; }Q && l.appendChild(P); } if (s.type == 'text') { s.paper.canvas.style.display = o; const U = s.paper.span; const V = 100; let W = m.font && m.font.match(/\d+(?:\.\d*)?(?=px)/); p = U.style, m.font && (p.font = m.font), m['font-family'] && (p.fontFamily = m['font-family']), m['font-weight'] && (p.fontWeight = m['font-weight']), m['font-style'] && (p.fontStyle = m['font-style']), W = d(m['font-size'] || W && W[0]) || 10, p.fontSize = `${W * V}px`, s.textpath.string && (U.innerHTML = c(s.textpath.string).replace(/')); const X = U.getBoundingClientRect(); s.W = m.w = (X.right - X.left) / V, s.H = m.h = (X.bottom - X.top) / V, s.X = m.x, s.Y = m.y + s.H / 2, ('x' in i || 'y' in i) && (s.path.v = a.format('m{0},{1}l{2},{1}', f(m.x * u), f(m.y * u), f(m.x * u) + 1)); for (let Y = ['x', 'y', 'text', 'font', 'font-family', 'font-weight', 'font-style', 'font-size'], Z = 0, $ = Y.length; $ > Z; Z++) if (Y[Z] in i) { s._.dirty = 1; break; } switch (m['text-anchor']) { case 'start': s.textpath.style['v-text-align'] = 'left', s.bbx = s.W / 2; break; case 'end': s.textpath.style['v-text-align'] = 'right', s.bbx = -s.W / 2; break; default: s.textpath.style['v-text-align'] = 'center', s.bbx = 0; }s.textpath.style['v-text-kern'] = !0; } }; var C = function (b, f, g) { b.attrs = b.attrs || {}; const h = (b.attrs, Math.pow); let i = 'linear'; let j = '.5 .5'; if (b.attrs.gradient = f, f = c(f).replace(a._radial_gradient, (a, b, c) => (i = 'radial', b && c && (b = d(b), c = d(c), (b - 0.5) ** 2 + (c - 0.5) ** 2 > 0.25 && (c = e.sqrt(0.25 - (b - 0.5) ** 2) * (2 * (c > 0.5) - 1) + 0.5), j = b + n + c), o)), f = f.split(/\s*\-\s*/), i == 'linear') { var k = f.shift(); if (k = -d(k), isNaN(k)) return null; } const l = a._parseDots(f); if (!l) return null; if (b = b.shape || b.node, l.length) { b.removeChild(g), g.on = !0, g.method = 'none', g.color = l[0].color, g.color2 = l[l.length - 1].color; for (var m = [], p = 0, q = l.length; q > p; p++)l[p].offset && m.push(l[p].offset + n + l[p].color); g.colors = m.length ? m.join() : `0% ${g.color}`, i == 'radial' ? (g.type = 'gradientTitle', g.focus = '100%', g.focussize = '0 0', g.focusposition = j, g.angle = 0) : (g.type = 'gradient', g.angle = (270 - k) % 360), b.appendChild(g); } return 1; }; const D = function (b, c) { this[0] = this.node = b, b.raphael = !0, this.id = a._oid++, b.raphaelid = this.id, this.X = 0, this.Y = 0, this.attrs = {}, this.paper = c, this.matrix = a.matrix(), this._ = { transform: [], sx: 1, sy: 1, dx: 0, dy: 0, deg: 0, dirty: 1, dirtyT: 1 }, !c.bottom && (c.bottom = this), this.prev = c.top, c.top && (c.top.next = this), c.top = this, this.next = null; }; const E = a.el; D.prototype = E, E.constructor = D, E.transform = function (b) { if (b == null) return this._.transform; let d; const e = this.paper._viewBoxShift; const f = e ? `s${[e.scale, e.scale]}-1-1t${[e.dx, e.dy]}` : o; e && (d = b = c(b).replace(/\.{3}|\u2026/g, this._.transform || o)), a._extractTransform(this, f + b); let g; const h = this.matrix.clone(); const i = this.skew; const j = this.node; const k = ~c(this.attrs.fill).indexOf('-'); const l = !c(this.attrs.fill).indexOf('url('); if (h.translate(-0.5, -0.5), l || k || this.type == 'image') if (i.matrix = '1 0 0 1', i.offset = '0 0', g = h.split(), k && g.noRotation || !g.isSimple) { j.style.filter = h.toFilter(); const m = this.getBBox(); const p = this.getBBox(1); const q = m.x - p.x; const r = m.y - p.y; j.coordorigin = q * -u + n + r * -u, z(this, 1, 1, q, r, 0); } else j.style.filter = o, z(this, g.scalex, g.scaley, g.dx, g.dy, g.rotate); else j.style.filter = o, i.matrix = c(h), i.offset = h.offset(); return d && (this._.transform = d), this; }, E.rotate = function (a, b, e) { if (this.removed) return this; if (a != null) { if (a = c(a).split(k), a.length - 1 && (b = d(a[1]), e = d(a[2])), a = d(a[0]), e == null && (b = e), b == null || e == null) { const f = this.getBBox(1); b = f.x + f.width / 2, e = f.y + f.height / 2; } return this._.dirtyT = 1, this.transform(this._.transform.concat([['r', a, b, e]])), this; } }, E.translate = function (a, b) { + return this.removed ? this : (a = c(a).split(k), a.length - 1 && (b = d(a[1])), a = d(a[0]) || 0, b = +b || 0, this._.bbox && (this._.bbox.x += a, this._.bbox.y += b), this.transform(this._.transform.concat([['t', a, b]])), this); + }, E.scale = function (a, b, e, f) { if (this.removed) return this; if (a = c(a).split(k), a.length - 1 && (b = d(a[1]), e = d(a[2]), f = d(a[3]), isNaN(e) && (e = null), isNaN(f) && (f = null)), a = d(a[0]), b == null && (b = a), f == null && (e = f), e == null || f == null) var g = this.getBBox(1); return e = e == null ? g.x + g.width / 2 : e, f = f == null ? g.y + g.height / 2 : f, this.transform(this._.transform.concat([['s', a, b, e, f]])), this._.dirtyT = 1, this; }, E.hide = function () { return !this.removed && (this.node.style.display = 'none'), this; }, E.show = function () { return !this.removed && (this.node.style.display = o), this; }, E._getBBox = function () { return this.removed ? {} : { x: this.X + (this.bbx || 0) - this.W / 2, y: this.Y - this.H, width: this.W, height: this.H }; }, E.remove = function () { if (!this.removed && this.node.parentNode) { this.paper.__set__ && this.paper.__set__.exclude(this), a.eve.unbind(`raphael.*.*.${this.id}`), a._tear(this, this.paper), this.node.parentNode.removeChild(this.node), this.shape && this.shape.parentNode.removeChild(this.shape); for (const b in this) this[b] = typeof this[b] === 'function' ? a._removedFactory(b) : null; this.removed = !0; } }, E.attr = function (c, d) { if (this.removed) return this; if (c == null) { const e = {}; for (const f in this.attrs) this.attrs[b](f) && (e[f] = this.attrs[f]); return e.gradient && e.fill == 'none' && (e.fill = e.gradient) && delete e.gradient, e.transform = this._.transform, e; } if (d == null && a.is(c, 'string')) { if (c == j && this.attrs.fill == 'none' && this.attrs.gradient) return this.attrs.gradient; for (var g = c.split(k), h = {}, i = 0, m = g.length; m > i; i++)c = g[i], h[c] = c in this.attrs ? this.attrs[c] : a.is(this.paper.customAttributes[c], 'function') ? this.paper.customAttributes[c].def : a._availableAttrs[c]; return m - 1 ? h : h[g[0]]; } if (this.attrs && d == null && a.is(c, 'array')) { for (h = {}, i = 0, m = c.length; m > i; i++)h[c[i]] = this.attr(c[i]); return h; } let n; d != null && (n = {}, n[c] = d), d == null && a.is(c, 'object') && (n = c); for (var o in n)l(`raphael.attr.${o}.${this.id}`, this, n[o]); if (n) { for (o in this.paper.customAttributes) if (this.paper.customAttributes[b](o) && n[b](o) && a.is(this.paper.customAttributes[o], 'function')) { const p = this.paper.customAttributes[o].apply(this, [].concat(n[o])); this.attrs[o] = n[o]; for (const q in p)p[b](q) && (n[q] = p[q]); }n.text && this.type == 'text' && (this.textpath.string = n.text), B(this, n); } return this; }, E.toFront = function () { return !this.removed && this.node.parentNode.appendChild(this.node), this.paper && this.paper.top != this && a._tofront(this, this.paper), this; }, E.toBack = function () { return this.removed ? this : (this.node.parentNode.firstChild != this.node && (this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild), a._toback(this, this.paper)), this); }, E.insertAfter = function (b) { return this.removed ? this : (b.constructor == a.st.constructor && (b = b[b.length - 1]), b.node.nextSibling ? b.node.parentNode.insertBefore(this.node, b.node.nextSibling) : b.node.parentNode.appendChild(this.node), a._insertafter(this, b, this.paper), this); }, E.insertBefore = function (b) { return this.removed ? this : (b.constructor == a.st.constructor && (b = b[0]), b.node.parentNode.insertBefore(this.node, b.node), a._insertbefore(this, b, this.paper), this); }, E.blur = function (b) { const c = this.node.runtimeStyle; let d = c.filter; d = d.replace(r, o), +b !== 0 ? (this.attrs.blur = b, c.filter = `${d + n + m}.Blur(pixelradius=${+b || 1.5})`, c.margin = a.format('-{0}px 0 0 -{0}px', f(+b || 1.5))) : (c.filter = d, c.margin = 0, delete this.attrs.blur); }, a._engine.path = function (a, b) { const c = F('shape'); c.style.cssText = t, c.coordsize = u + n + u, c.coordorigin = b.coordorigin; const d = new D(c, b); const e = { fill: 'none', stroke: '#000' }; a && (e.path = a), d.type = 'path', d.path = [], d.Path = o, B(d, e), b.canvas.appendChild(c); const f = F('skew'); return f.on = !0, c.appendChild(f), d.skew = f, d.transform(o), d; }, a._engine.rect = function (b, c, d, e, f, g) { const h = a._rectPath(c, d, e, f, g); const i = b.path(h); const j = i.attrs; return i.X = j.x = c, i.Y = j.y = d, i.W = j.width = e, i.H = j.height = f, j.r = g, j.path = h, i.type = 'rect', i; }, a._engine.ellipse = function (a, b, c, d, e) { { var f = a.path(); f.attrs; } return f.X = b - d, f.Y = c - e, f.W = 2 * d, f.H = 2 * e, f.type = 'ellipse', B(f, { cx: b, cy: c, rx: d, ry: e }), f; }, a._engine.circle = function (a, b, c, d) { { var e = a.path(); e.attrs; } return e.X = b - d, e.Y = c - d, e.W = e.H = 2 * d, e.type = 'circle', B(e, { cx: b, cy: c, r: d }), e; }, a._engine.image = function (b, c, d, e, f, g) { const h = a._rectPath(d, e, f, g); const i = b.path(h).attr({ stroke: 'none' }); const k = i.attrs; const l = i.node; const m = l.getElementsByTagName(j)[0]; return k.src = c, i.X = k.x = d, i.Y = k.y = e, i.W = k.width = f, i.H = k.height = g, k.path = h, i.type = 'image', m.parentNode == l && l.removeChild(m), m.rotate = !0, m.src = c, m.type = 'tile', i._.fillpos = [d, e], i._.fillsize = [f, g], l.appendChild(m), z(i, 1, 1, 0, 0, 0), i; }, a._engine.text = function (b, d, e, g) { const h = F('shape'); const i = F('path'); const j = F('textpath'); d = d || 0, e = e || 0, g = g || '', i.v = a.format('m{0},{1}l{2},{1}', f(d * u), f(e * u), f(d * u) + 1), i.textpathok = !0, j.string = c(g), j.on = !0, h.style.cssText = t, h.coordsize = u + n + u, h.coordorigin = '0 0'; const k = new D(h, b); const l = { fill: '#000', stroke: 'none', font: a._availableAttrs.font, text: g }; k.shape = h, k.path = i, k.textpath = j, k.type = 'text', k.attrs.text = c(g), k.attrs.x = d, k.attrs.y = e, k.attrs.w = 1, k.attrs.h = 1, B(k, l), h.appendChild(j), h.appendChild(i), b.canvas.appendChild(h); const m = F('skew'); return m.on = !0, h.appendChild(m), k.skew = m, k.transform(o), k; }, a._engine.setSize = function (b, c) { const d = this.canvas.style; return this.width = b, this.height = c, b == +b && (b += 'px'), c == +c && (c += 'px'), d.width = b, d.height = c, d.clip = `rect(0 ${b} ${c} 0)`, this._viewBox && a._engine.setViewBox.apply(this, this._viewBox), this; }, a._engine.setViewBox = function (b, c, d, e, f) { a.eve('raphael.setViewBox', this, this._viewBox, [b, c, d, e, f]); let h; let i; const j = this.width; const k = this.height; const l = 1 / g(d / j, e / k); return f && (h = k / e, i = j / d, j > d * h && (b -= (j - d * h) / 2 / h), k > e * i && (c -= (k - e * i) / 2 / i)), this._viewBox = [b, c, d, e, !!f], this._viewBoxShift = { dx: -b, dy: -c, scale: l }, this.forEach((a) => { a.transform('...'); }), this; }; let F; a._engine.initWin = function (a) { const b = a.document; b.createStyleSheet().addRule('.rvml', 'behavior:url(#default#VML)'); try { !b.namespaces.rvml && b.namespaces.add('rvml', 'urn:schemas-microsoft-com:vml'), F = function (a) { return b.createElement(``); }; } catch (c) { F = function (a) { return b.createElement(`<${a} xmlns="urn:schemas-microsoft.com:vml" class="rvml">`); }; } }, a._engine.initWin(a._g.win), a._engine.create = function () { + const b = a._getContainer.apply(0, arguments); const c = b.container; let d = b.height; let e = b.width; let f = b.x; let g = b.y; if (!c) throw new Error('VML container not found.'); const h = new a._Paper(); const i = h.canvas = a._g.doc.createElement('div'); const + j = i.style; return f = f || 0, g = g || 0, e = e || 512, d = d || 342, h.width = e, h.height = d, e == +e && (e += 'px'), d == +d && (d += 'px'), h.coordsize = 1e3 * u + n + 1e3 * u, h.coordorigin = '0 0', h.span = a._g.doc.createElement('span'), h.span.style.cssText = 'position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;', i.appendChild(h.span), j.cssText = a.format('top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden', e, d), c == 1 ? (a._g.doc.body.appendChild(i), j.left = `${f}px`, j.top = `${g}px`, j.position = 'absolute') : c.firstChild ? c.insertBefore(i, c.firstChild) : c.appendChild(i), h.renderfix = function () {}, h; + }, a.prototype.clear = function () { a.eve('raphael.clear', this), this.canvas.innerHTML = o, this.span = a._g.doc.createElement('span'), this.span.style.cssText = 'position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;', this.canvas.appendChild(this.span), this.bottom = this.top = null; }, a.prototype.remove = function () { a.eve('raphael.remove', this), this.canvas.parentNode.removeChild(this.canvas); for (const b in this) this[b] = typeof this[b] === 'function' ? a._removedFactory(b) : null; return !0; }; const G = a.st; for (const H in E)E[b](H) && !G[b](H) && (G[H] = (function (a) { return function () { const b = arguments; return this.forEach((c) => { c[a].apply(c, b); }); }; }(H))); +}(window.Raphael)), function () { + let a; let b; let c; let d; const e = [].slice; const f = {}.hasOwnProperty; const g = function (a, b) { function c() { this.constructor = a; } for (const d in b)f.call(b, d) && (a[d] = b[d]); return c.prototype = b.prototype, a.prototype = new c(), a.__super__ = b.prototype, a; }; const h = function (a, b) { return function () { return a.apply(b, arguments); }; }; const i = [].indexOf || function (a) { for (let b = 0, c = this.length; c > b; b++) if (b in this && this[b] === a) return b; return -1; }; b = window.Morris = {}, a = jQuery, b.EventEmitter = (function () { function a() {} return a.prototype.on = function (a, b) { return this.handlers == null && (this.handlers = {}), this.handlers[a] == null && (this.handlers[a] = []), this.handlers[a].push(b), this; }, a.prototype.fire = function () { let a; let b; let c; let d; let f; let g; let h; if (c = arguments[0], a = arguments.length >= 2 ? e.call(arguments, 1) : [], this.handlers != null && this.handlers[c] != null) { for (g = this.handlers[c], h = [], d = 0, f = g.length; f > d; d++)b = g[d], h.push(b.apply(null, a)); return h; } }, a; }()), b.commas = function (a) { let b; let c; let d; let e; return a != null ? (d = a < 0 ? '-' : '', b = Math.abs(a), c = Math.floor(b).toFixed(0), d += c.replace(/(?=(?:\d{3})+$)(?!^)/g, ','), e = b.toString(), e.length > c.length && (d += e.slice(c.length)), d) : '-'; }, b.pad2 = function (a) { return (a < 10 ? '0' : '') + a; }, b.Grid = (function (c) { + function d(b) { const c = this; if (this.el = typeof b.element === 'string' ? a(document.getElementById(b.element)) : a(b.element), this.el == null || this.el.length === 0) throw new Error('Graph container element not found'); this.el.css('position') === 'static' && this.el.css('position', 'relative'), this.options = a.extend({}, this.gridDefaults, this.defaults || {}, b), typeof this.options.units === 'string' && (this.options.postUnits = b.units), this.raphael = new Raphael(this.el[0]), this.elementWidth = null, this.elementHeight = null, this.dirty = !1, this.init && this.init(), this.setData(this.options.data), this.el.bind('mousemove', (a) => { let b; return b = c.el.offset(), c.fire('hovermove', a.pageX - b.left, a.pageY - b.top); }), this.el.bind('mouseout', () => c.fire('hoverout')), this.el.bind('touchstart touchmove touchend', (a) => { let b; let d; return d = a.originalEvent.touches[0] || a.originalEvent.changedTouches[0], b = c.el.offset(), c.fire('hover', d.pageX - b.left, d.pageY - b.top), d; }), this.el.bind('click', (a) => { let b; return b = c.el.offset(), c.fire('gridclick', a.pageX - b.left, a.pageY - b.top); }), this.postInit && this.postInit(); } return g(d, c), d.prototype.gridDefaults = { dateFormat: null, axes: !0, grid: !0, gridLineColor: '#aaa', gridStrokeWidth: 0.5, gridTextColor: '#888', gridTextSize: 12, gridTextFamily: 'sans-serif', gridTextWeight: 'normal', hideHover: !1, yLabelFormat: null, xLabelAngle: 0, numLines: 5, padding: 25, parseTime: !0, postUnits: '', preUnits: '', ymax: 'auto', ymin: 'auto 0', goals: [], goalStrokeWidth: 1, goalLineColors: ['#666633', '#999966', '#cc6666', '#663333'], events: [], eventStrokeWidth: 1, eventLineColors: ['#005a04', '#ccffbb', '#3a5f0b', '#005502'] }, d.prototype.setData = function (a, c) { let d; let e; let f; let g; let h; let i; let j; let k; let l; let m; let n; let o; let p; let q; return c == null && (c = !0), this.options.data = a, a == null || a.length === 0 ? (this.data = [], this.raphael.clear(), this.hover != null && this.hover.hide(), void 0) : (o = this.cumulative ? 0 : null, p = this.cumulative ? 0 : null, this.options.goals.length > 0 && (h = Math.min.apply(null, this.options.goals), g = Math.max.apply(null, this.options.goals), p = p != null ? Math.min(p, h) : h, o = o != null ? Math.max(o, g) : g), this.data = function () { let c; let d; let g; for (g = [], f = c = 0, d = a.length; d > c; f = ++c)j = a[f], i = {}, i.label = j[this.options.xkey], this.options.parseTime ? (i.x = b.parseDate(i.label), this.options.dateFormat ? i.label = this.options.dateFormat(i.x) : typeof i.label === 'number' && (i.label = new Date(i.label).toString())) : (i.x = f, this.options.xLabelFormat && (i.label = this.options.xLabelFormat(i))), l = 0, i.y = function () { let a; let b; let c; let d; for (c = this.options.ykeys, d = [], e = a = 0, b = c.length; b > a; e = ++a)n = c[e], q = j[n], typeof q === 'string' && (q = parseFloat(q)), q != null && typeof q !== 'number' && (q = null), q != null && (this.cumulative ? l += q : o != null ? (o = Math.max(q, o), p = Math.min(q, p)) : o = p = q), this.cumulative && l != null && (o = Math.max(l, o), p = Math.min(l, p)), d.push(q); return d; }.call(this), g.push(i); return g; }.call(this), this.options.parseTime && (this.data = this.data.sort((a, b) => (a.x > b.x) - (b.x > a.x))), this.xmin = this.data[0].x, this.xmax = this.data[this.data.length - 1].x, this.events = [], this.options.parseTime && this.options.events.length > 0 && (this.events = function () { let a; let c; let e; let f; for (e = this.options.events, f = [], a = 0, c = e.length; c > a; a++)d = e[a], f.push(b.parseDate(d)); return f; }.call(this), this.xmax = Math.max(this.xmax, Math.max.apply(null, this.events)), this.xmin = Math.min(this.xmin, Math.min.apply(null, this.events))), this.xmin === this.xmax && (this.xmin -= 1, this.xmax += 1), this.ymin = this.yboundary('min', p), this.ymax = this.yboundary('max', o), this.ymin === this.ymax && (p && (this.ymin -= 1), this.ymax += 1), (this.options.axes === !0 || this.options.grid === !0) && (this.options.ymax === this.gridDefaults.ymax && this.options.ymin === this.gridDefaults.ymin ? (this.grid = this.autoGridLines(this.ymin, this.ymax, this.options.numLines), this.ymin = Math.min(this.ymin, this.grid[0]), this.ymax = Math.max(this.ymax, this.grid[this.grid.length - 1])) : (k = (this.ymax - this.ymin) / (this.options.numLines - 1), this.grid = function () { let a; let b; let c; let d; for (d = [], m = a = b = this.ymin, c = this.ymax; c >= b ? c >= a : a >= c; m = a += k)d.push(m); return d; }.call(this))), this.dirty = !0, c ? this.redraw() : void 0); }, d.prototype.yboundary = function (a, b) { let c; let d; return c = this.options[`y${a}`], typeof c === 'string' ? c.slice(0, 4) === 'auto' ? c.length > 5 ? (d = parseInt(c.slice(5), 10), b == null ? d : Math[a](b, d)) : b != null ? b : 0 : parseInt(c, 10) : c; }, d.prototype.autoGridLines = function (a, b, c) { let d; let e; let f; let g; let h; let i; let j; let k; let l; return h = b - a, l = Math.floor(Math.log(h) / Math.log(10)), j = 10 ** l, e = Math.floor(a / j) * j, d = Math.ceil(b / j) * j, i = (d - e) / (c - 1), j === 1 && i > 1 && Math.ceil(i) !== i && (i = Math.ceil(i), d = e + i * (c - 1)), e < 0 && d > 0 && (e = Math.floor(a / i) * i, d = Math.ceil(b / i) * i), i < 1 ? (g = Math.floor(Math.log(i) / Math.log(10)), f = (function () { let a; let b; for (b = [], k = a = e; d >= e ? d >= a : a >= d; k = a += i)b.push(parseFloat(k.toFixed(1 - g))); return b; }())) : f = (function () { let a; let b; for (b = [], k = a = e; d >= e ? d >= a : a >= d; k = a += i)b.push(k); return b; }()), f; }, d.prototype._calc = function () { let a; let b; let c; let d; let e; let f; return e = this.el.width(), c = this.el.height(), (this.elementWidth !== e || this.elementHeight !== c || this.dirty) && (this.elementWidth = e, this.elementHeight = c, this.dirty = !1, this.left = this.options.padding, this.right = this.elementWidth - this.options.padding, this.top = this.options.padding, this.bottom = this.elementHeight - this.options.padding, this.options.axes && (f = function () { let a; let c; let d; let e; for (d = this.grid, e = [], a = 0, c = d.length; c > a; a++)b = d[a], e.push(this.measureText(this.yAxisFormat(b)).width); return e; }.call(this), this.left += Math.max.apply(Math, f), a = function () { let a; let b; let c; for (c = [], d = a = 0, b = this.data.length; b >= 0 ? b > a : a > b; d = b >= 0 ? ++a : --a)c.push(this.measureText(this.data[d].text, -this.options.xLabelAngle).height); return c; }.call(this), this.bottom -= Math.max.apply(Math, a)), this.width = Math.max(1, this.right - this.left), this.height = Math.max(1, this.bottom - this.top), this.dx = this.width / (this.xmax - this.xmin), this.dy = this.height / (this.ymax - this.ymin), this.calc) ? this.calc() : void 0; }, d.prototype.transY = function (a) { return this.bottom - (a - this.ymin) * this.dy; }, d.prototype.transX = function (a) { return this.data.length === 1 ? (this.left + this.right) / 2 : this.left + (a - this.xmin) * this.dx; }, d.prototype.redraw = function () { return this.raphael.clear(), this._calc(), this.drawGrid(), this.drawGoals(), this.drawEvents(), this.draw ? this.draw() : void 0; }, d.prototype.measureText = function (a, b) { + let c; let d; return b == null && (b = 0), d = this.raphael.text(100, 100, a).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight) + .rotate(b), c = d.getBBox(), d.remove(), c; + }, d.prototype.yAxisFormat = function (a) { return this.yLabelFormat(a); }, d.prototype.yLabelFormat = function (a) { return typeof this.options.yLabelFormat === 'function' ? this.options.yLabelFormat(a) : `${this.options.preUnits}${b.commas(a)}${this.options.postUnits}`; }, d.prototype.updateHover = function (a, b) { let c; let d; return c = this.hitTest(a, b), c != null ? (d = this.hover).update.apply(d, c) : void 0; }, d.prototype.drawGrid = function () { let a; let b; let c; let d; let e; let f; if (this.options.grid !== !1 || this.options.axes !== !1) { for (e = this.grid, f = [], c = 0, d = e.length; d > c; c++)a = e[c], b = this.transY(a), this.options.axes && this.drawYAxisLabel(this.left - this.options.padding / 2, b, this.yAxisFormat(a)), this.options.grid ? f.push(this.drawGridLine(`M${this.left},${b}H${this.left + this.width}`)) : f.push(void 0); return f; } }, d.prototype.drawGoals = function () { let a; let b; let c; let d; let e; let f; let g; for (f = this.options.goals, g = [], c = d = 0, e = f.length; e > d; c = ++d)b = f[c], a = this.options.goalLineColors[c % this.options.goalLineColors.length], g.push(this.drawGoal(b, a)); return g; }, d.prototype.drawEvents = function () { let a; let b; let c; let d; let e; let f; let g; for (f = this.events, g = [], c = d = 0, e = f.length; e > d; c = ++d)b = f[c], a = this.options.eventLineColors[c % this.options.eventLineColors.length], g.push(this.drawEvent(b, a)); return g; }, d.prototype.drawGoal = function (a, b) { return this.raphael.path(`M${this.left},${this.transY(a)}H${this.right}`).attr('stroke', b).attr('stroke-width', this.options.goalStrokeWidth); }, d.prototype.drawEvent = function (a, b) { return this.raphael.path(`M${this.transX(a)},${this.bottom}V${this.top}`).attr('stroke', b).attr('stroke-width', this.options.eventStrokeWidth); }, d.prototype.drawYAxisLabel = function (a, b, c) { + return this.raphael.text(a, b, c).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight) + .attr('fill', this.options.gridTextColor) + .attr('text-anchor', 'end'); + }, d.prototype.drawGridLine = function (a) { return this.raphael.path(a).attr('stroke', this.options.gridLineColor).attr('stroke-width', this.options.gridStrokeWidth); }, d; + }(b.EventEmitter)), b.parseDate = function (a) { let b; let c; let d; let e; let f; let g; let h; let i; let j; let k; let l; return typeof a === 'number' ? a : (c = a.match(/^(\d+) Q(\d)$/), e = a.match(/^(\d+)-(\d+)$/), f = a.match(/^(\d+)-(\d+)-(\d+)$/), h = a.match(/^(\d+) W(\d+)$/), i = a.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/), j = a.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/), c ? new Date(parseInt(c[1], 10), 3 * parseInt(c[2], 10) - 1, 1).getTime() : e ? new Date(parseInt(e[1], 10), parseInt(e[2], 10) - 1, 1).getTime() : f ? new Date(parseInt(f[1], 10), parseInt(f[2], 10) - 1, parseInt(f[3], 10)).getTime() : h ? (k = new Date(parseInt(h[1], 10), 0, 1), k.getDay() !== 4 && k.setMonth(0, 1 + (4 - k.getDay() + 7) % 7), k.getTime() + 6048e5 * parseInt(h[2], 10)) : i ? i[6] ? (g = 0, i[6] !== 'Z' && (g = 60 * parseInt(i[8], 10) + parseInt(i[9], 10), i[7] === '+' && (g = 0 - g)), Date.UTC(parseInt(i[1], 10), parseInt(i[2], 10) - 1, parseInt(i[3], 10), parseInt(i[4], 10), parseInt(i[5], 10) + g)) : new Date(parseInt(i[1], 10), parseInt(i[2], 10) - 1, parseInt(i[3], 10), parseInt(i[4], 10), parseInt(i[5], 10)).getTime() : j ? (l = parseFloat(j[6]), b = Math.floor(l), d = Math.round(1e3 * (l - b)), j[8] ? (g = 0, j[8] !== 'Z' && (g = 60 * parseInt(j[10], 10) + parseInt(j[11], 10), j[9] === '+' && (g = 0 - g)), Date.UTC(parseInt(j[1], 10), parseInt(j[2], 10) - 1, parseInt(j[3], 10), parseInt(j[4], 10), parseInt(j[5], 10) + g, b, d)) : new Date(parseInt(j[1], 10), parseInt(j[2], 10) - 1, parseInt(j[3], 10), parseInt(j[4], 10), parseInt(j[5], 10), b, d).getTime()) : new Date(parseInt(a, 10), 0, 1).getTime()); }, b.Hover = (function () { function c(c) { c == null && (c = {}), this.options = a.extend({}, b.Hover.defaults, c), this.el = a(`
`), this.el.hide(), this.options.parent.append(this.el); } return c.defaults = { class: 'morris-hover morris-default-style' }, c.prototype.update = function (a, b, c) { return this.html(a), this.show(), this.moveTo(b, c); }, c.prototype.html = function (a) { return this.el.html(a); }, c.prototype.moveTo = function (a, b) { let c; let d; let e; let f; let g; let h; return g = this.options.parent.innerWidth(), f = this.options.parent.innerHeight(), d = this.el.outerWidth(), c = this.el.outerHeight(), e = Math.min(Math.max(0, a - d / 2), g - d), b != null ? (h = b - c - 10, h < 0 && (h = b + 10, h + c > f && (h = f / 2 - c / 2))) : h = f / 2 - c / 2, this.el.css({ left: `${e}px`, top: `${parseInt(h)}px` }); }, c.prototype.show = function () { return this.el.show(); }, c.prototype.hide = function () { return this.el.hide(); }, c; }()), b.Line = (function (a) { + function c(a) { return this.hilight = h(this.hilight, this), this.onHoverOut = h(this.onHoverOut, this), this.onHoverMove = h(this.onHoverMove, this), this.onGridClick = h(this.onGridClick, this), this instanceof b.Line ? (c.__super__.constructor.call(this, a), void 0) : new b.Line(a); } return g(c, a), c.prototype.init = function () { return this.pointGrow = Raphael.animation({ r: this.options.pointSize + 3 }, 25, 'linear'), this.pointShrink = Raphael.animation({ r: this.options.pointSize }, 25, 'linear'), this.options.hideHover !== 'always' ? (this.hover = new b.Hover({ parent: this.el }), this.on('hovermove', this.onHoverMove), this.on('hoverout', this.onHoverOut), this.on('gridclick', this.onGridClick)) : void 0; }, c.prototype.defaults = { lineWidth: 3, pointSize: 4, lineColors: ['#0b62a4', '#7A92A3', '#4da74d', '#afd8f8', '#edc240', '#cb4b4b', '#9440ed'], pointWidths: [1], pointStrokeColors: ['#ffffff'], pointFillColors: [], smooth: !0, xLabels: 'auto', xLabelFormat: null, xLabelMargin: 24, continuousLine: !0, hideHover: !1 }, c.prototype.calc = function () { return this.calcPoints(), this.generatePaths(); }, c.prototype.calcPoints = function () { let a; let b; let c; let d; let e; let f; for (e = this.data, f = [], c = 0, d = e.length; d > c; c++)a = e[c], a._x = this.transX(a.x), a._y = function () { let c; let d; let e; let f; for (e = a.y, f = [], c = 0, d = e.length; d > c; c++)b = e[c], b != null ? f.push(this.transY(b)) : f.push(b); return f; }.call(this), f.push(a._ymax = Math.min.apply(null, [this.bottom].concat(function () { let c; let d; let e; let f; for (e = a._y, f = [], c = 0, d = e.length; d > c; c++)b = e[c], b != null && f.push(b); return f; }()))); return f; }, c.prototype.hitTest = function (a) { let b; let c; let d; let e; let f; if (this.data.length === 0) return null; for (f = this.data.slice(1), b = d = 0, e = f.length; e > d && (c = f[b], !(a < (c._x + this.data[b]._x) / 2)); b = ++d);return b; }, c.prototype.onGridClick = function (a, b) { let c; return c = this.hitTest(a, b), this.fire('click', c, this.options.data[c], a, b); }, c.prototype.onHoverMove = function (a, b) { let c; return c = this.hitTest(a, b), this.displayHoverForRow(c); }, c.prototype.onHoverOut = function () { return this.options.hideHover !== !1 ? this.displayHoverForRow(null) : void 0; }, c.prototype.displayHoverForRow = function (a) { let b; return a != null ? ((b = this.hover).update.apply(b, this.hoverContentForRow(a)), this.hilight(a)) : (this.hover.hide(), this.hilight()); }, c.prototype.hoverContentForRow = function (a) { let b; let c; let d; let e; let f; let g; let h; for (d = this.data[a], b = `
${d.label}
`, h = d.y, c = f = 0, g = h.length; g > f; c = ++f)e = h[c], b += `
\n ${this.options.labels[c]}:\n ${this.yLabelFormat(e)}\n
`; return typeof this.options.hoverCallback === 'function' && (b = this.options.hoverCallback(a, this.options, b)), [b, d._x, d._ymax]; }, c.prototype.generatePaths = function () { let a; let c; let d; let e; let f; return this.paths = function () { let g; let h; let j; let k; for (k = [], d = g = 0, h = this.options.ykeys.length; h >= 0 ? h > g : g > h; d = h >= 0 ? ++g : --g)f = this.options.smooth === !0 || (j = this.options.ykeys[d], i.call(this.options.smooth, j) >= 0), c = function () { let a; let b; let c; let f; for (c = this.data, f = [], a = 0, b = c.length; b > a; a++)e = c[a], void 0 !== e._y[d] && f.push({ x: e._x, y: e._y[d] }); return f; }.call(this), this.options.continuousLine && (c = (function () { let b; let d; let e; for (e = [], b = 0, d = c.length; d > b; b++)a = c[b], a.y !== null && e.push(a); return e; }())), c.length > 1 ? k.push(b.Line.createPath(c, f, this.bottom)) : k.push(null); return k; }.call(this); }, c.prototype.draw = function () { return this.options.axes && this.drawXAxis(), this.drawSeries(), this.options.hideHover === !1 ? this.displayHoverForRow(this.data.length - 1) : void 0; }, c.prototype.drawXAxis = function () { let a; let c; let d; let e; let f; let g; let h; let i; let j; let k; const l = this; for (h = this.bottom + this.options.padding / 2, f = null, e = null, a = function (a, b) { let c; let d; let g; let i; let j; return c = l.drawXAxisLabel(l.transX(b), h, a), j = c.getBBox(), c.transform(`r${-l.options.xLabelAngle}`), d = c.getBBox(), c.transform(`t0,${d.height / 2}...`), l.options.xLabelAngle !== 0 && (i = -0.5 * j.width * Math.cos(l.options.xLabelAngle * Math.PI / 180), c.transform(`t${i},0...`)), d = c.getBBox(), (f == null || f >= d.x + d.width || e != null && e >= d.x) && d.x >= 0 && d.x + d.width < l.el.width() ? (l.options.xLabelAngle !== 0 && (g = 1.25 * l.options.gridTextSize / Math.sin(l.options.xLabelAngle * Math.PI / 180), e = d.x - g), f = d.x - l.options.xLabelMargin) : c.remove(); }, d = this.options.parseTime ? this.data.length === 1 && this.options.xLabels === 'auto' ? [[this.data[0].label, this.data[0].x]] : b.labelSeries(this.xmin, this.xmax, this.width, this.options.xLabels, this.options.xLabelFormat) : function () { let a; let b; let c; let d; for (c = this.data, d = [], a = 0, b = c.length; b > a; a++)g = c[a], d.push([g.label, g.x]); return d; }.call(this), d.reverse(), k = [], i = 0, j = d.length; j > i; i++)c = d[i], k.push(a(c[0], c[1])); return k; }, c.prototype.drawSeries = function () { let a; let b; let c; let d; let e; let f; for (this.seriesPoints = [], a = b = d = this.options.ykeys.length - 1; d <= 0 ? b <= 0 : b >= 0; a = d <= 0 ? ++b : --b) this._drawLineFor(a); for (f = [], a = c = e = this.options.ykeys.length - 1; e <= 0 ? c <= 0 : c >= 0; a = e <= 0 ? ++c : --c)f.push(this._drawPointFor(a)); return f; }, c.prototype._drawPointFor = function (a) { let b; let c; let d; let e; let f; let g; for (this.seriesPoints[a] = [], f = this.data, g = [], d = 0, e = f.length; e > d; d++)c = f[d], b = null, c._y[a] != null && (b = this.drawLinePoint(c._x, c._y[a], this.options.pointSize, this.colorFor(c, a, 'point'), a)), g.push(this.seriesPoints[a].push(b)); return g; }, c.prototype._drawLineFor = function (a) { let b; return b = this.paths[a], b !== null ? this.drawLinePath(b, this.colorFor(null, a, 'line')) : void 0; }, c.createPath = function (a, c, d) { let e; let f; let g; let h; let i; let j; let k; let l; let m; let n; let o; let p; let q; let r; for (k = '', c && (g = b.Line.gradients(a)), l = { y: null }, h = q = 0, r = a.length; r > q; h = ++q)e = a[h], e.y != null && (l.y != null ? c ? (f = g[h], j = g[h - 1], i = (e.x - l.x) / 4, m = l.x + i, o = Math.min(d, l.y + i * j), n = e.x - i, p = Math.min(d, e.y - i * f), k += `C${m},${o},${n},${p},${e.x},${e.y}`) : k += `L${e.x},${e.y}` : c && g[h] == null || (k += `M${e.x},${e.y}`)), l = e; return k; }, c.gradients = function (a) { let b; let c; let d; let e; let f; let g; let h; let i; for (c = function (a, b) { return (a.y - b.y) / (a.x - b.x); }, i = [], d = g = 0, h = a.length; h > g; d = ++g)b = a[d], b.y != null ? (e = a[d + 1] || { y: null }, f = a[d - 1] || { y: null }, f.y != null && e.y != null ? i.push(c(f, e)) : f.y != null ? i.push(c(f, b)) : e.y != null ? i.push(c(b, e)) : i.push(null)) : i.push(null); return i; }, c.prototype.hilight = function (a) { let b; let c; let d; let e; let f; if (this.prevHilight !== null && this.prevHilight !== a) for (b = c = 0, e = this.seriesPoints.length - 1; e >= 0 ? e >= c : c >= e; b = e >= 0 ? ++c : --c) this.seriesPoints[b][this.prevHilight] && this.seriesPoints[b][this.prevHilight].animate(this.pointShrink); if (a !== null && this.prevHilight !== a) for (b = d = 0, f = this.seriesPoints.length - 1; f >= 0 ? f >= d : d >= f; b = f >= 0 ? ++d : --d) this.seriesPoints[b][a] && this.seriesPoints[b][a].animate(this.pointGrow); return this.prevHilight = a; }, c.prototype.colorFor = function (a, b, c) { return typeof this.options.lineColors === 'function' ? this.options.lineColors.call(this, a, b, c) : c === 'point' ? this.options.pointFillColors[b % this.options.pointFillColors.length] || this.options.lineColors[b % this.options.lineColors.length] : this.options.lineColors[b % this.options.lineColors.length]; }, c.prototype.drawXAxisLabel = function (a, b, c) { + return this.raphael.text(a, b, c).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight) + .attr('fill', this.options.gridTextColor); + }, c.prototype.drawLinePath = function (a, b) { return this.raphael.path(a).attr('stroke', b).attr('stroke-width', this.options.lineWidth); }, c.prototype.drawLinePoint = function (a, b, c, d, e) { return this.raphael.circle(a, b, c).attr('fill', d).attr('stroke-width', this.strokeWidthForSeries(e)).attr('stroke', this.strokeForSeries(e)); }, c.prototype.strokeWidthForSeries = function (a) { return this.options.pointWidths[a % this.options.pointWidths.length]; }, c.prototype.strokeForSeries = function (a) { return this.options.pointStrokeColors[a % this.options.pointStrokeColors.length]; }, c; + }(b.Grid)), b.labelSeries = function (c, d, e, f, g) { let h; let i; let j; let k; let l; let m; let n; let o; let p; let q; let r; if (j = 200 * (d - c) / e, i = new Date(c), n = b.LABEL_SPECS[f], void 0 === n) for (r = b.AUTO_LABEL_ORDER, p = 0, q = r.length; q > p; p++) if (k = r[p], m = b.LABEL_SPECS[k], j >= m.span) { n = m; break; } for (void 0 === n && (n = b.LABEL_SPECS.second), g && (n = a.extend({}, n, { fmt: g })), h = n.start(i), l = []; (o = h.getTime()) <= d;)o >= c && l.push([n.fmt(h), o]), n.incr(h); return l; }, c = function (a) { return { span: 60 * a * 1e3, start: function (a) { return new Date(a.getFullYear(), a.getMonth(), a.getDate(), a.getHours()); }, fmt: function (a) { return `${b.pad2(a.getHours())}:${b.pad2(a.getMinutes())}`; }, incr: function (b) { return b.setUTCMinutes(b.getUTCMinutes() + a); } }; }, d = function (a) { return { span: 1e3 * a, start: function (a) { return new Date(a.getFullYear(), a.getMonth(), a.getDate(), a.getHours(), a.getMinutes()); }, fmt: function (a) { return `${b.pad2(a.getHours())}:${b.pad2(a.getMinutes())}:${b.pad2(a.getSeconds())}`; }, incr: function (b) { return b.setUTCSeconds(b.getUTCSeconds() + a); } }; }, b.LABEL_SPECS = { decade: { span: 1728e8, start: function (a) { return new Date(a.getFullYear() - a.getFullYear() % 10, 0, 1); }, fmt: function (a) { return `${a.getFullYear()}`; }, incr: function (a) { return a.setFullYear(a.getFullYear() + 10); } }, year: { span: 1728e7, start: function (a) { return new Date(a.getFullYear(), 0, 1); }, fmt: function (a) { return `${a.getFullYear()}`; }, incr: function (a) { return a.setFullYear(a.getFullYear() + 1); } }, month: { span: 24192e5, start: function (a) { return new Date(a.getFullYear(), a.getMonth(), 1); }, fmt: function (a) { return `${a.getFullYear()}-${b.pad2(a.getMonth() + 1)}`; }, incr: function (a) { return a.setMonth(a.getMonth() + 1); } }, day: { span: 864e5, start: function (a) { return new Date(a.getFullYear(), a.getMonth(), a.getDate()); }, fmt: function (a) { return `${a.getFullYear()}-${b.pad2(a.getMonth() + 1)}-${b.pad2(a.getDate())}`; }, incr: function (a) { return a.setDate(a.getDate() + 1); } }, hour: c(60), '30min': c(30), '15min': c(15), '10min': c(10), '5min': c(5), minute: c(1), '30sec': d(30), '15sec': d(15), '10sec': d(10), '5sec': d(5), second: d(1) }, b.AUTO_LABEL_ORDER = ['decade', 'year', 'month', 'day', 'hour', '30min', '15min', '10min', '5min', 'minute', '30sec', '15sec', '10sec', '5sec', 'second'], b.Area = (function (c) { function d(c) { let f; return this instanceof b.Area ? (f = a.extend({}, e, c), this.cumulative = !f.behaveLikeLine, f.fillOpacity === 'auto' && (f.fillOpacity = f.behaveLikeLine ? 0.8 : 1), d.__super__.constructor.call(this, f), void 0) : new b.Area(c); } let e; return g(d, c), e = { fillOpacity: 'auto', behaveLikeLine: !1 }, d.prototype.calcPoints = function () { let a; let b; let c; let d; let e; let f; let g; for (f = this.data, g = [], d = 0, e = f.length; e > d; d++)a = f[d], a._x = this.transX(a.x), b = 0, a._y = function () { let d; let e; let f; let g; for (f = a.y, g = [], d = 0, e = f.length; e > d; d++)c = f[d], this.options.behaveLikeLine ? g.push(this.transY(c)) : (b += c || 0, g.push(this.transY(b))); return g; }.call(this), g.push(a._ymax = Math.max.apply(Math, a._y)); return g; }, d.prototype.drawSeries = function () { let a; let b; let c; let d; let e; let f; let g; let h; for (this.seriesPoints = [], b = this.options.behaveLikeLine ? function () { f = []; for (let a = 0, b = this.options.ykeys.length - 1; b >= 0 ? b >= a : a >= b; b >= 0 ? a++ : a--)f.push(a); return f; }.apply(this) : function () { g = []; for (let a = e = this.options.ykeys.length - 1; e <= 0 ? a <= 0 : a >= 0; e <= 0 ? a++ : a--)g.push(a); return g; }.apply(this), h = [], c = 0, d = b.length; d > c; c++)a = b[c], this._drawFillFor(a), this._drawLineFor(a), h.push(this._drawPointFor(a)); return h; }, d.prototype._drawFillFor = function (a) { let b; return b = this.paths[a], b !== null ? (b += `L${this.transX(this.xmax)},${this.bottom}L${this.transX(this.xmin)},${this.bottom}Z`, this.drawFilledPath(b, this.fillForSeries(a))) : void 0; }, d.prototype.fillForSeries = function (a) { let b; return b = Raphael.rgb2hsl(this.colorFor(this.data[a], a, 'line')), Raphael.hsl(b.h, this.options.behaveLikeLine ? 0.9 * b.s : 0.75 * b.s, Math.min(0.98, this.options.behaveLikeLine ? 1.2 * b.l : 1.25 * b.l)); }, d.prototype.drawFilledPath = function (a, b) { return this.raphael.path(a).attr('fill', b).attr('fill-opacity', this.options.fillOpacity).attr('stroke-width', 0); }, d; }(b.Line)), b.Bar = (function (c) { + function d(c) { return this.onHoverOut = h(this.onHoverOut, this), this.onHoverMove = h(this.onHoverMove, this), this.onGridClick = h(this.onGridClick, this), this instanceof b.Bar ? (d.__super__.constructor.call(this, a.extend({}, c, { parseTime: !1 })), void 0) : new b.Bar(c); } return g(d, c), d.prototype.init = function () { return this.cumulative = this.options.stacked, this.options.hideHover !== 'always' ? (this.hover = new b.Hover({ parent: this.el }), this.on('hovermove', this.onHoverMove), this.on('hoverout', this.onHoverOut), this.on('gridclick', this.onGridClick)) : void 0; }, d.prototype.defaults = { barSizeRatio: 0.75, barGap: 3, barColors: ['#0b62a4', '#7a92a3', '#4da74d', '#afd8f8', '#edc240', '#cb4b4b', '#9440ed'], xLabelMargin: 50 }, d.prototype.calc = function () { let a; return this.calcBars(), this.options.hideHover === !1 ? (a = this.hover).update.apply(a, this.hoverContentForRow(this.data.length - 1)) : void 0; }, d.prototype.calcBars = function () { let a; let b; let c; let d; let e; let f; let g; for (f = this.data, g = [], a = d = 0, e = f.length; e > d; a = ++d)b = f[a], b._x = this.left + this.width * (a + 0.5) / this.data.length, g.push(b._y = function () { let a; let d; let e; let f; for (e = b.y, f = [], a = 0, d = e.length; d > a; a++)c = e[a], c != null ? f.push(this.transY(c)) : f.push(null); return f; }.call(this)); return g; }, d.prototype.draw = function () { return this.options.axes && this.drawXAxis(), this.drawSeries(); }, d.prototype.drawXAxis = function () { + let a; let b; let c; let d; let e; let f; let g; let h; let i; let j; let k; let l; let m; for (j = this.bottom + this.options.padding / 2, g = null, f = null, m = [], a = k = 0, l = this.data.length; l >= 0 ? l > k : k > l; a = l >= 0 ? ++k : --k)h = this.data[this.data.length - 1 - a], b = this.drawXAxisLabel(h._x, j, h.label), i = b.getBBox(), b.transform(`r${-this.options.xLabelAngle}`), c = b.getBBox(), b.transform(`t0,${c.height / 2}...`), this.options.xLabelAngle !== 0 && (e = -0.5 * i.width * Math.cos(this.options.xLabelAngle * Math.PI / 180), b.transform(`t${e},0...`)), (g == null || g >= c.x + c.width || f != null && f >= c.x) && c.x >= 0 && c.x + c.width < this.el.width() ? (this.options.xLabelAngle !== 0 && (d = 1.25 * this.options.gridTextSize / Math.sin(this.options.xLabelAngle * Math.PI / 180), f = c.x - d), m.push(g = c.x - this.options.xLabelMargin)) : m.push(b.remove()); + return m; + }, d.prototype.drawSeries = function () { let a; let b; let c; let d; let e; let f; let g; let h; let i; let j; let k; let l; let m; let n; return c = this.width / this.options.data.length, h = this.options.stacked != null ? 1 : this.options.ykeys.length, a = (c * this.options.barSizeRatio - this.options.barGap * (h - 1)) / h, g = c * (1 - this.options.barSizeRatio) / 2, n = this.ymin <= 0 && this.ymax >= 0 ? this.transY(0) : null, this.bars = function () { let h; let o; let p; let q; for (p = this.data, q = [], d = h = 0, o = p.length; o > h; d = ++h)i = p[d], e = 0, q.push(function () { let h; let o; let p; let q; for (p = i._y, q = [], j = h = 0, o = p.length; o > h; j = ++h)m = p[j], m !== null ? (n ? (l = Math.min(m, n), b = Math.max(m, n)) : (l = m, b = this.bottom), f = this.left + d * c + g, this.options.stacked || (f += j * (a + this.options.barGap)), k = b - l, this.options.stacked && (l -= e), this.drawBar(f, l, a, k, this.colorFor(i, j, 'bar')), q.push(e += k)) : q.push(null); return q; }.call(this)); return q; }.call(this); }, d.prototype.colorFor = function (a, b, c) { let d; let e; return typeof this.options.barColors === 'function' ? (d = { x: a.x, y: a.y[b], label: a.label }, e = { index: b, key: this.options.ykeys[b], label: this.options.labels[b] }, this.options.barColors.call(this, d, e, c)) : this.options.barColors[b % this.options.barColors.length]; }, d.prototype.hitTest = function (a) { return this.data.length === 0 ? null : (a = Math.max(Math.min(a, this.right), this.left), Math.min(this.data.length - 1, Math.floor((a - this.left) / (this.width / this.data.length)))); }, d.prototype.onGridClick = function (a, b) { let c; return c = this.hitTest(a, b), this.fire('click', c, this.options.data[c], a, b); }, d.prototype.onHoverMove = function (a, b) { let c; let d; return c = this.hitTest(a, b), (d = this.hover).update.apply(d, this.hoverContentForRow(c)); }, d.prototype.onHoverOut = function () { return this.options.hideHover !== !1 ? this.hover.hide() : void 0; }, d.prototype.hoverContentForRow = function (a) { let b; let c; let d; let e; let f; let g; let h; let i; for (d = this.data[a], b = `
${d.label}
`, i = d.y, c = g = 0, h = i.length; h > g; c = ++g)f = i[c], b += `
\n ${this.options.labels[c]}:\n ${this.yLabelFormat(f)}\n
`; return typeof this.options.hoverCallback === 'function' && (b = this.options.hoverCallback(a, this.options, b)), e = this.left + (a + 0.5) * this.width / this.data.length, [b, e]; }, d.prototype.drawXAxisLabel = function (a, b, c) { + let d; return d = this.raphael.text(a, b, c).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight) + .attr('fill', this.options.gridTextColor); + }, d.prototype.drawBar = function (a, b, c, d, e) { return this.raphael.rect(a, b, c, d).attr('fill', e).attr('stroke-width', 0); }, d; + }(b.Grid)), b.Donut = (function (c) { function d(c) { this.select = h(this.select, this), this.click = h(this.click, this); let d; if (!(this instanceof b.Donut)) return new b.Donut(c); if (this.el = typeof c.element === 'string' ? a(document.getElementById(c.element)) : a(c.element), this.options = a.extend({}, this.defaults, c), this.el === null || this.el.length === 0) throw new Error('Graph placeholder not found.'); void 0 !== c.data && c.data.length !== 0 && (this.data = c.data, this.values = function () { let a; let b; let c; let e; for (c = this.data, e = [], a = 0, b = c.length; b > a; a++)d = c[a], e.push(parseFloat(d.value)); return e; }.call(this), this.redraw()); } return g(d, c), d.prototype.defaults = { colors: ['#0B62A4', '#3980B5', '#679DC6', '#95BBD7', '#B0CCE1', '#095791', '#095085', '#083E67', '#052C48', '#042135'], backgroundColor: '#FFFFFF', labelColor: '#000000', formatter: b.commas }, d.prototype.redraw = function () { let a; let c; let d; let e; let f; let g; let h; let i; let j; let k; let l; let m; let n; let o; let p; let q; let r; let s; let t; let u; let v; let w; let x; for (this.el.empty(), this.raphael = new Raphael(this.el[0]), c = this.el.width() / 2, d = this.el.height() / 2, n = (Math.min(c, d) - 10) / 3, l = 0, u = this.values, o = 0, r = u.length; r > o; o++)m = u[o], l += m; for (i = 5 / (2 * n), a = 1.9999 * Math.PI - i * this.data.length, g = 0, f = 0, this.segments = [], v = this.values, e = p = 0, s = v.length; s > p; e = ++p)m = v[e], j = g + i + a * (m / l), k = new b.DonutSegment(c, d, 2 * n, n, g, j, this.options.colors[f % this.options.colors.length], this.options.backgroundColor, f, this.raphael), k.render(), this.segments.push(k), k.on('hover', this.select), k.on('click', this.click), g = j, f += 1; for (this.text1 = this.drawEmptyDonutLabel(c, d - 10, this.options.labelColor, 15, 800), this.text2 = this.drawEmptyDonutLabel(c, d + 10, this.options.labelColor, 14), h = Math.max.apply(null, function () { let a; let b; let c; let d; for (c = this.values, d = [], a = 0, b = c.length; b > a; a++)m = c[a], d.push(m); return d; }.call(this)), f = 0, w = this.values, x = [], q = 0, t = w.length; t > q; q++) { if (m = w[q], m === h) { this.select(f); break; }x.push(f += 1); } return x; }, d.prototype.click = function (a) { return this.fire('click', a, this.data[a]); }, d.prototype.select = function (a) { let b; let c; let d; let e; let f; let g; for (g = this.segments, e = 0, f = g.length; f > e; e++)c = g[e], c.deselect(); return d = this.segments[a], d.select(), b = this.data[a], this.setLabels(b.label, this.options.formatter(b.value, b)); }, d.prototype.setLabels = function (a, b) { let c; let d; let e; let f; let g; let h; let i; let j; return c = 2 * (Math.min(this.el.width() / 2, this.el.height() / 2) - 10) / 3, f = 1.8 * c, e = c / 2, d = c / 3, this.text1.attr({ text: a, transform: '' }), g = this.text1.getBBox(), h = Math.min(f / g.width, e / g.height), this.text1.attr({ transform: `S${h},${h},${g.x + g.width / 2},${g.y + g.height}` }), this.text2.attr({ text: b, transform: '' }), i = this.text2.getBBox(), j = Math.min(f / i.width, d / i.height), this.text2.attr({ transform: `S${j},${j},${i.x + i.width / 2},${i.y}` }); }, d.prototype.drawEmptyDonutLabel = function (a, b, c, d, e) { let f; return f = this.raphael.text(a, b, '').attr('font-size', d).attr('fill', c), e != null && f.attr('font-weight', e), f; }, d; }(b.EventEmitter)), b.DonutSegment = (function (a) { function b(a, b, c, d, e, f, g, i, j, k) { this.cx = a, this.cy = b, this.inner = c, this.outer = d, this.color = g, this.backgroundColor = i, this.index = j, this.raphael = k, this.deselect = h(this.deselect, this), this.select = h(this.select, this), this.sin_p0 = Math.sin(e), this.cos_p0 = Math.cos(e), this.sin_p1 = Math.sin(f), this.cos_p1 = Math.cos(f), this.is_long = f - e > Math.PI ? 1 : 0, this.path = this.calcSegment(this.inner + 3, this.inner + this.outer - 5), this.selectedPath = this.calcSegment(this.inner + 3, this.inner + this.outer), this.hilight = this.calcArc(this.inner); } return g(b, a), b.prototype.calcArcPoints = function (a) { return [this.cx + a * this.sin_p0, this.cy + a * this.cos_p0, this.cx + a * this.sin_p1, this.cy + a * this.cos_p1]; }, b.prototype.calcSegment = function (a, b) { let c; let d; let e; let f; let g; let h; let i; let j; let k; let l; return k = this.calcArcPoints(a), c = k[0], e = k[1], d = k[2], f = k[3], l = this.calcArcPoints(b), g = l[0], i = l[1], h = l[2], j = l[3], `M${c},${e}A${a},${a},0,${this.is_long},0,${d},${f}` + `L${h},${j}` + `A${b},${b},0,${this.is_long},1,${g},${i}` + `Z`; }, b.prototype.calcArc = function (a) { let b; let c; let d; let e; let f; return f = this.calcArcPoints(a), b = f[0], d = f[1], c = f[2], e = f[3], `M${b},${d}A${a},${a},0,${this.is_long},0,${c},${e}`; }, b.prototype.render = function () { const a = this; return this.arc = this.drawDonutArc(this.hilight, this.color), this.seg = this.drawDonutSegment(this.path, this.color, this.backgroundColor, () => a.fire('hover', a.index), () => a.fire('click', a.index)); }, b.prototype.drawDonutArc = function (a, b) { return this.raphael.path(a).attr({ stroke: b, 'stroke-width': 2, opacity: 0 }); }, b.prototype.drawDonutSegment = function (a, b, c, d, e) { return this.raphael.path(a).attr({ fill: b, stroke: c, 'stroke-width': 3 }).hover(d).click(e); }, b.prototype.select = function () { return this.selected ? void 0 : (this.seg.animate({ path: this.selectedPath }, 150, '<>'), this.arc.animate({ opacity: 1 }, 150, '<>'), this.selected = !0); }, b.prototype.deselect = function () { return this.selected ? (this.seg.animate({ path: this.path }, 150, '<>'), this.arc.animate({ opacity: 0 }, 150, '<>'), this.selected = !1) : void 0; }, b; }(b.EventEmitter)); +}.call(this), (function (a) { a.fn.fitText = function (b, c) { const d = b || 1; const e = a.extend({ minFontSize: Number.NEGATIVE_INFINITY, maxFontSize: Number.POSITIVE_INFINITY }, c); return this.each(function () { const b = a(this); const c = function () { b.css('font-size', Math.max(Math.min(b.width() / (10 * d), parseFloat(e.maxFontSize)), parseFloat(e.minFontSize))); }; c(), a(window).on('resize', c); }); }; }(jQuery)), +(function (a) { + 'use strict'; + + const b = function (a, b) { this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null, this.init('tooltip', a, b); }; b.DEFAULTS = { animation: !0, placement: 'top', selector: !1, template: '
', trigger: 'hover focus', title: '', delay: 0, html: !1, container: !1 }, b.prototype.init = function (b, c, d) { this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d); for (let e = this.options.trigger.split(' '), f = e.length; f--;) { const g = e[f]; if (g == 'click') this.$element.on(`click.${this.type}`, this.options.selector, a.proxy(this.toggle, this)); else if (g != 'manual') { const h = g == 'hover' ? 'mouseenter' : 'focus'; const i = g == 'hover' ? 'mouseleave' : 'blur'; this.$element.on(`${h}.${this.type}`, this.options.selector, a.proxy(this.enter, this)), this.$element.on(`${i}.${this.type}`, this.options.selector, a.proxy(this.leave, this)); } } this.options.selector ? this._options = a.extend({}, this.options, { trigger: 'manual', selector: '' }) : this.fixTitle(); }, b.prototype.getDefaults = function () { return b.DEFAULTS; }, b.prototype.getOptions = function (b) { return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && typeof b.delay === 'number' && (b.delay = { show: b.delay, hide: b.delay }), b; }, b.prototype.getDelegateOptions = function () { const b = {}; const c = this.getDefaults(); return this._options && a.each(this._options, (a, d) => { c[a] != d && (b[a] = d); }), b; }, b.prototype.enter = function (b) { const c = b instanceof this.constructor ? b : a(b.currentTarget)[this.type](this.getDelegateOptions()).data(`bs.${this.type}`); return clearTimeout(c.timeout), c.hoverState = 'in', c.options.delay && c.options.delay.show ? (c.timeout = setTimeout(() => { c.hoverState == 'in' && c.show(); }, c.options.delay.show), void 0) : c.show(); }, b.prototype.leave = function (b) { const c = b instanceof this.constructor ? b : a(b.currentTarget)[this.type](this.getDelegateOptions()).data(`bs.${this.type}`); return clearTimeout(c.timeout), c.hoverState = 'out', c.options.delay && c.options.delay.hide ? (c.timeout = setTimeout(() => { c.hoverState == 'out' && c.hide(); }, c.options.delay.hide), void 0) : c.hide(); }, b.prototype.show = function () { const b = a.Event(`show.bs.${this.type}`); if (this.hasContent() && this.enabled) { if (this.$element.trigger(b), b.isDefaultPrevented()) return; const c = this.tip(); this.setContent(), this.options.animation && c.addClass('fade'); let d = typeof this.options.placement === 'function' ? this.options.placement.call(this, c[0], this.$element[0]) : this.options.placement; const e = /\s?auto?\s?/i; const f = e.test(d); f && (d = d.replace(e, '') || 'top'), c.detach().css({ top: 0, left: 0, display: 'block' }).addClass(d), this.options.container ? c.appendTo(this.options.container) : c.insertAfter(this.$element); const g = this.getPosition(); const h = c[0].offsetWidth; const i = c[0].offsetHeight; if (f) { const j = this.$element.parent(); const k = d; const l = document.documentElement.scrollTop || document.body.scrollTop; const m = this.options.container == 'body' ? window.innerWidth : j.outerWidth(); const n = this.options.container == 'body' ? window.innerHeight : j.outerHeight(); const o = this.options.container == 'body' ? 0 : j.offset().left; d = d == 'bottom' && g.top + g.height + i - l > n ? 'top' : d == 'top' && g.top - l - i < 0 ? 'bottom' : d == 'right' && g.right + h > m ? 'left' : d == 'left' && g.left - h < o ? 'right' : d, c.removeClass(k).addClass(d); } const p = this.getCalculatedOffset(d, g, h, i); this.applyPlacement(p, d), this.$element.trigger(`shown.bs.${this.type}`); } }, b.prototype.applyPlacement = function (a, b) { let c; const d = this.tip(); const e = d[0].offsetWidth; const f = d[0].offsetHeight; let g = parseInt(d.css('margin-top'), 10); let h = parseInt(d.css('margin-left'), 10); isNaN(g) && (g = 0), isNaN(h) && (h = 0), a.top += g, a.left += h, d.offset(a).addClass('in'); let i = d[0].offsetWidth; let j = d[0].offsetHeight; if (b == 'top' && j != f && (c = !0, a.top = a.top + f - j), /bottom|top/.test(b)) { let k = 0; a.left < 0 && (k = -2 * a.left, a.left = 0, d.offset(a), i = d[0].offsetWidth, j = d[0].offsetHeight), this.replaceArrow(k - e + i, i, 'left'); } else this.replaceArrow(j - f, j, 'top'); c && d.offset(a); }, b.prototype.replaceArrow = function (a, b, c) { this.arrow().css(c, a ? `${50 * (1 - a / b)}%` : ''); }, b.prototype.setContent = function () { const a = this.tip(); const b = this.getTitle(); a.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](b), a.removeClass('fade in top bottom left right'); }, b.prototype.hide = function () { function b() { c.hoverState != 'in' && d.detach(); } var c = this; var d = this.tip(); const e = a.Event(`hide.bs.${this.type}`); return this.$element.trigger(e), e.isDefaultPrevented() ? void 0 : (d.removeClass('in'), a.support.transition && this.$tip.hasClass('fade') ? d.one(a.support.transition.end, b).emulateTransitionEnd(150) : b(), this.$element.trigger(`hidden.bs.${this.type}`), this); }, b.prototype.fixTitle = function () { const a = this.$element; (a.attr('title') || typeof a.attr('data-original-title') !== 'string') && a.attr('data-original-title', a.attr('title') || '').attr('title', ''); }, b.prototype.hasContent = function () { return this.getTitle(); }, b.prototype.getPosition = function () { const b = this.$element[0]; return a.extend({}, typeof b.getBoundingClientRect === 'function' ? b.getBoundingClientRect() : { width: b.offsetWidth, height: b.offsetHeight }, this.$element.offset()); }, b.prototype.getCalculatedOffset = function (a, b, c, d) { return a == 'bottom' ? { top: b.top + b.height, left: b.left + b.width / 2 - c / 2 } : a == 'top' ? { top: b.top - d, left: b.left + b.width / 2 - c / 2 } : a == 'left' ? { top: b.top + b.height / 2 - d / 2, left: b.left - c } : { top: b.top + b.height / 2 - d / 2, left: b.left + b.width }; }, b.prototype.getTitle = function () { let a; const b = this.$element; const c = this.options; return a = b.attr('data-original-title') || (typeof c.title === 'function' ? c.title.call(b[0]) : c.title); }, b.prototype.tip = function () { return this.$tip = this.$tip || a(this.options.template); }, b.prototype.arrow = function () { return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'); }, b.prototype.validate = function () { this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null); }, b.prototype.enable = function () { this.enabled = !0; }, b.prototype.disable = function () { this.enabled = !1; }, b.prototype.toggleEnabled = function () { this.enabled = !this.enabled; }, b.prototype.toggle = function (b) { const c = b ? a(b.currentTarget)[this.type](this.getDelegateOptions()).data(`bs.${this.type}`) : this; c.tip().hasClass('in') ? c.leave(c) : c.enter(c); }, b.prototype.destroy = function () { this.hide().$element.off(`.${this.type}`).removeData(`bs.${this.type}`); }; const c = a.fn.tooltip; a.fn.tooltip = function (c) { return this.each(function () { const d = a(this); let e = d.data('bs.tooltip'); const f = typeof c === 'object' && c; e || d.data('bs.tooltip', e = new b(this, f)), typeof c === 'string' && e[c](); }); }, a.fn.tooltip.Constructor = b, a.fn.tooltip.noConflict = function () { return a.fn.tooltip = c, this; }; +}(window.jQuery)), +(function (a) { + 'use strict'; + + const b = function (a, b) { this.init('popover', a, b); }; if (!a.fn.tooltip) throw new Error('Popover requires tooltip.js'); b.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, { placement: 'right', trigger: 'click', content: '', template: '

' }), b.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), b.prototype.constructor = b, b.prototype.getDefaults = function () { return b.DEFAULTS; }, b.prototype.setContent = function () { const a = this.tip(); const b = this.getTitle(); const c = this.getContent(); a.find('.popover-title')[this.options.html ? 'html' : 'text'](b), a.find('.popover-content')[this.options.html ? 'html' : 'text'](c), a.removeClass('fade top bottom left right in'), a.find('.popover-title').html() || a.find('.popover-title').hide(); }, b.prototype.hasContent = function () { return this.getTitle() || this.getContent(); }, b.prototype.getContent = function () { const a = this.$element; const b = this.options; return a.attr('data-content') || (typeof b.content === 'function' ? b.content.call(a[0]) : b.content); }, b.prototype.arrow = function () { return this.$arrow = this.$arrow || this.tip().find('.arrow'); }, b.prototype.tip = function () { return this.$tip || (this.$tip = a(this.options.template)), this.$tip; }; const c = a.fn.popover; a.fn.popover = function (c) { return this.each(function () { const d = a(this); let e = d.data('bs.popover'); const f = typeof c === 'object' && c; e || d.data('bs.popover', e = new b(this, f)), typeof c === 'string' && e[c](); }); }, a.fn.popover.Constructor = b, a.fn.popover.noConflict = function () { return a.fn.popover = c, this; }; +}(window.jQuery)); diff --git a/report/assets/scripts/codemirror.markpopovertext.js b/report/assets/scripts/codemirror.markpopovertext.js new file mode 100644 index 00000000..e11a9d96 --- /dev/null +++ b/report/assets/scripts/codemirror.markpopovertext.js @@ -0,0 +1,75 @@ +/* global CodeMirror:false, $:false */ + +(function () { + 'use strict'; + + function makeid(num) { + num = num || 5; + let text = ''; + const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + + for (let i = 0; i < num; i++) text += possible.charAt(Math.floor(Math.random() * possible.length)); + + return text; + } + + CodeMirror.prototype.markPopoverText = function (lineObj, regex, className, gutter, message) { + const re = new RegExp(`(${regex})`, 'g'); + const cursor = this.getSearchCursor(re, lineObj); + + let match; const + internalClass = `plato-mark-${makeid(10)}`; + while (match = cursor.findNext()) { + if (cursor.to().line !== lineObj.line) break; + this.markText( + { line: lineObj.line, ch: cursor.from().ch }, + { line: lineObj.line, ch: cursor.to().ch }, + { + className: `plato-mark ${internalClass} ${className || ''}`, + startStyle: 'plato-mark-start', + endStyle: 'plato-mark-end', + } + ); + } + + if (gutter) { + this.setGutterMarker(lineObj.line, gutter.gutterId, gutter.el); + } + + // return a function to bind hover events, to be run after + // the codemirror operations are executed + return function () { + const markStart = $(`.plato-mark-start.${internalClass}`); + const markSpans = $(`.${internalClass}`); + + if (message.type === 'popover') { + let triggered = false; + markSpans.add(gutter.el) + .on('mouseenter touchstart', (e) => { + e.preventDefault(); + triggered = true; + markSpans.addClass('active'); + markStart.popover('show'); + }) + .on('mouseleave touchend', (e) => { + e.preventDefault(); + markSpans.removeClass('active'); + triggered = false; + setTimeout(() => { + if (!triggered) markStart.popover('hide'); + }, 200); + }); + + markStart.popover({ + trigger: 'manual', + content: message.content, + html: true, + title: message.title, + placement: 'top', + }); + } else if (message.type === 'block') { + this.addLineWidget(lineObj.line, $(message.content)[0]); + } + }; + }; +}()); diff --git a/report/assets/scripts/plato-display.js b/report/assets/scripts/plato-display.js new file mode 100644 index 00000000..5d3112d2 --- /dev/null +++ b/report/assets/scripts/plato-display.js @@ -0,0 +1,58 @@ +/* global $:false, _:false, Morris:false, __history:false */ +/* jshint browser:true */ + +$(() => { + 'use strict'; + + function drawHistoricalChart(history) { + const data = _.map(history, (record) => { + const date = new Date(record.date); + return { + date: `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`, + average_maintainability: parseFloat(record.average.maintainability), + average_sloc: record.average.sloc, + }; + }).slice(-20); + + Morris.Area({ + element: 'chart_historical_sloc', + data: data, + xkey: 'date', + ykeys: ['average_sloc'], + parseTime: false, + lineColors: ['#2A2A2A'], + pointSize: 0, + lineWidth: 0, + grid: false, + axes: false, + hideHover: 'always', + fillOpacity: 1, + }); + + Morris.Area({ + element: 'chart_historical_maint', + data: data, + xkey: 'date', + ykeys: ['average_maintainability'], + labels: ['Maintainability'], + ymax: 100, + parseTime: false, + lineColors: ['#2A2A2A'], + pointSize: 0, + lineWidth: 0, + grid: false, + axes: false, + hideHover: 'always', + fillOpacity: 1, + }); + } + + function drawCharts() { + $('.js-chart').empty(); + drawHistoricalChart(__history); + } + + drawCharts(); + + $(window).on('resize', _.debounce(drawCharts, 200)); +}); diff --git a/report/assets/scripts/plato-file.js b/report/assets/scripts/plato-file.js new file mode 100644 index 00000000..c7b13a8e --- /dev/null +++ b/report/assets/scripts/plato-file.js @@ -0,0 +1,153 @@ +/* global $:false, _:false, Morris:false, CodeMirror:false, __report:false, __history:false */ +/* jshint browser:true */ + +$(() => { + 'use strict'; + + // bootstrap popover + $('[rel=popover]').popover(); + + _.templateSettings = { + interpolate: /\{\{(.+?)\}\}/g, + }; + + function focusFragment() { + $('.plato-mark').removeClass('focus'); + const markId = window.location.hash.substr(1); + if (markId) $(`.${markId}`).addClass('focus'); + return focusFragment; + } + + window.onhashchange = focusFragment(); + + const srcEl = document.getElementById('file-source'); + + const options = { + lineNumbers: true, + gutters: ['plato-gutter-jshint', 'plato-gutter-complexity'], + readOnly: 'nocursor', + }; + + const cm = CodeMirror.fromTextArea(srcEl, options); + + const byComplexity = []; const + bySloc = []; + + const popoverTemplate = _.template($('#complexity-popover-template').text()); + const gutterIcon = $(''); + + const popovers = cm.operation(() => { + const queuedPopovers = []; + __report.complexity.methods.forEach((fn, i) => { + byComplexity.push({ + label: fn.name, + value: fn.cyclomatic, + }); + bySloc.push({ + label: fn.name, + value: fn.sloc.physical, + formatter: function (x) { return `${x} lines`; }, + }); + + const name = fn.name === '' ? 'function\\s*\\([^)]*\\)' : fn.name; + const line = fn.lineStart - 1; + const className = `plato-mark-fn-${i}`; + const gutter = { + gutterId: 'plato-gutter-complexity', + el: gutterIcon.clone().attr('name', className)[0], + }; + const popover = { + type: 'popover', + title: fn.name === '' ? '<anonymous>' : `function ${fn.name}`, + content: popoverTemplate(fn), + }; + queuedPopovers.push(cm.markPopoverText({ line: line, ch: 0 }, name, className, gutter, popover)); + }); + return queuedPopovers; + }); + + popovers.forEach((fn) => { fn(); }); + + const scrollToLine = function (i) { + const origScroll = [window.pageXOffset, window.pageYOffset]; + window.location.hash = `#plato-mark-fn-${i}`; + window.scrollTo(origScroll[0], origScroll[1]); + const line = __report.complexity.methods[i].lineStart; + const coords = cm.charCoords({ line: line, ch: 0 }); + $('body,html').animate({ scrollTop: coords.top - 50 }, 250); + }; + + // yield to the browser + setTimeout(() => { + drawFunctionCharts([ + { element: 'fn-by-complexity', data: byComplexity }, + { element: 'fn-by-sloc', data: bySloc }, + ]); + drawHistoricalCharts(__history); + }, 0); + + cm.operation(() => { + addLintMessages(__report); + }); + + + function drawFunctionCharts(charts) { + charts.forEach((chart) => { + Morris.Donut(chart).on('click', scrollToLine); + }); + } + + function drawHistoricalCharts(history) { + $('.historical.chart').empty(); + const data = _.map(history, (record) => { + const date = new Date(record.date); + return { + date: `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`, + maintainability: parseFloat(record.maintainability).toFixed(2), + sloc: record.sloc, + }; + }).slice(-20); + Morris.Line({ + element: 'chart_historical_sloc', + data: data, + xkey: 'date', + ykeys: ['sloc'], + labels: ['Lines of Code'], + parseTime: false, + }); + Morris.Line({ + element: 'chart_historical_maint', + data: data, + xkey: 'date', + ykeys: ['maintainability'], + labels: ['Maintainability'], + ymax: 100, + parseTime: false, + }); + } + + function addLintMessages(report) { + const lines = {}; + report.jshint.messages.forEach((message) => { + const text = `Column: ${message.column} "${message.message}"`; + if (_.isArray(message.line)) { + message.line.forEach((line) => { + if (!lines[line]) lines[line] = ''; + lines[line] += `
${text}
`; + }); + } else { + if (!lines[message.line]) lines[message.line] = ''; + lines[message.line] += `
${text}
`; + } + }); + const marker = document.createElement('a'); + marker.innerHTML = ''; + Object.keys(lines).forEach((line) => { + const lineWidget = document.createElement('div'); + lineWidget.innerHTML = lines[line]; + cm.setGutterMarker(line - 1, 'plato-gutter-jshint', marker.cloneNode(true)); + cm.addLineWidget(line - 1, lineWidget); + }); + } +}); + diff --git a/report/assets/scripts/plato-overview.js b/report/assets/scripts/plato-overview.js new file mode 100644 index 00000000..06fe6e8d --- /dev/null +++ b/report/assets/scripts/plato-overview.js @@ -0,0 +1,186 @@ +/* global $:false, _:false, Morris:false, __report:false, __history:false, __options: false */ +/* jshint browser:true */ + +$(() => { + 'use strict'; + + // bootstrap popover + $('[rel=popover]').popover(); + + // @todo put client side templates into a JST + const fileGraphTemplate = _.template( + '
' + + '' + + '' + + '<%= value %>' + + '
' + ); + + const horizontalBar = function (orig, width, label, thresholds) { + let threshold = 0; + for (let i = thresholds.length - 1; i > -1; i--) { + if (orig > thresholds[i]) { + threshold = i + 1; + break; + } + } + return fileGraphTemplate({ + width: width, + label: label, + threshold: threshold, + value: orig, + }); + }; + + function drawFileCharts() { + // @todo make a jQuery plugin to accomodate the horizontalBar function + // @todo establish max width of graph in plugin + const charts = $('.js-file-chart'); + const width = charts.width() - 130; // cache chart width + charts.each(function () { + const el = $(this); + el.empty(); + + let value = el.data('complexity'); + el.append(horizontalBar(value, Math.min(value * 2, width), 'complexity', [5, 10])); + + value = el.data('sloc'); + el.append(horizontalBar(value, Math.min(value, width), 'sloc', [400, 600])); + + value = el.data('bugs'); + el.append(horizontalBar(value, Math.min(value * 5, width), 'est errors', [1, 5])); + + if (__options.flags.jshint) { + value = el.data('lint'); + el.append(horizontalBar(value, Math.min(value * 5, width), 'lint errors', [1, 10])); + } + }); + } + + function drawOverviewCharts(reports) { + const maintainability = { + element: 'chart_maintainability', + data: [], + xkey: 'label', + ykeys: ['value'], + ymax: 100, + ymin: 0, + labels: ['Maintainability'], + barColors: ['#ff9b40'], + }; + const sloc = { + element: 'chart_sloc', + data: [], + xkey: 'label', + ykeys: ['value'], + ymax: 400, + labels: ['Lines'], + barColors: ['#1f6b75'], + }; + const bugs = { + element: 'chart_bugs', + data: [], + xkey: 'label', + ykeys: ['value'], + labels: ['Errors'], + ymax: 20, + barColors: ['#ff9b40'], + }; + const lint = { + element: 'chart_lint', + data: [], + xkey: 'label', + ykeys: ['value'], + labels: ['Errors'], + ymax: 20, + barColors: ['#1f6b75'], + }; + + reports.forEach((report) => { + // @todo shouldn't need this, 'auto [num]' doesn't seem to work : https://github.com/oesmith/morris.js/issues/201 + sloc.ymax = Math.max(sloc.ymax, report.complexity.methodAggregate.sloc.physical); + bugs.ymax = Math.max(bugs.ymax, report.complexity.methodAggregate.halstead.bugs.toFixed(2)); + + + sloc.data.push({ + value: report.complexity.methodAggregate.sloc.physical, + label: report.info.fileShort, + }); + bugs.data.push({ + value: report.complexity.methodAggregate.halstead.bugs.toFixed(2), + label: report.info.fileShort, + }); + maintainability.data.push({ + value: report.complexity.maintainability ? report.complexity.maintainability.toFixed(2) : 0, + label: report.info.fileShort, + }); + lint.data.push({ + value: report.jshint && report.jshint.messages, + label: report.info.fileShort, + }); + }); + + function onGraphClick(i) { + // If the i is not set, we jump to the last file in the list. This + // preserves a behavior from Morris v1. I expect Plato V1 to be deprecated + // and this hack is mearly to preserve the casper tests. + if (i == null || isNaN(i)) { i = __report.reports.length - 1; } + document.location = __report.reports[i].info.link; + } + + const charts = [ + Morris.Bar(bugs), + Morris.Bar(sloc), + Morris.Bar(maintainability), + ]; + + if (__options.flags.jshint) charts.push(Morris.Bar(lint)); + + charts.forEach((chart) => { + chart.on('click', onGraphClick); + }); + return charts; + } + + function drawHistoricalChart(history) { + const data = _.map(history, (record) => { + const date = new Date(record.date); + return { + date: `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`, + average_maintainability: parseFloat(record.average.maintainability), + average_sloc: record.average.sloc, + }; + }).slice(-20); + Morris.Line({ + element: 'chart_historical_sloc', + data: data, + xkey: 'date', + ykeys: ['average_sloc'], + labels: ['Average Lines'], + parseTime: false, + }); + Morris.Line({ + element: 'chart_historical_maint', + data: data, + xkey: 'date', + ykeys: ['average_maintainability'], + labels: ['Maintainability'], + ymax: 100, + parseTime: false, + }); + } + + function drawCharts() { + $('.js-chart').empty(); + drawHistoricalChart(__history); + drawOverviewCharts(__report.reports); + drawFileCharts(__report.reports); + } + + drawCharts(); + + $(window).on('resize', _.debounce(drawCharts, 200)); +}); + + + diff --git a/report/assets/scripts/plato-sortable-file-list.js b/report/assets/scripts/plato-sortable-file-list.js new file mode 100644 index 00000000..071da2d8 --- /dev/null +++ b/report/assets/scripts/plato-sortable-file-list.js @@ -0,0 +1,120 @@ +/* global $:false, _:false */ +/* jshint browser:true */ + +/* + author: david linse + version: 0.0.1 + + A very first draft to add the ability to sort + the "file-list" by the displayed 'numbers' for: + + + lint-errors + + complexity + + lines of code + + estimated errors + + A group of buttons is added to the template above + to trigger the update of the file-list. +*/ + +$(() => { + 'use strict'; + + const file_list = $('ul.file-list'); + + const files = file_list.find('li'); + + // work-horse + // @param: key The 'data-' to sort by + // @return: descending sorted array of
  • elements + // + const _sortBy = function (key) { + return _.sortBy(files, el => Number($(el).find('span[data-lint]').attr(key)) * -1); + }; + + // sorter + + const _sortByLintErr = function _sortByLintErr() { + return _sortBy('data-lint'); + }; + + const _sortBySLOC = function _sortBySLOC() { + return _sortBy('data-sloc'); + }; + + const _sortByBugs = function _sortByBugs() { + return _sortBy('data-bugs'); + }; + + const _sortByComplexity = function _sortByComplexity() { + return _sortBy('data-complexity'); + }; + + // appends the 'list' of '
  • ' elements + // to its parent '
      '. + // @param: a list of '
    • '' elements + // + const _update_list = function _update_list(list) { + file_list.append($(list)); + }; + + + const _update_metrics_order = function _update_metrics_order(metric_name) { + const reorder = function reorder() { + const metric = $(this).children().find('label').filter(function () { + return $(this).text() === metric_name; + }) + .parent(); + + $(metric).prependTo($(this)); + }; + + $("div [class*='js-file-chart']").each(reorder); + }; + + // button event-handler + + const _byComplexity = function () { + _update_list(_sortByComplexity()); + _update_metrics_order('complexity'); + }; + + const _byBugs = function () { + _update_list(_sortByBugs()); + _update_metrics_order('est errors'); + }; + + const _bySLOC = function () { + _update_list(_sortBySLOC()); + _update_metrics_order('sloc'); + }; + + const _byLint = function () { + _update_list(_sortByLintErr()); + _update_metrics_order('lint errors'); + }; + + // styling + + const _update_state = function _update_state(target) { + const prev = $('button.on'); + prev.removeClass('on'); + + const current = $(target); + current.addClass('on'); + }; + + // setup button events + + $('button#button-complexity').on('click', _byComplexity); + $('button#button-bugs').on('click', _byBugs); + $('button#button-sloc').on('click', _bySLOC); + $('button#button-lint').on('click', _byLint); + + // styling update for buttons + + const all = $('button.btn'); + all.on('click', (evt) => { + _update_state(evt.target); + }); +}); diff --git a/report/assets/scripts/vendor/bootstrap-popover.js b/report/assets/scripts/vendor/bootstrap-popover.js new file mode 100755 index 00000000..d6febdf2 --- /dev/null +++ b/report/assets/scripts/vendor/bootstrap-popover.js @@ -0,0 +1,117 @@ +/* ======================================================================== + * Bootstrap: popover.js v3.0.0 + * http://twbs.github.com/bootstrap/javascript.html#popovers + * ======================================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== */ + + ++(function ($) { + 'use strict'; + + // POPOVER PUBLIC CLASS DEFINITION + // =============================== + + const Popover = function (element, options) { + this.init('popover', element, options); + }; + + if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js'); + + Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { + placement: 'right', + trigger: 'click', + content: '', + template: '

      ', + }); + + + // NOTE: POPOVER EXTENDS tooltip.js + // ================================ + + Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype); + + Popover.prototype.constructor = Popover; + + Popover.prototype.getDefaults = function () { + return Popover.DEFAULTS; + }; + + Popover.prototype.setContent = function () { + const $tip = this.tip(); + const title = this.getTitle(); + const content = this.getContent(); + + $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title); + $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content); + + $tip.removeClass('fade top bottom left right in'); + + // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do + // this manually by checking the contents. + if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide(); + }; + + Popover.prototype.hasContent = function () { + return this.getTitle() || this.getContent(); + }; + + Popover.prototype.getContent = function () { + const $e = this.$element; + const o = this.options; + + return $e.attr('data-content') || + (typeof o.content === 'function' ? + o.content.call($e[0]) : + o.content); + }; + + Popover.prototype.arrow = function () { + return this.$arrow = this.$arrow || this.tip().find('.arrow'); + }; + + Popover.prototype.tip = function () { + if (!this.$tip) this.$tip = $(this.options.template); + return this.$tip; + }; + + + // POPOVER PLUGIN DEFINITION + // ========================= + + const old = $.fn.popover; + + $.fn.popover = function (option) { + return this.each(function () { + const $this = $(this); + let data = $this.data('bs.popover'); + const options = typeof option === 'object' && option; + + if (!data) $this.data('bs.popover', (data = new Popover(this, options))); + if (typeof option === 'string') data[option](); + }); + }; + + $.fn.popover.Constructor = Popover; + + + // POPOVER NO CONFLICT + // =================== + + $.fn.popover.noConflict = function () { + $.fn.popover = old; + return this; + }; +}(window.jQuery)); diff --git a/report/assets/scripts/vendor/bootstrap-tooltip.js b/report/assets/scripts/vendor/bootstrap-tooltip.js new file mode 100755 index 00000000..90195360 --- /dev/null +++ b/report/assets/scripts/vendor/bootstrap-tooltip.js @@ -0,0 +1,386 @@ +/* ======================================================================== + * Bootstrap: tooltip.js v3.0.0 + * http://twbs.github.com/bootstrap/javascript.html#tooltip + * Inspired by the original jQuery.tipsy by Jason Frame + * ======================================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== */ + + ++(function ($) { + 'use strict'; + + // TOOLTIP PUBLIC CLASS DEFINITION + // =============================== + + const Tooltip = function (element, options) { + this.type = + this.options = + this.enabled = + this.timeout = + this.hoverState = + this.$element = null; + + this.init('tooltip', element, options); + }; + + Tooltip.DEFAULTS = { + animation: true, + placement: 'top', + selector: false, + template: '
      ', + trigger: 'hover focus', + title: '', + delay: 0, + html: false, + container: false, + }; + + Tooltip.prototype.init = function (type, element, options) { + this.enabled = true; + this.type = type; + this.$element = $(element); + this.options = this.getOptions(options); + + const triggers = this.options.trigger.split(' '); + + for (let i = triggers.length; i--;) { + const trigger = triggers[i]; + + if (trigger == 'click') { + this.$element.on(`click.${this.type}`, this.options.selector, $.proxy(this.toggle, this)); + } else if (trigger != 'manual') { + const eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'; + const eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'; + + this.$element.on(`${eventIn}.${this.type}`, this.options.selector, $.proxy(this.enter, this)); + this.$element.on(`${eventOut}.${this.type}`, this.options.selector, $.proxy(this.leave, this)); + } + } + + this.options.selector ? + (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : + this.fixTitle(); + }; + + Tooltip.prototype.getDefaults = function () { + return Tooltip.DEFAULTS; + }; + + Tooltip.prototype.getOptions = function (options) { + options = $.extend({}, this.getDefaults(), this.$element.data(), options); + + if (options.delay && typeof options.delay === 'number') { + options.delay = { + show: options.delay, + hide: options.delay, + }; + } + + return options; + }; + + Tooltip.prototype.getDelegateOptions = function () { + const options = {}; + const defaults = this.getDefaults(); + + this._options && $.each(this._options, (key, value) => { + if (defaults[key] != value) options[key] = value; + }); + + return options; + }; + + Tooltip.prototype.enter = function (obj) { + const self = obj instanceof this.constructor ? + obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data(`bs.${this.type}`); + + clearTimeout(self.timeout); + + self.hoverState = 'in'; + + if (!self.options.delay || !self.options.delay.show) return self.show(); + + self.timeout = setTimeout(() => { + if (self.hoverState == 'in') self.show(); + }, self.options.delay.show); + }; + + Tooltip.prototype.leave = function (obj) { + const self = obj instanceof this.constructor ? + obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data(`bs.${this.type}`); + + clearTimeout(self.timeout); + + self.hoverState = 'out'; + + if (!self.options.delay || !self.options.delay.hide) return self.hide(); + + self.timeout = setTimeout(() => { + if (self.hoverState == 'out') self.hide(); + }, self.options.delay.hide); + }; + + Tooltip.prototype.show = function () { + const e = $.Event(`show.bs.${this.type}`); + + if (this.hasContent() && this.enabled) { + this.$element.trigger(e); + + if (e.isDefaultPrevented()) return; + + const $tip = this.tip(); + + this.setContent(); + + if (this.options.animation) $tip.addClass('fade'); + + let placement = typeof this.options.placement === 'function' ? + this.options.placement.call(this, $tip[0], this.$element[0]) : + this.options.placement; + + const autoToken = /\s?auto?\s?/i; + const autoPlace = autoToken.test(placement); + if (autoPlace) placement = placement.replace(autoToken, '') || 'top'; + + $tip + .detach() + .css({ top: 0, left: 0, display: 'block' }) + .addClass(placement); + + this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element); + + const pos = this.getPosition(); + const actualWidth = $tip[0].offsetWidth; + const actualHeight = $tip[0].offsetHeight; + + if (autoPlace) { + const $parent = this.$element.parent(); + + const orgPlacement = placement; + const docScroll = document.documentElement.scrollTop || document.body.scrollTop; + const parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth(); + const parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight(); + const parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left; + + placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' : + placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' : + placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' : + placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' : + placement; + + $tip + .removeClass(orgPlacement) + .addClass(placement); + } + + const calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight); + + this.applyPlacement(calculatedOffset, placement); + this.$element.trigger(`shown.bs.${this.type}`); + } + }; + + Tooltip.prototype.applyPlacement = function (offset, placement) { + let replace; + const $tip = this.tip(); + const width = $tip[0].offsetWidth; + const height = $tip[0].offsetHeight; + + // manually read margins because getBoundingClientRect includes difference + let marginTop = parseInt($tip.css('margin-top'), 10); + let marginLeft = parseInt($tip.css('margin-left'), 10); + + // we must check for NaN for ie 8/9 + if (isNaN(marginTop)) marginTop = 0; + if (isNaN(marginLeft)) marginLeft = 0; + + offset.top += marginTop; + offset.left += marginLeft; + + $tip + .offset(offset) + .addClass('in'); + + // check to see if placing tip in new offset caused the tip to resize itself + let actualWidth = $tip[0].offsetWidth; + let actualHeight = $tip[0].offsetHeight; + + if (placement == 'top' && actualHeight != height) { + replace = true; + offset.top = offset.top + height - actualHeight; + } + + if (/bottom|top/.test(placement)) { + let delta = 0; + + if (offset.left < 0) { + delta = offset.left * -2; + offset.left = 0; + + $tip.offset(offset); + + actualWidth = $tip[0].offsetWidth; + actualHeight = $tip[0].offsetHeight; + } + + this.replaceArrow(delta - width + actualWidth, actualWidth, 'left'); + } else { + this.replaceArrow(actualHeight - height, actualHeight, 'top'); + } + + if (replace) $tip.offset(offset); + }; + + Tooltip.prototype.replaceArrow = function (delta, dimension, position) { + this.arrow().css(position, delta ? (`${50 * (1 - delta / dimension)}%`) : ''); + }; + + Tooltip.prototype.setContent = function () { + const $tip = this.tip(); + const title = this.getTitle(); + + $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title); + $tip.removeClass('fade in top bottom left right'); + }; + + Tooltip.prototype.hide = function () { + const that = this; + const $tip = this.tip(); + const e = $.Event(`hide.bs.${this.type}`); + + function complete() { + if (that.hoverState != 'in') $tip.detach(); + } + + this.$element.trigger(e); + + if (e.isDefaultPrevented()) return; + + $tip.removeClass('in'); + + $.support.transition && this.$tip.hasClass('fade') ? + $tip + .one($.support.transition.end, complete) + .emulateTransitionEnd(150) : + complete(); + + this.$element.trigger(`hidden.bs.${this.type}`); + + return this; + }; + + Tooltip.prototype.fixTitle = function () { + const $e = this.$element; + if ($e.attr('title') || typeof ($e.attr('data-original-title')) !== 'string') { + $e.attr('data-original-title', $e.attr('title') || '').attr('title', ''); + } + }; + + Tooltip.prototype.hasContent = function () { + return this.getTitle(); + }; + + Tooltip.prototype.getPosition = function () { + const el = this.$element[0]; + return $.extend({}, (typeof el.getBoundingClientRect === 'function') ? el.getBoundingClientRect() : { + width: el.offsetWidth, + height: el.offsetHeight, + }, this.$element.offset()); + }; + + Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { + return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : + placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : + placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : + /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }; + }; + + Tooltip.prototype.getTitle = function () { + let title; + const $e = this.$element; + const o = this.options; + + title = $e.attr('data-original-title') || + (typeof o.title === 'function' ? o.title.call($e[0]) : o.title); + + return title; + }; + + Tooltip.prototype.tip = function () { + return this.$tip = this.$tip || $(this.options.template); + }; + + Tooltip.prototype.arrow = function () { + return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'); + }; + + Tooltip.prototype.validate = function () { + if (!this.$element[0].parentNode) { + this.hide(); + this.$element = null; + this.options = null; + } + }; + + Tooltip.prototype.enable = function () { + this.enabled = true; + }; + + Tooltip.prototype.disable = function () { + this.enabled = false; + }; + + Tooltip.prototype.toggleEnabled = function () { + this.enabled = !this.enabled; + }; + + Tooltip.prototype.toggle = function (e) { + const self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data(`bs.${this.type}`) : this; + self.tip().hasClass('in') ? self.leave(self) : self.enter(self); + }; + + Tooltip.prototype.destroy = function () { + this.hide().$element.off(`.${this.type}`).removeData(`bs.${this.type}`); + }; + + + // TOOLTIP PLUGIN DEFINITION + // ========================= + + const old = $.fn.tooltip; + + $.fn.tooltip = function (option) { + return this.each(function () { + const $this = $(this); + let data = $this.data('bs.tooltip'); + const options = typeof option === 'object' && option; + + if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))); + if (typeof option === 'string') data[option](); + }); + }; + + $.fn.tooltip.Constructor = Tooltip; + + + // TOOLTIP NO CONFLICT + // =================== + + $.fn.tooltip.noConflict = function () { + $.fn.tooltip = old; + return this; + }; +}(window.jQuery)); diff --git a/report/assets/scripts/vendor/codemirror/codemirror.js b/report/assets/scripts/vendor/codemirror/codemirror.js new file mode 100644 index 00000000..af2692e4 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/codemirror.js @@ -0,0 +1,4789 @@ +// CodeMirror version 3.0 +// +// CodeMirror is the only global var we claim +window.CodeMirror = (function () { + 'use strict'; + + // BROWSER SNIFFING + + // Crude, but necessary to handle a number of hard-to-feature-detect + // bugs and behavior differences. + const gecko = /gecko\/\d/i.test(navigator.userAgent); + const ie = /MSIE \d/.test(navigator.userAgent); + const ie_lt8 = /MSIE [1-7]\b/.test(navigator.userAgent); + const ie_lt9 = /MSIE [1-8]\b/.test(navigator.userAgent); + const webkit = /WebKit\//.test(navigator.userAgent); + const qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent); + const chrome = /Chrome\//.test(navigator.userAgent); + const opera = /Opera\//.test(navigator.userAgent); + const safari = /Apple Computer/.test(navigator.vendor); + const khtml = /KHTML\//.test(navigator.userAgent); + const mac_geLion = /Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent); + const mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent); + const phantom = /PhantomJS/.test(navigator.userAgent); + + const ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent); + // This is woefully incomplete. Suggestions for alternative methods welcome. + const mobile = ios || /Android|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent); + const mac = ios || /Mac/.test(navigator.platform); + + // Optimize some code when these features are not used + let sawReadOnlySpans = false; let + sawCollapsedSpans = false; + + // CONSTRUCTOR + + function CodeMirror(place, options) { + if (!(this instanceof CodeMirror)) return new CodeMirror(place, options); + + this.options = options = options || {}; + // Determine effective options based on given values and defaults. + for (const opt in defaults) { if (!options.hasOwnProperty(opt) && defaults.hasOwnProperty(opt)) options[opt] = defaults[opt]; } + setGuttersForLineNumbers(options); + + const display = this.display = makeDisplay(place); + display.wrapper.CodeMirror = this; + updateGutters(this); + if (options.autofocus && !mobile) focusInput(this); + + this.view = makeView(new BranchChunk([new LeafChunk([makeLine('', null, textHeight(display))])])); + this.nextOpId = 0; + loadMode(this); + themeChanged(this); + if (options.lineWrapping) this.display.wrapper.className += ' CodeMirror-wrap'; + + // Initialize the content. + this.setValue(options.value || ''); + // Override magic textarea content restore that IE sometimes does + // on our hidden textarea on reload + if (ie) setTimeout(bind(resetInput, this, true), 20); + this.view.history = makeHistory(); + + registerEventHandlers(this); + // IE throws unspecified error in certain cases, when + // trying to access activeElement before onload + let hasFocus; try { hasFocus = (document.activeElement == display.input); } catch (e) { } + if (hasFocus || (options.autofocus && !mobile)) setTimeout(bind(onFocus, this), 20); + else onBlur(this); + + operation(this, function () { + for (const opt in optionHandlers) if (optionHandlers.propertyIsEnumerable(opt)) optionHandlers[opt](this, options[opt], Init); + for (let i = 0; i < initHooks.length; ++i) initHooks[i](this); + })(); + } + + // DISPLAY CONSTRUCTOR + + function makeDisplay(place) { + const d = {}; + const input = d.input = elt('textarea', null, null, 'position: absolute; padding: 0; width: 1px; height: 1em; outline: none;'); + input.setAttribute('wrap', 'off'); input.setAttribute('autocorrect', 'off'); input.setAttribute('autocapitalize', 'off'); + // Wraps and hides input textarea + d.inputDiv = elt('div', [input], null, 'overflow: hidden; position: relative; width: 3px; height: 0px;'); + // The actual fake scrollbars. + d.scrollbarH = elt('div', [elt('div', null, null, 'height: 1px')], 'CodeMirror-hscrollbar'); + d.scrollbarV = elt('div', [elt('div', null, null, 'width: 1px')], 'CodeMirror-vscrollbar'); + d.scrollbarFiller = elt('div', null, 'CodeMirror-scrollbar-filler'); + // DIVs containing the selection and the actual code + d.lineDiv = elt('div'); + d.selectionDiv = elt('div', null, null, 'position: relative; z-index: 1'); + // Blinky cursor, and element used to ensure cursor fits at the end of a line + d.cursor = elt('pre', '\u00a0', 'CodeMirror-cursor'); + // Secondary cursor, shown when on a 'jump' in bi-directional text + d.otherCursor = elt('pre', '\u00a0', 'CodeMirror-cursor CodeMirror-secondarycursor'); + // Used to measure text size + d.measure = elt('div', null, 'CodeMirror-measure'); + // Wraps everything that needs to exist inside the vertically-padded coordinate system + d.lineSpace = elt('div', [d.measure, d.selectionDiv, d.lineDiv, d.cursor, d.otherCursor], null, 'position: relative; outline: none'); + // Moved around its parent to cover visible view + d.mover = elt('div', [elt('div', [d.lineSpace], 'CodeMirror-lines')], null, 'position: relative'); + // Set to the height of the text, causes scrolling + d.sizer = elt('div', [d.mover], 'CodeMirror-sizer'); + // D is needed because behavior of elts with overflow: auto and padding is inconsistent across browsers + d.heightForcer = elt('div', '\u00a0', null, `position: absolute; height: ${scrollerCutOff}px`); + // Will contain the gutters, if any + d.gutters = elt('div', null, 'CodeMirror-gutters'); + d.lineGutter = null; + // Helper element to properly size the gutter backgrounds + const scrollerInner = elt('div', [d.sizer, d.heightForcer, d.gutters], null, 'position: relative; min-height: 100%'); + // Provides scrolling + d.scroller = elt('div', [scrollerInner], 'CodeMirror-scroll'); + d.scroller.setAttribute('tabIndex', '-1'); + // The element in which the editor lives. + d.wrapper = elt('div', [d.inputDiv, d.scrollbarH, d.scrollbarV, + d.scrollbarFiller, d.scroller], 'CodeMirror'); + // Work around IE7 z-index bug + if (ie_lt8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; } + if (place.appendChild) place.appendChild(d.wrapper); else place(d.wrapper); + + // Needed to hide big blue blinking cursor on Mobile Safari + if (ios) input.style.width = '0px'; + if (!webkit) d.scroller.draggable = true; + // Needed to handle Tab key in KHTML + if (khtml) { d.inputDiv.style.height = '1px'; d.inputDiv.style.position = 'absolute'; } + // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). + else if (ie_lt8) d.scrollbarH.style.minWidth = d.scrollbarV.style.minWidth = '18px'; + + // Current visible range (may be bigger than the view window). + d.viewOffset = d.showingFrom = d.showingTo = d.lastSizeC = 0; + + // Used to only resize the line number gutter when necessary (when + // the amount of lines crosses a boundary that makes its width change) + d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null; + // See readInput and resetInput + d.prevInput = ''; + // Set to true when a non-horizontal-scrolling widget is added. As + // an optimization, widget aligning is skipped when d is false. + d.alignWidgets = false; + // Flag that indicates whether we currently expect input to appear + // (after some event like 'keypress' or 'input') and are polling + // intensively. + d.pollingFast = false; + // Self-resetting timeout for the poller + d.poll = new Delayed(); + // True when a drag from the editor is active + d.draggingText = false; + + d.cachedCharWidth = d.cachedTextHeight = null; + d.measureLineCache = []; + d.measureLineCachePos = 0; + + // Tracks when resetInput has punted to just putting a short + // string instead of the (large) selection. + d.inaccurateSelection = false; + + // Used to adjust overwrite behaviour when a paste has been + // detected + d.pasteIncoming = false; + + return d; + } + + // VIEW CONSTRUCTOR + + function makeView(doc) { + const selPos = { line: 0, ch: 0 }; + return { + doc: doc, + // frontier is the point up to which the content has been parsed, + frontier: 0, + highlight: new Delayed(), + sel: { from: selPos, to: selPos, head: selPos, anchor: selPos, shift: false, extend: false }, + scrollTop: 0, + scrollLeft: 0, + overwrite: false, + focused: false, + // Tracks the maximum line length so that + // the horizontal scrollbar can be kept + // static when scrolling. + maxLine: getLine(doc, 0), + maxLineLength: 0, + maxLineChanged: false, + suppressEdits: false, + goalColumn: null, + cantEdit: false, + keyMaps: [], + }; + } + + // STATE UPDATES + + // Used to get the editor into a consistent state again when options change. + + function loadMode(cm) { + const { doc } = cm.view; + cm.view.mode = CodeMirror.getMode(cm.options, cm.options.mode); + doc.iter(0, doc.size, (line) => { line.stateAfter = null; }); + cm.view.frontier = 0; + startWorker(cm, 100); + } + + function wrappingChanged(cm) { + const { doc } = cm.view; + const th = textHeight(cm.display); + if (cm.options.lineWrapping) { + cm.display.wrapper.className += ' CodeMirror-wrap'; + const perLine = cm.display.scroller.clientWidth / charWidth(cm.display) - 3; + doc.iter(0, doc.size, (line) => { + if (line.height == 0) return; + const guess = Math.ceil(line.text.length / perLine) || 1; + if (guess != 1) updateLineHeight(line, guess * th); + }); + cm.display.sizer.style.minWidth = ''; + } else { + cm.display.wrapper.className = cm.display.wrapper.className.replace(' CodeMirror-wrap', ''); + computeMaxLength(cm.view); + doc.iter(0, doc.size, (line) => { + if (line.height != 0) updateLineHeight(line, th); + }); + } + regChange(cm, 0, doc.size); + clearCaches(cm); + setTimeout(() => { updateScrollbars(cm.display, cm.view.doc.height); }, 100); + } + + function keyMapChanged(cm) { + const { style } = keyMap[cm.options.keyMap]; + cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-keymap-\S+/g, '') + + (style ? ` cm-keymap-${style}` : ''); + } + + function themeChanged(cm) { + cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, '') + + cm.options.theme.replace(/(^|\s)\s*/g, ' cm-s-'); + clearCaches(cm); + } + + function guttersChanged(cm) { + updateGutters(cm); + updateDisplay(cm, true); + } + + function updateGutters(cm) { + const { gutters } = cm.display; + const specs = cm.options.gutters; + removeChildren(gutters); + for (var i = 0; i < specs.length; ++i) { + const gutterClass = specs[i]; + const gElt = gutters.appendChild(elt('div', null, `CodeMirror-gutter ${gutterClass}`)); + if (gutterClass == 'CodeMirror-linenumbers') { + cm.display.lineGutter = gElt; + gElt.style.width = `${cm.display.lineNumWidth || 1}px`; + } + } + gutters.style.display = i ? '' : 'none'; + } + + function lineLength(doc, line) { + if (line.height == 0) return 0; + let len = line.text.length; let merged; let + cur = line; + while (merged = collapsedSpanAtStart(cur)) { + var found = merged.find(); + cur = getLine(doc, found.from.line); + len += found.from.ch - found.to.ch; + } + cur = line; + while (merged = collapsedSpanAtEnd(cur)) { + var found = merged.find(); + len -= cur.text.length - found.from.ch; + cur = getLine(doc, found.to.line); + len += cur.text.length - found.to.ch; + } + return len; + } + + function computeMaxLength(view) { + view.maxLine = getLine(view.doc, 0); + view.maxLineLength = lineLength(view.doc, view.maxLine); + view.maxLineChanged = true; + view.doc.iter(1, view.doc.size, (line) => { + const len = lineLength(view.doc, line); + if (len > view.maxLineLength) { + view.maxLineLength = len; + view.maxLine = line; + } + }); + } + + // Make sure the gutters options contains the element + // "CodeMirror-linenumbers" when the lineNumbers option is true. + function setGuttersForLineNumbers(options) { + let found = false; + for (let i = 0; i < options.gutters.length; ++i) { + if (options.gutters[i] == 'CodeMirror-linenumbers') { + if (options.lineNumbers) found = true; + else options.gutters.splice(i--, 1); + } + } + if (!found && options.lineNumbers) options.gutters.push('CodeMirror-linenumbers'); + } + + // SCROLLBARS + + // Re-synchronize the fake scrollbars with the actual size of the + // content. Optionally force a scrollTop. + function updateScrollbars(d /* display */, docHeight) { + const totalHeight = docHeight + 2 * paddingTop(d); + d.sizer.style.minHeight = d.heightForcer.style.top = `${totalHeight}px`; + const scrollHeight = Math.max(totalHeight, d.scroller.scrollHeight); + const needsH = d.scroller.scrollWidth > d.scroller.clientWidth; + const needsV = scrollHeight > d.scroller.clientHeight; + if (needsV) { + d.scrollbarV.style.display = 'block'; + d.scrollbarV.style.bottom = needsH ? `${scrollbarWidth(d.measure)}px` : '0'; + d.scrollbarV.firstChild.style.height = + `${scrollHeight - d.scroller.clientHeight + d.scrollbarV.clientHeight}px`; + } else d.scrollbarV.style.display = ''; + if (needsH) { + d.scrollbarH.style.display = 'block'; + d.scrollbarH.style.right = needsV ? `${scrollbarWidth(d.measure)}px` : '0'; + d.scrollbarH.firstChild.style.width = + `${d.scroller.scrollWidth - d.scroller.clientWidth + d.scrollbarH.clientWidth}px`; + } else d.scrollbarH.style.display = ''; + if (needsH && needsV) { + d.scrollbarFiller.style.display = 'block'; + d.scrollbarFiller.style.height = d.scrollbarFiller.style.width = `${scrollbarWidth(d.measure)}px`; + } else d.scrollbarFiller.style.display = ''; + + if (mac_geLion && scrollbarWidth(d.measure) === 0) d.scrollbarV.style.minWidth = d.scrollbarH.style.minHeight = mac_geMountainLion ? '18px' : '12px'; + } + + function visibleLines(display, doc, viewPort) { + let top = display.scroller.scrollTop; let + height = display.wrapper.clientHeight; + if (typeof viewPort === 'number') top = viewPort; + else if (viewPort) { top = viewPort.top; height = viewPort.bottom - viewPort.top; } + top = Math.floor(top - paddingTop(display)); + const bottom = Math.ceil(top + height); + return { from: lineAtHeight(doc, top), to: lineAtHeight(doc, bottom) }; + } + + // LINE NUMBERS + + function alignHorizontally(cm) { + const { display } = cm; + if (!display.alignWidgets && !display.gutters.firstChild) return; + const comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.view.scrollLeft; + const gutterW = display.gutters.offsetWidth; const + l = `${comp}px`; + for (let n = display.lineDiv.firstChild; n; n = n.nextSibling) { + if (n.alignable) { + for (let i = 0, a = n.alignable; i < a.length; ++i) a[i].style.left = l; + } + } + display.gutters.style.left = `${comp + gutterW}px`; + } + + function maybeUpdateLineNumberWidth(cm) { + if (!cm.options.lineNumbers) return false; + const { doc } = cm.view; + const last = lineNumberFor(cm.options, doc.size - 1); + const { display } = cm; + if (last.length != display.lineNumChars) { + const test = display.measure.appendChild(elt('div', [elt('div', last)], 'CodeMirror-linenumber CodeMirror-gutter-elt')); + const innerW = test.firstChild.offsetWidth; const + padding = test.offsetWidth - innerW; + display.lineGutter.style.width = ''; + display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding); + display.lineNumWidth = display.lineNumInnerWidth + padding; + display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; + display.lineGutter.style.width = `${display.lineNumWidth}px`; + return true; + } + return false; + } + + function lineNumberFor(options, i) { + return String(options.lineNumberFormatter(i + options.firstLineNumber)); + } + function compensateForHScroll(display) { + return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left; + } + + // DISPLAY DRAWING + + function updateDisplay(cm, changes, viewPort) { + const oldFrom = cm.display.showingFrom; const + oldTo = cm.display.showingTo; + const updated = updateDisplayInner(cm, changes, viewPort); + if (updated) { + signalLater(cm, cm, 'update', cm); + if (cm.display.showingFrom != oldFrom || cm.display.showingTo != oldTo) signalLater(cm, cm, 'viewportChange', cm, cm.display.showingFrom, cm.display.showingTo); + } + updateSelection(cm); + updateScrollbars(cm.display, cm.view.doc.height); + + return updated; + } + + // Uses a set of changes plus the current scroll position to + // determine which DOM updates have to be made, and makes the + // updates. + function updateDisplayInner(cm, changes, viewPort) { + const { display } = cm; + const { doc } = cm.view; + if (!display.wrapper.clientWidth) { + display.showingFrom = display.showingTo = display.viewOffset = 0; + return; + } + + // Compute the new visible window + // If scrollTop is specified, use that to determine which lines + // to render instead of the current scrollbar position. + const visible = visibleLines(display, doc, viewPort); + // Bail out if the visible area is already rendered and nothing changed. + if (changes !== true && changes.length == 0 && + visible.from > display.showingFrom && visible.to < display.showingTo) return; + + if (changes && maybeUpdateLineNumberWidth(cm)) changes = true; + display.sizer.style.marginLeft = display.scrollbarH.style.left = `${display.gutters.offsetWidth}px`; + + // When merged lines are present, the line that needs to be + // redrawn might not be the one that was changed. + if (changes !== true && sawCollapsedSpans) { + for (var i = 0; i < changes.length; ++i) { + const ch = changes[i]; var + merged; + while (merged = collapsedSpanAtStart(getLine(doc, ch.from))) { + var from = merged.find().from.line; + if (ch.diff) ch.diff -= ch.from - from; + ch.from = from; + } + } + } + + // Used to determine which lines need their line numbers updated + let positionsChangedFrom = changes === true ? 0 : Infinity; + if (cm.options.lineNumbers && changes && changes !== true) for (var i = 0; i < changes.length; ++i) if (changes[i].diff) { positionsChangedFrom = changes[i].from; break; } + + var from = Math.max(visible.from - cm.options.viewportMargin, 0); + let to = Math.min(doc.size, visible.to + cm.options.viewportMargin); + if (display.showingFrom < from && from - display.showingFrom < 20) from = display.showingFrom; + if (display.showingTo > to && display.showingTo - to < 20) to = Math.min(doc.size, display.showingTo); + if (sawCollapsedSpans) { + from = lineNo(visualLine(doc, getLine(doc, from))); + while (to < doc.size && lineIsHidden(getLine(doc, to))) ++to; + } + + // Create a range of theoretically intact lines, and punch holes + // in that using the change info. + const intact = changes === true ? [] : + computeIntact([{ from: display.showingFrom, to: display.showingTo }], changes); + // Clip off the parts that won't be visible + let intactLines = 0; + for (var i = 0; i < intact.length; ++i) { + const range = intact[i]; + if (range.from < from) range.from = from; + if (range.to > to) range.to = to; + if (range.from >= range.to) intact.splice(i--, 1); + else intactLines += range.to - range.from; + } + if (intactLines == to - from && from == display.showingFrom && to == display.showingTo) return; + intact.sort((a, b) => a.from - b.from); + + if (intactLines < (to - from) * 0.7) display.lineDiv.style.display = 'none'; + patchDisplay(cm, from, to, intact, positionsChangedFrom); + display.lineDiv.style.display = ''; + + const different = from != display.showingFrom || to != display.showingTo || + display.lastSizeC != display.wrapper.clientHeight; + // This is just a bogus formula that detects when the editor is + // resized or the font size changes. + if (different) display.lastSizeC = display.wrapper.clientHeight; + display.showingFrom = from; display.showingTo = to; + startWorker(cm, 100); + + let prevBottom = display.lineDiv.offsetTop; + for (var node = display.lineDiv.firstChild, height; node; node = node.nextSibling) { + if (node.lineObj) { + if (ie_lt8) { + const bot = node.offsetTop + node.offsetHeight; + height = bot - prevBottom; + prevBottom = bot; + } else { + const box = node.getBoundingClientRect(); + height = box.bottom - box.top; + } + const diff = node.lineObj.height - height; + if (height < 2) height = textHeight(display); + if (diff > 0.001 || diff < -0.001) updateLineHeight(node.lineObj, height); + } + } + display.viewOffset = heightAtLine(cm, getLine(doc, from)); + // Position the mover div to align with the current virtual scroll position + display.mover.style.top = `${display.viewOffset}px`; + return true; + } + + function computeIntact(intact, changes) { + for (let i = 0, l = changes.length || 0; i < l; ++i) { + const change = changes[i]; const intact2 = []; const + diff = change.diff || 0; + for (let j = 0, l2 = intact.length; j < l2; ++j) { + const range = intact[j]; + if (change.to <= range.from && change.diff) { + intact2.push({ from: range.from + diff, to: range.to + diff }); + } else if (change.to <= range.from || change.from >= range.to) { + intact2.push(range); + } else { + if (change.from > range.from) intact2.push({ from: range.from, to: change.from }); + if (change.to < range.to) intact2.push({ from: change.to + diff, to: range.to + diff }); + } + } + intact = intact2; + } + return intact; + } + + function getDimensions(cm) { + const d = cm.display; const left = {}; const + width = {}; + for (let n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { + left[cm.options.gutters[i]] = n.offsetLeft; + width[cm.options.gutters[i]] = n.offsetWidth; + } + return { + fixedPos: compensateForHScroll(d), + gutterTotalWidth: d.gutters.offsetWidth, + gutterLeft: left, + gutterWidth: width, + wrapperWidth: d.wrapper.clientWidth, + }; + } + + function patchDisplay(cm, from, to, intact, updateNumbersFrom) { + const dims = getDimensions(cm); + const { display } = cm; + const { lineNumbers } = cm.options; + // IE does bad things to nodes when .innerHTML = "" is used on a parent + // we still need widgets and markers intact to add back to the new content later + if (!intact.length && !ie && (!webkit || !cm.display.currentWheelTarget)) removeChildren(display.lineDiv); + const container = display.lineDiv; let + cur = container.firstChild; + + function rm(node) { + const next = node.nextSibling; + if (webkit && mac && cm.display.currentWheelTarget == node) { + node.style.display = 'none'; + node.lineObj = null; + } else { + container.removeChild(node); + } + return next; + } + + let nextIntact = intact.shift(); let + lineNo = from; + cm.view.doc.iter(from, to, (line) => { + if (nextIntact && nextIntact.to == lineNo) nextIntact = intact.shift(); + if (lineIsHidden(line)) { + if (line.height != 0) updateLineHeight(line, 0); + } else if (nextIntact && nextIntact.from <= lineNo && nextIntact.to > lineNo) { + // This line is intact. Skip to the actual node. Update its + // line number if needed. + while (cur.lineObj != line) cur = rm(cur); + if (lineNumbers && updateNumbersFrom <= lineNo && cur.lineNumber) setTextContent(cur.lineNumber, lineNumberFor(cm.options, lineNo)); + cur = cur.nextSibling; + } else { + // This line needs to be generated. + const lineNode = buildLineElement(cm, line, lineNo, dims); + container.insertBefore(lineNode, cur); + lineNode.lineObj = line; + } + ++lineNo; + }); + while (cur) cur = rm(cur); + } + + function buildLineElement(cm, line, lineNo, dims) { + const lineElement = lineContent(cm, line); + const markers = line.gutterMarkers; const + { display } = cm; + + if (!cm.options.lineNumbers && !markers && !line.bgClass && !line.wrapClass && + (!line.widgets || !line.widgets.length)) return lineElement; + + // Lines with gutter elements or a background class need + // to be wrapped again, and have the extra elements added + // to the wrapper div + + const wrap = elt('div', null, line.wrapClass, 'position: relative'); + if (cm.options.lineNumbers || markers) { + var gutterWrap = wrap.appendChild(elt('div', null, null, `position: absolute; left: ${ + dims.fixedPos}px`)); + wrap.alignable = [gutterWrap]; + if (cm.options.lineNumbers && (!markers || !markers['CodeMirror-linenumbers'])) { + wrap.lineNumber = gutterWrap.appendChild( + elt('div', lineNumberFor(cm.options, lineNo), 'CodeMirror-linenumber CodeMirror-gutter-elt', `left: ${dims.gutterLeft['CodeMirror-linenumbers']}px; width: ${ + display.lineNumInnerWidth}px`) + ); + } + if (markers) { + for (let k = 0; k < cm.options.gutters.length; ++k) { + const id = cm.options.gutters[k]; const + found = markers.hasOwnProperty(id) && markers[id]; + if (found) { + gutterWrap.appendChild(elt('div', [found], 'CodeMirror-gutter-elt', `left: ${ + dims.gutterLeft[id]}px; width: ${dims.gutterWidth[id]}px`)); + } + } + } + } + // Kludge to make sure the styled element lies behind the selection (by z-index) + if (line.bgClass) wrap.appendChild(elt('div', '\u00a0', `${line.bgClass} CodeMirror-linebackground`)); + wrap.appendChild(lineElement); + if (line.widgets) { + for (let i = 0, ws = line.widgets; i < ws.length; ++i) { + const widget = ws[i]; const + node = elt('div', [widget.node], 'CodeMirror-linewidget'); + node.widget = widget; + if (widget.noHScroll) { + (wrap.alignable || (wrap.alignable = [])).push(node); + let width = dims.wrapperWidth; + node.style.left = `${dims.fixedPos}px`; + if (!widget.coverGutter) { + width -= dims.gutterTotalWidth; + node.style.paddingLeft = `${dims.gutterTotalWidth}px`; + } + node.style.width = `${width}px`; + } + if (widget.coverGutter) { + node.style.zIndex = 5; + node.style.position = 'relative'; + if (!widget.noHScroll) node.style.marginLeft = `${-dims.gutterTotalWidth}px`; + } + if (widget.above) wrap.insertBefore(node, cm.options.lineNumbers && line.height != 0 ? gutterWrap : lineElement); + else wrap.appendChild(node); + } + } + + if (ie_lt8) wrap.style.zIndex = 2; + return wrap; + } + + // SELECTION / CURSOR + + function updateSelection(cm) { + const { display } = cm; + const collapsed = posEq(cm.view.sel.from, cm.view.sel.to); + if (collapsed || cm.options.showCursorWhenSelecting) updateSelectionCursor(cm); + else display.cursor.style.display = display.otherCursor.style.display = 'none'; + if (!collapsed) updateSelectionRange(cm); + else display.selectionDiv.style.display = 'none'; + + // Move the hidden textarea near the cursor to prevent scrolling artifacts + const headPos = cursorCoords(cm, cm.view.sel.head, 'div'); + const wrapOff = display.wrapper.getBoundingClientRect(); const + lineOff = display.lineDiv.getBoundingClientRect(); + display.inputDiv.style.top = `${Math.max(0, Math.min(display.wrapper.clientHeight - 10, + headPos.top + lineOff.top - wrapOff.top))}px`; + display.inputDiv.style.left = `${Math.max(0, Math.min(display.wrapper.clientWidth - 10, + headPos.left + lineOff.left - wrapOff.left))}px`; + } + + // No selection, plain cursor + function updateSelectionCursor(cm) { + const { display } = cm; + const pos = cursorCoords(cm, cm.view.sel.head, 'div'); + display.cursor.style.left = `${pos.left}px`; + display.cursor.style.top = `${pos.top}px`; + display.cursor.style.height = `${Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight}px`; + display.cursor.style.display = ''; + + if (pos.other) { + display.otherCursor.style.display = ''; + display.otherCursor.style.left = `${pos.other.left}px`; + display.otherCursor.style.top = `${pos.other.top}px`; + display.otherCursor.style.height = `${(pos.other.bottom - pos.other.top) * 0.85}px`; + } else { display.otherCursor.style.display = 'none'; } + } + + // Highlight selection + function updateSelectionRange(cm) { + const { display } = cm; + const { doc } = cm.view; + const { sel } = cm.view; + const fragment = document.createDocumentFragment(); + const clientWidth = display.lineSpace.offsetWidth; const + pl = paddingLeft(cm.display); + + function add(left, top, width, bottom) { + if (top < 0) top = 0; + fragment.appendChild(elt('div', null, 'CodeMirror-selected', `position: absolute; left: ${left + }px; top: ${top}px; width: ${width == null ? clientWidth - left : width + }px; height: ${bottom - top}px`)); + } + + function drawForLine(line, fromArg, toArg, retTop) { + const lineObj = getLine(doc, line); + const lineLen = lineObj.text.length; let + rVal = retTop ? Infinity : -Infinity; + function coords(ch) { + return charCoords(cm, { line: line, ch: ch }, 'div', lineObj); + } + + iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, (from, to, dir) => { + const leftPos = coords(dir == 'rtl' ? to - 1 : from); + const rightPos = coords(dir == 'rtl' ? from : to - 1); + let { left } = leftPos; + let { right } = rightPos; + if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part + add(left, leftPos.top, null, leftPos.bottom); + left = pl; + if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top); + } + if (toArg == null && to == lineLen) right = clientWidth; + if (fromArg == null && from == 0) left = pl; + rVal = retTop ? Math.min(rightPos.top, rVal) : Math.max(rightPos.bottom, rVal); + if (left < pl + 1) left = pl; + add(left, rightPos.top, right - left, rightPos.bottom); + }); + return rVal; + } + + if (sel.from.line == sel.to.line) { + drawForLine(sel.from.line, sel.from.ch, sel.to.ch); + } else { + const fromObj = getLine(doc, sel.from.line); + let cur = fromObj; let merged; const path = [sel.from.line, sel.from.ch]; let + singleLine; + while (merged = collapsedSpanAtEnd(cur)) { + const found = merged.find(); + path.push(found.from.ch, found.to.line, found.to.ch); + if (found.to.line == sel.to.line) { + path.push(sel.to.ch); + singleLine = true; + break; + } + cur = getLine(doc, found.to.line); + } + + // This is a single, merged line + if (singleLine) { + for (let i = 0; i < path.length; i += 3) drawForLine(path[i], path[i + 1], path[i + 2]); + } else { + let middleTop; let middleBot; const + toObj = getLine(doc, sel.to.line); + if (sel.from.ch) + // Draw the first line of selection. + { middleTop = drawForLine(sel.from.line, sel.from.ch, null, false); } else + // Simply include it in the middle block. + { middleTop = heightAtLine(cm, fromObj) - display.viewOffset; } + + if (!sel.to.ch) middleBot = heightAtLine(cm, toObj) - display.viewOffset; + else middleBot = drawForLine(sel.to.line, collapsedSpanAtStart(toObj) ? null : 0, sel.to.ch, true); + + if (middleTop < middleBot) add(pl, middleTop, null, middleBot); + } + } + + removeChildrenAndAdd(display.selectionDiv, fragment); + display.selectionDiv.style.display = ''; + } + + // Cursor-blinking + function restartBlink(cm) { + const { display } = cm; + clearInterval(display.blinker); + let on = true; + display.cursor.style.visibility = display.otherCursor.style.visibility = ''; + display.blinker = setInterval(() => { + if (!display.cursor.offsetHeight) return; + display.cursor.style.visibility = display.otherCursor.style.visibility = (on = !on) ? '' : 'hidden'; + }, cm.options.cursorBlinkRate); + } + + // HIGHLIGHT WORKER + + function startWorker(cm, time) { + if (cm.view.frontier < cm.display.showingTo) cm.view.highlight.set(time, bind(highlightWorker, cm)); + } + + function highlightWorker(cm) { + const { view } = cm; + const { doc } = view; + if (view.frontier >= cm.display.showingTo) return; + const end = +new Date() + cm.options.workTime; + const state = copyState(view.mode, getStateBefore(cm, view.frontier)); + const changed = []; let + prevChange; + doc.iter(view.frontier, Math.min(doc.size, cm.display.showingTo + 500), (line) => { + if (view.frontier >= cm.display.showingFrom) { // Visible + if (highlightLine(cm, line, state) && view.frontier >= cm.display.showingFrom) { + if (prevChange && prevChange.end == view.frontier) prevChange.end++; + else changed.push(prevChange = { start: view.frontier, end: view.frontier + 1 }); + } + line.stateAfter = copyState(view.mode, state); + } else { + processLine(cm, line, state); + line.stateAfter = view.frontier % 5 == 0 ? copyState(view.mode, state) : null; + } + ++view.frontier; + if (+new Date() > end) { + startWorker(cm, cm.options.workDelay); + return true; + } + }); + if (changed.length) { + operation(cm, function () { + for (let i = 0; i < changed.length; ++i) regChange(this, changed[i].start, changed[i].end); + })(); + } + } + + // Finds the line to start with when starting a parse. Tries to + // find a line with a stateAfter, so that it can start with a + // valid state. If that fails, it returns the line with the + // smallest indentation, which tends to need the least context to + // parse correctly. + function findStartLine(cm, n) { + let minindent; let minline; const + { doc } = cm.view; + for (let search = n, lim = n - 100; search > lim; --search) { + if (search == 0) return 0; + const line = getLine(doc, search - 1); + if (line.stateAfter) return search; + const indented = countColumn(line.text, null, cm.options.tabSize); + if (minline == null || minindent > indented) { + minline = search - 1; + minindent = indented; + } + } + return minline; + } + + function getStateBefore(cm, n) { + const { view } = cm; + let pos = findStartLine(cm, n); let + state = pos && getLine(view.doc, pos - 1).stateAfter; + if (!state) state = startState(view.mode); + else state = copyState(view.mode, state); + view.doc.iter(pos, n, (line) => { + processLine(cm, line, state); + const save = pos == n - 1 || pos % 5 == 0 || pos >= view.showingFrom && pos < view.showingTo; + line.stateAfter = save ? copyState(view.mode, state) : null; + ++pos; + }); + return state; + } + + // POSITION MEASUREMENT + + function paddingTop(display) { return display.lineSpace.offsetTop; } + function paddingLeft(display) { + const e = removeChildrenAndAdd(display.measure, elt('pre')).appendChild(elt('span', 'x')); + return e.offsetLeft; + } + + function measureChar(cm, line, ch, data) { + var data = data || measureLine(cm, line); let + dir = -1; + for (var pos = ch; ; pos += dir) { + var r = data[pos]; + if (r) break; + if (dir < 0 && pos == 0) dir = 1; + } + return { + left: pos < ch ? r.right : r.left, + right: pos > ch ? r.left : r.right, + top: r.top, + bottom: r.bottom, + }; + } + + function measureLine(cm, line) { + // First look in the cache + const { display } = cm; + const cache = cm.display.measureLineCache; + for (let i = 0; i < cache.length; ++i) { + var memo = cache[i]; + if (memo.text == line.text && memo.markedSpans == line.markedSpans && + display.scroller.clientWidth == memo.width) return memo.measure; + } + + const measure = measureLineInner(cm, line); + // Store result in the cache + var memo = { + text: line.text, + width: display.scroller.clientWidth, + markedSpans: line.markedSpans, + measure: measure, + }; + if (cache.length == 16) cache[++display.measureLineCachePos % 16] = memo; + else cache.push(memo); + return measure; + } + + function measureLineInner(cm, line) { + const { display } = cm; + const measure = emptyArray(line.text.length); + const pre = lineContent(cm, line, measure); + + // IE does not cache element positions of inline elements between + // calls to getBoundingClientRect. This makes the loop below, + // which gathers the positions of all the characters on the line, + // do an amount of layout work quadratic to the number of + // characters. When line wrapping is off, we try to improve things + // by first subdividing the line into a bunch of inline blocks, so + // that IE can reuse most of the layout information from caches + // for those blocks. This does interfere with line wrapping, so it + // doesn't work when wrapping is on, but in that case the + // situation is slightly better, since IE does cache line-wrapping + // information and only recomputes per-line. + if (ie && !ie_lt8 && !cm.options.lineWrapping && pre.childNodes.length > 100) { + const fragment = document.createDocumentFragment(); + const chunk = 10; let + n = pre.childNodes.length; + for (var i = 0, chunks = Math.ceil(n / chunk); i < chunks; ++i) { + const wrap = elt('div', null, null, 'display: inline-block'); + for (var j = 0; j < chunk && n; ++j) { + wrap.appendChild(pre.firstChild); + --n; + } + fragment.appendChild(wrap); + } + pre.appendChild(fragment); + } + + removeChildrenAndAdd(display.measure, pre); + + const outer = display.lineDiv.getBoundingClientRect(); + const vranges = []; const data = emptyArray(line.text.length); const + maxBot = pre.offsetHeight; + for (var i = 0, cur; i < measure.length; ++i) { + if (cur = measure[i]) { + const size = cur.getBoundingClientRect(); + const top = Math.max(0, size.top - outer.top); const + bot = Math.min(size.bottom - outer.top, maxBot); + for (var j = 0; j < vranges.length; j += 2) { + const rtop = vranges[j]; const + rbot = vranges[j + 1]; + if (rtop > bot || rbot < top) continue; + if (rtop <= top && rbot >= bot || + top <= rtop && bot >= rbot || + Math.min(bot, rbot) - Math.max(top, rtop) >= (bot - top) >> 1) { + vranges[j] = Math.min(top, rtop); + vranges[j + 1] = Math.max(bot, rbot); + break; + } + } + if (j == vranges.length) vranges.push(top, bot); + data[i] = { left: size.left - outer.left, right: size.right - outer.left, top: j }; + } + } + for (var i = 0, cur; i < data.length; ++i) { + if (cur = data[i]) { + const vr = cur.top; + cur.top = vranges[vr]; cur.bottom = vranges[vr + 1]; + } + } + return data; + } + + function clearCaches(cm) { + cm.display.measureLineCache.length = cm.display.measureLineCachePos = 0; + cm.display.cachedCharWidth = cm.display.cachedTextHeight = null; + cm.view.maxLineChanged = true; + } + + // Context is one of "line", "div" (display.lineDiv), "local"/null (editor), or "page" + function intoCoordSystem(cm, lineObj, rect, context) { + if (lineObj.widgets) { + for (let i = 0; i < lineObj.widgets.length; ++i) { + if (lineObj.widgets[i].above) { + const size = lineObj.widgets[i].node.offsetHeight; + rect.top += size; rect.bottom += size; + } + } + } + if (context == 'line') return rect; + if (!context) context = 'local'; + let yOff = heightAtLine(cm, lineObj); + if (context != 'local') yOff -= cm.display.viewOffset; + if (context == 'page') { + const lOff = cm.display.lineSpace.getBoundingClientRect(); + yOff += lOff.top + (window.pageYOffset || (document.documentElement || document.body).scrollTop); + const xOff = lOff.left + (window.pageXOffset || (document.documentElement || document.body).scrollLeft); + rect.left += xOff; rect.right += xOff; + } + rect.top += yOff; rect.bottom += yOff; + return rect; + } + + function charCoords(cm, pos, context, lineObj) { + if (!lineObj) lineObj = getLine(cm.view.doc, pos.line); + return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch), context); + } + + function cursorCoords(cm, pos, context, lineObj, measurement) { + lineObj = lineObj || getLine(cm.view.doc, pos.line); + if (!measurement) measurement = measureLine(cm, lineObj); + function get(ch, right) { + const m = measureChar(cm, lineObj, ch, measurement); + if (right) m.left = m.right; else m.right = m.left; + return intoCoordSystem(cm, lineObj, m, context); + } + const order = getOrder(lineObj); const + { ch } = pos; + if (!order) return get(ch); + let main; let other; const + linedir = order[0].level; + for (let i = 0; i < order.length; ++i) { + const part = order[i]; const rtl = part.level % 2; var nb; var + here; + if (part.from < ch && part.to > ch) return get(ch, rtl); + const left = rtl ? part.to : part.from; const + right = rtl ? part.from : part.to; + if (left == ch) { + // Opera and IE return bogus offsets and widths for edges + // where the direction flips, but only for the side with the + // lower level. So we try to use the side with the higher + // level. + if (i && part.level < (nb = order[i - 1]).level) here = get(nb.level % 2 ? nb.from : nb.to - 1, true); + else here = get(rtl && part.from != part.to ? ch - 1 : ch); + if (rtl == linedir) main = here; else other = here; + } else if (right == ch) { + var nb = i < order.length - 1 && order[i + 1]; + if (!rtl && nb && nb.from == nb.to) continue; + if (nb && part.level < nb.level) here = get(nb.level % 2 ? nb.to - 1 : nb.from); + else here = get(rtl ? ch : ch - 1, true); + if (rtl == linedir) main = here; else other = here; + } + } + if (linedir && !ch) other = get(order[0].to - 1); + if (!main) return other; + if (other) main.other = other; + return main; + } + + // Coords must be lineSpace-local + function coordsChar(cm, x, y) { + const { doc } = cm.view; + y += cm.display.viewOffset; + if (y < 0) return { line: 0, ch: 0, outside: true }; + let lineNo = lineAtHeight(doc, y); + if (lineNo >= doc.size) return { line: doc.size - 1, ch: getLine(doc, doc.size - 1).text.length }; + if (x < 0) x = 0; + + for (;;) { + const lineObj = getLine(doc, lineNo); + const found = coordsCharInner(cm, lineObj, lineNo, x, y); + const merged = collapsedSpanAtEnd(lineObj); + if (merged && found.ch == lineRight(lineObj)) lineNo = merged.find().to.line; + else return found; + } + } + + function coordsCharInner(cm, lineObj, lineNo, x, y) { + const innerOff = y - heightAtLine(cm, lineObj); + let wrongLine = false; const + cWidth = cm.display.wrapper.clientWidth; + const measurement = measureLine(cm, lineObj); + + function getX(ch) { + const sp = cursorCoords(cm, { line: lineNo, ch: ch }, 'line', lineObj, measurement); + wrongLine = true; + if (innerOff > sp.bottom) return Math.max(0, sp.left - cWidth); + else if (innerOff < sp.top) return sp.left + cWidth; + wrongLine = false; + return sp.left; + } + + const bidi = getOrder(lineObj); let + dist = lineObj.text.length; + let from = lineLeft(lineObj); let + to = lineRight(lineObj); + let fromX = paddingLeft(cm.display); let + toX = getX(to); + + if (x > toX) return { line: lineNo, ch: to, outside: wrongLine }; + // Do a binary search between these bounds. + for (;;) { + if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) { + const after = x - fromX < toX - x; let + ch = after ? from : to; + while (isExtendingChar.test(lineObj.text.charAt(ch))) ++ch; + return { line: lineNo, ch: ch, after: after, outside: wrongLine }; + } + const step = Math.ceil(dist / 2); let + middle = from + step; + if (bidi) { + middle = from; + for (let i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1); + } + const middleX = getX(middle); + if (middleX > x) { to = middle; toX = middleX; if (wrongLine) toX += 1000; dist -= step; } else { from = middle; fromX = middleX; dist = step; } + } + } + + let measureText; + function textHeight(display) { + if (display.cachedTextHeight != null) return display.cachedTextHeight; + if (measureText == null) { + measureText = elt('pre'); + // Measure a bunch of lines, for browsers that compute + // fractional heights. + for (let i = 0; i < 49; ++i) { + measureText.appendChild(document.createTextNode('x')); + measureText.appendChild(elt('br')); + } + measureText.appendChild(document.createTextNode('x')); + } + removeChildrenAndAdd(display.measure, measureText); + const height = measureText.offsetHeight / 50; + if (height > 3) display.cachedTextHeight = height; + removeChildren(display.measure); + return height || 1; + } + + function charWidth(display) { + if (display.cachedCharWidth != null) return display.cachedCharWidth; + const anchor = elt('span', 'x'); + const pre = elt('pre', [anchor]); + removeChildrenAndAdd(display.measure, pre); + const width = anchor.offsetWidth; + if (width > 2) display.cachedCharWidth = width; + return width || 10; + } + + // OPERATIONS + + // Operations are used to wrap changes in such a way that each + // change won't have to update the cursor and display (which would + // be awkward, slow, and error-prone), but instead updates are + // batched and then all combined and executed at once. + + function startOperation(cm) { + if (cm.curOp) ++cm.curOp.depth; + else { + cm.curOp = { + // Nested operations delay update until the outermost one + // finishes. + depth: 1, + // An array of ranges of lines that have to be updated. See + // updateDisplay. + changes: [], + delayedCallbacks: [], + updateInput: null, + userSelChange: null, + textChanged: null, + selectionChanged: false, + updateMaxLine: false, + id: ++cm.nextOpId, + }; + } + } + + function endOperation(cm) { + const op = cm.curOp; + if (--op.depth) return; + cm.curOp = null; + const { view } = cm; + const { display } = cm; + if (op.updateMaxLine) computeMaxLength(view); + if (view.maxLineChanged && !cm.options.lineWrapping) { + const width = measureChar(cm, view.maxLine, view.maxLine.text.length).right; + display.sizer.style.minWidth = `${width + 3 + scrollerCutOff}px`; + view.maxLineChanged = false; + } + let newScrollPos; let + updated; + if (op.selectionChanged) { + const coords = cursorCoords(cm, view.sel.head); + newScrollPos = calculateScrollPos(cm, coords.left, coords.top, coords.left, coords.bottom); + } + if (op.changes.length || newScrollPos && newScrollPos.scrollTop != null) updated = updateDisplay(cm, op.changes, newScrollPos && newScrollPos.scrollTop); + if (!updated && op.selectionChanged) updateSelection(cm); + if (newScrollPos) scrollCursorIntoView(cm); + if (op.selectionChanged) restartBlink(cm); + + if (view.focused && op.updateInput) resetInput(cm, op.userSelChange); + + if (op.textChanged) signal(cm, 'change', cm, op.textChanged); + if (op.selectionChanged) signal(cm, 'cursorActivity', cm); + for (let i = 0; i < op.delayedCallbacks.length; ++i) op.delayedCallbacks[i](cm); + } + + // Wraps a function in an operation. Returns the wrapped function. + function operation(cm1, f) { + return function () { + const cm = cm1 || this; + startOperation(cm); + try { var result = f.apply(cm, arguments); } finally { endOperation(cm); } + return result; + }; + } + + function regChange(cm, from, to, lendiff) { + cm.curOp.changes.push({ from: from, to: to, diff: lendiff }); + } + + // INPUT HANDLING + + function slowPoll(cm) { + if (cm.view.pollingFast) return; + cm.display.poll.set(cm.options.pollInterval, () => { + readInput(cm); + if (cm.view.focused) slowPoll(cm); + }); + } + + function fastPoll(cm) { + let missed = false; + cm.display.pollingFast = true; + function p() { + const changed = readInput(cm); + if (!changed && !missed) { missed = true; cm.display.poll.set(60, p); } else { cm.display.pollingFast = false; slowPoll(cm); } + } + cm.display.poll.set(20, p); + } + + // prevInput is a hack to work with IME. If we reset the textarea + // on every change, that breaks IME. So we look for changes + // compared to the previous content instead. (Modern browsers have + // events that indicate IME taking place, but these are not widely + // supported or compatible enough yet to rely on.) + function readInput(cm) { + const { input } = cm.display; + const { prevInput } = cm.display; + const { view } = cm; + const { sel } = view; + if (!view.focused || hasSelection(input) || isReadOnly(cm)) return false; + const text = input.value; + if (text == prevInput && posEq(sel.from, sel.to)) return false; + startOperation(cm); + view.sel.shift = false; + let same = 0; const + l = Math.min(prevInput.length, text.length); + while (same < l && prevInput[same] == text[same]) ++same; + let { from } = sel; + let { to } = sel; + if (same < prevInput.length) from = { line: from.line, ch: from.ch - (prevInput.length - same) }; + else if (view.overwrite && posEq(from, to) && !cm.display.pasteIncoming) to = { line: to.line, ch: Math.min(getLine(cm.view.doc, to.line).text.length, to.ch + (text.length - same)) }; + const { updateInput } = cm.curOp; + updateDoc(cm, from, to, splitLines(text.slice(same)), 'end', cm.display.pasteIncoming ? 'paste' : 'input', { from: from, to: to }); + cm.curOp.updateInput = updateInput; + if (text.length > 1000) input.value = cm.display.prevInput = ''; + else cm.display.prevInput = text; + endOperation(cm); + cm.display.pasteIncoming = false; + return true; + } + + function resetInput(cm, user) { + const { view } = cm; + let minimal; + let selected; + if (!posEq(view.sel.from, view.sel.to)) { + cm.display.prevInput = ''; + minimal = hasCopyEvent && + (view.sel.to.line - view.sel.from.line > 100 || (selected = cm.getSelection()).length > 1000); + if (minimal) cm.display.input.value = '-'; + else cm.display.input.value = selected || cm.getSelection(); + if (view.focused) selectInput(cm.display.input); + } else if (user) cm.display.prevInput = cm.display.input.value = ''; + cm.display.inaccurateSelection = minimal; + } + + function focusInput(cm) { + if (cm.options.readOnly != 'nocursor' && (ie || document.activeElement != cm.display.input)) cm.display.input.focus(); + } + + function isReadOnly(cm) { + return cm.options.readOnly || cm.view.cantEdit; + } + + // EVENT HANDLERS + + function registerEventHandlers(cm) { + const d = cm.display; + on(d.scroller, 'mousedown', operation(cm, onMouseDown)); + on(d.scroller, 'dblclick', operation(cm, e_preventDefault)); + on(d.lineSpace, 'selectstart', (e) => { + if (!mouseEventInWidget(d, e)) e_preventDefault(e); + }); + // Gecko browsers fire contextmenu *after* opening the menu, at + // which point we can't mess with it anymore. Context menu is + // handled in onMouseDown for Gecko. + if (!gecko) on(d.scroller, 'contextmenu', (e) => { onContextMenu(cm, e); }); + + on(d.scroller, 'scroll', () => { + setScrollTop(cm, d.scroller.scrollTop); + setScrollLeft(cm, d.scroller.scrollLeft, true); + signal(cm, 'scroll', cm); + }); + on(d.scrollbarV, 'scroll', () => { + setScrollTop(cm, d.scrollbarV.scrollTop); + }); + on(d.scrollbarH, 'scroll', () => { + setScrollLeft(cm, d.scrollbarH.scrollLeft); + }); + + on(d.scroller, 'mousewheel', (e) => { onScrollWheel(cm, e); }); + on(d.scroller, 'DOMMouseScroll', (e) => { onScrollWheel(cm, e); }); + + function reFocus() { if (cm.view.focused) setTimeout(bind(focusInput, cm), 0); } + on(d.scrollbarH, 'mousedown', reFocus); + on(d.scrollbarV, 'mousedown', reFocus); + // Prevent wrapper from ever scrolling + on(d.wrapper, 'scroll', () => { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; }); + on(window, 'resize', function resizeHandler() { + // Might be a text scaling operation, clear size caches. + d.cachedCharWidth = d.cachedTextHeight = null; + clearCaches(cm); + if (d.wrapper.parentNode) updateDisplay(cm, true); + else off(window, 'resize', resizeHandler); + }); + + on(d.input, 'keyup', operation(cm, (e) => { + if (cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return; + if (e_prop(e, 'keyCode') == 16) cm.view.sel.shift = false; + })); + on(d.input, 'input', bind(fastPoll, cm)); + on(d.input, 'keydown', operation(cm, onKeyDown)); + on(d.input, 'keypress', operation(cm, onKeyPress)); + on(d.input, 'focus', bind(onFocus, cm)); + on(d.input, 'blur', bind(onBlur, cm)); + + function drag_(e) { + if (cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))) return; + e_stop(e); + } + if (cm.options.dragDrop) { + on(d.scroller, 'dragstart', (e) => { onDragStart(cm, e); }); + on(d.scroller, 'dragenter', drag_); + on(d.scroller, 'dragover', drag_); + on(d.scroller, 'drop', operation(cm, onDrop)); + } + on(d.scroller, 'paste', () => { focusInput(cm); fastPoll(cm); }); + on(d.input, 'paste', () => { + d.pasteIncoming = true; + fastPoll(cm); + }); + + function prepareCopy() { + if (d.inaccurateSelection) { + d.prevInput = ''; + d.inaccurateSelection = false; + d.input.value = cm.getSelection(); + selectInput(d.input); + } + } + on(d.input, 'cut', prepareCopy); + on(d.input, 'copy', prepareCopy); + + // Needed to handle Tab key in KHTML + if (khtml) { + on(d.sizer, 'mouseup', () => { + if (document.activeElement == d.input) d.input.blur(); + focusInput(cm); + }); + } + } + + function mouseEventInWidget(display, e) { + for (let n = e_target(e); n != display.wrapper; n = n.parentNode) { + if (/\bCodeMirror-(?:line)?widget\b/.test(n.className) || + n.parentNode == display.sizer && n != display.mover) return true; + } + } + + function posFromMouse(cm, e, liberal) { + const { display } = cm; + if (!liberal) { + const target = e_target(e); + if (target == display.scrollbarH || target == display.scrollbarH.firstChild || + target == display.scrollbarV || target == display.scrollbarV.firstChild || + target == display.scrollbarFiller) return null; + } + let x; let y; const + space = display.lineSpace.getBoundingClientRect(); + // Fails unpredictably on IE[67] when mouse is dragged around quickly. + try { x = e.clientX; y = e.clientY; } catch (e) { return null; } + return coordsChar(cm, x - space.left, y - space.top); + } + + let lastClick; let + lastDoubleClick; + function onMouseDown(e) { + const cm = this; const { display } = cm; const { view } = cm; const { sel } = view; const + { doc } = view; + sel.shift = e_prop(e, 'shiftKey'); + + if (mouseEventInWidget(display, e)) { + if (!webkit) { + display.scroller.draggable = false; + setTimeout(() => { display.scroller.draggable = true; }, 100); + } + return; + } + if (clickInGutter(cm, e)) return; + const start = posFromMouse(cm, e); + + switch (e_button(e)) { + case 3: + if (gecko) onContextMenu.call(cm, cm, e); + return; + case 2: + if (start) extendSelection(cm, start); + setTimeout(bind(focusInput, cm), 20); + e_preventDefault(e); + return; + } + // For button 1, if it was clicked inside the editor + // (posFromMouse returning non-null), we have to adjust the + // selection. + if (!start) { if (e_target(e) == display.scroller) e_preventDefault(e); return; } + + if (!view.focused) onFocus(cm); + + const now = +new Date(); + let type = 'single'; + if (lastDoubleClick && lastDoubleClick.time > now - 400 && posEq(lastDoubleClick.pos, start)) { + type = 'triple'; + e_preventDefault(e); + setTimeout(bind(focusInput, cm), 20); + selectLine(cm, start.line); + } else if (lastClick && lastClick.time > now - 400 && posEq(lastClick.pos, start)) { + type = 'double'; + lastDoubleClick = { time: now, pos: start }; + e_preventDefault(e); + const word = findWordAt(getLine(doc, start.line).text, start); + extendSelection(cm, word.from, word.to); + } else { lastClick = { time: now, pos: start }; } + + let last = start; + if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && !posEq(sel.from, sel.to) && + !posLess(start, sel.from) && !posLess(sel.to, start) && type == 'single') { + var dragEnd = operation(cm, (e2) => { + if (webkit) display.scroller.draggable = false; + view.draggingText = false; + off(document, 'mouseup', dragEnd); + off(display.scroller, 'drop', dragEnd); + if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) { + e_preventDefault(e2); + extendSelection(cm, start); + focusInput(cm); + } + }); + // Let the drag handler handle this. + if (webkit) display.scroller.draggable = true; + view.draggingText = dragEnd; + // IE's approach to draggable + if (display.scroller.dragDrop) display.scroller.dragDrop(); + on(document, 'mouseup', dragEnd); + on(display.scroller, 'drop', dragEnd); + return; + } + e_preventDefault(e); + if (type == 'single') extendSelection(cm, clipPos(doc, start)); + + let startstart = sel.from; let + startend = sel.to; + + function doSelect(cur) { + if (type == 'single') { + extendSelection(cm, clipPos(doc, start), cur); + return; + } + + startstart = clipPos(doc, startstart); + startend = clipPos(doc, startend); + if (type == 'double') { + const word = findWordAt(getLine(doc, cur.line).text, cur); + if (posLess(cur, startstart)) extendSelection(cm, word.from, startend); + else extendSelection(cm, startstart, word.to); + } else if (type == 'triple') { + if (posLess(cur, startstart)) extendSelection(cm, startend, clipPos(doc, { line: cur.line, ch: 0 })); + else extendSelection(cm, startstart, clipPos(doc, { line: cur.line + 1, ch: 0 })); + } + } + + const editorSize = display.wrapper.getBoundingClientRect(); + // Used to ensure timeout re-tries don't fire when another extend + // happened in the meantime (clearTimeout isn't reliable -- at + // least on Chrome, the timeouts still happen even when cleared, + // if the clear happens after their scheduled firing time). + let counter = 0; + + function extend(e) { + const curCount = ++counter; + const cur = posFromMouse(cm, e, true); + if (!cur) return; + if (!posEq(cur, last)) { + if (!view.focused) onFocus(cm); + last = cur; + doSelect(cur); + const visible = visibleLines(display, doc); + if (cur.line >= visible.to || cur.line < visible.from) setTimeout(operation(cm, () => { if (counter == curCount) extend(e); }), 150); + } else { + const outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0; + if (outside) { + setTimeout(operation(cm, () => { + if (counter != curCount) return; + display.scroller.scrollTop += outside; + extend(e); + }), 50); + } + } + } + + function done(e) { + counter = Infinity; + const cur = posFromMouse(cm, e); + if (cur) doSelect(cur); + e_preventDefault(e); + focusInput(cm); + off(document, 'mousemove', move); + off(document, 'mouseup', up); + } + + var move = operation(cm, (e) => { + if (!ie && !e_button(e)) done(e); + else extend(e); + }); + var up = operation(cm, done); + on(document, 'mousemove', move); + on(document, 'mouseup', up); + } + + function onDrop(e) { + const cm = this; + if (cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))) return; + e_preventDefault(e); + let pos = posFromMouse(cm, e, true); const + { files } = e.dataTransfer; + if (!pos || isReadOnly(cm)) return; + if (files && files.length && window.FileReader && window.File) { + const n = files.length; var text = Array(n); let + read = 0; + const loadFile = function (file, i) { + const reader = new FileReader(); + reader.onload = function () { + text[i] = reader.result; + if (++read == n) { + pos = clipPos(cm.view.doc, pos); + operation(cm, () => { + const end = replaceRange(cm, text.join(''), pos, pos, 'paste'); + setSelection(cm, pos, end); + })(); + } + }; + reader.readAsText(file); + }; + for (let i = 0; i < n; ++i) loadFile(files[i], i); + } else { + // Don't do a replace if the drop happened inside of the selected text. + if (cm.view.draggingText && !(posLess(pos, cm.view.sel.from) || posLess(cm.view.sel.to, pos))) { + cm.view.draggingText(e); + if (ie) setTimeout(bind(focusInput, cm), 50); + return; + } + try { + var text = e.dataTransfer.getData('Text'); + if (text) { + const curFrom = cm.view.sel.from; const + curTo = cm.view.sel.to; + setSelection(cm, pos, pos); + if (cm.view.draggingText) replaceRange(cm, '', curFrom, curTo, 'paste'); + cm.replaceSelection(text, null, 'paste'); + focusInput(cm); + onFocus(cm); + } + } catch (e) {} + } + } + + function clickInGutter(cm, e) { + const { display } = cm; + try { + var mX = e.clientX; var + mY = e.clientY; + } catch (e) { return false; } + + if (mX >= Math.floor(display.gutters.getBoundingClientRect().right)) return false; + e_preventDefault(e); + if (!hasHandler(cm, 'gutterClick')) return true; + + const lineBox = display.lineDiv.getBoundingClientRect(); + if (mY > lineBox.bottom) return true; + mY -= lineBox.top - display.viewOffset; + + for (let i = 0; i < cm.options.gutters.length; ++i) { + const g = display.gutters.childNodes[i]; + if (g && g.getBoundingClientRect().right >= mX) { + const line = lineAtHeight(cm.view.doc, mY); + const gutter = cm.options.gutters[i]; + signalLater(cm, cm, 'gutterClick', cm, line, gutter, e); + break; + } + } + return true; + } + + function onDragStart(cm, e) { + const txt = cm.getSelection(); + e.dataTransfer.setData('Text', txt); + + // Use dummy image instead of default browsers image. + // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. + if (e.dataTransfer.setDragImage && !safari) e.dataTransfer.setDragImage(elt('img'), 0, 0); + } + + function setScrollTop(cm, val) { + if (Math.abs(cm.view.scrollTop - val) < 2) return; + cm.view.scrollTop = val; + if (!gecko) updateDisplay(cm, [], val); + if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val; + if (cm.display.scrollbarV.scrollTop != val) cm.display.scrollbarV.scrollTop = val; + if (gecko) updateDisplay(cm, []); + } + function setScrollLeft(cm, val, isScroller) { + if (isScroller ? val == cm.view.scrollLeft : Math.abs(cm.view.scrollLeft - val) < 2) return; + cm.view.scrollLeft = val; + alignHorizontally(cm); + if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val; + if (cm.display.scrollbarH.scrollLeft != val) cm.display.scrollbarH.scrollLeft = val; + } + + // Since the delta values reported on mouse wheel events are + // unstandardized between browsers and even browser versions, and + // generally horribly unpredictable, this code starts by measuring + // the scroll effect that the first few mouse wheel events have, + // and, from that, detects the way it can convert deltas to pixel + // offsets afterwards. + // + // The reason we want to know the amount a wheel event will scroll + // is that it gives us a chance to update the display before the + // actual scrolling happens, reducing flickering. + + let wheelSamples = 0; let wheelDX; let wheelDY; let wheelStartX; let wheelStartY; let + wheelPixelsPerUnit = null; + // Fill in a browser-detected starting value on browsers where we + // know one. These don't have to be accurate -- the result of them + // being wrong would just be a slight flicker on the first wheel + // scroll (if it is large enough). + if (ie) wheelPixelsPerUnit = -0.53; + else if (gecko) wheelPixelsPerUnit = 15; + else if (chrome) wheelPixelsPerUnit = -0.7; + else if (safari) wheelPixelsPerUnit = -1 / 3; + + function onScrollWheel(cm, e) { + let dx = e.wheelDeltaX; let + dy = e.wheelDeltaY; + if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail; + if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail; + else if (dy == null) dy = e.wheelDelta; + + // Webkit browsers on OS X abort momentum scrolls when the target + // of the scroll event is removed from the scrollable element. + // This hack (see related code in patchDisplay) makes sure the + // element is kept around. + if (dy && mac && webkit) { + for (let cur = e.target; cur != scroll; cur = cur.parentNode) { + if (cur.lineObj) { + cm.display.currentWheelTarget = cur; + break; + } + } + } + + var scroll = cm.display.scroller; + // On some browsers, horizontal scrolling will cause redraws to + // happen before the gutter has been realigned, causing it to + // wriggle around in a most unseemly way. When we have an + // estimated pixels/delta value, we just handle horizontal + // scrolling entirely here. It'll be slightly off from native, but + // better than glitching out. + if (dx && !gecko && !opera && wheelPixelsPerUnit != null) { + if (dy) setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight))); + setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth))); + e_preventDefault(e); + wheelStartX = null; // Abort measurement, if in progress + return; + } + + if (dy && wheelPixelsPerUnit != null) { + const pixels = dy * wheelPixelsPerUnit; + let top = cm.view.scrollTop; let + bot = top + cm.display.wrapper.clientHeight; + if (pixels < 0) top = Math.max(0, top + pixels - 50); + else bot = Math.min(cm.view.doc.height, bot + pixels + 50); + updateDisplay(cm, [], { top: top, bottom: bot }); + } + + if (wheelSamples < 20) { + if (wheelStartX == null) { + wheelStartX = scroll.scrollLeft; wheelStartY = scroll.scrollTop; + wheelDX = dx; wheelDY = dy; + setTimeout(() => { + if (wheelStartX == null) return; + const movedX = scroll.scrollLeft - wheelStartX; + const movedY = scroll.scrollTop - wheelStartY; + const sample = (movedY && wheelDY && movedY / wheelDY) || + (movedX && wheelDX && movedX / wheelDX); + wheelStartX = wheelStartY = null; + if (!sample) return; + wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); + ++wheelSamples; + }, 200); + } else { + wheelDX += dx; wheelDY += dy; + } + } + } + + function doHandleBinding(cm, bound, dropShift) { + if (typeof bound === 'string') { + bound = commands[bound]; + if (!bound) return false; + } + // Ensure previous input has been read, so that the handler sees a + // consistent view of the document + if (cm.display.pollingFast && readInput(cm)) cm.display.pollingFast = false; + const { view } = cm; + const prevShift = view.sel.shift; + try { + if (isReadOnly(cm)) view.suppressEdits = true; + if (dropShift) view.sel.shift = false; + bound(cm); + } catch (e) { + if (e != Pass) throw e; + return false; + } finally { + view.sel.shift = prevShift; + view.suppressEdits = false; + } + return true; + } + + function allKeyMaps(cm) { + const maps = cm.view.keyMaps.slice(0); + maps.push(cm.options.keyMap); + if (cm.options.extraKeys) maps.unshift(cm.options.extraKeys); + return maps; + } + + let maybeTransition; + function handleKeyBinding(cm, e) { + // Handle auto keymap transitions + const startMap = getKeyMap(cm.options.keyMap); const + next = startMap.auto; + clearTimeout(maybeTransition); + if (next && !isModifierKey(e)) { + maybeTransition = setTimeout(() => { + if (getKeyMap(cm.options.keyMap) == startMap) cm.options.keyMap = (next.call ? next.call(null, cm) : next); + }, 50); + } + + let name = keyNames[e_prop(e, 'keyCode')]; let + handled = false; + const flipCtrlCmd = mac && (opera || qtwebkit); + if (name == null || e.altGraphKey) return false; + if (e_prop(e, 'altKey')) name = `Alt-${name}`; + if (e_prop(e, flipCtrlCmd ? 'metaKey' : 'ctrlKey')) name = `Ctrl-${name}`; + if (e_prop(e, flipCtrlCmd ? 'ctrlKey' : 'metaKey')) name = `Cmd-${name}`; + + let stopped = false; + function stop() { stopped = true; } + const keymaps = allKeyMaps(cm); + + if (e_prop(e, 'shiftKey')) { + handled = lookupKey(`Shift-${name}`, keymaps, b => doHandleBinding(cm, b, true), stop) || + lookupKey(name, keymaps, (b) => { + if (typeof b === 'string' && /^go[A-Z]/.test(b)) return doHandleBinding(cm, b); + }, stop); + } else { + handled = lookupKey(name, keymaps, b => doHandleBinding(cm, b), stop); + } + if (stopped) handled = false; + if (handled) { + e_preventDefault(e); + restartBlink(cm); + if (ie_lt9) { e.oldKeyCode = e.keyCode; e.keyCode = 0; } + } + return handled; + } + + function handleCharBinding(cm, e, ch) { + const handled = lookupKey(`'${ch}'`, allKeyMaps(cm), b => doHandleBinding(cm, b, true)); + if (handled) { + e_preventDefault(e); + restartBlink(cm); + } + return handled; + } + + let lastStoppedKey = null; + function onKeyDown(e) { + const cm = this; + if (!cm.view.focused) onFocus(cm); + if (ie && e.keyCode == 27) { e.returnValue = false; } + if (cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return; + const code = e_prop(e, 'keyCode'); + // IE does strange things with escape. + cm.view.sel.shift = code == 16 || e_prop(e, 'shiftKey'); + // First give onKeyEvent option a chance to handle this. + const handled = handleKeyBinding(cm, e); + if (opera) { + lastStoppedKey = handled ? code : null; + // Opera has no cut event... we try to at least catch the key combo + if (!handled && code == 88 && !hasCopyEvent && e_prop(e, mac ? 'metaKey' : 'ctrlKey')) cm.replaceSelection(''); + } + } + + function onKeyPress(e) { + const cm = this; + if (cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return; + const keyCode = e_prop(e, 'keyCode'); const + charCode = e_prop(e, 'charCode'); + if (opera && keyCode == lastStoppedKey) { lastStoppedKey = null; e_preventDefault(e); return; } + if (((opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(cm, e)) return; + const ch = String.fromCharCode(charCode == null ? keyCode : charCode); + if (this.options.electricChars && this.view.mode.electricChars && + this.options.smartIndent && !isReadOnly(this) && + this.view.mode.electricChars.indexOf(ch) > -1) setTimeout(operation(cm, () => { indentLine(cm, cm.view.sel.to.line, 'smart'); }), 75); + if (handleCharBinding(cm, e, ch)) return; + fastPoll(cm); + } + + function onFocus(cm) { + if (cm.options.readOnly == 'nocursor') return; + if (!cm.view.focused) { + signal(cm, 'focus', cm); + cm.view.focused = true; + if (cm.display.scroller.className.search(/\bCodeMirror-focused\b/) == -1) cm.display.scroller.className += ' CodeMirror-focused'; + resetInput(cm, true); + } + slowPoll(cm); + restartBlink(cm); + } + function onBlur(cm) { + if (cm.view.focused) { + signal(cm, 'blur', cm); + cm.view.focused = false; + cm.display.scroller.className = cm.display.scroller.className.replace(' CodeMirror-focused', ''); + } + clearInterval(cm.display.blinker); + setTimeout(() => { if (!cm.view.focused) cm.view.sel.shift = false; }, 150); + } + + let detectingSelectAll; + function onContextMenu(cm, e) { + const { display } = cm; + const { sel } = cm.view; + const pos = posFromMouse(cm, e); const + scrollPos = display.scroller.scrollTop; + if (!pos || opera) return; // Opera is difficult. + if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to)) operation(cm, setSelection)(cm, pos, pos); + + const oldCSS = display.input.style.cssText; + display.inputDiv.style.position = 'absolute'; + display.input.style.cssText = `position: fixed; width: 30px; height: 30px; top: ${e.clientY - 5 + }px; left: ${e.clientX - 5}px; z-index: 1000; background: white; outline: none;` + + `border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`; + focusInput(cm); + resetInput(cm, true); + // Adds "Select all" to context menu in FF + if (posEq(sel.from, sel.to)) display.input.value = display.prevInput = ' '; + + function rehide() { + display.inputDiv.style.position = 'relative'; + display.input.style.cssText = oldCSS; + if (ie_lt9) display.scrollbarV.scrollTop = display.scroller.scrollTop = scrollPos; + slowPoll(cm); + + // Try to detect the user choosing select-all + if (display.input.selectionStart != null) { + clearTimeout(detectingSelectAll); + const extval = display.input.value = ` ${posEq(sel.from, sel.to) ? '' : display.input.value}`; let + i = 0; + display.prevInput = ' '; + display.input.selectionStart = 1; display.input.selectionEnd = extval.length; + detectingSelectAll = setTimeout(function poll() { + if (display.prevInput == ' ' && display.input.selectionStart == 0) operation(cm, commands.selectAll)(cm); + else if (i++ < 10) detectingSelectAll = setTimeout(poll, 500); + else resetInput(cm); + }, 200); + } + } + + if (gecko) { + e_stop(e); + on(window, 'mouseup', function mouseup() { + off(window, 'mouseup', mouseup); + setTimeout(rehide, 20); + }); + } else { + setTimeout(rehide, 50); + } + } + + // UPDATING + + // Replace the range from from to to by the strings in newText. + // Afterwards, set the selection to selFrom, selTo. + function updateDoc(cm, from, to, newText, selUpdate, origin) { + // Possibly split or suppress the update based on the presence + // of read-only spans in its range. + const split = sawReadOnlySpans && + removeReadOnlyRanges(cm.view.doc, from, to); + if (split) { + for (let i = split.length - 1; i >= 1; --i) updateDocInner(cm, split[i].from, split[i].to, [''], origin); + if (split.length) return updateDocInner(cm, split[0].from, split[0].to, newText, selUpdate, origin); + } else { + return updateDocInner(cm, from, to, newText, selUpdate, origin); + } + } + + function updateDocInner(cm, from, to, newText, selUpdate, origin) { + if (cm.view.suppressEdits) return; + + const { view } = cm; + const { doc } = view; + const old = []; + doc.iter(from.line, to.line + 1, (line) => { + old.push(newHL(line.text, line.markedSpans)); + }); + const startSelFrom = view.sel.from; const + startSelTo = view.sel.to; + const lines = updateMarkedSpans(hlSpans(old[0]), hlSpans(lst(old)), from.ch, to.ch, newText); + const retval = updateDocNoUndo(cm, from, to, lines, selUpdate, origin); + if (view.history) { addChange(cm, from.line, newText.length, old, origin, startSelFrom, startSelTo, view.sel.from, view.sel.to); } + return retval; + } + + function unredoHelper(cm, type) { + const { doc } = cm.view; + const hist = cm.view.history; + const set = (type == 'undo' ? hist.done : hist.undone).pop(); + if (!set) return; + const anti = { + events: [], + fromBefore: set.fromAfter, + toBefore: set.toAfter, + fromAfter: set.fromBefore, + toAfter: set.toBefore, + }; + for (let i = set.events.length - 1; i >= 0; i -= 1) { + hist.dirtyCounter += type == 'undo' ? -1 : 1; + const change = set.events[i]; + var replaced = []; const + end = change.start + change.added; + doc.iter(change.start, end, (line) => { replaced.push(newHL(line.text, line.markedSpans)); }); + anti.events.push({ start: change.start, added: change.old.length, old: replaced }); + const selPos = i ? null : { from: set.fromBefore, to: set.toBefore }; + updateDocNoUndo(cm, { line: change.start, ch: 0 }, { line: end - 1, ch: getLine(doc, end - 1).text.length }, change.old, selPos, type); + } + (type == 'undo' ? hist.undone : hist.done).push(anti); + } + + function updateDocNoUndo(cm, from, to, lines, selUpdate, origin) { + const { view } = cm; + const { doc } = view; + const { display } = cm; + if (view.suppressEdits) return; + + const nlines = to.line - from.line; const firstLine = getLine(doc, from.line); const + lastLine = getLine(doc, to.line); + let recomputeMaxLength = false; let + checkWidthStart = from.line; + if (!cm.options.lineWrapping) { + checkWidthStart = lineNo(visualLine(doc, firstLine)); + doc.iter(checkWidthStart, to.line + 1, (line) => { + if (lineLength(doc, line) == view.maxLineLength) { + recomputeMaxLength = true; + return true; + } + }); + } + + const lastHL = lst(lines); const + th = textHeight(display); + + // First adjust the line structure + if (from.ch == 0 && to.ch == 0 && hlText(lastHL) == '') { + // This is a whole-line replace. Treated specially to make + // sure line objects move the way they are supposed to. + var added = []; + for (var i = 0, e = lines.length - 1; i < e; ++i) added.push(makeLine(hlText(lines[i]), hlSpans(lines[i]), th)); + updateLine(cm, lastLine, lastLine.text, hlSpans(lastHL)); + if (nlines) doc.remove(from.line, nlines, cm); + if (added.length) doc.insert(from.line, added); + } else if (firstLine == lastLine) { + if (lines.length == 1) { + updateLine(cm, firstLine, firstLine.text.slice(0, from.ch) + hlText(lines[0]) + + firstLine.text.slice(to.ch), hlSpans(lines[0])); + } else { + for (var added = [], i = 1, e = lines.length - 1; i < e; ++i) added.push(makeLine(hlText(lines[i]), hlSpans(lines[i]), th)); + added.push(makeLine(hlText(lastHL) + firstLine.text.slice(to.ch), hlSpans(lastHL), th)); + updateLine(cm, firstLine, firstLine.text.slice(0, from.ch) + hlText(lines[0]), hlSpans(lines[0])); + doc.insert(from.line + 1, added); + } + } else if (lines.length == 1) { + updateLine(cm, firstLine, firstLine.text.slice(0, from.ch) + hlText(lines[0]) + + lastLine.text.slice(to.ch), hlSpans(lines[0])); + doc.remove(from.line + 1, nlines, cm); + } else { + var added = []; + updateLine(cm, firstLine, firstLine.text.slice(0, from.ch) + hlText(lines[0]), hlSpans(lines[0])); + updateLine(cm, lastLine, hlText(lastHL) + lastLine.text.slice(to.ch), hlSpans(lastHL)); + for (var i = 1, e = lines.length - 1; i < e; ++i) added.push(makeLine(hlText(lines[i]), hlSpans(lines[i]), th)); + if (nlines > 1) doc.remove(from.line + 1, nlines - 1, cm); + doc.insert(from.line + 1, added); + } + + if (cm.options.lineWrapping) { + const perLine = Math.max(5, display.scroller.clientWidth / charWidth(display) - 3); + doc.iter(from.line, from.line + lines.length, (line) => { + if (line.height == 0) return; + const guess = (Math.ceil(line.text.length / perLine) || 1) * th; + if (guess != line.height) updateLineHeight(line, guess); + }); + } else { + doc.iter(checkWidthStart, from.line + lines.length, (line) => { + const len = lineLength(doc, line); + if (len > view.maxLineLength) { + view.maxLine = line; + view.maxLineLength = len; + view.maxLineChanged = true; + recomputeMaxLength = false; + } + }); + if (recomputeMaxLength) cm.curOp.updateMaxLine = true; + } + + // Adjust frontier, schedule worker + view.frontier = Math.min(view.frontier, from.line); + startWorker(cm, 400); + + const lendiff = lines.length - nlines - 1; + // Remember that these lines changed, for updating the display + regChange(cm, from.line, to.line + 1, lendiff); + if (hasHandler(cm, 'change')) { + // Normalize lines to contain only strings, since that's what + // the change event handler expects + for (var i = 0; i < lines.length; ++i) if (typeof lines[i] !== 'string') lines[i] = lines[i].text; + const changeObj = { from: from, to: to, text: lines, origin: origin }; + if (cm.curOp.textChanged) { + for (var cur = cm.curOp.textChanged; cur.next; cur = cur.next) {} + cur.next = changeObj; + } else cm.curOp.textChanged = changeObj; + } + + // Update the selection + let newSelFrom; let newSelTo; const + end = { + line: from.line + lines.length - 1, + ch: hlText(lastHL).length + (lines.length == 1 ? from.ch : 0), + }; + if (selUpdate && typeof selUpdate !== 'string') { + if (selUpdate.from) { newSelFrom = selUpdate.from; newSelTo = selUpdate.to; } else newSelFrom = newSelTo = selUpdate; + } else if (selUpdate == 'end') { + newSelFrom = newSelTo = end; + } else if (selUpdate == 'start') { + newSelFrom = newSelTo = from; + } else if (selUpdate == 'around') { + newSelFrom = from; newSelTo = end; + } else { + const adjustPos = function (pos) { + if (posLess(pos, from)) return pos; + if (!posLess(to, pos)) return end; + const line = pos.line + lendiff; + let { ch } = pos; + if (pos.line == to.line) ch += hlText(lastHL).length - (to.ch - (to.line == from.line ? from.ch : 0)); + return { line: line, ch: ch }; + }; + newSelFrom = adjustPos(view.sel.from); + newSelTo = adjustPos(view.sel.to); + } + setSelection(cm, newSelFrom, newSelTo, null, true); + return end; + } + + function replaceRange(cm, code, from, to, origin) { + if (!to) to = from; + if (posLess(to, from)) { const tmp = to; to = from; from = tmp; } + return updateDoc(cm, from, to, splitLines(code), null, origin); + } + + // SELECTION + + function posEq(a, b) { return a.line == b.line && a.ch == b.ch; } + function posLess(a, b) { return a.line < b.line || (a.line == b.line && a.ch < b.ch); } + function copyPos(x) { return { line: x.line, ch: x.ch }; } + + function clipLine(doc, n) { return Math.max(0, Math.min(n, doc.size - 1)); } + function clipPos(doc, pos) { + if (pos.line < 0) return { line: 0, ch: 0 }; + if (pos.line >= doc.size) return { line: doc.size - 1, ch: getLine(doc, doc.size - 1).text.length }; + const { ch } = pos; + const linelen = getLine(doc, pos.line).text.length; + if (ch == null || ch > linelen) return { line: pos.line, ch: linelen }; + else if (ch < 0) return { line: pos.line, ch: 0 }; + return pos; + } + function isLine(doc, l) { return l >= 0 && l < doc.size; } + + // If shift is held, this will move the selection anchor. Otherwise, + // it'll set the whole selection. + function extendSelection(cm, pos, other, bias) { + const { sel } = cm.view; + if (sel.shift || sel.extend) { + let { anchor } = sel; + if (other) { + const posBefore = posLess(pos, anchor); + if (posBefore != posLess(other, anchor)) { + anchor = pos; + pos = other; + } else if (posBefore != posLess(pos, other)) { + pos = other; + } + } + setSelection(cm, anchor, pos, bias); + } else { + setSelection(cm, pos, other || pos, bias); + } + cm.curOp.userSelChange = true; + } + + // Update the selection. Last two args are only used by + // updateDoc, since they have to be expressed in the line + // numbers before the update. + function setSelection(cm, anchor, head, bias, checkAtomic) { + cm.view.goalColumn = null; + const { sel } = cm.view; + // Skip over atomic spans. + if (checkAtomic || !posEq(anchor, sel.anchor)) anchor = skipAtomic(cm, anchor, bias, checkAtomic != 'push'); + if (checkAtomic || !posEq(head, sel.head)) head = skipAtomic(cm, head, bias, checkAtomic != 'push'); + + if (posEq(sel.anchor, anchor) && posEq(sel.head, head)) return; + + sel.anchor = anchor; sel.head = head; + const inv = posLess(head, anchor); + sel.from = inv ? head : anchor; + sel.to = inv ? anchor : head; + + cm.curOp.updateInput = true; + cm.curOp.selectionChanged = true; + } + + function reCheckSelection(cm) { + setSelection(cm, cm.view.sel.from, cm.view.sel.to, null, 'push'); + } + + function skipAtomic(cm, pos, bias, mayClear) { + const { doc } = cm.view; + let flipped = false; + let curPos = pos; + let dir = bias || 1; + cm.view.cantEdit = false; + search: for (;;) { + const line = getLine(doc, curPos.line); var + toClear; + if (line.markedSpans) { + for (var i = 0; i < line.markedSpans.length; ++i) { + const sp = line.markedSpans[i]; const + m = sp.marker; + if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) && + (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) { + if (mayClear && m.clearOnEnter) { + (toClear || (toClear = [])).push(m); + continue; + } else if (!m.atomic) continue; + let newPos = m.find()[dir < 0 ? 'from' : 'to']; + if (posEq(newPos, curPos)) { + newPos.ch += dir; + if (newPos.ch < 0) { + if (newPos.line) newPos = clipPos(doc, { line: newPos.line - 1 }); + else newPos = null; + } else if (newPos.ch > line.text.length) { + if (newPos.line < doc.size - 1) newPos = { line: newPos.line + 1, ch: 0 }; + else newPos = null; + } + if (!newPos) { + if (flipped) { + // Driven in a corner -- no valid cursor position found at all + // -- try again *with* clearing, if we didn't already + if (!mayClear) return skipAtomic(cm, pos, bias, true); + // Otherwise, turn off editing until further notice, and return the start of the doc + cm.view.cantEdit = true; + return { line: 0, ch: 0 }; + } + flipped = true; newPos = pos; dir = -dir; + } + } + curPos = newPos; + continue search; + } + } + if (toClear) for (var i = 0; i < toClear.length; ++i) toClear[i].clear(); + } + return curPos; + } + } + + // SCROLLING + + function scrollCursorIntoView(cm) { + const { view } = cm; + const coords = scrollPosIntoView(cm, view.sel.head); + if (!view.focused) return; + const { display } = cm; + const box = display.sizer.getBoundingClientRect(); + let doScroll = null; + if (coords.top + box.top < 0) doScroll = true; + else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false; + if (doScroll != null && !phantom) { + const hidden = display.cursor.style.display == 'none'; + if (hidden) { + display.cursor.style.display = ''; + display.cursor.style.left = `${coords.left}px`; + display.cursor.style.top = `${coords.top - display.viewOffset}px`; + } + display.cursor.scrollIntoView(doScroll); + if (hidden) display.cursor.style.display = 'none'; + } + } + + function scrollPosIntoView(cm, pos) { + for (;;) { + let changed = false; const + coords = cursorCoords(cm, pos); + const scrollPos = calculateScrollPos(cm, coords.left, coords.top, coords.left, coords.bottom); + const startTop = cm.view.scrollTop; const + startLeft = cm.view.scrollLeft; + if (scrollPos.scrollTop != null) { + setScrollTop(cm, scrollPos.scrollTop); + if (Math.abs(cm.view.scrollTop - startTop) > 1) changed = true; + } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft); + if (Math.abs(cm.view.scrollLeft - startLeft) > 1) changed = true; + } + if (!changed) return coords; + } + } + + function scrollIntoView(cm, x1, y1, x2, y2) { + const scrollPos = calculateScrollPos(cm, x1, y1, x2, y2); + if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop); + if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft); + } + + function calculateScrollPos(cm, x1, y1, x2, y2) { + const { display } = cm; + const pt = paddingTop(display); + y1 += pt; y2 += pt; + const screen = display.scroller.clientHeight - scrollerCutOff; const screentop = display.scroller.scrollTop; const + result = {}; + const docBottom = cm.view.doc.height + 2 * pt; + const atTop = y1 < pt + 10; const + atBottom = y2 + pt > docBottom - 10; + if (y1 < screentop) result.scrollTop = atTop ? 0 : Math.max(0, y1); + else if (y2 > screentop + screen) result.scrollTop = (atBottom ? docBottom : y2) - screen; + + const screenw = display.scroller.clientWidth - scrollerCutOff; const + screenleft = display.scroller.scrollLeft; + x1 += display.gutters.offsetWidth; x2 += display.gutters.offsetWidth; + const gutterw = display.gutters.offsetWidth; + const atLeft = x1 < gutterw + 10; + if (x1 < screenleft + gutterw || atLeft) { + if (atLeft) x1 = 0; + result.scrollLeft = Math.max(0, x1 - 10 - gutterw); + } else if (x2 > screenw + screenleft - 3) { + result.scrollLeft = x2 + 10 - screenw; + } + return result; + } + + // API UTILITIES + + function indentLine(cm, n, how, aggressive) { + const { doc } = cm.view; + if (!how) how = 'add'; + if (how == 'smart') { + if (!cm.view.mode.indent) how = 'prev'; + else var state = getStateBefore(cm, n); + } + + const { tabSize } = cm.options; + const line = getLine(doc, n); const + curSpace = countColumn(line.text, null, tabSize); + const curSpaceString = line.text.match(/^\s*/)[0]; let + indentation; + if (how == 'smart') { + indentation = cm.view.mode.indent(state, line.text.slice(curSpaceString.length), line.text); + if (indentation == Pass) { + if (!aggressive) return; + how = 'prev'; + } + } + if (how == 'prev') { + if (n) indentation = countColumn(getLine(doc, n - 1).text, null, tabSize); + else indentation = 0; + } else if (how == 'add') indentation = curSpace + cm.options.indentUnit; + else if (how == 'subtract') indentation = curSpace - cm.options.indentUnit; + indentation = Math.max(0, indentation); + + let indentString = ''; + let pos = 0; + if (cm.options.indentWithTabs) for (let i = Math.floor(indentation / tabSize); i; --i) { pos += tabSize; indentString += '\t'; } + if (pos < indentation) indentString += spaceStr(indentation - pos); + + if (indentString != curSpaceString) replaceRange(cm, indentString, { line: n, ch: 0 }, { line: n, ch: curSpaceString.length }, 'input'); + line.stateAfter = null; + } + + function changeLine(cm, handle, op) { + let no = handle; let line = handle; const + { doc } = cm.view; + if (typeof handle === 'number') line = getLine(doc, clipLine(doc, handle)); + else no = lineNo(handle); + if (no == null) return null; + if (op(line, no)) regChange(cm, no, no + 1); + else return null; + return line; + } + + function findPosH(cm, dir, unit, visually) { + const { doc } = cm.view; + const end = cm.view.sel.head; + let { line } = end; + let { ch } = end; + let lineObj = getLine(doc, line); + function findNextLine() { + const l = line + dir; + if (l < 0 || l == doc.size) return false; + line = l; + return lineObj = getLine(doc, l); + } + function moveOnce(boundToLine) { + const next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true); + if (next == null) { + if (!boundToLine && findNextLine()) { + if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj); + else ch = dir < 0 ? lineObj.text.length : 0; + } else return false; + } else ch = next; + return true; + } + if (unit == 'char') moveOnce(); + else if (unit == 'column') moveOnce(true); + else if (unit == 'word') { + let sawWord = false; + for (;;) { + if (dir < 0) if (!moveOnce()) break; + if (isWordChar(lineObj.text.charAt(ch))) sawWord = true; + else if (sawWord) { if (dir < 0) { dir = 1; moveOnce(); } break; } + if (dir > 0) if (!moveOnce()) break; + } + } + return skipAtomic(cm, { line: line, ch: ch }, dir, true); + } + + function findWordAt(line, pos) { + let start = pos.ch; let + end = pos.ch; + if (line) { + if (pos.after === false || end == line.length) --start; else ++end; + const startChar = line.charAt(start); + const check = isWordChar(startChar) ? isWordChar : + /\s/.test(startChar) ? function (ch) { return /\s/.test(ch); } : + function (ch) { return !/\s/.test(ch) && !isWordChar(ch); }; + while (start > 0 && check(line.charAt(start - 1))) --start; + while (end < line.length && check(line.charAt(end))) ++end; + } + return { from: { line: pos.line, ch: start }, to: { line: pos.line, ch: end } }; + } + + function selectLine(cm, line) { + extendSelection(cm, { line: line, ch: 0 }, clipPos(cm.view.doc, { line: line + 1, ch: 0 })); + } + + // PROTOTYPE + + // The publicly visible API. Note that operation(null, f) means + // 'wrap f in an operation, performed on its `this` parameter' + + CodeMirror.prototype = { + getValue: function (lineSep) { + const text = []; const + { doc } = this.view; + doc.iter(0, doc.size, (line) => { text.push(line.text); }); + return text.join(lineSep || '\n'); + }, + + setValue: operation(null, function (code) { + const { doc } = this.view; + const top = { line: 0, ch: 0 }; + const lastLen = getLine(doc, doc.size - 1).text.length; + updateDocInner(this, top, { line: doc.size - 1, ch: lastLen }, splitLines(code), top, top, 'setValue'); + }), + + getSelection: function (lineSep) { return this.getRange(this.view.sel.from, this.view.sel.to, lineSep); }, + + replaceSelection: operation(null, function (code, collapse, origin) { + const { sel } = this.view; + updateDoc(this, sel.from, sel.to, splitLines(code), collapse || 'around', origin); + }), + + focus: function () { window.focus(); focusInput(this); onFocus(this); fastPoll(this); }, + + setOption: function (option, value) { + const { options } = this; + const old = options[option]; + if (options[option] == value && option != 'mode') return; + options[option] = value; + if (optionHandlers.hasOwnProperty(option)) operation(this, optionHandlers[option])(this, value, old); + }, + + getOption: function (option) { return this.options[option]; }, + + getMode: function () { return this.view.mode; }, + + addKeyMap: function (map) { + this.view.keyMaps.push(map); + }, + + removeKeyMap: function (map) { + const maps = this.view.keyMaps; + for (let i = 0; i < maps.length; ++i) { + if ((typeof map === 'string' ? maps[i].name : maps[i]) == map) { + maps.splice(i, 1); + return true; + } + } + }, + + undo: operation(null, function () { unredoHelper(this, 'undo'); }), + redo: operation(null, function () { unredoHelper(this, 'redo'); }), + + indentLine: operation(null, function (n, dir, aggressive) { + if (typeof dir !== 'string') { + if (dir == null) dir = this.options.smartIndent ? 'smart' : 'prev'; + else dir = dir ? 'add' : 'subtract'; + } + if (isLine(this.view.doc, n)) indentLine(this, n, dir, aggressive); + }), + + indentSelection: operation(null, function (how) { + const { sel } = this.view; + if (posEq(sel.from, sel.to)) return indentLine(this, sel.from.line, how); + const e = sel.to.line - (sel.to.ch ? 0 : 1); + for (let i = sel.from.line; i <= e; ++i) indentLine(this, i, how); + }), + + historySize: function () { + const hist = this.view.history; + return { undo: hist.done.length, redo: hist.undone.length }; + }, + + clearHistory: function () { this.view.history = makeHistory(); }, + + markClean: function () { + this.view.history.dirtyCounter = 0; + this.view.history.lastOp = this.view.history.lastOrigin = null; + }, + + isClean: function () { return this.view.history.dirtyCounter == 0; }, + + getHistory: function () { + const hist = this.view.history; + function cp(arr) { + for (var i = 0, nw = [], nwelt; i < arr.length; ++i) { + const set = arr[i]; + nw.push({ + events: nwelt = [], + fromBefore: set.fromBefore, + toBefore: set.toBefore, + fromAfter: set.fromAfter, + toAfter: set.toAfter, + }); + for (let j = 0, elt = set.events; j < elt.length; ++j) { + const old = []; const + cur = elt[j]; + nwelt.push({ start: cur.start, added: cur.added, old: old }); + for (let k = 0; k < cur.old.length; ++k) old.push(hlText(cur.old[k])); + } + } + return nw; + } + return { done: cp(hist.done), undone: cp(hist.undone) }; + }, + + setHistory: function (histData) { + const hist = this.view.history = makeHistory(); + hist.done = histData.done; + hist.undone = histData.undone; + }, + + // Fetch the parser token for a given character. Useful for hacks + // that want to inspect the mode state (say, for completion). + getTokenAt: function (pos) { + const { doc } = this.view; + pos = clipPos(doc, pos); + const state = getStateBefore(this, pos.line); const + { mode } = this.view; + const line = getLine(doc, pos.line); + const stream = new StringStream(line.text, this.options.tabSize); + while (stream.pos < pos.ch && !stream.eol()) { + stream.start = stream.pos; + var style = mode.token(stream, state); + } + return { + start: stream.start, + end: stream.pos, + string: stream.current(), + className: style || null, // Deprecated, use 'type' instead + type: style || null, + state: state, + }; + }, + + getStateAfter: function (line) { + const { doc } = this.view; + line = clipLine(doc, line == null ? doc.size - 1 : line); + return getStateBefore(this, line + 1); + }, + + cursorCoords: function (start, mode) { + let pos; const + { sel } = this.view; + if (start == null) pos = sel.head; + else if (typeof start === 'object') pos = clipPos(this.view.doc, start); + else pos = start ? sel.from : sel.to; + return cursorCoords(this, pos, mode || 'page'); + }, + + charCoords: function (pos, mode) { + return charCoords(this, clipPos(this.view.doc, pos), mode || 'page'); + }, + + coordsChar: function (coords) { + const off = this.display.lineSpace.getBoundingClientRect(); + return coordsChar(this, coords.left - off.left, coords.top - off.top); + }, + + defaultTextHeight: function () { return textHeight(this.display); }, + + markText: operation(null, function (from, to, options) { + return markText(this, clipPos(this.view.doc, from), clipPos(this.view.doc, to), options, 'range'); + }), + + setBookmark: operation(null, function (pos, widget) { + pos = clipPos(this.view.doc, pos); + return markText(this, pos, pos, widget ? { replacedWith: widget } : {}, 'bookmark'); + }), + + findMarksAt: function (pos) { + const { doc } = this.view; + pos = clipPos(doc, pos); + const markers = []; const + spans = getLine(doc, pos.line).markedSpans; + if (spans) { + for (let i = 0; i < spans.length; ++i) { + const span = spans[i]; + if ((span.from == null || span.from <= pos.ch) && + (span.to == null || span.to >= pos.ch)) markers.push(span.marker); + } + } + return markers; + }, + + setGutterMarker: operation(null, function (line, gutterID, value) { + return changeLine(this, line, (line) => { + const markers = line.gutterMarkers || (line.gutterMarkers = {}); + markers[gutterID] = value; + if (!value && isEmpty(markers)) line.gutterMarkers = null; + return true; + }); + }), + + clearGutter: operation(null, function (gutterID) { + let i = 0; const cm = this; const + { doc } = cm.view; + doc.iter(0, doc.size, (line) => { + if (line.gutterMarkers && line.gutterMarkers[gutterID]) { + line.gutterMarkers[gutterID] = null; + regChange(cm, i, i + 1); + if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null; + } + ++i; + }); + }), + + addLineClass: operation(null, function (handle, where, cls) { + return changeLine(this, handle, (line) => { + const prop = where == 'text' ? 'textClass' : where == 'background' ? 'bgClass' : 'wrapClass'; + if (!line[prop]) line[prop] = cls; + else if (new RegExp(`\\b${cls}\\b`).test(line[prop])) return false; + else line[prop] += ` ${cls}`; + return true; + }); + }), + + removeLineClass: operation(null, function (handle, where, cls) { + return changeLine(this, handle, (line) => { + const prop = where == 'text' ? 'textClass' : where == 'background' ? 'bgClass' : 'wrapClass'; + const cur = line[prop]; + if (!cur) return false; + else if (cls == null) line[prop] = null; + else { + const upd = cur.replace(new RegExp(`^${cls}\\b\\s*|\\s*\\b${cls}\\b`), ''); + if (upd == cur) return false; + line[prop] = upd || null; + } + return true; + }); + }), + + addLineWidget: operation(null, function (handle, node, options) { + const widget = options || {}; + widget.node = node; + if (widget.noHScroll) this.display.alignWidgets = true; + changeLine(this, handle, (line) => { + (line.widgets || (line.widgets = [])).push(widget); + widget.line = line; + return true; + }); + return widget; + }), + + removeLineWidget: operation(null, function (widget) { + const ws = widget.line.widgets; const + no = lineNo(widget.line); + if (no == null) return; + for (let i = 0; i < ws.length; ++i) if (ws[i] == widget) ws.splice(i--, 1); + regChange(this, no, no + 1); + }), + + lineInfo: function (line) { + if (typeof line === 'number') { + if (!isLine(this.view.doc, line)) return null; + var n = line; + line = getLine(this.view.doc, line); + if (!line) return null; + } else { + var n = lineNo(line); + if (n == null) return null; + } + return { + line: n, + handle: line, + text: line.text, + gutterMarkers: line.gutterMarkers, + textClass: line.textClass, + bgClass: line.bgClass, + wrapClass: line.wrapClass, + widgets: line.widgets, + }; + }, + + getViewport: function () { return { from: this.display.showingFrom, to: this.display.showingTo }; }, + + addWidget: function (pos, node, scroll, vert, horiz) { + const { display } = this; + pos = cursorCoords(this, clipPos(this.view.doc, pos)); + let { top } = pos; + let { left } = pos; + node.style.position = 'absolute'; + display.sizer.appendChild(node); + if (vert == 'over') top = pos.top; + else if (vert == 'near') { + const vspace = Math.max(display.wrapper.clientHeight, this.view.doc.height); + const hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); + if (pos.bottom + node.offsetHeight > vspace && pos.top > node.offsetHeight) top = pos.top - node.offsetHeight; + if (left + node.offsetWidth > hspace) left = hspace - node.offsetWidth; + } + node.style.top = `${top + paddingTop(display)}px`; + node.style.left = node.style.right = ''; + if (horiz == 'right') { + left = display.sizer.clientWidth - node.offsetWidth; + node.style.right = '0px'; + } else { + if (horiz == 'left') left = 0; + else if (horiz == 'middle') left = (display.sizer.clientWidth - node.offsetWidth) / 2; + node.style.left = `${left}px`; + } + if (scroll) scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight); + }, + + lineCount: function () { return this.view.doc.size; }, + + clipPos: function (pos) { return clipPos(this.view.doc, pos); }, + + getCursor: function (start) { + const { sel } = this.view; + let pos; + if (start == null || start == 'head') pos = sel.head; + else if (start == 'anchor') pos = sel.anchor; + else if (start == 'end' || start === false) pos = sel.to; + else pos = sel.from; + return copyPos(pos); + }, + + somethingSelected: function () { return !posEq(this.view.sel.from, this.view.sel.to); }, + + setCursor: operation(null, function (line, ch, extend) { + const pos = clipPos(this.view.doc, typeof line === 'number' ? { line: line, ch: ch || 0 } : line); + if (extend) extendSelection(this, pos); + else setSelection(this, pos, pos); + }), + + setSelection: operation(null, function (anchor, head) { + const { doc } = this.view; + setSelection(this, clipPos(doc, anchor), clipPos(doc, head || anchor)); + }), + + extendSelection: operation(null, function (from, to) { + const { doc } = this.view; + extendSelection(this, clipPos(doc, from), to && clipPos(doc, to)); + }), + + setExtending: function (val) { this.view.sel.extend = val; }, + + getLine: function (line) { const l = this.getLineHandle(line); return l && l.text; }, + + getLineHandle: function (line) { + const { doc } = this.view; + if (isLine(doc, line)) return getLine(doc, line); + }, + + getLineNumber: function (line) { return lineNo(line); }, + + setLine: operation(null, function (line, text) { + if (isLine(this.view.doc, line)) replaceRange(this, text, { line: line, ch: 0 }, { line: line, ch: getLine(this.view.doc, line).text.length }); + }), + + removeLine: operation(null, function (line) { + if (isLine(this.view.doc, line)) replaceRange(this, '', { line: line, ch: 0 }, clipPos(this.view.doc, { line: line + 1, ch: 0 })); + }), + + replaceRange: operation(null, function (code, from, to) { + const { doc } = this.view; + from = clipPos(doc, from); + to = to ? clipPos(doc, to) : from; + return replaceRange(this, code, from, to); + }), + + getRange: function (from, to, lineSep) { + const { doc } = this.view; + from = clipPos(doc, from); to = clipPos(doc, to); + const l1 = from.line; const + l2 = to.line; + if (l1 == l2) return getLine(doc, l1).text.slice(from.ch, to.ch); + const code = [getLine(doc, l1).text.slice(from.ch)]; + doc.iter(l1 + 1, l2, (line) => { code.push(line.text); }); + code.push(getLine(doc, l2).text.slice(0, to.ch)); + return code.join(lineSep || '\n'); + }, + + triggerOnKeyDown: operation(null, onKeyDown), + + execCommand: function (cmd) { return commands[cmd](this); }, + + // Stuff used by commands, probably not much use to outside code. + moveH: operation(null, function (dir, unit) { + const { sel } = this.view; + let pos = dir < 0 ? sel.from : sel.to; + if (sel.shift || sel.extend || posEq(sel.from, sel.to)) pos = findPosH(this, dir, unit, true); + extendSelection(this, pos, pos, dir); + }), + + deleteH: operation(null, function (dir, unit) { + const { sel } = this.view; + if (!posEq(sel.from, sel.to)) replaceRange(this, '', sel.from, sel.to, 'delete'); + else replaceRange(this, '', sel.from, findPosH(this, dir, unit, false), 'delete'); + this.curOp.userSelChange = true; + }), + + moveV: operation(null, function (dir, unit) { + const { view } = this; + const { doc } = view; + const { display } = this; + const cur = view.sel.head; const + pos = cursorCoords(this, cur, 'div'); + let x = pos.left; let + y; + if (view.goalColumn != null) x = view.goalColumn; + if (unit == 'page') { + const pageSize = Math.min(display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); + y = pos.top + dir * pageSize; + } else if (unit == 'line') { + y = dir > 0 ? pos.bottom + 3 : pos.top - 3; + } + do { + var target = coordsChar(this, x, y); + y += dir * 5; + } while (target.outside && (dir < 0 ? y > 0 : y < doc.height)); + + if (unit == 'page') display.scrollbarV.scrollTop += charCoords(this, target, 'div').top - pos.top; + extendSelection(this, target, target, dir); + view.goalColumn = x; + }), + + toggleOverwrite: function () { + if (this.view.overwrite = !this.view.overwrite) this.display.cursor.className += ' CodeMirror-overwrite'; + else this.display.cursor.className = this.display.cursor.className.replace(' CodeMirror-overwrite', ''); + }, + + posFromIndex: function (off) { + let lineNo = 0; let ch; const + { doc } = this.view; + doc.iter(0, doc.size, (line) => { + const sz = line.text.length + 1; + if (sz > off) { ch = off; return true; } + off -= sz; + ++lineNo; + }); + return clipPos(doc, { line: lineNo, ch: ch }); + }, + indexFromPos: function (coords) { + if (coords.line < 0 || coords.ch < 0) return 0; + let index = coords.ch; + this.view.doc.iter(0, coords.line, (line) => { + index += line.text.length + 1; + }); + return index; + }, + + scrollTo: function (x, y) { + if (x != null) this.display.scrollbarH.scrollLeft = this.display.scroller.scrollLeft = x; + if (y != null) this.display.scrollbarV.scrollTop = this.display.scroller.scrollTop = y; + updateDisplay(this, []); + }, + getScrollInfo: function () { + const { scroller } = this.display; + const co = scrollerCutOff; + return { + left: scroller.scrollLeft, + top: scroller.scrollTop, + height: scroller.scrollHeight - co, + width: scroller.scrollWidth - co, + clientHeight: scroller.clientHeight - co, + clientWidth: scroller.clientWidth - co, + }; + }, + + scrollIntoView: function (pos) { + if (typeof pos === 'number') pos = { line: pos, ch: 0 }; + pos = pos ? clipPos(this.view.doc, pos) : this.view.sel.head; + scrollPosIntoView(this, pos); + }, + + setSize: function (width, height) { + function interpret(val) { + return typeof val === 'number' || /^\d+$/.test(String(val)) ? `${val}px` : val; + } + if (width != null) this.display.wrapper.style.width = interpret(width); + if (height != null) this.display.wrapper.style.height = interpret(height); + this.refresh(); + }, + + on: function (type, f) { on(this, type, f); }, + off: function (type, f) { off(this, type, f); }, + + operation: function (f) { return operation(this, f)(); }, + + refresh: function () { + clearCaches(this); + if (this.display.scroller.scrollHeight > this.view.scrollTop) this.display.scrollbarV.scrollTop = this.display.scroller.scrollTop = this.view.scrollTop; + updateDisplay(this, true); + }, + + getInputField: function () { return this.display.input; }, + getWrapperElement: function () { return this.display.wrapper; }, + getScrollerElement: function () { return this.display.scroller; }, + getGutterElement: function () { return this.display.gutters; }, + }; + + // OPTION DEFAULTS + + var optionHandlers = CodeMirror.optionHandlers = {}; + + // The default configuration options. + var defaults = CodeMirror.defaults = {}; + + function option(name, deflt, handle, notOnInit) { + CodeMirror.defaults[name] = deflt; + if (handle) { + optionHandlers[name] = + notOnInit ? function (cm, val, old) { if (old != Init) handle(cm, val, old); } : handle; + } + } + + var Init = CodeMirror.Init = { toString: function () { return 'CodeMirror.Init'; } }; + + // These two are, on init, called from the constructor because they + // have to be initialized before the editor can start at all. + option('value', '', (cm, val) => { cm.setValue(val); }, true); + option('mode', null, loadMode, true); + + option('indentUnit', 2, loadMode, true); + option('indentWithTabs', false); + option('smartIndent', true); + option('tabSize', 4, (cm) => { + loadMode(cm); + clearCaches(cm); + updateDisplay(cm, true); + }, true); + option('electricChars', true); + + option('theme', 'default', (cm) => { + themeChanged(cm); + guttersChanged(cm); + }, true); + option('keyMap', 'default', keyMapChanged); + option('extraKeys', null); + + option('onKeyEvent', null); + option('onDragEvent', null); + + option('lineWrapping', false, wrappingChanged, true); + option('gutters', [], (cm) => { + setGuttersForLineNumbers(cm.options); + guttersChanged(cm); + }, true); + option('lineNumbers', false, (cm) => { + setGuttersForLineNumbers(cm.options); + guttersChanged(cm); + }, true); + option('firstLineNumber', 1, guttersChanged, true); + option('lineNumberFormatter', integer => integer, guttersChanged, true); + option('showCursorWhenSelecting', false, updateSelection, true); + + option('readOnly', false, (cm, val) => { + if (val == 'nocursor') { onBlur(cm); cm.display.input.blur(); } else if (!val) resetInput(cm, true); + }); + option('dragDrop', true); + + option('cursorBlinkRate', 530); + option('cursorHeight', 1); + option('workTime', 100); + option('workDelay', 100); + option('flattenSpans', true); + option('pollInterval', 100); + option('undoDepth', 40); + option('viewportMargin', 10, (cm) => { cm.refresh(); }, true); + + option('tabindex', null, (cm, val) => { + cm.display.input.tabIndex = val || ''; + }); + option('autofocus', null); + + // MODE DEFINITION AND QUERYING + + // Known modes, by name and by MIME + const modes = CodeMirror.modes = {}; const + mimeModes = CodeMirror.mimeModes = {}; + + CodeMirror.defineMode = function (name, mode) { + if (!CodeMirror.defaults.mode && name != 'null') CodeMirror.defaults.mode = name; + if (arguments.length > 2) { + mode.dependencies = []; + for (let i = 2; i < arguments.length; ++i) mode.dependencies.push(arguments[i]); + } + modes[name] = mode; + }; + + CodeMirror.defineMIME = function (mime, spec) { + mimeModes[mime] = spec; + }; + + CodeMirror.resolveMode = function (spec) { + if (typeof spec === 'string' && mimeModes.hasOwnProperty(spec)) spec = mimeModes[spec]; + else if (typeof spec === 'string' && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) return CodeMirror.resolveMode('application/xml'); + if (typeof spec === 'string') return { name: spec }; + return spec || { name: 'null' }; + }; + + CodeMirror.getMode = function (options, spec) { + var spec = CodeMirror.resolveMode(spec); + const mfactory = modes[spec.name]; + if (!mfactory) return CodeMirror.getMode(options, 'text/plain'); + const modeObj = mfactory(options, spec); + if (modeExtensions.hasOwnProperty(spec.name)) { + const exts = modeExtensions[spec.name]; + for (const prop in exts) { + if (!exts.hasOwnProperty(prop)) continue; + if (modeObj.hasOwnProperty(prop)) modeObj[`_${prop}`] = modeObj[prop]; + modeObj[prop] = exts[prop]; + } + } + modeObj.name = spec.name; + return modeObj; + }; + + CodeMirror.defineMode('null', () => ({ token: function (stream) { stream.skipToEnd(); } })); + CodeMirror.defineMIME('text/plain', 'null'); + + var modeExtensions = CodeMirror.modeExtensions = {}; + CodeMirror.extendMode = function (mode, properties) { + const exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}); + for (const prop in properties) { if (properties.hasOwnProperty(prop)) exts[prop] = properties[prop]; } + }; + + // EXTENSIONS + + CodeMirror.defineExtension = function (name, func) { + CodeMirror.prototype[name] = func; + }; + + CodeMirror.defineOption = option; + + var initHooks = []; + CodeMirror.defineInitHook = function (f) { initHooks.push(f); }; + + // MODE STATE HANDLING + + // Utility functions for working with state. Exported because modes + // sometimes need to do this. + function copyState(mode, state) { + if (state === true) return state; + if (mode.copyState) return mode.copyState(state); + const nstate = {}; + for (const n in state) { + let val = state[n]; + if (val instanceof Array) val = val.concat([]); + nstate[n] = val; + } + return nstate; + } + CodeMirror.copyState = copyState; + + function startState(mode, a1, a2) { + return mode.startState ? mode.startState(a1, a2) : true; + } + CodeMirror.startState = startState; + + CodeMirror.innerMode = function (mode, state) { + while (mode.innerMode) { + var info = mode.innerMode(state); + state = info.state; + mode = info.mode; + } + return info || { mode: mode, state: state }; + }; + + // STANDARD COMMANDS + + var commands = CodeMirror.commands = { + selectAll: function (cm) { cm.setSelection({ line: 0, ch: 0 }, { line: cm.lineCount() - 1 }); }, + killLine: function (cm) { + const from = cm.getCursor(true); const to = cm.getCursor(false); const + sel = !posEq(from, to); + if (!sel && cm.getLine(from.line).length == from.ch) cm.replaceRange('', from, { line: from.line + 1, ch: 0 }, 'delete'); + else cm.replaceRange('', from, sel ? to : { line: from.line }, 'delete'); + }, + deleteLine: function (cm) { + const l = cm.getCursor().line; + cm.replaceRange('', { line: l, ch: 0 }, { line: l }, 'delete'); + }, + undo: function (cm) { cm.undo(); }, + redo: function (cm) { cm.redo(); }, + goDocStart: function (cm) { cm.extendSelection({ line: 0, ch: 0 }); }, + goDocEnd: function (cm) { cm.extendSelection({ line: cm.lineCount() - 1 }); }, + goLineStart: function (cm) { + cm.extendSelection(lineStart(cm, cm.getCursor().line)); + }, + goLineStartSmart: function (cm) { + const cur = cm.getCursor(); const + start = lineStart(cm, cur.line); + const line = cm.getLineHandle(start.line); + const order = getOrder(line); + if (!order || order[0].level == 0) { + const firstNonWS = Math.max(0, line.text.search(/\S/)); + const inWS = cur.line == start.line && cur.ch <= firstNonWS && cur.ch; + cm.extendSelection({ line: start.line, ch: inWS ? 0 : firstNonWS }); + } else cm.extendSelection(start); + }, + goLineEnd: function (cm) { + cm.extendSelection(lineEnd(cm, cm.getCursor().line)); + }, + goLineUp: function (cm) { cm.moveV(-1, 'line'); }, + goLineDown: function (cm) { cm.moveV(1, 'line'); }, + goPageUp: function (cm) { cm.moveV(-1, 'page'); }, + goPageDown: function (cm) { cm.moveV(1, 'page'); }, + goCharLeft: function (cm) { cm.moveH(-1, 'char'); }, + goCharRight: function (cm) { cm.moveH(1, 'char'); }, + goColumnLeft: function (cm) { cm.moveH(-1, 'column'); }, + goColumnRight: function (cm) { cm.moveH(1, 'column'); }, + goWordLeft: function (cm) { cm.moveH(-1, 'word'); }, + goWordRight: function (cm) { cm.moveH(1, 'word'); }, + delCharBefore: function (cm) { cm.deleteH(-1, 'char'); }, + delCharAfter: function (cm) { cm.deleteH(1, 'char'); }, + delWordBefore: function (cm) { cm.deleteH(-1, 'word'); }, + delWordAfter: function (cm) { cm.deleteH(1, 'word'); }, + indentAuto: function (cm) { cm.indentSelection('smart'); }, + indentMore: function (cm) { cm.indentSelection('add'); }, + indentLess: function (cm) { cm.indentSelection('subtract'); }, + insertTab: function (cm) { cm.replaceSelection('\t', 'end', 'input'); }, + defaultTab: function (cm) { + if (cm.somethingSelected()) cm.indentSelection('add'); + else cm.replaceSelection('\t', 'end', 'input'); + }, + transposeChars: function (cm) { + const cur = cm.getCursor(); const + line = cm.getLine(cur.line); + if (cur.ch > 0 && cur.ch < line.length - 1) { + cm.replaceRange(line.charAt(cur.ch) + line.charAt(cur.ch - 1), + { line: cur.line, ch: cur.ch - 1 }, + { line: cur.line, ch: cur.ch + 1 }); + } + }, + newlineAndIndent: function (cm) { + operation(cm, () => { + cm.replaceSelection('\n', 'end', 'input'); + cm.indentLine(cm.getCursor().line, null, true); + })(); + }, + toggleOverwrite: function (cm) { cm.toggleOverwrite(); }, + }; + + // STANDARD KEYMAPS + + var keyMap = CodeMirror.keyMap = {}; + keyMap.basic = { + Left: 'goCharLeft', + Right: 'goCharRight', + Up: 'goLineUp', + Down: 'goLineDown', + End: 'goLineEnd', + Home: 'goLineStartSmart', + PageUp: 'goPageUp', + PageDown: 'goPageDown', + Delete: 'delCharAfter', + Backspace: 'delCharBefore', + Tab: 'defaultTab', + 'Shift-Tab': 'indentAuto', + Enter: 'newlineAndIndent', + Insert: 'toggleOverwrite', + }; + // Note that the save and find-related commands aren't defined by + // default. Unknown commands are simply ignored. + keyMap.pcDefault = { + 'Ctrl-A': 'selectAll', + 'Ctrl-D': 'deleteLine', + 'Ctrl-Z': 'undo', + 'Shift-Ctrl-Z': 'redo', + 'Ctrl-Y': 'redo', + 'Ctrl-Home': 'goDocStart', + 'Alt-Up': 'goDocStart', + 'Ctrl-End': 'goDocEnd', + 'Ctrl-Down': 'goDocEnd', + 'Ctrl-Left': 'goWordLeft', + 'Ctrl-Right': 'goWordRight', + 'Alt-Left': 'goLineStart', + 'Alt-Right': 'goLineEnd', + 'Ctrl-Backspace': 'delWordBefore', + 'Ctrl-Delete': 'delWordAfter', + 'Ctrl-S': 'save', + 'Ctrl-F': 'find', + 'Ctrl-G': 'findNext', + 'Shift-Ctrl-G': 'findPrev', + 'Shift-Ctrl-F': 'replace', + 'Shift-Ctrl-R': 'replaceAll', + 'Ctrl-[': 'indentLess', + 'Ctrl-]': 'indentMore', + fallthrough: 'basic', + }; + keyMap.macDefault = { + 'Cmd-A': 'selectAll', + 'Cmd-D': 'deleteLine', + 'Cmd-Z': 'undo', + 'Shift-Cmd-Z': 'redo', + 'Cmd-Y': 'redo', + 'Cmd-Up': 'goDocStart', + 'Cmd-End': 'goDocEnd', + 'Cmd-Down': 'goDocEnd', + 'Alt-Left': 'goWordLeft', + 'Alt-Right': 'goWordRight', + 'Cmd-Left': 'goLineStart', + 'Cmd-Right': 'goLineEnd', + 'Alt-Backspace': 'delWordBefore', + 'Ctrl-Alt-Backspace': 'delWordAfter', + 'Alt-Delete': 'delWordAfter', + 'Cmd-S': 'save', + 'Cmd-F': 'find', + 'Cmd-G': 'findNext', + 'Shift-Cmd-G': 'findPrev', + 'Cmd-Alt-F': 'replace', + 'Shift-Cmd-Alt-F': 'replaceAll', + 'Cmd-[': 'indentLess', + 'Cmd-]': 'indentMore', + fallthrough: ['basic', 'emacsy'], + }; + keyMap.default = mac ? keyMap.macDefault : keyMap.pcDefault; + keyMap.emacsy = { + 'Ctrl-F': 'goCharRight', + 'Ctrl-B': 'goCharLeft', + 'Ctrl-P': 'goLineUp', + 'Ctrl-N': 'goLineDown', + 'Alt-F': 'goWordRight', + 'Alt-B': 'goWordLeft', + 'Ctrl-A': 'goLineStart', + 'Ctrl-E': 'goLineEnd', + 'Ctrl-V': 'goPageDown', + 'Shift-Ctrl-V': 'goPageUp', + 'Ctrl-D': 'delCharAfter', + 'Ctrl-H': 'delCharBefore', + 'Alt-D': 'delWordAfter', + 'Alt-Backspace': 'delWordBefore', + 'Ctrl-K': 'killLine', + 'Ctrl-T': 'transposeChars', + }; + + // KEYMAP DISPATCH + + function getKeyMap(val) { + if (typeof val === 'string') return keyMap[val]; + return val; + } + + function lookupKey(name, maps, handle, stop) { + function lookup(map) { + map = getKeyMap(map); + const found = map[name]; + if (found === false) { + if (stop) stop(); + return true; + } + if (found != null && handle(found)) return true; + if (map.nofallthrough) { + if (stop) stop(); + return true; + } + const { fallthrough } = map; + if (fallthrough == null) return false; + if (Object.prototype.toString.call(fallthrough) != '[object Array]') return lookup(fallthrough); + for (let i = 0, e = fallthrough.length; i < e; ++i) { + if (lookup(fallthrough[i])) return true; + } + return false; + } + + for (let i = 0; i < maps.length; ++i) if (lookup(maps[i])) return true; + } + function isModifierKey(event) { + const name = keyNames[e_prop(event, 'keyCode')]; + return name == 'Ctrl' || name == 'Alt' || name == 'Shift' || name == 'Mod'; + } + CodeMirror.isModifierKey = isModifierKey; + + // FROMTEXTAREA + + CodeMirror.fromTextArea = function (textarea, options) { + if (!options) options = {}; + options.value = textarea.value; + if (!options.tabindex && textarea.tabindex) options.tabindex = textarea.tabindex; + // Set autofocus to true if this textarea is focused, or if it has + // autofocus and no other element is focused. + if (options.autofocus == null) { + let hasFocus = document.body; + // doc.activeElement occasionally throws on IE + try { hasFocus = document.activeElement; } catch (e) {} + options.autofocus = hasFocus == textarea || + textarea.getAttribute('autofocus') != null && hasFocus == document.body; + } + + function save() { textarea.value = cm.getValue(); } + if (textarea.form) { + // Deplorable hack to make the submit method do the right thing. + on(textarea.form, 'submit', save); + const { form } = textarea; + var realSubmit = form.submit; + try { + form.submit = function wrappedSubmit() { + save(); + form.submit = realSubmit; + form.submit(); + form.submit = wrappedSubmit; + }; + } catch (e) {} + } + + textarea.style.display = 'none'; + var cm = CodeMirror((node) => { + textarea.parentNode.insertBefore(node, textarea.nextSibling); + }, options); + cm.save = save; + cm.getTextArea = function () { return textarea; }; + cm.toTextArea = function () { + save(); + textarea.parentNode.removeChild(cm.getWrapperElement()); + textarea.style.display = ''; + if (textarea.form) { + off(textarea.form, 'submit', save); + if (typeof textarea.form.submit === 'function') textarea.form.submit = realSubmit; + } + }; + return cm; + }; + + // STRING STREAM + + // Fed to the mode parsers, provides helper functions to make + // parsers more succinct. + + // The character stream used by a mode's parser. + function StringStream(string, tabSize) { + this.pos = this.start = 0; + this.string = string; + this.tabSize = tabSize || 8; + } + + StringStream.prototype = { + eol: function () { return this.pos >= this.string.length; }, + sol: function () { return this.pos == 0; }, + peek: function () { return this.string.charAt(this.pos) || undefined; }, + next: function () { + if (this.pos < this.string.length) return this.string.charAt(this.pos++); + }, + eat: function (match) { + const ch = this.string.charAt(this.pos); + if (typeof match === 'string') var ok = ch == match; + else var ok = ch && (match.test ? match.test(ch) : match(ch)); + if (ok) { ++this.pos; return ch; } + }, + eatWhile: function (match) { + const start = this.pos; + while (this.eat(match)) {} + return this.pos > start; + }, + eatSpace: function () { + const start = this.pos; + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; + return this.pos > start; + }, + skipToEnd: function () { this.pos = this.string.length; }, + skipTo: function (ch) { + const found = this.string.indexOf(ch, this.pos); + if (found > -1) { this.pos = found; return true; } + }, + backUp: function (n) { this.pos -= n; }, + column: function () { return countColumn(this.string, this.start, this.tabSize); }, + indentation: function () { return countColumn(this.string, null, this.tabSize); }, + match: function (pattern, consume, caseInsensitive) { + if (typeof pattern === 'string') { + const cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; }; + if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) { + if (consume !== false) this.pos += pattern.length; + return true; + } + } else { + const match = this.string.slice(this.pos).match(pattern); + if (match && match.index > 0) return null; + if (match && consume !== false) this.pos += match[0].length; + return match; + } + }, + current: function () { return this.string.slice(this.start, this.pos); }, + }; + CodeMirror.StringStream = StringStream; + + // TEXTMARKERS + + function TextMarker(cm, type) { + this.lines = []; + this.type = type; + this.cm = cm; + } + + TextMarker.prototype.clear = function () { + if (this.explicitlyCleared) return; + startOperation(this.cm); + let min = null; let + max = null; + for (let i = 0; i < this.lines.length; ++i) { + const line = this.lines[i]; + const span = getMarkedSpanFor(line.markedSpans, this); + if (span.to != null) max = lineNo(line); + line.markedSpans = removeMarkedSpan(line.markedSpans, span); + if (span.from != null) min = lineNo(line); + else if (this.collapsed && !lineIsHidden(line)) updateLineHeight(line, textHeight(this.cm.display)); + } + if (min != null) regChange(this.cm, min, max + 1); + this.lines.length = 0; + this.explicitlyCleared = true; + if (this.collapsed && this.cm.view.cantEdit) { + this.cm.view.cantEdit = false; + reCheckSelection(this.cm); + } + endOperation(this.cm); + signalLater(this.cm, this, 'clear'); + }; + + TextMarker.prototype.find = function () { + let from; let + to; + for (let i = 0; i < this.lines.length; ++i) { + const line = this.lines[i]; + const span = getMarkedSpanFor(line.markedSpans, this); + if (span.from != null || span.to != null) { + const found = lineNo(line); + if (span.from != null) from = { line: found, ch: span.from }; + if (span.to != null) to = { line: found, ch: span.to }; + } + } + if (this.type == 'bookmark') return from; + return from && { from: from, to: to }; + }; + + function markText(cm, from, to, options, type) { + const { doc } = cm.view; + const marker = new TextMarker(cm, type); + if (type == 'range' && !posLess(from, to)) return marker; + if (options) { + for (const opt in options) { if (options.hasOwnProperty(opt)) marker[opt] = options[opt]; } + } + if (marker.replacedWith) { + marker.collapsed = true; + marker.replacedWith = elt('span', [marker.replacedWith], 'CodeMirror-widget'); + } + if (marker.collapsed) sawCollapsedSpans = true; + + let curLine = from.line; let size = 0; let collapsedAtStart; let + collapsedAtEnd; + doc.iter(curLine, to.line + 1, (line) => { + const span = { from: null, to: null, marker: marker }; + size += line.text.length; + if (curLine == from.line) { span.from = from.ch; size -= from.ch; } + if (curLine == to.line) { span.to = to.ch; size -= line.text.length - to.ch; } + if (marker.collapsed) { + if (curLine == to.line) collapsedAtEnd = collapsedSpanAt(line, to.ch); + if (curLine == from.line) collapsedAtStart = collapsedSpanAt(line, from.ch); + else updateLineHeight(line, 0); + } + addMarkedSpan(line, span); + if (marker.collapsed && curLine == from.line && lineIsHidden(line)) updateLineHeight(line, 0); + ++curLine; + }); + + if (marker.readOnly) { + sawReadOnlySpans = true; + if (cm.view.history.done.length || cm.view.history.undone.length) cm.clearHistory(); + } + if (marker.collapsed) { + if (collapsedAtStart != collapsedAtEnd) throw new Error('Inserting collapsed marker overlapping an existing one'); + marker.size = size; + marker.atomic = true; + } + if (marker.className || marker.startStyle || marker.endStyle || marker.collapsed) regChange(cm, from.line, to.line + 1); + if (marker.atomic) reCheckSelection(cm); + return marker; + } + + // TEXTMARKER SPANS + + function getMarkedSpanFor(spans, marker) { + if (spans) { + for (let i = 0; i < spans.length; ++i) { + const span = spans[i]; + if (span.marker == marker) return span; + } + } + } + function removeMarkedSpan(spans, span) { + for (var r, i = 0; i < spans.length; ++i) if (spans[i] != span) (r || (r = [])).push(spans[i]); + return r; + } + function addMarkedSpan(line, span) { + line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; + span.marker.lines.push(line); + } + + function markedSpansBefore(old, startCh) { + if (old) { + for (var i = 0, nw; i < old.length; ++i) { + const span = old[i]; const + { marker } = span; + const startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); + if (startsBefore || marker.type == 'bookmark' && span.from == startCh) { + const endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh); + (nw || (nw = [])).push({ + from: span.from, + to: endsAfter ? null : span.to, + marker: marker, + }); + } + } + } + return nw; + } + + function markedSpansAfter(old, startCh, endCh) { + if (old) { + for (var i = 0, nw; i < old.length; ++i) { + const span = old[i]; const + { marker } = span; + const endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh); + if (endsAfter || marker.type == 'bookmark' && span.from == endCh && span.from != startCh) { + const startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh); + (nw || (nw = [])).push({ + from: startsBefore ? null : span.from - endCh, + to: span.to == null ? null : span.to - endCh, + marker: marker, + }); + } + } + } + return nw; + } + + function updateMarkedSpans(oldFirst, oldLast, startCh, endCh, newText) { + if (!oldFirst && !oldLast) return newText; + // Get the spans that 'stick out' on both sides + let first = markedSpansBefore(oldFirst, startCh); + const last = markedSpansAfter(oldLast, startCh, endCh); + + // Next, merge those two ends + const sameLine = newText.length == 1; const + offset = lst(newText).length + (sameLine ? startCh : 0); + if (first) { + // Fix up .to properties of first + for (var i = 0; i < first.length; ++i) { + var span = first[i]; + if (span.to == null) { + var found = getMarkedSpanFor(last, span.marker); + if (!found) span.to = startCh; + else if (sameLine) span.to = found.to == null ? null : found.to + offset; + } + } + } + if (last) { + // Fix up .from in last (or move them into first in case of sameLine) + for (var i = 0; i < last.length; ++i) { + var span = last[i]; + if (span.to != null) span.to += offset; + if (span.from == null) { + var found = getMarkedSpanFor(first, span.marker); + if (!found) { + span.from = offset; + if (sameLine) (first || (first = [])).push(span); + } + } else { + span.from += offset; + if (sameLine) (first || (first = [])).push(span); + } + } + } + + const newMarkers = [newHL(newText[0], first)]; + if (!sameLine) { + // Fill gap with whole-line-spans + const gap = newText.length - 2; let + gapMarkers; + if (gap > 0 && first) for (var i = 0; i < first.length; ++i) if (first[i].to == null) (gapMarkers || (gapMarkers = [])).push({ from: null, to: null, marker: first[i].marker }); + for (var i = 0; i < gap; ++i) newMarkers.push(newHL(newText[i + 1], gapMarkers)); + newMarkers.push(newHL(lst(newText), last)); + } + return newMarkers; + } + + function removeReadOnlyRanges(doc, from, to) { + let markers = null; + doc.iter(from.line, to.line + 1, (line) => { + if (line.markedSpans) { + for (let i = 0; i < line.markedSpans.length; ++i) { + const mark = line.markedSpans[i].marker; + if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) (markers || (markers = [])).push(mark); + } + } + }); + if (!markers) return null; + const parts = [{ from: from, to: to }]; + for (let i = 0; i < markers.length; ++i) { + const m = markers[i].find(); + for (let j = 0; j < parts.length; ++j) { + const p = parts[j]; + if (!posLess(m.from, p.to) || posLess(m.to, p.from)) continue; + const newParts = [j, 1]; + if (posLess(p.from, m.from)) newParts.push({ from: p.from, to: m.from }); + if (posLess(m.to, p.to)) newParts.push({ from: m.to, to: p.to }); + parts.splice.apply(parts, newParts); + j += newParts.length - 1; + } + } + return parts; + } + + function collapsedSpanAt(line, ch) { + const sps = sawCollapsedSpans && line.markedSpans; let + found; + if (sps) { + for (var sp, i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (!sp.marker.collapsed) continue; + if ((sp.from == null || sp.from < ch) && + (sp.to == null || sp.to > ch) && + (!found || found.width < sp.marker.width)) found = sp.marker; + } + } + return found; + } + function collapsedSpanAtStart(line) { return collapsedSpanAt(line, -1); } + function collapsedSpanAtEnd(line) { return collapsedSpanAt(line, line.text.length + 1); } + + function visualLine(doc, line) { + let merged; + while (merged = collapsedSpanAtStart(line)) line = getLine(doc, merged.find().from.line); + return line; + } + + function lineIsHidden(line) { + const sps = sawCollapsedSpans && line.markedSpans; + if (sps) { + for (var sp, i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (!sp.marker.collapsed) continue; + if (sp.from == null) return true; + if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(line, sp)) return true; + } + } + } + window.lineIsHidden = lineIsHidden; + function lineIsHiddenInner(line, span) { + if (span.to == null || span.marker.inclusiveRight && span.to == line.text.length) return true; + for (var sp, i = 0; i < line.markedSpans.length; ++i) { + sp = line.markedSpans[i]; + if (sp.marker.collapsed && sp.from == span.to && + (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && + lineIsHiddenInner(line, sp)) return true; + } + } + + // hl stands for history-line, a data structure that can be either a + // string (line without markers) or a {text, markedSpans} object. + function hlText(val) { return typeof val === 'string' ? val : val.text; } + function hlSpans(val) { + if (typeof val === 'string') return null; + const spans = val.markedSpans; let + out = null; + for (let i = 0; i < spans.length; ++i) { + if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); } else if (out) out.push(spans[i]); + } + return !out ? spans : out.length ? out : null; + } + function newHL(text, spans) { return spans ? { text: text, markedSpans: spans } : text; } + + function detachMarkedSpans(line) { + const spans = line.markedSpans; + if (!spans) return; + for (let i = 0; i < spans.length; ++i) { + const { lines } = spans[i].marker; + const ix = indexOf(lines, line); + lines.splice(ix, 1); + } + line.markedSpans = null; + } + + function attachMarkedSpans(line, spans) { + if (!spans) return; + for (let i = 0; i < spans.length; ++i) spans[i].marker.lines.push(line); + line.markedSpans = spans; + } + + // LINE DATA STRUCTURE + + // Line objects. These hold state related to a line, including + // highlighting info (the styles array). + function makeLine(text, markedSpans, height) { + const line = { text: text, height: height }; + attachMarkedSpans(line, markedSpans); + if (lineIsHidden(line)) line.height = 0; + return line; + } + + function updateLine(cm, line, text, markedSpans) { + line.text = text; + line.stateAfter = line.styles = null; + if (line.order != null) line.order = null; + detachMarkedSpans(line); + attachMarkedSpans(line, markedSpans); + if (lineIsHidden(line)) line.height = 0; + else if (!line.height) line.height = textHeight(cm.display); + signalLater(cm, line, 'change'); + } + + function cleanUpLine(line) { + line.parent = null; + detachMarkedSpans(line); + } + + // Run the given mode's parser over a line, update the styles + // array, which contains alternating fragments of text and CSS + // classes. + function highlightLine(cm, line, state) { + const { mode } = cm.view; + const { flattenSpans } = cm.options; + let changed = !line.styles; let pos = 0; let curText = ''; let + curStyle = null; + const stream = new StringStream(line.text, cm.options.tabSize); const + st = line.styles || (line.styles = []); + if (line.text == '' && mode.blankLine) mode.blankLine(state); + while (!stream.eol()) { + const style = mode.token(stream, state); const + substr = stream.current(); + stream.start = stream.pos; + if (!flattenSpans || curStyle != style) { + if (curText) { + changed = changed || pos >= st.length || curText != st[pos] || curStyle != st[pos + 1]; + st[pos++] = curText; st[pos++] = curStyle; + } + curText = substr; curStyle = style; + } else curText += substr; + // Give up when line is ridiculously long + if (stream.pos > 5000) break; + } + if (curText) { + changed = changed || pos >= st.length || curText != st[pos] || curStyle != st[pos + 1]; + st[pos++] = curText; st[pos++] = curStyle; + } + if (stream.pos > 5000) { st[pos++] = line.text.slice(stream.pos); st[pos++] = null; } + if (pos != st.length) { st.length = pos; changed = true; } + return changed; + } + + // Lightweight form of highlight -- proceed over this line and + // update state, but don't save a style array. + function processLine(cm, line, state) { + const { mode } = cm.view; + const stream = new StringStream(line.text, cm.options.tabSize); + if (line.text == '' && mode.blankLine) mode.blankLine(state); + while (!stream.eol() && stream.pos <= 5000) { + mode.token(stream, state); + stream.start = stream.pos; + } + } + + const styleToClassCache = {}; + function styleToClass(style) { + if (!style) return null; + return styleToClassCache[style] || + (styleToClassCache[style] = `cm-${style.replace(/ +/g, ' cm-')}`); + } + + function lineContent(cm, realLine, measure) { + let merged; let line = realLine; let lineBefore; let sawBefore; let + simple = true; + while (merged = collapsedSpanAtStart(line)) { + simple = false; + line = getLine(cm.view.doc, merged.find().from.line); + if (!lineBefore) lineBefore = line; + } + + const builder = { + pre: elt('pre'), + col: 0, + pos: 0, + display: !measure, + measure: null, + addedOne: false, + cm: cm, + }; + if (line.textClass) builder.pre.className = line.textClass; + + do { + if (!line.styles) highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line))); + builder.measure = line == realLine && measure; + builder.pos = 0; + builder.addToken = builder.measure ? buildTokenMeasure : buildToken; + if (measure && sawBefore && line != realLine && !builder.addedOne) { + measure[0] = builder.pre.appendChild(zeroWidthElement(cm.display.measure)); + builder.addedOne = true; + } + var next = insertLineContent(line, builder); + sawBefore = line == lineBefore; + if (next) { + line = getLine(cm.view.doc, next.to.line); + simple = false; + } + } while (next); + + if (measure && !builder.addedOne) measure[0] = builder.pre.appendChild(simple ? elt('span', '\u00a0') : zeroWidthElement(cm.display.measure)); + if (!builder.pre.firstChild && !lineIsHidden(realLine)) builder.pre.appendChild(document.createTextNode('\u00a0')); + + return builder.pre; + } + + const tokenSpecialChars = /[\t\u0000-\u0019\u200b\u2028\u2029\uFEFF]/g; + function buildToken(builder, text, style, startStyle, endStyle) { + if (!text) return; + if (!tokenSpecialChars.test(text)) { + builder.col += text.length; + var content = document.createTextNode(text); + } else { + var content = document.createDocumentFragment(); let + pos = 0; + while (true) { + tokenSpecialChars.lastIndex = pos; + const m = tokenSpecialChars.exec(text); + const skipped = m ? m.index - pos : text.length - pos; + if (skipped) { + content.appendChild(document.createTextNode(text.slice(pos, pos + skipped))); + builder.col += skipped; + } + if (!m) break; + pos += skipped + 1; + if (m[0] == '\t') { + const { tabSize } = builder.cm.options; + const tabWidth = tabSize - builder.col % tabSize; + content.appendChild(elt('span', spaceStr(tabWidth), 'cm-tab')); + builder.col += tabWidth; + } else { + const token = elt('span', '\u2022', 'cm-invalidchar'); + token.title = `\\u${m[0].charCodeAt(0).toString(16)}`; + content.appendChild(token); + builder.col += 1; + } + } + } + if (style || startStyle || endStyle || builder.measure) { + let fullStyle = style || ''; + if (startStyle) fullStyle += startStyle; + if (endStyle) fullStyle += endStyle; + return builder.pre.appendChild(elt('span', [content], fullStyle)); + } + builder.pre.appendChild(content); + } + + function buildTokenMeasure(builder, text, style, startStyle, endStyle) { + for (let i = 0; i < text.length; ++i) { + if (i && i < text.length - 1 && + builder.cm.options.lineWrapping && + spanAffectsWrapping.test(text.slice(i - 1, i + 1))) builder.pre.appendChild(elt('wbr')); + builder.measure[builder.pos++] = + buildToken(builder, text.charAt(i), style, i == 0 && startStyle, i == text.length - 1 && endStyle); + } + if (text.length) builder.addedOne = true; + } + + function buildCollapsedSpan(builder, size, widget) { + if (widget) { + if (!builder.display) widget = widget.cloneNode(true); + builder.pre.appendChild(widget); + if (builder.measure && size) { + builder.measure[builder.pos] = widget; + builder.addedOne = true; + } + } + builder.pos += size; + } + + // Outputs a number of spans to make up a line, taking highlighting + // and marked text into account. + function insertLineContent(line, builder) { + const st = line.styles; const + spans = line.markedSpans; + if (!spans) { + for (var i = 0; i < st.length; i += 2) builder.addToken(builder, st[i], styleToClass(st[i + 1])); + return; + } + + const allText = line.text; const + len = allText.length; + let pos = 0; var i = 0; let text = ''; let + style; + let nextChange = 0; let spanStyle; let spanEndStyle; let spanStartStyle; let + collapsed; + for (;;) { + if (nextChange == pos) { // Update current marker set + spanStyle = spanEndStyle = spanStartStyle = ''; + collapsed = null; nextChange = Infinity; + let foundBookmark = null; + for (let j = 0; j < spans.length; ++j) { + const sp = spans[j]; const + m = sp.marker; + if (sp.from <= pos && (sp.to == null || sp.to > pos)) { + if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = ''; } + if (m.className) spanStyle += ` ${m.className}`; + if (m.startStyle && sp.from == pos) spanStartStyle += ` ${m.startStyle}`; + if (m.endStyle && sp.to == nextChange) spanEndStyle += ` ${m.endStyle}`; + if (m.collapsed && (!collapsed || collapsed.marker.width < m.width)) collapsed = sp; + } else if (sp.from > pos && nextChange > sp.from) { + nextChange = sp.from; + } + if (m.type == 'bookmark' && sp.from == pos && m.replacedWith) foundBookmark = m.replacedWith; + } + if (collapsed && (collapsed.from || 0) == pos) { + buildCollapsedSpan(builder, (collapsed.to == null ? len : collapsed.to) - pos, collapsed.from != null && collapsed.marker.replacedWith); + if (collapsed.to == null) return collapsed.marker.find(); + } + if (foundBookmark && !collapsed) buildCollapsedSpan(builder, 0, foundBookmark); + } + if (pos >= len) break; + + const upto = Math.min(len, nextChange); + while (true) { + if (text) { + const end = pos + text.length; + if (!collapsed) { + const tokenText = end > upto ? text.slice(0, upto - pos) : text; + builder.addToken(builder, tokenText, style + spanStyle, spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : ''); + } + if (end >= upto) { text = text.slice(upto - pos); pos = upto; break; } + pos = end; + spanStartStyle = ''; + } + text = st[i++]; style = styleToClass(st[i++]); + } + } + } + + // DOCUMENT DATA STRUCTURE + + function LeafChunk(lines) { + this.lines = lines; + this.parent = null; + for (var i = 0, e = lines.length, height = 0; i < e; ++i) { + lines[i].parent = this; + height += lines[i].height; + } + this.height = height; + } + + LeafChunk.prototype = { + chunkSize: function () { return this.lines.length; }, + remove: function (at, n, cm) { + for (let i = at, e = at + n; i < e; ++i) { + const line = this.lines[i]; + this.height -= line.height; + cleanUpLine(line); + signalLater(cm, line, 'delete'); + } + this.lines.splice(at, n); + }, + collapse: function (lines) { + lines.splice.apply(lines, [lines.length, 0].concat(this.lines)); + }, + insertHeight: function (at, lines, height) { + this.height += height; + this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at)); + for (let i = 0, e = lines.length; i < e; ++i) lines[i].parent = this; + }, + iterN: function (at, n, op) { + for (let e = at + n; at < e; ++at) if (op(this.lines[at])) return true; + }, + }; + + function BranchChunk(children) { + this.children = children; + let size = 0; let + height = 0; + for (let i = 0, e = children.length; i < e; ++i) { + const ch = children[i]; + size += ch.chunkSize(); height += ch.height; + ch.parent = this; + } + this.size = size; + this.height = height; + this.parent = null; + } + + BranchChunk.prototype = { + chunkSize: function () { return this.size; }, + remove: function (at, n, callbacks) { + this.size -= n; + for (let i = 0; i < this.children.length; ++i) { + const child = this.children[i]; const + sz = child.chunkSize(); + if (at < sz) { + const rm = Math.min(n, sz - at); const + oldHeight = child.height; + child.remove(at, rm, callbacks); + this.height -= oldHeight - child.height; + if (sz == rm) { this.children.splice(i--, 1); child.parent = null; } + if ((n -= rm) == 0) break; + at = 0; + } else at -= sz; + } + if (this.size - n < 25) { + const lines = []; + this.collapse(lines); + this.children = [new LeafChunk(lines)]; + this.children[0].parent = this; + } + }, + collapse: function (lines) { + for (let i = 0, e = this.children.length; i < e; ++i) this.children[i].collapse(lines); + }, + insert: function (at, lines) { + let height = 0; + for (let i = 0, e = lines.length; i < e; ++i) height += lines[i].height; + this.insertHeight(at, lines, height); + }, + insertHeight: function (at, lines, height) { + this.size += lines.length; + this.height += height; + for (let i = 0, e = this.children.length; i < e; ++i) { + const child = this.children[i]; const + sz = child.chunkSize(); + if (at <= sz) { + child.insertHeight(at, lines, height); + if (child.lines && child.lines.length > 50) { + while (child.lines.length > 50) { + const spilled = child.lines.splice(child.lines.length - 25, 25); + const newleaf = new LeafChunk(spilled); + child.height -= newleaf.height; + this.children.splice(i + 1, 0, newleaf); + newleaf.parent = this; + } + this.maybeSpill(); + } + break; + } + at -= sz; + } + }, + maybeSpill: function () { + if (this.children.length <= 10) return; + let me = this; + do { + const spilled = me.children.splice(me.children.length - 5, 5); + const sibling = new BranchChunk(spilled); + if (!me.parent) { // Become the parent node + const copy = new BranchChunk(me.children); + copy.parent = me; + me.children = [copy, sibling]; + me = copy; + } else { + me.size -= sibling.size; + me.height -= sibling.height; + const myIndex = indexOf(me.parent.children, me); + me.parent.children.splice(myIndex + 1, 0, sibling); + } + sibling.parent = me.parent; + } while (me.children.length > 10); + me.parent.maybeSpill(); + }, + iter: function (from, to, op) { this.iterN(from, to - from, op); }, + iterN: function (at, n, op) { + for (let i = 0, e = this.children.length; i < e; ++i) { + const child = this.children[i]; const + sz = child.chunkSize(); + if (at < sz) { + const used = Math.min(n, sz - at); + if (child.iterN(at, used, op)) return true; + if ((n -= used) == 0) break; + at = 0; + } else at -= sz; + } + }, + }; + + // LINE UTILITIES + + function getLine(chunk, n) { + while (!chunk.lines) { + for (let i = 0; ; ++i) { + const child = chunk.children[i]; const + sz = child.chunkSize(); + if (n < sz) { chunk = child; break; } + n -= sz; + } + } + return chunk.lines[n]; + } + + function updateLineHeight(line, height) { + const diff = height - line.height; + for (let n = line; n; n = n.parent) n.height += diff; + } + + function lineNo(line) { + if (line.parent == null) return null; + let cur = line.parent; let + no = indexOf(cur.lines, line); + for (let chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { + for (let i = 0; ; ++i) { + if (chunk.children[i] == cur) break; + no += chunk.children[i].chunkSize(); + } + } + return no; + } + + function lineAtHeight(chunk, h) { + let n = 0; + outer: do { + for (var i = 0, e = chunk.children.length; i < e; ++i) { + const child = chunk.children[i]; const + ch = child.height; + if (h < ch) { chunk = child; continue outer; } + h -= ch; + n += child.chunkSize(); + } + return n; + } while (!chunk.lines); + for (var i = 0, e = chunk.lines.length; i < e; ++i) { + const line = chunk.lines[i]; const + lh = line.height; + if (h < lh) break; + h -= lh; + } + return n + i; + } + + function heightAtLine(cm, lineObj) { + lineObj = visualLine(cm.view.doc, lineObj); + + let h = 0; let + chunk = lineObj.parent; + for (var i = 0; i < chunk.lines.length; ++i) { + const line = chunk.lines[i]; + if (line == lineObj) break; + else h += line.height; + } + for (let p = chunk.parent; p; chunk = p, p = chunk.parent) { + for (var i = 0; i < p.children.length; ++i) { + const cur = p.children[i]; + if (cur == chunk) break; + else h += cur.height; + } + } + return h; + } + + function getOrder(line) { + let { order } = line; + if (order == null) order = line.order = bidiOrdering(line.text); + return order; + } + + // HISTORY + + function makeHistory() { + return { + // Arrays of history events. Doing something adds an event to + // done and clears undo. Undoing moves events from done to + // undone, redoing moves them in the other direction. + done: [], + undone: [], + // Used to track when changes can be merged into a single undo + // event + lastTime: 0, + lastOp: null, + lastOrigin: null, + // Used by the isClean() method + dirtyCounter: 0, + }; + } + + function addChange(cm, start, added, old, origin, fromBefore, toBefore, fromAfter, toAfter) { + const { history } = cm.view; + history.undone.length = 0; + const time = +new Date(); + let cur = lst(history.done); + + if (cur && + (history.lastOp == cm.curOp.id || + history.lastOrigin == origin && (origin == 'input' || origin == 'delete') && + history.lastTime > time - 600)) { + // Merge this change into the last event + const last = lst(cur.events); + if (last.start > start + old.length || last.start + last.added < start) { + // Doesn't intersect with last sub-event, add new sub-event + cur.events.push({ start: start, added: added, old: old }); + } else { + // Patch up the last sub-event + const startBefore = Math.max(0, last.start - start); + const endAfter = Math.max(0, (start + old.length) - (last.start + last.added)); + for (var i = startBefore; i > 0; --i) last.old.unshift(old[i - 1]); + for (var i = endAfter; i > 0; --i) last.old.push(old[old.length - i]); + if (startBefore) last.start = start; + last.added += added - (old.length - startBefore - endAfter); + } + cur.fromAfter = fromAfter; cur.toAfter = toAfter; + } else { + // Can not be merged, start a new event. + cur = { + events: [{ start: start, added: added, old: old }], + fromBefore: fromBefore, + toBefore: toBefore, + fromAfter: fromAfter, + toAfter: toAfter, + }; + history.done.push(cur); + while (history.done.length > cm.options.undoDepth) history.done.shift(); + if (history.dirtyCounter < 0) + // The user has made a change after undoing past the last clean state. + // We can never get back to a clean state now until markClean() is called. + { history.dirtyCounter = NaN; } else history.dirtyCounter++; + } + history.lastTime = time; + history.lastOp = cm.curOp.id; + history.lastOrigin = origin; + } + + // EVENT OPERATORS + + function stopMethod() { e_stop(this); } + // Ensure an event has a stop method. + function addStop(event) { + if (!event.stop) event.stop = stopMethod; + return event; + } + + function e_preventDefault(e) { + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + } + function e_stopPropagation(e) { + if (e.stopPropagation) e.stopPropagation(); + else e.cancelBubble = true; + } + function e_stop(e) { e_preventDefault(e); e_stopPropagation(e); } + CodeMirror.e_stop = e_stop; + CodeMirror.e_preventDefault = e_preventDefault; + CodeMirror.e_stopPropagation = e_stopPropagation; + + function e_target(e) { return e.target || e.srcElement; } + function e_button(e) { + let b = e.which; + if (b == null) { + if (e.button & 1) b = 1; + else if (e.button & 2) b = 3; + else if (e.button & 4) b = 2; + } + if (mac && e.ctrlKey && b == 1) b = 3; + return b; + } + + // Allow 3rd-party code to override event properties by adding an override + // object to an event object. + function e_prop(e, prop) { + const overridden = e.override && e.override.hasOwnProperty(prop); + return overridden ? e.override[prop] : e[prop]; + } + + // EVENT HANDLING + + function on(emitter, type, f) { + if (emitter.addEventListener) emitter.addEventListener(type, f, false); + else if (emitter.attachEvent) emitter.attachEvent(`on${type}`, f); + else { + const map = emitter._handlers || (emitter._handlers = {}); + const arr = map[type] || (map[type] = []); + arr.push(f); + } + } + + function off(emitter, type, f) { + if (emitter.removeEventListener) emitter.removeEventListener(type, f, false); + else if (emitter.detachEvent) emitter.detachEvent(`on${type}`, f); + else { + const arr = emitter._handlers && emitter._handlers[type]; + if (!arr) return; + for (let i = 0; i < arr.length; ++i) if (arr[i] == f) { arr.splice(i, 1); break; } + } + } + + function signal(emitter, type /* , values... */) { + const arr = emitter._handlers && emitter._handlers[type]; + if (!arr) return; + const args = Array.prototype.slice.call(arguments, 2); + for (let i = 0; i < arr.length; ++i) arr[i].apply(null, args); + } + + function signalLater(cm, emitter, type /* , values... */) { + const arr = emitter._handlers && emitter._handlers[type]; + if (!arr) return; + const args = Array.prototype.slice.call(arguments, 3); const + flist = cm.curOp && cm.curOp.delayedCallbacks; + function bnd(f) { return function () { f.apply(null, args); }; } + for (let i = 0; i < arr.length; ++i) { + if (flist) flist.push(bnd(arr[i])); + else arr[i].apply(null, args); + } + } + + function hasHandler(emitter, type) { + const arr = emitter._handlers && emitter._handlers[type]; + return arr && arr.length > 0; + } + + CodeMirror.on = on; CodeMirror.off = off; CodeMirror.signal = signal; + + // MISC UTILITIES + + // Number of pixels added to scroller and sizer to hide scrollbar + var scrollerCutOff = 30; + + // Returned or thrown by various protocols to signal 'I'm not + // handling this'. + var Pass = CodeMirror.Pass = { toString: function () { return 'CodeMirror.Pass'; } }; + + function Delayed() { this.id = null; } + Delayed.prototype = { set: function (ms, f) { clearTimeout(this.id); this.id = setTimeout(f, ms); } }; + + // Counts the column offset in a string, taking tabs into account. + // Used mostly to find indentation. + function countColumn(string, end, tabSize) { + if (end == null) { + end = string.search(/[^\s\u00a0]/); + if (end == -1) end = string.length; + } + for (var i = 0, n = 0; i < end; ++i) { + if (string.charAt(i) == '\t') n += tabSize - (n % tabSize); + else ++n; + } + return n; + } + CodeMirror.countColumn = countColumn; + + const spaceStrs = ['']; + function spaceStr(n) { + while (spaceStrs.length <= n) spaceStrs.push(`${lst(spaceStrs)} `); + return spaceStrs[n]; + } + + function lst(arr) { return arr[arr.length - 1]; } + + function selectInput(node) { + if (ios) { // Mobile Safari apparently has a bug where select() is broken. + node.selectionStart = 0; + node.selectionEnd = node.value.length; + } else node.select(); + } + + function indexOf(collection, elt) { + if (collection.indexOf) return collection.indexOf(elt); + for (let i = 0, e = collection.length; i < e; ++i) if (collection[i] == elt) return i; + return -1; + } + + function emptyArray(size) { + for (var a = [], i = 0; i < size; ++i) a.push(undefined); + return a; + } + + function bind(f) { + const args = Array.prototype.slice.call(arguments, 1); + return function () { return f.apply(null, args); }; + } + + const nonASCIISingleCaseWordChar = /[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc]/; + function isWordChar(ch) { + return /\w/.test(ch) || ch > '\x80' && + (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)); + } + + function isEmpty(obj) { + let c = 0; + for (const n in obj) if (obj.hasOwnProperty(n) && obj[n]) ++c; + return !c; + } + + var isExtendingChar = /[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\uA670-\uA672\uA674-\uA67D\uA69F]/; + + // DOM UTILITIES + + function elt(tag, content, className, style) { + const e = document.createElement(tag); + if (className) e.className = className; + if (style) e.style.cssText = style; + if (typeof content === 'string') setTextContent(e, content); + else if (content) for (let i = 0; i < content.length; ++i) e.appendChild(content[i]); + return e; + } + + function removeChildren(e) { + e.innerHTML = ''; + return e; + } + + function removeChildrenAndAdd(parent, e) { + return removeChildren(parent).appendChild(e); + } + + function setTextContent(e, str) { + if (ie_lt9) { + e.innerHTML = ''; + e.appendChild(document.createTextNode(str)); + } else e.textContent = str; + } + + // FEATURE DETECTION + + // Detect drag-and-drop + var dragAndDrop = (function () { + // There is *some* kind of drag-and-drop support in IE6-8, but I + // couldn't get it to work yet. + if (ie_lt9) return false; + const div = elt('div'); + return 'draggable' in div || 'dragDrop' in div; + }()); + + // For a reason I have yet to figure out, some browsers disallow + // word wrapping between certain characters *only* if a new inline + // element is started between them. This makes it hard to reliably + // measure the position of things, since that requires inserting an + // extra span. This terribly fragile set of regexps matches the + // character combinations that suffer from this phenomenon on the + // various browsers. + var spanAffectsWrapping = /^$/; // Won't match any two-character string + if (gecko) spanAffectsWrapping = /$'/; + else if (safari) spanAffectsWrapping = /\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/; + else if (chrome) spanAffectsWrapping = /\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/; + + let knownScrollbarWidth; + function scrollbarWidth(measure) { + if (knownScrollbarWidth != null) return knownScrollbarWidth; + const test = elt('div', null, null, 'width: 50px; height: 50px; overflow-x: scroll'); + removeChildrenAndAdd(measure, test); + if (test.offsetWidth) knownScrollbarWidth = test.offsetHeight - test.clientHeight; + return knownScrollbarWidth || 0; + } + + let zwspSupported; + function zeroWidthElement(measure) { + if (zwspSupported == null) { + const test = elt('span', '\u200b'); + removeChildrenAndAdd(measure, elt('span', [test, document.createTextNode('x')])); + if (measure.firstChild.offsetHeight != 0) zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !ie_lt8; + } + if (zwspSupported) return elt('span', '\u200b'); + return elt('span', '\u00a0', null, 'display: inline-block; width: 1px; margin-right: -1px'); + } + + // See if "".split is the broken IE version, if so, provide an + // alternative way to split lines. + var splitLines = '\n\nb'.split(/\n/).length != 3 ? function (string) { + let pos = 0; const result = []; const + l = string.length; + while (pos <= l) { + let nl = string.indexOf('\n', pos); + if (nl == -1) nl = string.length; + const line = string.slice(pos, string.charAt(nl - 1) == '\r' ? nl - 1 : nl); + const rt = line.indexOf('\r'); + if (rt != -1) { + result.push(line.slice(0, rt)); + pos += rt + 1; + } else { + result.push(line); + pos = nl + 1; + } + } + return result; + } : function (string) { return string.split(/\r\n?|\n/); }; + CodeMirror.splitLines = splitLines; + + var hasSelection = window.getSelection ? function (te) { + try { return te.selectionStart != te.selectionEnd; } catch (e) { return false; } + } : function (te) { + try { var range = te.ownerDocument.selection.createRange(); } catch (e) {} + if (!range || range.parentElement() != te) return false; + return range.compareEndPoints('StartToEnd', range) != 0; + }; + + var hasCopyEvent = (function () { + const e = elt('div'); + if ('oncopy' in e) return true; + e.setAttribute('oncopy', 'return;'); + return typeof e.oncopy === 'function'; + }()); + + // KEY NAMING + + var keyNames = { + 3: 'Enter', + 8: 'Backspace', + 9: 'Tab', + 13: 'Enter', + 16: 'Shift', + 17: 'Ctrl', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Esc', + 32: 'Space', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'Left', + 38: 'Up', + 39: 'Right', + 40: 'Down', + 44: 'PrintScrn', + 45: 'Insert', + 46: 'Delete', + 59: ';', + 91: 'Mod', + 92: 'Mod', + 93: 'Mod', + 109: '-', + 107: '=', + 127: 'Delete', + 186: ';', + 187: '=', + 188: ',', + 189: '-', + 190: '.', + 191: '/', + 192: '`', + 219: '[', + 220: '\\', + 221: ']', + 222: "'", + 63276: 'PageUp', + 63277: 'PageDown', + 63275: 'End', + 63273: 'Home', + 63234: 'Left', + 63232: 'Up', + 63235: 'Right', + 63233: 'Down', + 63302: 'Insert', + 63272: 'Delete', + }; + CodeMirror.keyNames = keyNames; + (function () { + // Number keys + for (var i = 0; i < 10; i++) keyNames[i + 48] = String(i); + // Alphabetic keys + for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i); + // Function keys + for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = `F${i}`; + }()); + + // BIDI HELPERS + + function iterateBidiSections(order, from, to, f) { + if (!order) return f(from, to, 'ltr'); + for (let i = 0; i < order.length; ++i) { + const part = order[i]; + if (part.from < to && part.to > from) f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? 'rtl' : 'ltr'); + } + } + + function bidiLeft(part) { return part.level % 2 ? part.to : part.from; } + function bidiRight(part) { return part.level % 2 ? part.from : part.to; } + + function lineLeft(line) { const order = getOrder(line); return order ? bidiLeft(order[0]) : 0; } + function lineRight(line) { + const order = getOrder(line); + if (!order) return line.text.length; + return bidiRight(lst(order)); + } + + function lineStart(cm, lineN) { + const line = getLine(cm.view.doc, lineN); + const visual = visualLine(cm.view.doc, line); + if (visual != line) lineN = lineNo(visual); + const order = getOrder(visual); + const ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual); + return { line: lineN, ch: ch }; + } + function lineEnd(cm, lineNo) { + let merged; let + line; + while (merged = collapsedSpanAtEnd(line = getLine(cm.view.doc, lineNo))) lineNo = merged.find().to.line; + const order = getOrder(line); + const ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line); + return { line: lineNo, ch: ch }; + } + + // This is somewhat involved. It is needed in order to move + // 'visually' through bi-directional text -- i.e., pressing left + // should make the cursor go left, even when in RTL text. The + // tricky part is the 'jumps', where RTL and LTR text touch each + // other. This often requires the cursor offset to move more than + // one unit, in order to visually move one unit. + function moveVisually(line, start, dir, byUnit) { + const bidi = getOrder(line); + if (!bidi) return moveLogically(line, start, dir, byUnit); + const moveOneUnit = byUnit ? function (pos, dir) { + do pos += dir; + while (pos > 0 && isExtendingChar.test(line.text.charAt(pos))); + return pos; + } : function (pos, dir) { return pos + dir; }; + const linedir = bidi[0].level; + for (var i = 0; i < bidi.length; ++i) { + var part = bidi[i]; const + sticky = part.level % 2 == linedir; + if ((part.from < start && part.to > start) || + (sticky && (part.from == start || part.to == start))) break; + } + let target = moveOneUnit(start, part.level % 2 ? -dir : dir); + + while (target != null) { + if (part.level % 2 == linedir) { + if (target < part.from || target > part.to) { + part = bidi[i += dir]; + target = part && (dir > 0 == part.level % 2 ? moveOneUnit(part.to, -1) : moveOneUnit(part.from, 1)); + } else break; + } else if (target == bidiLeft(part)) { + part = bidi[--i]; + target = part && bidiRight(part); + } else if (target == bidiRight(part)) { + part = bidi[++i]; + target = part && bidiLeft(part); + } else break; + } + + return target < 0 || target > line.text.length ? null : target; + } + + function moveLogically(line, start, dir, byUnit) { + let target = start + dir; + if (byUnit) while (target > 0 && isExtendingChar.test(line.text.charAt(target))) target += dir; + return target < 0 || target > line.text.length ? null : target; + } + + // Bidirectional ordering algorithm + // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm + // that this (partially) implements. + + // One-char codes used for character types: + // L (L): Left-to-Right + // R (R): Right-to-Left + // r (AL): Right-to-Left Arabic + // 1 (EN): European Number + // + (ES): European Number Separator + // % (ET): European Number Terminator + // n (AN): Arabic Number + // , (CS): Common Number Separator + // m (NSM): Non-Spacing Mark + // b (BN): Boundary Neutral + // s (B): Paragraph Separator + // t (S): Segment Separator + // w (WS): Whitespace + // N (ON): Other Neutrals + + // Returns null if characters are ordered as they appear + // (left-to-right), or an array of sections ({from, to, level} + // objects) in the order in which they occur visually. + var bidiOrdering = (function () { + // Character types for codepoints 0 to 0xff + const lowTypes = 'bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL'; + // Character types for codepoints 0x600 to 0x6ff + const arabicTypes = 'rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr'; + function charType(code) { + if (code <= 0xff) return lowTypes.charAt(code); + else if (code >= 0x590 && code <= 0x5f4) return 'R'; + else if (code >= 0x600 && code <= 0x6ff) return arabicTypes.charAt(code - 0x600); + else if (code >= 0x700 && code <= 0x8ac) return 'r'; + return 'L'; + } + + const bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; + const isNeutral = /[stwN]/; const isStrong = /[LRr]/; const countsAsLeft = /[Lb1n]/; const + countsAsNum = /[1n]/; + + return function charOrdering(str) { + if (!bidiRE.test(str)) return false; + const len = str.length; const types = []; let + startType = null; + for (var i = 0, type; i < len; ++i) { + types.push(type = charType(str.charCodeAt(i))); + if (startType == null) { + if (type == 'L') startType = 'L'; + else if (type == 'R' || type == 'r') startType = 'R'; + } + } + if (startType == null) startType = 'L'; + + // W1. Examine each non-spacing mark (NSM) in the level run, and + // change the type of the NSM to the type of the previous + // character. If the NSM is at the start of the level run, it will + // get the type of sor. + for (var i = 0, prev = startType; i < len; ++i) { + var type = types[i]; + if (type == 'm') types[i] = prev; + else prev = type; + } + + // W2. Search backwards from each instance of a European number + // until the first strong type (R, L, AL, or sor) is found. If an + // AL is found, change the type of the European number to Arabic + // number. + // W3. Change all ALs to R. + for (var i = 0, cur = startType; i < len; ++i) { + var type = types[i]; + if (type == '1' && cur == 'r') types[i] = 'n'; + else if (isStrong.test(type)) { cur = type; if (type == 'r') types[i] = 'R'; } + } + + // W4. A single European separator between two European numbers + // changes to a European number. A single common separator between + // two numbers of the same type changes to that type. + for (var i = 1, prev = types[0]; i < len - 1; ++i) { + var type = types[i]; + if (type == '+' && prev == '1' && types[i + 1] == '1') types[i] = '1'; + else if (type == ',' && prev == types[i + 1] && + (prev == '1' || prev == 'n')) types[i] = prev; + prev = type; + } + + // W5. A sequence of European terminators adjacent to European + // numbers changes to all European numbers. + // W6. Otherwise, separators and terminators change to Other + // Neutral. + for (var i = 0; i < len; ++i) { + var type = types[i]; + if (type == ',') types[i] = 'N'; + else if (type == '%') { + for (var end = i + 1; end < len && types[end] == '%'; ++end) {} + var replace = (i && types[i - 1] == '!') || (end < len - 1 && types[end] == '1') ? '1' : 'N'; + for (var j = i; j < end; ++j) types[j] = replace; + i = end - 1; + } + } + + // W7. Search backwards from each instance of a European number + // until the first strong type (R, L, or sor) is found. If an L is + // found, then change the type of the European number to L. + for (var i = 0, cur = startType; i < len; ++i) { + var type = types[i]; + if (cur == 'L' && type == '1') types[i] = 'L'; + else if (isStrong.test(type)) cur = type; + } + + // N1. A sequence of neutrals takes the direction of the + // surrounding strong text if the text on both sides has the same + // direction. European and Arabic numbers act as if they were R in + // terms of their influence on neutrals. Start-of-level-run (sor) + // and end-of-level-run (eor) are used at level run boundaries. + // N2. Any remaining neutrals take the embedding direction. + for (var i = 0; i < len; ++i) { + if (isNeutral.test(types[i])) { + for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {} + const before = (i ? types[i - 1] : startType) == 'L'; + const after = (end < len - 1 ? types[end] : startType) == 'L'; + var replace = before || after ? 'L' : 'R'; + for (var j = i; j < end; ++j) types[j] = replace; + i = end - 1; + } + } + + // Here we depart from the documented algorithm, in order to avoid + // building up an actual levels array. Since there are only three + // levels (0, 1, 2) in an implementation that doesn't take + // explicit embedding into account, we can build up the order on + // the fly, without following the level-based algorithm. + const order = []; let + m; + for (var i = 0; i < len;) { + if (countsAsLeft.test(types[i])) { + const start = i; + for (++i; i < len && countsAsLeft.test(types[i]); ++i) {} + order.push({ from: start, to: i, level: 0 }); + } else { + let pos = i; const + at = order.length; + for (++i; i < len && types[i] != 'L'; ++i) {} + for (var j = pos; j < i;) { + if (countsAsNum.test(types[j])) { + if (pos < j) order.splice(at, 0, { from: pos, to: j, level: 1 }); + const nstart = j; + for (++j; j < i && countsAsNum.test(types[j]); ++j) {} + order.splice(at, 0, { from: nstart, to: j, level: 2 }); + pos = j; + } else ++j; + } + if (pos < i) order.splice(at, 0, { from: pos, to: i, level: 1 }); + } + } + if (order[0].level == 1 && (m = str.match(/^\s+/))) { + order[0].from = m[0].length; + order.unshift({ from: 0, to: m[0].length, level: 0 }); + } + if (lst(order).level == 1 && (m = str.match(/\s+$/))) { + lst(order).to -= m[0].length; + order.push({ from: len - m[0].length, to: len, level: 0 }); + } + if (order[0].level != lst(order).level) order.push({ from: len, to: len, level: order[0].level }); + + return order; + }; + }()); + + // THE END + + CodeMirror.version = '3.0'; + + return CodeMirror; +}()); diff --git a/report/assets/scripts/vendor/codemirror/javascript.js b/report/assets/scripts/vendor/codemirror/javascript.js new file mode 100644 index 00000000..8e994e25 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/javascript.js @@ -0,0 +1,421 @@ +// TODO actually recognize syntax of TypeScript constructs + +CodeMirror.defineMode('javascript', (config, parserConfig) => { + const { indentUnit } = config; + const jsonMode = parserConfig.json; + const isTS = parserConfig.typescript; + + // Tokenizer + + const keywords = (function () { + function kw(type) { return { type: type, style: 'keyword' }; } + const A = kw('keyword a'); const B = kw('keyword b'); const + C = kw('keyword c'); + const operator = kw('operator'); const + atom = { type: 'atom', style: 'atom' }; + + const jsKeywords = { + if: A, + while: A, + with: A, + else: B, + do: B, + try: B, + finally: B, + return: C, + break: C, + continue: C, + new: C, + delete: C, + throw: C, + var: kw('var'), + const: kw('var'), + let: kw('var'), + function: kw('function'), + catch: kw('catch'), + for: kw('for'), + switch: kw('switch'), + case: kw('case'), + default: kw('default'), + in: operator, + typeof: operator, + instanceof: operator, + true: atom, + false: atom, + null: atom, + undefined: atom, + NaN: atom, + Infinity: atom, + }; + + // Extend the 'normal' keywords with the TypeScript language extensions + if (isTS) { + const type = { type: 'variable', style: 'variable-3' }; + const tsKeywords = { + // object-like things + interface: kw('interface'), + class: kw('class'), + extends: kw('extends'), + constructor: kw('constructor'), + + // scope modifiers + public: kw('public'), + private: kw('private'), + protected: kw('protected'), + static: kw('static'), + + super: kw('super'), + + // types + string: type, + number: type, + bool: type, + any: type, + }; + + for (const attr in tsKeywords) { + jsKeywords[attr] = tsKeywords[attr]; + } + } + + return jsKeywords; + }()); + + const isOperatorChar = /[+\-*&%=<>!?|]/; + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + function nextUntilUnescaped(stream, end) { + let escaped = false; let + next; + while ((next = stream.next()) != null) { + if (next == end && !escaped) return false; + escaped = !escaped && next == '\\'; + } + return escaped; + } + + // Used as scratch variables to communicate multiple values without + // consing up tons of objects. + let type; let + content; + function ret(tp, style, cont) { + type = tp; content = cont; + return style; + } + + function jsTokenBase(stream, state) { + const ch = stream.next(); + if (ch == '"' || ch == "'") return chain(stream, state, jsTokenString(ch)); + else if (/[\[\]{}\(\),;\:\.]/.test(ch)) return ret(ch); + else if (ch == '0' && stream.eat(/x/i)) { + stream.eatWhile(/[\da-f]/i); + return ret('number', 'number'); + } else if (/\d/.test(ch) || ch == '-' && stream.eat(/\d/)) { + stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/); + return ret('number', 'number'); + } else if (ch == '/') { + if (stream.eat('*')) { + return chain(stream, state, jsTokenComment); + } else if (stream.eat('/')) { + stream.skipToEnd(); + return ret('comment', 'comment'); + } else if (state.lastType == 'operator' || state.lastType == 'keyword c' || + /^[\[{}\(,;:]$/.test(state.lastType)) { + nextUntilUnescaped(stream, '/'); + stream.eatWhile(/[gimy]/); // 'y' is "sticky" option in Mozilla + return ret('regexp', 'string-2'); + } + stream.eatWhile(isOperatorChar); + return ret('operator', null, stream.current()); + } else if (ch == '#') { + stream.skipToEnd(); + return ret('error', 'error'); + } else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return ret('operator', null, stream.current()); + } + stream.eatWhile(/[\w\$_]/); + const word = stream.current(); const + known = keywords.propertyIsEnumerable(word) && keywords[word]; + return (known && state.lastType != '.') ? ret(known.type, known.style, word) : + ret('variable', 'variable', word); + } + + function jsTokenString(quote) { + return function (stream, state) { + if (!nextUntilUnescaped(stream, quote)) state.tokenize = jsTokenBase; + return ret('string', 'string'); + }; + } + + function jsTokenComment(stream, state) { + let maybeEnd = false; let + ch; + while (ch = stream.next()) { + if (ch == '/' && maybeEnd) { + state.tokenize = jsTokenBase; + break; + } + maybeEnd = (ch == '*'); + } + return ret('comment', 'comment'); + } + + // Parser + + const atomicTypes = { atom: true, number: true, variable: true, string: true, regexp: true }; + + function JSLexical(indented, column, type, align, prev, info) { + this.indented = indented; + this.column = column; + this.type = type; + this.prev = prev; + this.info = info; + if (align != null) this.align = align; + } + + function inScope(state, varname) { + for (let v = state.localVars; v; v = v.next) if (v.name == varname) return true; + } + + function parseJS(state, style, type, content, stream) { + const { cc } = state; + // Communicate our context to the combinators. + // (Less wasteful than consing up a hundred closures on every call.) + cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; + + if (!state.lexical.hasOwnProperty('align')) state.lexical.align = true; + + while (true) { + const combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; + if (combinator(type, content)) { + while (cc.length && cc[cc.length - 1].lex) cc.pop()(); + if (cx.marked) return cx.marked; + if (type == 'variable' && inScope(state, content)) return 'variable-2'; + return style; + } + } + } + + // Combinator utils + + var cx = { state: null, column: null, marked: null, cc: null }; + function pass() { + for (let i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); + } + function cont() { + pass.apply(null, arguments); + return true; + } + function register(varname) { + const { state } = cx; + if (state.context) { + cx.marked = 'def'; + for (let v = state.localVars; v; v = v.next) if (v.name == varname) return; + state.localVars = { name: varname, next: state.localVars }; + } + } + + // Combinators + + const defaultVars = { name: 'this', next: { name: 'arguments' } }; + function pushcontext() { + cx.state.context = { prev: cx.state.context, vars: cx.state.localVars }; + cx.state.localVars = defaultVars; + } + function popcontext() { + cx.state.localVars = cx.state.context.vars; + cx.state.context = cx.state.context.prev; + } + function pushlex(type, info) { + const result = function () { + const { state } = cx; + state.lexical = new JSLexical(state.indented, cx.stream.column(), type, null, state.lexical, info); + }; + result.lex = true; + return result; + } + function poplex() { + const { state } = cx; + if (state.lexical.prev) { + if (state.lexical.type == ')') state.indented = state.lexical.indented; + state.lexical = state.lexical.prev; + } + } + poplex.lex = true; + + function expect(wanted) { + return function expecting(type) { + if (type == wanted) return cont(); + else if (wanted == ';') return pass(); + return cont(arguments.callee); + }; + } + + function statement(type) { + if (type == 'var') return cont(pushlex('vardef'), vardef1, expect(';'), poplex); + if (type == 'keyword a') return cont(pushlex('form'), expression, statement, poplex); + if (type == 'keyword b') return cont(pushlex('form'), statement, poplex); + if (type == '{') return cont(pushlex('}'), block, poplex); + if (type == ';') return cont(); + if (type == 'function') return cont(functiondef); + if (type == 'for') { return cont(pushlex('form'), expect('('), pushlex(')'), forspec1, expect(')'), poplex, statement, poplex); } + if (type == 'variable') return cont(pushlex('stat'), maybelabel); + if (type == 'switch') { return cont(pushlex('form'), expression, pushlex('}', 'switch'), expect('{'), block, poplex, poplex); } + if (type == 'case') return cont(expression, expect(':')); + if (type == 'default') return cont(expect(':')); + if (type == 'catch') { return cont(pushlex('form'), pushcontext, expect('('), funarg, expect(')'), statement, poplex, popcontext); } + return pass(pushlex('stat'), expression, expect(';'), poplex); + } + function expression(type) { + if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator); + if (type == 'function') return cont(functiondef); + if (type == 'keyword c') return cont(maybeexpression); + if (type == '(') return cont(pushlex(')'), maybeexpression, expect(')'), poplex, maybeoperator); + if (type == 'operator') return cont(expression); + if (type == '[') return cont(pushlex(']'), commasep(expression, ']'), poplex, maybeoperator); + if (type == '{') return cont(pushlex('}'), commasep(objprop, '}'), poplex, maybeoperator); + return cont(); + } + function maybeexpression(type) { + if (type.match(/[;\}\)\],]/)) return pass(); + return pass(expression); + } + + function maybeoperator(type, value) { + if (type == 'operator' && /\+\+|--/.test(value)) return cont(maybeoperator); + if (type == 'operator' && value == '?') return cont(expression, expect(':'), expression); + if (type == ';') return; + if (type == '(') return cont(pushlex(')'), commasep(expression, ')'), poplex, maybeoperator); + if (type == '.') return cont(property, maybeoperator); + if (type == '[') return cont(pushlex(']'), expression, expect(']'), poplex, maybeoperator); + } + function maybelabel(type) { + if (type == ':') return cont(poplex, statement); + return pass(maybeoperator, expect(';'), poplex); + } + function property(type) { + if (type == 'variable') { cx.marked = 'property'; return cont(); } + } + function objprop(type) { + if (type == 'variable') cx.marked = 'property'; + if (atomicTypes.hasOwnProperty(type)) return cont(expect(':'), expression); + } + function commasep(what, end) { + function proceed(type) { + if (type == ',') return cont(what, proceed); + if (type == end) return cont(); + return cont(expect(end)); + } + return function commaSeparated(type) { + if (type == end) return cont(); + return pass(what, proceed); + }; + } + function block(type) { + if (type == '}') return cont(); + return pass(statement, block); + } + function maybetype(type) { + if (type == ':') return cont(typedef); + return pass(); + } + function typedef(type) { + if (type == 'variable') { cx.marked = 'variable-3'; return cont(); } + return pass(); + } + function vardef1(type, value) { + if (type == 'variable') { + register(value); + return isTS ? cont(maybetype, vardef2) : cont(vardef2); + } + return pass(); + } + function vardef2(type, value) { + if (value == '=') return cont(expression, vardef2); + if (type == ',') return cont(vardef1); + } + function forspec1(type) { + if (type == 'var') return cont(vardef1, expect(';'), forspec2); + if (type == ';') return cont(forspec2); + if (type == 'variable') return cont(formaybein); + return cont(forspec2); + } + function formaybein(_type, value) { + if (value == 'in') return cont(expression); + return cont(maybeoperator, forspec2); + } + function forspec2(type, value) { + if (type == ';') return cont(forspec3); + if (value == 'in') return cont(expression); + return cont(expression, expect(';'), forspec3); + } + function forspec3(type) { + if (type != ')') cont(expression); + } + function functiondef(type, value) { + if (type == 'variable') { register(value); return cont(functiondef); } + if (type == '(') return cont(pushlex(')'), pushcontext, commasep(funarg, ')'), poplex, statement, popcontext); + } + function funarg(type, value) { + if (type == 'variable') { register(value); return isTS ? cont(maybetype) : cont(); } + } + + // Interface + + return { + startState: function (basecolumn) { + return { + tokenize: jsTokenBase, + lastType: null, + cc: [], + lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, 'block', false), + localVars: parserConfig.localVars, + context: parserConfig.localVars && { vars: parserConfig.localVars }, + indented: 0, + }; + }, + + token: function (stream, state) { + if (stream.sol()) { + if (!state.lexical.hasOwnProperty('align')) state.lexical.align = false; + state.indented = stream.indentation(); + } + if (stream.eatSpace()) return null; + const style = state.tokenize(stream, state); + if (type == 'comment') return style; + state.lastType = type; + return parseJS(state, style, type, content, stream); + }, + + indent: function (state, textAfter) { + if (state.tokenize == jsTokenComment) return CodeMirror.Pass; + if (state.tokenize != jsTokenBase) return 0; + const firstChar = textAfter && textAfter.charAt(0); let + { lexical } = state; + if (lexical.type == 'stat' && firstChar == '}') lexical = lexical.prev; + const { type } = lexical; + const closing = firstChar == type; + if (type == 'vardef') return lexical.indented + (state.lastType == 'operator' || state.lastType == ',' ? 4 : 0); + else if (type == 'form' && firstChar == '{') return lexical.indented; + else if (type == 'form') return lexical.indented + indentUnit; + else if (type == 'stat') return lexical.indented + (state.lastType == 'operator' || state.lastType == ',' ? indentUnit : 0); + else if (lexical.info == 'switch' && !closing) return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); + else if (lexical.align) return lexical.column + (closing ? 0 : 1); + return lexical.indented + (closing ? 0 : indentUnit); + }, + + electricChars: ':{}', + + jsonMode: jsonMode, + }; +}); + +CodeMirror.defineMIME('text/javascript', 'javascript'); +CodeMirror.defineMIME('application/json', { name: 'javascript', json: true }); +CodeMirror.defineMIME('text/typescript', { name: 'javascript', typescript: true }); +CodeMirror.defineMIME('application/typescript', { name: 'javascript', typescript: true }); diff --git a/report/assets/scripts/vendor/codemirror/util/closetag.js b/report/assets/scripts/vendor/codemirror/util/closetag.js new file mode 100644 index 00000000..a7d1ab53 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/closetag.js @@ -0,0 +1,84 @@ +/** + * Tag-closer extension for CodeMirror. + * + * This extension adds an "autoCloseTags" option that can be set to + * either true to get the default behavior, or an object to further + * configure its behavior. + * + * These are supported options: + * + * `whenClosing` (default true) + * Whether to autoclose when the '/' of a closing tag is typed. + * `whenOpening` (default true) + * Whether to autoclose the tag when the final '>' of an opening + * tag is typed. + * `dontCloseTags` (default is empty tags for HTML, none for XML) + * An array of tag names that should not be autoclosed. + * `indentTags` (default is block tags for HTML, none for XML) + * An array of tag names that should, when opened, cause a + * blank line to be added inside the tag, and the blank line and + * closing line to be indented. + * + * See demos/closetag.html for a usage example. + */ + +(function () { + CodeMirror.defineOption('autoCloseTags', false, (cm, val, old) => { + if (val && (old == CodeMirror.Init || !old)) { + const map = { name: 'autoCloseTags' }; + if (typeof val !== 'object' || val.whenClosing) map["'/'"] = function (cm) { autoCloseTag(cm, '/'); }; + if (typeof val !== 'object' || val.whenOpening) map["'>'"] = function (cm) { autoCloseTag(cm, '>'); }; + cm.addKeyMap(map); + } else if (!val && (old != CodeMirror.Init && old)) { + cm.removeKeyMap('autoCloseTags'); + } + }); + + const htmlDontClose = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', + 'source', 'track', 'wbr']; + const htmlIndent = ['applet', 'blockquote', 'body', 'button', 'div', 'dl', 'fieldset', 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', + 'h5', 'h6', 'head', 'html', 'iframe', 'layer', 'legend', 'object', 'ol', 'p', 'select', 'table', 'ul']; + + function autoCloseTag(cm, ch) { + const pos = cm.getCursor(); const + tok = cm.getTokenAt(pos); + const inner = CodeMirror.innerMode(cm.getMode(), tok.state); const + { state } = inner; + if (inner.mode.name != 'xml') throw CodeMirror.Pass; + + const opt = cm.getOption('autoCloseTags'); const + html = inner.mode.configuration == 'html'; + const dontCloseTags = (typeof opt === 'object' && opt.dontCloseTags) || (html && htmlDontClose); + const indentTags = (typeof opt === 'object' && opt.indentTags) || (html && htmlIndent); + + if (ch == '>' && state.tagName) { + var { tagName } = state; + if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch); + const lowerTagName = tagName.toLowerCase(); + // Don't process the '>' at the end of an end-tag or self-closing tag + if (tok.type == 'tag' && state.type == 'closeTag' || + /\/\s*$/.test(tok.string) || + dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1) throw CodeMirror.Pass; + + const doIndent = indentTags && indexOf(indentTags, lowerTagName) > -1; + cm.replaceSelection(`>${doIndent ? '\n\n' : ''}`, + doIndent ? { line: pos.line + 1, ch: 0 } : { line: pos.line, ch: pos.ch + 1 }); + if (doIndent) { + cm.indentLine(pos.line + 1); + cm.indentLine(pos.line + 2); + } + return; + } else if (ch == '/' && tok.type == 'tag' && tok.string == '<') { + var tagName = state.context && state.context.tagName; + if (tagName) cm.replaceSelection(`/${tagName}>`, 'end'); + return; + } + throw CodeMirror.Pass; + } + + function indexOf(collection, elt) { + if (collection.indexOf) return collection.indexOf(elt); + for (let i = 0, e = collection.length; i < e; ++i) if (collection[i] == elt) return i; + return -1; + } +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/colorize.js b/report/assets/scripts/vendor/codemirror/util/colorize.js new file mode 100644 index 00000000..ce9969b4 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/colorize.js @@ -0,0 +1,28 @@ +CodeMirror.colorize = (function () { + const isBlock = /^(p|li|div|h\\d|pre|blockquote|td)$/; + + function textContent(node, out) { + if (node.nodeType == 3) return out.push(node.nodeValue); + for (let ch = node.firstChild; ch; ch = ch.nextSibling) { + textContent(ch, out); + if (isBlock.test(node.nodeType)) out.push('\n'); + } + } + + return function (collection, defaultMode) { + if (!collection) collection = document.body.getElementsByTagName('pre'); + + for (let i = 0; i < collection.length; ++i) { + const node = collection[i]; + const mode = node.getAttribute('data-lang') || defaultMode; + if (!mode) continue; + + const text = []; + textContent(node, text); + node.innerHTML = ''; + CodeMirror.runMode(text.join(''), mode, node); + + node.className += ' cm-s-default'; + } + }; +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/continuecomment.js b/report/assets/scripts/vendor/codemirror/util/continuecomment.js new file mode 100644 index 00000000..a7df587f --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/continuecomment.js @@ -0,0 +1,39 @@ +(function () { + const modes = ['clike', 'css', 'javascript']; + for (let i = 0; i < modes.length; ++i) { + CodeMirror.extendMode(modes[i], { + blockCommentStart: '/*', + blockCommentEnd: '*/', + blockCommentContinue: ' * ', + }); + } + + CodeMirror.commands.newlineAndIndentContinueComment = function (cm) { + const pos = cm.getCursor(); const + token = cm.getTokenAt(pos); + const { mode } = CodeMirror.innerMode(cm.getMode(), token.state); + let space; + + if (token.type == 'comment' && mode.blockCommentStart) { + const end = token.string.indexOf(mode.blockCommentEnd); + const full = cm.getRange({ line: pos.line, ch: 0 }, { line: pos.line, ch: token.end }); let + found; + if (end != -1 && end == token.string.length - mode.blockCommentEnd.length) { + // Comment ended, don't continue it + } else if (token.string.indexOf(mode.blockCommentStart) == 0) { + space = full.slice(0, token.start); + if (!/^\s*$/.test(space)) { + space = ''; + for (let i = 0; i < token.start; ++i) space += ' '; + } + } else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 && + found + mode.blockCommentContinue.length > token.start && + /^\s*$/.test(full.slice(0, found))) { + space = full.slice(0, found); + } + } + + if (space != null) cm.replaceSelection(`\n${space}${mode.blockCommentContinue}`, 'end'); + else cm.execCommand('newlineAndIndent'); + }; +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/continuelist.js b/report/assets/scripts/vendor/codemirror/util/continuelist.js new file mode 100644 index 00000000..bdc0f352 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/continuelist.js @@ -0,0 +1,26 @@ +(function () { + CodeMirror.commands.newlineAndIndentContinueMarkdownList = function (cm) { + const pos = cm.getCursor(); const + token = cm.getTokenAt(pos); + let space; + if (token.className == 'string') { + const full = cm.getRange({ line: pos.line, ch: 0 }, { line: pos.line, ch: token.end }); + const listStart = /\*|\d+\./; var + listContinue; + if (token.string.search(listStart) == 0) { + const reg = /^[\W]*(\d+)\./g; + const matches = reg.exec(full); + if (matches) listContinue = `${parseInt(matches[1]) + 1}. `; + else listContinue = '* '; + space = full.slice(0, token.start); + if (!/^\s*$/.test(space)) { + space = ''; + for (let i = 0; i < token.start; ++i) space += ' '; + } + } + } + + if (space != null) cm.replaceSelection(`\n${space}${listContinue}`, 'end'); + else cm.execCommand('newlineAndIndent'); + }; +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/dialog.css b/report/assets/scripts/vendor/codemirror/util/dialog.css new file mode 100644 index 00000000..2e7c0fc9 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/dialog.css @@ -0,0 +1,32 @@ +.CodeMirror-dialog { + position: absolute; + left: 0; right: 0; + background: white; + z-index: 15; + padding: .1em .8em; + overflow: hidden; + color: #333; +} + +.CodeMirror-dialog-top { + border-bottom: 1px solid #eee; + top: 0; +} + +.CodeMirror-dialog-bottom { + border-top: 1px solid #eee; + bottom: 0; +} + +.CodeMirror-dialog input { + border: none; + outline: none; + background: transparent; + width: 20em; + color: inherit; + font-family: monospace; +} + +.CodeMirror-dialog button { + font-size: 70%; +} diff --git a/report/assets/scripts/vendor/codemirror/util/dialog.js b/report/assets/scripts/vendor/codemirror/util/dialog.js new file mode 100644 index 00000000..71bf747f --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/dialog.js @@ -0,0 +1,78 @@ +// Open simple dialogs on top of an editor. Relies on dialog.css. + +(function () { + function dialogDiv(cm, template, bottom) { + const wrap = cm.getWrapperElement(); + let dialog; + dialog = wrap.appendChild(document.createElement('div')); + if (bottom) { + dialog.className = 'CodeMirror-dialog CodeMirror-dialog-bottom'; + } else { + dialog.className = 'CodeMirror-dialog CodeMirror-dialog-top'; + } + dialog.innerHTML = template; + return dialog; + } + + CodeMirror.defineExtension('openDialog', function (template, callback, options) { + const dialog = dialogDiv(this, template, options && options.bottom); + let closed = false; const + me = this; + function close() { + if (closed) return; + closed = true; + dialog.parentNode.removeChild(dialog); + } + const inp = dialog.getElementsByTagName('input')[0]; let + button; + if (inp) { + CodeMirror.on(inp, 'keydown', (e) => { + if (e.keyCode == 13 || e.keyCode == 27) { + CodeMirror.e_stop(e); + close(); + me.focus(); + if (e.keyCode == 13) callback(inp.value); + } + }); + inp.focus(); + CodeMirror.on(inp, 'blur', close); + } else if (button = dialog.getElementsByTagName('button')[0]) { + CodeMirror.on(button, 'click', () => { + close(); + me.focus(); + }); + button.focus(); + CodeMirror.on(button, 'blur', close); + } + return close; + }); + + CodeMirror.defineExtension('openConfirm', function (template, callbacks, options) { + const dialog = dialogDiv(this, template, options && options.bottom); + const buttons = dialog.getElementsByTagName('button'); + let closed = false; const me = this; let + blurring = 1; + function close() { + if (closed) return; + closed = true; + dialog.parentNode.removeChild(dialog); + me.focus(); + } + buttons[0].focus(); + for (let i = 0; i < buttons.length; ++i) { + var b = buttons[i]; + (function (callback) { + CodeMirror.on(b, 'click', (e) => { + CodeMirror.e_preventDefault(e); + close(); + if (callback) callback(me); + }); + }(callbacks[i])); + CodeMirror.on(b, 'blur', () => { + --blurring; + setTimeout(() => { if (blurring <= 0) close(); }, 200); + }); + CodeMirror.on(b, 'focus', () => { ++blurring; }); + } + }); +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/foldcode.js b/report/assets/scripts/vendor/codemirror/util/foldcode.js new file mode 100644 index 00000000..8c559265 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/foldcode.js @@ -0,0 +1,190 @@ +// the tagRangeFinder function is +// Copyright (C) 2011 by Daniel Glazman +// released under the MIT license (../../LICENSE) like the rest of CodeMirror +CodeMirror.tagRangeFinder = function (cm, start) { + const nameStartChar = 'A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + const nameChar = `${nameStartChar}\-\:\.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040`; + const xmlNAMERegExp = new RegExp(`^[${nameStartChar}][${nameChar}]*`); + + let lineText = cm.getLine(start.line); + let found = false; + let tag = null; + let pos = start.ch; + while (!found) { + pos = lineText.indexOf('<', pos); + if (pos == -1) // no tag on line + { return; } + if (pos + 1 < lineText.length && lineText[pos + 1] == '/') { // closing tag + pos++; + continue; + } + // ok we seem to have a start tag + if (!lineText.substr(pos + 1).match(xmlNAMERegExp)) { // not a tag name... + pos++; + continue; + } + var gtPos = lineText.indexOf('>', pos + 1); + if (gtPos == -1) { // end of start tag not in line + var l = start.line + 1; + let foundGt = false; + var lastLine = cm.lineCount(); + while (l < lastLine && !foundGt) { + const lt = cm.getLine(l); + gtPos = lt.indexOf('>'); + if (gtPos != -1) { // found a > + foundGt = true; + const slash = lt.lastIndexOf('/', gtPos); + if (slash != -1 && slash < gtPos) { + var str = lineText.substr(slash, gtPos - slash + 1); + if (!str.match(/\/\s*\>/)) // yep, that's the end of empty tag + { return; } + } + } + l++; + } + found = true; + } else { + const slashPos = lineText.lastIndexOf('/', gtPos); + if (slashPos == -1) { // cannot be empty tag + found = true; + // don't continue + } else { // empty tag? + // check if really empty tag + var str = lineText.substr(slashPos, gtPos - slashPos + 1); + if (!str.match(/\/\s*\>/)) { // finally not empty + found = true; + // don't continue + } + } + } + if (found) { + const subLine = lineText.substr(pos + 1); + tag = subLine.match(xmlNAMERegExp); + if (tag) { + // we have an element name, wooohooo ! + tag = tag[0]; + // do we have the close tag on same line ??? + if (lineText.indexOf(``, pos) != -1) // yep + { + found = false; + } + // we don't, so we have a candidate... + } else found = false; + } + if (!found) pos++; + } + + if (found) { + const startTag = `(\\<\\/${tag}\\>)|(\\<${tag}\\>)|(\\<${tag}\\s)|(\\<${tag}$)`; + const startTagRegExp = new RegExp(startTag); + const endTag = ``; + let depth = 1; + var l = start.line + 1; + var lastLine = cm.lineCount(); + while (l < lastLine) { + lineText = cm.getLine(l); + const match = lineText.match(startTagRegExp); + if (match) { + for (let i = 0; i < match.length; i++) { + if (match[i] == endTag) depth--; + else depth++; + if (!depth) { + return { + from: { line: start.line, ch: gtPos + 1 }, + to: { line: l, ch: match.index }, + }; + } + } + } + l++; + } + } +}; + +CodeMirror.braceRangeFinder = function (cm, start) { + const { line } = start; + const lineText = cm.getLine(line); + let at = lineText.length; let startChar; let + tokenType; + for (;;) { + const found = lineText.lastIndexOf('{', at); + if (found < start.ch) break; + tokenType = cm.getTokenAt({ line: line, ch: found }).type; + if (!/^(comment|string)/.test(tokenType)) { startChar = found; break; } + at = found - 1; + } + if (startChar == null || lineText.lastIndexOf('}') > startChar) return; + let count = 1; const lastLine = cm.lineCount(); let end; let + endCh; + outer: for (let i = line + 1; i < lastLine; ++i) { + const text = cm.getLine(i); let + pos = 0; + for (;;) { + let nextOpen = text.indexOf('{', pos); let + nextClose = text.indexOf('}', pos); + if (nextOpen < 0) nextOpen = text.length; + if (nextClose < 0) nextClose = text.length; + pos = Math.min(nextOpen, nextClose); + if (pos == text.length) break; + if (cm.getTokenAt({ line: i, ch: pos + 1 }).type == tokenType) { + if (pos == nextOpen) ++count; + else if (!--count) { end = i; endCh = pos; break outer; } + } + ++pos; + } + } + if (end == null || end == line + 1) return; + return { + from: { line: line, ch: startChar + 1 }, + to: { line: end, ch: endCh }, + }; +}; + +CodeMirror.indentRangeFinder = function (cm, start) { + const tabSize = cm.getOption('tabSize'); const + firstLine = cm.getLine(start.line); + const myIndent = CodeMirror.countColumn(firstLine, null, tabSize); + for (let i = start.line + 1, end = cm.lineCount(); i < end; ++i) { + const curLine = cm.getLine(i); + if (CodeMirror.countColumn(curLine, null, tabSize) < myIndent) { + return { + from: { line: start.line, ch: firstLine.length }, + to: { line: i, ch: curLine.length }, + }; + } + } +}; + +CodeMirror.newFoldFunction = function (rangeFinder, widget) { + if (widget == null) widget = '\u2194'; + if (typeof widget === 'string') { + const text = document.createTextNode(widget); + widget = document.createElement('span'); + widget.appendChild(text); + widget.className = 'CodeMirror-foldmarker'; + } + + return function (cm, pos) { + if (typeof pos === 'number') pos = { line: pos, ch: 0 }; + const range = rangeFinder(cm, pos); + if (!range) return; + + const present = cm.findMarksAt(range.from); let + cleared = 0; + for (let i = 0; i < present.length; ++i) { + if (present[i].__isFold) { + ++cleared; + present[i].clear(); + } + } + if (cleared) return; + + const myWidget = widget.cloneNode(true); + CodeMirror.on(myWidget, 'mousedown', () => { myRange.clear(); }); + var myRange = cm.markText(range.from, range.to, { + replacedWith: myWidget, + clearOnEnter: true, + __isFold: true, + }); + }; +}; diff --git a/report/assets/scripts/vendor/codemirror/util/formatting.js b/report/assets/scripts/vendor/codemirror/util/formatting.js new file mode 100644 index 00000000..0b2595d6 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/formatting.js @@ -0,0 +1,109 @@ +(function () { + CodeMirror.extendMode('css', { + commentStart: '/*', + commentEnd: '*/', + newlineAfterToken: function (_type, content) { + return /^[;{}]$/.test(content); + }, + }); + + CodeMirror.extendMode('javascript', { + commentStart: '/*', + commentEnd: '*/', + // FIXME semicolons inside of for + newlineAfterToken: function (_type, content, textAfter, state) { + if (this.jsonMode) { + return /^[\[,{]$/.test(content) || /^}/.test(textAfter); + } + if (content == ';' && state.lexical && state.lexical.type == ')') return false; + return /^[;{}]$/.test(content) && !/^;/.test(textAfter); + }, + }); + + CodeMirror.extendMode('xml', { + commentStart: '', + newlineAfterToken: function (type, content, textAfter) { + return type == 'tag' && />$/.test(content) || /^ { + if (isComment) { // Comment range + cm.replaceRange(curMode.commentEnd, to); + cm.replaceRange(curMode.commentStart, from); + if (from.line == to.line && from.ch == to.ch) // An empty comment inserted - put cursor inside + { cm.setCursor(from.line, from.ch + curMode.commentStart.length); } + } else { // Uncomment range + let selText = cm.getRange(from, to); + const startIndex = selText.indexOf(curMode.commentStart); + const endIndex = selText.lastIndexOf(curMode.commentEnd); + if (startIndex > -1 && endIndex > -1 && endIndex > startIndex) { + // Take string till comment start + selText = selText.substr(0, startIndex) + + // From comment start till comment end + selText.substring(startIndex + curMode.commentStart.length, endIndex) + + // From comment end till string end + selText.substr(endIndex + curMode.commentEnd.length); + } + cm.replaceRange(selText, from, to); + } + }); + }); + + // Applies automatic mode-aware indentation to the specified range + CodeMirror.defineExtension('autoIndentRange', function (from, to) { + const cmInstance = this; + this.operation(() => { + for (let i = from.line; i <= to.line; i++) { + cmInstance.indentLine(i, 'smart'); + } + }); + }); + + // Applies automatic formatting to the specified range + CodeMirror.defineExtension('autoFormatRange', function (from, to) { + const cm = this; + const outer = cm.getMode(); const + text = cm.getRange(from, to).split('\n'); + const state = CodeMirror.copyState(outer, cm.getTokenAt(from).state); + const tabSize = cm.getOption('tabSize'); + + let out = ''; + let lines = 0; + let atSol = from.ch == 0; + function newline() { + out += '\n'; + atSol = true; + ++lines; + } + + for (let i = 0; i < text.length; ++i) { + const stream = new CodeMirror.StringStream(text[i], tabSize); + while (!stream.eol()) { + const inner = CodeMirror.innerMode(outer, state); + const style = outer.token(stream, state); const + cur = stream.current(); + stream.start = stream.pos; + if (!atSol || /\S/.test(cur)) { + out += cur; + atSol = false; + } + if (!atSol && inner.mode.newlineAfterToken && + inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos) || text[i + 1] || '', inner.state)) newline(); + } + if (!stream.pos && outer.blankLine) outer.blankLine(state); + if (!atSol) newline(); + } + + cm.operation(() => { + cm.replaceRange(out, from, to); + for (let cur = from.line + 1, end = from.line + lines; cur <= end; ++cur) cm.indentLine(cur, 'smart'); + cm.setSelection(from, cm.getCursor(false)); + }); + }); +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/javascript-hint.js b/report/assets/scripts/vendor/codemirror/util/javascript-hint.js new file mode 100644 index 00000000..14f96223 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/javascript-hint.js @@ -0,0 +1,138 @@ +(function () { + function forEach(arr, f) { + for (let i = 0, e = arr.length; i < e; ++i) f(arr[i]); + } + + function arrayContains(arr, item) { + if (!Array.prototype.indexOf) { + let i = arr.length; + while (i--) { + if (arr[i] === item) { + return true; + } + } + return false; + } + return arr.indexOf(item) != -1; + } + + function scriptHint(editor, keywords, getToken, options) { + // Find the token at the cursor + const cur = editor.getCursor(); let token = getToken(editor, cur); let + tprop = token; + // If it's not a 'word-style' token, ignore the token. + if (!/^[\w$_]*$/.test(token.string)) { + token = tprop = { + start: cur.ch, + end: cur.ch, + string: '', + state: token.state, + type: token.string == '.' ? 'property' : null, + }; + } + // If it is a property, find out what it is a property of. + while (tprop.type == 'property') { + tprop = getToken(editor, { line: cur.line, ch: tprop.start }); + if (tprop.string != '.') return; + tprop = getToken(editor, { line: cur.line, ch: tprop.start }); + if (tprop.string == ')') { + let level = 1; + do { + tprop = getToken(editor, { line: cur.line, ch: tprop.start }); + switch (tprop.string) { + case ')': level++; break; + case '(': level--; break; + default: break; + } + } while (level > 0); + tprop = getToken(editor, { line: cur.line, ch: tprop.start }); + if (tprop.type == 'variable') tprop.type = 'function'; + else return; // no clue + } + if (!context) var context = []; + context.push(tprop); + } + return { + list: getCompletions(token, context, keywords, options), + from: { line: cur.line, ch: token.start }, + to: { line: cur.line, ch: token.end }, + }; + } + + CodeMirror.javascriptHint = function (editor, options) { + return scriptHint(editor, javascriptKeywords, (e, cur) => e.getTokenAt(cur), options); + }; + + function getCoffeeScriptToken(editor, cur) { + // This getToken, it is for coffeescript, imitates the behavior of + // getTokenAt method in javascript.js, that is, returning "property" + // type and treat "." as indepenent token. + const token = editor.getTokenAt(cur); + if (cur.ch == token.start + 1 && token.string.charAt(0) == '.') { + token.end = token.start; + token.string = '.'; + token.type = 'property'; + } else if (/^\.[\w$_]*$/.test(token.string)) { + token.type = 'property'; + token.start++; + token.string = token.string.replace(/\./, ''); + } + return token; + } + + CodeMirror.coffeescriptHint = function (editor, options) { + return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options); + }; + + const stringProps = ('charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight ' + + 'toUpperCase toLowerCase split concat match replace search').split(' '); + const arrayProps = ('length concat join splice push pop shift unshift slice reverse sort indexOf ' + + 'lastIndexOf every some filter forEach map reduce reduceRight ').split(' '); + const funcProps = 'prototype apply call bind'.split(' '); + var javascriptKeywords = ('break case catch continue debugger default delete do else false finally for function ' + + 'if in instanceof new null return switch throw true try typeof var void while with').split(' '); + var coffeescriptKeywords = ('and break catch class continue delete do else extends false finally for ' + + 'if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes').split(' '); + + function getCompletions(token, context, keywords, options) { + const found = []; const + start = token.string; + function maybeAdd(str) { + if (str.indexOf(start) == 0 && !arrayContains(found, str)) found.push(str); + } + function gatherCompletions(obj) { + if (typeof obj === 'string') forEach(stringProps, maybeAdd); + else if (obj instanceof Array) forEach(arrayProps, maybeAdd); + else if (obj instanceof Function) forEach(funcProps, maybeAdd); + for (const name in obj) maybeAdd(name); + } + + if (context) { + // If this is a property, see if it belongs to some object we can + // find in the current environment. + const obj = context.pop(); let + base; + if (obj.type == 'variable') { + if (options && options.additionalContext) base = options.additionalContext[obj.string]; + base = base || window[obj.string]; + } else if (obj.type == 'string') { + base = ''; + } else if (obj.type == 'atom') { + base = 1; + } else if (obj.type == 'function') { + if (window.jQuery != null && (obj.string == '$' || obj.string == 'jQuery') && + (typeof window.jQuery === 'function')) base = window.jQuery(); + else if (window._ != null && (obj.string == '_') && (typeof window._ === 'function')) base = window._(); + } + while (base != null && context.length) base = base[context.pop().string]; + if (base != null) gatherCompletions(base); + } else { + // If not, just look in the window object and any local scope + // (reading into JS mode internals to get at the local variables) + for (let v = token.state.localVars; v; v = v.next) maybeAdd(v.name); + gatherCompletions(window); + forEach(keywords, maybeAdd); + } + return found; + } +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/loadmode.js b/report/assets/scripts/vendor/codemirror/util/loadmode.js new file mode 100644 index 00000000..65d16a8e --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/loadmode.js @@ -0,0 +1,51 @@ +(function () { + if (!CodeMirror.modeURL) CodeMirror.modeURL = '../mode/%N/%N.js'; + + const loading = {}; + function splitCallback(cont, n) { + let countDown = n; + return function () { if (--countDown == 0) cont(); }; + } + function ensureDeps(mode, cont) { + const deps = CodeMirror.modes[mode].dependencies; + if (!deps) return cont(); + const missing = []; + for (var i = 0; i < deps.length; ++i) { + if (!CodeMirror.modes.hasOwnProperty(deps[i])) missing.push(deps[i]); + } + if (!missing.length) return cont(); + const split = splitCallback(cont, missing.length); + for (var i = 0; i < missing.length; ++i) CodeMirror.requireMode(missing[i], split); + } + + CodeMirror.requireMode = function (mode, cont) { + if (typeof mode !== 'string') mode = mode.name; + if (CodeMirror.modes.hasOwnProperty(mode)) return ensureDeps(mode, cont); + if (loading.hasOwnProperty(mode)) return loading[mode].push(cont); + + const script = document.createElement('script'); + script.src = CodeMirror.modeURL.replace(/%N/g, mode); + const others = document.getElementsByTagName('script')[0]; + others.parentNode.insertBefore(script, others); + const list = loading[mode] = [cont]; + let count = 0; var + poll = setInterval(() => { + if (++count > 100) return clearInterval(poll); + if (CodeMirror.modes.hasOwnProperty(mode)) { + clearInterval(poll); + loading[mode] = null; + ensureDeps(mode, () => { + for (let i = 0; i < list.length; ++i) list[i](); + }); + } + }, 200); + }; + + CodeMirror.autoLoadMode = function (instance, mode) { + if (!CodeMirror.modes.hasOwnProperty(mode)) { + CodeMirror.requireMode(mode, () => { + instance.setOption('mode', instance.getOption('mode')); + }); + } + }; +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/match-highlighter.js b/report/assets/scripts/vendor/codemirror/util/match-highlighter.js new file mode 100644 index 00000000..9e01bbab --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/match-highlighter.js @@ -0,0 +1,43 @@ +// Define match-highlighter commands. Depends on searchcursor.js +// Use by attaching the following function call to the cursorActivity event: +// myCodeMirror.matchHighlight(minChars); +// And including a special span.CodeMirror-matchhighlight css class (also optionally a separate one for .CodeMirror-focused -- see demo matchhighlighter.html) + +(function () { + const DEFAULT_MIN_CHARS = 2; + + function MatchHighlightState() { + this.marked = []; + } + function getMatchHighlightState(cm) { + return cm._matchHighlightState || (cm._matchHighlightState = new MatchHighlightState()); + } + + function clearMarks(cm) { + const state = getMatchHighlightState(cm); + for (let i = 0; i < state.marked.length; ++i) state.marked[i].clear(); + state.marked = []; + } + + function markDocument(cm, className, minChars) { + clearMarks(cm); + minChars = (typeof minChars !== 'undefined' ? minChars : DEFAULT_MIN_CHARS); + if (cm.somethingSelected() && cm.getSelection().replace(/^\s+|\s+$/g, '').length >= minChars) { + const state = getMatchHighlightState(cm); + const query = cm.getSelection(); + cm.operation(() => { + if (cm.lineCount() < 2000) { // This is too expensive on big documents. + for (let cursor = cm.getSearchCursor(query); cursor.findNext();) { + // Only apply matchhighlight to the matches other than the one actually selected + if (cursor.from().line !== cm.getCursor(true).line || + cursor.from().ch !== cm.getCursor(true).ch) state.marked.push(cm.markText(cursor.from(), cursor.to(), { className: className })); + } + } + }); + } + } + + CodeMirror.defineExtension('matchHighlight', function (className, minChars) { + markDocument(this, className, minChars); + }); +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/matchbrackets.js b/report/assets/scripts/vendor/codemirror/util/matchbrackets.js new file mode 100644 index 00000000..4dcc58be --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/matchbrackets.js @@ -0,0 +1,65 @@ +(function () { + const matching = { '(': ')>', ')': '(<', '[': ']>', ']': '[<', '{': '}>', '}': '{<' }; + function findMatchingBracket(cm) { + const cur = cm.getCursor(); const line = cm.getLineHandle(cur.line); let + pos = cur.ch - 1; + const match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)]; + if (!match) return null; + const forward = match.charAt(1) == '>'; + const d = forward ? 1 : -1; + const style = cm.getTokenAt({ line: cur.line, ch: pos + 1 }).type; + + const stack = [line.text.charAt(pos)]; const + re = /[(){}[\]]/; + function scan(line, lineNo, start) { + if (!line.text) return; + let pos = forward ? 0 : line.text.length - 1; const + end = forward ? line.text.length : -1; + if (start != null) pos = start + d; + for (; pos != end; pos += d) { + const ch = line.text.charAt(pos); + if (re.test(ch) && cm.getTokenAt({ line: lineNo, ch: pos + 1 }).type == style) { + const match = matching[ch]; + if (match.charAt(1) == '>' == forward) stack.push(ch); + else if (stack.pop() != match.charAt(0)) return { pos: pos, match: false }; + else if (!stack.length) return { pos: pos, match: true }; + } + } + } + for (var i = cur.line, found, e = forward ? Math.min(i + 100, cm.lineCount()) : Math.max(-1, i - 100); i != e; i += d) { + if (i == cur.line) found = scan(line, i, pos); + else found = scan(cm.getLineHandle(i), i); + if (found) break; + } + return { from: { line: cur.line, ch: pos }, to: found && { line: i, ch: found.pos }, match: found && found.match }; + } + + function matchBrackets(cm, autoclear) { + const found = findMatchingBracket(cm); + if (!found) return; + const style = found.match ? 'CodeMirror-matchingbracket' : 'CodeMirror-nonmatchingbracket'; + const one = cm.markText(found.from, { line: found.from.line, ch: found.from.ch + 1 }, { className: style }); + const two = found.to && cm.markText(found.to, { line: found.to.line, ch: found.to.ch + 1 }, { className: style }); + const clear = function () { + cm.operation(() => { one.clear(); two && two.clear(); }); + }; + if (autoclear) setTimeout(clear, 800); + else return clear; + } + + let currentlyHighlighted = null; + function doMatchBrackets(cm) { + cm.operation(() => { + if (currentlyHighlighted) { currentlyHighlighted(); currentlyHighlighted = null; } + if (!cm.somethingSelected()) currentlyHighlighted = matchBrackets(cm, false); + }); + } + + CodeMirror.defineOption('matchBrackets', false, (cm, val) => { + if (val) cm.on('cursorActivity', doMatchBrackets); + else cm.off('cursorActivity', doMatchBrackets); + }); + + CodeMirror.defineExtension('matchBrackets', function () { matchBrackets(this, true); }); + CodeMirror.defineExtension('findMatchingBracket', function () { return findMatchingBracket(this); }); +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/multiplex.js b/report/assets/scripts/vendor/codemirror/util/multiplex.js new file mode 100644 index 00000000..26ce15ed --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/multiplex.js @@ -0,0 +1,97 @@ +CodeMirror.multiplexingMode = function (outer /* , others */) { + // Others should be {open, close, mode [, delimStyle]} objects + const others = Array.prototype.slice.call(arguments, 1); + const n_others = others.length; + + function indexOf(string, pattern, from) { + if (typeof pattern === 'string') return string.indexOf(pattern, from); + const m = pattern.exec(from ? string.slice(from) : string); + return m ? m.index + from : -1; + } + + return { + startState: function () { + return { + outer: CodeMirror.startState(outer), + innerActive: null, + inner: null, + }; + }, + + copyState: function (state) { + return { + outer: CodeMirror.copyState(outer, state.outer), + innerActive: state.innerActive, + inner: state.innerActive && CodeMirror.copyState(state.innerActive.mode, state.inner), + }; + }, + + token: function (stream, state) { + if (!state.innerActive) { + let cutOff = Infinity; var + oldContent = stream.string; + for (let i = 0; i < n_others; ++i) { + const other = others[i]; + var found = indexOf(oldContent, other.open, stream.pos); + if (found == stream.pos) { + stream.match(other.open); + state.innerActive = other; + state.inner = CodeMirror.startState(other.mode, outer.indent ? outer.indent(state.outer, '') : 0); + return other.delimStyle; + } else if (found != -1 && found < cutOff) { + cutOff = found; + } + } + if (cutOff != Infinity) stream.string = oldContent.slice(0, cutOff); + const outerToken = outer.token(stream, state.outer); + if (cutOff != Infinity) stream.string = oldContent; + return outerToken; + } + const curInner = state.innerActive; var + oldContent = stream.string; + var found = indexOf(oldContent, curInner.close, stream.pos); + if (found == stream.pos) { + stream.match(curInner.close); + state.innerActive = state.inner = null; + return curInner.delimStyle; + } + if (found > -1) stream.string = oldContent.slice(0, found); + const innerToken = curInner.mode.token(stream, state.inner); + if (found > -1) stream.string = oldContent; + const cur = stream.current(); var + found = cur.indexOf(curInner.close); + if (found > -1) stream.backUp(cur.length - found); + return innerToken; + }, + + indent: function (state, textAfter) { + const mode = state.innerActive ? state.innerActive.mode : outer; + if (!mode.indent) return CodeMirror.Pass; + return mode.indent(state.innerActive ? state.inner : state.outer, textAfter); + }, + + blankLine: function (state) { + const mode = state.innerActive ? state.innerActive.mode : outer; + if (mode.blankLine) { + mode.blankLine(state.innerActive ? state.inner : state.outer); + } + if (!state.innerActive) { + for (let i = 0; i < n_others; ++i) { + const other = others[i]; + if (other.open === '\n') { + state.innerActive = other; + state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, '') : 0); + } + } + } else if (mode.close === '\n') { + state.innerActive = state.inner = null; + } + }, + + electricChars: outer.electricChars, + + innerMode: function (state) { + return state.inner ? { state: state.inner, mode: state.innerActive.mode } : { state: state.outer, mode: outer }; + }, + }; +}; diff --git a/report/assets/scripts/vendor/codemirror/util/overlay.js b/report/assets/scripts/vendor/codemirror/util/overlay.js new file mode 100644 index 00000000..96354836 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/overlay.js @@ -0,0 +1,63 @@ +// Utility function that allows modes to be combined. The mode given +// as the base argument takes care of most of the normal mode +// functionality, but a second (typically simple) mode is used, which +// can override the style of text. Both modes get to parse all of the +// text, but when both assign a non-null style to a piece of code, the +// overlay wins, unless the combine argument was true, in which case +// the styles are combined. + +// overlayParser is the old, deprecated name +CodeMirror.overlayMode = CodeMirror.overlayParser = function (base, overlay, combine) { + return { + startState: function () { + return { + base: CodeMirror.startState(base), + overlay: CodeMirror.startState(overlay), + basePos: 0, + baseCur: null, + overlayPos: 0, + overlayCur: null, + }; + }, + copyState: function (state) { + return { + base: CodeMirror.copyState(base, state.base), + overlay: CodeMirror.copyState(overlay, state.overlay), + basePos: state.basePos, + baseCur: null, + overlayPos: state.overlayPos, + overlayCur: null, + }; + }, + + token: function (stream, state) { + if (stream.start == state.basePos) { + state.baseCur = base.token(stream, state.base); + state.basePos = stream.pos; + } + if (stream.start == state.overlayPos) { + stream.pos = stream.start; + state.overlayCur = overlay.token(stream, state.overlay); + state.overlayPos = stream.pos; + } + stream.pos = Math.min(state.basePos, state.overlayPos); + if (stream.eol()) state.basePos = state.overlayPos = 0; + + if (state.overlayCur == null) return state.baseCur; + if (state.baseCur != null && combine) return `${state.baseCur} ${state.overlayCur}`; + return state.overlayCur; + }, + + indent: base.indent && function (state, textAfter) { + return base.indent(state.base, textAfter); + }, + electricChars: base.electricChars, + + innerMode: function (state) { return { state: state.base, mode: base }; }, + + blankLine: function (state) { + if (base.blankLine) base.blankLine(state.base); + if (overlay.blankLine) overlay.blankLine(state.overlay); + }, + }; +}; diff --git a/report/assets/scripts/vendor/codemirror/util/pig-hint.js b/report/assets/scripts/vendor/codemirror/util/pig-hint.js new file mode 100644 index 00000000..1d8d1e9b --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/pig-hint.js @@ -0,0 +1,123 @@ +(function () { + function forEach(arr, f) { + for (let i = 0, e = arr.length; i < e; ++i) f(arr[i]); + } + + function arrayContains(arr, item) { + if (!Array.prototype.indexOf) { + let i = arr.length; + while (i--) { + if (arr[i] === item) { + return true; + } + } + return false; + } + return arr.indexOf(item) != -1; + } + + function scriptHint(editor, _keywords, getToken) { + // Find the token at the cursor + const cur = editor.getCursor(); let token = getToken(editor, cur); let + tprop = token; + // If it's not a 'word-style' token, ignore the token. + + if (!/^[\w$_]*$/.test(token.string)) { + token = tprop = { + start: cur.ch, + end: cur.ch, + string: '', + state: token.state, + className: token.string == ':' ? 'pig-type' : null, + }; + } + + if (!context) var context = []; + context.push(tprop); + + let completionList = getCompletions(token, context); + completionList = completionList.sort(); + // prevent autocomplete for last word, instead show dropdown with one word + if (completionList.length == 1) { + completionList.push(' '); + } + + return { + list: completionList, + from: { line: cur.line, ch: token.start }, + to: { line: cur.line, ch: token.end }, + }; + } + + CodeMirror.pigHint = function (editor) { + return scriptHint(editor, pigKeywordsU, (e, cur) => e.getTokenAt(cur)); + }; + + const pigKeywords = 'VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP ' + + 'JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL ' + + 'PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE ' + + 'SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE ' + + 'NEQ MATCHES TRUE FALSE'; + var pigKeywordsU = pigKeywords.split(' '); + const pigKeywordsL = pigKeywords.toLowerCase().split(' '); + + const pigTypes = 'BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP'; + const pigTypesU = pigTypes.split(' '); + const pigTypesL = pigTypes.toLowerCase().split(' '); + + const pigBuiltins = 'ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL ' + + 'CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS ' + + 'DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG ' + + 'FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN ' + + 'INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER ' + + 'ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS ' + + 'LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA ' + + 'PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE ' + + 'SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG ' + + 'TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER'; + const pigBuiltinsU = pigBuiltins.split(' ').join('() ').split(' '); + const pigBuiltinsL = pigBuiltins.toLowerCase().split(' ').join('() ').split(' '); + const pigBuiltinsC = ('BagSize BinStorage Bloom BuildBloom ConstantSize CubeDimensions DoubleAbs ' + + 'DoubleAvg DoubleBase DoubleMax DoubleMin DoubleRound DoubleSum FloatAbs FloatAvg FloatMax ' + + 'FloatMin FloatRound FloatSum GenericInvoker IntAbs IntAvg IntMax IntMin IntSum ' + + 'InvokeForDouble InvokeForFloat InvokeForInt InvokeForLong InvokeForString Invoker ' + + 'IsEmpty JsonLoader JsonMetadata JsonStorage LongAbs LongAvg LongMax LongMin LongSum MapSize ' + + 'MonitoredUDF Nondeterministic OutputSchema PigStorage PigStreaming StringConcat StringMax ' + + 'StringMin StringSize TextLoader TupleSize Utf8StorageConverter').split(' ').join('() ').split(' '); + + function getCompletions(token, context) { + const found = []; const + start = token.string; + function maybeAdd(str) { + if (str.indexOf(start) == 0 && !arrayContains(found, str)) found.push(str); + } + + function gatherCompletions(obj) { + if (obj == ':') { + forEach(pigTypesL, maybeAdd); + } else { + forEach(pigBuiltinsU, maybeAdd); + forEach(pigBuiltinsL, maybeAdd); + forEach(pigBuiltinsC, maybeAdd); + forEach(pigTypesU, maybeAdd); + forEach(pigTypesL, maybeAdd); + forEach(pigKeywordsU, maybeAdd); + forEach(pigKeywordsL, maybeAdd); + } + } + + if (context) { + // If this is a property, see if it belongs to some object we can + // find in the current environment. + const obj = context.pop(); let + base; + + if (obj.type == 'variable') base = obj.string; + else if (obj.type == 'variable-3') base = `:${obj.string}`; + + while (base != null && context.length) base = base[context.pop().string]; + if (base != null) gatherCompletions(base); + } + return found; + } +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/runmode-standalone.js b/report/assets/scripts/vendor/codemirror/util/runmode-standalone.js new file mode 100644 index 00000000..8a8f4a1d --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/runmode-standalone.js @@ -0,0 +1,92 @@ +/* Just enough of CodeMirror to run runMode under node.js */ + +function splitLines(string) { return string.split(/\r?\n|\r/); } + +function StringStream(string) { + this.pos = this.start = 0; + this.string = string; +} +StringStream.prototype = { + eol: function () { return this.pos >= this.string.length; }, + sol: function () { return this.pos == 0; }, + peek: function () { return this.string.charAt(this.pos) || null; }, + next: function () { + if (this.pos < this.string.length) return this.string.charAt(this.pos++); + }, + eat: function (match) { + const ch = this.string.charAt(this.pos); + if (typeof match === 'string') var ok = ch == match; + else var ok = ch && (match.test ? match.test(ch) : match(ch)); + if (ok) { ++this.pos; return ch; } + }, + eatWhile: function (match) { + const start = this.pos; + while (this.eat(match)) {} + return this.pos > start; + }, + eatSpace: function () { + const start = this.pos; + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; + return this.pos > start; + }, + skipToEnd: function () { this.pos = this.string.length; }, + skipTo: function (ch) { + const found = this.string.indexOf(ch, this.pos); + if (found > -1) { this.pos = found; return true; } + }, + backUp: function (n) { this.pos -= n; }, + column: function () { return this.start; }, + indentation: function () { return 0; }, + match: function (pattern, consume, caseInsensitive) { + if (typeof pattern === 'string') { + function cased(str) { return caseInsensitive ? str.toLowerCase() : str; } + if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) { + if (consume !== false) this.pos += pattern.length; + return true; + } + } else { + const match = this.string.slice(this.pos).match(pattern); + if (match && consume !== false) this.pos += match[0].length; + return match; + } + }, + current: function () { return this.string.slice(this.start, this.pos); }, +}; +exports.StringStream = StringStream; + +exports.startState = function (mode, a1, a2) { + return mode.startState ? mode.startState(a1, a2) : true; +}; + +const modes = exports.modes = {}; const + mimeModes = exports.mimeModes = {}; +exports.defineMode = function (name, mode) { modes[name] = mode; }; +exports.defineMIME = function (mime, spec) { mimeModes[mime] = spec; }; +exports.getMode = function (options, spec) { + if (typeof spec === 'string' && mimeModes.hasOwnProperty(spec)) spec = mimeModes[spec]; + if (typeof spec === 'string') { + var mname = spec; + var config = {}; + } else if (spec != null) { + var mname = spec.name; + var config = spec; + } + const mfactory = modes[mname]; + if (!mfactory) throw new Error(`Unknown mode: ${spec}`); + return mfactory(options, config || {}); +}; + +exports.runMode = function (string, modespec, callback) { + const mode = exports.getMode({ indentUnit: 2 }, modespec); + const lines = splitLines(string); const + state = exports.startState(mode); + for (let i = 0, e = lines.length; i < e; ++i) { + if (i) callback('\n'); + const stream = new exports.StringStream(lines[i]); + while (!stream.eol()) { + const style = mode.token(stream, state); + callback(stream.current(), style, i, stream.start); + stream.start = stream.pos; + } + } +}; diff --git a/report/assets/scripts/vendor/codemirror/util/runmode.js b/report/assets/scripts/vendor/codemirror/util/runmode.js new file mode 100644 index 00000000..ffd15b72 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/runmode.js @@ -0,0 +1,54 @@ +CodeMirror.runMode = function (string, modespec, callback, options) { + const mode = CodeMirror.getMode(CodeMirror.defaults, modespec); + + if (callback.nodeType == 1) { + const tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize; + const node = callback; let + col = 0; + node.innerHTML = ''; + callback = function (text, style) { + if (text == '\n') { + node.appendChild(document.createElement('br')); + col = 0; + return; + } + let content = ''; + // replace tabs + for (let pos = 0; ;) { + const idx = text.indexOf('\t', pos); + if (idx == -1) { + content += text.slice(pos); + col += text.length - pos; + break; + } else { + col += idx - pos; + content += text.slice(pos, idx); + const size = tabSize - col % tabSize; + col += size; + for (let i = 0; i < size; ++i) content += ' '; + pos = idx + 1; + } + } + + if (style) { + const sp = node.appendChild(document.createElement('span')); + sp.className = `cm-${style.replace(/ +/g, ' cm-')}`; + sp.appendChild(document.createTextNode(content)); + } else { + node.appendChild(document.createTextNode(content)); + } + }; + } + + const lines = CodeMirror.splitLines(string); const + state = CodeMirror.startState(mode); + for (let i = 0, e = lines.length; i < e; ++i) { + if (i) callback('\n'); + const stream = new CodeMirror.StringStream(lines[i]); + while (!stream.eol()) { + const style = mode.token(stream, state); + callback(stream.current(), style, i, stream.start); + stream.start = stream.pos; + } + } +}; diff --git a/report/assets/scripts/vendor/codemirror/util/search.js b/report/assets/scripts/vendor/codemirror/util/search.js new file mode 100644 index 00000000..3e8b48f5 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/search.js @@ -0,0 +1,121 @@ +// Define search commands. Depends on dialog.js or another +// implementation of the openDialog method. + +// Replace works a little oddly -- it will do the replace on the next +// Ctrl-G (or whatever is bound to findNext) press. You prevent a +// replace by making sure the match is no longer selected when hitting +// Ctrl-G. + +(function () { + function SearchState() { + this.posFrom = this.posTo = this.query = null; + this.marked = []; + } + function getSearchState(cm) { + return cm._searchState || (cm._searchState = new SearchState()); + } + function getSearchCursor(cm, query, pos) { + // Heuristic: if the query string is all lowercase, do a case insensitive search. + return cm.getSearchCursor(query, pos, typeof query === 'string' && query == query.toLowerCase()); + } + function dialog(cm, text, shortText, f) { + if (cm.openDialog) cm.openDialog(text, f); + else f(prompt(shortText, '')); + } + function confirmDialog(cm, text, shortText, fs) { + if (cm.openConfirm) cm.openConfirm(text, fs); + else if (confirm(shortText)) fs[0](); + } + function parseQuery(query) { + const isRE = query.match(/^\/(.*)\/([a-z]*)$/); + return isRE ? new RegExp(isRE[1], isRE[2].indexOf('i') == -1 ? '' : 'i') : query; + } + const queryDialog = + 'Search: (Use /re/ syntax for regexp search)'; + function doSearch(cm, rev) { + const state = getSearchState(cm); + if (state.query) return findNext(cm, rev); + dialog(cm, queryDialog, 'Search for:', (query) => { + cm.operation(() => { + if (!query || state.query) return; + state.query = parseQuery(query); + if (cm.lineCount() < 2000) { // This is too expensive on big documents. + for (let cursor = getSearchCursor(cm, state.query); cursor.findNext();) state.marked.push(cm.markText(cursor.from(), cursor.to(), { className: 'CodeMirror-searching' })); + } + state.posFrom = state.posTo = cm.getCursor(); + findNext(cm, rev); + }); + }); + } + function findNext(cm, rev) { + cm.operation(() => { + const state = getSearchState(cm); + let cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo); + if (!cursor.find(rev)) { + cursor = getSearchCursor(cm, state.query, rev ? { line: cm.lineCount() - 1 } : { line: 0, ch: 0 }); + if (!cursor.find(rev)) return; + } + cm.setSelection(cursor.from(), cursor.to()); + state.posFrom = cursor.from(); state.posTo = cursor.to(); + }); + } + function clearSearch(cm) { + cm.operation(() => { + const state = getSearchState(cm); + if (!state.query) return; + state.query = null; + for (let i = 0; i < state.marked.length; ++i) state.marked[i].clear(); + state.marked.length = 0; + }); + } + + const replaceQueryDialog = + 'Replace: (Use /re/ syntax for regexp search)'; + const replacementQueryDialog = 'With: '; + const doReplaceConfirm = 'Replace? '; + function replace(cm, all) { + dialog(cm, replaceQueryDialog, 'Replace:', (query) => { + if (!query) return; + query = parseQuery(query); + dialog(cm, replacementQueryDialog, 'Replace with:', (text) => { + if (all) { + cm.operation(() => { + for (let cursor = getSearchCursor(cm, query); cursor.findNext();) { + if (typeof query !== 'string') { + var match = cm.getRange(cursor.from(), cursor.to()).match(query); + cursor.replace(text.replace(/\$(\d)/, (_, i) => match[i])); + } else cursor.replace(text); + } + }); + } else { + clearSearch(cm); + let cursor = getSearchCursor(cm, query, cm.getCursor()); + function advance() { + const start = cursor.from(); let + match; + if (!(match = cursor.findNext())) { + cursor = getSearchCursor(cm, query); + if (!(match = cursor.findNext()) || + (start && cursor.from().line == start.line && cursor.from().ch == start.ch)) return; + } + cm.setSelection(cursor.from(), cursor.to()); + confirmDialog(cm, doReplaceConfirm, 'Replace?', [function () { doReplace(match); }, advance]); + } + function doReplace(match) { + cursor.replace(typeof query === 'string' ? text : + text.replace(/\$(\d)/, (_, i) => match[i])); + advance(); + } + advance(); + } + }); + }); + } + + CodeMirror.commands.find = function (cm) { clearSearch(cm); doSearch(cm); }; + CodeMirror.commands.findNext = doSearch; + CodeMirror.commands.findPrev = function (cm) { doSearch(cm, true); }; + CodeMirror.commands.clearSearch = clearSearch; + CodeMirror.commands.replace = replace; + CodeMirror.commands.replaceAll = function (cm) { replace(cm, true); }; +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/searchcursor.js b/report/assets/scripts/vendor/codemirror/util/searchcursor.js new file mode 100644 index 00000000..d0fc3730 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/searchcursor.js @@ -0,0 +1,127 @@ +(function () { + function SearchCursor(cm, query, pos, caseFold) { + this.atOccurrence = false; this.cm = cm; + if (caseFold == null && typeof query === 'string') caseFold = false; + + pos = pos ? cm.clipPos(pos) : { line: 0, ch: 0 }; + this.pos = { from: pos, to: pos }; + + // The matches method is filled in based on the type of query. + // It takes a position and a direction, and returns an object + // describing the next occurrence of the query, or null if no + // more matches were found. + if (typeof query !== 'string') { // Regexp match + if (!query.global) query = new RegExp(query.source, query.ignoreCase ? 'ig' : 'g'); + this.matches = function (reverse, pos) { + if (reverse) { + query.lastIndex = 0; + var line = cm.getLine(pos.line).slice(0, pos.ch); var match = query.exec(line); var + start = 0; + while (match) { + start += match.index + 1; + line = line.slice(start); + query.lastIndex = 0; + const newmatch = query.exec(line); + if (newmatch) match = newmatch; + else break; + } + start--; + } else { + query.lastIndex = pos.ch; + var line = cm.getLine(pos.line); var match = query.exec(line); + var start = match && match.index; + } + if (match) { + return { + from: { line: pos.line, ch: start }, + to: { line: pos.line, ch: start + match[0].length }, + match: match, + }; + } + }; + } else { // String query + if (caseFold) query = query.toLowerCase(); + const fold = caseFold ? function (str) { return str.toLowerCase(); } : function (str) { return str; }; + const target = query.split('\n'); + // Different methods for single-line and multi-line queries + if (target.length == 1) { + this.matches = function (reverse, pos) { + const line = fold(cm.getLine(pos.line)); const len = query.length; let + match; + if (reverse ? (pos.ch >= len && (match = line.lastIndexOf(query, pos.ch - len)) != -1) : + (match = line.indexOf(query, pos.ch)) != -1) { + return { + from: { line: pos.line, ch: match }, + to: { line: pos.line, ch: match + len }, + }; + } + }; + } else { + this.matches = function (reverse, pos) { + let ln = pos.line; let idx = (reverse ? target.length - 1 : 0); let match = target[idx]; let + line = fold(cm.getLine(ln)); + const offsetA = (reverse ? line.indexOf(match) + match.length : line.lastIndexOf(match)); + if (reverse ? offsetA >= pos.ch || offsetA != match.length : + offsetA <= pos.ch || offsetA != line.length - match.length) return; + for (;;) { + if (reverse ? !ln : ln == cm.lineCount() - 1) return; + line = fold(cm.getLine(ln += reverse ? -1 : 1)); + match = target[reverse ? --idx : ++idx]; + if (idx > 0 && idx < target.length - 1) { + if (line != match) return; + continue; + } + const offsetB = (reverse ? line.lastIndexOf(match) : line.indexOf(match) + match.length); + if (reverse ? offsetB != line.length - match.length : offsetB != match.length) return; + const start = { line: pos.line, ch: offsetA }; const + end = { line: ln, ch: offsetB }; + return { from: reverse ? end : start, to: reverse ? start : end }; + } + }; + } + } + } + + SearchCursor.prototype = { + findNext: function () { return this.find(false); }, + findPrevious: function () { return this.find(true); }, + + find: function (reverse) { + const self = this; let + pos = this.cm.clipPos(reverse ? this.pos.from : this.pos.to); + function savePosAndFail(line) { + const pos = { line: line, ch: 0 }; + self.pos = { from: pos, to: pos }; + self.atOccurrence = false; + return false; + } + + for (;;) { + if (this.pos = this.matches(reverse, pos)) { + this.atOccurrence = true; + return this.pos.match || true; + } + if (reverse) { + if (!pos.line) return savePosAndFail(0); + pos = { line: pos.line - 1, ch: this.cm.getLine(pos.line - 1).length }; + } else { + const maxLine = this.cm.lineCount(); + if (pos.line == maxLine - 1) return savePosAndFail(maxLine); + pos = { line: pos.line + 1, ch: 0 }; + } + } + }, + + from: function () { if (this.atOccurrence) return this.pos.from; }, + to: function () { if (this.atOccurrence) return this.pos.to; }, + + replace: function (newText) { + const self = this; + if (this.atOccurrence) self.pos.to = this.cm.replaceRange(newText, self.pos.from, self.pos.to); + }, + }; + + CodeMirror.defineExtension('getSearchCursor', function (query, pos, caseFold) { + return new SearchCursor(this, query, pos, caseFold); + }); +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/simple-hint.css b/report/assets/scripts/vendor/codemirror/util/simple-hint.css new file mode 100644 index 00000000..4387cb94 --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/simple-hint.css @@ -0,0 +1,16 @@ +.CodeMirror-completions { + position: absolute; + z-index: 10; + overflow: hidden; + -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); + -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); + box-shadow: 2px 3px 5px rgba(0,0,0,.2); +} +.CodeMirror-completions select { + background: #fafafa; + outline: none; + border: none; + padding: 0; + margin: 0; + font-family: monospace; +} diff --git a/report/assets/scripts/vendor/codemirror/util/simple-hint.js b/report/assets/scripts/vendor/codemirror/util/simple-hint.js new file mode 100644 index 00000000..eb35e83b --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/simple-hint.js @@ -0,0 +1,98 @@ +(function () { + CodeMirror.simpleHint = function (editor, getHints, givenOptions) { + // Determine effective options based on given values and defaults. + const options = {}; const + { defaults } = CodeMirror.simpleHint; + for (const opt in defaults) if (defaults.hasOwnProperty(opt)) options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt]; + + function collectHints(previousToken) { + // We want a single cursor position. + if (editor.somethingSelected()) return; + + const tempToken = editor.getTokenAt(editor.getCursor()); + + // Don't show completions if token has changed and the option is set. + if (options.closeOnTokenChange && previousToken != null && + (tempToken.start != previousToken.start || tempToken.type != previousToken.type)) { + return; + } + + const result = getHints(editor, givenOptions); + if (!result || !result.list.length) return; + const completions = result.list; + function insert(str) { + editor.replaceRange(str, result.from, result.to); + } + // When there is only one completion, use it directly. + if (options.completeSingle && completions.length == 1) { + insert(completions[0]); + return true; + } + + // Build the select widget + const complete = document.createElement('div'); + complete.className = 'CodeMirror-completions'; + const sel = complete.appendChild(document.createElement('select')); + // Opera doesn't move the selection when pressing up/down in a + // multi-select, but it does properly support the size property on + // single-selects, so no multi-select is necessary. + if (!window.opera) sel.multiple = true; + for (let i = 0; i < completions.length; ++i) { + const opt = sel.appendChild(document.createElement('option')); + opt.appendChild(document.createTextNode(completions[i])); + } + sel.firstChild.selected = true; + sel.size = Math.min(10, completions.length); + const pos = editor.cursorCoords(options.alignWithWord ? result.from : null); + complete.style.left = `${pos.left}px`; + complete.style.top = `${pos.bottom}px`; + document.body.appendChild(complete); + // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor. + const winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth); + if (winW - pos.left < sel.clientWidth) complete.style.left = `${pos.left - sel.clientWidth}px`; + // Hack to hide the scrollbar. + if (completions.length <= 10) complete.style.width = `${sel.clientWidth - 1}px`; + + let done = false; + function close() { + if (done) return; + done = true; + complete.parentNode.removeChild(complete); + } + function pick() { + insert(completions[sel.selectedIndex]); + close(); + setTimeout(() => { editor.focus(); }, 50); + } + CodeMirror.on(sel, 'blur', close); + CodeMirror.on(sel, 'keydown', (event) => { + const code = event.keyCode; + // Enter + if (code == 13) { CodeMirror.e_stop(event); pick(); } + // Escape + else if (code == 27) { CodeMirror.e_stop(event); close(); editor.focus(); } else if (code != 38 && code != 40 && code != 33 && code != 34 && !CodeMirror.isModifierKey(event)) { + close(); editor.focus(); + // Pass the event to the CodeMirror instance so that it can handle things like backspace properly. + editor.triggerOnKeyDown(event); + // Don't show completions if the code is backspace and the option is set. + if (!options.closeOnBackspace || code != 8) { + setTimeout(() => { collectHints(tempToken); }, 50); + } + } + }); + CodeMirror.on(sel, 'dblclick', pick); + + sel.focus(); + // Opera sometimes ignores focusing a freshly created node + if (window.opera) setTimeout(() => { if (!done) sel.focus(); }, 100); + return true; + } + return collectHints(); + }; + CodeMirror.simpleHint.defaults = { + closeOnBackspace: true, + closeOnTokenChange: false, + completeSingle: true, + alignWithWord: true, + }; +}()); diff --git a/report/assets/scripts/vendor/codemirror/util/xml-hint.js b/report/assets/scripts/vendor/codemirror/util/xml-hint.js new file mode 100644 index 00000000..f785f4ee --- /dev/null +++ b/report/assets/scripts/vendor/codemirror/util/xml-hint.js @@ -0,0 +1,108 @@ + +(function () { + CodeMirror.xmlHints = []; + + CodeMirror.xmlHint = function (cm, simbol) { + if (simbol.length > 0) { + let cursor = cm.getCursor(); + cm.replaceSelection(simbol); + cursor = { line: cursor.line, ch: cursor.ch + 1 }; + cm.setCursor(cursor); + } + + CodeMirror.simpleHint(cm, getHint); + }; + + var getHint = function (cm) { + const cursor = cm.getCursor(); + + if (cursor.ch > 0) { + let text = cm.getRange({ line: 0, ch: 0 }, cursor); + let typed = ''; + let simbol = ''; + for (var i = text.length - 1; i >= 0; i--) { + if (text[i] == ' ' || text[i] == '<') { + simbol = text[i]; + break; + } else { + typed = text[i] + typed; + } + } + + text = text.slice(0, text.length - typed.length); + + const path = getActiveElement(text) + simbol; + let hints = CodeMirror.xmlHints[path]; + + if (typeof hints === 'undefined') hints = ['']; + else { + hints = hints.slice(0); + for (var i = hints.length - 1; i >= 0; i--) { + if (hints[i].indexOf(typed) != 0) hints.splice(i, 1); + } + } + + return { + list: hints, + from: { line: cursor.line, ch: cursor.ch - typed.length }, + to: cursor, + }; + } + }; + + var getActiveElement = function (text) { + let element = ''; + + if (text.length >= 0) { + const regex = new RegExp('<([^!?][^\\s/>]*).*?>', 'g'); + + const matches = []; + let match; + while ((match = regex.exec(text)) != null) { + matches.push({ + tag: match[1], + selfclose: (match[0].slice(match[0].length - 2) === '/>'), + }); + } + + for (let i = matches.length - 1, skip = 0; i >= 0; i--) { + const item = matches[i]; + + if (item.tag[0] == '/') { + skip++; + } else if (item.selfclose == false) { + if (skip > 0) { + skip--; + } else { + element = `<${item.tag}>${element}`; + } + } + } + + element += getOpenTag(text); + } + + return element; + }; + + var getOpenTag = function (text) { + const open = text.lastIndexOf('<'); + const close = text.lastIndexOf('>'); + + if (close < open) { + text = text.slice(open); + + if (text != '<') { + let space = text.indexOf(' '); + if (space < 0) space = text.indexOf('\t'); + if (space < 0) space = text.indexOf('\n'); + + if (space < 0) space = text.length; + + return text.slice(0, space); + } + } + + return ''; + }; +}()); diff --git a/report/assets/scripts/vendor/jquery-1.8.3.min.js b/report/assets/scripts/vendor/jquery-1.8.3.min.js new file mode 100644 index 00000000..38837795 --- /dev/null +++ b/report/assets/scripts/vendor/jquery-1.8.3.min.js @@ -0,0 +1,2 @@ +/*! jQuery v1.8.3 jquery.com | jquery.org/license */ +(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
  • a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
    t
    ",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
    ",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
    ",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

    ",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
    ","
    "]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
    ").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file diff --git a/report/assets/scripts/vendor/jquery.fittext.js b/report/assets/scripts/vendor/jquery.fittext.js new file mode 100644 index 00000000..a964fb7b --- /dev/null +++ b/report/assets/scripts/vendor/jquery.fittext.js @@ -0,0 +1,37 @@ +/* global jQuery */ +/*! + * FitText.js 1.1 + * + * Copyright 2011, Dave Rupert http://daverupert.com + * Released under the WTFPL license + * http://sam.zoy.org/wtfpl/ + * + * Date: Thu May 05 14:23:00 2011 -0600 + */ + +(function ($) { + $.fn.fitText = function (kompressor, options) { + // Setup options + const compressor = kompressor || 1; + const settings = $.extend({ + minFontSize: Number.NEGATIVE_INFINITY, + maxFontSize: Number.POSITIVE_INFINITY, + }, options); + + return this.each(function () { + // Store the object + const $this = $(this); + + // Resizer() resizes items based on the object width divided by the compressor * 10 + const resizer = function () { + $this.css('font-size', Math.max(Math.min($this.width() / (compressor * 10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize))); + }; + + // Call once to set. + resizer(); + + // Call on resize. Opera debounces their resize by default. + $(window).on('resize', resizer); + }); + }; +}(jQuery)); diff --git a/report/assets/scripts/vendor/lodash.min.js b/report/assets/scripts/vendor/lodash.min.js new file mode 100644 index 00000000..85a96263 --- /dev/null +++ b/report/assets/scripts/vendor/lodash.min.js @@ -0,0 +1,56 @@ +/** + * @license + * Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE + * Build: `lodash modern -o ./dist/lodash.js` + */ +;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++ea||typeof i=="undefined")return 1;if(ie?0:e);++r=b&&i===n,l=[];if(f){var p=o(r);p?(i=t,r=p):f=false}for(;++ui(r,p)&&l.push(p);return f&&c(r),l}function ut(n,t,e,r){r=(r||0)-1;for(var u=n?n.length:0,o=[];++r=b&&f===n,h=u||v?a():s; +for(v&&(h=o(h),f=t);++if(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(l(h.k),c(h)):u&&l(h),s}function lt(n){return function(t,e,r){var u={};e=J.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++re?Ie(0,o+e):e)||0,Te(n)?i=-1o&&(o=a)}}else t=null==t&&kt(n)?r:J.createCallback(t,e,3),St(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Dt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=J.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++oarguments.length;return t=J.createCallback(t,r,4),Et(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)}),e}function Tt(n){var t=-1,e=n?n.length:0,r=Xt(typeof e=="number"?e:0);return St(n,function(n){var e=at(0,++t);r[t]=r[e],r[e]=n}),r}function Ft(n,t,e){var r;t=J.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++er?Ie(0,u+r):r||0}else if(r)return r=zt(t,e),t[r]===e?r:-1;return n(t,e,r)}function qt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=J.createCallback(t,e,3);++u>>1,e(n[r])e?0:e);++t=v; +m?(i&&(i=ve(i)),s=f,a=n.apply(l,o)):i||(i=_e(r,v))}return m&&c?c=ve(c):c||t===h||(c=_e(u,t)),e&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a}}function Ut(n){return n}function Gt(n,t,e){var r=true,u=t&&bt(t);t&&(e||u.length)||(null==e&&(e=t),o=Q,t=n,n=J,u=bt(t)),false===e?r=false:wt(e)&&"chain"in e&&(r=e.chain);var o=n,i=dt(o);St(u,function(e){var u=n[e]=t[e];i&&(o.prototype[e]=function(){var t=this.__chain__,e=this.__wrapped__,i=[e];if(be.apply(i,arguments),i=u.apply(n,i),r||t){if(e===i&&wt(i))return this; +i=new o(i),i.__chain__=t}return i})})}function Ht(){}function Jt(n){return function(t){return t[n]}}function Qt(){return this.__wrapped__}e=e?Y.defaults(G.Object(),e,Y.pick(G,A)):G;var Xt=e.Array,Yt=e.Boolean,Zt=e.Date,ne=e.Function,te=e.Math,ee=e.Number,re=e.Object,ue=e.RegExp,oe=e.String,ie=e.TypeError,ae=[],fe=re.prototype,le=e._,ce=fe.toString,pe=ue("^"+oe(ce).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),se=te.ceil,ve=e.clearTimeout,he=te.floor,ge=ne.prototype.toString,ye=vt(ye=re.getPrototypeOf)&&ye,me=fe.hasOwnProperty,be=ae.push,_e=e.setTimeout,de=ae.splice,we=ae.unshift,je=function(){try{var n={},t=vt(t=re.defineProperty)&&t,e=t(n,n,n)&&t +}catch(r){}return e}(),ke=vt(ke=re.create)&&ke,xe=vt(xe=Xt.isArray)&&xe,Ce=e.isFinite,Oe=e.isNaN,Ne=vt(Ne=re.keys)&&Ne,Ie=te.max,Se=te.min,Ee=e.parseInt,Re=te.random,Ae={};Ae[$]=Xt,Ae[T]=Yt,Ae[F]=Zt,Ae[B]=ne,Ae[q]=re,Ae[W]=ee,Ae[z]=ue,Ae[P]=oe,Q.prototype=J.prototype;var De=J.support={};De.funcDecomp=!vt(e.a)&&E.test(s),De.funcNames=typeof ne.name=="string",J.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N,variable:"",imports:{_:J}},ke||(nt=function(){function n(){}return function(t){if(wt(t)){n.prototype=t; +var r=new n;n.prototype=null}return r||e.Object()}}());var $e=je?function(n,t){M.value=t,je(n,"__bindData__",M)}:Ht,Te=xe||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ce.call(n)==$||false},Fe=Ne?function(n){return wt(n)?Ne(n):[]}:H,Be={"&":"&","<":"<",">":">",'"':""","'":"'"},We=_t(Be),qe=ue("("+Fe(We).join("|")+")","g"),ze=ue("["+Fe(Be).join("")+"]","g"),Pe=ye?function(n){if(!n||ce.call(n)!=q)return false;var t=n.valueOf,e=vt(t)&&(e=ye(t))&&ye(e);return e?n==e||ye(n)==e:ht(n) +}:ht,Ke=lt(function(n,t,e){me.call(n,e)?n[e]++:n[e]=1}),Le=lt(function(n,t,e){(me.call(n,e)?n[e]:n[e]=[]).push(t)}),Me=lt(function(n,t,e){n[e]=t}),Ve=Rt,Ue=vt(Ue=Zt.now)&&Ue||function(){return(new Zt).getTime()},Ge=8==Ee(d+"08")?Ee:function(n,t){return Ee(kt(n)?n.replace(I,""):n,t||0)};return J.after=function(n,t){if(!dt(t))throw new ie;return function(){return 1>--n?t.apply(this,arguments):void 0}},J.assign=U,J.at=function(n){for(var t=arguments,e=-1,r=ut(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Xt(t);++e=b&&o(r?e[r]:s)))}var p=e[0],h=-1,g=p?p.length:0,y=[];n:for(;++h(m?t(m,v):f(s,v))){for(r=u,(m||s).push(v);--r;)if(m=i[r],0>(m?t(m,v):f(e[r],v)))continue n;y.push(v)}}for(;u--;)(m=i[u])&&c(m);return l(i),l(s),y},J.invert=_t,J.invoke=function(n,t){var e=p(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,i=Xt(typeof o=="number"?o:0);return St(n,function(n){i[++r]=(u?t:n[t]).apply(n,e)}),i},J.keys=Fe,J.map=Rt,J.mapValues=function(n,t,e){var r={}; +return t=J.createCallback(t,e,3),h(n,function(n,e,u){r[e]=t(n,e,u)}),r},J.max=At,J.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):m+arguments[0];return me.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!dt(n))throw new ie;return e.cache={},e},J.merge=function(n){var t=arguments,e=2;if(!wt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3e?Ie(0,r+e):Se(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},J.mixin=Gt,J.noConflict=function(){return e._=le,this},J.noop=Ht,J.now=Ue,J.parseInt=Ge,J.random=function(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=true)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,e||n%1||t%1?(e=Re(),Se(n+e*(t-n+parseFloat("1e-"+((e+"").length-1))),t)):at(n,t) +},J.reduce=Dt,J.reduceRight=$t,J.result=function(n,t){if(n){var e=n[t];return dt(e)?n[t]():e}},J.runInContext=s,J.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Fe(n).length},J.some=Ft,J.sortedIndex=zt,J.template=function(n,t,e){var r=J.templateSettings;n=oe(n||""),e=_({},e,r);var u,o=_({},e.imports,r.imports),r=Fe(o),o=xt(o),a=0,f=e.interpolate||S,l="__p+='",f=ue((e.escape||S).source+"|"+f.source+"|"+(f===N?x:S).source+"|"+(e.evaluate||S).source+"|$","g");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(a,c).replace(R,i),e&&(l+="'+__e("+e+")+'"),f&&(u=true,l+="';"+f+";\n__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),a=c+t.length,t +}),l+="';",f=e=e.variable,f||(e="obj",l="with("+e+"){"+l+"}"),l=(u?l.replace(w,""):l).replace(j,"$1").replace(k,"$1;"),l="function("+e+"){"+(f?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var c=ne(r,"return "+l).apply(v,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},J.unescape=function(n){return null==n?"":oe(n).replace(qe,gt)},J.uniqueId=function(n){var t=++y;return oe(null==n?"":n)+t +},J.all=Ot,J.any=Ft,J.detect=It,J.findWhere=It,J.foldl=Dt,J.foldr=$t,J.include=Ct,J.inject=Dt,Gt(function(){var n={};return h(J,function(t,e){J.prototype[e]||(n[e]=t)}),n}(),false),J.first=Bt,J.last=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=J.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:v;return p(n,Ie(0,u-r))},J.sample=function(n,t,e){return n&&typeof n.length!="number"&&(n=xt(n)),null==t||e?n?n[at(0,n.length-1)]:v:(n=Tt(n),n.length=Se(Ie(0,t),n.length),n) +},J.take=Bt,J.head=Bt,h(J,function(n,t){var e="sample"!==t;J.prototype[t]||(J.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new Q(o,u):o})}),J.VERSION="2.4.1",J.prototype.chain=function(){return this.__chain__=true,this},J.prototype.toString=function(){return oe(this.__wrapped__)},J.prototype.value=Qt,J.prototype.valueOf=Qt,St(["join","pop","shift"],function(n){var t=ae[n];J.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments); +return n?new Q(e,n):e}}),St(["push","reverse","sort","unshift"],function(n){var t=ae[n];J.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),St(["concat","slice","splice"],function(n){var t=ae[n];J.prototype[n]=function(){return new Q(t.apply(this.__wrapped__,arguments),this.__chain__)}}),J}var v,h=[],g=[],y=0,m=+new Date+"",b=75,_=40,d=" \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",w=/\b__p\+='';/g,j=/\b(__p\+=)''\+/g,k=/(__e\(.*?\)|\b__t\))\+'';/g,x=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,O=/^\s*function[ \n\r\t]+\w/,N=/<%=([\s\S]+?)%>/g,I=RegExp("^["+d+"]*0+(?=.$)"),S=/($^)/,E=/\bthis\b/,R=/['\n\r\t\u2028\u2029\\]/g,A="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setTimeout".split(" "),D="[object Arguments]",$="[object Array]",T="[object Boolean]",F="[object Date]",B="[object Function]",W="[object Number]",q="[object Object]",z="[object RegExp]",P="[object String]",K={}; +K[B]=false,K[D]=K[$]=K[T]=K[F]=K[W]=K[q]=K[z]=K[P]=true;var L={leading:false,maxWait:0,trailing:false},M={configurable:false,enumerable:false,value:null,writable:false},V={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},U={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},G=V[typeof window]&&window||this,H=V[typeof exports]&&exports&&!exports.nodeType&&exports,J=V[typeof module]&&module&&!module.nodeType&&module,Q=J&&J.exports===H&&H,X=V[typeof global]&&global;!X||X.global!==X&&X.window!==X||(G=X); +var Y=s();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(G._=Y, define(function(){return Y})):H&&J?Q?(J.exports=Y)._=Y:H._=Y:G._=Y}).call(this); \ No newline at end of file diff --git a/report/assets/scripts/vendor/morris.min.js b/report/assets/scripts/vendor/morris.min.js new file mode 100644 index 00000000..edc5d7b7 --- /dev/null +++ b/report/assets/scripts/vendor/morris.min.js @@ -0,0 +1 @@ +(function(){var e,t,n,r,i=[].slice,s={}.hasOwnProperty,o=function(e,t){function r(){this.constructor=e}for(var n in t)s.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},u=function(e,t){return function(){return e.apply(t,arguments)}},a=[].indexOf||function(e){for(var t=0,n=this.length;tn.length&&(r+=i.slice(n.length)),r):"-"},t.pad2=function(e){return(e<10?"0":"")+e},t.Grid=function(n){function r(t){var n=this;typeof t.element=="string"?this.el=e(document.getElementById(t.element)):this.el=e(t.element);if(this.el==null||this.el.length===0)throw new Error("Graph container element not found");this.el.css("position")==="static"&&this.el.css("position","relative"),this.options=e.extend({},this.gridDefaults,this.defaults||{},t),typeof this.options.units=="string"&&(this.options.postUnits=t.units),this.raphael=new Raphael(this.el[0]),this.elementWidth=null,this.elementHeight=null,this.dirty=!1,this.init&&this.init(),this.setData(this.options.data),this.el.bind("mousemove",function(e){var t;return t=n.el.offset(),n.fire("hovermove",e.pageX-t.left,e.pageY-t.top)}),this.el.bind("mouseout",function(e){return n.fire("hoverout")}),this.el.bind("touchstart touchmove touchend",function(e){var t,r;return r=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],t=n.el.offset(),n.fire("hover",r.pageX-t.left,r.pageY-t.top),r}),this.el.bind("click",function(e){var t;return t=n.el.offset(),n.fire("gridclick",e.pageX-t.left,e.pageY-t.top)}),this.postInit&&this.postInit()}return o(r,n),r.prototype.gridDefaults={dateFormat:null,axes:!0,grid:!0,gridLineColor:"#aaa",gridStrokeWidth:.5,gridTextColor:"#888",gridTextSize:12,gridTextFamily:"sans-serif",gridTextWeight:"normal",hideHover:!1,yLabelFormat:null,xLabelAngle:0,numLines:5,padding:25,parseTime:!0,postUnits:"",preUnits:"",ymax:"auto",ymin:"auto 0",goals:[],goalStrokeWidth:1,goalLineColors:["#666633","#999966","#cc6666","#663333"],events:[],eventStrokeWidth:1,eventLineColors:["#005a04","#ccffbb","#3a5f0b","#005502"]},r.prototype.setData=function(e,n){var r,i,s,o,u,a,f,l,c,h,p,d,v,m;n==null&&(n=!0),this.options.data=e;if(e==null||e.length===0){this.data=[],this.raphael.clear(),this.hover!=null&&this.hover.hide();return}d=this.cumulative?0:null,v=this.cumulative?0:null,this.options.goals.length>0&&(u=Math.min.apply(null,this.options.goals),o=Math.max.apply(null,this.options.goals),v=v!=null?Math.min(v,u):u,d=d!=null?Math.max(d,o):o),this.data=function(){var n,r,o;o=[];for(s=n=0,r=e.length;nt.x)-(t.x>e.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],this.options.parseTime&&this.options.events.length>0&&(this.events=function(){var e,n,i,s;i=this.options.events,s=[];for(e=0,n=i.length;e=n;h=e+=l)r.push(h);return r}.call(this));this.dirty=!0;if(n)return this.redraw()},r.prototype.yboundary=function(e,t){var n,r;return n=this.options["y"+e],typeof n=="string"?n.slice(0,4)==="auto"?n.length>5?(r=parseInt(n.slice(5),10),t==null?r:Math[e](t,r)):t!=null?t:0:parseInt(n,10):n},r.prototype.autoGridLines=function(e,t,n){var r,i,s,o,u,a,f,l,c;return u=t-e,c=Math.floor(Math.log(u)/Math.log(10)),f=Math.pow(10,c),i=Math.floor(e/f)*f,r=Math.ceil(t/f)*f,a=(r-i)/(n-1),f===1&&a>1&&Math.ceil(a)!==a&&(a=Math.ceil(a),r=i+a*(n-1)),i<0&&r>0&&(i=Math.floor(e/a)*a,r=Math.ceil(t/a)*a),a<1?(o=Math.floor(Math.log(a)/Math.log(10)),s=function(){var e,t;t=[];for(l=e=i;i<=r?e<=r:e>=r;l=e+=a)t.push(parseFloat(l.toFixed(1-o)));return t}()):s=function(){var e,t;t=[];for(l=e=i;i<=r?e<=r:e>=r;l=e+=a)t.push(l);return t}(),s},r.prototype._calc=function(){var e,t,n,r,i,s;i=this.el.width(),n=this.el.height();if(this.elementWidth!==i||this.elementHeight!==n||this.dirty){this.elementWidth=i,this.elementHeight=n,this.dirty=!1,this.left=this.options.padding,this.right=this.elementWidth-this.options.padding,this.top=this.options.padding,this.bottom=this.elementHeight-this.options.padding,this.options.axes&&(s=function(){var e,n,r,i;r=this.grid,i=[];for(e=0,n=r.length;et;r=0<=t?++e:--e)n.push(this.measureText(this.data[r].text,-this.options.xLabelAngle).height);return n}.call(this),this.bottom-=Math.max.apply(Math,e)),this.width=Math.max(1,this.right-this.left),this.height=Math.max(1,this.bottom-this.top),this.dx=this.width/(this.xmax-this.xmin),this.dy=this.height/(this.ymax-this.ymin);if(this.calc)return this.calc()}},r.prototype.transY=function(e){return this.bottom-(e-this.ymin)*this.dy},r.prototype.transX=function(e){return this.data.length===1?(this.left+this.right)/2:this.left+(e-this.xmin)*this.dx},r.prototype.redraw=function(){this.raphael.clear(),this._calc(),this.drawGrid(),this.drawGoals(),this.drawEvents();if(this.draw)return this.draw()},r.prototype.measureText=function(e,t){var n,r;return t==null&&(t=0),r=this.raphael.text(100,100,e).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).rotate(t),n=r.getBBox(),r.remove(),n},r.prototype.yAxisFormat=function(e){return this.yLabelFormat(e)},r.prototype.yLabelFormat=function(e){return typeof this.options.yLabelFormat=="function"?this.options.yLabelFormat(e):""+this.options.preUnits+t.commas(e)+this.options.postUnits},r.prototype.updateHover=function(e,t){var n,r;n=this.hitTest(e,t);if(n!=null)return(r=this.hover).update.apply(r,n)},r.prototype.drawGrid=function(){var e,t,n,r,i,s;if(this.options.grid===!1&&this.options.axes===!1)return;i=this.grid,s=[];for(n=0,r=i.length;n
    "),this.el.hide(),this.options.parent.append(this.el)}return n.defaults={"class":"morris-hover morris-default-style"},n.prototype.update=function(e,t,n){return this.html(e),this.show(),this.moveTo(t,n)},n.prototype.html=function(e){return this.el.html(e)},n.prototype.moveTo=function(e,t){var n,r,i,s,o,u;return o=this.options.parent.innerWidth(),s=this.options.parent.innerHeight(),r=this.el.outerWidth(),n=this.el.outerHeight(),i=Math.min(Math.max(0,e-r/2),o-r),t!=null?(u=t-n-10,u<0&&(u=t+10,u+n>s&&(u=s/2-n/2))):u=s/2-n/2,this.el.css({left:i+"px",top:parseInt(u)+"px"})},n.prototype.show=function(){return this.el.show()},n.prototype.hide=function(){return this.el.hide()},n}(),t.Line=function(e){function n(e){this.hilight=u(this.hilight,this),this.onHoverOut=u(this.onHoverOut,this),this.onHoverMove=u(this.onHoverMove,this),this.onGridClick=u(this.onGridClick,this);if(!(this instanceof t.Line))return new t.Line(e);n.__super__.constructor.call(this,e)}return o(n,e),n.prototype.init=function(){this.pointGrow=Raphael.animation({r:this.options.pointSize+3},25,"linear"),this.pointShrink=Raphael.animation({r:this.options.pointSize},25,"linear");if(this.options.hideHover!=="always")return this.hover=new t.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)},n.prototype.defaults={lineWidth:3,pointSize:4,lineColors:["#0b62a4","#7A92A3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],pointWidths:[1],pointStrokeColors:["#ffffff"],pointFillColors:[],smooth:!0,xLabels:"auto",xLabelFormat:null,xLabelMargin:24,continuousLine:!0,hideHover:!1},n.prototype.calc=function(){return this.calcPoints(),this.generatePaths()},n.prototype.calcPoints=function(){var e,t,n,r,i,s;i=this.data,s=[];for(n=0,r=i.length;n"+r.label+"",u=r.y;for(n=s=0,o=u.length;s\n "+this.options.labels[n]+":\n "+this.yLabelFormat(i)+"\n";return typeof this.options.hoverCallback=="function"&&(t=this.options.hoverCallback(e,this.options,t)),[t,r._x,r._ymax]},n.prototype.generatePaths=function(){var e,n,r,i,s;return this.paths=function(){var o,u,f,l;l=[];for(r=o=0,u=this.options.ykeys.length;0<=u?ou;r=0<=u?++o:--o)s=this.options.smooth===!0||(f=this.options.ykeys[r],a.call(this.options.smooth,f)>=0),n=function(){var e,t,n,s;n=this.data,s=[];for(e=0,t=n.length;e1?l.push(t.Line.createPath(n,s,this.bottom)):l.push(null);return l}.call(this)},n.prototype.draw=function(){this.options.axes&&this.drawXAxis(),this.drawSeries();if(this.options.hideHover===!1)return this.displayHoverForRow(this.data.length-1)},n.prototype.drawXAxis=function(){var e,n,r,i,s,o,u,a,f,l,c=this;u=this.bottom+this.options.padding/2,s=null,i=null,e=function(e,t){var n,r,o,a,f;return n=c.drawXAxisLabel(c.transX(t),u,e),f=n.getBBox(),n.transform("r"+ -c.options.xLabelAngle),r=n.getBBox(),n.transform("t0,"+r.height/2+"..."),c.options.xLabelAngle!==0&&(a=-0.5*f.width*Math.cos(c.options.xLabelAngle*Math.PI/180),n.transform("t"+a+",0...")),r=n.getBBox(),(s==null||s>=r.x+r.width||i!=null&&i>=r.x)&&r.x>=0&&r.x+r.width=0;e=r<=0?++t:--t)this._drawLineFor(e);s=[];for(e=n=i=this.options.ykeys.length-1;i<=0?n<=0:n>=0;e=i<=0?++n:--n)s.push(this._drawPointFor(e));return s},n.prototype._drawPointFor=function(e){var t,n,r,i,s,o;this.seriesPoints[e]=[],s=this.data,o=[];for(r=0,i=s.length;r=i;t=0<=i?++n:--n)this.seriesPoints[t][this.prevHilight]&&this.seriesPoints[t][this.prevHilight].animate(this.pointShrink);if(e!==null&&this.prevHilight!==e)for(t=r=0,s=this.seriesPoints.length-1;0<=s?r<=s:r>=s;t=0<=s?++r:--r)this.seriesPoints[t][e]&&this.seriesPoints[t][e].animate(this.pointGrow);return this.prevHilight=e},n.prototype.colorFor=function(e,t,n){return typeof this.options.lineColors=="function"?this.options.lineColors.call(this,e,t,n):n==="point"?this.options.pointFillColors[t%this.options.pointFillColors.length]||this.options.lineColors[t%this.options.lineColors.length]:this.options.lineColors[t%this.options.lineColors.length]},n.prototype.drawXAxisLabel=function(e,t,n){return this.raphael.text(e,t,n).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},n.prototype.drawLinePath=function(e,t){return this.raphael.path(e).attr("stroke",t).attr("stroke-width",this.options.lineWidth)},n.prototype.drawLinePoint=function(e,t,n,r,i){return this.raphael.circle(e,t,n).attr("fill",r).attr("stroke-width",this.strokeWidthForSeries(i)).attr("stroke",this.strokeForSeries(i))},n.prototype.strokeWidthForSeries=function(e){return this.options.pointWidths[e%this.options.pointWidths.length]},n.prototype.strokeForSeries=function(e){return this.options.pointStrokeColors[e%this.options.pointStrokeColors.length]},n}(t.Grid),t.labelSeries=function(n,r,i,s,o){var u,a,f,l,c,h,p,d,v,m,g;f=200*(r-n)/i,a=new Date(n),p=t.LABEL_SPECS[s];if(p===void 0){g=t.AUTO_LABEL_ORDER;for(v=0,m=g.length;v=h.span){p=h;break}}}p===void 0&&(p=t.LABEL_SPECS.second),o&&(p=e.extend({},p,{fmt:o})),u=p.start(a),c=[];while((d=u.getTime())<=r)d>=n&&c.push([p.fmt(u),d]),p.incr(u);return c},n=function(e){return{span:e*60*1e3,start:function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours())},fmt:function(e){return""+t.pad2(e.getHours())+":"+t.pad2(e.getMinutes())},incr:function(t){return t.setUTCMinutes(t.getUTCMinutes()+e)}}},r=function(e){return{span:e*1e3,start:function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes())},fmt:function(e){return""+t.pad2(e.getHours())+":"+t.pad2(e.getMinutes())+":"+t.pad2(e.getSeconds())},incr:function(t){return t.setUTCSeconds(t.getUTCSeconds()+e)}}},t.LABEL_SPECS={decade:{span:1728e8,start:function(e){return new Date(e.getFullYear()-e.getFullYear()%10,0,1)},fmt:function(e){return""+e.getFullYear()},incr:function(e){return e.setFullYear(e.getFullYear()+10)}},year:{span:1728e7,start:function(e){return new Date(e.getFullYear(),0,1)},fmt:function(e){return""+e.getFullYear()},incr:function(e){return e.setFullYear(e.getFullYear()+1)}},month:{span:24192e5,start:function(e){return new Date(e.getFullYear(),e.getMonth(),1)},fmt:function(e){return""+e.getFullYear()+"-"+t.pad2(e.getMonth()+1)},incr:function(e){return e.setMonth(e.getMonth()+1)}},day:{span:864e5,start:function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())},fmt:function(e){return""+e.getFullYear()+"-"+t.pad2(e.getMonth()+1)+"-"+t.pad2(e.getDate())},incr:function(e){return e.setDate(e.getDate()+1)}},hour:n(60),"30min":n(30),"15min":n(15),"10min":n(10),"5min":n(5),minute:n(1),"30sec":r(30),"15sec":r(15),"10sec":r(10),"5sec":r(5),second:r(1)},t.AUTO_LABEL_ORDER=["decade","year","month","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"],t.Area=function(n){function i(n){var s;if(!(this instanceof t.Area))return new t.Area(n);s=e.extend({},r,n),this.cumulative=!s.behaveLikeLine,s.fillOpacity==="auto"&&(s.fillOpacity=s.behaveLikeLine?.8:1),i.__super__.constructor.call(this,s)}var r;return o(i,n),r={fillOpacity:"auto",behaveLikeLine:!1},i.prototype.calcPoints=function(){var e,t,n,r,i,s,o;s=this.data,o=[];for(r=0,i=s.length;r=t;0<=t?e++:e--)a.push(e);return a}.apply(this):t=function(){f=[];for(var e=u=this.options.ykeys.length-1;u<=0?e<=0:e>=0;u<=0?e++:e--)f.push(e);return f}.apply(this),l=[];for(i=0,s=t.length;ic;e=0<=c?++l:--l)u=this.data[this.data.length-1-e],t=this.drawXAxisLabel(u._x,f,u.label),a=t.getBBox(),t.transform("r"+ -this.options.xLabelAngle),n=t.getBBox(),t.transform("t0,"+n.height/2+"..."),this.options.xLabelAngle!==0&&(i=-0.5*a.width*Math.cos(this.options.xLabelAngle*Math.PI/180),t.transform("t"+i+",0...")),(o==null||o>=n.x+n.width||s!=null&&s>=n.x)&&n.x>=0&&n.x+n.width=0?this.transY(0):null,this.bars=function(){var u,d,v,m;v=this.data,m=[];for(r=u=0,d=v.length;u"+r.label+"",a=r.y;for(n=o=0,u=a.length;o\n "+this.options.labels[n]+":\n "+this.yLabelFormat(s)+"\n";return typeof this.options.hoverCallback=="function"&&(t=this.options.hoverCallback(e,this.options,t)),i=this.left+(e+.5)*this.width/this.data.length,[t,i]},r.prototype.drawXAxisLabel=function(e,t,n){var r;return r=this.raphael.text(e,t,n).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},r.prototype.drawBar=function(e,t,n,r,i){return this.raphael.rect(e,t,n,r).attr("fill",i).attr("stroke-width",0)},r}(t.Grid),t.Donut=function(n){function r(n){this.select=u(this.select,this),this.click=u(this.click,this);var r;if(!(this instanceof t.Donut))return new t.Donut(n);typeof n.element=="string"?this.el=e(document.getElementById(n.element)):this.el=e(n.element),this.options=e.extend({},this.defaults,n);if(this.el===null||this.el.length===0)throw new Error("Graph placeholder not found.");if(n.data===void 0||n.data.length===0)return;this.data=n.data,this.values=function(){var e,t,n,i;n=this.data,i=[];for(e=0,t=n.length;eMath.PI?1:0,this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5),this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer),this.hilight=this.calcArc(this.inner)}return o(t,e),t.prototype.calcArcPoints=function(e){return[this.cx+e*this.sin_p0,this.cy+e*this.cos_p0,this.cx+e*this.sin_p1,this.cy+e*this.cos_p1]},t.prototype.calcSegment=function(e,t){var n,r,i,s,o,u,a,f,l,c;return l=this.calcArcPoints(e),n=l[0],i=l[1],r=l[2],s=l[3],c=this.calcArcPoints(t),o=c[0],a=c[1],u=c[2],f=c[3],"M"+n+","+i+("A"+e+","+e+",0,"+this.is_long+",0,"+r+","+s)+("L"+u+","+f)+("A"+t+","+t+",0,"+this.is_long+",1,"+o+","+a)+"Z"},t.prototype.calcArc=function(e){var t,n,r,i,s;return s=this.calcArcPoints(e),t=s[0],r=s[1],n=s[2],i=s[3],"M"+t+","+r+("A"+e+","+e+",0,"+this.is_long+",0,"+n+","+i)},t.prototype.render=function(){var e=this;return this.arc=this.drawDonutArc(this.hilight,this.color),this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return e.fire("hover",e.index)},function(){return e.fire("click",e.index)})},t.prototype.drawDonutArc=function(e,t){return this.raphael.path(e).attr({stroke:t,"stroke-width":2,opacity:0})},t.prototype.drawDonutSegment=function(e,t,n,r,i){return this.raphael.path(e).attr({fill:t,stroke:n,"stroke-width":3}).hover(r).click(i)},t.prototype.select=function(){if(!this.selected)return this.seg.animate({path:this.selectedPath},150,"<>"),this.arc.animate({opacity:1},150,"<>"),this.selected=!0},t.prototype.deselect=function(){if(this.selected)return this.seg.animate({path:this.path},150,"<>"),this.arc.animate({opacity:0},150,"<>"),this.selected=!1},t}(t.EventEmitter)}).call(this); \ No newline at end of file diff --git a/report/assets/scripts/vendor/raphael-min.js b/report/assets/scripts/vendor/raphael-min.js new file mode 100644 index 00000000..0db6896f --- /dev/null +++ b/report/assets/scripts/vendor/raphael-min.js @@ -0,0 +1,34 @@ +// ┌────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.0 - JavaScript Vector Library │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ +// └────────────────────────────────────────────────────────────────────┘ \\ + +(function (a) { const b = '0.3.4'; const c = 'hasOwnProperty'; const d = /[\.\/]/; const e = '*'; const f = function () {}; const g = function (a, b) { return a - b; }; let h; let i; const j = { n: {} }; const k = function (a, b) { const c = j; const d = i; const e = Array.prototype.slice.call(arguments, 2); const f = k.listeners(a); let l = 0; const m = !1; let n; const o = []; const p = {}; const q = []; const r = h; const s = []; h = a, i = 0; for (var t = 0, u = f.length; t < u; t++)'zIndex' in f[t] && (o.push(f[t].zIndex), f[t].zIndex < 0 && (p[f[t].zIndex] = f[t])); o.sort(g); while (o[l] < 0) { n = p[o[l++]], q.push(n.apply(b, e)); if (i) { i = d; return q; } } for (t = 0; t < u; t++) { n = f[t]; if ('zIndex' in n) if (n.zIndex == o[l]) { q.push(n.apply(b, e)); if (i) break; do { l++, n = p[o[l]], n && q.push(n.apply(b, e)); if (i) break; } while (n); } else p[n.zIndex] = n; else { q.push(n.apply(b, e)); if (i) break; } }i = d, h = r; return q.length ? q : null; }; k.listeners = function (a) { const b = a.split(d); let c = j; let f; let g; let h; let i; let k; let l; let m; let n; let o = [c]; let p = []; for (i = 0, k = b.length; i < k; i++) { n = []; for (l = 0, m = o.length; l < m; l++) { c = o[l].n, g = [c[b[i]], c[e]], h = 2; while (h--)f = g[h], f && (n.push(f), p = p.concat(f.f || [])); }o = n; } return p; }, k.on = function (a, b) { const c = a.split(d); let e = j; for (var g = 0, h = c.length; g < h; g++)e = e.n, !e[c[g]] && (e[c[g]] = { n: {} }), e = e[c[g]]; e.f = e.f || []; for (g = 0, h = e.f.length; g < h; g++) if (e.f[g] == b) return f; e.f.push(b); return function (a) { +a == +a && (b.zIndex = +a); }; }, k.stop = function () { i = 1; }, k.nt = function (a) { if (a) return (new RegExp(`(?:\\.|\\/|^)${a}(?:\\.|\\/|$)`)).test(h); return h; }, k.off = k.unbind = function (a, b) { const f = a.split(d); let g; let h; let i; let k; let l; let m; let n; const o = [j]; for (k = 0, l = f.length; k < l; k++) for (m = 0; m < o.length; m += i.length - 2) { i = [m, 1], g = o[m].n; if (f[k] != e)g[f[k]] && i.push(g[f[k]]); else for (h in g)g[c](h) && i.push(g[h]); o.splice.apply(o, i); } for (k = 0, l = o.length; k < l; k++) { g = o[k]; while (g.n) { if (b) { if (g.f) { for (m = 0, n = g.f.length; m < n; m++) if (g.f[m] == b) { g.f.splice(m, 1); break; }!g.f.length && delete g.f; } for (h in g.n) if (g.n[c](h) && g.n[h].f) { const p = g.n[h].f; for (m = 0, n = p.length; m < n; m++) if (p[m] == b) { p.splice(m, 1); break; }!p.length && delete g.n[h].f; } } else { delete g.f; for (h in g.n)g.n[c](h) && g.n[h].f && delete g.n[h].f; }g = g.n; } } }, k.once = function (a, b) { const c = function () { const d = b.apply(this, arguments); k.unbind(a, c); return d; }; return k.on(a, c); }, k.version = b, k.toString = function () { return `You are running Eve ${b}`; }, typeof module !== 'undefined' && module.exports ? module.exports = k : typeof define !== 'undefined' ? define('eve', [], () => k) : a.eve = k; }(this)), (function () { + function cF(a) { for (let b = 0; b < cy.length; b++)cy[b].el.paper == a && cy.splice(b--, 1); } function cE(b, d, e, f, h, i) { + e = Q(e); let j; let k; let l; const m = []; let o; let p; let q; let t = b.ms; const u = {}; const v = {}; const w = {}; if (f) for (y = 0, z = cy.length; y < z; y++) { var x = cy[y]; if (x.el.id == d.id && x.anim == b) { x.percent != e ? (cy.splice(y, 1), l = 1) : k = x, d.attr(x.totalOrigin); break; } } else f = +v; for (var y = 0, z = b.percents.length; y < z; y++) { if (b.percents[y] == e || b.percents[y] > f * b.top) { e = b.percents[y], p = b.percents[y - 1] || 0, t = t / b.top * (e - p), o = b.percents[y + 1], j = b.anim[e]; break; }f && d.attr(b.anim[b.percents[y]]); } if (j) { + if (!k) { + for (const A in j) { + if (j[g](A)) { + if (U[g](A) || d.paper.customAttributes[g](A)) { + u[A] = d.attr(A), u[A] == null && (u[A] = T[A]), v[A] = j[A]; switch (U[A]) { + case C: w[A] = (v[A] - u[A]) / t; break; case 'colour': u[A] = a.getRGB(u[A]); var B = a.getRGB(v[A]); w[A] = { r: (B.r - u[A].r) / t, g: (B.g - u[A].g) / t, b: (B.b - u[A].b) / t }; break; case 'path': var D = bR(u[A], v[A]); var E = D[1]; u[A] = D[0], w[A] = []; for (y = 0, z = u[A].length; y < z; y++) { w[A][y] = [0]; for (var F = 1, G = u[A][y].length; F < G; F++)w[A][y][F] = (E[y][F] - u[A][y][F]) / t; } break; case 'transform': var H = d._; var I = ca(H[A], v[A]); if (I) { u[A] = I.from, v[A] = I.to, w[A] = [], w[A].real = !0; for (y = 0, z = u[A].length; y < z; y++) { w[A][y] = [u[A][y][0]]; for (F = 1, G = u[A][y].length; F < G; F++)w[A][y][F] = (v[A][y][F] - u[A][y][F]) / t; } } else { + const J = d.matrix || new cb(); const + K = { _: { transform: H.transform }, getBBox: function () { return d.getBBox(1); } }; u[A] = [J.a, J.b, J.c, J.d, J.e, J.f], b$(K, v[A]), v[A] = K._.transform, w[A] = [(K.matrix.a - J.a) / t, (K.matrix.b - J.b) / t, (K.matrix.c - J.c) / t, (K.matrix.d - J.d) / t, (K.matrix.e - J.e) / t, (K.matrix.f - J.f) / t]; + } break; case 'csv': var L = r(j[A])[s](c); var M = r(u[A])[s](c); if (A == 'clip-rect') { u[A] = M, w[A] = [], y = M.length; while (y--)w[A][y] = (L[y] - u[A][y]) / t; }v[A] = L; break; default: L = [][n](j[A]), M = [][n](u[A]), w[A] = [], y = d.paper.customAttributes[A].length; while (y--)w[A][y] = ((L[y] || 0) - (M[y] || 0)) / t; + } + } + } + } const O = j.easing; let P = a.easing_formulas[O]; if (!P) { P = r(O).match(N); if (P && P.length == 5) { const R = P; P = function (a) { return cC(a, +R[1], +R[2], +R[3], +R[4], t); }; } else P = bf; }q = j.start || b.start || +(new Date()), x = { anim: b, percent: e, timestamp: q, start: q + (b.del || 0), status: 0, initstatus: f || 0, stop: !1, ms: t, easing: P, from: u, diff: w, to: v, el: d, callback: j.callback, prev: p, next: o, repeat: i || b.times, origin: d.attr(), totalOrigin: h }, cy.push(x); if (f && !k && !l) { x.stop = !0, x.start = new Date() - t * f; if (cy.length == 1) return cA(); }l && (x.start = new Date() - x.ms * f), cy.length == 1 && cz(cA); + } else k.initstatus = f, k.start = new Date() - k.ms * f; eve(`raphael.anim.start.${d.id}`, d, b); + } + } function cD(a, b) { const c = []; const d = {}; this.ms = b, this.times = 1; if (a) { for (const e in a)a[g](e) && (d[Q(e)] = a[e], c.push(Q(e))); c.sort(bd); } this.anim = d, this.top = c[c.length - 1], this.percents = c; } function cC(a, b, c, d, e, f) { function o(a, b) { let c; let d; let e; let f; let j; let k; for (e = a, k = 0; k < 8; k++) { f = m(e) - a; if (z(f) < b) return e; j = (3 * i * e + 2 * h) * e + g; if (z(j) < 1e-6) break; e -= f / j; }c = 0, d = 1, e = a; if (e < c) return c; if (e > d) return d; while (c < d) { f = m(e); if (z(f - a) < b) return e; a > f ? c = e : d = e, e = (d - c) / 2 + c; } return e; } function n(a, b) { const c = o(a, b); return ((l * c + k) * c + j) * c; } function m(a) { return ((i * a + h) * a + g) * a; } var g = 3 * b; var h = 3 * (d - b) - g; var i = 1 - g - h; var j = 3 * c; var k = 3 * (e - c) - j; var l = 1 - j - k; return n(a, 1 / (200 * f)); } function cq() { return `${this.x + q + this.y + q + this.width} × ${this.height}`; } function cp() { return this.x + q + this.y; } function cb(a, b, c, d, e, f) { a != null ? (this.a = +a, this.b = +b, this.c = +c, this.d = +d, this.e = +e, this.f = +f) : (this.a = 1, this.b = 0, this.c = 0, this.d = 1, this.e = 0, this.f = 0); } function bH(b, c, d) { b = a._path2curve(b), c = a._path2curve(c); let e; let f; let g; let h; let i; let j; let k; let l; let m; let n; let o = d ? 0 : []; for (let p = 0, q = b.length; p < q; p++) { const r = b[p]; if (r[0] == 'M')e = i = r[1], f = j = r[2]; else { r[0] == 'C' ? (m = [e, f].concat(r.slice(1)), e = m[6], f = m[7]) : (m = [e, f, e, f, i, j, i, j], e = i, f = j); for (let s = 0, t = c.length; s < t; s++) { const u = c[s]; if (u[0] == 'M')g = k = u[1], h = l = u[2]; else { u[0] == 'C' ? (n = [g, h].concat(u.slice(1)), g = n[6], h = n[7]) : (n = [g, h, g, h, k, l, k, l], g = k, h = l); const v = bG(m, n, d); if (d)o += v; else { for (let w = 0, x = v.length; w < x; w++)v[w].segment1 = p, v[w].segment2 = s, v[w].bez1 = m, v[w].bez2 = n; o = o.concat(v); } } } } } return o; } function bG(b, c, d) { const e = a.bezierBBox(b); const f = a.bezierBBox(c); if (!a.isBBoxIntersect(e, f)) return d ? 0 : []; const g = bB.apply(0, b); const h = bB.apply(0, c); const i = ~~(g / 5); const j = ~~(h / 5); const k = []; const l = []; const m = {}; let n = d ? 0 : []; for (var o = 0; o < i + 1; o++) { var p = a.findDotsAtSegment.apply(a, b.concat(o / i)); k.push({ x: p.x, y: p.y, t: o / i }); } for (o = 0; o < j + 1; o++)p = a.findDotsAtSegment.apply(a, c.concat(o / j)), l.push({ x: p.x, y: p.y, t: o / j }); for (o = 0; o < i; o++) for (let q = 0; q < j; q++) { const r = k[o]; const s = k[o + 1]; const t = l[q]; const u = l[q + 1]; const v = z(s.x - r.x) < 0.001 ? 'y' : 'x'; const w = z(u.x - t.x) < 0.001 ? 'y' : 'x'; const x = bD(r.x, r.y, s.x, s.y, t.x, t.y, u.x, u.y); if (x) { if (m[x.x.toFixed(4)] == x.y.toFixed(4)) continue; m[x.x.toFixed(4)] = x.y.toFixed(4); const y = r.t + z((x[v] - r[v]) / (s[v] - r[v])) * (s.t - r.t); const A = t.t + z((x[w] - t[w]) / (u[w] - t[w])) * (u.t - t.t); y >= 0 && y <= 1 && A >= 0 && A <= 1 && (d ? n++ : n.push({ x: x.x, y: x.y, t1: y, t2: A })); } } return n; } function bF(a, b) { return bG(a, b, 1); } function bE(a, b) { return bG(a, b); } function bD(a, b, c, d, e, f, g, h) { if (!(x(a, c) < y(e, g) || y(a, c) > x(e, g) || x(b, d) < y(f, h) || y(b, d) > x(f, h))) { const i = (a * d - b * c) * (e - g) - (a - c) * (e * h - f * g); const j = (a * d - b * c) * (f - h) - (b - d) * (e * h - f * g); const k = (a - c) * (f - h) - (b - d) * (e - g); if (!k) return; const l = i / k; const m = j / k; const n = +l.toFixed(2); const o = +m.toFixed(2); if (n < +y(a, c).toFixed(2) || n > +x(a, c).toFixed(2) || n < +y(e, g).toFixed(2) || n > +x(e, g).toFixed(2) || o < +y(b, d).toFixed(2) || o > +x(b, d).toFixed(2) || o < +y(f, h).toFixed(2) || o > +x(f, h).toFixed(2)) return; return { x: l, y: m }; } } function bC(a, b, c, d, e, f, g, h, i) { if (!(i < 0 || bB(a, b, c, d, e, f, g, h) < i)) { const j = 1; let k = j / 2; let l = j - k; let m; const n = 0.01; m = bB(a, b, c, d, e, f, g, h, l); while (z(m - i) > n)k /= 2, l += (m < i ? 1 : -1) * k, m = bB(a, b, c, d, e, f, g, h, l); return l; } } function bB(a, b, c, d, e, f, g, h, i) { i == null && (i = 1), i = i > 1 ? 1 : i < 0 ? 0 : i; const j = i / 2; const k = 12; const l = [-0.1252, 0.1252, -0.3678, 0.3678, -0.5873, 0.5873, -0.7699, 0.7699, -0.9041, 0.9041, -0.9816, 0.9816]; const m = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472]; let n = 0; for (let o = 0; o < k; o++) { const p = j * l[o] + j; const q = bA(p, a, c, e, g); const r = bA(p, b, d, f, h); const s = q * q + r * r; n += m[o] * w.sqrt(s); } return j * n; } function bA(a, b, c, d, e) { const f = -3 * b + 9 * c - 9 * d + 3 * e; const g = a * f + 6 * b - 12 * c + 6 * d; return a * g - 3 * b + 3 * c; } function by(a, b) { const c = []; for (let d = 0, e = a.length; e - 2 * !b > d; d += 2) { const f = [{ x: +a[d - 2], y: +a[d - 1] }, { x: +a[d], y: +a[d + 1] }, { x: +a[d + 2], y: +a[d + 3] }, { x: +a[d + 4], y: +a[d + 5] }]; b ? d ? e - 4 == d ? f[3] = { x: +a[0], y: +a[1] } : e - 2 == d && (f[2] = { x: +a[0], y: +a[1] }, f[3] = { x: +a[2], y: +a[3] }) : f[0] = { x: +a[e - 2], y: +a[e - 1] } : e - 4 == d ? f[3] = f[2] : d || (f[0] = { x: +a[d], y: +a[d + 1] }), c.push(['C', (-f[0].x + 6 * f[1].x + f[2].x) / 6, (-f[0].y + 6 * f[1].y + f[2].y) / 6, (f[1].x + 6 * f[2].x - f[3].x) / 6, (f[1].y + 6 * f[2].y - f[3].y) / 6, f[2].x, f[2].y]); } return c; } function bx() { return this.hex; } function bv(a, b, c) { function d() { const e = Array.prototype.slice.call(arguments, 0); const f = e.join('␀'); const h = d.cache = d.cache || {}; const i = d.count = d.count || []; if (h[g](f)) { bu(i, f); return c ? c(h[f]) : h[f]; }i.length >= 1e3 && delete h[i.shift()], i.push(f), h[f] = a[m](b, e); return c ? c(h[f]) : h[f]; } return d; } function bu(a, b) { for (let c = 0, d = a.length; c < d; c++) if (a[c] === b) return a.push(a.splice(c, 1)[0]); } function bm(a) { if (Object(a) !== a) return a; const b = new a.constructor(); for (const c in a)a[g](c) && (b[c] = bm(a[c])); return b; } function a(c) { if (a.is(c, 'function')) return b ? c() : eve.on('raphael.DOMload', c); if (a.is(c, E)) return a._engine.create[m](a, c.splice(0, 3 + a.is(c[0], C))).add(c); const d = Array.prototype.slice.call(arguments, 0); if (a.is(d[d.length - 1], 'function')) { const e = d.pop(); return b ? e.call(a._engine.create[m](a, d)) : eve.on('raphael.DOMload', () => { e.call(a._engine.create[m](a, d)); }); } return a._engine.create[m](a, arguments); }a.version = '2.1.0', a.eve = eve; let b; var c = /[, ]+/; const d = { circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1 }; const e = /\{(\d+)\}/g; const f = 'prototype'; var g = 'hasOwnProperty'; const h = { doc: document, win: window }; const i = { was: Object.prototype[g].call(h.win, 'Raphael'), is: h.win.Raphael }; const j = function () { this.ca = this.customAttributes = {}; }; let k; const l = 'appendChild'; var m = 'apply'; var n = 'concat'; const o = 'createTouch' in h.doc; const p = ''; var q = ' '; var r = String; var s = 'split'; const t = 'click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel'[s](q); const u = { mousedown: 'touchstart', mousemove: 'touchmove', mouseup: 'touchend' }; const v = r.prototype.toLowerCase; var w = Math; var x = w.max; var y = w.min; var z = w.abs; const A = w.pow; const B = w.PI; var C = 'number'; const D = 'string'; var E = 'array'; const F = 'toString'; const G = 'fill'; const H = Object.prototype.toString; const I = {}; const J = 'push'; const K = a._ISURL = /^url\(['"]?([^\)]+?)['"]?\)$/i; const L = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i; const M = { NaN: 1, Infinity: 1, '-Infinity': 1 }; var N = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/; const O = w.round; const P = 'setAttribute'; var Q = parseFloat; const R = parseInt; const S = r.prototype.toUpperCase; var T = a._availableAttrs = { 'arrow-end': 'none', 'arrow-start': 'none', blur: 0, 'clip-rect': '0 0 1e9 1e9', cursor: 'default', cx: 0, cy: 0, fill: '#fff', 'fill-opacity': 1, font: '10px "Arial"', 'font-family': '"Arial"', 'font-size': '10', 'font-style': 'normal', 'font-weight': 400, gradient: 0, height: 0, href: 'http://raphaeljs.com/', 'letter-spacing': 0, opacity: 1, path: 'M0,0', r: 0, rx: 0, ry: 0, src: '', stroke: '#000', 'stroke-dasharray': '', 'stroke-linecap': 'butt', 'stroke-linejoin': 'butt', 'stroke-miterlimit': 0, 'stroke-opacity': 1, 'stroke-width': 1, target: '_blank', 'text-anchor': 'middle', title: 'Raphael', transform: '', width: 0, x: 0, y: 0 }; var U = a._availableAnimAttrs = { blur: C, 'clip-rect': 'csv', cx: C, cy: C, fill: 'colour', 'fill-opacity': C, 'font-size': C, height: C, opacity: C, path: 'path', r: C, rx: C, ry: C, stroke: 'colour', 'stroke-opacity': C, 'stroke-width': C, transform: 'transform', width: C, x: C, y: C }; const V = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g; const W = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/; const X = { hs: 1, rg: 1 }; const Y = /,?([achlmqrstvxz]),?/gi; const Z = /([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig; const $ = /([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig; const _ = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig; const ba = a._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/; const bb = {}; const bc = function (a, b) { return a.key - b.key; }; var bd = function (a, b) { return Q(a) - Q(b); }; const be = function () {}; var bf = function (a) { return a; }; const bg = a._rectPath = function (a, b, c, d, e) { if (e) return [['M', a + e, b], ['l', c - e * 2, 0], ['a', e, e, 0, 0, 1, e, e], ['l', 0, d - e * 2], ['a', e, e, 0, 0, 1, -e, e], ['l', e * 2 - c, 0], ['a', e, e, 0, 0, 1, -e, -e], ['l', 0, e * 2 - d], ['a', e, e, 0, 0, 1, e, -e], ['z']]; return [['M', a, b], ['l', c, 0], ['l', 0, d], ['l', -c, 0], ['z']]; }; const bh = function (a, b, c, d) { d == null && (d = c); return [['M', a, b], ['m', 0, -d], ['a', c, d, 0, 1, 1, 0, 2 * d], ['a', c, d, 0, 1, 1, 0, -2 * d], ['z']]; }; const bi = a._getPath = { path: function (a) { return a.attr('path'); }, circle: function (a) { const b = a.attrs; return bh(b.cx, b.cy, b.r); }, ellipse: function (a) { const b = a.attrs; return bh(b.cx, b.cy, b.rx, b.ry); }, rect: function (a) { const b = a.attrs; return bg(b.x, b.y, b.width, b.height, b.r); }, image: function (a) { const b = a.attrs; return bg(b.x, b.y, b.width, b.height); }, text: function (a) { const b = a._getBBox(); return bg(b.x, b.y, b.width, b.height); } }; const bj = a.mapPath = function (a, b) { if (!b) return a; let c; let d; let e; let f; let g; let h; let i; a = bR(a); for (e = 0, g = a.length; e < g; e++) { i = a[e]; for (f = 1, h = i.length; f < h; f += 2)c = b.x(i[f], i[f + 1]), d = b.y(i[f], i[f + 1]), i[f] = c, i[f + 1] = d; } return a; }; a._g = h, a.type = h.win.SVGAngle || h.doc.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1') ? 'SVG' : 'VML'; if (a.type == 'VML') { let bk = h.doc.createElement('div'); let bl; bk.innerHTML = '', bl = bk.firstChild, bl.style.behavior = 'url(#default#VML)'; if (!bl || typeof bl.adj !== 'object') return a.type = p; bk = null; }a.svg = !(a.vml = a.type == 'VML'), a._Paper = j, a.fn = k = j.prototype = a.prototype, a._id = 0, a._oid = 0, a.is = function (a, b) { b = v.call(b); if (b == 'finite') return !M[g](+a); if (b == 'array') return a instanceof Array; return b == 'null' && a === null || b === typeof a && a !== null || b == 'object' && a === Object(a) || b == 'array' && Array.isArray && Array.isArray(a) || H.call(a).slice(8, -1).toLowerCase() == b; }, a.angle = function (b, c, d, e, f, g) { if (f == null) { const h = b - d; const i = c - e; if (!h && !i) return 0; return (180 + w.atan2(-i, -h) * 180 / B + 360) % 360; } return a.angle(b, c, f, g) - a.angle(d, e, f, g); }, a.rad = function (a) { return a % 360 * B / 180; }, a.deg = function (a) { return a * 180 / B % 360; }, a.snapTo = function (b, c, d) { d = a.is(d, 'finite') ? d : 10; if (a.is(b, E)) { let e = b.length; while (e--) if (z(b[e] - c) <= d) return b[e]; } else { b = +b; const f = c % b; if (f < d) return c - f; if (f > b - d) return c - f + b; } return c; }; const bn = a.createUUID = (function (a, b) { return function () { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(a, b).toUpperCase(); }; }(/[xy]/g, (a) => { const b = w.random() * 16 | 0; const c = a == 'x' ? b : b & 3 | 8; return c.toString(16); })); a.setWindow = function (b) { eve('raphael.setWindow', a, h.win, b), h.win = b, h.doc = h.win.document, a._engine.initWin && a._engine.initWin(h.win); }; let bo = function (b) { if (a.vml) { const c = /^\s+|\s+$/g; let d; try { const e = new ActiveXObject('htmlfile'); e.write(''), e.close(), d = e.body; } catch (f) { d = createPopup().document.body; } const g = d.createTextRange(); bo = bv((a) => { try { d.style.color = r(a).replace(c, p); let b = g.queryCommandValue('ForeColor'); b = (b & 255) << 16 | b & 65280 | (b & 16711680) >>> 16; return `#${(`000000${b.toString(16)}`).slice(-6)}`; } catch (e) { return 'none'; } }); } else { const i = h.doc.createElement('i'); i.title = 'Raphaël Colour Picker', i.style.display = 'none', h.doc.body.appendChild(i), bo = bv((a) => { i.style.color = a; return h.doc.defaultView.getComputedStyle(i, p).getPropertyValue('color'); }); } return bo(b); }; const bp = function () { return `hsb(${[this.h, this.s, this.b]})`; }; const bq = function () { return `hsl(${[this.h, this.s, this.l]})`; }; const br = function () { return this.hex; }; const bs = function (b, c, d) { c == null && a.is(b, 'object') && 'r' in b && 'g' in b && 'b' in b && (d = b.b, c = b.g, b = b.r); if (c == null && a.is(b, D)) { const e = a.getRGB(b); b = e.r, c = e.g, d = e.b; } if (b > 1 || c > 1 || d > 1)b /= 255, c /= 255, d /= 255; return [b, c, d]; }; const bt = function (b, c, d, e) { b *= 255, c *= 255, d *= 255; const f = { r: b, g: c, b: d, hex: a.rgb(b, c, d), toString: br }; a.is(e, 'finite') && (f.opacity = e); return f; }; a.color = function (b) { let c; a.is(b, 'object') && 'h' in b && 's' in b && 'b' in b ? (c = a.hsb2rgb(b), b.r = c.r, b.g = c.g, b.b = c.b, b.hex = c.hex) : a.is(b, 'object') && 'h' in b && 's' in b && 'l' in b ? (c = a.hsl2rgb(b), b.r = c.r, b.g = c.g, b.b = c.b, b.hex = c.hex) : (a.is(b, 'string') && (b = a.getRGB(b)), a.is(b, 'object') && 'r' in b && 'g' in b && 'b' in b ? (c = a.rgb2hsl(b), b.h = c.h, b.s = c.s, b.l = c.l, c = a.rgb2hsb(b), b.v = c.b) : (b = { hex: 'none' }, b.r = b.g = b.b = b.h = b.s = b.v = b.l = -1)), b.toString = br; return b; }, a.hsb2rgb = function (a, b, c, d) { this.is(a, 'object') && 'h' in a && 's' in a && 'b' in a && (c = a.b, b = a.s, a = a.h, d = a.o), a *= 360; let e; let f; let g; let h; let i; a = a % 360 / 60, i = c * b, h = i * (1 - z(a % 2 - 1)), e = f = g = c - i, a = ~~a, e += [i, h, 0, 0, h, i][a], f += [h, i, i, h, 0, 0][a], g += [0, 0, h, i, i, h][a]; return bt(e, f, g, d); }, a.hsl2rgb = function (a, b, c, d) { this.is(a, 'object') && 'h' in a && 's' in a && 'l' in a && (c = a.l, b = a.s, a = a.h); if (a > 1 || b > 1 || c > 1)a /= 360, b /= 100, c /= 100; a *= 360; let e; let f; let g; let h; let i; a = a % 360 / 60, i = 2 * b * (c < 0.5 ? c : 1 - c), h = i * (1 - z(a % 2 - 1)), e = f = g = c - i / 2, a = ~~a, e += [i, h, 0, 0, h, i][a], f += [h, i, i, h, 0, 0][a], g += [0, 0, h, i, i, h][a]; return bt(e, f, g, d); }, a.rgb2hsb = function (a, b, c) { c = bs(a, b, c), a = c[0], b = c[1], c = c[2]; let d; let e; let f; let g; f = x(a, b, c), g = f - y(a, b, c), d = g == 0 ? null : f == a ? (b - c) / g : f == b ? (c - a) / g + 2 : (a - b) / g + 4, d = (d + 360) % 6 * 60 / 360, e = g == 0 ? 0 : g / f; return { h: d, s: e, b: f, toString: bp }; }, a.rgb2hsl = function (a, b, c) { c = bs(a, b, c), a = c[0], b = c[1], c = c[2]; let d; let e; let f; let g; let h; let i; g = x(a, b, c), h = y(a, b, c), i = g - h, d = i == 0 ? null : g == a ? (b - c) / i : g == b ? (c - a) / i + 2 : (a - b) / i + 4, d = (d + 360) % 6 * 60 / 360, f = (g + h) / 2, e = i == 0 ? 0 : f < 0.5 ? i / (2 * f) : i / (2 - 2 * f); return { h: d, s: e, l: f, toString: bq }; }, a._path2string = function () { return this.join(',').replace(Y, '$1'); }; const bw = a._preload = function (a, b) { const c = h.doc.createElement('img'); c.style.cssText = 'position:absolute;left:-9999em;top:-9999em', c.onload = function () { b.call(this), this.onload = null, h.doc.body.removeChild(this); }, c.onerror = function () { h.doc.body.removeChild(this); }, h.doc.body.appendChild(c), c.src = a; }; a.getRGB = bv((b) => { if (!b || !!((b = r(b)).indexOf('-') + 1)) return { r: -1, g: -1, b: -1, hex: 'none', error: 1, toString: bx }; if (b == 'none') return { r: -1, g: -1, b: -1, hex: 'none', toString: bx }; !X[g](b.toLowerCase().substring(0, 2)) && b.charAt() != '#' && (b = bo(b)); let c; let d; let e; let f; let h; let i; let j; let k = b.match(L); if (k) { k[2] && (f = R(k[2].substring(5), 16), e = R(k[2].substring(3, 5), 16), d = R(k[2].substring(1, 3), 16)), k[3] && (f = R((i = k[3].charAt(3)) + i, 16), e = R((i = k[3].charAt(2)) + i, 16), d = R((i = k[3].charAt(1)) + i, 16)), k[4] && (j = k[4][s](W), d = Q(j[0]), j[0].slice(-1) == '%' && (d *= 2.55), e = Q(j[1]), j[1].slice(-1) == '%' && (e *= 2.55), f = Q(j[2]), j[2].slice(-1) == '%' && (f *= 2.55), k[1].toLowerCase().slice(0, 4) == 'rgba' && (h = Q(j[3])), j[3] && j[3].slice(-1) == '%' && (h /= 100)); if (k[5]) { j = k[5][s](W), d = Q(j[0]), j[0].slice(-1) == '%' && (d *= 2.55), e = Q(j[1]), j[1].slice(-1) == '%' && (e *= 2.55), f = Q(j[2]), j[2].slice(-1) == '%' && (f *= 2.55), (j[0].slice(-3) == 'deg' || j[0].slice(-1) == '°') && (d /= 360), k[1].toLowerCase().slice(0, 4) == 'hsba' && (h = Q(j[3])), j[3] && j[3].slice(-1) == '%' && (h /= 100); return a.hsb2rgb(d, e, f, h); } if (k[6]) { j = k[6][s](W), d = Q(j[0]), j[0].slice(-1) == '%' && (d *= 2.55), e = Q(j[1]), j[1].slice(-1) == '%' && (e *= 2.55), f = Q(j[2]), j[2].slice(-1) == '%' && (f *= 2.55), (j[0].slice(-3) == 'deg' || j[0].slice(-1) == '°') && (d /= 360), k[1].toLowerCase().slice(0, 4) == 'hsla' && (h = Q(j[3])), j[3] && j[3].slice(-1) == '%' && (h /= 100); return a.hsl2rgb(d, e, f, h); }k = { r: d, g: e, b: f, toString: bx }, k.hex = `#${(16777216 | f | e << 8 | d << 16).toString(16).slice(1)}`, a.is(h, 'finite') && (k.opacity = h); return k; } return { r: -1, g: -1, b: -1, hex: 'none', error: 1, toString: bx }; }, a), a.hsb = bv((b, c, d) => a.hsb2rgb(b, c, d).hex), a.hsl = bv((b, c, d) => a.hsl2rgb(b, c, d).hex), a.rgb = bv((a, b, c) => `#${(16777216 | c | b << 8 | a << 16).toString(16).slice(1)}`), a.getColor = function (a) { const b = this.getColor.start = this.getColor.start || { h: 0, s: 1, b: a || 0.75 }; const c = this.hsb2rgb(b.h, b.s, b.b); b.h += 0.075, b.h > 1 && (b.h = 0, b.s -= 0.2, b.s <= 0 && (this.getColor.start = { h: 0, s: 1, b: b.b })); return c.hex; }, a.getColor.reset = function () { delete this.start; }, a.parsePathString = function (b) { if (!b) return null; const c = bz(b); if (c.arr) return bJ(c.arr); const d = { a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0 }; let e = []; a.is(b, E) && a.is(b[0], E) && (e = bJ(b)), e.length || r(b).replace(Z, (a, b, c) => { const f = []; let g = b.toLowerCase(); c.replace(_, (a, b) => { b && f.push(+b); }), g == 'm' && f.length > 2 && (e.push([b][n](f.splice(0, 2))), g = 'l', b = b == 'm' ? 'l' : 'L'); if (g == 'r')e.push([b][n](f)); else while (f.length >= d[g]) { e.push([b][n](f.splice(0, d[g]))); if (!d[g]) break; } }), e.toString = a._path2string, c.arr = bJ(e); return e; }, a.parseTransformString = bv((b) => { if (!b) return null; const c = { r: 3, s: 4, t: 2, m: 6 }; let d = []; a.is(b, E) && a.is(b[0], E) && (d = bJ(b)), d.length || r(b).replace($, (a, b, c) => { const e = []; const f = v.call(b); c.replace(_, (a, b) => { b && e.push(+b); }), d.push([b][n](e)); }), d.toString = a._path2string; return d; }); var bz = function (a) { const b = bz.ps = bz.ps || {}; b[a] ? b[a].sleep = 100 : b[a] = { sleep: 100 }, setTimeout(() => { for (const c in b)b[g](c) && c != a && (b[c].sleep--, !b[c].sleep && delete b[c]); }); return b[a]; }; a.findDotsAtSegment = function (a, b, c, d, e, f, g, h, i) { const j = 1 - i; const k = j ** 3; const l = j ** 2; const m = i * i; const n = m * i; const o = k * a + l * 3 * i * c + j * 3 * i * i * e + n * g; const p = k * b + l * 3 * i * d + j * 3 * i * i * f + n * h; const q = a + 2 * i * (c - a) + m * (e - 2 * c + a); const r = b + 2 * i * (d - b) + m * (f - 2 * d + b); const s = c + 2 * i * (e - c) + m * (g - 2 * e + c); const t = d + 2 * i * (f - d) + m * (h - 2 * f + d); const u = j * a + i * c; const v = j * b + i * d; const x = j * e + i * g; const y = j * f + i * h; let z = 90 - w.atan2(q - s, r - t) * 180 / B; (q > s || r < t) && (z += 180); return { x: o, y: p, m: { x: q, y: r }, n: { x: s, y: t }, start: { x: u, y: v }, end: { x: x, y: y }, alpha: z }; }, a.bezierBBox = function (b, c, d, e, f, g, h, i) { a.is(b, 'array') || (b = [b, c, d, e, f, g, h, i]); const j = bQ.apply(null, b); return { x: j.min.x, y: j.min.y, x2: j.max.x, y2: j.max.y, width: j.max.x - j.min.x, height: j.max.y - j.min.y }; }, a.isPointInsideBBox = function (a, b, c) { return b >= a.x && b <= a.x2 && c >= a.y && c <= a.y2; }, a.isBBoxIntersect = function (b, c) { const d = a.isPointInsideBBox; return d(c, b.x, b.y) || d(c, b.x2, b.y) || d(c, b.x, b.y2) || d(c, b.x2, b.y2) || d(b, c.x, c.y) || d(b, c.x2, c.y) || d(b, c.x, c.y2) || d(b, c.x2, c.y2) || (b.x < c.x2 && b.x > c.x || c.x < b.x2 && c.x > b.x) && (b.y < c.y2 && b.y > c.y || c.y < b.y2 && c.y > b.y); }, a.pathIntersection = function (a, b) { return bH(a, b); }, a.pathIntersectionNumber = function (a, b) { return bH(a, b, 1); }, a.isPointInsidePath = function (b, c, d) { const e = a.pathBBox(b); return a.isPointInsideBBox(e, c, d) && bH(b, [['M', c, d], ['H', e.x2 + 10]], 1) % 2 == 1; }, a._removedFactory = function (a) { return function () { eve('raphael.log', null, `Raphaël: you are calling to method “${a}” of removed object`, a); }; }; const bI = a.pathBBox = function (a) { const b = bz(a); if (b.bbox) return b.bbox; if (!a) return { x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0 }; a = bR(a); let c = 0; let d = 0; let e = []; let f = []; let g; for (let h = 0, i = a.length; h < i; h++) { g = a[h]; if (g[0] == 'M')c = g[1], d = g[2], e.push(c), f.push(d); else { const j = bQ(c, d, g[1], g[2], g[3], g[4], g[5], g[6]); e = e[n](j.min.x, j.max.x), f = f[n](j.min.y, j.max.y), c = g[5], d = g[6]; } } const k = y[m](0, e); const l = y[m](0, f); const o = x[m](0, e); const p = x[m](0, f); const q = { x: k, y: l, x2: o, y2: p, width: o - k, height: p - l }; b.bbox = bm(q); return q; }; var bJ = function (b) { const c = bm(b); c.toString = a._path2string; return c; }; const bK = a._pathToRelative = function (b) { const c = bz(b); if (c.rel) return bJ(c.rel); if (!a.is(b, E) || !a.is(b && b[0], E))b = a.parsePathString(b); const d = []; let e = 0; let f = 0; let g = 0; let h = 0; let i = 0; b[0][0] == 'M' && (e = b[0][1], f = b[0][2], g = e, h = f, i++, d.push(['M', e, f])); for (let j = i, k = b.length; j < k; j++) { let l = d[j] = []; const m = b[j]; if (m[0] != v.call(m[0])) { l[0] = v.call(m[0]); switch (l[0]) { case 'a': l[1] = m[1], l[2] = m[2], l[3] = m[3], l[4] = m[4], l[5] = m[5], l[6] = +(m[6] - e).toFixed(3), l[7] = +(m[7] - f).toFixed(3); break; case 'v': l[1] = +(m[1] - f).toFixed(3); break; case 'm': g = m[1], h = m[2]; default: for (let n = 1, o = m.length; n < o; n++)l[n] = +(m[n] - (n % 2 ? e : f)).toFixed(3); } } else { l = d[j] = [], m[0] == 'm' && (g = m[1] + e, h = m[2] + f); for (let p = 0, q = m.length; p < q; p++)d[j][p] = m[p]; } const r = d[j].length; switch (d[j][0]) { case 'z': e = g, f = h; break; case 'h': e += +d[j][r - 1]; break; case 'v': f += +d[j][r - 1]; break; default: e += +d[j][r - 2], f += +d[j][r - 1]; } }d.toString = a._path2string, c.rel = bJ(d); return d; }; const bL = a._pathToAbsolute = function (b) { const c = bz(b); if (c.abs) return bJ(c.abs); if (!a.is(b, E) || !a.is(b && b[0], E))b = a.parsePathString(b); if (!b || !b.length) return [['M', 0, 0]]; let d = []; let e = 0; let f = 0; let g = 0; let h = 0; let i = 0; b[0][0] == 'M' && (e = +b[0][1], f = +b[0][2], g = e, h = f, i++, d[0] = ['M', e, f]); const j = b.length == 3 && b[0][0] == 'M' && b[1][0].toUpperCase() == 'R' && b[2][0].toUpperCase() == 'Z'; for (var k, l, m = i, o = b.length; m < o; m++) { d.push(k = []), l = b[m]; if (l[0] != S.call(l[0])) { k[0] = S.call(l[0]); switch (k[0]) { case 'A': k[1] = l[1], k[2] = l[2], k[3] = l[3], k[4] = l[4], k[5] = l[5], k[6] = +(l[6] + e), k[7] = +(l[7] + f); break; case 'V': k[1] = +l[1] + f; break; case 'H': k[1] = +l[1] + e; break; case 'R': var p = [e, f][n](l.slice(1)); for (var q = 2, r = p.length; q < r; q++)p[q] = +p[q] + e, p[++q] = +p[q] + f; d.pop(), d = d[n](by(p, j)); break; case 'M': g = +l[1] + e, h = +l[2] + f; default: for (q = 1, r = l.length; q < r; q++)k[q] = +l[q] + (q % 2 ? e : f); } } else if (l[0] == 'R')p = [e, f][n](l.slice(1)), d.pop(), d = d[n](by(p, j)), k = ['R'][n](l.slice(-2)); else for (let s = 0, t = l.length; s < t; s++)k[s] = l[s]; switch (k[0]) { case 'Z': e = g, f = h; break; case 'H': e = k[1]; break; case 'V': f = k[1]; break; case 'M': g = k[k.length - 2], h = k[k.length - 1]; default: e = k[k.length - 2], f = k[k.length - 1]; } }d.toString = a._path2string, c.abs = bJ(d); return d; }; const bM = function (a, b, c, d) { return [a, b, c, d, c, d]; }; const bN = function (a, b, c, d, e, f) { const g = 1 / 3; const h = 2 / 3; return [g * a + h * c, g * b + h * d, g * e + h * c, g * f + h * d, e, f]; }; const bO = function (a, b, c, d, e, f, g, h, i, j) { const k = B * 120 / 180; const l = B / 180 * (+e || 0); let m = []; let o; const p = bv((a, b, c) => { const d = a * w.cos(c) - b * w.sin(c); const e = a * w.sin(c) + b * w.cos(c); return { x: d, y: e }; }); if (!j) { o = p(a, b, -l), a = o.x, b = o.y, o = p(h, i, -l), h = o.x, i = o.y; const q = w.cos(B / 180 * e); const r = w.sin(B / 180 * e); const t = (a - h) / 2; const u = (b - i) / 2; let v = t * t / (c * c) + u * u / (d * d); v > 1 && (v = w.sqrt(v), c = v * c, d = v * d); const x = c * c; const y = d * d; const A = (f == g ? -1 : 1) * w.sqrt(z((x * y - x * u * u - y * t * t) / (x * u * u + y * t * t))); var C = A * c * u / d + (a + h) / 2; var D = A * -d * t / c + (b + i) / 2; var E = w.asin(((b - D) / d).toFixed(9)); var F = w.asin(((i - D) / d).toFixed(9)); E = a < C ? B - E : E, F = h < C ? B - F : F, E < 0 && (E = B * 2 + E), F < 0 && (F = B * 2 + F), g && E > F && (E -= B * 2), !g && F > E && (F -= B * 2); } else E = j[0], F = j[1], C = j[2], D = j[3]; let G = F - E; if (z(G) > k) { const H = F; const I = h; const J = i; F = E + k * (g && F > E ? 1 : -1), h = C + c * w.cos(F), i = D + d * w.sin(F), m = bO(h, i, c, d, e, 0, g, I, J, [F, H, C, D]); }G = F - E; const K = w.cos(E); const L = w.sin(E); const M = w.cos(F); const N = w.sin(F); const O = w.tan(G / 4); const P = 4 / 3 * c * O; const Q = 4 / 3 * d * O; const R = [a, b]; const S = [a + P * L, b - Q * K]; const T = [h + P * N, i - Q * M]; const U = [h, i]; S[0] = 2 * R[0] - S[0], S[1] = 2 * R[1] - S[1]; if (j) return [S, T, U][n](m); m = [S, T, U][n](m).join()[s](','); const V = []; for (let W = 0, X = m.length; W < X; W++)V[W] = W % 2 ? p(m[W - 1], m[W], l).y : p(m[W], m[W + 1], l).x; return V; }; const bP = function (a, b, c, d, e, f, g, h, i) { const j = 1 - i; return { x: j ** 3 * a + j ** 2 * 3 * i * c + j * 3 * i * i * e + i ** 3 * g, y: j ** 3 * b + j ** 2 * 3 * i * d + j * 3 * i * i * f + i ** 3 * h }; }; var bQ = bv((a, b, c, d, e, f, g, h) => { let i = e - 2 * c + a - (g - 2 * e + c); let j = 2 * (c - a) - 2 * (e - c); let k = a - c; let l = (-j + w.sqrt(j * j - 4 * i * k)) / 2 / i; let n = (-j - w.sqrt(j * j - 4 * i * k)) / 2 / i; const o = [b, h]; const p = [a, g]; let q; z(l) > '1e12' && (l = 0.5), z(n) > '1e12' && (n = 0.5), l > 0 && l < 1 && (q = bP(a, b, c, d, e, f, g, h, l), p.push(q.x), o.push(q.y)), n > 0 && n < 1 && (q = bP(a, b, c, d, e, f, g, h, n), p.push(q.x), o.push(q.y)), i = f - 2 * d + b - (h - 2 * f + d), j = 2 * (d - b) - 2 * (f - d), k = b - d, l = (-j + w.sqrt(j * j - 4 * i * k)) / 2 / i, n = (-j - w.sqrt(j * j - 4 * i * k)) / 2 / i, z(l) > '1e12' && (l = 0.5), z(n) > '1e12' && (n = 0.5), l > 0 && l < 1 && (q = bP(a, b, c, d, e, f, g, h, l), p.push(q.x), o.push(q.y)), n > 0 && n < 1 && (q = bP(a, b, c, d, e, f, g, h, n), p.push(q.x), o.push(q.y)); return { min: { x: y[m](0, p), y: y[m](0, o) }, max: { x: x[m](0, p), y: x[m](0, o) } }; }); var bR = a._path2curve = bv((a, b) => { const c = !b && bz(a); if (!b && c.curve) return bJ(c.curve); const d = bL(a); const e = b && bL(b); const f = { x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null }; const g = { x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null }; const h = function (a, b) { let c; let d; if (!a) return ['C', b.x, b.y, b.x, b.y, b.x, b.y]; !(a[0] in { T: 1, Q: 1 }) && (b.qx = b.qy = null); switch (a[0]) { case 'M': b.X = a[1], b.Y = a[2]; break; case 'A': a = ['C'][n](bO[m](0, [b.x, b.y][n](a.slice(1)))); break; case 'S': c = b.x + (b.x - (b.bx || b.x)), d = b.y + (b.y - (b.by || b.y)), a = ['C', c, d][n](a.slice(1)); break; case 'T': b.qx = b.x + (b.x - (b.qx || b.x)), b.qy = b.y + (b.y - (b.qy || b.y)), a = ['C'][n](bN(b.x, b.y, b.qx, b.qy, a[1], a[2])); break; case 'Q': b.qx = a[1], b.qy = a[2], a = ['C'][n](bN(b.x, b.y, a[1], a[2], a[3], a[4])); break; case 'L': a = ['C'][n](bM(b.x, b.y, a[1], a[2])); break; case 'H': a = ['C'][n](bM(b.x, b.y, a[1], b.y)); break; case 'V': a = ['C'][n](bM(b.x, b.y, b.x, a[1])); break; case 'Z': a = ['C'][n](bM(b.x, b.y, b.X, b.Y)); } return a; }; const i = function (a, b) { if (a[b].length > 7) { a[b].shift(); const c = a[b]; while (c.length)a.splice(b++, 0, ['C'][n](c.splice(0, 6))); a.splice(b, 1), l = x(d.length, e && e.length || 0); } }; const j = function (a, b, c, f, g) { a && b && a[g][0] == 'M' && b[g][0] != 'M' && (b.splice(g, 0, ['M', f.x, f.y]), c.bx = 0, c.by = 0, c.x = a[g][1], c.y = a[g][2], l = x(d.length, e && e.length || 0)); }; for (var k = 0, l = x(d.length, e && e.length || 0); k < l; k++) { d[k] = h(d[k], f), i(d, k), e && (e[k] = h(e[k], g)), e && i(e, k), j(d, e, f, g, k), j(e, d, g, f, k); const o = d[k]; const p = e && e[k]; const q = o.length; const r = e && p.length; f.x = o[q - 2], f.y = o[q - 1], f.bx = Q(o[q - 4]) || f.x, f.by = Q(o[q - 3]) || f.y, g.bx = e && (Q(p[r - 4]) || g.x), g.by = e && (Q(p[r - 3]) || g.y), g.x = e && p[r - 2], g.y = e && p[r - 1]; }e || (c.curve = bJ(d)); return e ? [d, e] : d; }, null, bJ); const bS = a._parseDots = bv((b) => { const c = []; for (var d = 0, e = b.length; d < e; d++) { const f = {}; const g = b[d].match(/^([^:]*):?([\d\.]*)/); f.color = a.getRGB(g[1]); if (f.color.error) return null; f.color = f.color.hex, g[2] && (f.offset = `${g[2]}%`), c.push(f); } for (d = 1, e = c.length - 1; d < e; d++) if (!c[d].offset) { let h = Q(c[d - 1].offset || 0); let i = 0; for (var j = d + 1; j < e; j++) if (c[j].offset) { i = c[j].offset; break; }i || (i = 100, j = e), i = Q(i); const k = (i - h) / (j - d + 1); for (;d < j; d++)h += k, c[d].offset = `${h}%`; } return c; }); const bT = a._tear = function (a, b) { a == b.top && (b.top = a.prev), a == b.bottom && (b.bottom = a.next), a.next && (a.next.prev = a.prev), a.prev && (a.prev.next = a.next); }; const bU = a._tofront = function (a, b) { b.top !== a && (bT(a, b), a.next = null, a.prev = b.top, b.top.next = a, b.top = a); }; const bV = a._toback = function (a, b) { b.bottom !== a && (bT(a, b), a.next = b.bottom, a.prev = null, b.bottom.prev = a, b.bottom = a); }; const bW = a._insertafter = function (a, b, c) { bT(a, c), b == c.top && (c.top = a), b.next && (b.next.prev = a), a.next = b.next, a.prev = b, b.next = a; }; const bX = a._insertbefore = function (a, b, c) { bT(a, c), b == c.bottom && (c.bottom = a), b.prev && (b.prev.next = a), a.prev = b.prev, b.prev = a, a.next = b; }; const bY = a.toMatrix = function (a, b) { const c = bI(a); const d = { _: { transform: p }, getBBox: function () { return c; } }; b$(d, b); return d.matrix; }; const bZ = a.transformPath = function (a, b) { return bj(a, bY(a, b)); }; var b$ = a._extractTransform = function (b, c) { if (c == null) return b._.transform; c = r(c).replace(/\.{3}|\u2026/g, b._.transform || p); const d = a.parseTransformString(c); let e = 0; let f = 0; let g = 0; let h = 1; let i = 1; const j = b._; const k = new cb(); j.transform = d || []; if (d) for (let l = 0, m = d.length; l < m; l++) { const n = d[l]; const o = n.length; const q = r(n[0]).toLowerCase(); const s = n[0] != q; const t = s ? k.invert() : 0; var u; var v; var w; var x; var y; q == 't' && o == 3 ? s ? (u = t.x(0, 0), v = t.y(0, 0), w = t.x(n[1], n[2]), x = t.y(n[1], n[2]), k.translate(w - u, x - v)) : k.translate(n[1], n[2]) : q == 'r' ? o == 2 ? (y = y || b.getBBox(1), k.rotate(n[1], y.x + y.width / 2, y.y + y.height / 2), e += n[1]) : o == 4 && (s ? (w = t.x(n[2], n[3]), x = t.y(n[2], n[3]), k.rotate(n[1], w, x)) : k.rotate(n[1], n[2], n[3]), e += n[1]) : q == 's' ? o == 2 || o == 3 ? (y = y || b.getBBox(1), k.scale(n[1], n[o - 1], y.x + y.width / 2, y.y + y.height / 2), h *= n[1], i *= n[o - 1]) : o == 5 && (s ? (w = t.x(n[3], n[4]), x = t.y(n[3], n[4]), k.scale(n[1], n[2], w, x)) : k.scale(n[1], n[2], n[3], n[4]), h *= n[1], i *= n[2]) : q == 'm' && o == 7 && k.add(n[1], n[2], n[3], n[4], n[5], n[6]), j.dirtyT = 1, b.matrix = k; }b.matrix = k, j.sx = h, j.sy = i, j.deg = e, j.dx = f = k.e, j.dy = g = k.f, h == 1 && i == 1 && !e && j.bbox ? (j.bbox.x += +f, j.bbox.y += +g) : j.dirtyT = 1; }; const b_ = function (a) { const b = a[0]; switch (b.toLowerCase()) { case 't': return [b, 0, 0]; case 'm': return [b, 1, 0, 0, 1, 0, 0]; case 'r': return a.length == 4 ? [b, 0, a[2], a[3]] : [b, 0]; case 's': return a.length == 5 ? [b, 1, 1, a[3], a[4]] : a.length == 3 ? [b, 1, 1] : [b, 1]; } }; var ca = a._equaliseTransform = function (b, c) { c = r(c).replace(/\.{3}|\u2026/g, b), b = a.parseTransformString(b) || [], c = a.parseTransformString(c) || []; const d = x(b.length, c.length); const e = []; const f = []; let g = 0; let h; let i; let j; let k; for (;g < d; g++) { j = b[g] || b_(c[g]), k = c[g] || b_(j); if (j[0] != k[0] || j[0].toLowerCase() == 'r' && (j[2] != k[2] || j[3] != k[3]) || j[0].toLowerCase() == 's' && (j[3] != k[3] || j[4] != k[4])) return; e[g] = [], f[g] = []; for (h = 0, i = x(j.length, k.length); h < i; h++)h in j && (e[g][h] = j[h]), h in k && (f[g][h] = k[h]); } return { from: e, to: f }; }; a._getContainer = function (b, c, d, e) { let f; f = e == null && !a.is(b, 'object') ? h.doc.getElementById(b) : b; if (f != null) { if (f.tagName) return c == null ? { container: f, width: f.style.pixelWidth || f.offsetWidth, height: f.style.pixelHeight || f.offsetHeight } : { container: f, width: c, height: d }; return { container: 1, x: b, y: c, width: d, height: e }; } }, a.pathToRelative = bK, a._engine = {}, a.path2curve = bR, a.matrix = function (a, b, c, d, e, f) { return new cb(a, b, c, d, e, f); }, (function (b) { function d(a) { const b = w.sqrt(c(a)); a[0] && (a[0] /= b), a[1] && (a[1] /= b); } function c(a) { return a[0] * a[0] + a[1] * a[1]; }b.add = function (a, b, c, d, e, f) { const g = [[], [], []]; const h = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]]; let i = [[a, c, e], [b, d, f], [0, 0, 1]]; let j; let k; let l; let m; a && a instanceof cb && (i = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]]); for (j = 0; j < 3; j++) for (k = 0; k < 3; k++) { m = 0; for (l = 0; l < 3; l++)m += h[j][l] * i[l][k]; g[j][k] = m; } this.a = g[0][0], this.b = g[1][0], this.c = g[0][1], this.d = g[1][1], this.e = g[0][2], this.f = g[1][2]; }, b.invert = function () { const a = this; const b = a.a * a.d - a.b * a.c; return new cb(a.d / b, -a.b / b, -a.c / b, a.a / b, (a.c * a.f - a.d * a.e) / b, (a.b * a.e - a.a * a.f) / b); }, b.clone = function () { return new cb(this.a, this.b, this.c, this.d, this.e, this.f); }, b.translate = function (a, b) { this.add(1, 0, 0, 1, a, b); }, b.scale = function (a, b, c, d) { b == null && (b = a), (c || d) && this.add(1, 0, 0, 1, c, d), this.add(a, 0, 0, b, 0, 0), (c || d) && this.add(1, 0, 0, 1, -c, -d); }, b.rotate = function (b, c, d) { b = a.rad(b), c = c || 0, d = d || 0; const e = +w.cos(b).toFixed(9); const f = +w.sin(b).toFixed(9); this.add(e, f, -f, e, c, d), this.add(1, 0, 0, 1, -c, -d); }, b.x = function (a, b) { return a * this.a + b * this.c + this.e; }, b.y = function (a, b) { return a * this.b + b * this.d + this.f; }, b.get = function (a) { return +this[r.fromCharCode(97 + a)].toFixed(4); }, b.toString = function () { return a.svg ? `matrix(${[this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join()})` : [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join(); }, b.toFilter = function () { return `progid:DXImageTransform.Microsoft.Matrix(M11=${this.get(0)}, M12=${this.get(2)}, M21=${this.get(1)}, M22=${this.get(3)}, Dx=${this.get(4)}, Dy=${this.get(5)}, sizingmethod='auto expand')`; }, b.offset = function () { return [this.e.toFixed(4), this.f.toFixed(4)]; }, b.split = function () { const b = {}; b.dx = this.e, b.dy = this.f; const e = [[this.a, this.c], [this.b, this.d]]; b.scalex = w.sqrt(c(e[0])), d(e[0]), b.shear = e[0][0] * e[1][0] + e[0][1] * e[1][1], e[1] = [e[1][0] - e[0][0] * b.shear, e[1][1] - e[0][1] * b.shear], b.scaley = w.sqrt(c(e[1])), d(e[1]), b.shear /= b.scaley; const f = -e[0][1]; const g = e[1][1]; g < 0 ? (b.rotate = a.deg(w.acos(g)), f < 0 && (b.rotate = 360 - b.rotate)) : b.rotate = a.deg(w.asin(f)), b.isSimple = !+b.shear.toFixed(9) && (b.scalex.toFixed(9) == b.scaley.toFixed(9) || !b.rotate), b.isSuperSimple = !+b.shear.toFixed(9) && b.scalex.toFixed(9) == b.scaley.toFixed(9) && !b.rotate, b.noRotation = !+b.shear.toFixed(9) && !b.rotate; return b; }, b.toTransformString = function (a) { const b = a || this[s](); if (b.isSimple) { b.scalex = +b.scalex.toFixed(4), b.scaley = +b.scaley.toFixed(4), b.rotate = +b.rotate.toFixed(4); return (b.dx || b.dy ? `t${[b.dx, b.dy]}` : p) + (b.scalex != 1 || b.scaley != 1 ? `s${[b.scalex, b.scaley, 0, 0]}` : p) + (b.rotate ? `r${[b.rotate, 0, 0]}` : p); } return `m${[this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)]}`; }; }(cb.prototype)); const cc = navigator.userAgent.match(/Version\/(.*?)\s/) || navigator.userAgent.match(/Chrome\/(\d+)/); navigator.vendor == 'Apple Computer, Inc.' && (cc && cc[1] < 4 || navigator.platform.slice(0, 2) == 'iP') || navigator.vendor == 'Google Inc.' && cc && cc[1] < 8 ? k.safari = function () { const a = this.rect(-99, -99, this.width + 99, this.height + 99).attr({ stroke: 'none' }); setTimeout(() => { a.remove(); }); } : k.safari = be; const cd = function () { this.returnValue = !1; }; const ce = function () { return this.originalEvent.preventDefault(); }; const cf = function () { this.cancelBubble = !0; }; const cg = function () { return this.originalEvent.stopPropagation(); }; const ch = (function () { if (h.doc.addEventListener) return function (a, b, c, d) { const e = o && u[b] ? u[b] : b; const f = function (e) { const f = h.doc.documentElement.scrollTop || h.doc.body.scrollTop; const i = h.doc.documentElement.scrollLeft || h.doc.body.scrollLeft; const j = e.clientX + i; const k = e.clientY + f; if (o && u[g](b)) for (let l = 0, m = e.targetTouches && e.targetTouches.length; l < m; l++) if (e.targetTouches[l].target == a) { const n = e; e = e.targetTouches[l], e.originalEvent = n, e.preventDefault = ce, e.stopPropagation = cg; break; } return c.call(d, e, j, k); }; a.addEventListener(e, f, !1); return function () { a.removeEventListener(e, f, !1); return !0; }; }; if (h.doc.attachEvent) return function (a, b, c, d) { const e = function (a) { a = a || h.win.event; const b = h.doc.documentElement.scrollTop || h.doc.body.scrollTop; const e = h.doc.documentElement.scrollLeft || h.doc.body.scrollLeft; const f = a.clientX + e; const g = a.clientY + b; a.preventDefault = a.preventDefault || cd, a.stopPropagation = a.stopPropagation || cf; return c.call(d, a, f, g); }; a.attachEvent(`on${b}`, e); const f = function () { a.detachEvent(`on${b}`, e); return !0; }; return f; }; }()); let ci = []; const cj = function (a) { let b = a.clientX; let c = a.clientY; const d = h.doc.documentElement.scrollTop || h.doc.body.scrollTop; const e = h.doc.documentElement.scrollLeft || h.doc.body.scrollLeft; let f; let g = ci.length; while (g--) { f = ci[g]; if (o) { let i = a.touches.length; var j; while (i--) { j = a.touches[i]; if (j.identifier == f.el._drag.id) { b = j.clientX, c = j.clientY, (a.originalEvent ? a.originalEvent : a).preventDefault(); break; } } } else a.preventDefault(); const k = f.el.node; var l; const m = k.nextSibling; const n = k.parentNode; const p = k.style.display; h.win.opera && n.removeChild(k), k.style.display = 'none', l = f.el.paper.getElementByPoint(b, c), k.style.display = p, h.win.opera && (m ? n.insertBefore(k, m) : n.appendChild(k)), l && eve(`raphael.drag.over.${f.el.id}`, f.el, l), b += e, c += d, eve(`raphael.drag.move.${f.el.id}`, f.move_scope || f.el, b - f.el._drag.x, c - f.el._drag.y, b, c, a); } }; const ck = function (b) { a.unmousemove(cj).unmouseup(ck); let c = ci.length; let d; while (c--)d = ci[c], d.el._drag = {}, eve(`raphael.drag.end.${d.el.id}`, d.end_scope || d.start_scope || d.move_scope || d.el, b); ci = []; }; const cl = a.el = {}; for (let cm = t.length; cm--;)(function (b) { a[b] = cl[b] = function (c, d) { a.is(c, 'function') && (this.events = this.events || [], this.events.push({ name: b, f: c, unbind: ch(this.shape || this.node || h.doc, b, c, d || this) })); return this; }, a[`un${b}`] = cl[`un${b}`] = function (a) { const c = this.events || []; let d = c.length; while (d--) if (c[d].name == b && c[d].f == a) { c[d].unbind(), c.splice(d, 1), !c.length && delete this.events; return this; } return this; }; }(t[cm])); cl.data = function (b, c) { const d = bb[this.id] = bb[this.id] || {}; if (arguments.length == 1) { if (a.is(b, 'object')) { for (const e in b)b[g](e) && this.data(e, b[e]); return this; }eve(`raphael.data.get.${this.id}`, this, d[b], b); return d[b]; }d[b] = c, eve(`raphael.data.set.${this.id}`, this, c, b); return this; }, cl.removeData = function (a) { a == null ? bb[this.id] = {} : bb[this.id] && delete bb[this.id][a]; return this; }, cl.hover = function (a, b, c, d) { return this.mouseover(a, c).mouseout(b, d || c); }, cl.unhover = function (a, b) { return this.unmouseover(a).unmouseout(b); }; const cn = []; cl.drag = function (b, c, d, e, f, g) { function i(i) { (i.originalEvent || i).preventDefault(); const j = h.doc.documentElement.scrollTop || h.doc.body.scrollTop; const k = h.doc.documentElement.scrollLeft || h.doc.body.scrollLeft; this._drag.x = i.clientX + k, this._drag.y = i.clientY + j, this._drag.id = i.identifier, !ci.length && a.mousemove(cj).mouseup(ck), ci.push({ el: this, move_scope: e, start_scope: f, end_scope: g }), c && eve.on(`raphael.drag.start.${this.id}`, c), b && eve.on(`raphael.drag.move.${this.id}`, b), d && eve.on(`raphael.drag.end.${this.id}`, d), eve(`raphael.drag.start.${this.id}`, f || e || this, i.clientX + k, i.clientY + j, i); } this._drag = {}, cn.push({ el: this, start: i }), this.mousedown(i); return this; }, cl.onDragOver = function (a) { a ? eve.on(`raphael.drag.over.${this.id}`, a) : eve.unbind(`raphael.drag.over.${this.id}`); }, cl.undrag = function () { let b = cn.length; while (b--)cn[b].el == this && (this.unmousedown(cn[b].start), cn.splice(b, 1), eve.unbind(`raphael.drag.*.${this.id}`)); !cn.length && a.unmousemove(cj).unmouseup(ck); }, k.circle = function (b, c, d) { const e = a._engine.circle(this, b || 0, c || 0, d || 0); this.__set__ && this.__set__.push(e); return e; }, k.rect = function (b, c, d, e, f) { const g = a._engine.rect(this, b || 0, c || 0, d || 0, e || 0, f || 0); this.__set__ && this.__set__.push(g); return g; }, k.ellipse = function (b, c, d, e) { const f = a._engine.ellipse(this, b || 0, c || 0, d || 0, e || 0); this.__set__ && this.__set__.push(f); return f; }, k.path = function (b) { b && !a.is(b, D) && !a.is(b[0], E) && (b += p); const c = a._engine.path(a.format[m](a, arguments), this); this.__set__ && this.__set__.push(c); return c; }, k.image = function (b, c, d, e, f) { const g = a._engine.image(this, b || 'about:blank', c || 0, d || 0, e || 0, f || 0); this.__set__ && this.__set__.push(g); return g; }, k.text = function (b, c, d) { const e = a._engine.text(this, b || 0, c || 0, r(d)); this.__set__ && this.__set__.push(e); return e; }, k.set = function (b) { !a.is(b, 'array') && (b = Array.prototype.splice.call(arguments, 0, arguments.length)); const c = new cG(b); this.__set__ && this.__set__.push(c); return c; }, k.setStart = function (a) { this.__set__ = a || this.set(); }, k.setFinish = function (a) { const b = this.__set__; delete this.__set__; return b; }, k.setSize = function (b, c) { return a._engine.setSize.call(this, b, c); }, k.setViewBox = function (b, c, d, e, f) { return a._engine.setViewBox.call(this, b, c, d, e, f); }, k.top = k.bottom = null, k.raphael = a; const co = function (a) { const b = a.getBoundingClientRect(); const c = a.ownerDocument; const d = c.body; const e = c.documentElement; const f = e.clientTop || d.clientTop || 0; const g = e.clientLeft || d.clientLeft || 0; const i = b.top + (h.win.pageYOffset || e.scrollTop || d.scrollTop) - f; const j = b.left + (h.win.pageXOffset || e.scrollLeft || d.scrollLeft) - g; return { y: i, x: j }; }; k.getElementByPoint = function (a, b) { const c = this; const d = c.canvas; let e = h.doc.elementFromPoint(a, b); if (h.win.opera && e.tagName == 'svg') { const f = co(d); const g = d.createSVGRect(); g.x = a - f.x, g.y = b - f.y, g.width = g.height = 1; const i = d.getIntersectionList(g, null); i.length && (e = i[i.length - 1]); } if (!e) return null; while (e.parentNode && e != d.parentNode && !e.raphael)e = e.parentNode; e == c.canvas.parentNode && (e = d), e = e && e.raphael ? c.getById(e.raphaelid) : null; return e; }, k.getById = function (a) { let b = this.bottom; while (b) { if (b.id == a) return b; b = b.next; } return null; }, k.forEach = function (a, b) { let c = this.bottom; while (c) { if (a.call(b, c) === !1) return this; c = c.next; } return this; }, k.getElementsByPoint = function (a, b) { const c = this.set(); this.forEach((d) => { d.isPointInside(a, b) && c.push(d); }); return c; }, cl.isPointInside = function (b, c) { const d = this.realPath = this.realPath || bi[this.type](this); return a.isPointInsidePath(d, b, c); }, cl.getBBox = function (a) { if (this.removed) return {}; const b = this._; if (a) { if (b.dirty || !b.bboxwt) this.realPath = bi[this.type](this), b.bboxwt = bI(this.realPath), b.bboxwt.toString = cq, b.dirty = 0; return b.bboxwt; } if (b.dirty || b.dirtyT || !b.bbox) { if (b.dirty || !this.realPath)b.bboxwt = 0, this.realPath = bi[this.type](this); b.bbox = bI(bj(this.realPath, this.matrix)), b.bbox.toString = cq, b.dirty = b.dirtyT = 0; } return b.bbox; }, cl.clone = function () { if (this.removed) return null; const a = this.paper[this.type]().attr(this.attr()); this.__set__ && this.__set__.push(a); return a; }, cl.glow = function (a) { if (this.type == 'text') return null; a = a || {}; const b = { width: (a.width || 10) + (+this.attr('stroke-width') || 1), fill: a.fill || !1, opacity: a.opacity || 0.5, offsetx: a.offsetx || 0, offsety: a.offsety || 0, color: a.color || '#000' }; const c = b.width / 2; const d = this.paper; const e = d.set(); let f = this.realPath || bi[this.type](this); f = this.matrix ? bj(f, this.matrix) : f; for (let g = 1; g < c + 1; g++)e.push(d.path(f).attr({ stroke: b.color, fill: b.fill ? b.color : 'none', 'stroke-linejoin': 'round', 'stroke-linecap': 'round', 'stroke-width': +(b.width / c * g).toFixed(3), opacity: +(b.opacity / c).toFixed(3) })); return e.insertBefore(this).translate(b.offsetx, b.offsety); }; const cr = {}; const cs = function (b, c, d, e, f, g, h, i, j) { return j == null ? bB(b, c, d, e, f, g, h, i) : a.findDotsAtSegment(b, c, d, e, f, g, h, i, bC(b, c, d, e, f, g, h, i, j)); }; const ct = function (b, c) { return function (d, e, f) { d = bR(d); let g; let h; let i; let j; let k = ''; const l = {}; let m; let n = 0; for (let o = 0, p = d.length; o < p; o++) { i = d[o]; if (i[0] == 'M')g = +i[1], h = +i[2]; else { j = cs(g, h, i[1], i[2], i[3], i[4], i[5], i[6]); if (n + j > e) { if (c && !l.start) { m = cs(g, h, i[1], i[2], i[3], i[4], i[5], i[6], e - n), k += [`C${m.start.x}`, m.start.y, m.m.x, m.m.y, m.x, m.y]; if (f) return k; l.start = k, k = [`M${m.x}`, `${m.y}C${m.n.x}`, m.n.y, m.end.x, m.end.y, i[5], i[6]].join(), n += j, g = +i[5], h = +i[6]; continue; } if (!b && !c) { m = cs(g, h, i[1], i[2], i[3], i[4], i[5], i[6], e - n); return { x: m.x, y: m.y, alpha: m.alpha }; } }n += j, g = +i[5], h = +i[6]; }k += i.shift() + i; }l.end = k, m = b ? n : c ? l : a.findDotsAtSegment(g, h, i[0], i[1], i[2], i[3], i[4], i[5], 1), m.alpha && (m = { x: m.x, y: m.y, alpha: m.alpha }); return m; }; }; const cu = ct(1); const cv = ct(); const cw = ct(0, 1); a.getTotalLength = cu, a.getPointAtLength = cv, a.getSubpath = function (a, b, c) { if (this.getTotalLength(a) - c < 1e-6) return cw(a, b).end; const d = cw(a, c, 1); return b ? cw(d, b).end : d; }, cl.getTotalLength = function () { if (this.type == 'path') { if (this.node.getTotalLength) return this.node.getTotalLength(); return cu(this.attrs.path); } }, cl.getPointAtLength = function (a) { if (this.type == 'path') return cv(this.attrs.path, a); }, cl.getSubpath = function (b, c) { if (this.type == 'path') return a.getSubpath(this.attrs.path, b, c); }; const cx = a.easing_formulas = { linear: function (a) { return a; }, '<': function (a) { return a ** 1.7; }, '>': function (a) { return a ** 0.48; }, '<>': function (a) { const b = 0.48 - a / 1.04; const c = w.sqrt(0.1734 + b * b); const d = c - b; const e = z(d) ** (1 / 3) * (d < 0 ? -1 : 1); const f = -c - b; const g = z(f) ** (1 / 3) * (f < 0 ? -1 : 1); const h = e + g + 0.5; return (1 - h) * 3 * h * h + h * h * h; }, backIn: function (a) { const b = 1.70158; return a * a * ((b + 1) * a - b); }, backOut: function (a) { a -= 1; const b = 1.70158; return a * a * ((b + 1) * a + b) + 1; }, elastic: function (a) { if (a == !!a) return a; return 2 ** (-10 * a) * w.sin((a - 0.075) * 2 * B / 0.3) + 1; }, bounce: function (a) { const b = 7.5625; const c = 2.75; let d; a < 1 / c ? d = b * a * a : a < 2 / c ? (a -= 1.5 / c, d = b * a * a + 0.75) : a < 2.5 / c ? (a -= 2.25 / c, d = b * a * a + 0.9375) : (a -= 2.625 / c, d = b * a * a + 0.984375); return d; } }; cx.easeIn = cx['ease-in'] = cx['<'], cx.easeOut = cx['ease-out'] = cx['>'], cx.easeInOut = cx['ease-in-out'] = cx['<>'], cx['back-in'] = cx.backIn, cx['back-out'] = cx.backOut; var cy = []; var cz = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (a) { setTimeout(a, 16); }; var cA = function () { const b = +(new Date()); let c = 0; for (;c < cy.length; c++) { const d = cy[c]; if (d.el.removed || d.paused) continue; let e = b - d.start; var f = d.ms; const h = d.easing; var i = d.from; var j = d.diff; const k = d.to; const l = d.t; var m = d.el; const o = {}; var p; const r = {}; var s; d.initstatus ? (e = (d.initstatus * d.anim.top - d.prev) / (d.percent - d.prev) * f, d.status = d.initstatus, delete d.initstatus, d.stop && cy.splice(c--, 1)) : d.status = (d.prev + (d.percent - d.prev) * (e / f)) / d.anim.top; if (e < 0) continue; if (e < f) { var t = h(e / f); for (var u in i) if (i[g](u)) { switch (U[u]) { case C: p = +i[u] + t * f * j[u]; break; case 'colour': p = `rgb(${[cB(O(i[u].r + t * f * j[u].r)), cB(O(i[u].g + t * f * j[u].g)), cB(O(i[u].b + t * f * j[u].b))].join(',')})`; break; case 'path': p = []; for (var v = 0, w = i[u].length; v < w; v++) { p[v] = [i[u][v][0]]; for (var x = 1, y = i[u][v].length; x < y; x++)p[v][x] = +i[u][v][x] + t * f * j[u][v][x]; p[v] = p[v].join(q); }p = p.join(q); break; case 'transform': if (j[u].real) { p = []; for (v = 0, w = i[u].length; v < w; v++) { p[v] = [i[u][v][0]]; for (x = 1, y = i[u][v].length; x < y; x++)p[v][x] = i[u][v][x] + t * f * j[u][v][x]; } } else { const z = function (a) { return +i[u][a] + t * f * j[u][a]; }; p = [['m', z(0), z(1), z(2), z(3), z(4), z(5)]]; } break; case 'csv': if (u == 'clip-rect') { p = [], v = 4; while (v--)p[v] = +i[u][v] + t * f * j[u][v]; } break; default: var A = [][n](i[u]); p = [], v = m.paper.customAttributes[u].length; while (v--)p[v] = +A[v] + t * f * j[u][v]; }o[u] = p; }m.attr(o), (function (a, b, c) { setTimeout(() => { eve(`raphael.anim.frame.${a}`, b, c); }); }(m.id, m, d.anim)); } else { (function (b, c, d) { setTimeout(() => { eve(`raphael.anim.frame.${c.id}`, c, d), eve(`raphael.anim.finish.${c.id}`, c, d), a.is(b, 'function') && b.call(c); }); }(d.callback, m, d.anim)), m.attr(k), cy.splice(c--, 1); if (d.repeat > 1 && !d.next) { for (s in k)k[g](s) && (r[s] = d.totalOrigin[s]); d.el.attr(r), cE(d.anim, d.el, d.anim.percents[0], null, d.totalOrigin, d.repeat - 1); }d.next && !d.stop && cE(d.anim, d.el, d.next, null, d.totalOrigin, d.repeat); } }a.svg && m && m.paper && m.paper.safari(), cy.length && cz(cA); }; var cB = function (a) { return a > 255 ? 255 : a < 0 ? 0 : a; }; cl.animateWith = function (b, c, d, e, f, g) { const h = this; if (h.removed) { g && g.call(h); return h; } const i = d instanceof cD ? d : a.animation(d, e, f, g); let j; let k; cE(i, h, i.percents[0], null, h.attr()); for (let l = 0, m = cy.length; l < m; l++) if (cy[l].anim == c && cy[l].el == b) { cy[m - 1].start = cy[l].start; break; } return h; }, cl.onAnimation = function (a) { a ? eve.on(`raphael.anim.frame.${this.id}`, a) : eve.unbind(`raphael.anim.frame.${this.id}`); return this; }, cD.prototype.delay = function (a) { const b = new cD(this.anim, this.ms); b.times = this.times, b.del = +a || 0; return b; }, cD.prototype.repeat = function (a) { const b = new cD(this.anim, this.ms); b.del = this.del, b.times = w.floor(x(a, 0)) || 1; return b; }, a.animation = function (b, c, d, e) { if (b instanceof cD) return b; if (a.is(d, 'function') || !d)e = e || d || null, d = null; b = Object(b), c = +c || 0; const f = {}; let h; let i; for (i in b)b[g](i) && Q(i) != i && `${Q(i)}%` != i && (h = !0, f[i] = b[i]); if (!h) return new cD(b, c); d && (f.easing = d), e && (f.callback = e); return new cD({ 100: f }, c); }, cl.animate = function (b, c, d, e) { const f = this; if (f.removed) { e && e.call(f); return f; } const g = b instanceof cD ? b : a.animation(b, c, d, e); cE(g, f, g.percents[0], null, f.attr()); return f; }, cl.setTime = function (a, b) { a && b != null && this.status(a, y(b, a.ms) / a.ms); return this; }, cl.status = function (a, b) { const c = []; let d = 0; let e; let f; if (b != null) { cE(a, this, -1, y(b, 1)); return this; }e = cy.length; for (;d < e; d++) { f = cy[d]; if (f.el.id == this.id && (!a || f.anim == a)) { if (a) return f.status; c.push({ anim: f.anim, status: f.status }); } } if (a) return 0; return c; }, cl.pause = function (a) { for (let b = 0; b < cy.length; b++)cy[b].el.id == this.id && (!a || cy[b].anim == a) && eve(`raphael.anim.pause.${this.id}`, this, cy[b].anim) !== !1 && (cy[b].paused = !0); return this; }, cl.resume = function (a) { for (let b = 0; b < cy.length; b++) if (cy[b].el.id == this.id && (!a || cy[b].anim == a)) { const c = cy[b]; eve(`raphael.anim.resume.${this.id}`, this, c.anim) !== !1 && (delete c.paused, this.status(c.anim, c.status)); } return this; }, cl.stop = function (a) { for (let b = 0; b < cy.length; b++)cy[b].el.id == this.id && (!a || cy[b].anim == a) && eve(`raphael.anim.stop.${this.id}`, this, cy[b].anim) !== !1 && cy.splice(b--, 1); return this; }, eve.on('raphael.remove', cF), eve.on('raphael.clear', cF), cl.toString = function () { return 'Raphaël’s object'; }; var cG = function (a) { this.items = [], this.length = 0, this.type = 'set'; if (a) for (let b = 0, c = a.length; b < c; b++)a[b] && (a[b].constructor == cl.constructor || a[b].constructor == cG) && (this[this.items.length] = this.items[this.items.length] = a[b], this.length++); }; const cH = cG.prototype; cH.push = function () { let a; let b; for (let c = 0, d = arguments.length; c < d; c++)a = arguments[c], a && (a.constructor == cl.constructor || a.constructor == cG) && (b = this.items.length, this[b] = this.items[b] = a, this.length++); return this; }, cH.pop = function () { this.length && delete this[this.length--]; return this.items.pop(); }, cH.forEach = function (a, b) { for (let c = 0, d = this.items.length; c < d; c++) if (a.call(b, this.items[c], c) === !1) return this; return this; }; for (const cI in cl)cl[g](cI) && (cH[cI] = (function (a) { return function () { const b = arguments; return this.forEach((c) => { c[a][m](c, b); }); }; }(cI))); cH.attr = function (b, c) { if (b && a.is(b, E) && a.is(b[0], 'object')) for (let d = 0, e = b.length; d < e; d++) this.items[d].attr(b[d]); else for (let f = 0, g = this.items.length; f < g; f++) this.items[f].attr(b, c); return this; }, cH.clear = function () { while (this.length) this.pop(); }, cH.splice = function (a, b, c) { a = a < 0 ? x(this.length + a, 0) : a, b = x(0, y(this.length - a, b)); const d = []; const e = []; const f = []; let g; for (g = 2; g < arguments.length; g++)f.push(arguments[g]); for (g = 0; g < b; g++)e.push(this[a + g]); for (;g < this.length - a; g++)d.push(this[a + g]); const h = f.length; for (g = 0; g < h + d.length; g++) this.items[a + g] = this[a + g] = g < h ? f[g] : d[g - h]; g = this.items.length = this.length -= b - h; while (this[g]) delete this[g++]; return new cG(e); }, cH.exclude = function (a) { for (let b = 0, c = this.length; b < c; b++) if (this[b] == a) { this.splice(b, 1); return !0; } }, cH.animate = function (b, c, d, e) { (a.is(d, 'function') || !d) && (e = d || null); let f = this.items.length; let g = f; let h; const i = this; let j; if (!f) return this; e && (j = function () { !--f && e.call(i); }), d = a.is(d, D) ? d : j; const k = a.animation(b, c, d, j); h = this.items[--g].animate(k); while (g--) this.items[g] && !this.items[g].removed && this.items[g].animateWith(h, k, k); return this; }, cH.insertAfter = function (a) { let b = this.items.length; while (b--) this.items[b].insertAfter(a); return this; }, cH.getBBox = function () { let a = []; let b = []; let c = []; let d = []; for (let e = this.items.length; e--;) if (!this.items[e].removed) { const f = this.items[e].getBBox(); a.push(f.x), b.push(f.y), c.push(f.x + f.width), d.push(f.y + f.height); }a = y[m](0, a), b = y[m](0, b), c = x[m](0, c), d = x[m](0, d); return { x: a, y: b, x2: c, y2: d, width: c - a, height: d - b }; }, cH.clone = function (a) { a = new cG(); for (let b = 0, c = this.items.length; b < c; b++)a.push(this.items[b].clone()); return a; }, cH.toString = function () { return 'Raphaël‘s set'; }, a.registerFont = function (a) { if (!a.face) return a; this.fonts = this.fonts || {}; const b = { w: a.w, face: {}, glyphs: {} }; const c = a.face['font-family']; for (const d in a.face)a.face[g](d) && (b.face[d] = a.face[d]); this.fonts[c] ? this.fonts[c].push(b) : this.fonts[c] = [b]; if (!a.svg) { b.face['units-per-em'] = R(a.face['units-per-em'], 10); for (const e in a.glyphs) if (a.glyphs[g](e)) { const f = a.glyphs[e]; b.glyphs[e] = { w: f.w, k: {}, d: f.d && `M${f.d.replace(/[mlcxtrv]/g, a => ({ l: 'L', c: 'C', x: 'z', t: 'm', r: 'l', v: 'c' }[a] || 'M'))}z` }; if (f.k) for (const h in f.k)f[g](h) && (b.glyphs[e].k[h] = f.k[h]); } } return a; }, k.getFont = function (b, c, d, e) { e = e || 'normal', d = d || 'normal', c = +c || { normal: 400, bold: 700, lighter: 300, bolder: 800 }[c] || 400; if (a.fonts) { let f = a.fonts[b]; if (!f) { const h = new RegExp(`(^|\\s)${b.replace(/[^\w\d\s+!~.:_-]/g, p)}(\\s|$)`, 'i'); for (const i in a.fonts) if (a.fonts[g](i) && h.test(i)) { f = a.fonts[i]; break; } } let j; if (f) for (let k = 0, l = f.length; k < l; k++) { j = f[k]; if (j.face['font-weight'] == c && (j.face['font-style'] == d || !j.face['font-style']) && j.face['font-stretch'] == e) break; } return j; } }, k.print = function (b, d, e, f, g, h, i) { h = h || 'middle', i = x(y(i || 0, 1), -1); const j = r(e)[s](p); let k = 0; let l = 0; let m = p; let n; a.is(f, e) && (f = this.getFont(f)); if (f) { n = (g || 16) / f.face['units-per-em']; const o = f.face.bbox[s](c); const q = +o[0]; const t = o[3] - o[1]; let u = 0; const v = +o[1] + (h == 'baseline' ? t + +f.face.descent : t / 2); for (let w = 0, z = j.length; w < z; w++) { if (j[w] == '\n')k = 0, B = 0, l = 0, u += t; else { const A = l && f.glyphs[j[w - 1]] || {}; var B = f.glyphs[j[w]]; k += l ? (A.w || f.w) + (A.k && A.k[j[w]] || 0) + f.w * i : 0, l = 1; }B && B.d && (m += a.transformPath(B.d, ['t', k * n, u * n, 's', n, n, q, v, 't', (b - q) / n, (d - v) / n])); } } return this.path(m).attr({ fill: '#000', stroke: 'none' }); }, k.add = function (b) { if (a.is(b, 'array')) { var c = this.set(); let e = 0; const f = b.length; let h; for (;e < f; e++)h = b[e] || {}, d[g](h.type) && c.push(this[h.type]().attr(h)); } return c; }, a.format = function (b, c) { const d = a.is(c, E) ? [0][n](c) : arguments; b && a.is(b, D) && d.length - 1 && (b = b.replace(e, (a, b) => (d[++b] == null ? p : d[b]))); return b || p; }, a.fullfill = (function () { const a = /\{([^\}]+)\}/g; const b = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g; const c = function (a, c, d) { let e = d; c.replace(b, (a, b, c, d, f) => { b = b || d, e && (b in e && (e = e[b]), typeof e === 'function' && f && (e = e())); }), e = `${e == null || e == d ? a : e}`; return e; }; return function (b, d) { return String(b).replace(a, (a, b) => c(a, b, d)); }; }()), a.ninja = function () { i.was ? h.win.Raphael = i.is : delete Raphael; return a; }, a.st = cH, (function (b, c, d) { function e() { /in/.test(b.readyState) ? setTimeout(e, 9) : a.eve('raphael.DOMload'); }b.readyState == null && b.addEventListener && (b.addEventListener(c, d = function () { b.removeEventListener(c, d, !1), b.readyState = 'complete'; }, !1), b.readyState = 'loading'), e(); }(document, 'DOMContentLoaded')), i.was ? h.win.Raphael = a : Raphael = a, eve.on('raphael.DOMload', () => { b = !0; }); +}()), window.Raphael.svg && (function (a) { const b = 'hasOwnProperty'; const c = String; const d = parseFloat; const e = parseInt; const f = Math; const g = f.max; const h = f.abs; const i = f.pow; const j = /[, ]+/; const k = a.eve; const l = ''; const m = ' '; const n = 'http://www.w3.org/1999/xlink'; const o = { block: 'M5,0 0,2.5 5,5z', classic: 'M5,0 0,2.5 5,5 3.5,3 3.5,2z', diamond: 'M2.5,0 5,2.5 2.5,5 0,2.5z', open: 'M6,1 1,3.5 6,6', oval: 'M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z' }; const p = {}; a.toString = function () { return `Your browser supports SVG.\nYou are running Raphaël ${this.version}`; }; const q = function (d, e) { if (e) { typeof d === 'string' && (d = q(d)); for (const f in e)e[b](f) && (f.substring(0, 6) == 'xlink:' ? d.setAttributeNS(n, f.substring(6), c(e[f])) : d.setAttribute(f, c(e[f]))); } else d = a._g.doc.createElementNS('http://www.w3.org/2000/svg', d), d.style && (d.style.webkitTapHighlightColor = 'rgba(0,0,0,0)'); return d; }; const r = function (b, e) { let j = 'linear'; let k = b.id + e; let m = 0.5; let n = 0.5; const o = b.node; const p = b.paper; const r = o.style; let s = a._g.doc.getElementById(k); if (!s) { e = c(e).replace(a._radial_gradient, (a, b, c) => { j = 'radial'; if (b && c) { m = d(b), n = d(c); const e = (n > 0.5) * 2 - 1; (m - 0.5) ** 2 + (n - 0.5) ** 2 > 0.25 && (n = f.sqrt(0.25 - (m - 0.5) ** 2) * e + 0.5) && n != 0.5 && (n = n.toFixed(5) - 1e-5 * e); } return l; }), e = e.split(/\s*\-\s*/); if (j == 'linear') { let t = e.shift(); t = -d(t); if (isNaN(t)) return null; var u = [0, 0, f.cos(a.rad(t)), f.sin(a.rad(t))]; const v = 1 / (g(h(u[2]), h(u[3])) || 1); u[2] *= v, u[3] *= v, u[2] < 0 && (u[0] = -u[2], u[2] = 0), u[3] < 0 && (u[1] = -u[3], u[3] = 0); } const w = a._parseDots(e); if (!w) return null; k = k.replace(/[\(\)\s,\xb0#]/g, '_'), b.gradient && k != b.gradient.id && (p.defs.removeChild(b.gradient), delete b.gradient); if (!b.gradient) { s = q(`${j}Gradient`, { id: k }), b.gradient = s, q(s, j == 'radial' ? { fx: m, fy: n } : { x1: u[0], y1: u[1], x2: u[2], y2: u[3], gradientTransform: b.matrix.invert() }), p.defs.appendChild(s); for (let x = 0, y = w.length; x < y; x++)s.appendChild(q('stop', { offset: w[x].offset ? w[x].offset : x ? '100%' : '0%', 'stop-color': w[x].color || '#fff' })); } }q(o, { fill: `url(#${k})`, opacity: 1, 'fill-opacity': 1 }), r.fill = l, r.opacity = 1, r.fillOpacity = 1; return 1; }; const s = function (a) { const b = a.getBBox(1); q(a.pattern, { patternTransform: `${a.matrix.invert()} translate(${b.x},${b.y})` }); }; const t = function (d, e, f) { if (d.type == 'path') { const g = c(e).toLowerCase().split('-'); const h = d.paper; const i = f ? 'end' : 'start'; const j = d.node; const k = d.attrs; const m = k['stroke-width']; let n = g.length; let r = 'classic'; let s; let t; let u; let v; let w; let x = 3; let y = 3; let z = 5; while (n--) switch (g[n]) { case 'block': case 'classic': case 'oval': case 'diamond': case 'open': case 'none': r = g[n]; break; case 'wide': y = 5; break; case 'narrow': y = 2; break; case 'long': x = 5; break; case 'short': x = 2; }r == 'open' ? (x += 2, y += 2, z += 2, u = 1, v = f ? 4 : 1, w = { fill: 'none', stroke: k.stroke }) : (v = u = x / 2, w = { fill: k.stroke, stroke: 'none' }), d._.arrows ? f ? (d._.arrows.endPath && p[d._.arrows.endPath]--, d._.arrows.endMarker && p[d._.arrows.endMarker]--) : (d._.arrows.startPath && p[d._.arrows.startPath]--, d._.arrows.startMarker && p[d._.arrows.startMarker]--) : d._.arrows = {}; if (r != 'none') { const A = `raphael-marker-${r}`; const B = `raphael-marker-${i}${r}${x}${y}`; a._g.doc.getElementById(A) ? p[A]++ : (h.defs.appendChild(q(q('path'), { 'stroke-linecap': 'round', d: o[r], id: A })), p[A] = 1); let C = a._g.doc.getElementById(B); let D; C ? (p[B]++, D = C.getElementsByTagName('use')[0]) : (C = q(q('marker'), { id: B, markerHeight: y, markerWidth: x, orient: 'auto', refX: v, refY: y / 2 }), D = q(q('use'), { 'xlink:href': `#${A}`, transform: `${f ? `rotate(180 ${x / 2} ${y / 2}) ` : l}scale(${x / z},${y / z})`, 'stroke-width': (1 / ((x / z + y / z) / 2)).toFixed(4) }), C.appendChild(D), h.defs.appendChild(C), p[B] = 1), q(D, w); const F = u * (r != 'diamond' && r != 'oval'); f ? (s = d._.arrows.startdx * m || 0, t = a.getTotalLength(k.path) - F * m) : (s = F * m, t = a.getTotalLength(k.path) - (d._.arrows.enddx * m || 0)), w = {}, w[`marker-${i}`] = `url(#${B})`; if (t || s)w.d = Raphael.getSubpath(k.path, s, t); q(j, w), d._.arrows[`${i}Path`] = A, d._.arrows[`${i}Marker`] = B, d._.arrows[`${i}dx`] = F, d._.arrows[`${i}Type`] = r, d._.arrows[`${i}String`] = e; } else f ? (s = d._.arrows.startdx * m || 0, t = a.getTotalLength(k.path) - s) : (s = 0, t = a.getTotalLength(k.path) - (d._.arrows.enddx * m || 0)), d._.arrows[`${i}Path`] && q(j, { d: Raphael.getSubpath(k.path, s, t) }), delete d._.arrows[`${i}Path`], delete d._.arrows[`${i}Marker`], delete d._.arrows[`${i}dx`], delete d._.arrows[`${i}Type`], delete d._.arrows[`${i}String`]; for (w in p) if (p[b](w) && !p[w]) { const G = a._g.doc.getElementById(w); G && G.parentNode.removeChild(G); } } }; const u = { '': [0], none: [0], '-': [3, 1], '.': [1, 1], '-.': [3, 1, 1, 1], '-..': [3, 1, 1, 1, 1, 1], '. ': [1, 3], '- ': [4, 3], '--': [8, 3], '- .': [4, 3, 1, 3], '--.': [8, 3, 1, 3], '--..': [8, 3, 1, 3, 1, 3] }; const v = function (a, b, d) { b = u[c(b).toLowerCase()]; if (b) { const e = a.attrs['stroke-width'] || '1'; const f = { round: e, square: e, butt: 0 }[a.attrs['stroke-linecap'] || d['stroke-linecap']] || 0; const g = []; let h = b.length; while (h--)g[h] = b[h] * e + (h % 2 ? 1 : -1) * f; q(a.node, { 'stroke-dasharray': g.join(',') }); } }; const w = function (d, f) { const i = d.node; const k = d.attrs; const m = i.style.visibility; i.style.visibility = 'hidden'; for (let o in f) if (f[b](o)) { if (!a._availableAttrs[b](o)) continue; let p = f[o]; k[o] = p; switch (o) { case 'blur': d.blur(p); break; case 'href': case 'title': case 'target': var u = i.parentNode; if (u.tagName.toLowerCase() != 'a') { const w = q('a'); u.insertBefore(w, i), w.appendChild(i), u = w; }o == 'target' ? u.setAttributeNS(n, 'show', p == 'blank' ? 'new' : p) : u.setAttributeNS(n, o, p); break; case 'cursor': i.style.cursor = p; break; case 'transform': d.transform(p); break; case 'arrow-start': t(d, p); break; case 'arrow-end': t(d, p, 1); break; case 'clip-rect': var x = c(p).split(j); if (x.length == 4) { d.clip && d.clip.parentNode.parentNode.removeChild(d.clip.parentNode); var z = q('clipPath'); const A = q('rect'); z.id = a.createUUID(), q(A, { x: x[0], y: x[1], width: x[2], height: x[3] }), z.appendChild(A), d.paper.defs.appendChild(z), q(i, { 'clip-path': `url(#${z.id})` }), d.clip = A; } if (!p) { const B = i.getAttribute('clip-path'); if (B) { const C = a._g.doc.getElementById(B.replace(/(^url\(#|\)$)/g, l)); C && C.parentNode.removeChild(C), q(i, { 'clip-path': l }), delete d.clip; } } break; case 'path': d.type == 'path' && (q(i, { d: p ? k.path = a._pathToAbsolute(p) : 'M0,0' }), d._.dirty = 1, d._.arrows && ('startString' in d._.arrows && t(d, d._.arrows.startString), 'endString' in d._.arrows && t(d, d._.arrows.endString, 1))); break; case 'width': i.setAttribute(o, p), d._.dirty = 1; if (k.fx)o = 'x', p = k.x; else break; case 'x': k.fx && (p = -k.x - (k.width || 0)); case 'rx': if (o == 'rx' && d.type == 'rect') break; case 'cx': i.setAttribute(o, p), d.pattern && s(d), d._.dirty = 1; break; case 'height': i.setAttribute(o, p), d._.dirty = 1; if (k.fy)o = 'y', p = k.y; else break; case 'y': k.fy && (p = -k.y - (k.height || 0)); case 'ry': if (o == 'ry' && d.type == 'rect') break; case 'cy': i.setAttribute(o, p), d.pattern && s(d), d._.dirty = 1; break; case 'r': d.type == 'rect' ? q(i, { rx: p, ry: p }) : i.setAttribute(o, p), d._.dirty = 1; break; case 'src': d.type == 'image' && i.setAttributeNS(n, 'href', p); break; case 'stroke-width': if (d._.sx != 1 || d._.sy != 1)p /= g(h(d._.sx), h(d._.sy)) || 1; d.paper._vbSize && (p *= d.paper._vbSize), i.setAttribute(o, p), k['stroke-dasharray'] && v(d, k['stroke-dasharray'], f), d._.arrows && ('startString' in d._.arrows && t(d, d._.arrows.startString), 'endString' in d._.arrows && t(d, d._.arrows.endString, 1)); break; case 'stroke-dasharray': v(d, p, f); break; case 'fill': var D = c(p).match(a._ISURL); if (D) { z = q('pattern'); var F = q('image'); z.id = a.createUUID(), q(z, { x: 0, y: 0, patternUnits: 'userSpaceOnUse', height: 1, width: 1 }), q(F, { x: 0, y: 0, 'xlink:href': D[1] }), z.appendChild(F), (function (b) { a._preload(D[1], function () { const a = this.offsetWidth; const c = this.offsetHeight; q(b, { width: a, height: c }), q(F, { width: a, height: c }), d.paper.safari(); }); }(z)), d.paper.defs.appendChild(z), q(i, { fill: `url(#${z.id})` }), d.pattern = z, d.pattern && s(d); break; } var G = a.getRGB(p); if (!G.error) delete f.gradient, delete k.gradient, !a.is(k.opacity, 'undefined') && a.is(f.opacity, 'undefined') && q(i, { opacity: k.opacity }), !a.is(k['fill-opacity'], 'undefined') && a.is(f['fill-opacity'], 'undefined') && q(i, { 'fill-opacity': k['fill-opacity'] }); else if ((d.type == 'circle' || d.type == 'ellipse' || c(p).charAt() != 'r') && r(d, p)) { if ('opacity' in k || 'fill-opacity' in k) { var H = a._g.doc.getElementById(i.getAttribute('fill').replace(/^url\(#|\)$/g, l)); if (H) { var I = H.getElementsByTagName('stop'); q(I[I.length - 1], { 'stop-opacity': ('opacity' in k ? k.opacity : 1) * ('fill-opacity' in k ? k['fill-opacity'] : 1) }); } }k.gradient = p, k.fill = 'none'; break; }G[b]('opacity') && q(i, { 'fill-opacity': G.opacity > 1 ? G.opacity / 100 : G.opacity }); case 'stroke': G = a.getRGB(p), i.setAttribute(o, G.hex), o == 'stroke' && G[b]('opacity') && q(i, { 'stroke-opacity': G.opacity > 1 ? G.opacity / 100 : G.opacity }), o == 'stroke' && d._.arrows && ('startString' in d._.arrows && t(d, d._.arrows.startString), 'endString' in d._.arrows && t(d, d._.arrows.endString, 1)); break; case 'gradient': (d.type == 'circle' || d.type == 'ellipse' || c(p).charAt() != 'r') && r(d, p); break; case 'opacity': k.gradient && !k[b]('stroke-opacity') && q(i, { 'stroke-opacity': p > 1 ? p / 100 : p }); case 'fill-opacity': if (k.gradient) { H = a._g.doc.getElementById(i.getAttribute('fill').replace(/^url\(#|\)$/g, l)), H && (I = H.getElementsByTagName('stop'), q(I[I.length - 1], { 'stop-opacity': p })); break; } default: o == 'font-size' && (p = `${e(p, 10)}px`); var J = o.replace(/(\-.)/g, a => a.substring(1).toUpperCase()); i.style[J] = p, d._.dirty = 1, i.setAttribute(o, p); } }y(d, f), i.style.visibility = m; }; const x = 1.2; var y = function (d, f) { if (d.type == 'text' && !!(f[b]('text') || f[b]('font') || f[b]('font-size') || f[b]('x') || f[b]('y'))) { const g = d.attrs; const h = d.node; const i = h.firstChild ? e(a._g.doc.defaultView.getComputedStyle(h.firstChild, l).getPropertyValue('font-size'), 10) : 10; if (f[b]('text')) { g.text = f.text; while (h.firstChild)h.removeChild(h.firstChild); const j = c(f.text).split('\n'); var k = []; let m; for (var n = 0, o = j.length; n < o; n++)m = q('tspan'), n && q(m, { dy: i * x, x: g.x }), m.appendChild(a._g.doc.createTextNode(j[n])), h.appendChild(m), k[n] = m; } else { k = h.getElementsByTagName('tspan'); for (n = 0, o = k.length; n < o; n++)n ? q(k[n], { dy: i * x, x: g.x }) : q(k[0], { dy: 0 }); }q(h, { x: g.x, y: g.y }), d._.dirty = 1; const p = d._getBBox(); const r = g.y - (p.y + p.height / 2); r && a.is(r, 'finite') && q(k[0], { dy: r }); } }; const z = function (b, c) { const d = 0; const e = 0; this[0] = this.node = b, b.raphael = !0, this.id = a._oid++, b.raphaelid = this.id, this.matrix = a.matrix(), this.realPath = null, this.paper = c, this.attrs = this.attrs || {}, this._ = { transform: [], sx: 1, sy: 1, deg: 0, dx: 0, dy: 0, dirty: 1 }, !c.bottom && (c.bottom = this), this.prev = c.top, c.top && (c.top.next = this), c.top = this, this.next = null; }; const A = a.el; z.prototype = A, A.constructor = z, a._engine.path = function (a, b) { const c = q('path'); b.canvas && b.canvas.appendChild(c); const d = new z(c, b); d.type = 'path', w(d, { fill: 'none', stroke: '#000', path: a }); return d; }, A.rotate = function (a, b, e) { if (this.removed) return this; a = c(a).split(j), a.length - 1 && (b = d(a[1]), e = d(a[2])), a = d(a[0]), e == null && (b = e); if (b == null || e == null) { const f = this.getBBox(1); b = f.x + f.width / 2, e = f.y + f.height / 2; } this.transform(this._.transform.concat([['r', a, b, e]])); return this; }, A.scale = function (a, b, e, f) { if (this.removed) return this; a = c(a).split(j), a.length - 1 && (b = d(a[1]), e = d(a[2]), f = d(a[3])), a = d(a[0]), b == null && (b = a), f == null && (e = f); if (e == null || f == null) var g = this.getBBox(1); e = e == null ? g.x + g.width / 2 : e, f = f == null ? g.y + g.height / 2 : f, this.transform(this._.transform.concat([['s', a, b, e, f]])); return this; }, A.translate = function (a, b) { if (this.removed) return this; a = c(a).split(j), a.length - 1 && (b = d(a[1])), a = d(a[0]) || 0, b = +b || 0, this.transform(this._.transform.concat([['t', a, b]])); return this; }, A.transform = function (c) { const d = this._; if (c == null) return d.transform; a._extractTransform(this, c), this.clip && q(this.clip, { transform: this.matrix.invert() }), this.pattern && s(this), this.node && q(this.node, { transform: this.matrix }); if (d.sx != 1 || d.sy != 1) { const e = this.attrs[b]('stroke-width') ? this.attrs['stroke-width'] : 1; this.attr({ 'stroke-width': e }); } return this; }, A.hide = function () { !this.removed && this.paper.safari(this.node.style.display = 'none'); return this; }, A.show = function () { !this.removed && this.paper.safari(this.node.style.display = ''); return this; }, A.remove = function () { if (!this.removed && !!this.node.parentNode) { const b = this.paper; b.__set__ && b.__set__.exclude(this), k.unbind(`raphael.*.*.${this.id}`), this.gradient && b.defs.removeChild(this.gradient), a._tear(this, b), this.node.parentNode.tagName.toLowerCase() == 'a' ? this.node.parentNode.parentNode.removeChild(this.node.parentNode) : this.node.parentNode.removeChild(this.node); for (const c in this) this[c] = typeof this[c] === 'function' ? a._removedFactory(c) : null; this.removed = !0; } }, A._getBBox = function () { if (this.node.style.display == 'none') { this.show(); var a = !0; } let b = {}; try { b = this.node.getBBox(); } catch (c) {} finally { b = b || {}; }a && this.hide(); return b; }, A.attr = function (c, d) { if (this.removed) return this; if (c == null) { const e = {}; for (const f in this.attrs) this.attrs[b](f) && (e[f] = this.attrs[f]); e.gradient && e.fill == 'none' && (e.fill = e.gradient) && delete e.gradient, e.transform = this._.transform; return e; } if (d == null && a.is(c, 'string')) { if (c == 'fill' && this.attrs.fill == 'none' && this.attrs.gradient) return this.attrs.gradient; if (c == 'transform') return this._.transform; const g = c.split(j); var h = {}; for (var i = 0, l = g.length; i < l; i++)c = g[i], c in this.attrs ? h[c] = this.attrs[c] : a.is(this.paper.customAttributes[c], 'function') ? h[c] = this.paper.customAttributes[c].def : h[c] = a._availableAttrs[c]; return l - 1 ? h : h[g[0]]; } if (d == null && a.is(c, 'array')) { h = {}; for (i = 0, l = c.length; i < l; i++)h[c[i]] = this.attr(c[i]); return h; } if (d != null) { var m = {}; m[c] = d; } else c != null && a.is(c, 'object') && (m = c); for (var n in m)k(`raphael.attr.${n}.${this.id}`, this, m[n]); for (n in this.paper.customAttributes) if (this.paper.customAttributes[b](n) && m[b](n) && a.is(this.paper.customAttributes[n], 'function')) { const o = this.paper.customAttributes[n].apply(this, [].concat(m[n])); this.attrs[n] = m[n]; for (const p in o)o[b](p) && (m[p] = o[p]); }w(this, m); return this; }, A.toFront = function () { if (this.removed) return this; this.node.parentNode.tagName.toLowerCase() == 'a' ? this.node.parentNode.parentNode.appendChild(this.node.parentNode) : this.node.parentNode.appendChild(this.node); const b = this.paper; b.top != this && a._tofront(this, b); return this; }, A.toBack = function () { if (this.removed) return this; const b = this.node.parentNode; b.tagName.toLowerCase() == 'a' ? b.parentNode.insertBefore(this.node.parentNode, this.node.parentNode.parentNode.firstChild) : b.firstChild != this.node && b.insertBefore(this.node, this.node.parentNode.firstChild), a._toback(this, this.paper); const c = this.paper; return this; }, A.insertAfter = function (b) { if (this.removed) return this; const c = b.node || b[b.length - 1].node; c.nextSibling ? c.parentNode.insertBefore(this.node, c.nextSibling) : c.parentNode.appendChild(this.node), a._insertafter(this, b, this.paper); return this; }, A.insertBefore = function (b) { if (this.removed) return this; const c = b.node || b[0].node; c.parentNode.insertBefore(this.node, c), a._insertbefore(this, b, this.paper); return this; }, A.blur = function (b) { const c = this; if (+b !== 0) { const d = q('filter'); const e = q('feGaussianBlur'); c.attrs.blur = b, d.id = a.createUUID(), q(e, { stdDeviation: +b || 1.5 }), d.appendChild(e), c.paper.defs.appendChild(d), c._blur = d, q(c.node, { filter: `url(#${d.id})` }); } else c._blur && (c._blur.parentNode.removeChild(c._blur), delete c._blur, delete c.attrs.blur), c.node.removeAttribute('filter'); }, a._engine.circle = function (a, b, c, d) { const e = q('circle'); a.canvas && a.canvas.appendChild(e); const f = new z(e, a); f.attrs = { cx: b, cy: c, r: d, fill: 'none', stroke: '#000' }, f.type = 'circle', q(e, f.attrs); return f; }, a._engine.rect = function (a, b, c, d, e, f) { const g = q('rect'); a.canvas && a.canvas.appendChild(g); const h = new z(g, a); h.attrs = { x: b, y: c, width: d, height: e, r: f || 0, rx: f || 0, ry: f || 0, fill: 'none', stroke: '#000' }, h.type = 'rect', q(g, h.attrs); return h; }, a._engine.ellipse = function (a, b, c, d, e) { const f = q('ellipse'); a.canvas && a.canvas.appendChild(f); const g = new z(f, a); g.attrs = { cx: b, cy: c, rx: d, ry: e, fill: 'none', stroke: '#000' }, g.type = 'ellipse', q(f, g.attrs); return g; }, a._engine.image = function (a, b, c, d, e, f) { const g = q('image'); q(g, { x: c, y: d, width: e, height: f, preserveAspectRatio: 'none' }), g.setAttributeNS(n, 'href', b), a.canvas && a.canvas.appendChild(g); const h = new z(g, a); h.attrs = { x: c, y: d, width: e, height: f, src: b }, h.type = 'image'; return h; }, a._engine.text = function (b, c, d, e) { const f = q('text'); b.canvas && b.canvas.appendChild(f); const g = new z(f, b); g.attrs = { x: c, y: d, 'text-anchor': 'middle', text: e, font: a._availableAttrs.font, stroke: 'none', fill: '#000' }, g.type = 'text', w(g, g.attrs); return g; }, a._engine.setSize = function (a, b) { this.width = a || this.width, this.height = b || this.height, this.canvas.setAttribute('width', this.width), this.canvas.setAttribute('height', this.height), this._viewBox && this.setViewBox.apply(this, this._viewBox); return this; }, a._engine.create = function () { const b = a._getContainer.apply(0, arguments); let c = b && b.container; let d = b.x; let e = b.y; let f = b.width; let g = b.height; if (!c) throw new Error('SVG container not found.'); const h = q('svg'); const i = 'overflow:hidden;'; let j; d = d || 0, e = e || 0, f = f || 512, g = g || 342, q(h, { height: g, version: 1.1, width: f, xmlns: 'http://www.w3.org/2000/svg' }), c == 1 ? (h.style.cssText = `${i}position:absolute;left:${d}px;top:${e}px`, a._g.doc.body.appendChild(h), j = 1) : (h.style.cssText = `${i}position:relative`, c.firstChild ? c.insertBefore(h, c.firstChild) : c.appendChild(h)), c = new a._Paper(), c.width = f, c.height = g, c.canvas = h, c.clear(), c._left = c._top = 0, j && (c.renderfix = function () {}), c.renderfix(); return c; }, a._engine.setViewBox = function (a, b, c, d, e) { k('raphael.setViewBox', this, this._viewBox, [a, b, c, d, e]); let f = g(c / this.width, d / this.height); let h = this.top; const i = e ? 'meet' : 'xMinYMin'; let j; let l; a == null ? (this._vbSize && (f = 1), delete this._vbSize, j = `0 0 ${this.width}${m}${this.height}`) : (this._vbSize = f, j = a + m + b + m + c + m + d), q(this.canvas, { viewBox: j, preserveAspectRatio: i }); while (f && h)l = 'stroke-width' in h.attrs ? h.attrs['stroke-width'] : 1, h.attr({ 'stroke-width': l }), h._.dirty = 1, h._.dirtyT = 1, h = h.prev; this._viewBox = [a, b, c, d, !!e]; return this; }, a.prototype.renderfix = function () { const a = this.canvas; const b = a.style; let c; try { c = a.getScreenCTM() || a.createSVGMatrix(); } catch (d) { c = a.createSVGMatrix(); } const e = -c.e % 1; const f = -c.f % 1; if (e || f)e && (this._left = (this._left + e) % 1, b.left = `${this._left}px`), f && (this._top = (this._top + f) % 1, b.top = `${this._top}px`); }, a.prototype.clear = function () { a.eve('raphael.clear', this); const b = this.canvas; while (b.firstChild)b.removeChild(b.firstChild); this.bottom = this.top = null, (this.desc = q('desc')).appendChild(a._g.doc.createTextNode(`Created with Raphaël ${a.version}`)), b.appendChild(this.desc), b.appendChild(this.defs = q('defs')); }, a.prototype.remove = function () { k('raphael.remove', this), this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); for (const b in this) this[b] = typeof this[b] === 'function' ? a._removedFactory(b) : null; }; const B = a.st; for (const C in A)A[b](C) && !B[b](C) && (B[C] = (function (a) { return function () { const b = arguments; return this.forEach((c) => { c[a].apply(c, b); }); }; }(C))); }(window.Raphael)), window.Raphael.vml && (function (a) { + const b = 'hasOwnProperty'; const c = String; const d = parseFloat; const e = Math; const f = e.round; const g = e.max; const h = e.min; const i = e.abs; const j = 'fill'; const k = /[, ]+/; const l = a.eve; const m = ' progid:DXImageTransform.Microsoft'; const n = ' '; const o = ''; const p = { M: 'm', L: 'l', C: 'c', Z: 'x', m: 't', l: 'r', c: 'v', z: 'x' }; const q = /([clmz]),?([^clmz]*)/gi; const r = / progid:\S+Blur\([^\)]+\)/g; const s = /-?[^,\s-]+/g; const t = 'position:absolute;left:0;top:0;width:1px;height:1px'; const u = 21600; const v = { path: 1, rect: 1, image: 1 }; const w = { circle: 1, ellipse: 1 }; const x = function (b) { let d = /[ahqstv]/ig; let e = a._pathToAbsolute; c(b).match(d) && (e = a._path2curve), d = /[clmz]/g; if (e == a._pathToAbsolute && !c(b).match(d)) { var g = c(b).replace(q, (a, b, c) => { let d = []; const e = b.toLowerCase() == 'm'; let g = p[b]; c.replace(s, (a) => { e && d.length == 2 && (g += d + p[b == 'm' ? 'l' : 'L'], d = []), d.push(f(a * u)); }); return g + d; }); return g; } const h = e(b); let i; let j; g = []; for (let k = 0, l = h.length; k < l; k++) { i = h[k], j = h[k][0].toLowerCase(), j == 'z' && (j = 'x'); for (let m = 1, r = i.length; m < r; m++)j += f(i[m] * u) + (m != r - 1 ? ',' : o); g.push(j); } return g.join(n); }; const y = function (b, c, d) { const e = a.matrix(); e.rotate(-b, 0.5, 0.5); return { dx: e.x(c, d), dy: e.y(c, d) }; }; const z = function (a, b, c, d, e, f) { const g = a._; const h = a.matrix; const k = g.fillpos; const l = a.node; const m = l.style; let o = 1; let p = ''; let q; const r = u / b; const s = u / c; m.visibility = 'hidden'; if (!!b && !!c) { l.coordsize = i(r) + n + i(s), m.rotation = f * (b * c < 0 ? -1 : 1); if (f) { var t = y(f, d, e); d = t.dx, e = t.dy; }b < 0 && (p += 'x'), c < 0 && (p += ' y') && (o = -1), m.flip = p, l.coordorigin = d * -r + n + e * -s; if (k || g.fillsize) { let v = l.getElementsByTagName(j); v = v && v[0], l.removeChild(v), k && (t = y(f, h.x(k[0], k[1]), h.y(k[0], k[1])), v.position = t.dx * o + n + t.dy * o), g.fillsize && (v.size = g.fillsize[0] * i(b) + n + g.fillsize[1] * i(c)), l.appendChild(v); }m.visibility = 'visible'; } }; a.toString = function () { return `Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël ${this.version}`; }; const A = function (a, b, d) { const e = c(b).toLowerCase().split('-'); const f = d ? 'end' : 'start'; let g = e.length; let h = 'classic'; let i = 'medium'; let j = 'medium'; while (g--) switch (e[g]) { case 'block': case 'classic': case 'oval': case 'diamond': case 'open': case 'none': h = e[g]; break; case 'wide': case 'narrow': j = e[g]; break; case 'long': case 'short': i = e[g]; } const k = a.node.getElementsByTagName('stroke')[0]; k[`${f}arrow`] = h, k[`${f}arrowlength`] = i, k[`${f}arrowwidth`] = j; }; const B = function (e, i) { e.attrs = e.attrs || {}; const l = e.node; const m = e.attrs; let p = l.style; let q; const r = v[e.type] && (i.x != m.x || i.y != m.y || i.width != m.width || i.height != m.height || i.cx != m.cx || i.cy != m.cy || i.rx != m.rx || i.ry != m.ry || i.r != m.r); const s = w[e.type] && (m.cx != i.cx || m.cy != i.cy || m.r != i.r || m.rx != i.rx || m.ry != i.ry); const t = e; for (const y in i)i[b](y) && (m[y] = i[y]); r && (m.path = a._getPath[e.type](e), e._.dirty = 1), i.href && (l.href = i.href), i.title && (l.title = i.title), i.target && (l.target = i.target), i.cursor && (p.cursor = i.cursor), 'blur' in i && e.blur(i.blur); if (i.path && e.type == 'path' || r)l.path = x(~c(m.path).toLowerCase().indexOf('r') ? a._pathToAbsolute(m.path) : m.path), e.type == 'image' && (e._.fillpos = [m.x, m.y], e._.fillsize = [m.width, m.height], z(e, 1, 1, 0, 0, 0)); 'transform' in i && e.transform(i.transform); if (s) { const B = +m.cx; const D = +m.cy; const E = +m.rx || +m.r || 0; const G = +m.ry || +m.r || 0; l.path = a.format('ar{0},{1},{2},{3},{4},{1},{4},{1}x', f((B - E) * u), f((D - G) * u), f((B + E) * u), f((D + G) * u), f(B * u)); } if ('clip-rect' in i) { const H = c(i['clip-rect']).split(k); if (H.length == 4) { H[2] = +H[2] + +H[0], H[3] = +H[3] + +H[1]; const I = l.clipRect || a._g.doc.createElement('div'); const J = I.style; J.clip = a.format('rect({1}px {2}px {3}px {0}px)', H), l.clipRect || (J.position = 'absolute', J.top = 0, J.left = 0, J.width = `${e.paper.width}px`, J.height = `${e.paper.height}px`, l.parentNode.insertBefore(I, l), I.appendChild(l), l.clipRect = I); }i['clip-rect'] || l.clipRect && (l.clipRect.style.clip = 'auto'); } if (e.textpath) { const K = e.textpath.style; i.font && (K.font = i.font), i['font-family'] && (K.fontFamily = `"${i['font-family'].split(',')[0].replace(/^['"]+|['"]+$/g, o)}"`), i['font-size'] && (K.fontSize = i['font-size']), i['font-weight'] && (K.fontWeight = i['font-weight']), i['font-style'] && (K.fontStyle = i['font-style']); }'arrow-start' in i && A(t, i['arrow-start']), 'arrow-end' in i && A(t, i['arrow-end'], 1); if (i.opacity != null || i['stroke-width'] != null || i.fill != null || i.src != null || i.stroke != null || i['stroke-width'] != null || i['stroke-opacity'] != null || i['fill-opacity'] != null || i['stroke-dasharray'] != null || i['stroke-miterlimit'] != null || i['stroke-linejoin'] != null || i['stroke-linecap'] != null) { let L = l.getElementsByTagName(j); let M = !1; L = L && L[0], !L && (M = L = F(j)), e.type == 'image' && i.src && (L.src = i.src), i.fill && (L.on = !0); if (L.on == null || i.fill == 'none' || i.fill === null)L.on = !1; if (L.on && i.fill) { const N = c(i.fill).match(a._ISURL); if (N) { L.parentNode == l && l.removeChild(L), L.rotate = !0, L.src = N[1], L.type = 'tile'; const O = e.getBBox(1); L.position = O.x + n + O.y, e._.fillpos = [O.x, O.y], a._preload(N[1], function () { e._.fillsize = [this.offsetWidth, this.offsetHeight]; }); } else L.color = a.getRGB(i.fill).hex, L.src = o, L.type = 'solid', a.getRGB(i.fill).error && (t.type in { circle: 1, ellipse: 1 } || c(i.fill).charAt() != 'r') && C(t, i.fill, L) && (m.fill = 'none', m.gradient = i.fill, L.rotate = !1); } if ('fill-opacity' in i || 'opacity' in i) { var P = ((+m['fill-opacity'] + 1 || 2) - 1) * ((+m.opacity + 1 || 2) - 1) * ((+a.getRGB(i.fill).o + 1 || 2) - 1); P = h(g(P, 0), 1), L.opacity = P, L.src && (L.color = 'none'); }l.appendChild(L); let Q = l.getElementsByTagName('stroke') && l.getElementsByTagName('stroke')[0]; let T = !1; !Q && (T = Q = F('stroke')); if (i.stroke && i.stroke != 'none' || i['stroke-width'] || i['stroke-opacity'] != null || i['stroke-dasharray'] || i['stroke-miterlimit'] || i['stroke-linejoin'] || i['stroke-linecap'])Q.on = !0; (i.stroke == 'none' || i.stroke === null || Q.on == null || i.stroke == 0 || i['stroke-width'] == 0) && (Q.on = !1); const U = a.getRGB(i.stroke); Q.on && i.stroke && (Q.color = U.hex), P = ((+m['stroke-opacity'] + 1 || 2) - 1) * ((+m.opacity + 1 || 2) - 1) * ((+U.o + 1 || 2) - 1); let V = (d(i['stroke-width']) || 1) * 0.75; P = h(g(P, 0), 1), i['stroke-width'] == null && (V = m['stroke-width']), i['stroke-width'] && (Q.weight = V), V && V < 1 && (P *= V) && (Q.weight = 1), Q.opacity = P, i['stroke-linejoin'] && (Q.joinstyle = i['stroke-linejoin'] || 'miter'), Q.miterlimit = i['stroke-miterlimit'] || 8, i['stroke-linecap'] && (Q.endcap = i['stroke-linecap'] == 'butt' ? 'flat' : i['stroke-linecap'] == 'square' ? 'square' : 'round'); if (i['stroke-dasharray']) { const W = { '-': 'shortdash', '.': 'shortdot', '-.': 'shortdashdot', '-..': 'shortdashdotdot', '. ': 'dot', '- ': 'dash', '--': 'longdash', '- .': 'dashdot', '--.': 'longdashdot', '--..': 'longdashdotdot' }; Q.dashstyle = W[b](i['stroke-dasharray']) ? W[i['stroke-dasharray']] : o; }T && l.appendChild(Q); } if (t.type == 'text') { t.paper.canvas.style.display = o; const X = t.paper.span; const Y = 100; let Z = m.font && m.font.match(/\d+(?:\.\d*)?(?=px)/); p = X.style, m.font && (p.font = m.font), m['font-family'] && (p.fontFamily = m['font-family']), m['font-weight'] && (p.fontWeight = m['font-weight']), m['font-style'] && (p.fontStyle = m['font-style']), Z = d(m['font-size'] || Z && Z[0]) || 10, p.fontSize = `${Z * Y}px`, t.textpath.string && (X.innerHTML = c(t.textpath.string).replace(/')); const $ = X.getBoundingClientRect(); t.W = m.w = ($.right - $.left) / Y, t.H = m.h = ($.bottom - $.top) / Y, t.X = m.x, t.Y = m.y + t.H / 2, ('x' in i || 'y' in i) && (t.path.v = a.format('m{0},{1}l{2},{1}', f(m.x * u), f(m.y * u), f(m.x * u) + 1)); const _ = ['x', 'y', 'text', 'font', 'font-family', 'font-weight', 'font-style', 'font-size']; for (let ba = 0, bb = _.length; ba < bb; ba++) if (_[ba] in i) { t._.dirty = 1; break; } switch (m['text-anchor']) { case 'start': t.textpath.style['v-text-align'] = 'left', t.bbx = t.W / 2; break; case 'end': t.textpath.style['v-text-align'] = 'right', t.bbx = -t.W / 2; break; default: t.textpath.style['v-text-align'] = 'center', t.bbx = 0; }t.textpath.style['v-text-kern'] = !0; } }; var C = function (b, f, g) { b.attrs = b.attrs || {}; const h = b.attrs; const i = Math.pow; let j; let k; let l = 'linear'; let m = '.5 .5'; b.attrs.gradient = f, f = c(f).replace(a._radial_gradient, (a, b, c) => { l = 'radial', b && c && (b = d(b), c = d(c), (b - 0.5) ** 2 + (c - 0.5) ** 2 > 0.25 && (c = e.sqrt(0.25 - (b - 0.5) ** 2) * ((c > 0.5) * 2 - 1) + 0.5), m = b + n + c); return o; }), f = f.split(/\s*\-\s*/); if (l == 'linear') { var p = f.shift(); p = -d(p); if (isNaN(p)) return null; } const q = a._parseDots(f); if (!q) return null; b = b.shape || b.node; if (q.length) { b.removeChild(g), g.on = !0, g.method = 'none', g.color = q[0].color, g.color2 = q[q.length - 1].color; const r = []; for (let s = 0, t = q.length; s < t; s++)q[s].offset && r.push(q[s].offset + n + q[s].color); g.colors = r.length ? r.join() : `0% ${g.color}`, l == 'radial' ? (g.type = 'gradientTitle', g.focus = '100%', g.focussize = '0 0', g.focusposition = m, g.angle = 0) : (g.type = 'gradient', g.angle = (270 - p) % 360), b.appendChild(g); } return 1; }; const D = function (b, c) { this[0] = this.node = b, b.raphael = !0, this.id = a._oid++, b.raphaelid = this.id, this.X = 0, this.Y = 0, this.attrs = {}, this.paper = c, this.matrix = a.matrix(), this._ = { transform: [], sx: 1, sy: 1, dx: 0, dy: 0, deg: 0, dirty: 1, dirtyT: 1 }, !c.bottom && (c.bottom = this), this.prev = c.top, c.top && (c.top.next = this), c.top = this, this.next = null; }; const E = a.el; D.prototype = E, E.constructor = D, E.transform = function (b) { if (b == null) return this._.transform; const d = this.paper._viewBoxShift; const e = d ? `s${[d.scale, d.scale]}-1-1t${[d.dx, d.dy]}` : o; let f; d && (f = b = c(b).replace(/\.{3}|\u2026/g, this._.transform || o)), a._extractTransform(this, e + b); const g = this.matrix.clone(); const h = this.skew; const i = this.node; let j; const k = ~c(this.attrs.fill).indexOf('-'); const l = !c(this.attrs.fill).indexOf('url('); g.translate(-0.5, -0.5); if (l || k || this.type == 'image') { h.matrix = '1 0 0 1', h.offset = '0 0', j = g.split(); if (k && j.noRotation || !j.isSimple) { i.style.filter = g.toFilter(); const m = this.getBBox(); const p = this.getBBox(1); const q = m.x - p.x; const r = m.y - p.y; i.coordorigin = q * -u + n + r * -u, z(this, 1, 1, q, r, 0); } else i.style.filter = o, z(this, j.scalex, j.scaley, j.dx, j.dy, j.rotate); } else i.style.filter = o, h.matrix = c(g), h.offset = g.offset(); f && (this._.transform = f); return this; }, E.rotate = function (a, b, e) { if (this.removed) return this; if (a != null) { a = c(a).split(k), a.length - 1 && (b = d(a[1]), e = d(a[2])), a = d(a[0]), e == null && (b = e); if (b == null || e == null) { const f = this.getBBox(1); b = f.x + f.width / 2, e = f.y + f.height / 2; } this._.dirtyT = 1, this.transform(this._.transform.concat([['r', a, b, e]])); return this; } }, E.translate = function (a, b) { if (this.removed) return this; a = c(a).split(k), a.length - 1 && (b = d(a[1])), a = d(a[0]) || 0, b = +b || 0, this._.bbox && (this._.bbox.x += a, this._.bbox.y += b), this.transform(this._.transform.concat([['t', a, b]])); return this; }, E.scale = function (a, b, e, f) { if (this.removed) return this; a = c(a).split(k), a.length - 1 && (b = d(a[1]), e = d(a[2]), f = d(a[3]), isNaN(e) && (e = null), isNaN(f) && (f = null)), a = d(a[0]), b == null && (b = a), f == null && (e = f); if (e == null || f == null) var g = this.getBBox(1); e = e == null ? g.x + g.width / 2 : e, f = f == null ? g.y + g.height / 2 : f, this.transform(this._.transform.concat([['s', a, b, e, f]])), this._.dirtyT = 1; return this; }, E.hide = function () { !this.removed && (this.node.style.display = 'none'); return this; }, E.show = function () { !this.removed && (this.node.style.display = o); return this; }, E._getBBox = function () { if (this.removed) return {}; return { x: this.X + (this.bbx || 0) - this.W / 2, y: this.Y - this.H, width: this.W, height: this.H }; }, E.remove = function () { if (!this.removed && !!this.node.parentNode) { this.paper.__set__ && this.paper.__set__.exclude(this), a.eve.unbind(`raphael.*.*.${this.id}`), a._tear(this, this.paper), this.node.parentNode.removeChild(this.node), this.shape && this.shape.parentNode.removeChild(this.shape); for (const b in this) this[b] = typeof this[b] === 'function' ? a._removedFactory(b) : null; this.removed = !0; } }, E.attr = function (c, d) { if (this.removed) return this; if (c == null) { const e = {}; for (const f in this.attrs) this.attrs[b](f) && (e[f] = this.attrs[f]); e.gradient && e.fill == 'none' && (e.fill = e.gradient) && delete e.gradient, e.transform = this._.transform; return e; } if (d == null && a.is(c, 'string')) { if (c == j && this.attrs.fill == 'none' && this.attrs.gradient) return this.attrs.gradient; const g = c.split(k); var h = {}; for (var i = 0, m = g.length; i < m; i++)c = g[i], c in this.attrs ? h[c] = this.attrs[c] : a.is(this.paper.customAttributes[c], 'function') ? h[c] = this.paper.customAttributes[c].def : h[c] = a._availableAttrs[c]; return m - 1 ? h : h[g[0]]; } if (this.attrs && d == null && a.is(c, 'array')) { h = {}; for (i = 0, m = c.length; i < m; i++)h[c[i]] = this.attr(c[i]); return h; } let n; d != null && (n = {}, n[c] = d), d == null && a.is(c, 'object') && (n = c); for (var o in n)l(`raphael.attr.${o}.${this.id}`, this, n[o]); if (n) { for (o in this.paper.customAttributes) if (this.paper.customAttributes[b](o) && n[b](o) && a.is(this.paper.customAttributes[o], 'function')) { const p = this.paper.customAttributes[o].apply(this, [].concat(n[o])); this.attrs[o] = n[o]; for (const q in p)p[b](q) && (n[q] = p[q]); }n.text && this.type == 'text' && (this.textpath.string = n.text), B(this, n); } return this; }, E.toFront = function () { !this.removed && this.node.parentNode.appendChild(this.node), this.paper && this.paper.top != this && a._tofront(this, this.paper); return this; }, E.toBack = function () { if (this.removed) return this; this.node.parentNode.firstChild != this.node && (this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild), a._toback(this, this.paper)); return this; }, E.insertAfter = function (b) { if (this.removed) return this; b.constructor == a.st.constructor && (b = b[b.length - 1]), b.node.nextSibling ? b.node.parentNode.insertBefore(this.node, b.node.nextSibling) : b.node.parentNode.appendChild(this.node), a._insertafter(this, b, this.paper); return this; }, E.insertBefore = function (b) { if (this.removed) return this; b.constructor == a.st.constructor && (b = b[0]), b.node.parentNode.insertBefore(this.node, b.node), a._insertbefore(this, b, this.paper); return this; }, E.blur = function (b) { const c = this.node.runtimeStyle; let d = c.filter; d = d.replace(r, o), +b !== 0 ? (this.attrs.blur = b, c.filter = `${d + n + m}.Blur(pixelradius=${+b || 1.5})`, c.margin = a.format('-{0}px 0 0 -{0}px', f(+b || 1.5))) : (c.filter = d, c.margin = 0, delete this.attrs.blur); }, a._engine.path = function (a, b) { const c = F('shape'); c.style.cssText = t, c.coordsize = u + n + u, c.coordorigin = b.coordorigin; const d = new D(c, b); const e = { fill: 'none', stroke: '#000' }; a && (e.path = a), d.type = 'path', d.path = [], d.Path = o, B(d, e), b.canvas.appendChild(c); const f = F('skew'); f.on = !0, c.appendChild(f), d.skew = f, d.transform(o); return d; }, a._engine.rect = function (b, c, d, e, f, g) { const h = a._rectPath(c, d, e, f, g); const i = b.path(h); const j = i.attrs; i.X = j.x = c, i.Y = j.y = d, i.W = j.width = e, i.H = j.height = f, j.r = g, j.path = h, i.type = 'rect'; return i; }, a._engine.ellipse = function (a, b, c, d, e) { const f = a.path(); const g = f.attrs; f.X = b - d, f.Y = c - e, f.W = d * 2, f.H = e * 2, f.type = 'ellipse', B(f, { cx: b, cy: c, rx: d, ry: e }); return f; }, a._engine.circle = function (a, b, c, d) { const e = a.path(); const f = e.attrs; e.X = b - d, e.Y = c - d, e.W = e.H = d * 2, e.type = 'circle', B(e, { cx: b, cy: c, r: d }); return e; }, a._engine.image = function (b, c, d, e, f, g) { const h = a._rectPath(d, e, f, g); const i = b.path(h).attr({ stroke: 'none' }); const k = i.attrs; const l = i.node; const m = l.getElementsByTagName(j)[0]; k.src = c, i.X = k.x = d, i.Y = k.y = e, i.W = k.width = f, i.H = k.height = g, k.path = h, i.type = 'image', m.parentNode == l && l.removeChild(m), m.rotate = !0, m.src = c, m.type = 'tile', i._.fillpos = [d, e], i._.fillsize = [f, g], l.appendChild(m), z(i, 1, 1, 0, 0, 0); return i; }, a._engine.text = function (b, d, e, g) { const h = F('shape'); const i = F('path'); const j = F('textpath'); d = d || 0, e = e || 0, g = g || '', i.v = a.format('m{0},{1}l{2},{1}', f(d * u), f(e * u), f(d * u) + 1), i.textpathok = !0, j.string = c(g), j.on = !0, h.style.cssText = t, h.coordsize = u + n + u, h.coordorigin = '0 0'; const k = new D(h, b); const l = { fill: '#000', stroke: 'none', font: a._availableAttrs.font, text: g }; k.shape = h, k.path = i, k.textpath = j, k.type = 'text', k.attrs.text = c(g), k.attrs.x = d, k.attrs.y = e, k.attrs.w = 1, k.attrs.h = 1, B(k, l), h.appendChild(j), h.appendChild(i), b.canvas.appendChild(h); const m = F('skew'); m.on = !0, h.appendChild(m), k.skew = m, k.transform(o); return k; }, a._engine.setSize = function (b, c) { const d = this.canvas.style; this.width = b, this.height = c, b == +b && (b += 'px'), c == +c && (c += 'px'), d.width = b, d.height = c, d.clip = `rect(0 ${b} ${c} 0)`, this._viewBox && a._engine.setViewBox.apply(this, this._viewBox); return this; }, a._engine.setViewBox = function (b, c, d, e, f) { a.eve('raphael.setViewBox', this, this._viewBox, [b, c, d, e, f]); const h = this.width; const i = this.height; const j = 1 / g(d / h, e / i); let k; let l; f && (k = i / e, l = h / d, d * k < h && (b -= (h - d * k) / 2 / k), e * l < i && (c -= (i - e * l) / 2 / l)), this._viewBox = [b, c, d, e, !!f], this._viewBoxShift = { dx: -b, dy: -c, scale: j }, this.forEach((a) => { a.transform('...'); }); return this; }; let F; a._engine.initWin = function (a) { const b = a.document; b.createStyleSheet().addRule('.rvml', 'behavior:url(#default#VML)'); try { !b.namespaces.rvml && b.namespaces.add('rvml', 'urn:schemas-microsoft-com:vml'), F = function (a) { return b.createElement(``); }; } catch (c) { F = function (a) { return b.createElement(`<${a} xmlns="urn:schemas-microsoft.com:vml" class="rvml">`); }; } }, a._engine.initWin(a._g.win), a._engine.create = function () { + const b = a._getContainer.apply(0, arguments); const c = b.container; let d = b.height; let e; let f = b.width; let g = b.x; let h = b.y; if (!c) throw new Error('VML container not found.'); const i = new a._Paper(); const j = i.canvas = a._g.doc.createElement('div'); const + k = j.style; g = g || 0, h = h || 0, f = f || 512, d = d || 342, i.width = f, i.height = d, f == +f && (f += 'px'), d == +d && (d += 'px'), i.coordsize = u * 1e3 + n + u * 1e3, i.coordorigin = '0 0', i.span = a._g.doc.createElement('span'), i.span.style.cssText = 'position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;', j.appendChild(i.span), k.cssText = a.format('top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden', f, d), c == 1 ? (a._g.doc.body.appendChild(j), k.left = `${g}px`, k.top = `${h}px`, k.position = 'absolute') : c.firstChild ? c.insertBefore(j, c.firstChild) : c.appendChild(j), i.renderfix = function () {}; return i; + }, a.prototype.clear = function () { a.eve('raphael.clear', this), this.canvas.innerHTML = o, this.span = a._g.doc.createElement('span'), this.span.style.cssText = 'position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;', this.canvas.appendChild(this.span), this.bottom = this.top = null; }, a.prototype.remove = function () { a.eve('raphael.remove', this), this.canvas.parentNode.removeChild(this.canvas); for (const b in this) this[b] = typeof this[b] === 'function' ? a._removedFactory(b) : null; return !0; }; const G = a.st; for (const H in E)E[b](H) && !G[b](H) && (G[H] = (function (a) { return function () { const b = arguments; return this.forEach((c) => { c[a].apply(c, b); }); }; }(H))); +}(window.Raphael)); diff --git a/report/display.html b/report/display.html new file mode 100644 index 00000000..eb80d923 --- /dev/null +++ b/report/display.html @@ -0,0 +1,101 @@ + + + + + Plato - JavaScript Introspection + + + + + + + + + + + + + + + + + +
    +

    JavaScript Source Analysis

    +
    +
    +
    +
    + Total / Average Lines +

    940 / 940

    +
    +
    +
    +
    +
    +
    +
    + Average Maintainability +

    69.00

    +
    +
    +
    +
    +
    + +
    +
    +
    +

    Worst Maintainability Scores

    +
      + +
    • + 69 score + public/src/client/topic/postTools.js +
    • + +
    +
    +
    +
    +
    +

    Largest Files

    +
      + +
    • + 940 lines + public/src/client/topic/postTools.js +
    • + +
    +
    +
    + +
    +
    +

    Lint Warnings

    +
      + +
    • + 51 lint errors + public/src/client/topic/postTools.js +
    • + +
    +
    +
    + +
    +
    + + + + + + + + diff --git a/report/files/public_src_client_topic_postTools_js/index.html b/report/files/public_src_client_topic_postTools_js/index.html new file mode 100644 index 00000000..27fab58a --- /dev/null +++ b/report/files/public_src_client_topic_postTools_js/index.html @@ -0,0 +1,1057 @@ + + + + + Plato - public/src/client/topic/postTools.js + + + + + + + + + + + + + + + + + + + + +
    +
    +

    public/src/client/topic/postTools.js

    +
    +
    + +
    +
    +
    +

    Maintainability

    +

    69.00

    +
    +
    +

    Lines of code

    +

    940

    +
    +
    +
    +
    +

    +
    +
    +

    +
    +
    +
    +
    +

    Difficulty

    +

    53.88

    +
    +
    +

    Estimated Errors

    +

    7.99

    +
    +
    +
    + +
    +
    +

    Function weight

    +
    +
    +
    +

    By Complexity

    +
    +
    +
    +

    By SLOC

    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +

    .

    +
    +
    + + + + + + + + + + + diff --git a/report/files/public_src_client_topic_postTools_js/report.history.js b/report/files/public_src_client_topic_postTools_js/report.history.js new file mode 100644 index 00000000..42f87d53 --- /dev/null +++ b/report/files/public_src_client_topic_postTools_js/report.history.js @@ -0,0 +1 @@ +__history = [{ date: 'Mon, 23 Oct 2023 06:57:52 GMT', sloc: 940, lloc: 404, functions: 75, deliveredBugs: 7.985, difficulty: 53.877, maintainability: 69.003, lintErrors: 51 }]; diff --git a/report/files/public_src_client_topic_postTools_js/report.history.json b/report/files/public_src_client_topic_postTools_js/report.history.json new file mode 100644 index 00000000..9e7d78d5 --- /dev/null +++ b/report/files/public_src_client_topic_postTools_js/report.history.json @@ -0,0 +1 @@ +[{"date":"Mon, 23 Oct 2023 06:57:52 GMT","sloc":940,"lloc":404,"functions":75,"deliveredBugs":7.985,"difficulty":53.877,"maintainability":69.003,"lintErrors":51}] \ No newline at end of file diff --git a/report/files/public_src_client_topic_postTools_js/report.js b/report/files/public_src_client_topic_postTools_js/report.js new file mode 100644 index 00000000..b58cb70d --- /dev/null +++ b/report/files/public_src_client_topic_postTools_js/report.js @@ -0,0 +1 @@ +__report = { info: { file: 'public/src/client/topic/postTools.js', fileShort: 'public/src/client/topic/postTools.js', fileSafe: 'public_src_client_topic_postTools_js', link: 'files/public_src_client_topic_postTools_js/index.html' }, complexity: { methodAggregate: { cyclomatic: 85, cyclomaticDensity: 21.04, halstead: { bugs: 7.985, difficulty: 53.877, effort: 1290630.984, length: 2731, time: 71701.721, vocabulary: 437, volume: 23954.938, operands: { distinct: 408, total: 1516, identifiers: ['__stripped__'] }, operators: { distinct: 29, total: 1215, identifiers: ['__stripped__'] } }, params: 59, sloc: { logical: 404, physical: 940 } }, settings: { commonjs: true, forin: false, logicalor: true, switchcase: true, trycatch: false, newmi: true }, classes: [], dependencies: [{ line: 76, path: 'clipboard', type: 'cjs' }], errors: [], lineEnd: 940, lineStart: 1, maintainability: 69.003, methods: [{ cyclomatic: 1, cyclomaticDensity: 3.571, halstead: { bugs: 0.188, difficulty: 4.909, effort: 2770.414, length: 99, time: 153.912, vocabulary: 52, volume: 564.344, operands: { distinct: 44, total: 54, identifiers: ['__stripped__'] }, operators: { distinct: 8, total: 45, identifiers: ['__stripped__'] } }, params: 9, sloc: { logical: 28, physical: 923 }, errors: [], lineEnd: 940, lineStart: 18, name: '' }, { cyclomatic: 1, cyclomaticDensity: 16.667, halstead: { bugs: 0.043, difficulty: 1.8, effort: 232.682, length: 31, time: 12.927, vocabulary: 18, volume: 129.268, operands: { distinct: 15, total: 18, identifiers: ['__stripped__'] }, operators: { distinct: 3, total: 13, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 6, physical: 13 }, errors: [], lineEnd: 46, lineStart: 34, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.011, difficulty: 1.5, effort: 47.549, length: 10, time: 2.642, vocabulary: 9, volume: 31.699, operands: { distinct: 6, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 3, total: 4, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 42 }, errors: [], lineEnd: 89, lineStart: 48, name: 'renderMenu' }, { cyclomatic: 2, cyclomaticDensity: 20, halstead: { bugs: 0.107, difficulty: 6.261, effort: 2003.478, length: 64, time: 111.304, vocabulary: 32, volume: 320, operands: { distinct: 23, total: 32, identifiers: ['__stripped__'] }, operators: { distinct: 9, total: 32, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 10, physical: 36 }, errors: [], lineEnd: 87, lineStart: 52, name: '' }, { cyclomatic: 3, cyclomaticDensity: 30, halstead: { bugs: 0.12, difficulty: 8.25, effort: 2965.481, length: 69, time: 164.749, vocabulary: 37, volume: 359.452, operands: { distinct: 26, total: 39, identifiers: ['__stripped__'] }, operators: { distinct: 11, total: 30, identifiers: ['__stripped__'] } }, params: 2, sloc: { logical: 10, physical: 21 }, errors: [], lineEnd: 85, lineStart: 65, name: '' }, { cyclomatic: 4, cyclomaticDensity: 66.667, halstead: { bugs: 0.147, difficulty: 7.95, effort: 3512.639, length: 94, time: 195.147, vocabulary: 26, volume: 441.841, operands: { distinct: 20, total: 53, identifiers: ['__stripped__'] }, operators: { distinct: 6, total: 41, identifiers: ['__stripped__'] } }, params: 2, sloc: { logical: 6, physical: 27 }, errors: [], lineEnd: 117, lineStart: 91, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.009, difficulty: 1.2, effort: 33.688, length: 10, time: 1.872, vocabulary: 7, volume: 28.074, operands: { distinct: 5, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 4, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 121, lineStart: 119, name: '' }, { cyclomatic: 1, cyclomaticDensity: 25, halstead: { bugs: 0.039, difficulty: 2.833, effort: 328.667, length: 29, time: 18.259, vocabulary: 16, volume: 116, operands: { distinct: 12, total: 17, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 12, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 4, physical: 6 }, errors: [], lineEnd: 128, lineStart: 123, name: '' }, { cyclomatic: 3, cyclomaticDensity: 12, halstead: { bugs: 0.363, difficulty: 10.769, effort: 11718.449, length: 197, time: 651.025, vocabulary: 46, volume: 1088.142, operands: { distinct: 39, total: 120, identifiers: ['__stripped__'] }, operators: { distinct: 7, total: 77, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 25, physical: 266 }, errors: [], lineEnd: 395, lineStart: 130, name: 'addPostHandlers' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.005, difficulty: 0.5, effort: 6.966, length: 6, time: 0.387, vocabulary: 5, volume: 13.932, operands: { distinct: 4, total: 4, identifiers: ['__stripped__'] }, operators: { distinct: 1, total: 2, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 137, lineStart: 135, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.012, difficulty: 1, effort: 34.869, length: 11, time: 1.937, vocabulary: 9, volume: 34.869, operands: { distinct: 7, total: 7, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 4, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 2, physical: 4 }, errors: [], lineEnd: 142, lineStart: 139, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.01, difficulty: 1, effort: 30, length: 10, time: 1.667, vocabulary: 8, volume: 30, operands: { distinct: 6, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 4, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 2, physical: 4 }, errors: [], lineEnd: 152, lineStart: 149, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.011, difficulty: 1.167, effort: 38.5, length: 11, time: 2.139, vocabulary: 8, volume: 33, operands: { distinct: 6, total: 7, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 4, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 2, physical: 4 }, errors: [], lineEnd: 157, lineStart: 154, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.04, difficulty: 2.308, effort: 273.546, length: 29, time: 15.197, vocabulary: 17, volume: 118.536, operands: { distinct: 13, total: 15, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 14, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 17 }, errors: [], lineEnd: 178, lineStart: 162, name: '' }, { cyclomatic: 1, cyclomaticDensity: 33.333, halstead: { bugs: 0.02, difficulty: 2.857, effort: 168.03, length: 17, time: 9.335, vocabulary: 11, volume: 58.81, operands: { distinct: 7, total: 10, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 7, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 3, physical: 6 }, errors: [], lineEnd: 176, lineStart: 171, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.011, difficulty: 1.4, effort: 47.164, length: 12, time: 2.62, vocabulary: 7, volume: 33.688, operands: { distinct: 5, total: 7, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 5, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 183, lineStart: 181, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.011, difficulty: 1.5, effort: 47.549, length: 10, time: 2.642, vocabulary: 9, volume: 31.699, operands: { distinct: 6, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 3, total: 4, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 187, lineStart: 185, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.012, difficulty: 2, effort: 73.082, length: 11, time: 4.06, vocabulary: 10, volume: 36.541, operands: { distinct: 6, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 5, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 191, lineStart: 189, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.01, difficulty: 1, effort: 30, length: 10, time: 1.667, vocabulary: 8, volume: 30, operands: { distinct: 6, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 4, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 195, lineStart: 193, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.019, difficulty: 2.5, effort: 138.766, length: 15, time: 7.709, vocabulary: 13, volume: 55.507, operands: { distinct: 8, total: 8, identifiers: ['__stripped__'] }, operators: { distinct: 5, total: 7, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 2, physical: 9 }, errors: [], lineEnd: 205, lineStart: 197, name: '' }, { cyclomatic: 1, cyclomaticDensity: 33.333, halstead: { bugs: 0.013, difficulty: 2.333, effort: 93.014, length: 12, time: 5.167, vocabulary: 10, volume: 39.863, operands: { distinct: 6, total: 7, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 5, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 3, physical: 6 }, errors: [], lineEnd: 204, lineStart: 199, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.019, difficulty: 2.5, effort: 138.766, length: 15, time: 7.709, vocabulary: 13, volume: 55.507, operands: { distinct: 8, total: 8, identifiers: ['__stripped__'] }, operators: { distinct: 5, total: 7, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 2, physical: 9 }, errors: [], lineEnd: 215, lineStart: 207, name: '' }, { cyclomatic: 1, cyclomaticDensity: 33.333, halstead: { bugs: 0.013, difficulty: 2.333, effort: 93.014, length: 12, time: 5.167, vocabulary: 10, volume: 39.863, operands: { distinct: 6, total: 7, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 5, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 3, physical: 6 }, errors: [], lineEnd: 214, lineStart: 209, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.02, difficulty: 3, effort: 182.753, length: 16, time: 10.153, vocabulary: 14, volume: 60.918, operands: { distinct: 8, total: 8, identifiers: ['__stripped__'] }, operators: { distinct: 6, total: 8, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 2, physical: 6 }, errors: [], lineEnd: 225, lineStart: 220, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.005, difficulty: 1.333, effort: 18.575, length: 6, time: 1.032, vocabulary: 5, volume: 13.932, operands: { distinct: 3, total: 4, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 2, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 224, lineStart: 222, name: '' }, { cyclomatic: 2, cyclomaticDensity: 33.333, halstead: { bugs: 0.07, difficulty: 5.056, effort: 1056.477, length: 45, time: 58.693, vocabulary: 25, volume: 208.974, operands: { distinct: 18, total: 26, identifiers: ['__stripped__'] }, operators: { distinct: 7, total: 19, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 6, physical: 21 }, errors: [], lineEnd: 248, lineStart: 228, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.014, difficulty: 2.5, effort: 103.783, length: 12, time: 5.766, vocabulary: 11, volume: 41.513, operands: { distinct: 6, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 5, total: 6, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 2, physical: 6 }, errors: [], lineEnd: 262, lineStart: 257, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.008, difficulty: 1.2, effort: 30.319, length: 9, time: 1.684, vocabulary: 7, volume: 25.266, operands: { distinct: 5, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 3, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 261, lineStart: 259, name: '' }, { cyclomatic: 2, cyclomaticDensity: 40, halstead: { bugs: 0.054, difficulty: 3.929, effort: 634.155, length: 38, time: 35.231, vocabulary: 19, volume: 161.421, operands: { distinct: 14, total: 22, identifiers: ['__stripped__'] }, operators: { distinct: 5, total: 16, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 5, physical: 17 }, errors: [], lineEnd: 282, lineStart: 266, name: '' }, { cyclomatic: 10, cyclomaticDensity: 38.462, halstead: { bugs: 0.35, difficulty: 23.03, effort: 24180.684, length: 187, time: 1343.371, vocabulary: 49, volume: 1049.951, operands: { distinct: 33, total: 95, identifiers: ['__stripped__'] }, operators: { distinct: 16, total: 92, identifiers: ['__stripped__'] } }, params: 3, sloc: { logical: 26, physical: 71 }, errors: [], lineEnd: 354, lineStart: 284, name: 'checkDuration' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.003, difficulty: 0.5, effort: 5, length: 5, time: 0.278, vocabulary: 4, volume: 10, operands: { distinct: 3, total: 3, identifiers: ['__stripped__'] }, operators: { distinct: 1, total: 2, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 358, lineStart: 356, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.003, difficulty: 0.5, effort: 5, length: 5, time: 0.278, vocabulary: 4, volume: 10, operands: { distinct: 3, total: 3, identifiers: ['__stripped__'] }, operators: { distinct: 1, total: 2, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 362, lineStart: 360, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.014, difficulty: 2.5, effort: 103.783, length: 12, time: 5.766, vocabulary: 11, volume: 41.513, operands: { distinct: 6, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 5, total: 6, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 2, physical: 6 }, errors: [], lineEnd: 369, lineStart: 364, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.009, difficulty: 1.2, effort: 33.688, length: 10, time: 1.872, vocabulary: 7, volume: 28.074, operands: { distinct: 5, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 4, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 368, lineStart: 366, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.014, difficulty: 2.5, effort: 103.783, length: 12, time: 5.766, vocabulary: 11, volume: 41.513, operands: { distinct: 6, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 5, total: 6, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 2, physical: 6 }, errors: [], lineEnd: 379, lineStart: 374, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.009, difficulty: 1.2, effort: 33.688, length: 10, time: 1.872, vocabulary: 7, volume: 28.074, operands: { distinct: 5, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 4, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 378, lineStart: 376, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.023, difficulty: 2.778, effort: 190.368, length: 18, time: 10.576, vocabulary: 14, volume: 68.532, operands: { distinct: 9, total: 10, identifiers: ['__stripped__'] }, operators: { distinct: 5, total: 8, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 2, physical: 9 }, errors: [], lineEnd: 390, lineStart: 382, name: '' }, { cyclomatic: 2, cyclomaticDensity: 66.667, halstead: { bugs: 0.015, difficulty: 3.2, effort: 142.013, length: 14, time: 7.89, vocabulary: 9, volume: 44.379, operands: { distinct: 5, total: 8, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 6, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 3, physical: 6 }, errors: [], lineEnd: 389, lineStart: 384, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.003, difficulty: 0.5, effort: 5, length: 5, time: 0.278, vocabulary: 4, volume: 10, operands: { distinct: 3, total: 3, identifiers: ['__stripped__'] }, operators: { distinct: 1, total: 2, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 394, lineStart: 392, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.012, difficulty: 2, effort: 73.082, length: 11, time: 4.06, vocabulary: 10, volume: 36.541, operands: { distinct: 6, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 5, identifiers: ['__stripped__'] } }, params: 2, sloc: { logical: 2, physical: 41 }, errors: [], lineEnd: 437, lineStart: 397, name: 'onReplyClicked' }, { cyclomatic: 11, cyclomaticDensity: 52.381, halstead: { bugs: 0.256, difficulty: 16.544, effort: 12725.988, length: 137, time: 706.999, vocabulary: 49, volume: 769.215, operands: { distinct: 34, total: 75, identifiers: ['__stripped__'] }, operators: { distinct: 15, total: 62, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 21, physical: 37 }, errors: [], lineEnd: 436, lineStart: 400, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.012, difficulty: 2, effort: 73.082, length: 11, time: 4.06, vocabulary: 10, volume: 36.541, operands: { distinct: 6, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 5, identifiers: ['__stripped__'] } }, params: 2, sloc: { logical: 2, physical: 29 }, errors: [], lineEnd: 467, lineStart: 439, name: 'onQuoteClicked' }, { cyclomatic: 4, cyclomaticDensity: 66.667, halstead: { bugs: 0.062, difficulty: 7.071, effort: 1311.51, length: 41, time: 72.862, vocabulary: 23, volume: 185.466, operands: { distinct: 14, total: 22, identifiers: ['__stripped__'] }, operators: { distinct: 9, total: 19, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 6, physical: 25 }, errors: [], lineEnd: 466, lineStart: 442, name: '' }, { cyclomatic: 1, cyclomaticDensity: 16.667, halstead: { bugs: 0.035, difficulty: 2.667, effort: 277.333, length: 26, time: 15.407, vocabulary: 16, volume: 104, operands: { distinct: 12, total: 16, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 10, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 6, physical: 9 }, errors: [], lineEnd: 454, lineStart: 446, name: 'quote' }, { cyclomatic: 2, cyclomaticDensity: 66.667, halstead: { bugs: 0.014, difficulty: 3.2, effort: 131.869, length: 13, time: 7.326, vocabulary: 9, volume: 41.209, operands: { distinct: 5, total: 8, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 5, identifiers: ['__stripped__'] } }, params: 2, sloc: { logical: 3, physical: 7 }, errors: [], lineEnd: 465, lineStart: 459, name: '' }, { cyclomatic: 4, cyclomaticDensity: 44.444, halstead: { bugs: 0.129, difficulty: 8.963, effort: 3480.737, length: 74, time: 193.374, vocabulary: 38, volume: 388.347, operands: { distinct: 27, total: 44, identifiers: ['__stripped__'] }, operators: { distinct: 11, total: 30, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 9, physical: 93 }, errors: [], lineEnd: 607, lineStart: 515, name: 'toggleEndorsement' }, { cyclomatic: 5, cyclomaticDensity: 35.714, halstead: { bugs: 0.139, difficulty: 8.883, effort: 3711.656, length: 77, time: 206.203, vocabulary: 43, volume: 417.822, operands: { distinct: 30, total: 41, identifiers: ['__stripped__'] }, operators: { distinct: 13, total: 36, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 14, physical: 69 }, errors: [], lineEnd: 602, lineStart: 534, name: '' }, { cyclomatic: 3, cyclomaticDensity: 75, halstead: { bugs: 0.058, difficulty: 2.4, effort: 418.149, length: 38, time: 23.23, vocabulary: 24, volume: 174.229, operands: { distinct: 20, total: 24, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 14, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 4, physical: 21 }, errors: [], lineEnd: 573, lineStart: 553, name: '' }, { cyclomatic: 3, cyclomaticDensity: 75, halstead: { bugs: 0.058, difficulty: 2.4, effort: 418.149, length: 38, time: 23.23, vocabulary: 24, volume: 174.229, operands: { distinct: 20, total: 24, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 14, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 4, physical: 19 }, errors: [], lineEnd: 597, lineStart: 579, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.007, difficulty: 1.5, effort: 33.688, length: 8, time: 1.872, vocabulary: 7, volume: 22.459, operands: { distinct: 4, total: 4, identifiers: ['__stripped__'] }, operators: { distinct: 3, total: 4, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 22 }, errors: [], lineEnd: 649, lineStart: 628, name: 'onPageLoad' }, { cyclomatic: 2, cyclomaticDensity: 15.385, halstead: { bugs: 0.129, difficulty: 6.543, effort: 2536.542, length: 79, time: 140.919, vocabulary: 30, volume: 387.644, operands: { distinct: 23, total: 43, identifiers: ['__stripped__'] }, operators: { distinct: 7, total: 36, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 13, physical: 19 }, errors: [], lineEnd: 648, lineStart: 630, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.001, difficulty: 0.5, effort: 1, length: 2, time: 0.056, vocabulary: 2, volume: 2, operands: { distinct: 1, total: 1, identifiers: ['__stripped__'] }, operators: { distinct: 1, total: 1, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 653, lineStart: 651, name: '' }, { cyclomatic: 5, cyclomaticDensity: 20, halstead: { bugs: 0.301, difficulty: 13, effort: 11745.725, length: 157, time: 652.54, vocabulary: 54, volume: 903.517, operands: { distinct: 41, total: 82, identifiers: ['__stripped__'] }, operators: { distinct: 13, total: 75, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 25, physical: 39 }, errors: [], lineEnd: 695, lineStart: 657, name: 'getSelectedNode' }, { cyclomatic: 5, cyclomaticDensity: 250, halstead: { bugs: 0.023, difficulty: 5, effort: 345.943, length: 20, time: 19.219, vocabulary: 11, volume: 69.189, operands: { distinct: 6, total: 12, identifiers: ['__stripped__'] }, operators: { distinct: 5, total: 8, identifiers: ['__stripped__'] } }, params: 2, sloc: { logical: 2, physical: 10 }, errors: [], lineEnd: 675, lineStart: 666, name: '' }, { cyclomatic: 2, cyclomaticDensity: 50, halstead: { bugs: 0.056, difficulty: 5.333, effort: 902.484, length: 36, time: 50.138, vocabulary: 26, volume: 169.216, operands: { distinct: 18, total: 24, identifiers: ['__stripped__'] }, operators: { distinct: 8, total: 12, identifiers: ['__stripped__'] } }, params: 2, sloc: { logical: 4, physical: 18 }, errors: [], lineEnd: 714, lineStart: 697, name: 'bookmarkPost' }, { cyclomatic: 3, cyclomaticDensity: 60, halstead: { bugs: 0.042, difficulty: 6.667, effort: 832.427, length: 28, time: 46.246, vocabulary: 22, volume: 124.864, operands: { distinct: 12, total: 16, identifiers: ['__stripped__'] }, operators: { distinct: 10, total: 12, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 5, physical: 7 }, errors: [], lineEnd: 712, lineStart: 706, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.012, difficulty: 2.1, effort: 75.6, length: 12, time: 4.2, vocabulary: 8, volume: 36, operands: { distinct: 5, total: 7, identifiers: ['__stripped__'] }, operators: { distinct: 3, total: 5, identifiers: ['__stripped__'] } }, params: 2, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 718, lineStart: 716, name: 'getData' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.004, difficulty: 1.5, effort: 17.414, length: 5, time: 0.967, vocabulary: 5, volume: 11.61, operands: { distinct: 2, total: 2, identifiers: ['__stripped__'] }, operators: { distinct: 3, total: 3, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 1, physical: 33 }, errors: [], lineEnd: 752, lineStart: 720, name: 'getUserSlug' }, { cyclomatic: 3, cyclomaticDensity: 33.333, halstead: { bugs: 0.06, difficulty: 7.143, effort: 1277.24, length: 39, time: 70.958, vocabulary: 24, volume: 178.814, operands: { distinct: 14, total: 20, identifiers: ['__stripped__'] }, operators: { distinct: 10, total: 19, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 9, physical: 31 }, errors: [], lineEnd: 751, lineStart: 721, name: '' }, { cyclomatic: 6, cyclomaticDensity: 66.667, halstead: { bugs: 0.069, difficulty: 9.75, effort: 2012.779, length: 47, time: 111.821, vocabulary: 21, volume: 206.439, operands: { distinct: 12, total: 26, identifiers: ['__stripped__'] }, operators: { distinct: 9, total: 21, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 9, physical: 18 }, errors: [], lineEnd: 746, lineStart: 729, name: '' }, { cyclomatic: 2, cyclomaticDensity: 50, halstead: { bugs: 0.05, difficulty: 4, effort: 597.355, length: 34, time: 33.186, vocabulary: 21, volume: 149.339, operands: { distinct: 15, total: 20, identifiers: ['__stripped__'] }, operators: { distinct: 6, total: 14, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 4, physical: 7 }, errors: [], lineEnd: 760, lineStart: 754, name: 'togglePostDelete' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.007, difficulty: 0.6, effort: 12.408, length: 8, time: 0.689, vocabulary: 6, volume: 20.68, operands: { distinct: 5, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 1, total: 2, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 764, lineStart: 762, name: 'purgePost' }, { cyclomatic: 2, cyclomaticDensity: 28.571, halstead: { bugs: 0.045, difficulty: 8.55, effort: 1162.233, length: 32, time: 64.568, vocabulary: 19, volume: 135.934, operands: { distinct: 10, total: 19, identifiers: ['__stripped__'] }, operators: { distinct: 9, total: 13, identifiers: ['__stripped__'] } }, params: 2, sloc: { logical: 7, physical: 22 }, errors: [], lineEnd: 787, lineStart: 766, name: 'postAction' }, { cyclomatic: 4, cyclomaticDensity: 80, halstead: { bugs: 0.056, difficulty: 5.625, effort: 940.381, length: 36, time: 52.243, vocabulary: 25, volume: 167.179, operands: { distinct: 16, total: 20, identifiers: ['__stripped__'] }, operators: { distinct: 9, total: 16, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 5, physical: 9 }, errors: [], lineEnd: 785, lineStart: 777, name: '' }, { cyclomatic: 1, cyclomaticDensity: 25, halstead: { bugs: 0.041, difficulty: 4.375, effort: 538.956, length: 29, time: 29.942, vocabulary: 19, volume: 123.19, operands: { distinct: 12, total: 15, identifiers: ['__stripped__'] }, operators: { distinct: 7, total: 14, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 4, physical: 8 }, errors: [], lineEnd: 796, lineStart: 789, name: 'openChat' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.009, difficulty: 1.2, effort: 33.688, length: 10, time: 1.872, vocabulary: 7, volume: 28.074, operands: { distinct: 5, total: 6, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 4, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 1, physical: 3 }, errors: [], lineEnd: 793, lineStart: 791, name: '' }, { cyclomatic: 3, cyclomaticDensity: 18.75, halstead: { bugs: 0.16, difficulty: 8.667, effort: 4164.766, length: 87, time: 231.376, vocabulary: 46, volume: 480.55, operands: { distinct: 33, total: 44, identifiers: ['__stripped__'] }, operators: { distinct: 13, total: 43, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 16, physical: 48 }, errors: [], lineEnd: 845, lineStart: 798, name: 'showStaleWarning' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.004, difficulty: 1, effort: 11.61, length: 5, time: 0.645, vocabulary: 5, volume: 11.61, operands: { distinct: 3, total: 3, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 2, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 2, physical: 4 }, errors: [], lineEnd: 817, lineStart: 814, name: '' }, { cyclomatic: 1, cyclomaticDensity: 100, halstead: { bugs: 0.04, difficulty: 2.308, effort: 273.546, length: 29, time: 15.197, vocabulary: 17, volume: 118.536, operands: { distinct: 13, total: 15, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 14, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 1, physical: 18 }, errors: [], lineEnd: 839, lineStart: 822, name: '' }, { cyclomatic: 1, cyclomaticDensity: 25, halstead: { bugs: 0.025, difficulty: 2.667, effort: 197.357, length: 20, time: 10.964, vocabulary: 13, volume: 74.009, operands: { distinct: 9, total: 12, identifiers: ['__stripped__'] }, operators: { distinct: 4, total: 8, identifiers: ['__stripped__'] } }, params: 1, sloc: { logical: 4, physical: 7 }, errors: [], lineEnd: 837, lineStart: 831, name: '' }, { cyclomatic: 2, cyclomaticDensity: 50, halstead: { bugs: 0.041, difficulty: 2.857, effort: 351.971, length: 29, time: 19.554, vocabulary: 19, volume: 123.19, operands: { distinct: 14, total: 16, identifiers: ['__stripped__'] }, operators: { distinct: 5, total: 13, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 4, physical: 11 }, errors: [], lineEnd: 859, lineStart: 849, name: 'handleSelectionTooltip' }, { cyclomatic: 2, cyclomaticDensity: 40, halstead: { bugs: 0.033, difficulty: 3.85, effort: 377.682, length: 24, time: 20.982, vocabulary: 17, volume: 98.099, operands: { distinct: 10, total: 11, identifiers: ['__stripped__'] }, operators: { distinct: 7, total: 13, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 5, physical: 8 }, errors: [], lineEnd: 868, lineStart: 861, name: 'selectionChange' }, { cyclomatic: 12, cyclomaticDensity: 41.379, halstead: { bugs: 0.522, difficulty: 20.474, effort: 32076.763, length: 250, time: 1782.042, vocabulary: 77, volume: 1566.697, operands: { distinct: 58, total: 125, identifiers: ['__stripped__'] }, operators: { distinct: 19, total: 125, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 29, physical: 68 }, errors: [], lineEnd: 937, lineStart: 870, name: 'delayedTooltip' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.02, difficulty: 1, effort: 60.944, length: 17, time: 3.386, vocabulary: 12, volume: 60.944, operands: { distinct: 10, total: 10, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 7, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 2, physical: 7 }, errors: [], lineEnd: 921, lineStart: 915, name: '' }, { cyclomatic: 1, cyclomaticDensity: 50, halstead: { bugs: 0.022, difficulty: 1, effort: 66.608, length: 18, time: 3.7, vocabulary: 13, volume: 66.608, operands: { distinct: 11, total: 11, identifiers: ['__stripped__'] }, operators: { distinct: 2, total: 7, identifiers: ['__stripped__'] } }, params: 0, sloc: { logical: 2, physical: 4 }, errors: [], lineEnd: 927, lineStart: 924, name: '' }], methodAverage: { cyclomatic: 2.12, cyclomaticDensity: 62.52, halstead: { bugs: 0.059, difficulty: 4.108, effort: 1798.987, length: 36.2, time: 99.944, vocabulary: 18.053, volume: 175.982, operands: { distinct: 12.693, total: 20.04 }, operators: { distinct: 5.36, total: 16.16 } }, params: 0.787, sloc: { logical: 5.36, physical: 31.547 } }, module: 'public/src/client/topic/postTools.js' }, jshint: { messages: [{ severity: 'error', line: 6, column: 1, message: 'Use the function form of "use strict".', source: 'Use the function form of "use strict".' }, { severity: 'error', line: 29, column: 5, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 31, column: 5, message: "'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 32, column: 5, message: "'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 53, column: 17, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 54, column: 17, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 58, column: 17, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 59, column: 17, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 60, column: 17, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 65, column: 42, message: "Expected '(' and instead saw '{'.", source: "Expected '{a}' and instead saw '{b}'." }, { severity: 'error', line: 66, column: 25, message: "Expected an identifier and instead saw 'if' (a reserved word).", source: "Expected an identifier and instead saw '{a}' (a reserved word)." }, { severity: 'error', line: 66, column: 28, message: "Expected ')' to match '{' from line 65 and instead saw '('.", source: "Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'." }, { severity: 'error', line: 66, column: 28, message: "'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').", source: "'{a}' is only available in ES{b} (use 'esversion: {b}')." }, { severity: 'error', line: 66, column: 33, message: 'Missing semicolon.', source: 'Missing semicolon.' }, { severity: 'error', line: 72, column: 25, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 72, column: 43, message: 'Missing semicolon.', source: 'Missing semicolon.' }, { severity: 'error', line: 76, column: 25, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 88, column: 9, message: "Expected an identifier and instead saw ')'.", source: "Expected an identifier and instead saw '{a}'." }, { severity: 'error', line: 88, column: 9, message: 'Expected an assignment or function call and instead saw an expression.', source: 'Expected an assignment or function call and instead saw an expression.' }, { severity: 'error', line: 91, column: 5, message: "Expected ')' and instead saw 'PostTools'.", source: "Expected '{a}' and instead saw '{b}'." }, { severity: 'error', line: 92, column: 9, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 124, column: 9, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 131, column: 9, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 198, column: 13, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 208, column: 13, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 221, column: 17, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 229, column: 13, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 231, column: 13, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 232, column: 13, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 258, column: 21, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 267, column: 13, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 268, column: 13, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 269, column: 13, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 290, column: 17, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 291, column: 17, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 292, column: 17, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 293, column: 17, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 294, column: 17, message: "'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 365, column: 13, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 375, column: 17, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 383, column: 13, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 397, column: 5, message: 'Expected an assignment or function call and instead saw an expression.', source: 'Expected an assignment or function call and instead saw an expression.' }, { severity: 'error', line: 397, column: 10, message: 'Missing semicolon.', source: 'Missing semicolon.' }, { severity: 'error', line: 398, column: 9, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 398, column: 35, message: 'Missing semicolon.', source: 'Missing semicolon.' }, { severity: 'error', line: 400, column: 32, message: "Expected ')' and instead saw 'function'.", source: "Expected '{a}' and instead saw '{b}'." }, { severity: 'error', line: 400, column: 43, message: 'Missing semicolon.', source: 'Missing semicolon.' }, { severity: 'error', line: 402, column: 13, message: "'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 402, column: 33, message: 'Missing semicolon.', source: 'Missing semicolon.' }, { severity: 'error', line: 410, column: 13, message: "'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).", source: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)." }, { severity: 'error', line: 410, column: 13, message: 'Too many errors. (43% scanned).', source: 'Too many errors.' }] } }; diff --git a/report/files/public_src_client_topic_postTools_js/report.json b/report/files/public_src_client_topic_postTools_js/report.json new file mode 100644 index 00000000..0e0213eb --- /dev/null +++ b/report/files/public_src_client_topic_postTools_js/report.json @@ -0,0 +1 @@ +{"info":{"file":"public/src/client/topic/postTools.js","fileShort":"public/src/client/topic/postTools.js","fileSafe":"public_src_client_topic_postTools_js","link":"files/public_src_client_topic_postTools_js/index.html"},"complexity":{"methodAggregate":{"cyclomatic":85,"cyclomaticDensity":21.04,"halstead":{"bugs":7.985,"difficulty":53.877,"effort":1290630.984,"length":2731,"time":71701.721,"vocabulary":437,"volume":23954.938,"operands":{"distinct":408,"total":1516,"identifiers":["__stripped__"]},"operators":{"distinct":29,"total":1215,"identifiers":["__stripped__"]}},"params":59,"sloc":{"logical":404,"physical":940}},"settings":{"commonjs":true,"forin":false,"logicalor":true,"switchcase":true,"trycatch":false,"newmi":true},"classes":[],"dependencies":[{"line":76,"path":"clipboard","type":"cjs"}],"errors":[],"lineEnd":940,"lineStart":1,"maintainability":69.003,"methods":[{"cyclomatic":1,"cyclomaticDensity":3.571,"halstead":{"bugs":0.188,"difficulty":4.909,"effort":2770.414,"length":99,"time":153.912,"vocabulary":52,"volume":564.344,"operands":{"distinct":44,"total":54,"identifiers":["__stripped__"]},"operators":{"distinct":8,"total":45,"identifiers":["__stripped__"]}},"params":9,"sloc":{"logical":28,"physical":923},"errors":[],"lineEnd":940,"lineStart":18,"name":""},{"cyclomatic":1,"cyclomaticDensity":16.667,"halstead":{"bugs":0.043,"difficulty":1.8,"effort":232.682,"length":31,"time":12.927,"vocabulary":18,"volume":129.268,"operands":{"distinct":15,"total":18,"identifiers":["__stripped__"]},"operators":{"distinct":3,"total":13,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":6,"physical":13},"errors":[],"lineEnd":46,"lineStart":34,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.011,"difficulty":1.5,"effort":47.549,"length":10,"time":2.642,"vocabulary":9,"volume":31.699,"operands":{"distinct":6,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":3,"total":4,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":42},"errors":[],"lineEnd":89,"lineStart":48,"name":"renderMenu"},{"cyclomatic":2,"cyclomaticDensity":20,"halstead":{"bugs":0.107,"difficulty":6.261,"effort":2003.478,"length":64,"time":111.304,"vocabulary":32,"volume":320,"operands":{"distinct":23,"total":32,"identifiers":["__stripped__"]},"operators":{"distinct":9,"total":32,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":10,"physical":36},"errors":[],"lineEnd":87,"lineStart":52,"name":""},{"cyclomatic":3,"cyclomaticDensity":30,"halstead":{"bugs":0.12,"difficulty":8.25,"effort":2965.481,"length":69,"time":164.749,"vocabulary":37,"volume":359.452,"operands":{"distinct":26,"total":39,"identifiers":["__stripped__"]},"operators":{"distinct":11,"total":30,"identifiers":["__stripped__"]}},"params":2,"sloc":{"logical":10,"physical":21},"errors":[],"lineEnd":85,"lineStart":65,"name":""},{"cyclomatic":4,"cyclomaticDensity":66.667,"halstead":{"bugs":0.147,"difficulty":7.95,"effort":3512.639,"length":94,"time":195.147,"vocabulary":26,"volume":441.841,"operands":{"distinct":20,"total":53,"identifiers":["__stripped__"]},"operators":{"distinct":6,"total":41,"identifiers":["__stripped__"]}},"params":2,"sloc":{"logical":6,"physical":27},"errors":[],"lineEnd":117,"lineStart":91,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.009,"difficulty":1.2,"effort":33.688,"length":10,"time":1.872,"vocabulary":7,"volume":28.074,"operands":{"distinct":5,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":4,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":121,"lineStart":119,"name":""},{"cyclomatic":1,"cyclomaticDensity":25,"halstead":{"bugs":0.039,"difficulty":2.833,"effort":328.667,"length":29,"time":18.259,"vocabulary":16,"volume":116,"operands":{"distinct":12,"total":17,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":12,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":4,"physical":6},"errors":[],"lineEnd":128,"lineStart":123,"name":""},{"cyclomatic":3,"cyclomaticDensity":12,"halstead":{"bugs":0.363,"difficulty":10.769,"effort":11718.449,"length":197,"time":651.025,"vocabulary":46,"volume":1088.142,"operands":{"distinct":39,"total":120,"identifiers":["__stripped__"]},"operators":{"distinct":7,"total":77,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":25,"physical":266},"errors":[],"lineEnd":395,"lineStart":130,"name":"addPostHandlers"},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.005,"difficulty":0.5,"effort":6.966,"length":6,"time":0.387,"vocabulary":5,"volume":13.932,"operands":{"distinct":4,"total":4,"identifiers":["__stripped__"]},"operators":{"distinct":1,"total":2,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":137,"lineStart":135,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.012,"difficulty":1,"effort":34.869,"length":11,"time":1.937,"vocabulary":9,"volume":34.869,"operands":{"distinct":7,"total":7,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":4,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":2,"physical":4},"errors":[],"lineEnd":142,"lineStart":139,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.01,"difficulty":1,"effort":30,"length":10,"time":1.667,"vocabulary":8,"volume":30,"operands":{"distinct":6,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":4,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":2,"physical":4},"errors":[],"lineEnd":152,"lineStart":149,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.011,"difficulty":1.167,"effort":38.5,"length":11,"time":2.139,"vocabulary":8,"volume":33,"operands":{"distinct":6,"total":7,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":4,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":2,"physical":4},"errors":[],"lineEnd":157,"lineStart":154,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.04,"difficulty":2.308,"effort":273.546,"length":29,"time":15.197,"vocabulary":17,"volume":118.536,"operands":{"distinct":13,"total":15,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":14,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":17},"errors":[],"lineEnd":178,"lineStart":162,"name":""},{"cyclomatic":1,"cyclomaticDensity":33.333,"halstead":{"bugs":0.02,"difficulty":2.857,"effort":168.03,"length":17,"time":9.335,"vocabulary":11,"volume":58.81,"operands":{"distinct":7,"total":10,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":7,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":3,"physical":6},"errors":[],"lineEnd":176,"lineStart":171,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.011,"difficulty":1.4,"effort":47.164,"length":12,"time":2.62,"vocabulary":7,"volume":33.688,"operands":{"distinct":5,"total":7,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":5,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":183,"lineStart":181,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.011,"difficulty":1.5,"effort":47.549,"length":10,"time":2.642,"vocabulary":9,"volume":31.699,"operands":{"distinct":6,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":3,"total":4,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":187,"lineStart":185,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.012,"difficulty":2,"effort":73.082,"length":11,"time":4.06,"vocabulary":10,"volume":36.541,"operands":{"distinct":6,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":5,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":191,"lineStart":189,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.01,"difficulty":1,"effort":30,"length":10,"time":1.667,"vocabulary":8,"volume":30,"operands":{"distinct":6,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":4,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":195,"lineStart":193,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.019,"difficulty":2.5,"effort":138.766,"length":15,"time":7.709,"vocabulary":13,"volume":55.507,"operands":{"distinct":8,"total":8,"identifiers":["__stripped__"]},"operators":{"distinct":5,"total":7,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":2,"physical":9},"errors":[],"lineEnd":205,"lineStart":197,"name":""},{"cyclomatic":1,"cyclomaticDensity":33.333,"halstead":{"bugs":0.013,"difficulty":2.333,"effort":93.014,"length":12,"time":5.167,"vocabulary":10,"volume":39.863,"operands":{"distinct":6,"total":7,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":5,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":3,"physical":6},"errors":[],"lineEnd":204,"lineStart":199,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.019,"difficulty":2.5,"effort":138.766,"length":15,"time":7.709,"vocabulary":13,"volume":55.507,"operands":{"distinct":8,"total":8,"identifiers":["__stripped__"]},"operators":{"distinct":5,"total":7,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":2,"physical":9},"errors":[],"lineEnd":215,"lineStart":207,"name":""},{"cyclomatic":1,"cyclomaticDensity":33.333,"halstead":{"bugs":0.013,"difficulty":2.333,"effort":93.014,"length":12,"time":5.167,"vocabulary":10,"volume":39.863,"operands":{"distinct":6,"total":7,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":5,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":3,"physical":6},"errors":[],"lineEnd":214,"lineStart":209,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.02,"difficulty":3,"effort":182.753,"length":16,"time":10.153,"vocabulary":14,"volume":60.918,"operands":{"distinct":8,"total":8,"identifiers":["__stripped__"]},"operators":{"distinct":6,"total":8,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":2,"physical":6},"errors":[],"lineEnd":225,"lineStart":220,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.005,"difficulty":1.333,"effort":18.575,"length":6,"time":1.032,"vocabulary":5,"volume":13.932,"operands":{"distinct":3,"total":4,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":2,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":224,"lineStart":222,"name":""},{"cyclomatic":2,"cyclomaticDensity":33.333,"halstead":{"bugs":0.07,"difficulty":5.056,"effort":1056.477,"length":45,"time":58.693,"vocabulary":25,"volume":208.974,"operands":{"distinct":18,"total":26,"identifiers":["__stripped__"]},"operators":{"distinct":7,"total":19,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":6,"physical":21},"errors":[],"lineEnd":248,"lineStart":228,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.014,"difficulty":2.5,"effort":103.783,"length":12,"time":5.766,"vocabulary":11,"volume":41.513,"operands":{"distinct":6,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":5,"total":6,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":2,"physical":6},"errors":[],"lineEnd":262,"lineStart":257,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.008,"difficulty":1.2,"effort":30.319,"length":9,"time":1.684,"vocabulary":7,"volume":25.266,"operands":{"distinct":5,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":3,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":261,"lineStart":259,"name":""},{"cyclomatic":2,"cyclomaticDensity":40,"halstead":{"bugs":0.054,"difficulty":3.929,"effort":634.155,"length":38,"time":35.231,"vocabulary":19,"volume":161.421,"operands":{"distinct":14,"total":22,"identifiers":["__stripped__"]},"operators":{"distinct":5,"total":16,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":5,"physical":17},"errors":[],"lineEnd":282,"lineStart":266,"name":""},{"cyclomatic":10,"cyclomaticDensity":38.462,"halstead":{"bugs":0.35,"difficulty":23.03,"effort":24180.684,"length":187,"time":1343.371,"vocabulary":49,"volume":1049.951,"operands":{"distinct":33,"total":95,"identifiers":["__stripped__"]},"operators":{"distinct":16,"total":92,"identifiers":["__stripped__"]}},"params":3,"sloc":{"logical":26,"physical":71},"errors":[],"lineEnd":354,"lineStart":284,"name":"checkDuration"},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.003,"difficulty":0.5,"effort":5,"length":5,"time":0.278,"vocabulary":4,"volume":10,"operands":{"distinct":3,"total":3,"identifiers":["__stripped__"]},"operators":{"distinct":1,"total":2,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":358,"lineStart":356,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.003,"difficulty":0.5,"effort":5,"length":5,"time":0.278,"vocabulary":4,"volume":10,"operands":{"distinct":3,"total":3,"identifiers":["__stripped__"]},"operators":{"distinct":1,"total":2,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":362,"lineStart":360,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.014,"difficulty":2.5,"effort":103.783,"length":12,"time":5.766,"vocabulary":11,"volume":41.513,"operands":{"distinct":6,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":5,"total":6,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":2,"physical":6},"errors":[],"lineEnd":369,"lineStart":364,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.009,"difficulty":1.2,"effort":33.688,"length":10,"time":1.872,"vocabulary":7,"volume":28.074,"operands":{"distinct":5,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":4,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":368,"lineStart":366,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.014,"difficulty":2.5,"effort":103.783,"length":12,"time":5.766,"vocabulary":11,"volume":41.513,"operands":{"distinct":6,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":5,"total":6,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":2,"physical":6},"errors":[],"lineEnd":379,"lineStart":374,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.009,"difficulty":1.2,"effort":33.688,"length":10,"time":1.872,"vocabulary":7,"volume":28.074,"operands":{"distinct":5,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":4,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":378,"lineStart":376,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.023,"difficulty":2.778,"effort":190.368,"length":18,"time":10.576,"vocabulary":14,"volume":68.532,"operands":{"distinct":9,"total":10,"identifiers":["__stripped__"]},"operators":{"distinct":5,"total":8,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":2,"physical":9},"errors":[],"lineEnd":390,"lineStart":382,"name":""},{"cyclomatic":2,"cyclomaticDensity":66.667,"halstead":{"bugs":0.015,"difficulty":3.2,"effort":142.013,"length":14,"time":7.89,"vocabulary":9,"volume":44.379,"operands":{"distinct":5,"total":8,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":6,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":3,"physical":6},"errors":[],"lineEnd":389,"lineStart":384,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.003,"difficulty":0.5,"effort":5,"length":5,"time":0.278,"vocabulary":4,"volume":10,"operands":{"distinct":3,"total":3,"identifiers":["__stripped__"]},"operators":{"distinct":1,"total":2,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":394,"lineStart":392,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.012,"difficulty":2,"effort":73.082,"length":11,"time":4.06,"vocabulary":10,"volume":36.541,"operands":{"distinct":6,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":5,"identifiers":["__stripped__"]}},"params":2,"sloc":{"logical":2,"physical":41},"errors":[],"lineEnd":437,"lineStart":397,"name":"onReplyClicked"},{"cyclomatic":11,"cyclomaticDensity":52.381,"halstead":{"bugs":0.256,"difficulty":16.544,"effort":12725.988,"length":137,"time":706.999,"vocabulary":49,"volume":769.215,"operands":{"distinct":34,"total":75,"identifiers":["__stripped__"]},"operators":{"distinct":15,"total":62,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":21,"physical":37},"errors":[],"lineEnd":436,"lineStart":400,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.012,"difficulty":2,"effort":73.082,"length":11,"time":4.06,"vocabulary":10,"volume":36.541,"operands":{"distinct":6,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":5,"identifiers":["__stripped__"]}},"params":2,"sloc":{"logical":2,"physical":29},"errors":[],"lineEnd":467,"lineStart":439,"name":"onQuoteClicked"},{"cyclomatic":4,"cyclomaticDensity":66.667,"halstead":{"bugs":0.062,"difficulty":7.071,"effort":1311.51,"length":41,"time":72.862,"vocabulary":23,"volume":185.466,"operands":{"distinct":14,"total":22,"identifiers":["__stripped__"]},"operators":{"distinct":9,"total":19,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":6,"physical":25},"errors":[],"lineEnd":466,"lineStart":442,"name":""},{"cyclomatic":1,"cyclomaticDensity":16.667,"halstead":{"bugs":0.035,"difficulty":2.667,"effort":277.333,"length":26,"time":15.407,"vocabulary":16,"volume":104,"operands":{"distinct":12,"total":16,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":10,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":6,"physical":9},"errors":[],"lineEnd":454,"lineStart":446,"name":"quote"},{"cyclomatic":2,"cyclomaticDensity":66.667,"halstead":{"bugs":0.014,"difficulty":3.2,"effort":131.869,"length":13,"time":7.326,"vocabulary":9,"volume":41.209,"operands":{"distinct":5,"total":8,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":5,"identifiers":["__stripped__"]}},"params":2,"sloc":{"logical":3,"physical":7},"errors":[],"lineEnd":465,"lineStart":459,"name":""},{"cyclomatic":4,"cyclomaticDensity":44.444,"halstead":{"bugs":0.129,"difficulty":8.963,"effort":3480.737,"length":74,"time":193.374,"vocabulary":38,"volume":388.347,"operands":{"distinct":27,"total":44,"identifiers":["__stripped__"]},"operators":{"distinct":11,"total":30,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":9,"physical":93},"errors":[],"lineEnd":607,"lineStart":515,"name":"toggleEndorsement"},{"cyclomatic":5,"cyclomaticDensity":35.714,"halstead":{"bugs":0.139,"difficulty":8.883,"effort":3711.656,"length":77,"time":206.203,"vocabulary":43,"volume":417.822,"operands":{"distinct":30,"total":41,"identifiers":["__stripped__"]},"operators":{"distinct":13,"total":36,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":14,"physical":69},"errors":[],"lineEnd":602,"lineStart":534,"name":""},{"cyclomatic":3,"cyclomaticDensity":75,"halstead":{"bugs":0.058,"difficulty":2.4,"effort":418.149,"length":38,"time":23.23,"vocabulary":24,"volume":174.229,"operands":{"distinct":20,"total":24,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":14,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":4,"physical":21},"errors":[],"lineEnd":573,"lineStart":553,"name":""},{"cyclomatic":3,"cyclomaticDensity":75,"halstead":{"bugs":0.058,"difficulty":2.4,"effort":418.149,"length":38,"time":23.23,"vocabulary":24,"volume":174.229,"operands":{"distinct":20,"total":24,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":14,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":4,"physical":19},"errors":[],"lineEnd":597,"lineStart":579,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.007,"difficulty":1.5,"effort":33.688,"length":8,"time":1.872,"vocabulary":7,"volume":22.459,"operands":{"distinct":4,"total":4,"identifiers":["__stripped__"]},"operators":{"distinct":3,"total":4,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":22},"errors":[],"lineEnd":649,"lineStart":628,"name":"onPageLoad"},{"cyclomatic":2,"cyclomaticDensity":15.385,"halstead":{"bugs":0.129,"difficulty":6.543,"effort":2536.542,"length":79,"time":140.919,"vocabulary":30,"volume":387.644,"operands":{"distinct":23,"total":43,"identifiers":["__stripped__"]},"operators":{"distinct":7,"total":36,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":13,"physical":19},"errors":[],"lineEnd":648,"lineStart":630,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.001,"difficulty":0.5,"effort":1,"length":2,"time":0.056,"vocabulary":2,"volume":2,"operands":{"distinct":1,"total":1,"identifiers":["__stripped__"]},"operators":{"distinct":1,"total":1,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":653,"lineStart":651,"name":""},{"cyclomatic":5,"cyclomaticDensity":20,"halstead":{"bugs":0.301,"difficulty":13,"effort":11745.725,"length":157,"time":652.54,"vocabulary":54,"volume":903.517,"operands":{"distinct":41,"total":82,"identifiers":["__stripped__"]},"operators":{"distinct":13,"total":75,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":25,"physical":39},"errors":[],"lineEnd":695,"lineStart":657,"name":"getSelectedNode"},{"cyclomatic":5,"cyclomaticDensity":250,"halstead":{"bugs":0.023,"difficulty":5,"effort":345.943,"length":20,"time":19.219,"vocabulary":11,"volume":69.189,"operands":{"distinct":6,"total":12,"identifiers":["__stripped__"]},"operators":{"distinct":5,"total":8,"identifiers":["__stripped__"]}},"params":2,"sloc":{"logical":2,"physical":10},"errors":[],"lineEnd":675,"lineStart":666,"name":""},{"cyclomatic":2,"cyclomaticDensity":50,"halstead":{"bugs":0.056,"difficulty":5.333,"effort":902.484,"length":36,"time":50.138,"vocabulary":26,"volume":169.216,"operands":{"distinct":18,"total":24,"identifiers":["__stripped__"]},"operators":{"distinct":8,"total":12,"identifiers":["__stripped__"]}},"params":2,"sloc":{"logical":4,"physical":18},"errors":[],"lineEnd":714,"lineStart":697,"name":"bookmarkPost"},{"cyclomatic":3,"cyclomaticDensity":60,"halstead":{"bugs":0.042,"difficulty":6.667,"effort":832.427,"length":28,"time":46.246,"vocabulary":22,"volume":124.864,"operands":{"distinct":12,"total":16,"identifiers":["__stripped__"]},"operators":{"distinct":10,"total":12,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":5,"physical":7},"errors":[],"lineEnd":712,"lineStart":706,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.012,"difficulty":2.1,"effort":75.6,"length":12,"time":4.2,"vocabulary":8,"volume":36,"operands":{"distinct":5,"total":7,"identifiers":["__stripped__"]},"operators":{"distinct":3,"total":5,"identifiers":["__stripped__"]}},"params":2,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":718,"lineStart":716,"name":"getData"},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.004,"difficulty":1.5,"effort":17.414,"length":5,"time":0.967,"vocabulary":5,"volume":11.61,"operands":{"distinct":2,"total":2,"identifiers":["__stripped__"]},"operators":{"distinct":3,"total":3,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":1,"physical":33},"errors":[],"lineEnd":752,"lineStart":720,"name":"getUserSlug"},{"cyclomatic":3,"cyclomaticDensity":33.333,"halstead":{"bugs":0.06,"difficulty":7.143,"effort":1277.24,"length":39,"time":70.958,"vocabulary":24,"volume":178.814,"operands":{"distinct":14,"total":20,"identifiers":["__stripped__"]},"operators":{"distinct":10,"total":19,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":9,"physical":31},"errors":[],"lineEnd":751,"lineStart":721,"name":""},{"cyclomatic":6,"cyclomaticDensity":66.667,"halstead":{"bugs":0.069,"difficulty":9.75,"effort":2012.779,"length":47,"time":111.821,"vocabulary":21,"volume":206.439,"operands":{"distinct":12,"total":26,"identifiers":["__stripped__"]},"operators":{"distinct":9,"total":21,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":9,"physical":18},"errors":[],"lineEnd":746,"lineStart":729,"name":""},{"cyclomatic":2,"cyclomaticDensity":50,"halstead":{"bugs":0.05,"difficulty":4,"effort":597.355,"length":34,"time":33.186,"vocabulary":21,"volume":149.339,"operands":{"distinct":15,"total":20,"identifiers":["__stripped__"]},"operators":{"distinct":6,"total":14,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":4,"physical":7},"errors":[],"lineEnd":760,"lineStart":754,"name":"togglePostDelete"},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.007,"difficulty":0.6,"effort":12.408,"length":8,"time":0.689,"vocabulary":6,"volume":20.68,"operands":{"distinct":5,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":1,"total":2,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":764,"lineStart":762,"name":"purgePost"},{"cyclomatic":2,"cyclomaticDensity":28.571,"halstead":{"bugs":0.045,"difficulty":8.55,"effort":1162.233,"length":32,"time":64.568,"vocabulary":19,"volume":135.934,"operands":{"distinct":10,"total":19,"identifiers":["__stripped__"]},"operators":{"distinct":9,"total":13,"identifiers":["__stripped__"]}},"params":2,"sloc":{"logical":7,"physical":22},"errors":[],"lineEnd":787,"lineStart":766,"name":"postAction"},{"cyclomatic":4,"cyclomaticDensity":80,"halstead":{"bugs":0.056,"difficulty":5.625,"effort":940.381,"length":36,"time":52.243,"vocabulary":25,"volume":167.179,"operands":{"distinct":16,"total":20,"identifiers":["__stripped__"]},"operators":{"distinct":9,"total":16,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":5,"physical":9},"errors":[],"lineEnd":785,"lineStart":777,"name":""},{"cyclomatic":1,"cyclomaticDensity":25,"halstead":{"bugs":0.041,"difficulty":4.375,"effort":538.956,"length":29,"time":29.942,"vocabulary":19,"volume":123.19,"operands":{"distinct":12,"total":15,"identifiers":["__stripped__"]},"operators":{"distinct":7,"total":14,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":4,"physical":8},"errors":[],"lineEnd":796,"lineStart":789,"name":"openChat"},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.009,"difficulty":1.2,"effort":33.688,"length":10,"time":1.872,"vocabulary":7,"volume":28.074,"operands":{"distinct":5,"total":6,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":4,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":1,"physical":3},"errors":[],"lineEnd":793,"lineStart":791,"name":""},{"cyclomatic":3,"cyclomaticDensity":18.75,"halstead":{"bugs":0.16,"difficulty":8.667,"effort":4164.766,"length":87,"time":231.376,"vocabulary":46,"volume":480.55,"operands":{"distinct":33,"total":44,"identifiers":["__stripped__"]},"operators":{"distinct":13,"total":43,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":16,"physical":48},"errors":[],"lineEnd":845,"lineStart":798,"name":"showStaleWarning"},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.004,"difficulty":1,"effort":11.61,"length":5,"time":0.645,"vocabulary":5,"volume":11.61,"operands":{"distinct":3,"total":3,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":2,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":2,"physical":4},"errors":[],"lineEnd":817,"lineStart":814,"name":""},{"cyclomatic":1,"cyclomaticDensity":100,"halstead":{"bugs":0.04,"difficulty":2.308,"effort":273.546,"length":29,"time":15.197,"vocabulary":17,"volume":118.536,"operands":{"distinct":13,"total":15,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":14,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":1,"physical":18},"errors":[],"lineEnd":839,"lineStart":822,"name":""},{"cyclomatic":1,"cyclomaticDensity":25,"halstead":{"bugs":0.025,"difficulty":2.667,"effort":197.357,"length":20,"time":10.964,"vocabulary":13,"volume":74.009,"operands":{"distinct":9,"total":12,"identifiers":["__stripped__"]},"operators":{"distinct":4,"total":8,"identifiers":["__stripped__"]}},"params":1,"sloc":{"logical":4,"physical":7},"errors":[],"lineEnd":837,"lineStart":831,"name":""},{"cyclomatic":2,"cyclomaticDensity":50,"halstead":{"bugs":0.041,"difficulty":2.857,"effort":351.971,"length":29,"time":19.554,"vocabulary":19,"volume":123.19,"operands":{"distinct":14,"total":16,"identifiers":["__stripped__"]},"operators":{"distinct":5,"total":13,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":4,"physical":11},"errors":[],"lineEnd":859,"lineStart":849,"name":"handleSelectionTooltip"},{"cyclomatic":2,"cyclomaticDensity":40,"halstead":{"bugs":0.033,"difficulty":3.85,"effort":377.682,"length":24,"time":20.982,"vocabulary":17,"volume":98.099,"operands":{"distinct":10,"total":11,"identifiers":["__stripped__"]},"operators":{"distinct":7,"total":13,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":5,"physical":8},"errors":[],"lineEnd":868,"lineStart":861,"name":"selectionChange"},{"cyclomatic":12,"cyclomaticDensity":41.379,"halstead":{"bugs":0.522,"difficulty":20.474,"effort":32076.763,"length":250,"time":1782.042,"vocabulary":77,"volume":1566.697,"operands":{"distinct":58,"total":125,"identifiers":["__stripped__"]},"operators":{"distinct":19,"total":125,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":29,"physical":68},"errors":[],"lineEnd":937,"lineStart":870,"name":"delayedTooltip"},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.02,"difficulty":1,"effort":60.944,"length":17,"time":3.386,"vocabulary":12,"volume":60.944,"operands":{"distinct":10,"total":10,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":7,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":2,"physical":7},"errors":[],"lineEnd":921,"lineStart":915,"name":""},{"cyclomatic":1,"cyclomaticDensity":50,"halstead":{"bugs":0.022,"difficulty":1,"effort":66.608,"length":18,"time":3.7,"vocabulary":13,"volume":66.608,"operands":{"distinct":11,"total":11,"identifiers":["__stripped__"]},"operators":{"distinct":2,"total":7,"identifiers":["__stripped__"]}},"params":0,"sloc":{"logical":2,"physical":4},"errors":[],"lineEnd":927,"lineStart":924,"name":""}],"methodAverage":{"cyclomatic":2.12,"cyclomaticDensity":62.52,"halstead":{"bugs":0.059,"difficulty":4.108,"effort":1798.987,"length":36.2,"time":99.944,"vocabulary":18.053,"volume":175.982,"operands":{"distinct":12.693,"total":20.04},"operators":{"distinct":5.36,"total":16.16}},"params":0.787,"sloc":{"logical":5.36,"physical":31.547}},"module":"public/src/client/topic/postTools.js"},"jshint":{"messages":[{"severity":"error","line":6,"column":1,"message":"Use the function form of \"use strict\".","source":"Use the function form of \"use strict\"."},{"severity":"error","line":29,"column":5,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":31,"column":5,"message":"'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":32,"column":5,"message":"'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":53,"column":17,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":54,"column":17,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":58,"column":17,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":59,"column":17,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":60,"column":17,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":65,"column":42,"message":"Expected '(' and instead saw '{'.","source":"Expected '{a}' and instead saw '{b}'."},{"severity":"error","line":66,"column":25,"message":"Expected an identifier and instead saw 'if' (a reserved word).","source":"Expected an identifier and instead saw '{a}' (a reserved word)."},{"severity":"error","line":66,"column":28,"message":"Expected ')' to match '{' from line 65 and instead saw '('.","source":"Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'."},{"severity":"error","line":66,"column":28,"message":"'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').","source":"'{a}' is only available in ES{b} (use 'esversion: {b}')."},{"severity":"error","line":66,"column":33,"message":"Missing semicolon.","source":"Missing semicolon."},{"severity":"error","line":72,"column":25,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":72,"column":43,"message":"Missing semicolon.","source":"Missing semicolon."},{"severity":"error","line":76,"column":25,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":88,"column":9,"message":"Expected an identifier and instead saw ')'.","source":"Expected an identifier and instead saw '{a}'."},{"severity":"error","line":88,"column":9,"message":"Expected an assignment or function call and instead saw an expression.","source":"Expected an assignment or function call and instead saw an expression."},{"severity":"error","line":91,"column":5,"message":"Expected ')' and instead saw 'PostTools'.","source":"Expected '{a}' and instead saw '{b}'."},{"severity":"error","line":92,"column":9,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":124,"column":9,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":131,"column":9,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":198,"column":13,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":208,"column":13,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":221,"column":17,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":229,"column":13,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":231,"column":13,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":232,"column":13,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":258,"column":21,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":267,"column":13,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":268,"column":13,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":269,"column":13,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":290,"column":17,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":291,"column":17,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":292,"column":17,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":293,"column":17,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":294,"column":17,"message":"'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":365,"column":13,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":375,"column":17,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":383,"column":13,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":397,"column":5,"message":"Expected an assignment or function call and instead saw an expression.","source":"Expected an assignment or function call and instead saw an expression."},{"severity":"error","line":397,"column":10,"message":"Missing semicolon.","source":"Missing semicolon."},{"severity":"error","line":398,"column":9,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":398,"column":35,"message":"Missing semicolon.","source":"Missing semicolon."},{"severity":"error","line":400,"column":32,"message":"Expected ')' and instead saw 'function'.","source":"Expected '{a}' and instead saw '{b}'."},{"severity":"error","line":400,"column":43,"message":"Missing semicolon.","source":"Missing semicolon."},{"severity":"error","line":402,"column":13,"message":"'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":402,"column":33,"message":"Missing semicolon.","source":"Missing semicolon."},{"severity":"error","line":410,"column":13,"message":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","source":"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz)."},{"severity":"error","line":410,"column":13,"message":"Too many errors. (43% scanned).","source":"Too many errors."}]}} \ No newline at end of file diff --git a/report/index.html b/report/index.html new file mode 100644 index 00000000..a80d3cde --- /dev/null +++ b/report/index.html @@ -0,0 +1,148 @@ + + + + + Plato - JavaScript Introspection + + + + + + + + + + + + + + + + + + + + +
    +
    +

    JavaScript Source Analysis

    +
    +
    + +
    +
    +

    Summary

    +
    +
    +
    +

    Total/Average Lines

    +

    940 / 940

    +
    +
    +

    Average Maintainability

    +

    69.00

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +

    Maintainability

    +
    +
    +
    +

    Lines of code

    +
    +
    +
    +

    Estimated errors in implementation

    +
    +
    + +
    +

    Lint errors

    +
    +
    + +
    + +
    +
    +

    Files

    +
    + +
    +
    +
    + + + + + + +
    +
    +
    + +
    +   +
    + +
    + +
    +
    + + +
    +
    +

    .

    +
    +
    + + + + + + + + diff --git a/report/report.history.js b/report/report.history.js new file mode 100644 index 00000000..f11ca295 --- /dev/null +++ b/report/report.history.js @@ -0,0 +1 @@ +__history = [{ date: 'Mon, 23 Oct 2023 06:57:52 GMT', total: { sloc: 940, maintainability: 69.003 }, average: { sloc: 940, maintainability: '69.00' } }]; diff --git a/report/report.history.json b/report/report.history.json new file mode 100644 index 00000000..aee28d5a --- /dev/null +++ b/report/report.history.json @@ -0,0 +1 @@ +[{"date":"Mon, 23 Oct 2023 06:57:52 GMT","total":{"sloc":940,"maintainability":69.003},"average":{"sloc":940,"maintainability":"69.00"}}] \ No newline at end of file diff --git a/report/report.js b/report/report.js new file mode 100644 index 00000000..2ee3cd79 --- /dev/null +++ b/report/report.js @@ -0,0 +1 @@ +__report = { summary: { total: { jshint: 51, sloc: 940, maintainability: 69.003 }, average: { sloc: 940, maintainability: '69.00', jshint: '51.00' } }, reports: [{ info: { file: 'public/src/client/topic/postTools.js', fileShort: 'public/src/client/topic/postTools.js', fileSafe: 'public_src_client_topic_postTools_js', link: 'files/public_src_client_topic_postTools_js/index.html' }, jshint: { messages: 51 }, complexity: { methodAggregate: { cyclomatic: 85, cyclomaticDensity: 21.04, halstead: { bugs: 7.985, difficulty: 53.877, effort: 1290630.984, length: 2731, time: 71701.721, vocabulary: 437, volume: 23954.938, operands: { distinct: 408, total: 1516, identifiers: ['__stripped__'] }, operators: { distinct: 29, total: 1215, identifiers: ['__stripped__'] } }, params: 59, sloc: { logical: 404, physical: 940 } }, module: 'public/src/client/topic/postTools.js', maintainability: 69.003 } }] }; diff --git a/report/report.json b/report/report.json new file mode 100644 index 00000000..91b80f72 --- /dev/null +++ b/report/report.json @@ -0,0 +1 @@ +{"summary":{"total":{"jshint":51,"sloc":940,"maintainability":69.003},"average":{"sloc":940,"maintainability":"69.00","jshint":"51.00"}},"reports":[{"info":{"file":"public/src/client/topic/postTools.js","fileShort":"public/src/client/topic/postTools.js","fileSafe":"public_src_client_topic_postTools_js","link":"files/public_src_client_topic_postTools_js/index.html"},"jshint":{"messages":51},"complexity":{"methodAggregate":{"cyclomatic":85,"cyclomaticDensity":21.04,"halstead":{"bugs":7.985,"difficulty":53.877,"effort":1290630.984,"length":2731,"time":71701.721,"vocabulary":437,"volume":23954.938,"operands":{"distinct":408,"total":1516,"identifiers":["__stripped__"]},"operators":{"distinct":29,"total":1215,"identifiers":["__stripped__"]}},"params":59,"sloc":{"logical":404,"physical":940}},"module":"public/src/client/topic/postTools.js","maintainability":69.003}}]} \ No newline at end of file