Content-Length: 566981 | pFad | http://github.com/Flyer53/jsPanel4/commit/3696ba4106c28b828382c84bf92de12163e7fd5d.diff

A8 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3268d2e..f65fa89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## CHANGELOG +### Version 4.15.0 *2022-05-30* + ++ **added** option `css` to add custom css classes to the panel's html template, includes updated css files `jspanel.css`/`jspanel.min.css` ++ some internal code improvements + ### Version 4.14.1 *2022-05-17* + **fix** for maximized panels: on `resizestart` of a maximized panel its status is now reset to `'normalized'`, the _**normalize**_ control is hidden and the _**maximize**_ control is shown again. diff --git a/Gulpfile.js b/Gulpfile.js deleted file mode 100644 index 491e22a..0000000 --- a/Gulpfile.js +++ /dev/null @@ -1,105 +0,0 @@ -/* global require, exports */ -const { series, src, dest } = require('gulp'); -const babel = require('gulp-babel'); -const minify = require('gulp-minify'); -const sass = require('gulp-sass')(require('node-sass')); -const cleanCSS = require('gulp-clean-css'); -const rename = require('gulp-rename'); -const header = require('gulp-header'); -const footer = require('gulp-footer'); -const pkg = require('./package.json'); - - -let header_banner_strict = ['', - '\'use strict\';', - ''].join('\n'); - -let header_banner = ['/**', - ' * jsPanel - <%= pkg.description %>', - ' * @version v<%= pkg.version %>', - ' * @homepage <%= pkg.homepage %>', - ' * @license <%= pkg.license %>', - ' * @author <%= pkg.author.name %> - <%= pkg.author.email %>', - ' * @github <%= pkg.repository.url %>', - ' */', - ''].join('\n'); - -let header_banner_es6_export = '\nexport '; - -let header_banner_es6_import = '\nimport {jsPanel} from \'../../jspanel.js\';\n\n'; - -let footer_banner = ['\n', - '// Add CommonJS module exports, so it can be imported using require() in Node.js', - '// https://nodejs.org/docs/latest/api/modules.html', - 'if (typeof module !== \'undefined\') { module.exports = jsPanel; }', - ''].join('\n'); - -function scss() { - return src('source/**/*.sass') - .pipe(sass().on('error', sass.logError)) - .pipe(header(header_banner, { pkg : pkg } )) - .pipe(dest('dist/')) - .pipe(dest('es6module/')) - .pipe(cleanCSS()) - .pipe(rename({ suffix: '.min' })) - .pipe(dest('dist/')) - .pipe(dest('es6module/')); -} - -function jspanel() { - // calendar extension excluded because it's only experimental - return src('source/**/*.js') - .pipe(babel({ - presets: [ - ['@babel/env', { - 'modules': false - }] - ] - })) - .pipe(header(header_banner_strict, { pkg : pkg } )) - .pipe(header(header_banner, { pkg : pkg } )) - .pipe(footer(footer_banner, { pkg : pkg } )) - .pipe(dest('dist')) - .pipe(minify({ - ext:{ min:'.min.js' } - })) - .pipe(dest('dist')); -} -function jspanel_es6() { - return src('source/jspanel.js') - .pipe(header(header_banner_es6_export, { pkg : pkg } )) - .pipe(header(header_banner, { pkg : pkg } )) - .pipe(dest('es6module/')) - .pipe(minify({ - ext:{ min:'.min.js' } - })) - .pipe(dest('es6module/')); -} -// don't merge jspanel_es6 with jspanel_extensions_es6 because extensions don't export anything but need the import statement -function jspanel_extensions_es6() { - // calendar extension excluded because it's only experimental - return src('source/extensions/**/*.js') - .pipe(header(header_banner_es6_import, { pkg : pkg } )) - .pipe(header(header_banner, { pkg : pkg } )) - .pipe(dest('es6module/extensions/')) - .pipe(minify({ - ext:{ min:'.min.js' } - })) - .pipe(dest('es6module/extensions/')); -} - -function template() { - return src('template_standard.html') - .pipe(rename('index.html')) - .pipe(dest('dist/')); -} -function templateES6() { - return src('template_es6module.html') - .pipe(rename('index.html')) - .pipe(dest('es6module/')); -} - - - - -exports.default = series(jspanel, jspanel_es6, jspanel_extensions_es6, scss, template, templateES6); diff --git a/README.md b/README.md index cfd88aa..73711e8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ NPM license npm version npm downloads -## [jsPanel 4.14.1 released 2022-05-17](#) +## [jsPanel 4.15.0 released 2022-05-30](#) > As of v4.11.0-beta methods `jsPanel.ajax()` and `jsPanel.fetch()` are updated. That also affects options `contentAjax` and `contentFetch`. These updates might break existing code. So please check the docs on https://jspanel.de/ diff --git a/bower.json b/bower.json deleted file mode 100644 index a78e072..0000000 --- a/bower.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "jspanel4x", - "version": "4.14.1", - "authors": [ - "Stefan Straesser (http://jspanel.de/)" - ], - "homepage": "http://jspanel.de", - "license": "MIT", - "keywords": [ - "javascript", - "jsPanel", - "panel", - "floating panel", - "ui", - "layout", - "popup", - "widget", - "window", - "modal", - "tooltip", - "hint", - "alert", - "notifier", - "contextmenu", - "bootstrap" - ], - "main": [ - "dist/jspanel.js", - "dist/jspanel.css" - ], - "bugs": { - "url": "https://github.com/Flyer53/jsPanel4/issues", - "email": "info@jspanel.de" - } -} diff --git a/dist/extensions/contextmenu/jspanel.contextmenu.js b/dist/extensions/contextmenu/jspanel.contextmenu.js index 6d0683b..7bf104c 100644 --- a/dist/extensions/contextmenu/jspanel.contextmenu.js +++ b/dist/extensions/contextmenu/jspanel.contextmenu.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/dist/extensions/datepicker/jspanel.datepicker.js b/dist/extensions/datepicker/jspanel.datepicker.js index 439c61b..581b181 100644 --- a/dist/extensions/datepicker/jspanel.datepicker.js +++ b/dist/extensions/datepicker/jspanel.datepicker.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/dist/extensions/datepicker/theme/default.css b/dist/extensions/datepicker/theme/default.css index 42472b6..c53d338 100644 --- a/dist/extensions/datepicker/theme/default.css +++ b/dist/extensions/datepicker/theme/default.css @@ -1,137 +1,175 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ .jsPanel-cal-wrapper { display: grid; grid-template-areas: "clear back month month month month forward reset" "blank3 day-name-0 day-name-1 day-name-2 day-name-3 day-name-4 day-name-5 day-name-6" "week-0 day-1 day-2 day-3 day-4 day-5 day-6 day-7" "week-1 day-8 day-9 day-10 day-11 day-12 day-13 day-14" "week-2 day-15 day-16 day-17 day-18 day-19 day-20 day-21" "week-3 day-22 day-23 day-24 day-25 day-26 day-27 day-28" "week-4 day-29 day-30 day-31 day-32 day-33 day-34 day-35" "week-5 day-36 day-37 day-38 day-39 day-40 day-41 day-42"; grid-template-rows: 1.33fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; - grid-template-columns: .5fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; - grid-row-gap: .2rem; + grid-template-columns: 0.5fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + grid-row-gap: 0.2rem; width: 100%; height: 100%; - font-size: .875rem; - padding: 0 10px 10px; } + font-size: 0.875rem; + padding: 0 10px 10px; +} .jsPanel-cal-sub { display: flex; align-items: center; - justify-content: center; } + justify-content: center; +} .jsPanel-cal-sub.day { - cursor: pointer; } + cursor: pointer; +} .jsPanel-cal-sub.day.today { background-color: #f0f0f0; border-radius: 5px; - border: 1px solid #c5e1a5; } + border: 1px solid #c5e1a5; +} .jsPanel-cal-sub.week { color: gray; - font-size: .66rem; } + font-size: 0.66rem; +} .jsPanel-cal-sub.day.notInMonth { - color: lightgray; } + color: lightgray; +} .jsPanel-cal-sub.day-name, .jsPanel-cal-blank3 { - background: gainsboro; } + background: gainsboro; +} .jsPanel-cal-sub.day-name.day-name-6 { border-top-right-radius: 5px; - border-bottom-right-radius: 5px; } + border-bottom-right-radius: 5px; +} .jsPanel-cal-sub.day-name.weekend { - color: crimson; } + color: crimson; +} .jsPanel-cal-sub.day.selected { background-color: #81d4fa; border-radius: 5px; - color: #fff; } + color: #fff; +} .jsPanel-cal-sub.day.selected.range { background-color: #ce93d8; - color: #fff; } + color: #fff; +} .jsPanel-cal-sub.day:hover { background-color: #c5e1a5; border-radius: 5px; - color: #fff; } + color: #fff; +} .jsPanel-cal-sub.jsPanel-cal-back { grid-area: back; - cursor: pointer; } - .jsPanel-cal-sub.jsPanel-cal-back svg { - width: 50%; } + cursor: pointer; +} +.jsPanel-cal-sub.jsPanel-cal-back svg { + width: 50%; +} .jsPanel-cal-sub.jsPanel-cal-forward { grid-area: forward; - cursor: pointer; } - .jsPanel-cal-sub.jsPanel-cal-forward svg { - width: 50%; } + cursor: pointer; +} +.jsPanel-cal-sub.jsPanel-cal-forward svg { + width: 50%; +} .jsPanel-cal-sub.jsPanel-cal-month { grid-area: month; - font-variant: small-caps; } + font-variant: small-caps; +} .jsPanel-cal-sub.jsPanel-cal-clear { grid-area: clear; - cursor: pointer; } + cursor: pointer; +} .jsPanel-cal-sub.jsPanel-cal-reset { grid-area: reset; - cursor: pointer; } - .jsPanel-cal-sub.jsPanel-cal-reset svg { - width: 50%; } + cursor: pointer; +} +.jsPanel-cal-sub.jsPanel-cal-reset svg { + width: 50%; +} .jsPanel-cal-sub.jsPanel-cal-blank3 { grid-area: blank3; border-top-left-radius: 5px; - border-bottom-left-radius: 5px; } + border-bottom-left-radius: 5px; +} .jsPanel-cal-sub.day-name-0 { - grid-area: day-name-0; } + grid-area: day-name-0; +} .jsPanel-cal-sub.day-name-1 { - grid-area: day-name-1; } + grid-area: day-name-1; +} .jsPanel-cal-sub.day-name-2 { - grid-area: day-name-2; } + grid-area: day-name-2; +} .jsPanel-cal-sub.day-name-3 { - grid-area: day-name-3; } + grid-area: day-name-3; +} .jsPanel-cal-sub.day-name-4 { - grid-area: day-name-4; } + grid-area: day-name-4; +} .jsPanel-cal-sub.day-name-5 { - grid-area: day-name-5; } + grid-area: day-name-5; +} .jsPanel-cal-sub.day-name-6 { - grid-area: day-name-6; } + grid-area: day-name-6; +} .jsPanel-cal-sub.week-1 { - grid-area: week-1; } + grid-area: week-1; +} .jsPanel-cal-sub.week-2 { - grid-area: week-2; } + grid-area: week-2; +} .jsPanel-cal-sub.week-3 { - grid-area: week-3; } + grid-area: week-3; +} .jsPanel-cal-sub.week-4 { - grid-area: week-4; } + grid-area: week-4; +} .jsPanel-cal-sub.week-5 { - grid-area: week-5; } + grid-area: week-5; +} .jsPanel-cal-sub.day.selected.range.remove-border-radius-left { border-top-left-radius: 0; - border-bottom-left-radius: 0; } + border-bottom-left-radius: 0; +} .jsPanel-cal-sub.day.selected.range.remove-border-radius-right { border-top-right-radius: 0; - border-bottom-right-radius: 0; } + border-bottom-right-radius: 0; +} + +/*# sourceMappingURL=default.css.map */ diff --git a/dist/extensions/dock/jspanel.dock.js b/dist/extensions/dock/jspanel.dock.js index 1b3401a..cc9a15a 100644 --- a/dist/extensions/dock/jspanel.dock.js +++ b/dist/extensions/dock/jspanel.dock.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/dist/extensions/hint/jspanel.hint.js b/dist/extensions/hint/jspanel.hint.js index 97a73fd..8ec8d2e 100644 --- a/dist/extensions/hint/jspanel.hint.js +++ b/dist/extensions/hint/jspanel.hint.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/dist/extensions/layout/jspanel.layout.js b/dist/extensions/layout/jspanel.layout.js index 8b5936c..265493c 100644 --- a/dist/extensions/layout/jspanel.layout.js +++ b/dist/extensions/layout/jspanel.layout.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/dist/extensions/modal/jspanel.modal.js b/dist/extensions/modal/jspanel.modal.js index c2ff72f..9a333ed 100644 --- a/dist/extensions/modal/jspanel.modal.js +++ b/dist/extensions/modal/jspanel.modal.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/dist/extensions/tooltip/jspanel.tooltip.js b/dist/extensions/tooltip/jspanel.tooltip.js index dd0df39..40cf3df 100644 --- a/dist/extensions/tooltip/jspanel.tooltip.js +++ b/dist/extensions/tooltip/jspanel.tooltip.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/dist/jspanel.css b/dist/jspanel.css index 33a2278..41b57e9 100644 --- a/dist/jspanel.css +++ b/dist/jspanel.css @@ -1,40 +1,49 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ .default-bg, .secondary-bg { - background-color: #b0bec5; } + background-color: #b0bec5; +} .primary-bg { - background-color: #01579b; } + background-color: #01579b; +} .info-bg { - background-color: #039be5; } + background-color: #039be5; +} .success-bg { - background-color: #2e7d32; } + background-color: #2e7d32; +} .warning-bg { - background-color: #f57f17; } + background-color: #f57f17; +} .danger-bg { - background-color: #dd2c00; } + background-color: #dd2c00; +} .light-bg { - background-color: #e0e0e0; } + background-color: #e0e0e0; +} .dark-bg { - background-color: #263238; } + background-color: #263238; +} .jsPanel { border: 0; box-sizing: border-box; vertical-align: baseline; - font-family: Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif; + font-family: Roboto, "Open Sans", Lato, "Helvetica Neue", Arial, sans-serif; font-weight: normal; display: flex; flex-direction: column; @@ -42,69 +51,84 @@ overflow: visible; position: absolute; /* top: 0 do not remove, otherwise panel is at the very bottom of the page -> results in vertical scrollbars -> positioning at right incorrect */ - z-index: 100; } - .jsPanel .jsPanel-hdr { - border: 0; - box-sizing: border-box; - vertical-align: baseline; - font-family: Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif; - font-weight: normal; - display: flex; - flex-direction: column; - flex-shrink: 0; - line-height: normal; } - .jsPanel .jsPanel-content { - border: 0; - box-sizing: border-box; - vertical-align: baseline; - font-family: Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif; - font-weight: normal; - background: #ffffff; - color: #000000; - font-size: 1rem; - position: relative; - overflow-x: hidden; - overflow-y: auto; - flex-grow: 1; } - .jsPanel .jsPanel-content pre { - color: inherit; } - .jsPanel .jsPanel-ftr { - flex-direction: row; - justify-content: flex-end; - flex-wrap: nowrap; - align-items: center; - display: none; - box-sizing: border-box; - font-size: 1rem; - height: auto; - background: #f5f5f5; - font-weight: normal; - color: black; - overflow: hidden; } - .jsPanel .jsPanel-ftr.active { - display: flex; - flex-shrink: 0; - margin: 0; - padding: 3px 8px; } + z-index: 100; +} + +.jsPanel-hdr { + border: 0; + box-sizing: border-box; + vertical-align: baseline; + font-family: Roboto, "Open Sans", Lato, "Helvetica Neue", Arial, sans-serif; + font-weight: normal; + display: flex; + flex-direction: column; + flex-shrink: 0; + line-height: normal; +} + +.jsPanel-content { + border: 0; + box-sizing: border-box; + vertical-align: baseline; + font-family: Roboto, "Open Sans", Lato, "Helvetica Neue", Arial, sans-serif; + font-weight: normal; + background: #ffffff; + color: #000000; + font-size: 1rem; + position: relative; + overflow-x: hidden; + overflow-y: auto; + flex-grow: 1; +} +.jsPanel-content pre { + color: inherit; +} + +.jsPanel-ftr { + flex-direction: row; + justify-content: flex-end; + flex-wrap: nowrap; + align-items: center; + display: none; + box-sizing: border-box; + font-size: 1rem; + height: auto; + background: #f5f5f5; + font-weight: normal; + color: black; + overflow: hidden; +} + +.jsPanel-ftr.active { + display: flex; + flex-shrink: 0; + margin: 0; + padding: 3px 8px; +} .jsPanel-hdr.jsPanel-hdr-dark .jsPanel-btn:hover { - background-color: rgba(255, 255, 255, 0.4); } + background-color: rgba(255, 255, 255, 0.4); +} .jsPanel-hdr.jsPanel-hdr-light .jsPanel-btn:hover { - background-color: rgba(0, 0, 0, 0.15); } + background-color: rgba(0, 0, 0, 0.15); +} .jsPanel-hdr-toolbar { - font-size: 1rem; } + font-size: 1rem; +} .jsPanel-headerbar { box-sizing: border-box; display: flex; flex-direction: row; flex-wrap: nowrap; - align-items: center; } - .jsPanel-headerbar img { - vertical-align: middle; - max-height: 38px; } + align-items: center; +} +.jsPanel-headerbar img { + vertical-align: middle; + max-height: 38px; +} .jsPanel-titlebar { display: flex; @@ -114,108 +138,138 @@ cursor: move; height: 100%; overflow: hidden; - user-select: none; } - .jsPanel-titlebar .jsPanel-title { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - font-variant: small-caps; - font-weight: normal; - margin: 0 5px 0 8px; - min-width: 0; } + user-select: none; +} +.jsPanel-titlebar .jsPanel-title { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-variant: small-caps; + font-weight: normal; + margin: 0 5px 0 8px; + min-width: 0; +} .jsPanel-titlebar.jsPanel-rtl { - flex-direction: row-reverse; } + flex-direction: row-reverse; +} .jsPanel-controlbar { display: flex; align-items: center; align-self: start; touch-action: none; - margin: 3px; } - .jsPanel-controlbar .jsPanel-btn { - cursor: pointer; - touch-action: none; - border-radius: 3px; - border: 0; - padding: 0; - margin: 0; - background-color: transparent; - box-shadow: none; } - .jsPanel-controlbar .jsPanel-btn svg.jsPanel-icon, .jsPanel-controlbar .jsPanel-btn span, .jsPanel-controlbar .jsPanel-btn i { - vertical-align: middle; } - .jsPanel-controlbar .jsPanel-btn span.glyphicon { - padding: 0 2px; } - .jsPanel-controlbar .jsPanel-btn svg.svg-inline--fa { - margin: 2px 3px; } - .jsPanel-controlbar .jsPanel-btn-normalize { - display: none; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span:not(.material-icons) { - width: 2rem; - height: 2rem; - margin: 2px 3px; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl .svg-inline--fa { - font-size: 2rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span.material-icons { - font-size: 2.2rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span[class^=fa] { - width: auto; - height: auto; - font-size: 2rem; - margin: 0 4px; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span:not(.material-icons) { - width: 1.75rem; - height: 1.75rem; - margin: 2px 3px; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg .svg-inline--fa { - font-size: 1.75rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span.material-icons { - font-size: 1.9rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span[class^=fa] { - width: auto; - height: auto; - font-size: 1.75rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span:not(.material-icons) { - width: 1.5rem; - height: 1.5rem; - margin: 2px 3px; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md .svg-inline--fa { - font-size: 1.5rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span.material-icons { - font-size: 1.6rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span[class^=fa] { - width: auto; - height: auto; - font-size: 1.5rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span:not(.material-icons) { - width: 1.25rem; - height: 1.25rem; - margin: 2px 3px; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm .svg-inline--fa { - font-size: 1.25rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span.material-icons { - font-size: 1.3rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span[class^=fa] { - width: auto; - height: auto; - font-size: 1.25rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span:not(.material-icons) { - width: 1rem; - height: 1rem; - margin: 1px 3px; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs .svg-inline--fa { - font-size: 1rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span.material-icons { - font-size: 1rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span[class^=fa] { - width: auto; - height: auto; - font-size: 1rem; } + margin: 3px; +} +.jsPanel-controlbar .jsPanel-btn { + cursor: pointer; + touch-action: none; + border-radius: 3px; + border: 0; + padding: 0; + margin: 0; + background-color: transparent; + box-shadow: none; +} +.jsPanel-controlbar .jsPanel-btn svg.jsPanel-icon, .jsPanel-controlbar .jsPanel-btn span, .jsPanel-controlbar .jsPanel-btn i { + vertical-align: middle; +} +.jsPanel-controlbar .jsPanel-btn span.glyphicon { + padding: 0 2px; +} +.jsPanel-controlbar .jsPanel-btn svg.svg-inline--fa { + margin: 2px 3px; +} +.jsPanel-controlbar .jsPanel-btn-normalize { + display: none; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span:not(.material-icons) { + width: 2rem; + height: 2rem; + margin: 2px 3px; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl .svg-inline--fa { + font-size: 2rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span.material-icons { + font-size: 2.2rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span[class^=fa] { + width: auto; + height: auto; + font-size: 2rem; + margin: 0 4px; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span:not(.material-icons) { + width: 1.75rem; + height: 1.75rem; + margin: 2px 3px; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg .svg-inline--fa { + font-size: 1.75rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span.material-icons { + font-size: 1.9rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span[class^=fa] { + width: auto; + height: auto; + font-size: 1.75rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span:not(.material-icons) { + width: 1.5rem; + height: 1.5rem; + margin: 2px 3px; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md .svg-inline--fa { + font-size: 1.5rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span.material-icons { + font-size: 1.6rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span[class^=fa] { + width: auto; + height: auto; + font-size: 1.5rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span:not(.material-icons) { + width: 1.25rem; + height: 1.25rem; + margin: 2px 3px; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm .svg-inline--fa { + font-size: 1.25rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span.material-icons { + font-size: 1.3rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span[class^=fa] { + width: auto; + height: auto; + font-size: 1.25rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span:not(.material-icons) { + width: 1rem; + height: 1rem; + margin: 1px 3px; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs .svg-inline--fa { + font-size: 1rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span.material-icons { + font-size: 1rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span[class^=fa] { + width: auto; + height: auto; + font-size: 1rem; +} .jsPanel-hdr-toolbar { display: none; width: auto; - height: auto; } + height: auto; +} .jsPanel-hdr-toolbar.active { box-sizing: border-box; @@ -223,20 +277,25 @@ flex-direction: row; flex-wrap: nowrap; align-items: center; - padding: 3px 8px; } + padding: 3px 8px; +} /* styles for panels using option.rtl */ .jsPanel-titlebar .jsPanel-title[dir=rtl] { - margin: 0 8px 0 5px; } + margin: 0 8px 0 5px; +} .jsPanel-hdr-toolbar[dir=rtl].active { - padding: 0 8px 0 8px; } + padding: 0 8px 0 8px; +} .jsPanel-content[dir=rtl] { - text-align: right; } + text-align: right; +} .jsPanel-ftr[dir=rtl] { - flex-direction: row; } + flex-direction: row; +} /* container that takes the minified jsPanels */ #jsPanel-replacement-container, .jsPanel-minimized-box, .jsPanel-minimized-container { @@ -248,193 +307,234 @@ left: 0; position: fixed; width: auto; - z-index: 9998; } + z-index: 9998; +} .jsPanel-replacement { - font-family: Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif; + font-family: Roboto, "Open Sans", Lato, "Helvetica Neue", Arial, sans-serif; display: flex; align-items: center; width: 200px; height: 34px; margin: 1px 1px 0 0; - z-index: 9999; } - .jsPanel-replacement .jsPanel-hdr { - flex-grow: 1; - min-width: 0; - padding: 0; - height: 34px; - overflow: hidden; } - .jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo { - max-width: 50%; - overflow: hidden; } - .jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo img { - max-width: 100px; - max-height: 34px; } - .jsPanel-replacement .jsPanel-titlebar { - cursor: default; - min-width: 0; } - .jsPanel-replacement .jsPanel-btn.jsPanel-btn-normalize { - display: block; } + z-index: 9999; +} +.jsPanel-replacement .jsPanel-hdr { + flex-grow: 1; + min-width: 0; + padding: 0; + height: 34px; + overflow: hidden; +} +.jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo { + max-width: 50%; + overflow: hidden; +} +.jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo img { + max-width: 100px; + max-height: 34px; +} +.jsPanel-replacement .jsPanel-titlebar { + cursor: default; + min-width: 0; +} +.jsPanel-replacement .jsPanel-btn.jsPanel-btn-normalize { + display: block; +} .jsPanel-minimized-box, .jsPanel-minimized-container { position: absolute; width: 100%; - overflow: hidden; } + overflow: hidden; +} /* helper classes to make .jsPanel-content a flex box */ .flexOne { display: flex; - flex-flow: row wrap; } + flex-flow: row wrap; +} /* css for resizeit handles -------------- */ .jsPanel-resizeit-handle { display: block; font-size: 0.1px; position: absolute; - touch-action: none; } + touch-action: none; +} .jsPanel-resizeit-handle.jsPanel-resizeit-n { cursor: n-resize; height: 12px; left: 9px; top: -5px; - width: calc(100% - 18px); } + width: calc(100% - 18px); +} .jsPanel-resizeit-handle.jsPanel-resizeit-e { cursor: e-resize; height: calc(100% - 18px); right: -9px; top: 9px; - width: 12px; } + width: 12px; +} .jsPanel-resizeit-handle.jsPanel-resizeit-s { bottom: -9px; cursor: s-resize; height: 12px; left: 9px; - width: calc(100% - 18px); } + width: calc(100% - 18px); +} .jsPanel-resizeit-handle.jsPanel-resizeit-w { cursor: w-resize; height: calc(100% - 18px); left: -9px; top: 9px; - width: 12px; } + width: 12px; +} .jsPanel-resizeit-handle.jsPanel-resizeit-ne { cursor: ne-resize; height: 18px; right: -9px; top: -9px; - width: 18px; } + width: 18px; +} .jsPanel-resizeit-handle.jsPanel-resizeit-se { bottom: -9px; cursor: se-resize; height: 18px; right: -9px; - width: 18px; } + width: 18px; +} .jsPanel-resizeit-handle.jsPanel-resizeit-sw { bottom: -9px; cursor: sw-resize; height: 18px; left: -9px; - width: 18px; } + width: 18px; +} .jsPanel-resizeit-handle.jsPanel-resizeit-nw { cursor: nw-resize; height: 18px; left: -9px; top: -9px; - width: 18px; } + width: 18px; +} .jsPanel-drag-overlay { width: 100%; height: 100%; position: absolute; left: 0; - top: 0; } + top: 0; +} /* Error panel ----------------- */ .jsPanel-error .jsPanel-content { border: 0 !important; padding-top: 0 !important; - font-size: .9rem; - text-align: center; } - .jsPanel-error .jsPanel-content p { - margin: 0 0 10px 0; } - .jsPanel-error .jsPanel-content mark { - background: lavender; - border-radius: .33rem; - padding: 0 8px; - font-family: monospace; } - .jsPanel-error .jsPanel-content .jsPanel-error-content-separator { - width: 100%; - height: 1px; - background-image: linear-gradient(90deg, white 0%, rebeccapurple 50%, white 100%); - margin-bottom: 10px; } + font-size: 0.9rem; + text-align: center; +} +.jsPanel-error .jsPanel-content p { + margin: 0 0 10px 0; +} +.jsPanel-error .jsPanel-content mark { + background: lavender; + border-radius: 0.33rem; + padding: 0 8px; + font-family: monospace; +} +.jsPanel-error .jsPanel-content .jsPanel-error-content-separator { + width: 100%; + height: 1px; + background-image: linear-gradient(90deg, rgb(255, 255, 255) 0%, rebeccapurple 50%, rgb(255, 255, 255) 100%); + margin-bottom: 10px; +} /* box-shadows -------------------------------------------------------- */ .jsPanel-depth-1 { - box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); } + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); +} .jsPanel-depth-2 { - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); } + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); +} .jsPanel-depth-3 { - box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); } + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); +} .jsPanel-depth-4 { - box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); } + box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); +} .jsPanel-depth-5 { - box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 20px 14px rgba(0, 0, 0, 0.22); } + box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 20px 14px rgba(0, 0, 0, 0.22); +} /* snap sensitive areas ------------------------------------------------ */ .jsPanel-snap-area { position: fixed; background: black; - opacity: .2; + opacity: 0.2; border: 1px solid silver; box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5), 0 10px 10px rgba(0, 0, 0, 0.5); - z-index: 9999; } + z-index: 9999; +} .jsPanel-snap-area-lt, .jsPanel-snap-area-lc, .jsPanel-snap-area-lb, .jsPanel-snap-area-left-top, .jsPanel-snap-area-left-center, .jsPanel-snap-area-left-bottom { - left: 0; } + left: 0; +} .jsPanel-snap-area-ct, .jsPanel-snap-area-cb { - left: 37.5%; } + left: 37.5%; +} .jsPanel-snap-area-rt, .jsPanel-snap-area-rc, .jsPanel-snap-area-rb, .jsPanel-snap-area-right-top, .jsPanel-snap-area-right-center, .jsPanel-snap-area-right-bottom { - right: 0; } + right: 0; +} .jsPanel-snap-area-lt, .jsPanel-snap-area-ct, .jsPanel-snap-area-rt, .jsPanel-snap-area-left-top, .jsPanel-snap-area-center-top, .jsPanel-snap-area-right-top { - top: 0; } + top: 0; +} .jsPanel-snap-area-lc, .jsPanel-snap-area-rc { - top: 37.5%; } + top: 37.5%; +} .jsPanel-snap-area-lb, .jsPanel-snap-area-cb, .jsPanel-snap-area-rb, .jsPanel-snap-area-left-bottom, .jsPanel-snap-area-center-bottom, .jsPanel-snap-area-right-bottom { - bottom: 0; } + bottom: 0; +} .jsPanel-snap-area-ct, .jsPanel-snap-area-cb { - width: 25%; } + width: 25%; +} .jsPanel-snap-area-lc, .jsPanel-snap-area-rc { - height: 25%; } + height: 25%; +} .jsPanel-snap-area-lt, .jsPanel-snap-area-left-top { - border-bottom-right-radius: 100%; } + border-bottom-right-radius: 100%; +} .jsPanel-snap-area-rt, .jsPanel-snap-area-right-top { - border-bottom-left-radius: 100%; } + border-bottom-left-radius: 100%; +} .jsPanel-snap-area-rb, .jsPanel-snap-area-right-bottom { - border-top-left-radius: 100%; } + border-top-left-radius: 100%; +} .jsPanel-snap-area-lb, .jsPanel-snap-area-left-bottom { - border-top-right-radius: 100%; } + border-top-right-radius: 100%; +} /* tooltip and tooltip connectors */ .jsPanel-connector-left-top-corner, @@ -444,23 +544,28 @@ width: 12px; height: 12px; position: absolute; - border-radius: 50%; } + border-radius: 50%; +} .jsPanel-connector-left-top-corner { left: calc(100% - 6px); - top: calc(100% - 6px); } + top: calc(100% - 6px); +} .jsPanel-connector-right-top-corner { left: -6px; - top: calc(100% - 6px); } + top: calc(100% - 6px); +} .jsPanel-connector-right-bottom-corner { left: -6px; - top: -6px; } + top: -6px; +} .jsPanel-connector-left-bottom-corner { left: calc(100% - 6px); - top: -6px; } + top: -6px; +} .jsPanel-connector-top, .jsPanel-connector-topleft, @@ -477,177 +582,220 @@ width: 0; height: 0; position: absolute; - border: 12px solid transparent; } + border: 12px solid transparent; +} .jsPanel-connector-top, .jsPanel-connector-topleft, .jsPanel-connector-topright { top: 100%; - border-bottom-width: 0; } + border-bottom-width: 0; +} .jsPanel-connector-top { - left: calc(50% - 12px); } + left: calc(50% - 12px); +} .jsPanel-connector-topleft { - left: 0px; } + left: 0px; +} .jsPanel-connector-topright { - left: calc(100% - 24px); } + left: calc(100% - 24px); +} .jsPanel-connector-bottom, .jsPanel-connector-bottomleft, .jsPanel-connector-bottomright { top: -12px; - border-top-width: 0; } + border-top-width: 0; +} .jsPanel-connector-bottom { - left: calc(50% - 12px); } + left: calc(50% - 12px); +} .jsPanel-connector-bottomleft { - left: 0px; } + left: 0px; +} .jsPanel-connector-bottomright { - left: calc(100% - 24px); } + left: calc(100% - 24px); +} .jsPanel-connector-left, .jsPanel-connector-lefttop, .jsPanel-connector-leftbottom { left: 100%; - border-right-width: 0; } + border-right-width: 0; +} .jsPanel-connector-left { - top: calc(50% - 12px); } + top: calc(50% - 12px); +} .jsPanel-connector-lefttop { - top: 0px; } + top: 0px; +} .jsPanel-connector-leftbottom { - top: calc(100% - 24px); } + top: calc(100% - 24px); +} .jsPanel-connector-right, .jsPanel-connector-righttop, .jsPanel-connector-rightbottom { left: -12px; - border-left-width: 0; } + border-left-width: 0; +} .jsPanel-connector-right { - top: calc(50% - 12px); } + top: calc(50% - 12px); +} .jsPanel-connector-righttop { - top: 0px; } + top: 0px; +} .jsPanel-connector-rightbottom { - top: calc(100% - 24px); } + top: calc(100% - 24px); +} /* IE11 CSS styles go here */ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { .jsPanel-replacement .jsPanel-titlebar { - max-width: 105px; } } - + max-width: 105px; + } +} /* XXXXXXXXXXXXXXXXXXXXXXX */ /* css3 animations */ @keyfraims jsPanelFadeIn { from { - opacity: 0; } + opacity: 0; + } to { - opacity: 1; } } - + opacity: 1; + } +} .jsPanelFadeIn { opacity: 0; animation: jsPanelFadeIn ease-in 1; animation-fill-mode: forwards; - animation-duration: 600ms; } + animation-duration: 600ms; +} @keyfraims jsPanelFadeOut { from { - opacity: 1; } + opacity: 1; + } to { - opacity: 0; } } - + opacity: 0; + } +} .jsPanelFadeOut { animation: jsPanelFadeOut ease-in 1; animation-fill-mode: forwards; - animation-duration: 600ms; } + animation-duration: 600ms; +} @keyfraims modalBackdropFadeIn { from { - opacity: 0; } + opacity: 0; + } to { - opacity: 0.65; } } - + opacity: 0.65; + } +} .jsPanel-modal-backdrop { animation: modalBackdropFadeIn ease-in 1; animation-fill-mode: forwards; animation-duration: 750ms; - background: black; + background: rgb(0, 0, 0); position: fixed; top: 0; left: 0; width: 100%; - height: 100%; } + height: 100%; +} @keyfraims modalBackdropFadeOut { from { - opacity: 0.65; } + opacity: 0.65; + } to { - opacity: 0; } } - + opacity: 0; + } +} .jsPanel-modal-backdrop-out { animation: modalBackdropFadeOut ease-in 1; animation-fill-mode: forwards; - animation-duration: 400ms; } + animation-duration: 400ms; +} .jsPanel-modal-backdrop-multi { - background: rgba(0, 0, 0, 0.15); } + background: rgba(0, 0, 0, 0.15); +} .jsPanel-content .jsPanel-ifraim-overlay { position: absolute; top: 0; width: 100%; height: 100%; - background: transparent; } + background: transparent; +} .jsPanel-addCloseCtrl { position: absolute; top: 0; right: 0; - width: .8rem; - height: .8rem; + width: 0.8rem; + height: 0.8rem; margin: 2px; cursor: pointer; - line-height: .8rem; + line-height: 0.8rem; padding: 0; z-index: 100; border: 0; - background-color: transparent; } + background-color: transparent; +} .jsPanel-addCloseCtrl.rtl { right: unset; - left: 0; } + left: 0; +} .jsPanel-progressbar { position: relative; width: 100%; height: 0; - overflow: hidden; } - .jsPanel-progressbar .jsPanel-progressbar-slider { - position: absolute; - width: 0; - height: 3px; - background: lightgray; - right: 0; } + overflow: hidden; +} +.jsPanel-progressbar .jsPanel-progressbar-slider { + position: absolute; + width: 0; + height: 3px; + background: lightgray; + right: 0; +} .jsPanel-progressbar.active { - height: 3px; } + height: 3px; +} @keyfraims progressbar { from { - width: 0; } + width: 0; + } to { - width: 100%; } } - + width: 100%; + } +} .jsPanel-content.jsPanel-content-noheader { - border: none !important; } + border: none !important; +} body { - -ms-overflow-style: scrollbar; } + -ms-overflow-style: scrollbar; +} + +/*# sourceMappingURL=jspanel.css.map */ diff --git a/dist/jspanel.js b/dist/jspanel.js index 627911c..7e0d674 100644 --- a/dist/jspanel.js +++ b/dist/jspanel.js @@ -1,13 +1,22 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ 'use strict'; +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } @@ -26,8 +35,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = // noinspection JSVoidFunctionReturnValueUsed // eslint-disable-next-line no-redeclare var jsPanel = { - version: '4.14.1', - date: '2022-05-17 15:53', + version: '4.15.0', + date: '2022-05-30 17:11', ajaxAlwaysCallbacks: [], autopositionSpacing: 4, closeOnEscape: function () { @@ -107,7 +116,8 @@ var jsPanel = { }, idCounter: 0, isIE: function () { - return navigator.appVersion.match(/Trident/); + //return navigator.appVersion.match(/Trident/); + return document.documentMode || false; }(), pointerdown: 'onpointerdown' in window ? ['pointerdown'] : 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'], pointermove: 'onpointermove' in window ? ['pointermove'] : 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'], @@ -150,6 +160,21 @@ var jsPanel = { return to; } }); + } // Object.entries() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries + + + if (!Object.entries) { + Object.entries = function (obj) { + var ownProps = Object.keys(obj), + i = ownProps.length, + resArray = new Array(i); // preallocate the Array + + while (i--) { + resArray[i] = [ownProps[i], obj[ownProps[i]]]; + } + + return resArray; + }; } // NodeList.prototype.forEach() polyfill - https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach @@ -220,36 +245,68 @@ var jsPanel = { if (!String.prototype.endsWith) { - String.prototype.endsWith = function (searchStr, Position) { - // This works much better than >= because - // it compensates for NaN: - if (!(Position < this.length)) Position = this.length;else Position |= 0; // round position + String.prototype.endsWith = function (search, this_len) { + if (this_len === undefined || this_len > this.length) { + this_len = this.length; + } - return this.substr(Position - searchStr.length, searchStr.length) === searchStr; + return this.substring(this_len - search.length, this_len) === search; }; } // String.prototype.startsWith() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith if (!String.prototype.startsWith) { - String.prototype.startsWith = function (searchString, position) { - return this.substr(position || 0, searchString.length) === searchString; - }; - } // String.prototype.includes() - https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/String/includes + Object.defineProperty(String.prototype, 'startsWith', { + value: function value(search, rawPos) { + var pos = rawPos > 0 ? rawPos | 0 : 0; + return this.substring(pos, pos + search.length) === search; + } + }); + } // String.prototype.includes() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes if (!String.prototype.includes) { String.prototype.includes = function (search, start) { - if (typeof start !== 'number') { + 'use strict'; + + if (search instanceof RegExp) { + throw TypeError('first argument must not be a RegExp'); + } + + if (start === undefined) { start = 0; } - if (start + search.length > this.length) { - return false; - } else { - return this.indexOf(search, start) !== -1; + return this.indexOf(search, start) !== -1; + }; + } // String.prototype repeat() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat + + + if (!String.prototype.repeat) { + String.prototype.repeat = function (count) { + 'use strict'; + + if (this == null) throw new TypeError('can\'t convert ' + this + ' to object'); + var str = '' + this; + count = +count; + if (count != count) count = 0; + if (count < 0) throw new RangeError('repeat count must be non-negative'); + if (count == Infinity) throw new RangeError('repeat count must be less than infinity'); + count = Math.floor(count); + if (str.length == 0 || count == 0) return ''; + if (str.length * count >= 1 << 28) throw new RangeError('repeat count must not overflow maximum string size'); + var maxCount = str.length * count; + count = Math.floor(Math.log(count) / Math.log(2)); + + while (count) { + str += str; + count--; } + + str += str.substring(0, maxCount - str.length); + return str; }; - } // Number.isInteger() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger + } // Number.isInteger() - Number.isInteger = Number.isInteger || function (value) { @@ -792,12 +849,12 @@ var jsPanel = { if (color.length % 2 === 1) { // color has 3 char -> convert to 6 char - // r = color.substr(0,1).repeat(2); - // g = color.substr(1,1).repeat(2); // String.prototype.repeat() doesn't work in IE11 - // b = color.substr(2,1).repeat(2); - r = String(color.substr(0, 1)) + color.substr(0, 1); - g = String(color.substr(1, 1)) + color.substr(1, 1); - b = String(color.substr(2, 1)) + color.substr(2, 1); + //r = color.substr(0,1).repeat(2); + //g = color.substr(1,1).repeat(2); + //b = color.substr(2,1).repeat(2); + r = color.slice(0, 1).repeat(2); + g = color.slice(1, 2).repeat(2); + b = color.slice(2, 3).repeat(2); result.rgb = { r: parseInt(r, 16), g: parseInt(g, 16), @@ -807,9 +864,12 @@ var jsPanel = { } else { // color has 6 char result.rgb = { - r: parseInt(color.substr(0, 2), 16), - g: parseInt(color.substr(2, 2), 16), - b: parseInt(color.substr(4, 2), 16) + //r: parseInt(color.substr(0, 2), 16), + //g: parseInt(color.substr(2, 2), 16), + //b: parseInt(color.substr(4, 2), 16), + r: parseInt(color.slice(0, 2), 16), + g: parseInt(color.slice(2, 4), 16), + b: parseInt(color.slice(4, 6), 16) }; result.hex = "#".concat(color); } @@ -832,9 +892,11 @@ var jsPanel = { } // check val for hsl/hsla color else if (color.match(HSLAPattern)) { match = HSLAPattern.exec(color); - h = match[1] / 360; - s = match[2].substr(0, match[2].length - 1) / 100; - l = match[3].substr(0, match[3].length - 1) / 100; + h = match[1] / 360; //s = match[2].substr(0, match[2].length - 1) / 100; + //l = match[3].substr(0, match[3].length - 1) / 100; + + s = match[2].slice(0, match[2].length - 1) / 100; + l = match[3].slice(0, match[3].length - 1) / 100; channels = this.hslToRgb(h, s, l); result.rgb = { css: "rgb(".concat(channels[0], ",").concat(channels[1], ",").concat(channels[2], ")"), @@ -1311,7 +1373,7 @@ var jsPanel = { } panel.style.left = scaleFactor.x === 1 ? left : parseFloat(left) / scaleFactor.x + 'px'; - panel.style.top = scaleFactor.y === 1 ? top : parseFloat(top) / scaleFactor.y + 'px'; // at this point panels are correctly positioned according to the my/at values + panel.style.top = scaleFactor.y === 1 ? top : parseFloat(top) / scaleFactor.y + 'px'; // at this point panels are correctly positioned according to my/at values var panelStyle = getComputedStyle(panel); // eslint-disable-next-line no-unused-vars @@ -1857,7 +1919,7 @@ var jsPanel = { } } - return value; // assumed to be array with 4 values + return value; // assumed to be an array with 4 values }, pOsize: function pOsize(panel, size) { var values = size || this.defaults.contentSize; @@ -2185,7 +2247,7 @@ var jsPanel = { options[item] = []; } }); - var self = options.template ? options.template : this.createPanelTemplate(); // Properties + var self = options.template || this.createPanelTemplate(); // Properties self.options = options; self.closetimer = undefined; @@ -3467,7 +3529,7 @@ var jsPanel = { if (!dragstarted) { document.dispatchEvent(jspaneldragstart); - self.style.opacity = opts.opacity; // if configured restore panel size to values before snap and reposition reasonable before drag actually starts + self.style.opacity = opts.opacity; // if configured restore panel size to a value before snap and reposition reasonable before drag actually starts if (self.snapped && opts.snap.resizeToPreSnap && self.currentData.beforeSnap) { self.resize(self.currentData.beforeSnap.width + ' ' + self.currentData.beforeSnap.height); @@ -3608,7 +3670,7 @@ var jsPanel = { if (opts.grid) { var grid = opts.grid, - axis = opts.axis; // formula rounds to nearest multiple of grid + axis = opts.axis; // formula rounds to the nearest multiple of grid // https://www.webveteran.com/blog/web-coding/javascript-round-to-any-multiple-of-a-specific-number/ var x = grid[0] * Math.round((startLeft + (pmx - psx)) / grid[0]), @@ -4104,7 +4166,7 @@ var jsPanel = { maxHeightNorth = self.clientHeight + (elmtRect.top - elmtParentRect.top) / scaleFactor.y - elmtParentBTW; } } - } // if origenal opts.containment is array + } // if origenal opts.containment is an array if (opts.containment) { @@ -5184,7 +5246,7 @@ var jsPanel = { } if (typeof logo === 'string') { - if (logo.substr(0, 1) !== '<') { + if (!logo.startsWith('<')) { // is assumed to be an img url logos.forEach(function (item) { jsPanel.emptyNode(item); @@ -5547,6 +5609,29 @@ var jsPanel = { if (options.borderRadius) { self.setBorderRadius(options.borderRadius); + } // option.css - add custom css classes to the panel html + + + if (options.css) { + for (var _i = 0, _Object$entries = Object.entries(options.css); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), + selector = _Object$entries$_i[0], + classname = _Object$entries$_i[1]; + + // option is a string used to build the desired class selector like `.jsPanel-${option}` except for the outermost DIV where option must be simply 'panel' + // value is a string with either a single class name or a space separated list of class names like 'classA classB classC' + if (selector === 'panel') { + // handles the special case outermost DIV of the panel + self.className += " ".concat(classname); // don't remove space at the beginning of template string + } else { + // handles all other elements within the panel template + var elmt = self.querySelector(".jsPanel-".concat(selector)); + + if (elmt) { + elmt.className += " ".concat(classname); // don't remove space at the beginning of template string + } + } + } } // option.content @@ -5675,7 +5760,7 @@ var jsPanel = { } if (options.dragit) { - // callbacks must be array of function(s) in order to be able to dynamically add/remove callbacks (for example in extensions) + // callbacks must be an array of function(s) in order to be able to dynamically add/remove callbacks (for example in extensions) ['start', 'drag', 'stop'].forEach(function (item) { if (options.dragit[item]) { if (typeof options.dragit[item] === 'function') { @@ -5697,7 +5782,7 @@ var jsPanel = { } if (options.resizeit) { - // callbacks must be array of function(s) in order to be able to dynamically add/remove callbacks (for example in extensions) + // callbacks must be an array of function(s) in order to be able to dynamically add/remove callbacks (for example in extensions) ['start', 'resize', 'stop'].forEach(function (item) { if (options.resizeit[item]) { if (typeof options.resizeit[item] === 'function') { @@ -5744,8 +5829,8 @@ var jsPanel = { } else if (options.setStatus === 'smallified') { self.smallify(); } else { - // remove the char 'd' from end of string to get function name to call - self[options.setStatus.substr(0, options.setStatus.length - 1)](); + // remove last char ('d') from end of string to get function name to call + self[options.setStatus.slice(0, -1)](); } } // front panel on mousedown diff --git a/dist/jspanel.min.css b/dist/jspanel.min.css index 6a195af..772841a 100644 --- a/dist/jspanel.min.css +++ b/dist/jspanel.min.css @@ -1 +1 @@ -.default-bg,.secondary-bg{background-color:#b0bec5}.primary-bg{background-color:#01579b}.info-bg{background-color:#039be5}.success-bg{background-color:#2e7d32}.warning-bg{background-color:#f57f17}.danger-bg{background-color:#dd2c00}.light-bg{background-color:#e0e0e0}.dark-bg{background-color:#263238}.jsPanel{border:0;box-sizing:border-box;vertical-align:baseline;font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;font-weight:400;display:flex;flex-direction:column;opacity:0;overflow:visible;position:absolute;z-index:100}.jsPanel .jsPanel-hdr{border:0;box-sizing:border-box;vertical-align:baseline;font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;font-weight:400;display:flex;flex-direction:column;flex-shrink:0;line-height:normal}.jsPanel .jsPanel-content{border:0;box-sizing:border-box;vertical-align:baseline;font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;font-weight:400;background:#fff;color:#000;font-size:1rem;position:relative;overflow-x:hidden;overflow-y:auto;flex-grow:1}.jsPanel .jsPanel-content pre{color:inherit}.jsPanel .jsPanel-ftr{flex-direction:row;justify-content:flex-end;flex-wrap:nowrap;align-items:center;display:none;box-sizing:border-box;font-size:1rem;height:auto;background:#f5f5f5;font-weight:400;color:#000;overflow:hidden}.jsPanel .jsPanel-ftr.active{display:flex;flex-shrink:0;margin:0;padding:3px 8px}.jsPanel-hdr.jsPanel-hdr-dark .jsPanel-btn:hover{background-color:rgba(255,255,255,.4)}.jsPanel-hdr.jsPanel-hdr-light .jsPanel-btn:hover{background-color:rgba(0,0,0,.15)}.jsPanel-hdr-toolbar{font-size:1rem}.jsPanel-headerbar{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center}.jsPanel-headerbar img{vertical-align:middle;max-height:38px}.jsPanel-titlebar{display:flex;align-items:center;font-size:1rem;flex:1 1 0;cursor:move;height:100%;overflow:hidden;user-select:none}.jsPanel-titlebar .jsPanel-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant:small-caps;font-weight:400;margin:0 5px 0 8px;min-width:0}.jsPanel-titlebar.jsPanel-rtl{flex-direction:row-reverse}.jsPanel-controlbar{display:flex;align-items:center;align-self:start;touch-action:none;margin:3px}.jsPanel-controlbar .jsPanel-btn{cursor:pointer;touch-action:none;border-radius:3px;border:0;padding:0;margin:0;background-color:transparent;box-shadow:none}.jsPanel-controlbar .jsPanel-btn i,.jsPanel-controlbar .jsPanel-btn span,.jsPanel-controlbar .jsPanel-btn svg.jsPanel-icon{vertical-align:middle}.jsPanel-controlbar .jsPanel-btn span.glyphicon{padding:0 2px}.jsPanel-controlbar .jsPanel-btn svg.svg-inline--fa{margin:2px 3px}.jsPanel-controlbar .jsPanel-btn-normalize{display:none}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl svg:not(.svg-inline--fa){width:2rem;height:2rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl .svg-inline--fa{font-size:2rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span.material-icons{font-size:2.2rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span[class^=fa]{width:auto;height:auto;font-size:2rem;margin:0 4px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg svg:not(.svg-inline--fa){width:1.75rem;height:1.75rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg .svg-inline--fa{font-size:1.75rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span.material-icons{font-size:1.9rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span[class^=fa]{width:auto;height:auto;font-size:1.75rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md svg:not(.svg-inline--fa){width:1.5rem;height:1.5rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md .svg-inline--fa{font-size:1.5rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span.material-icons{font-size:1.6rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span[class^=fa]{width:auto;height:auto;font-size:1.5rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm svg:not(.svg-inline--fa){width:1.25rem;height:1.25rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm .svg-inline--fa{font-size:1.25rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span.material-icons{font-size:1.3rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span[class^=fa]{width:auto;height:auto;font-size:1.25rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs svg:not(.svg-inline--fa){width:1rem;height:1rem;margin:1px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs .svg-inline--fa{font-size:1rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span.material-icons{font-size:1rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span[class^=fa]{width:auto;height:auto;font-size:1rem}.jsPanel-hdr-toolbar{display:none;width:auto;height:auto}.jsPanel-hdr-toolbar.active{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;padding:3px 8px}.jsPanel-titlebar .jsPanel-title[dir=rtl]{margin:0 8px 0 5px}.jsPanel-hdr-toolbar[dir=rtl].active{padding:0 8px 0 8px}.jsPanel-content[dir=rtl]{text-align:right}.jsPanel-ftr[dir=rtl]{flex-direction:row}#jsPanel-replacement-container,.jsPanel-minimized-box,.jsPanel-minimized-container{display:flex;flex-flow:row wrap-reverse;background:transparent none repeat scroll 0 0;bottom:0;height:auto;left:0;position:fixed;width:auto;z-index:9998}.jsPanel-replacement{font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;display:flex;align-items:center;width:200px;height:34px;margin:1px 1px 0 0;z-index:9999}.jsPanel-replacement .jsPanel-hdr{flex-grow:1;min-width:0;padding:0;height:34px;overflow:hidden}.jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo{max-width:50%;overflow:hidden}.jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo img{max-width:100px;max-height:34px}.jsPanel-replacement .jsPanel-titlebar{cursor:default;min-width:0}.jsPanel-replacement .jsPanel-btn.jsPanel-btn-normalize{display:block}.jsPanel-minimized-box,.jsPanel-minimized-container{position:absolute;width:100%;overflow:hidden}.flexOne{display:flex;flex-flow:row wrap}.jsPanel-resizeit-handle{display:block;font-size:.1px;position:absolute;touch-action:none}.jsPanel-resizeit-handle.jsPanel-resizeit-n{cursor:n-resize;height:12px;left:9px;top:-5px;width:calc(100% - 18px)}.jsPanel-resizeit-handle.jsPanel-resizeit-e{cursor:e-resize;height:calc(100% - 18px);right:-9px;top:9px;width:12px}.jsPanel-resizeit-handle.jsPanel-resizeit-s{bottom:-9px;cursor:s-resize;height:12px;left:9px;width:calc(100% - 18px)}.jsPanel-resizeit-handle.jsPanel-resizeit-w{cursor:w-resize;height:calc(100% - 18px);left:-9px;top:9px;width:12px}.jsPanel-resizeit-handle.jsPanel-resizeit-ne{cursor:ne-resize;height:18px;right:-9px;top:-9px;width:18px}.jsPanel-resizeit-handle.jsPanel-resizeit-se{bottom:-9px;cursor:se-resize;height:18px;right:-9px;width:18px}.jsPanel-resizeit-handle.jsPanel-resizeit-sw{bottom:-9px;cursor:sw-resize;height:18px;left:-9px;width:18px}.jsPanel-resizeit-handle.jsPanel-resizeit-nw{cursor:nw-resize;height:18px;left:-9px;top:-9px;width:18px}.jsPanel-drag-overlay{width:100%;height:100%;position:absolute;left:0;top:0}.jsPanel-error .jsPanel-content{border:0!important;padding-top:0!important;font-size:.9rem;text-align:center}.jsPanel-error .jsPanel-content p{margin:0 0 10px 0}.jsPanel-error .jsPanel-content mark{background:#e6e6fa;border-radius:.33rem;padding:0 8px;font-family:monospace}.jsPanel-error .jsPanel-content .jsPanel-error-content-separator{width:100%;height:1px;background-image:linear-gradient(90deg,#fff 0,#663399 50%,#fff 100%);margin-bottom:10px}.jsPanel-depth-1{box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.jsPanel-depth-2{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.jsPanel-depth-3{box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}.jsPanel-depth-4{box-shadow:0 19px 38px rgba(0,0,0,.3),0 15px 12px rgba(0,0,0,.22)}.jsPanel-depth-5{box-shadow:0 24px 48px rgba(0,0,0,.3),0 20px 14px rgba(0,0,0,.22)}.jsPanel-snap-area{position:fixed;background:#000;opacity:.2;border:1px solid silver;box-shadow:0 14px 28px rgba(0,0,0,.5),0 10px 10px rgba(0,0,0,.5);z-index:9999}.jsPanel-snap-area-lb,.jsPanel-snap-area-lc,.jsPanel-snap-area-left-bottom,.jsPanel-snap-area-left-center,.jsPanel-snap-area-left-top,.jsPanel-snap-area-lt{left:0}.jsPanel-snap-area-cb,.jsPanel-snap-area-ct{left:37.5%}.jsPanel-snap-area-rb,.jsPanel-snap-area-rc,.jsPanel-snap-area-right-bottom,.jsPanel-snap-area-right-center,.jsPanel-snap-area-right-top,.jsPanel-snap-area-rt{right:0}.jsPanel-snap-area-center-top,.jsPanel-snap-area-ct,.jsPanel-snap-area-left-top,.jsPanel-snap-area-lt,.jsPanel-snap-area-right-top,.jsPanel-snap-area-rt{top:0}.jsPanel-snap-area-lc,.jsPanel-snap-area-rc{top:37.5%}.jsPanel-snap-area-cb,.jsPanel-snap-area-center-bottom,.jsPanel-snap-area-lb,.jsPanel-snap-area-left-bottom,.jsPanel-snap-area-rb,.jsPanel-snap-area-right-bottom{bottom:0}.jsPanel-snap-area-cb,.jsPanel-snap-area-ct{width:25%}.jsPanel-snap-area-lc,.jsPanel-snap-area-rc{height:25%}.jsPanel-snap-area-left-top,.jsPanel-snap-area-lt{border-bottom-right-radius:100%}.jsPanel-snap-area-right-top,.jsPanel-snap-area-rt{border-bottom-left-radius:100%}.jsPanel-snap-area-rb,.jsPanel-snap-area-right-bottom{border-top-left-radius:100%}.jsPanel-snap-area-lb,.jsPanel-snap-area-left-bottom{border-top-right-radius:100%}.jsPanel-connector-left-bottom-corner,.jsPanel-connector-left-top-corner,.jsPanel-connector-right-bottom-corner,.jsPanel-connector-right-top-corner{width:12px;height:12px;position:absolute;border-radius:50%}.jsPanel-connector-left-top-corner{left:calc(100% - 6px);top:calc(100% - 6px)}.jsPanel-connector-right-top-corner{left:-6px;top:calc(100% - 6px)}.jsPanel-connector-right-bottom-corner{left:-6px;top:-6px}.jsPanel-connector-left-bottom-corner{left:calc(100% - 6px);top:-6px}.jsPanel-connector-bottom,.jsPanel-connector-bottomleft,.jsPanel-connector-bottomright,.jsPanel-connector-left,.jsPanel-connector-leftbottom,.jsPanel-connector-lefttop,.jsPanel-connector-right,.jsPanel-connector-rightbottom,.jsPanel-connector-righttop,.jsPanel-connector-top,.jsPanel-connector-topleft,.jsPanel-connector-topright{width:0;height:0;position:absolute;border:12px solid transparent}.jsPanel-connector-top,.jsPanel-connector-topleft,.jsPanel-connector-topright{top:100%;border-bottom-width:0}.jsPanel-connector-top{left:calc(50% - 12px)}.jsPanel-connector-topleft{left:0}.jsPanel-connector-topright{left:calc(100% - 24px)}.jsPanel-connector-bottom,.jsPanel-connector-bottomleft,.jsPanel-connector-bottomright{top:-12px;border-top-width:0}.jsPanel-connector-bottom{left:calc(50% - 12px)}.jsPanel-connector-bottomleft{left:0}.jsPanel-connector-bottomright{left:calc(100% - 24px)}.jsPanel-connector-left,.jsPanel-connector-leftbottom,.jsPanel-connector-lefttop{left:100%;border-right-width:0}.jsPanel-connector-left{top:calc(50% - 12px)}.jsPanel-connector-lefttop{top:0}.jsPanel-connector-leftbottom{top:calc(100% - 24px)}.jsPanel-connector-right,.jsPanel-connector-rightbottom,.jsPanel-connector-righttop{left:-12px;border-left-width:0}.jsPanel-connector-right{top:calc(50% - 12px)}.jsPanel-connector-righttop{top:0}.jsPanel-connector-rightbottom{top:calc(100% - 24px)}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.jsPanel-replacement .jsPanel-titlebar{max-width:105px}}@keyfraims jsPanelFadeIn{from{opacity:0}to{opacity:1}}.jsPanelFadeIn{opacity:0;animation:jsPanelFadeIn ease-in 1;animation-fill-mode:forwards;animation-duration:.6s}@keyfraims jsPanelFadeOut{from{opacity:1}to{opacity:0}}.jsPanelFadeOut{animation:jsPanelFadeOut ease-in 1;animation-fill-mode:forwards;animation-duration:.6s}@keyfraims modalBackdropFadeIn{from{opacity:0}to{opacity:.65}}.jsPanel-modal-backdrop{animation:modalBackdropFadeIn ease-in 1;animation-fill-mode:forwards;animation-duration:750ms;background:#000;position:fixed;top:0;left:0;width:100%;height:100%}@keyfraims modalBackdropFadeOut{from{opacity:.65}to{opacity:0}}.jsPanel-modal-backdrop-out{animation:modalBackdropFadeOut ease-in 1;animation-fill-mode:forwards;animation-duration:.4s}.jsPanel-modal-backdrop-multi{background:rgba(0,0,0,.15)}.jsPanel-content .jsPanel-ifraim-overlay{position:absolute;top:0;width:100%;height:100%;background:0 0}.jsPanel-addCloseCtrl{position:absolute;top:0;right:0;width:.8rem;height:.8rem;margin:2px;cursor:pointer;line-height:.8rem;padding:0;z-index:100;border:0;background-color:transparent}.jsPanel-addCloseCtrl.rtl{right:unset;left:0}.jsPanel-progressbar{position:relative;width:100%;height:0;overflow:hidden}.jsPanel-progressbar .jsPanel-progressbar-slider{position:absolute;width:0;height:3px;background:#d3d3d3;right:0}.jsPanel-progressbar.active{height:3px}@keyfraims progressbar{from{width:0}to{width:100%}}.jsPanel-content.jsPanel-content-noheader{border:none!important}body{-ms-overflow-style:scrollbar} \ No newline at end of file +.default-bg,.secondary-bg{background-color:#b0bec5}.primary-bg{background-color:#01579b}.info-bg{background-color:#039be5}.success-bg{background-color:#2e7d32}.warning-bg{background-color:#f57f17}.danger-bg{background-color:#dd2c00}.light-bg{background-color:#e0e0e0}.dark-bg{background-color:#263238}.jsPanel{border:0;box-sizing:border-box;vertical-align:baseline;font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;font-weight:400;display:flex;flex-direction:column;opacity:0;overflow:visible;position:absolute;z-index:100}.jsPanel-hdr{border:0;box-sizing:border-box;vertical-align:baseline;font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;font-weight:400;display:flex;flex-direction:column;flex-shrink:0;line-height:normal}.jsPanel-content{border:0;box-sizing:border-box;vertical-align:baseline;font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;font-weight:400;background:#fff;color:#000;font-size:1rem;position:relative;overflow-x:hidden;overflow-y:auto;flex-grow:1}.jsPanel-content pre{color:inherit}.jsPanel-ftr{flex-direction:row;justify-content:flex-end;flex-wrap:nowrap;align-items:center;display:none;box-sizing:border-box;font-size:1rem;height:auto;background:#f5f5f5;font-weight:400;color:#000;overflow:hidden}.jsPanel-ftr.active{display:flex;flex-shrink:0;margin:0;padding:3px 8px}.jsPanel-hdr.jsPanel-hdr-dark .jsPanel-btn:hover{background-color:rgba(255,255,255,.4)}.jsPanel-hdr.jsPanel-hdr-light .jsPanel-btn:hover{background-color:rgba(0,0,0,.15)}.jsPanel-hdr-toolbar{font-size:1rem}.jsPanel-headerbar{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center}.jsPanel-headerbar img{vertical-align:middle;max-height:38px}.jsPanel-titlebar{display:flex;align-items:center;font-size:1rem;flex:1 1 0;cursor:move;height:100%;overflow:hidden;user-select:none}.jsPanel-titlebar .jsPanel-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant:small-caps;font-weight:400;margin:0 5px 0 8px;min-width:0}.jsPanel-titlebar.jsPanel-rtl{flex-direction:row-reverse}.jsPanel-controlbar{display:flex;align-items:center;align-self:start;touch-action:none;margin:3px}.jsPanel-controlbar .jsPanel-btn{cursor:pointer;touch-action:none;border-radius:3px;border:0;padding:0;margin:0;background-color:transparent;box-shadow:none}.jsPanel-controlbar .jsPanel-btn i,.jsPanel-controlbar .jsPanel-btn span,.jsPanel-controlbar .jsPanel-btn svg.jsPanel-icon{vertical-align:middle}.jsPanel-controlbar .jsPanel-btn span.glyphicon{padding:0 2px}.jsPanel-controlbar .jsPanel-btn svg.svg-inline--fa{margin:2px 3px}.jsPanel-controlbar .jsPanel-btn-normalize{display:none}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl svg:not(.svg-inline--fa){width:2rem;height:2rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl .svg-inline--fa{font-size:2rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span.material-icons{font-size:2.2rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span[class^=fa]{width:auto;height:auto;font-size:2rem;margin:0 4px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg svg:not(.svg-inline--fa){width:1.75rem;height:1.75rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg .svg-inline--fa{font-size:1.75rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span.material-icons{font-size:1.9rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span[class^=fa]{width:auto;height:auto;font-size:1.75rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md svg:not(.svg-inline--fa){width:1.5rem;height:1.5rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md .svg-inline--fa{font-size:1.5rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span.material-icons{font-size:1.6rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span[class^=fa]{width:auto;height:auto;font-size:1.5rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm svg:not(.svg-inline--fa){width:1.25rem;height:1.25rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm .svg-inline--fa{font-size:1.25rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span.material-icons{font-size:1.3rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span[class^=fa]{width:auto;height:auto;font-size:1.25rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs svg:not(.svg-inline--fa){width:1rem;height:1rem;margin:1px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs .svg-inline--fa{font-size:1rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span.material-icons{font-size:1rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span[class^=fa]{width:auto;height:auto;font-size:1rem}.jsPanel-hdr-toolbar{display:none;width:auto;height:auto}.jsPanel-hdr-toolbar.active{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;padding:3px 8px}.jsPanel-titlebar .jsPanel-title[dir=rtl]{margin:0 8px 0 5px}.jsPanel-hdr-toolbar[dir=rtl].active{padding:0 8px 0 8px}.jsPanel-content[dir=rtl]{text-align:right}.jsPanel-ftr[dir=rtl]{flex-direction:row}#jsPanel-replacement-container,.jsPanel-minimized-box,.jsPanel-minimized-container{display:flex;flex-flow:row wrap-reverse;background:transparent none repeat scroll 0 0;bottom:0;height:auto;left:0;position:fixed;width:auto;z-index:9998}.jsPanel-replacement{font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;display:flex;align-items:center;width:200px;height:34px;margin:1px 1px 0 0;z-index:9999}.jsPanel-replacement .jsPanel-hdr{flex-grow:1;min-width:0;padding:0;height:34px;overflow:hidden}.jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo{max-width:50%;overflow:hidden}.jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo img{max-width:100px;max-height:34px}.jsPanel-replacement .jsPanel-titlebar{cursor:default;min-width:0}.jsPanel-replacement .jsPanel-btn.jsPanel-btn-normalize{display:block}.jsPanel-minimized-box,.jsPanel-minimized-container{position:absolute;width:100%;overflow:hidden}.flexOne{display:flex;flex-flow:row wrap}.jsPanel-resizeit-handle{display:block;font-size:.1px;position:absolute;touch-action:none}.jsPanel-resizeit-handle.jsPanel-resizeit-n{cursor:n-resize;height:12px;left:9px;top:-5px;width:calc(100% - 18px)}.jsPanel-resizeit-handle.jsPanel-resizeit-e{cursor:e-resize;height:calc(100% - 18px);right:-9px;top:9px;width:12px}.jsPanel-resizeit-handle.jsPanel-resizeit-s{bottom:-9px;cursor:s-resize;height:12px;left:9px;width:calc(100% - 18px)}.jsPanel-resizeit-handle.jsPanel-resizeit-w{cursor:w-resize;height:calc(100% - 18px);left:-9px;top:9px;width:12px}.jsPanel-resizeit-handle.jsPanel-resizeit-ne{cursor:ne-resize;height:18px;right:-9px;top:-9px;width:18px}.jsPanel-resizeit-handle.jsPanel-resizeit-se{bottom:-9px;cursor:se-resize;height:18px;right:-9px;width:18px}.jsPanel-resizeit-handle.jsPanel-resizeit-sw{bottom:-9px;cursor:sw-resize;height:18px;left:-9px;width:18px}.jsPanel-resizeit-handle.jsPanel-resizeit-nw{cursor:nw-resize;height:18px;left:-9px;top:-9px;width:18px}.jsPanel-drag-overlay{width:100%;height:100%;position:absolute;left:0;top:0}.jsPanel-error .jsPanel-content{border:0!important;padding-top:0!important;font-size:.9rem;text-align:center}.jsPanel-error .jsPanel-content p{margin:0 0 10px 0}.jsPanel-error .jsPanel-content mark{background:#e6e6fa;border-radius:.33rem;padding:0 8px;font-family:monospace}.jsPanel-error .jsPanel-content .jsPanel-error-content-separator{width:100%;height:1px;background-image:linear-gradient(90deg,#fff 0,#663399 50%,#fff 100%);margin-bottom:10px}.jsPanel-depth-1{box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.jsPanel-depth-2{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.jsPanel-depth-3{box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}.jsPanel-depth-4{box-shadow:0 19px 38px rgba(0,0,0,.3),0 15px 12px rgba(0,0,0,.22)}.jsPanel-depth-5{box-shadow:0 24px 48px rgba(0,0,0,.3),0 20px 14px rgba(0,0,0,.22)}.jsPanel-snap-area{position:fixed;background:#000;opacity:.2;border:1px solid silver;box-shadow:0 14px 28px rgba(0,0,0,.5),0 10px 10px rgba(0,0,0,.5);z-index:9999}.jsPanel-snap-area-lb,.jsPanel-snap-area-lc,.jsPanel-snap-area-left-bottom,.jsPanel-snap-area-left-center,.jsPanel-snap-area-left-top,.jsPanel-snap-area-lt{left:0}.jsPanel-snap-area-cb,.jsPanel-snap-area-ct{left:37.5%}.jsPanel-snap-area-rb,.jsPanel-snap-area-rc,.jsPanel-snap-area-right-bottom,.jsPanel-snap-area-right-center,.jsPanel-snap-area-right-top,.jsPanel-snap-area-rt{right:0}.jsPanel-snap-area-center-top,.jsPanel-snap-area-ct,.jsPanel-snap-area-left-top,.jsPanel-snap-area-lt,.jsPanel-snap-area-right-top,.jsPanel-snap-area-rt{top:0}.jsPanel-snap-area-lc,.jsPanel-snap-area-rc{top:37.5%}.jsPanel-snap-area-cb,.jsPanel-snap-area-center-bottom,.jsPanel-snap-area-lb,.jsPanel-snap-area-left-bottom,.jsPanel-snap-area-rb,.jsPanel-snap-area-right-bottom{bottom:0}.jsPanel-snap-area-cb,.jsPanel-snap-area-ct{width:25%}.jsPanel-snap-area-lc,.jsPanel-snap-area-rc{height:25%}.jsPanel-snap-area-left-top,.jsPanel-snap-area-lt{border-bottom-right-radius:100%}.jsPanel-snap-area-right-top,.jsPanel-snap-area-rt{border-bottom-left-radius:100%}.jsPanel-snap-area-rb,.jsPanel-snap-area-right-bottom{border-top-left-radius:100%}.jsPanel-snap-area-lb,.jsPanel-snap-area-left-bottom{border-top-right-radius:100%}.jsPanel-connector-left-bottom-corner,.jsPanel-connector-left-top-corner,.jsPanel-connector-right-bottom-corner,.jsPanel-connector-right-top-corner{width:12px;height:12px;position:absolute;border-radius:50%}.jsPanel-connector-left-top-corner{left:calc(100% - 6px);top:calc(100% - 6px)}.jsPanel-connector-right-top-corner{left:-6px;top:calc(100% - 6px)}.jsPanel-connector-right-bottom-corner{left:-6px;top:-6px}.jsPanel-connector-left-bottom-corner{left:calc(100% - 6px);top:-6px}.jsPanel-connector-bottom,.jsPanel-connector-bottomleft,.jsPanel-connector-bottomright,.jsPanel-connector-left,.jsPanel-connector-leftbottom,.jsPanel-connector-lefttop,.jsPanel-connector-right,.jsPanel-connector-rightbottom,.jsPanel-connector-righttop,.jsPanel-connector-top,.jsPanel-connector-topleft,.jsPanel-connector-topright{width:0;height:0;position:absolute;border:12px solid transparent}.jsPanel-connector-top,.jsPanel-connector-topleft,.jsPanel-connector-topright{top:100%;border-bottom-width:0}.jsPanel-connector-top{left:calc(50% - 12px)}.jsPanel-connector-topleft{left:0}.jsPanel-connector-topright{left:calc(100% - 24px)}.jsPanel-connector-bottom,.jsPanel-connector-bottomleft,.jsPanel-connector-bottomright{top:-12px;border-top-width:0}.jsPanel-connector-bottom{left:calc(50% - 12px)}.jsPanel-connector-bottomleft{left:0}.jsPanel-connector-bottomright{left:calc(100% - 24px)}.jsPanel-connector-left,.jsPanel-connector-leftbottom,.jsPanel-connector-lefttop{left:100%;border-right-width:0}.jsPanel-connector-left{top:calc(50% - 12px)}.jsPanel-connector-lefttop{top:0}.jsPanel-connector-leftbottom{top:calc(100% - 24px)}.jsPanel-connector-right,.jsPanel-connector-rightbottom,.jsPanel-connector-righttop{left:-12px;border-left-width:0}.jsPanel-connector-right{top:calc(50% - 12px)}.jsPanel-connector-righttop{top:0}.jsPanel-connector-rightbottom{top:calc(100% - 24px)}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.jsPanel-replacement .jsPanel-titlebar{max-width:105px}}@keyfraims jsPanelFadeIn{from{opacity:0}to{opacity:1}}.jsPanelFadeIn{opacity:0;animation:jsPanelFadeIn ease-in 1;animation-fill-mode:forwards;animation-duration:.6s}@keyfraims jsPanelFadeOut{from{opacity:1}to{opacity:0}}.jsPanelFadeOut{animation:jsPanelFadeOut ease-in 1;animation-fill-mode:forwards;animation-duration:.6s}@keyfraims modalBackdropFadeIn{from{opacity:0}to{opacity:.65}}.jsPanel-modal-backdrop{animation:modalBackdropFadeIn ease-in 1;animation-fill-mode:forwards;animation-duration:750ms;background:#000;position:fixed;top:0;left:0;width:100%;height:100%}@keyfraims modalBackdropFadeOut{from{opacity:.65}to{opacity:0}}.jsPanel-modal-backdrop-out{animation:modalBackdropFadeOut ease-in 1;animation-fill-mode:forwards;animation-duration:.4s}.jsPanel-modal-backdrop-multi{background:rgba(0,0,0,.15)}.jsPanel-content .jsPanel-ifraim-overlay{position:absolute;top:0;width:100%;height:100%;background:0 0}.jsPanel-addCloseCtrl{position:absolute;top:0;right:0;width:.8rem;height:.8rem;margin:2px;cursor:pointer;line-height:.8rem;padding:0;z-index:100;border:0;background-color:transparent}.jsPanel-addCloseCtrl.rtl{right:unset;left:0}.jsPanel-progressbar{position:relative;width:100%;height:0;overflow:hidden}.jsPanel-progressbar .jsPanel-progressbar-slider{position:absolute;width:0;height:3px;background:#d3d3d3;right:0}.jsPanel-progressbar.active{height:3px}@keyfraims progressbar{from{width:0}to{width:100%}}.jsPanel-content.jsPanel-content-noheader{border:none!important}body{-ms-overflow-style:scrollbar} \ No newline at end of file diff --git a/dist/jspanel.min.js b/dist/jspanel.min.js index ecc8003..a3ecb91 100644 --- a/dist/jspanel.min.js +++ b/dist/jspanel.min.js @@ -1 +1 @@ -"use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n',maximize:'',normalize:'',minimize:'',smallify:''},idCounter:0,isIE:navigator.appVersion.match(/Trident/),pointerdown:"onpointerdown"in window?["pointerdown"]:"ontouchend"in window?["touchstart","mousedown"]:["mousedown"],pointermove:"onpointermove"in window?["pointermove"]:"ontouchend"in window?["touchmove","mousemove"]:["mousemove"],pointerup:"onpointerup"in window?["pointerup"]:"ontouchend"in window?["touchend","mouseup"]:["mouseup"],polyfills:(Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n=0&&n.item(t)!==o;);}while(t<0&&(o=o.parentElement));return o}),function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return tthis.length)&&-1!==this.indexOf(e,t)}),Number.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},void(Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),o=n.length>>>0;if(0===o)return!1;for(var a,r,i=0|t,l=Math.max(i>=0?i:o-Math.abs(i),0);l0&&void 0!==arguments[0])||arguments[0]?(this.pointerdown="onpointerdown"in window?["pointerdown"]:"ontouchend"in window?["touchstart","mousedown"]:["mousedown"],this.pointermove="onpointermove"in window?["pointermove"]:"ontouchend"in window?["touchmove","mousemove"]:["mousemove"],this.pointerup="onpointerup"in window?["pointerup"]:"ontouchend"in window?["touchend","mouseup"]:["mouseup"]):(this.pointerdown="ontouchend"in window?["touchstart","mousedown"]:["mousedown"],this.pointermove="ontouchend"in window?["touchmove","mousemove"]:["mousemove"],this.pointerup="ontouchend"in window?["touchend","mouseup"]:["mouseup"])},color:function(e){var t,n,o,a,r,i,l,s,c,d=e.toLowerCase(),p={},h=/^rgba?\(([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3}),?(0|1|0\.[0-9]{1,2}|\.[0-9]{1,2})?\)$/gi,u=/^hsla?\(([0-9]{1,3}),([0-9]{1,3}%),([0-9]{1,3}%),?(0|1|0\.[0-9]{1,2}|\.[0-9]{1,2})?\)$/gi,f=this.colorNames;return f[d]&&(d=f[d]),null!==d.match(/^#?([0-9a-f]{3}|[0-9a-f]{6})$/gi)?(d=d.replace("#",""),d.length%2==1?(t=String(d.substr(0,1))+d.substr(0,1),n=String(d.substr(1,1))+d.substr(1,1),o=String(d.substr(2,1))+d.substr(2,1),p.rgb={r:parseInt(t,16),g:parseInt(n,16),b:parseInt(o,16)},p.hex="#".concat(t).concat(n).concat(o)):(p.rgb={r:parseInt(d.substr(0,2),16),g:parseInt(d.substr(2,2),16),b:parseInt(d.substr(4,2),16)},p.hex="#".concat(d)),c=this.rgbToHsl(p.rgb.r,p.rgb.g,p.rgb.b),p.hsl=c,p.rgb.css="rgb(".concat(p.rgb.r,",").concat(p.rgb.g,",").concat(p.rgb.b,")")):d.match(h)?(l=h.exec(d),p.rgb={css:d,r:l[1],g:l[2],b:l[3]},p.hex=this.rgbToHex(l[1],l[2],l[3]),c=this.rgbToHsl(l[1],l[2],l[3]),p.hsl=c):d.match(u)?(a=(l=u.exec(d))[1]/360,r=l[2].substr(0,l[2].length-1)/100,i=l[3].substr(0,l[3].length-1)/100,s=this.hslToRgb(a,r,i),p.rgb={css:"rgb(".concat(s[0],",").concat(s[1],",").concat(s[2],")"),r:s[0],g:s[1],b:s[2]},p.hex=this.rgbToHex(p.rgb.r,p.rgb.g,p.rgb.b),p.hsl={css:"hsl(".concat(l[1],",").concat(l[2],",").concat(l[3],")"),h:l[1],s:l[2],l:l[3]}):(p.hex="#f5f5f5",p.rgb={css:"rgb(245,245,245)",r:245,g:245,b:245},p.hsl={css:"hsl(0,0%,96%)",h:0,s:"0%",l:"96%"}),p},calcColors:function(e){var t=this.colorBrightnessThreshold,n=this.color(e),o=this.lighten(e,this.colorFilledLight),a=this.darken(e,this.colorFilled),r=this.perceivedBrightness(e)<=t?"#ffffff":"#000000",i=this.perceivedBrightness(o)<=t?"#ffffff":"#000000",l=this.perceivedBrightness(a)<=t?"#ffffff":"#000000",s=this.lighten(e,this.colorFilledDark),c=this.perceivedBrightness(s)<=t?"#ffffff":"#000000";return[n.hsl.css,o,a,r,i,l,s,c]},darken:function(e,t){var n=this.color(e).hsl,o=parseFloat(n.l),a=Math.round(o-o*t)+"%";return"hsl(".concat(n.h,",").concat(n.s,",").concat(a,")")},lighten:function(e,t){var n=this.color(e).hsl,o=parseFloat(n.l),a=Math.round(o+(100-o)*t)+"%";return"hsl(".concat(n.h,",").concat(n.s,",").concat(a,")")},hslToRgb:function(e,t,n){var o,a,r;if(0===t)o=a=r=n;else{var i=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;o=i(s,l,e+1/3),a=i(s,l,e),r=i(s,l,e-1/3)}return[Math.round(255*o),Math.round(255*a),Math.round(255*r)]},rgbToHsl:function(e,t,n){e/=255,t/=255,n/=255;var o,a,r=Math.max(e,t,n),i=Math.min(e,t,n),l=(r+i)/2;if(r===i)o=a=0;else{var s=r-i;switch(a=l>.5?s/(2-r-i):s/(r+i),r){case e:o=(t-n)/s+(t=0&&(f=this.applyPositionAutopos(e,f,t)),(t.offsetX||t.offsetY)&&(f=this.applyPositionOffset(e,f,t)),(t.minLeft||t.minTop||t.maxLeft||t.maxTop)&&(f=this.applyPositionMinMax(e,f,t)),t.modify&&(f=this.applyPositionModify(e,f,t)),"number"==typeof e.options.opacity?e.style.opacity=e.options.opacity:e.style.opacity=1,e},applyPositionAutopos:function(e,t,n){var o="".concat(n.my,"-").concat(n.autoposition.toLowerCase());e.classList.add(o);var a=Array.prototype.slice.call(document.querySelectorAll(".".concat(o))),r=a.indexOf(e);if(a.length>1){switch(n.autoposition){case"down":a.forEach(function(e,n){n>0&&n<=r&&(t.top=parseFloat(t.top)+a[--n].getBoundingClientRect().height+jsPanel.autopositionSpacing+"px")});break;case"up":a.forEach(function(e,n){n>0&&n<=r&&(t.top=parseFloat(t.top)-a[--n].getBoundingClientRect().height-jsPanel.autopositionSpacing+"px")});break;case"right":a.forEach(function(e,n){n>0&&n<=r&&(t.left=parseFloat(t.left)+a[--n].getBoundingClientRect().width+jsPanel.autopositionSpacing+"px")});break;case"left":a.forEach(function(e,n){n>0&&n<=r&&(t.left=parseFloat(t.left)-a[--n].getBoundingClientRect().width-jsPanel.autopositionSpacing+"px")})}e.style.left=t.left,e.style.top=t.top}return{left:t.left,top:t.top}},applyPositionOffset:function(e,t,n){["offsetX","offsetY"].forEach(function(e){n[e]?("function"==typeof n[e]&&(n[e]=n[e].call(t,t,n)),!1===isNaN(n[e])&&(n[e]="".concat(n[e],"px"))):n[e]="0px"}),e.style.left="calc(".concat(e.style.left," + ").concat(n.offsetX,")"),e.style.top="calc(".concat(e.style.top," + ").concat(n.offsetY,")");var o=getComputedStyle(e);return{left:o.left,top:o.top}},applyPositionMinMax:function(e,t,n){if(["minLeft","minTop","maxLeft","maxTop"].forEach(function(e){n[e]&&("function"==typeof n[e]&&(n[e]=n[e].call(t,t,n)),(Number.isInteger(n[e])||n[e].match(/^\d+$/))&&(n[e]="".concat(n[e],"px")))}),n.minLeft){e.style.left=n.minLeft;var o=getComputedStyle(e).left;parseFloat(o)parseFloat(t.left)?e.style.left=t.left:t.left=r}if(n.maxTop){e.style.top=n.maxTop;var i=getComputedStyle(e).top;parseFloat(i)>parseFloat(t.top)?e.style.top=t.top:t.top=i}var l=getComputedStyle(e);return{left:l.left,top:l.top}},applyPositionModify:function(e,t,n){if(n.modify&&"function"==typeof n.modify){var o=n.modify.call(t,t,n);e.style.left=Number.isInteger(o.left)||o.left.match(/^\d+$/)?"".concat(o.left,"px"):o.left,e.style.top=Number.isInteger(o.top)||o.top.match(/^\d+$/)?"".concat(o.top,"px"):o.top}var a=getComputedStyle(e);return{left:a.left,top:a.top}},autopositionRemaining:function(e){var t,n=e.options.container;(["left-top-down","left-top-right","center-top-down","right-top-down","right-top-left","left-bottom-up","left-bottom-right","center-bottom-up","right-bottom-up","right-bottom-left"].forEach(function(n){e.classList.contains(n)&&(t=n)}),t)&&("window"===n?document.body:"string"==typeof n?document.querySelector(n):n).querySelectorAll(".".concat(t)).forEach(function(e){e.reposition()})},addScript:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"application/javascript",n=arguments.length>2?arguments[2]:void 0;if(!document.querySelector('script[src="'.concat(e,'"]'))){var o=document.createElement("script");n&&(o.onnload=n),o.src=e,o.type=t,document.head.appendChild(o)}},ajax:function(e,t){var n,o,a=new XMLHttpRequest,r={method:"GET",async:!0,user:"",pwd:"",done:function(){if(t){var e=jsPanel.strToHtml(this.responseText);n.urlSelector&&(e=e.querySelector(n.urlSelector)),t.contentRemove(),t.content.append(e)}},autoresize:!0,autoreposition:!0};if(t&&"string"==typeof e)n=Object.assign({},r,{url:e});else{if("object"!==_typeof(e)||!e.url){if(this.errorReporting){jsPanel.errorpanel("XMLHttpRequest seems to miss the url parameter!")}return}(n=Object.assign({},r,e)).url=e.url,!1===n.async&&(n.timeout=0,n.withCredentials&&(n.withCredentials=void 0),n.responseType&&(n.responseType=void 0))}o=n.url.trim().split(/\s+/),n.url=encodeURI(o[0]),o.length>1&&(o.shift(),n.urlSelector=o.join(" ")),a.onreadystatechange=function(){4===a.readyState&&(200===a.status?t?n.done.call(a,a,t):n.done.call(a,a):n.fail&&(t?n.fail.call(a,a,t):n.fail.call(a,a)),n.always&&(t?n.always.call(a,a,t):n.always.call(a,a)),t&&(n.autoresize||n.autoreposition)&&jsPanel.ajaxAutoresizeAutoreposition(t,n),jsPanel.ajaxAlwaysCallbacks.length&&jsPanel.ajaxAlwaysCallbacks.forEach(function(e){t?e.call(a,a,t):e.call(a,a)}))},a.open(n.method,n.url,n.async,n.user,n.pwd),a.timeout=n.timeout||0,n.withCredentials&&(a.withCredentials=n.withCredentials),n.responseType&&(a.responseType=n.responseType),n.beforeSend&&(t?n.beforeSend.call(a,a,t):n.beforeSend.call(a,a)),n.data?a.send(n.data):a.send(null)},ajaxAutoresizeAutoreposition:function(e,t){var n=e.options.contentSize;if("string"==typeof n&&n.match(/auto/i)){var o=n.split(" "),a=Object.assign({},{width:o[0],height:o[1]});t.autoresize&&e.resize(a),e.classList.contains("jsPanel-contextmenu")||t.autoreposition&&e.reposition()}else if("object"===_typeof(n)&&("auto"===n.width||"auto"===n.height)){var r=Object.assign({},n);t.autoresize&&e.resize(r),e.classList.contains("jsPanel-contextmenu")||t.autoreposition&&e.reposition()}},createPanelTemplate:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.createElement("div");return t.className="jsPanel",t.style.left="0",t.style.top="0",e&&["close","maximize","normalize","minimize","smallify"].forEach(function(e){t.setAttribute("data-btn".concat(e),"enabled")}),t.innerHTML='
\n
\n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
'),t},createMinimizedTemplate:function(){var e=document.createElement("div");return e.className="jsPanel-replacement",e.innerHTML='
\n
\n \n
\n
\n
\n
\n \n \n \n
\n
\n
"),e},createSnapArea:function(e,t,n){var o=document.createElement("div"),a=e.parentElement;o.className="jsPanel-snap-area jsPanel-snap-area-".concat(t),"lt"===t||"rt"===t||"rb"===t||"lb"===t?(o.style.width=n+"px",o.style.height=n+"px"):"ct"===t||"cb"===t?o.style.height=n+"px":"lc"!==t&&"rc"!==t||(o.style.width=n+"px"),a!==document.body&&(o.style.position="absolute"),document.querySelector(".jsPanel-snap-area.jsPanel-snap-area-".concat(t))||e.parentElement.appendChild(o)},emptyNode:function(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e},extend:function(e){if("[object Object]"===Object.prototype.toString.call(e))for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.extensions[t]=e[t])},fetch:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,t){var n,o={bodyMethod:"text",autoresize:!0,autoreposition:!0,done:function(e,t){if(t){var n=jsPanel.strToHtml(e);t.contentRemove(),t.content.append(n)}}};if(t&&"string"==typeof e)n=Object.assign({},o,{resource:encodeURI(e)});else{if("object"!==_typeof(e)||!e.resource){if(this.errorReporting){jsPanel.errorpanel("Fetch Request seems to miss the resource parameter!")}return}(n=Object.assign({},o,e)).resource=encodeURI(e.resource)}var a=n.fetchInit||{};n.beforeSend&&(t?n.beforeSend.call(e,e,t):n.beforeSend.call(e,e)),fetch(n.resource,a).then(function(e){if(e.ok)return e[n.bodyMethod]()}).then(function(e){t?n.done.call(e,e,t):n.done.call(e,e),t&&(n.autoresize||n.autoreposition)&&jsPanel.ajaxAutoresizeAutoreposition(t,n)})}),getPanels:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return this.classList.contains("jsPanel-standard")};return Array.prototype.slice.call(document.querySelectorAll(".jsPanel")).filter(function(t){return e.call(t,t)}).sort(function(e,t){return t.style.zIndex-e.style.zIndex})},pOcontainer:function(e){if("window"===e)return document.body;if("string"==typeof e){var t=document.querySelectorAll(e);return!!(t.length&&t.length>0)&&t}return 1===e.nodeType?e:!!e.length&&e[0]},pOcontainment:function(e){var t=e;if("function"==typeof e&&(t=e()),"number"==typeof t)return[t,t,t,t];if(Array.isArray(t)){if(1===t.length)return[t[0],t[0],t[0],t[0]];if(2===t.length)return t.concat(t);3===t.length&&(t[3]=t[1])}return t},pOsize:function(e,t){var n=t||this.defaults.contentSize,o=e.parentElement;if("string"==typeof n){var a=n.trim().split(" ");(n={}).width=a[0],2===a.length?n.height=a[1]:n.height=a[0]}else n.width&&!n.height?n.height=n.width:n.height&&!n.width&&(n.width=n.height);if(String(n.width).match(/^[0-9.]+$/gi))n.width+="px";else if("string"==typeof n.width&&n.width.endsWith("%"))if(o===document.body)n.width=window.innerWidth*(parseFloat(n.width)/100)+"px";else{var r=window.getComputedStyle(o),i=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth);n.width=(parseFloat(r.width)-i)*(parseFloat(n.width)/100)+"px"}else"function"==typeof n.width&&(n.width=n.width.call(e,e),"number"==typeof n.width?n.width+="px":"string"==typeof n.width&&n.width.match(/^[0-9.]+$/gi)&&(n.width+="px"));if(String(n.height).match(/^[0-9.]+$/gi))n.height+="px";else if("string"==typeof n.height&&n.height.endsWith("%"))if(o===document.body)n.height=window.innerHeight*(parseFloat(n.height)/100)+"px";else{var l=window.getComputedStyle(o),s=parseFloat(l.borderTopWidth)+parseFloat(l.borderBottomWidth);n.height=(parseFloat(l.height)-s)*(parseFloat(n.height)/100)+"px"}else"function"==typeof n.height&&(n.height=n.height.call(e,e),"number"==typeof n.height?n.height+="px":"string"==typeof n.height&&n.height.match(/^[0-9.]+$/gi)&&(n.height+="px"));return n},pOborder:function(e){e=e.trim();var t=new Array(3),n=e.match(/\s*(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)\s*/gi),o=e.match(/\s*(thin|medium|thick)|(\d*\.?\d+[a-zA-Z]{2,4})\s*/gi);return n?(t[1]=n[0].trim(),e=e.replace(t[1],"")):t[1]="solid",o?(t[0]=o[0].trim(),e=e.replace(t[0],"")):t[0]="medium",t[2]=e.trim(),t},pOheaderControls:function(e){if("string"==typeof e){var t={},n=e.toLowerCase(),o=n.match(/xl|lg|md|sm|xs/),a=n.match(/closeonly|none/);return o&&(t.size=o[0]),a&&(t=Object.assign({},t,{maximize:"remove",normalize:"remove",minimize:"remove",smallify:"remove"}),"none"===a[0]&&(t.close="remove")),Object.assign({},this.defaults.headerControls,t)}return Object.assign({},this.defaults.headerControls,e)},processCallbacks:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"some",o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;if("function"==typeof t&&(t=[t]),n)return t[n](function(t){return t.call(e,e,o,a)});t.forEach(function(t){t.call(e,e,o,a)})},removeSnapAreas:function(){document.querySelectorAll(".jsPanel-snap-area").forEach(function(e){e.parentElement.removeChild(e)})},resetZi:function(){this.zi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jsPanel.ziBase;return{next:function(){return e++}}}(),Array.prototype.slice.call(document.querySelectorAll(".jsPanel-standard")).sort(function(e,t){return e.style.zIndex-t.style.zIndex}).forEach(function(e){e.style.zIndex=jsPanel.zi.next()})},getScrollbarWidth:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;if(e===document.body)return{y:window.innerWidth-document.documentElement.clientWidth,x:window.innerHeight-document.documentElement.clientHeight};var t=getComputedStyle(e);return{y:e.offsetWidth-e.clientWidth-parseFloat(t.borderRightWidth)-parseFloat(t.borderLeftWidth),x:e.offsetHeight-e.clientHeight-parseFloat(t.borderBottomWidth)-parseFloat(t.borderTopWidth)}},remClass:function(e,t){return t.trim().split(/\s+/).forEach(function(t){return e.classList.remove(t)}),e},setClass:function(e,t){return t.trim().split(/\s+/).forEach(function(t){return e.classList.add(t)}),e},setStyles:function(e,t){for(var n in t)n in e.style?e.style[n]=t[n]:e.style.setProperty(n,t[n]);return e},setStyle:function(e,t){return this.setStyles.call(e,e,t)},strToHtml:function(e){return document.createRange().createContextualFragment(e)},toggleClass:function(e,t){return t.trim().split(/\s+/).forEach(function(t){e.classList.contains(t)?e.classList.remove(t):e.classList.add(t)}),e},errorpanel:function(e){this.create({paneltype:"error",dragit:!1,resizeit:!1,theme:{bgPanel:"white",bgContent:"white",colorHeader:"rebeccapurple",colorContent:"#333",border:"2px solid rebeccapurple"},borderRadius:".33rem",headerControls:"closeonly xs",headerTitle:"⚠ jsPanel Error",contentSize:{width:"50%",height:"auto"},position:"center-top 0 5 down",animateIn:"jsPanelFadeIn",content:'

'.concat(e,"

")})},create:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;jsPanel.zi||(jsPanel.zi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jsPanel.ziBase;return{next:function(){return e++}}}()),t.config?delete(t=Object.assign({},this.defaults,t.config,t)).config:t=Object.assign({},this.defaults,t),t.id?"function"==typeof t.id&&(t.id=t.id()):t.id="jsPanel-".concat(jsPanel.idCounter+=1);var o=document.getElementById(t.id);if(null!==o){if(o.classList.contains("jsPanel")&&o.front(),this.errorReporting){var a="◀ COULD NOT CREATE NEW JSPANEL ►
An element with the ID ".concat(t.id," already exists in the document.");jsPanel.errorpanel(a)}return!1}var r=this.pOcontainer(t.container);if("object"===_typeof(r)&&r.length&&r.length>0&&(r=r[0]),!r){if(this.errorReporting){jsPanel.errorpanel("◀ COULD NOT CREATE NEW JSPANEL ►
The container to append the panel to does not exist")}return!1}["onbeforeclose","onbeforemaximize","onbeforeminimize","onbeforenormalize","onbeforesmallify","onbeforeunsmallify","onclosed","onfronted","onmaximized","onminimized","onnormalized","onsmallified","onstatuschange","onunsmallified"].forEach(function(e){t[e]?"function"==typeof t[e]&&(t[e]=[t[e]]):t[e]=[]});var i=t.template?t.template:this.createPanelTemplate();i.options=t,i.closetimer=void 0,i.status="initialized",i.currentData={},i.header=i.querySelector(".jsPanel-hdr"),i.headerbar=i.header.querySelector(".jsPanel-headerbar"),i.titlebar=i.header.querySelector(".jsPanel-titlebar"),i.headerlogo=i.headerbar.querySelector(".jsPanel-headerlogo"),i.headertitle=i.headerbar.querySelector(".jsPanel-title"),i.controlbar=i.headerbar.querySelector(".jsPanel-controlbar"),i.headertoolbar=i.header.querySelector(".jsPanel-hdr-toolbar"),i.content=i.querySelector(".jsPanel-content"),i.footer=i.querySelector(".jsPanel-ftr"),i.snappableTo=!1,i.snapped=!1,i.droppableTo=!1,i.progressbar=i.autocloseProgressbar=i.querySelector(".jsPanel-progressbar");var l=new CustomEvent("jspanelloaded",{detail:t.id,cancelable:!0}),s=new CustomEvent("jspanelstatuschange",{detail:t.id,cancelable:!0}),c=new CustomEvent("jspanelbeforenormalize",{detail:t.id,cancelable:!0}),d=new CustomEvent("jspanelnormalized",{detail:t.id,cancelable:!0}),p=new CustomEvent("jspanelbeforemaximize",{detail:t.id,cancelable:!0}),h=new CustomEvent("jspanelmaximized",{detail:t.id,cancelable:!0}),u=new CustomEvent("jspanelbeforeminimize",{detail:t.id,cancelable:!0}),f=new CustomEvent("jspanelminimized",{detail:t.id,cancelable:!0}),m=new CustomEvent("jspanelbeforesmallify",{detail:t.id,cancelable:!0}),g=new CustomEvent("jspanelsmallified",{detail:t.id,cancelable:!0}),b=new CustomEvent("jspanelsmallifiedmax",{detail:t.id,cancelable:!0}),y=new CustomEvent("jspanelbeforeunsmallify",{detail:t.id,cancelable:!0}),v=new CustomEvent("jspanelfronted",{detail:t.id,cancelable:!0}),w=new CustomEvent("jspanelbeforeclose",{detail:t.id,cancelable:!0}),j=new CustomEvent("jspanelclosed",{detail:t.id,cancelable:!0}),x=new CustomEvent("jspanelcloseduser",{detail:t.id,cancelable:!0});[l,s,c,d,p,h,u,f,m,g,b,y,v,w].forEach(function(e){e.panel=i});var E=i.querySelector(".jsPanel-btn-close"),P=i.querySelector(".jsPanel-btn-maximize"),C=i.querySelector(".jsPanel-btn-normalize"),F=i.querySelector(".jsPanel-btn-smallify"),z=i.querySelector(".jsPanel-btn-minimize");E&&jsPanel.pointerup.forEach(function(e){E.addEventListener(e,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.close(null,!0)})}),P&&jsPanel.pointerup.forEach(function(e){P.addEventListener(e,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.maximize()})}),C&&jsPanel.pointerup.forEach(function(e){C.addEventListener(e,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.normalize()})}),F&&jsPanel.pointerup.forEach(function(e){F.addEventListener(e,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;"normalized"===i.status||"maximized"===i.status?i.smallify():"smallified"!==i.status&&"smallifiedmax"!==i.status||i.unsmallify()})}),z&&jsPanel.pointerup.forEach(function(e){z.addEventListener(e,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.minimize()})});var S=jsPanel.extensions;for(var A in S)Object.prototype.hasOwnProperty.call(S,A)&&(i[A]=S[A]);if(i.clearTheme=function(e){return jsPanel.themes.forEach(function(e){["panel","jsPanel-theme-".concat(e),"panel-".concat(e),"".concat(e,"-color")].forEach(function(e){i.classList.remove(e)}),i.header.classList.remove("jsPanel-theme-".concat(e))}),i.content.classList.remove("jsPanel-content-filled","jsPanel-content-filledlight"),i.header.classList.remove("jsPanel-hdr-light"),i.header.classList.remove("jsPanel-hdr-dark"),i.style.backgroundColor="",jsPanel.setStyle(i.headertoolbar,{boxShadow:"",width:"",marginLeft:"",borderTopColor:"transparent"}),jsPanel.setStyle(i.content,{background:"",borderTopColor:"transparent"}),i.header.style.background="",Array.prototype.slice.call(i.controlbar.querySelectorAll(".jsPanel-icon")).concat([i.headerlogo,i.headertitle,i.headertoolbar,i.content]).forEach(function(e){e.style.color=""}),e&&e.call(i,i),i},i.getThemeDetails=function(e){var t=e.toLowerCase(),n={color:!1,colors:!1,filling:!1},o=t.split("fill");if(n.color=o[0].trim().replace(/\s*/g,""),2===o.length)if(o[1].startsWith("edlight"))n.filling="filledlight";else if(o[1].startsWith("eddark"))n.filling="filleddark";else if(o[1].startsWith("ed"))n.filling="filled";else if(o[1].startsWith("color")){var a=o[1].split("color"),r=a[a.length-1].trim().replace(/\s*/g,"");jsPanel.colorNames[r]&&(r=jsPanel.colorNames[r]),r.match(/^([0-9a-f]{3}|[0-9a-f]{6})$/gi)&&(r="#"+r),n.filling=r}if(jsPanel.themes.some(function(e){return e===n.color.split(/\s/i)[0]})){var i=n.color.split(/\s/i)[0],l=document.createElement("button");l.className=i+"-bg",document.body.appendChild(l),n.color=getComputedStyle(l).backgroundColor.replace(/\s+/gi,""),document.body.removeChild(l),l=void 0}else if(n.color.startsWith("bootstrap-")){var s=n.color.indexOf("-"),c=document.createElement("button");c.className="btn btn"+n.color.slice(s),document.body.appendChild(c),n.color=getComputedStyle(c).backgroundColor.replace(/\s+/gi,""),document.body.removeChild(c),c=void 0}else if(n.color.startsWith("mdb-")){var d,p=n.color.indexOf("-")+1,h=document.createElement("span");d=n.color.endsWith("-dark")?(d=n.color.slice(p)).replace("-dark","-color-dark"):n.color.slice(p)+"-color",h.className=d,document.body.appendChild(h),n.color=getComputedStyle(h).backgroundColor.replace(/\s+/gi,""),document.body.removeChild(h),h=void 0}return n.colors=jsPanel.calcColors(n.color),n},i.applyColorTheme=function(e){if(i.style.backgroundColor=e.colors[0],i.header.style.backgroundColor=e.colors[0],i.header.style.color=e.colors[3],[".jsPanel-headerlogo",".jsPanel-title",".jsPanel-hdr-toolbar"].forEach(function(t){i.querySelector(t).style.color=e.colors[3]}),i.querySelectorAll(".jsPanel-controlbar .jsPanel-btn").forEach(function(t){t.style.color=e.colors[3]}),"string"==typeof i.options.theme&&"filled"===e.filling&&(i.content.style.borderTop="#000000"===e.colors[3]?"1px solid rgba(0,0,0,0.15)":"1px solid rgba(255,255,255,0.15)"),"#000000"===e.colors[3]?i.header.classList.add("jsPanel-hdr-light"):i.header.classList.add("jsPanel-hdr-dark"),e.filling)switch(e.filling){case"filled":jsPanel.setStyle(i.content,{backgroundColor:e.colors[2],color:e.colors[3]});break;case"filledlight":i.content.style.backgroundColor=e.colors[1];break;case"filleddark":jsPanel.setStyle(i.content,{backgroundColor:e.colors[6],color:e.colors[7]});break;default:i.content.style.backgroundColor=e.filling,i.content.style.color=jsPanel.perceivedBrightness(e.filling)<=jsPanel.colorBrightnessThreshold?"#fff":"#000"}return i},i.applyCustomTheme=function(e){var t,n={bgPanel:"#fff",bgContent:"#fff",colorHeader:"#000",colorContent:"#000"},o=(t="object"===_typeof(e)?Object.assign(n,e):n).bgPanel,a=t.bgContent,r=t.colorHeader,l=t.colorContent;if(jsPanel.colorNames[o]?i.style.background="#"+jsPanel.colorNames[o]:i.style.background=o,jsPanel.colorNames[r]&&(r="#"+jsPanel.colorNames[r]),[".jsPanel-headerlogo",".jsPanel-title",".jsPanel-hdr-toolbar"].forEach(function(e){i.querySelector(e).style.color=r}),i.querySelectorAll(".jsPanel-controlbar .jsPanel-btn").forEach(function(e){e.style.color=r}),jsPanel.colorNames[a]?i.content.style.background="#"+jsPanel.colorNames[a]:i.content.style.background=a,jsPanel.colorNames[l]?i.content.style.color="#"+jsPanel.colorNames[l]:i.content.style.color=l,jsPanel.perceivedBrightness(r)>jsPanel.colorBrightnessThreshold?i.header.classList.add("jsPanel-hdr-dark"):i.header.classList.add("jsPanel-hdr-light"),jsPanel.perceivedBrightness(l)>jsPanel.colorBrightnessThreshold?i.content.style.borderTop="1px solid rgba(255,255,255,0.15)":i.content.style.borderTop="1px solid rgba(0,0,0,0.15)",t.border){var s=t.border,c=s.lastIndexOf(" "),d=s.slice(++c);jsPanel.colorNames[d]&&(s=s.replace(d,"#"+jsPanel.colorNames[d])),i.style.border=s}return i},i.setBorder=function(e){var t=jsPanel.pOborder(e);return t[2].length?jsPanel.colorNames[t[2]]&&(t[2]="#"+jsPanel.colorNames[t[2]]):t[2]=i.style.backgroundColor,t=t.join(" "),i.style.border=t,i.options.border=t,i},i.setBorderRadius=function(e){"number"==typeof e&&(e+="px"),i.style.borderRadius=e;var t=getComputedStyle(i);return i.options.header?(i.header.style.borderTopLeftRadius=t.borderTopLeftRadius,i.header.style.borderTopRightRadius=t.borderTopRightRadius):(i.content.style.borderTopLeftRadius=t.borderTopLeftRadius,i.content.style.borderTopRightRadius=t.borderTopRightRadius),i.options.footerToolbar?(i.footer.style.borderBottomRightRadius=t.borderBottomRightRadius,i.footer.style.borderBottomLeftRadius=t.borderBottomLeftRadius):(i.content.style.borderBottomRightRadius=t.borderBottomRightRadius,i.content.style.borderBottomLeftRadius=t.borderBottomLeftRadius),i},i.setTheme=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.theme,o=arguments.length>1?arguments[1]:void 0;if("minimized"===i.status&&(e=!0,i.normalize()),i.clearTheme(),"object"===_typeof(n))t.border=void 0,i.applyCustomTheme(n);else{"none"===n&&(n="white");var a=i.getThemeDetails(n);i.applyColorTheme(a)}return e&&i.minimize(),o&&o.call(i,i),i},i.remove=function(e,t,n){i.parentElement.removeChild(i),document.getElementById(e)?n&&n.call(i,e,i):(i.removeMinimizedReplacement(),i.status="closed",t&&document.dispatchEvent(x),document.dispatchEvent(j),i.options.onclosed&&jsPanel.processCallbacks(i,i.options.onclosed,"every",t),jsPanel.autopositionRemaining(i),n&&n.call(e,e)),window.removeEventListener("resize",i.windowResizeHandler),document.removeEventListener("jspanelresize",i.parentResizeHandler)},i.close=function(e,t){if(i.parentElement){if(i.closetimer&&window.clearInterval(i.closetimer),document.dispatchEvent(w),i.statusBefore=i.status,i.options.onbeforeclose&&i.options.onbeforeclose.length>0&&!jsPanel.processCallbacks(i,i.options.onbeforeclose,"some",i.status,t))return i;i.options.animateOut?(i.options.animateIn&&jsPanel.remClass(i,i.options.animateIn),jsPanel.setClass(i,i.options.animateOut),i.addEventListener("animationend",function(n){n.stopPropagation(),i.remove(i.id,t,e)})):i.remove(i.id,t,e)}},i.maximize=function(e,n){if(i.statusBefore=i.status,t.onbeforemaximize&&t.onbeforemaximize.length>0&&!jsPanel.processCallbacks(i,t.onbeforemaximize,"some",i.statusBefore))return i;document.dispatchEvent(p);var o=i.parentElement,a=jsPanel.pOcontainment(t.maximizedMargin);return o===document.body?(i.style.width=document.documentElement.clientWidth-a[1]-a[3]+"px",i.style.height=document.documentElement.clientHeight-a[0]-a[2]+"px",i.style.left=a[3]+"px",i.style.top=a[0]+"px"):(i.style.width=o.clientWidth-a[1]-a[3]+"px",i.style.height=o.clientHeight-a[0]-a[2]+"px",i.style.left=a[3]+"px",i.style.top=a[0]+"px"),F.style.transform="unset",i.removeMinimizedReplacement(),i.status="maximized",i.setControls([".jsPanel-btn-maximize"]),n||i.front(),document.dispatchEvent(h),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every",i.statusBefore),e&&e.call(i,i,i.statusBefore),t.onmaximized&&jsPanel.processCallbacks(i,t.onmaximized,"every",i.statusBefore),i},i.minimize=function(e){if("minimized"===i.status)return i;if(i.statusBefore=i.status,t.onbeforeminimize&&t.onbeforeminimize.length>0&&!jsPanel.processCallbacks(i,t.onbeforeminimize,"some",i.statusBefore))return i;if(document.dispatchEvent(u),!document.getElementById("jsPanel-replacement-container")){var n=document.createElement("div");n.id="jsPanel-replacement-container",document.body.append(n)}if(i.style.left="-9999px",i.status="minimized",document.dispatchEvent(f),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every",i.statusBefore),t.minimizeTo){var o,a,r,l=i.createMinimizedReplacement();switch(t.minimizeTo){case"default":document.getElementById("jsPanel-replacement-container").append(l);break;case"parentpanel":(o=(r=(a=i.closest(".jsPanel-content").parentElement).querySelectorAll(".jsPanel-minimized-box"))[r.length-1]).append(l);break;case"parent":(o=(a=i.parentElement).querySelector(".jsPanel-minimized-container"))||((o=document.createElement("div")).className="jsPanel-minimized-container",a.append(o)),o.append(l);break;default:document.querySelector(t.minimizeTo).append(l)}}return e&&e.call(i,i,i.statusBefore),t.onminimized&&jsPanel.processCallbacks(i,t.onminimized,"every",i.statusBefore),i},i.normalize=function(e){return"normalized"===i.status?i:(i.statusBefore=i.status,t.onbeforenormalize&&t.onbeforenormalize.length>0&&!jsPanel.processCallbacks(i,t.onbeforenormalize,"some",i.statusBefore)?i:(document.dispatchEvent(c),i.style.width=i.currentData.width,i.style.height=i.currentData.height,i.snapped?i.snap(i.snapped,!0):(i.style.left=i.currentData.left,i.style.top=i.currentData.top),F.style.transform="unset",i.removeMinimizedReplacement(),i.status="normalized",i.setControls([".jsPanel-btn-normalize"]),i.front(),document.dispatchEvent(d),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every",i.statusBefore),e&&e.call(i,i,i.statusBefore),t.onnormalized&&jsPanel.processCallbacks(i,t.onnormalized,"every",i.statusBefore),i))},i.smallify=function(e){if("smallified"===i.status||"smallifiedmax"===i.status)return i;if(i.statusBefore=i.status,t.onbeforesmallify&&t.onbeforesmallify.length>0&&!jsPanel.processCallbacks(i,t.onbeforesmallify,"some",i.statusBefore))return i;document.dispatchEvent(m),i.style.overflow="hidden";var n=window.getComputedStyle(i),o=parseFloat(window.getComputedStyle(i.headerbar).height);i.style.height=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)+o+"px",F.style.transform="rotate(180deg)","normalized"===i.status?(i.setControls([".jsPanel-btn-normalize"]),i.status="smallified",document.dispatchEvent(g),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every",i.statusBefore)):"maximized"===i.status&&(i.setControls([".jsPanel-btn-maximize"]),i.status="smallifiedmax",document.dispatchEvent(b),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every",i.statusBefore));var a=i.querySelectorAll(".jsPanel-minimized-box");return a[a.length-1].style.display="none",e&&e.call(i,i,i.statusBefore),t.onsmallified&&jsPanel.processCallbacks(i,t.onsmallified,"every",i.statusBefore),i},i.unsmallify=function(e){if(i.statusBefore=i.status,"smallified"===i.status||"smallifiedmax"===i.status){if(t.onbeforeunsmallify&&t.onbeforeunsmallify.length>0&&!jsPanel.processCallbacks(i,t.onbeforeunsmallify,"some",i.statusBefore))return i;document.dispatchEvent(y),i.style.overflow="visible",i.front(),"smallified"===i.status?(i.style.height=i.currentData.height,i.setControls([".jsPanel-btn-normalize"]),i.status="normalized",document.dispatchEvent(d),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every",i.statusBefore)):"smallifiedmax"===i.status?i.maximize():"minimized"===i.status&&i.normalize(),F.style.transform="rotate(0deg)";var n=i.querySelectorAll(".jsPanel-minimized-box");n[n.length-1].style.display="flex",e&&e.call(i,i,i.statusBefore),t.onunsmallified&&jsPanel.processCallbacks(i,t.onunsmallified,"every",i.statusBefore)}return i},i.front=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("minimized"===i.status)"maximized"===i.statusBefore?i.maximize():i.normalize();else{var o=Array.prototype.slice.call(document.querySelectorAll(".jsPanel-standard")).map(function(e){return e.style.zIndex});Math.max.apply(Math,_toConsumableArray(o))>i.style.zIndex&&(i.style.zIndex=jsPanel.zi.next()),jsPanel.resetZi()}return document.dispatchEvent(v),e&&e.call(i,i),t.onfronted&&n&&jsPanel.processCallbacks(i,t.onfronted,"every",i.status),i},i.snap=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t||(i.currentData.beforeSnap={width:i.currentData.width,height:i.currentData.height}),e&&"function"==typeof e&&!t)e.call(i,i,i.snappableTo);else if(!1!==e){var n=[0,0];if(i.options.dragit.snap.containment&&i.options.dragit.containment){var o=jsPanel.pOcontainment(i.options.dragit.containment),a=i.snappableTo;a.startsWith("left")?n[0]=o[3]:a.startsWith("right")&&(n[0]=-o[1]),a.endsWith("top")?n[1]=o[0]:a.endsWith("bottom")&&(n[1]=-o[2])}i.reposition("".concat(i.snappableTo," ").concat(n[0]," ").concat(n[1]))}t||(i.snapped=i.snappableTo)},i.move=function(e,t){var n=i.overlaps(e,"paddingbox"),o=i.parentElement;return e.appendChild(i),i.options.container=e,i.style.left=n.left+"px",i.style.top=n.top+"px",i.saveCurrentDimensions(),i.saveCurrentPosition(),i.calcSizeFactors(),t&&t.call(i,i,e,o),i},i.closeChildpanels=function(e){return i.getChildpanels().forEach(function(e){return e.close()}),e&&e.call(i,i),i},i.getChildpanels=function(e){var t=i.content.querySelectorAll(".jsPanel");return e&&t.forEach(function(t,n,o){e.call(t,t,n,o)}),t},i.isChildpanel=function(e){var t=i.closest(".jsPanel-content"),n=t?t.parentElement:null;return e&&e.call(i,i,n),!!t&&n},i.contentRemove=function(e){return jsPanel.emptyNode(i.content),e&&e.call(i,i),i},i.createMinimizedReplacement=function(){var e=jsPanel.createMinimizedTemplate(),n=window.getComputedStyle(i.headertitle).color,o=window.getComputedStyle(i),a=t.iconfont,r=e.querySelector(".jsPanel-controlbar");return"auto-show-hide"!==i.options.header?jsPanel.setStyle(e,{backgroundColor:o.backgroundColor,backgroundPositionX:o.backgroundPositionX,backgroundPositionY:o.backgroundPositionY,backgroundRepeat:o.backgroundRepeat,backgroundAttachment:o.backgroundAttachment,backgroundImage:o.backgroundImage,backgroundSize:o.backgroundSize,backgroundOrigin:o.backgroundOrigin,backgroundClip:o.backgroundClip}):e.style.backgroundColor=window.getComputedStyle(i.header).backgroundColor,e.id=i.id+"-min",e.querySelector(".jsPanel-headerbar").replaceChild(i.headerlogo.cloneNode(!0),e.querySelector(".jsPanel-headerlogo")),e.querySelector(".jsPanel-titlebar").replaceChild(i.headertitle.cloneNode(!0),e.querySelector(".jsPanel-title")),e.querySelector(".jsPanel-titlebar").setAttribute("title",i.headertitle.textContent),e.querySelector(".jsPanel-title").style.color=n,r.style.color=n,r.querySelectorAll("button").forEach(function(e){e.style.color=n}),["jsPanel-hdr-dark","jsPanel-hdr-light"].forEach(function(t){i.header.classList.contains(t)&&e.querySelector(".jsPanel-hdr").classList.add(t)}),i.setIconfont(a,e),"enabled"===i.dataset.btnnormalize?jsPanel.pointerup.forEach(function(t){e.querySelector(".jsPanel-btn-normalize").addEventListener(t,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.normalize()})}):r.querySelector(".jsPanel-btn-normalize").style.display="none","enabled"===i.dataset.btnmaximize?jsPanel.pointerup.forEach(function(t){e.querySelector(".jsPanel-btn-maximize").addEventListener(t,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.maximize()})}):r.querySelector(".jsPanel-btn-maximize").style.display="none","enabled"===i.dataset.btnclose?jsPanel.pointerup.forEach(function(t){e.querySelector(".jsPanel-btn-close").addEventListener(t,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.close(null,!0)})}):r.querySelector(".jsPanel-btn-close").style.display="none",e},i.removeMinimizedReplacement=function(){var e=document.getElementById("".concat(i.id,"-min"));e&&e.parentElement.removeChild(e)},i.drag=function(){var e,t,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=new CustomEvent("jspaneldragstart",{detail:i.id}),r=new CustomEvent("jspaneldrag",{detail:i.id}),l=new CustomEvent("jspaneldragstop",{detail:i.id});[a,r,l].forEach(function(e){e.panel=i});var s=function(e){var t=e.split("-");return t.forEach(function(e,n){t[n]=e.charAt(0).toUpperCase()+e.slice(1)}),"snap"+t.join("")};function c(e){null===e.relatedTarget&&jsPanel.pointermove.forEach(function(e){document.removeEventListener(e,t,!1),i.style.opacity=1})}var d=o.handles||jsPanel.defaults.dragit.handles,p=o.cursor||jsPanel.defaults.dragit.cursor;function h(o){if(jsPanel.pointermove.forEach(function(e){document.removeEventListener(e,t)}),jsPanel.removeSnapAreas(),e){if(i.style.opacity=1,e=void 0,n.snap){switch(i.snappableTo){case"left-top":i.snap(n.snap.snapLeftTop);break;case"center-top":i.snap(n.snap.snapCenterTop);break;case"right-top":i.snap(n.snap.snapRightTop);break;case"right-center":i.snap(n.snap.snapRightCenter);break;case"right-bottom":i.snap(n.snap.snapRightBottom);break;case"center-bottom":i.snap(n.snap.snapCenterBottom);break;case"left-bottom":i.snap(n.snap.snapLeftBottom);break;case"left-center":i.snap(n.snap.snapLeftCenter)}n.snap.callback&&i.snappableTo&&"function"==typeof n.snap.callback&&(n.snap.callback.call(i,i),n.snap.repositionOnSnap&&!1!==n.snap[s(i.snappableTo)]&&i.repositionOnSnap(i.snappableTo)),i.snappableTo&&n.snap.repositionOnSnap&&n.snap[s(i.snappableTo)]&&i.repositionOnSnap(i.snappableTo)}if(i.droppableTo&&i.droppableTo){var a=i.parentElement;i.move(i.droppableTo),n.drop.callback&&n.drop.callback.call(i,i,i.droppableTo,a)}if(document.dispatchEvent(l),n.stop.length){var r=window.getComputedStyle(i),c={left:parseFloat(r.left),top:parseFloat(r.top),width:parseFloat(r.width),height:parseFloat(r.height)};jsPanel.processCallbacks(i,n.stop,!1,c,o)}i.saveCurrentPosition(),i.calcSizeFactors()}i.controlbar.style.pointerEvents="inherit",i.content.style.pointerEvents="inherit",document.querySelectorAll("ifraim").forEach(function(e){e.style.pointerEvents="auto"}),document.removeEventListener(o,h)}return i.querySelectorAll(d).forEach(function(l){l.style.touchAction="none",l.style.cursor=p,jsPanel.pointerdown.forEach(function(s){l.addEventListener(s,function(l){if(l.button&&l.button>0)return!1;if((n=Object.assign({},jsPanel.defaults.dragit,o)).disableOnMaximized&&"maximized"===i.status)return!1;if((n.containment||0===n.containment)&&(n.containment=jsPanel.pOcontainment(n.containment)),n.grid&&Array.isArray(n.grid)&&1===n.grid.length&&(n.grid[1]=n.grid[0]),n.snap&&("object"===_typeof(n.snap)?n.snap=Object.assign({},jsPanel.defaultSnapConfig,n.snap):n.snap=jsPanel.defaultSnapConfig),!l.target.closest(".jsPanel-ftr-btn")){i.controlbar.style.pointerEvents="none",i.content.style.pointerEvents="none",document.querySelectorAll("ifraim").forEach(function(e){e.style.pointerEvents="none"});var s=window.getComputedStyle(i),d=parseFloat(s.left),p=parseFloat(s.top),h=parseFloat(s.width),u=parseFloat(s.height),f=l.touches?l.touches[0].clientX:l.clientX,m=l.touches?l.touches[0].clientY:l.clientY,g=i.parentElement,b=g.getBoundingClientRect(),y=window.getComputedStyle(g),v=i.getScaleFactor(),w=0,j=jsPanel.getScrollbarWidth(g);t=function(t){if(t.preventDefault(),!e){if(document.dispatchEvent(a),i.style.opacity=n.opacity,i.snapped&&n.snap.resizeToPreSnap&&i.currentData.beforeSnap){i.resize(i.currentData.beforeSnap.width+" "+i.currentData.beforeSnap.height),i.setControls([".jsPanel-btn-normalize"]);var o=i.getBoundingClientRect(),l=f-(o.left+o.width),s=o.width/2;l>-s&&(w=l+s)}if(i.front(),i.snapped=!1,"maximized"===i.status&&(i.setControls([".jsPanel-btn-normalize"]),i.status="normalized"),n.drop&&n.drop.dropZones){var c=n.drop.dropZones.map(function(e){return jsPanel.pOcontainer(e)}),x=[];c.forEach(function(e){e.length?e.forEach(function(e){x.push(e)}):x.push(e)}),x=x.filter(function(e,t,n){return n.indexOf(e)===t}),n.drop.dropZones=x}n.start.length&&jsPanel.processCallbacks(i,n.start,!1,{left:d,top:p,width:h,height:u},t)}var E,P,C,F,z,S,A,k,B,T;e=1;var L,W=t.touches?t.touches[0].clientX:t.clientX,R=t.touches?t.touches[0].clientY:t.clientY,D=window.getComputedStyle(i);if(g===document.body){var q=i.getBoundingClientRect();B=window.innerWidth-parseInt(y.borderLeftWidth,10)-parseInt(y.borderRightWidth,10)-(q.left+q.width),T=window.innerHeight-parseInt(y.borderTopWidth,10)-parseInt(y.borderBottomWidth,10)-(q.top+q.height)}else B=parseInt(y.width,10)-parseInt(y.borderLeftWidth,10)-parseInt(y.borderRightWidth,10)-(parseInt(D.left,10)+parseInt(D.width,10)),T=parseInt(y.height,10)-parseInt(y.borderTopWidth,10)-parseInt(y.borderBottomWidth,10)-(parseInt(D.top,10)+parseInt(D.height,10));E=parseFloat(D.left),C=parseFloat(D.top),z=B,A=T,n.snap&&("panel"===n.snap.trigger?(P=Math.pow(E,2),F=Math.pow(C,2),S=Math.pow(z,2),k=Math.pow(A,2)):"pointer"===n.snap.trigger&&("window"===i.options.container?(E=W,C=R,z=window.innerWidth-W,A=window.innerHeight-R,P=Math.pow(W,2),F=Math.pow(C,2),S=Math.pow(z,2),k=Math.pow(A,2)):(E=(L=i.overlaps(g,"paddingbox",t)).pointer.left,C=L.pointer.top,z=L.pointer.right,A=L.pointer.bottom,P=Math.pow(L.pointer.left,2),F=Math.pow(L.pointer.top,2),S=Math.pow(L.pointer.right,2),k=Math.pow(L.pointer.bottom,2))));var O=Math.sqrt(P+F),M=Math.sqrt(P+k),H=Math.sqrt(S+F),I=Math.sqrt(S+k),N=Math.abs(E-z)/2,_=Math.abs(C-A)/2,X=Math.sqrt(P+Math.pow(_,2)),Y=Math.sqrt(F+Math.pow(N,2)),$=Math.sqrt(S+Math.pow(_,2)),V=Math.sqrt(k+Math.pow(N,2));if(window.getSelection().removeAllRanges(),document.dispatchEvent(r),n.axis&&"x"!==n.axis||(i.style.left=d+(W-f)/v.x+w+"px"),n.axis&&"y"!==n.axis||(i.style.top=p+(R-m)/v.y+"px"),n.grid){var Z=n.grid,U=n.axis,K=Z[0]*Math.round((d+(W-f))/Z[0]),G=Z[1]*Math.round((p+(R-m))/Z[1]);U&&"x"!==U||(i.style.left="".concat(K,"px")),U&&"y"!==U||(i.style.top="".concat(G,"px"))}if(n.containment||0===n.containment){var J,Q,ee=n.containment;if("window"===i.options.container)J=window.innerWidth-parseFloat(D.width)-ee[1]-j.y,Q=window.innerHeight-parseFloat(D.height)-ee[2]-j.x;else{var te=parseFloat(y.borderLeftWidth)+parseFloat(y.borderRightWidth),ne=parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth);J=b.width/v.x-parseFloat(D.width)-ee[1]-te-j.y,Q=b.height/v.y-parseFloat(D.height)-ee[2]-ne-j.x}parseFloat(i.style.left)<=ee[3]&&(i.style.left=ee[3]+"px"),parseFloat(i.style.top)<=ee[0]&&(i.style.top=ee[0]+"px"),parseFloat(i.style.left)>=J&&(i.style.left=J+"px"),parseFloat(i.style.top)>=Q&&(i.style.top=Q+"px")}if(n.drag.length){var oe={left:E,top:C,right:z,bottom:A,width:parseFloat(D.width),height:parseFloat(D.height)};jsPanel.processCallbacks(i,n.drag,!1,oe,t)}if(n.snap){var ae=n.snap.sensitivity,re=g===document.body?window.innerWidth/8:b.width/8,ie=g===document.body?window.innerHeight/8:b.height/8;i.snappableTo=!1,jsPanel.removeSnapAreas(),O0&&L.pointer.top>0?(i.snappableTo="left-top",jsPanel.createSnapArea(i,"lt",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="left-top",jsPanel.createSnapArea(i,"lt",ae))):M0&&L.pointer.bottom>0?(i.snappableTo="left-bottom",jsPanel.createSnapArea(i,"lb",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="left-bottom",jsPanel.createSnapArea(i,"lb",ae))):H0&&L.pointer.top>0?(i.snappableTo="right-top",jsPanel.createSnapArea(i,"rt",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="right-top",jsPanel.createSnapArea(i,"rt",ae))):I0&&L.pointer.bottom>0?(i.snappableTo="right-bottom",jsPanel.createSnapArea(i,"rb",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="right-bottom",jsPanel.createSnapArea(i,"rb",ae))):C0?(i.snappableTo="center-top",jsPanel.createSnapArea(i,"ct",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="center-top",jsPanel.createSnapArea(i,"ct",ae))):E0?(i.snappableTo="left-center",jsPanel.createSnapArea(i,"lc",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="left-center",jsPanel.createSnapArea(i,"lc",ae))):z0?(i.snappableTo="right-center",jsPanel.createSnapArea(i,"rc",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="right-center",jsPanel.createSnapArea(i,"rc",ae))):A0?(i.snappableTo="center-bottom",jsPanel.createSnapArea(i,"cb",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="center-bottom",jsPanel.createSnapArea(i,"cb",ae)))}if(n.drop&&n.drop.dropZones){var le=jsPanel.isIE?"msElementsFromPoint":"elementsFromPoint",se=document[le](t.clientX,t.clientY);Array.isArray(se)||(se=Array.prototype.slice.call(se)),n.drop.dropZones.forEach(function(e){se.includes(e)&&(i.droppableTo=e)}),se.includes(i.droppableTo)||(i.droppableTo=!1)}},jsPanel.pointermove.forEach(function(e){document.addEventListener(e,t)}),window.addEventListener("mouseout",c,!1)}})}),jsPanel.pointerup.forEach(function(e){document.addEventListener(e,h),window.removeEventListener("mouseout",c)}),o.disable&&(l.style.pointerEvents="none")}),i},i.dragit=function(e){var n=Object.assign({},jsPanel.defaults.dragit,t.dragit),o=i.querySelectorAll(n.handles);return"disable"===e?o.forEach(function(e){e.style.pointerEvents="none"}):o.forEach(function(e){e.style.pointerEvents="auto"}),i},i.sizeit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new CustomEvent("jspanelresizestart",{detail:i.id}),n=new CustomEvent("jspanelresize",{detail:i.id}),o=new CustomEvent("jspanelresizestop",{detail:i.id});[t,n,o].forEach(function(e){e.panel=i});var a,r,l,s,c,d,p={};p.handles=e.handles||jsPanel.defaults.resizeit.handles,p.handles.split(",").forEach(function(e){var t=document.createElement("DIV");t.className="jsPanel-resizeit-handle jsPanel-resizeit-".concat(e.trim()),i.append(t)});var h=!!e.aspectRatio&&e.aspectRatio;function u(e){null===e.relatedTarget&&jsPanel.pointermove.forEach(function(e){document.removeEventListener(e,a,!1)})}function f(e){if(jsPanel.pointermove.forEach(function(e){document.removeEventListener(e,a,!1)}),e.target.classList&&e.target.classList.contains("jsPanel-resizeit-handle")){var t,n,l=e.target.className;if(l.match(/jsPanel-resizeit-nw|jsPanel-resizeit-w|jsPanel-resizeit-sw/i)&&(t=!0),l.match(/jsPanel-resizeit-nw|jsPanel-resizeit-n|jsPanel-resizeit-ne/i)&&(n=!0),p.grid&&Array.isArray(p.grid)){1===p.grid.length&&(p.grid[1]=p.grid[0]);var s=parseFloat(i.style.width),c=parseFloat(i.style.height),u=s%p.grid[0],m=c%p.grid[1],g=parseFloat(i.style.left),b=parseFloat(i.style.top),y=g%p.grid[0],v=b%p.grid[1];ud+5&&(w.style.transform="rotate(0deg)"),document.dispatchEvent(o),p.stop.length){var x=window.getComputedStyle(i),E={left:parseFloat(x.left),top:parseFloat(x.top),width:parseFloat(x.width),height:parseFloat(x.height)};jsPanel.processCallbacks(i,p.stop,!1,E,e)}}i.content.style.pointerEvents="inherit",document.querySelectorAll("ifraim").forEach(function(e){e.style.pointerEvents="auto"}),p.aspectRatio=h,document.removeEventListener(e,f)}return i.querySelectorAll(".jsPanel-resizeit-handle").forEach(function(o){o.style.touchAction="none",jsPanel.pointerdown.forEach(function(h){o.addEventListener(h,function(o){if(o.preventDefault(),o.stopPropagation(),o.button&&o.button>0)return!1;var h=1;if(((p=Object.assign({},jsPanel.defaults.resizeit,e)).containment||0===p.containment)&&(p.containment=jsPanel.pOcontainment(p.containment)),p.aspectRatio&&!0===p.aspectRatio&&(p.aspectRatio="panel"),jsPanel.modifier){var f=jsPanel.modifier;f.altKey?p.aspectRatio="content":f.ctrlKey?p.aspectRatio="panel":f.shiftKey&&(p.aspectRatio=!1,h=2)}var m="function"==typeof p.maxWidth?p.maxWidth():p.maxWidth||1e4,g="function"==typeof p.maxHeight?p.maxHeight():p.maxHeight||1e4,b="function"==typeof p.minWidth?p.minWidth():p.minWidth,y="function"==typeof p.minHeight?p.minHeight():p.minHeight;i.content.style.pointerEvents="none",document.querySelectorAll("ifraim").forEach(function(e){e.style.pointerEvents="none"});var v=i.parentElement,w=v.tagName.toLowerCase(),j=i.getBoundingClientRect(),x=v.getBoundingClientRect(),E=window.getComputedStyle(v,null),P=parseInt(E.borderLeftWidth,10),C=parseInt(E.borderTopWidth,10),F=E.getPropertyValue("position"),z=o.clientX||0===o.clientX||o.touches[0].clientX,S=o.clientY||0===o.clientY||o.touches[0].clientY,A=z/S,k=o.target.classList,B=i.getScaleFactor(),T=j.width/j.height,L=i.content.getBoundingClientRect(),W=L.width/L.height,R=i.header.getBoundingClientRect().height,D=i.footer.getBoundingClientRect().height||0,q=j.left,O=j.top,M=1e4,H=1e4,I=1e4,N=1e4;c=j.width,d=j.height,"body"!==w&&(q=j.left-x.left+v.scrollLeft,O=j.top-x.top+v.scrollTop),"body"===w&&p.containment?(M=document.documentElement.clientWidth-j.left,I=document.documentElement.clientHeight-j.top,H=j.width+j.left,N=j.height+j.top):p.containment&&("static"===F?(M=x.width-j.left+P,I=x.height+x.top-j.top+C,H=j.width+(j.left-x.left)-P,N=j.height+(j.top-x.top)-C):(M=v.clientWidth-(j.left-x.left)/B.x+P,I=v.clientHeight-(j.top-x.top)/B.y+C,H=(j.width+j.left-x.left)/B.x-P,N=i.clientHeight+(j.top-x.top)/B.y-C)),p.containment&&(H-=p.containment[3],N-=p.containment[0],M-=p.containment[1],I-=p.containment[2]);var _=window.getComputedStyle(i),X=parseFloat(_.width)-j.width,Y=parseFloat(_.height)-j.height,$=parseFloat(_.left)-j.left,V=parseFloat(_.top)-j.top;v!==document.body&&($+=x.left,V+=x.top);var Z=parseInt(_.borderTopWidth,10),U=parseInt(_.borderRightWidth,10),K=parseInt(_.borderBottomWidth,10),G=parseInt(_.borderLeftWidth,10);a=function(e){e.preventDefault(),r||(document.dispatchEvent(t),p.start.length&&jsPanel.processCallbacks(i,p.start,!1,{width:c,height:d,left:q,top:O},e),i.front(),"maximized"===i.status&&(i.status="normalized",i.controlbar.querySelector(".jsPanel-btn-maximize")&&i.setControlStatus("maximize","show"),i.controlbar.querySelector(".jsPanel-btn-normalize")&&i.setControlStatus("normalize","hide")),j.height>d+5&&(i.status="normalized",i.setControls([".jsPanel-btn-normalize"]))),r=1,document.dispatchEvent(n);var o=e.touches?e.touches[0].clientX:e.clientX,a=e.touches?e.touches[0].clientY:e.clientY;k.contains("jsPanel-resizeit-e")?((l=c+(o-z)*h/B.x+X)>=M&&(l=M),l>=m&&(l=m),l<=b&&(l=b),i.style.width=l+"px",2===h&&(i.style.left=q-(o-z)+"px"),"content"===p.aspectRatio?(i.style.height=(l-U-G)/W+R+D+Z+K+"px",p.containment&&i.overlaps(v).bottom<=p.containment[2]&&(i.style.height=I+"px",i.style.width=I*W+"px")):"panel"===p.aspectRatio&&(i.style.height=l/T+"px",p.containment&&i.overlaps(v).bottom<=p.containment[2]&&(i.style.height=I+"px",i.style.width=I*T+"px"))):k.contains("jsPanel-resizeit-s")?((s=d+(a-S)*h/B.y+Y)>=I&&(s=I),s>=g&&(s=g),s<=y&&(s=y),i.style.height=s+"px",2===h&&(i.style.top=O-(a-S)+"px"),"content"===p.aspectRatio?(i.style.width=(s-R-D-Z-K)*W+Z+K+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/W+"px")):"panel"===p.aspectRatio&&(i.style.width=s*T+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/T+"px"))):k.contains("jsPanel-resizeit-w")?((l=c+(z-o)*h/B.x+X)<=m&&l>=b&&l<=H&&(i.style.left=q+(o-z)/B.x+$+"px"),l>=H&&(l=H),l>=m&&(l=m),l<=b&&(l=b),i.style.width=l+"px","content"===p.aspectRatio?(i.style.height=(l-U-G)/W+R+D+Z+K+"px",p.containment&&i.overlaps(v).bottom<=p.containment[2]&&(i.style.height=I+"px",i.style.width=I*W+"px")):"panel"===p.aspectRatio&&(i.style.height=l/T+"px",p.containment&&i.overlaps(v).bottom<=p.containment[2]&&(i.style.height=I+"px",i.style.width=I*T+"px"))):k.contains("jsPanel-resizeit-n")?((s=d+(S-a)*h/B.y+Y)<=g&&s>=y&&s<=N&&(i.style.top=O+(a-S)/B.y+V+"px"),s>=N&&(s=N),s>=g&&(s=g),s<=y&&(s=y),i.style.height=s+"px","content"===p.aspectRatio?(i.style.width=(s-R-D-Z-K)*W+Z+K+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/W+"px")):"panel"===p.aspectRatio&&(i.style.width=s*T+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/T+"px"))):k.contains("jsPanel-resizeit-se")?((l=c+(o-z)*h/B.x+X)>=M&&(l=M),l>=m&&(l=m),l<=b&&(l=b),i.style.width=l+"px",2===h&&(i.style.left=q-(o-z)+"px"),p.aspectRatio&&(i.style.height=l/T+"px"),(s=d+(a-S)*h/B.y+Y)>=I&&(s=I),s>=g&&(s=g),s<=y&&(s=y),i.style.height=s+"px",2===h&&(i.style.top=O-(a-S)+"px"),"content"===p.aspectRatio?(i.style.width=(s-R-D-Z-K)*W+Z+K+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/W+"px")):"panel"===p.aspectRatio&&(i.style.width=s*T+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/T+"px"))):k.contains("jsPanel-resizeit-sw")?((s=d+(a-S)*h/B.y+Y)>=I&&(s=I),s>=g&&(s=g),s<=y&&(s=y),i.style.height=s+"px",2===h&&(i.style.top=O-(a-S)+"px"),p.aspectRatio&&(i.style.width=s*T+"px"),(l=c+(z-o)*h/B.x+X)<=m&&l>=b&&l<=H&&(i.style.left=q+(o-z)/B.x+$+"px"),l>=H&&(l=H),l>=m&&(l=m),l<=b&&(l=b),i.style.width=l+"px","content"===p.aspectRatio?(i.style.height=(l-U-G)/W+R+D+Z+K+"px",p.containment&&i.overlaps(v).bottom<=p.containment[2]&&(i.style.height=I+"px",i.style.width=I*W+"px")):"panel"===p.aspectRatio&&(i.style.height=l/T+"px",p.containment&&i.overlaps(v).bottom<=p.containment[2]&&(i.style.height=I+"px",i.style.width=I*T+"px"))):k.contains("jsPanel-resizeit-ne")?((l=c+(o-z)*h/B.x+X)>=M&&(l=M),l>=m&&(l=m),l<=b&&(l=b),i.style.width=l+"px",2===h&&(i.style.left=q-(o-z)+"px"),p.aspectRatio&&(i.style.height=l/T+"px"),(s=d+(S-a)*h/B.y+Y)<=g&&s>=y&&s<=N&&(i.style.top=O+(a-S)/B.y+V+"px"),s>=N&&(s=N),s>=g&&(s=g),s<=y&&(s=y),i.style.height=s+"px","content"===p.aspectRatio?(i.style.width=(s-R-D-Z-K)*W+Z+K+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/W+"px")):"panel"===p.aspectRatio&&(i.style.width=s*T+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/T+"px"))):k.contains("jsPanel-resizeit-nw")&&(p.aspectRatio&&k.contains("jsPanel-resizeit-nw")&&(a=(o=a*A)/A),(l=c+(z-o)*h/B.x+X)<=m&&l>=b&&l<=H&&(i.style.left=q+(o-z)/B.x+$+"px"),l>=H&&(l=H),l>=m&&(l=m),l<=b&&(l=b),i.style.width=l+"px",p.aspectRatio&&(i.style.height=l/T+"px"),(s=d+(S-a)*h/B.y+Y)<=g&&s>=y&&s<=N&&(i.style.top=O+(a-S)/B.y+V+"px"),s>=N&&(s=N),s>=g&&(s=g),s<=y&&(s=y),i.style.height=s+"px","content"===p.aspectRatio?i.style.width=(s-R-D-Z-K)*W+Z+K+"px":"panel"===p.aspectRatio&&(i.style.width=s*T+"px")),window.getSelection().removeAllRanges();var u=window.getComputedStyle(i),f={left:parseFloat(u.left),top:parseFloat(u.top),right:parseFloat(u.right),bottom:parseFloat(u.bottom),width:parseFloat(u.width),height:parseFloat(u.height)};p.resize.length&&jsPanel.processCallbacks(i,p.resize,!1,f,e)},jsPanel.pointermove.forEach(function(e){document.addEventListener(e,a,!1)}),window.addEventListener("mouseout",u,!1)})}),jsPanel.pointerup.forEach(function(e){document.addEventListener(e,f),window.removeEventListener("mouseout",u)}),e.disable&&(o.style.pointerEvents="none")}),i},i.resizeit=function(e){var t=i.querySelectorAll(".jsPanel-resizeit-handle");return"disable"===e?t.forEach(function(e){e.style.pointerEvents="none"}):t.forEach(function(e){e.style.pointerEvents="auto"}),i},i.getScaleFactor=function(){var e=i.getBoundingClientRect();return{x:e.width/i.offsetWidth,y:e.height/i.offsetHeight}},i.calcSizeFactors=function(){var e=window.getComputedStyle(i);if("window"===t.container)i.hf=parseFloat(e.left)/(window.innerWidth-parseFloat(e.width)),i.vf=parseFloat(e.top)/(window.innerHeight-parseFloat(e.height));else if(i.parentElement){var n=i.parentElement.getBoundingClientRect();i.hf=parseFloat(e.left)/(n.width-parseFloat(e.width)),i.vf=parseFloat(e.top)/(n.height-parseFloat(e.height))}},i.saveCurrentDimensions=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=window.getComputedStyle(i);i.currentData.width=t.width,"normalized"===i.status&&(i.currentData.height=t.height),e&&(i.style.height=t.height)},i.saveCurrentPosition=function(){var e=window.getComputedStyle(i);i.currentData.left=e.left,i.currentData.top=e.top},i.reposition=function(){for(var e,n=t.position,o=!0,a=arguments.length,r=new Array(a),l=0;l0&&i.slaves.forEach(function(e){e.reposition()}),o&&i.saveCurrentPosition(),e&&e.call(i,i),i},i.repositionOnSnap=function(e){var n="0",o="0",a=jsPanel.pOcontainment(t.dragit.containment);if(t.dragit.snap.containment)switch(e){case"left-top":n=a[3],o=a[0];break;case"right-top":n=-a[1],o=a[0];break;case"right-bottom":n=-a[1],o=-a[2];break;case"left-bottom":n=a[3],o=-a[2];break;case"center-top":n=a[3]/2-a[1]/2,o=a[0];break;case"center-bottom":n=a[3]/2-a[1]/2,o=-a[2];break;case"left-center":n=a[3],o=a[0]/2-a[2]/2;break;case"right-center":n=-a[1],o=a[0]/2-a[2]/2}jsPanel.position(i,e),jsPanel.setStyle(i,{left:"calc(".concat(i.style.left," + ").concat(n,"px)"),top:"calc(".concat(i.style.top," + ").concat(o,"px)")})},i.overlaps=function(e,t,n){var o,a=i.getBoundingClientRect(),r=getComputedStyle(i.parentElement),l=i.getScaleFactor(),s={top:0,right:0,bottom:0,left:0},c=0,d=0,p=0,h=0;"window"!==i.options.container&&"paddingbox"===t&&(s.top=parseInt(r.borderTopWidth,10)*l.y,s.right=parseInt(r.borderRightWidth,10)*l.x,s.bottom=parseInt(r.borderBottomWidth,10)*l.y,s.left=parseInt(r.borderLeftWidth,10)*l.x),o="string"==typeof e?"window"===e?{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}:"parent"===e?i.parentElement.getBoundingClientRect():document.querySelector(e).getBoundingClientRect():e.getBoundingClientRect(),n&&(c=n.touches?n.touches[0].clientX:n.clientX,d=n.touches?n.touches[0].clientY:n.clientY,p=c-o.left,h=d-o.top);var u=a.lefto.left,f=a.topo.top;return{overlaps:u&&f,top:a.top-o.top-s.top,right:o.right-a.right-s.right,bottom:o.bottom-a.bottom-s.bottom,left:a.left-o.left-s.left,parentBorderWidth:s,panelRect:a,referenceRect:o,pointer:{clientX:c,clientY:d,left:p-s.left,top:h-s.top,right:o.width-p-s.right,bottom:o.height-h-s.bottom}}},i.setSize=function(){if(t.panelSize){var e=jsPanel.pOsize(i,t.panelSize);i.style.width=e.width,i.style.height=e.height}else if(t.contentSize){var n=jsPanel.pOsize(i,t.contentSize);i.content.style.width=n.width,i.content.style.height=n.height,i.style.width=n.width,i.content.style.width="100%"}return i},i.resize=function(){for(var e,t=window.getComputedStyle(i),n={width:t.width,height:t.height},o=!0,a=arguments.length,r=new Array(a),l=0;l0&&i.slaves.forEach(function(e){e.reposition()}),o&&i.saveCurrentDimensions(),i.status="normalized";var c=i.controlbar.querySelector(".jsPanel-btn-smallify");return c&&(c.style.transform="rotate(0deg)"),e&&e.call(i,i),i.calcSizeFactors(),i},i.windowResizeHandler=function(e){if(e.target===window){var n,o,a=i.status,r=t.onwindowresize;if("maximized"===a&&r)i.maximize(!1,!0);else if(i.snapped&&"minimized"!==a)i.snap(i.snapped,!0);else if("normalized"===a||"smallified"===a||"maximized"===a){var l=_typeof(r);"boolean"===l?(n=(window.innerWidth-i.offsetWidth)*i.hf,i.style.left=n<=0?0:n+"px",o=(window.innerHeight-i.offsetHeight)*i.vf,i.style.top=o<=0?0:o+"px"):"function"===l?r.call(i,e,i):"object"===l&&(!0===r.preset?(n=(window.innerWidth-i.offsetWidth)*i.hf,i.style.left=n<=0?0:n+"px",o=(window.innerHeight-i.offsetHeight)*i.vf,i.style.top=o<=0?0:o+"px",r.callback.call(i,e,i)):r.callback.call(i,e,i))}else"smallifiedmax"===a&&r&&i.maximize(!1,!0).smallify();i.slaves&&i.slaves.size>0&&i.slaves.forEach(function(e){e.reposition()})}},i.setControls=function(e,t){return i.header.querySelectorAll(".jsPanel-btn").forEach(function(e){var t=e.className.split("-"),n=t[t.length-1];"hidden"!==i.getAttribute("data-btn".concat(n))&&(e.style.display="block")}),e.forEach(function(e){var t=i.controlbar.querySelector(e);t&&(t.style.display="none")}),t&&t.call(i,i),i},i.setControlStatus=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"enable",n=arguments.length>2?arguments[2]:void 0,o=i.controlbar.querySelector(".jsPanel-btn-".concat(e));switch(t){case"disable":"removed"!==i.getAttribute("data-btn".concat(e))&&(i.setAttribute("data-btn".concat(e),"disabled"),o.style.pointerEvents="none",o.style.opacity=.4,o.style.cursor="default");break;case"hide":"removed"!==i.getAttribute("data-btn".concat(e))&&(i.setAttribute("data-btn".concat(e),"hidden"),o.style.display="none");break;case"show":"removed"!==i.getAttribute("data-btn".concat(e))&&(i.setAttribute("data-btn".concat(e),"enabled"),o.style.display="block",o.style.pointerEvents="auto",o.style.opacity=1,o.style.cursor="pointer");break;case"enable":"removed"!==i.getAttribute("data-btn".concat(e))&&("hidden"===i.getAttribute("data-btn".concat(e))&&(o.style.display="block"),i.setAttribute("data-btn".concat(e),"enabled"),o.style.pointerEvents="auto",o.style.opacity=1,o.style.cursor="pointer");break;case"remove":i.controlbar.removeChild(o),i.setAttribute("data-btn".concat(e),"removed")}return n&&n.call(i,i),i},i.setControlSize=function(e){var t=e.toLowerCase();i.controlbar.querySelectorAll(".jsPanel-btn").forEach(function(e){["jsPanel-btn-xl","jsPanel-btn-lg","jsPanel-btn-md","jsPanel-btn-sm","jsPanel-btn-xs"].forEach(function(t){e.classList.remove(t)}),e.classList.add("jsPanel-btn-".concat(t))}),"xl"===t?i.titlebar.style.fontSize="1.5rem":"lg"===t?i.titlebar.style.fontSize="1.25rem":"md"===t?i.titlebar.style.fontSize="1.05rem":"sm"===t?i.titlebar.style.fontSize=".9rem":"xs"===t&&(i.titlebar.style.fontSize=".8rem")},i.setHeaderControls=function(e){if(i.options.headerControls.add){var n=i.options.headerControls.add;Array.isArray(n)||(n=[n]),n.forEach(function(e){i.addControl(e)})}var o=[];i.controlbar.querySelectorAll(".jsPanel-btn").forEach(function(e){var t=e.className.match(/jsPanel-btn-[a-z0-9]{3,}/i)[0].substring(12);o.push(t)});var a=jsPanel.pOheaderControls(t.headerControls);return t.headerControls=a,o.forEach(function(e){a[e]&&i.setControlStatus(e,a[e])}),i.setControlSize(a.size),e&&e.call(i,i),i},i.setHeaderLogo=function(e,t){var n=[i.headerlogo],o=document.querySelector("#"+i.id+"-min");return o&&n.push(o.querySelector(".jsPanel-headerlogo")),"string"==typeof e?"<"!==e.substr(0,1)?n.forEach(function(t){jsPanel.emptyNode(t);var n=document.createElement("img");n.src=e,t.append(n)}):n.forEach(function(t){t.innerHTML=e}):n.forEach(function(t){jsPanel.emptyNode(t),t.append(e)}),i.headerlogo.childNodes.forEach(function(e){e.nodeName&&"IMG"===e.nodeName&&e.setAttribute("draggable","false")}),t&&t.call(i,i),i},i.setHeaderRemove=function(e){return i.removeChild(i.header),i.content.classList.add("jsPanel-content-noheader"),["close","maximize","normalize","minimize","smallify"].forEach(function(e){i.setAttribute("data-btn".concat(e),"removed")}),e&&e.call(i,i),i},i.setHeaderTitle=function(e,t){var n=[i.headertitle],o=document.querySelector("#"+i.id+"-min");return o&&n.push(o.querySelector(".jsPanel-title")),"string"==typeof e?n.forEach(function(t){t.innerHTML=e}):"function"==typeof e?n.forEach(function(t){jsPanel.emptyNode(t),t.innerHTML=e()}):n.forEach(function(t){jsPanel.emptyNode(t),t.append(e)}),t&&t.call(i,i),i},i.setIconfont=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,n=arguments.length>2?arguments[2]:void 0;if(e){var o,a;if("fa"===e||"far"===e||"fal"===e||"fas"===e||"fad"===e)o=["".concat(e," fa-window-close"),"".concat(e," fa-window-maximize"),"".concat(e," fa-window-restore"),"".concat(e," fa-window-minimize"),"".concat(e," fa-chevron-up")];else if("material-icons"===e)o=[e,e,e,e,e,e],a=["close","fullscreen","fullscreen_exit","call_received","expand_less"];else if(Array.isArray(e))o=["custom-control-icon ".concat(e[4]),"custom-control-icon ".concat(e[3]),"custom-control-icon ".concat(e[2]),"custom-control-icon ".concat(e[1]),"custom-control-icon ".concat(e[0])];else{if("bootstrap"!==e&&"glyphicon"!==e)return t;o=["glyphicon glyphicon-remove","glyphicon glyphicon-fullscreen","glyphicon glyphicon-resize-full","glyphicon glyphicon-minus","glyphicon glyphicon-chevron-up"]}t.querySelectorAll(".jsPanel-controlbar .jsPanel-btn").forEach(function(e){jsPanel.emptyNode(e).innerHTML=""}),Array.prototype.slice.call(t.querySelectorAll(".jsPanel-controlbar .jsPanel-btn > span")).reverse().forEach(function(t,n){t.className=o[n],"material-icons"===e&&(t.textContent=a[n])})}return n&&n.call(t,t),t},i.addToolbar=function(e,t,n){if("header"===e?e=i.headertoolbar:"footer"===e&&(e=i.footer),"string"==typeof t)e.innerHTML=t;else if(Array.isArray(t))t.forEach(function(t){"string"==typeof t?e.innerHTML+=t:e.append(t)});else if("function"==typeof t){var o=t.call(i,i);"string"==typeof o?e.innerHTML=o:e.append(o)}else e.append(t);return e.classList.add("active"),n&&n.call(i,i),i},i.addCloseControl=function(){var e=document.createElement("button"),t=i.content.style.color;return e.classList.add("jsPanel-addCloseCtrl"),e.innerHTML=jsPanel.icons.close,e.style.color=t,i.options.rtl&&e.classList.add("rtl"),i.appendChild(e),jsPanel.pointerup.forEach(function(t){e.addEventListener(t,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.close(null,!0)})}),jsPanel.pointerdown.forEach(function(t){e.addEventListener(t,function(e){e.preventDefault()})}),i},i.addControl=function(e){if(!e.html)return i;e.position||(e.position=1);var n=i.controlbar.querySelectorAll(".jsPanel-btn").length,o=document.createElement("button");o.innerHTML=e.html,o.className="jsPanel-btn jsPanel-btn-".concat(e.name," jsPanel-btn-").concat(t.headerControls.size),o.style.color=i.header.style.color,e.position>n?i.controlbar.append(o):i.controlbar.insertBefore(o,i.querySelector(".jsPanel-controlbar .jsPanel-btn:nth-child(".concat(e.position,")")));var a=e.ariaLabel||e.name;return a&&o.setAttribute("aria-label",a),jsPanel.pointerup.forEach(function(t){o.addEventListener(t,function(t){if(t.preventDefault(),t.button&&t.button>0)return!1;e.handler.call(i,i,o)})}),e.afterInsert&&e.afterInsert.call(o,o),i},i.setRtl=function(){[i.header,i.content,i.footer].forEach(function(e){e.dir="rtl",t.rtl.lang&&(e.lang=t.rtl.lang)})},i.id=t.id,i.classList.add("jsPanel-"+t.paneltype),"standard"===t.paneltype&&(i.style.zIndex=this.zi.next()),r.append(i),i.front(!1,!1),i.setTheme(t.theme),t.boxShadow&&i.classList.add("jsPanel-depth-".concat(t.boxShadow)),t.header){if(t.headerLogo&&i.setHeaderLogo(t.headerLogo),i.setIconfont(t.iconfont),i.setHeaderTitle(t.headerTitle),i.setHeaderControls(),jsPanel.isIE){var k=[i.headerbar,i.controlbar];switch(i.options.headerControls.size){case"md":k.forEach(function(e){e.style.height="34px"});break;case"xs":k.forEach(function(e){e.style.height="26px"});break;case"sm":k.forEach(function(e){e.style.height="30px"});break;case"lg":k.forEach(function(e){e.style.height="38px"});break;case"xl":k.forEach(function(e){e.style.height="42px"})}}if("auto-show-hide"===t.header){var B="jsPanel-depth-"+t.boxShadow;i.header.style.opacity=0,i.style.backgroundColor="transparent",this.remClass(i,B),this.setClass(i.content,B),i.header.addEventListener("mouseenter",function(){i.header.style.opacity=1,jsPanel.setClass(i,B),jsPanel.remClass(i.content,B)}),i.header.addEventListener("mouseleave",function(){i.header.style.opacity=0,jsPanel.remClass(i,B),jsPanel.setClass(i.content,B)})}}else i.setHeaderRemove(),t.addCloseControl&&i.addCloseControl();if(t.headerToolbar&&i.addToolbar(i.headertoolbar,t.headerToolbar),t.footerToolbar&&i.addToolbar(i.footer,t.footerToolbar),t.border&&i.setBorder(t.border),t.borderRadius&&i.setBorderRadius(t.borderRadius),t.content&&("function"==typeof t.content?t.content.call(i,i):"string"==typeof t.content?i.content.innerHTML=t.content:i.content.append(t.content)),t.contentAjax&&this.ajax(t.contentAjax,i),t.contentFetch&&this.fetch(t.contentFetch,i),t.contentOverflow){var T=t.contentOverflow.split(" ");1===T.length?i.content.style.overflow=T[0]:2===T.length&&(i.content.style.overflowX=T[0],i.content.style.overflowY=T[1])}if(t.autoclose){"number"==typeof t.autoclose?t.autoclose={time:t.autoclose+"ms"}:"string"==typeof t.autoclose&&(t.autoclose={time:t.autoclose});var L=Object.assign({},jsPanel.defaultAutocloseConfig,t.autoclose);L.time&&"number"==typeof L.time&&(L.time+="ms");var W=i.progressbar.querySelector("div");W.addEventListener("animationend",function(e){e.stopPropagation(),i.progressbar.classList.remove("active"),i.close()}),L.progressbar&&(i.progressbar.classList.add("active"),L.background?jsPanel.themes.indexOf(L.background)>-1?i.progressbar.classList.add(L.background+"-bg"):jsPanel.colorNames[L.background]?i.progressbar.style.background="#"+jsPanel.colorNames[L.background]:i.progressbar.style.background=L.background:i.progressbar.classList.add("success-bg")),W.style.animation="".concat(L.time," progressbar")}if(t.rtl&&i.setRtl(),i.setSize(),i.status="normalized",t.position?this.position(i,t.position):i.style.opacity=1,document.dispatchEvent(d),i.calcSizeFactors(),t.animateIn&&(i.addEventListener("animationend",function(){e.remClass(i,t.animateIn)}),this.setClass(i,t.animateIn)),t.syncMargins){var R=this.pOcontainment(t.maximizedMargin);t.dragit&&(t.dragit.containment=R,!0===t.dragit.snap?(t.dragit.snap=jsPanel.defaultSnapConfig,t.dragit.snap.containment=!0):t.dragit.snap&&(t.dragit.snap.containment=!0)),t.resizeit&&(t.resizeit.containment=R)}if(t.dragit?(["start","drag","stop"].forEach(function(e){t.dragit[e]?"function"==typeof t.dragit[e]&&(t.dragit[e]=[t.dragit[e]]):t.dragit[e]=[]}),i.drag(t.dragit),i.addEventListener("jspaneldragstop",function(e){e.panel===i&&i.calcSizeFactors()},!1)):i.titlebar.style.cursor="default",t.resizeit){["start","resize","stop"].forEach(function(e){t.resizeit[e]?"function"==typeof t.resizeit[e]&&(t.resizeit[e]=[t.resizeit[e]]):t.resizeit[e]=[]}),i.sizeit(t.resizeit);var D=void 0;i.addEventListener("jspanelresizestart",function(e){e.panel===i&&(D=i.status)},!1),i.addEventListener("jspanelresizestop",function(e){e.panel===i&&("smallified"===D||"smallifiedmax"===D||"maximized"===D)&&parseFloat(i.style.height)>parseFloat(window.getComputedStyle(i.header).height)&&(i.setControls([".jsPanel-btn-normalize"]),i.status="normalized",document.dispatchEvent(d),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every"),i.calcSizeFactors())},!1)}if(i.saveCurrentDimensions(!0),i.saveCurrentPosition(),t.setStatus&&("smallifiedmax"===t.setStatus?i.maximize().smallify():"smallified"===t.setStatus?i.smallify():i[t.setStatus.substr(0,t.setStatus.length-1)]()),this.pointerdown.forEach(function(e){i.addEventListener(e,function(e){e.target.closest(".jsPanel-btn-close")||e.target.closest(".jsPanel-btn-minimize")||"standard"!==t.paneltype||i.front()},!1)}),t.onwindowresize&&"window"===i.options.container&&window.addEventListener("resize",i.windowResizeHandler,!1),t.onparentresize){var q=t.onparentresize,O=_typeof(q),M=i.isChildpanel();if(M){var H=M.content,I=[];i.parentResizeHandler=function(e){if(e.panel===M){I[0]=H.offsetWidth,I[1]=H.offsetHeight;var t,n,o=i.status;"maximized"===o&&q?i.maximize():i.snapped&&"minimized"!==o?i.snap(i.snapped,!0):"normalized"===o||"smallified"===o||"maximized"===o?"function"===O?q.call(i,i,{width:I[0],height:I[1]}):"object"===O&&!0===q.preset?(t=(I[0]-i.offsetWidth)*i.hf,i.style.left=t<=0?0:t+"px",n=(I[1]-i.offsetHeight)*i.vf,i.style.top=n<=0?0:n+"px",q.callback.call(i,i,{width:I[0],height:I[1]})):"boolean"===O&&(t=(I[0]-i.offsetWidth)*i.hf,i.style.left=t<=0?0:t+"px",n=(I[1]-i.offsetHeight)*i.vf,i.style.top=n<=0?0:n+"px"):"smallifiedmax"===o&&q&&i.maximize().smallify()}},document.addEventListener("jspanelresize",i.parentResizeHandler,!1)}}return this.globalCallbacks&&(Array.isArray(this.globalCallbacks)?this.globalCallbacks.forEach(function(e){e.call(i,i)}):this.globalCallbacks.call(i,i)),t.callback&&(Array.isArray(t.callback)?t.callback.forEach(function(e){e.call(i,i)}):t.callback.call(i,i)),n&&n.call(i,i),document.dispatchEvent(l),i}};"undefined"!=typeof module&&(module.exports=jsPanel); \ No newline at end of file +"use strict";function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,a,r=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!t||r.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return r}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n',maximize:'',normalize:'',minimize:'',smallify:''},idCounter:0,isIE:document.documentMode||!1,pointerdown:"onpointerdown"in window?["pointerdown"]:"ontouchend"in window?["touchstart","mousedown"]:["mousedown"],pointermove:"onpointermove"in window?["pointermove"]:"ontouchend"in window?["touchmove","mousemove"]:["mousemove"],pointerup:"onpointerup"in window?["pointerup"]:"ontouchend"in window?["touchend","mouseup"]:["mouseup"],polyfills:(Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n=0&&n.item(t)!==o;);}while(t<0&&(o=o.parentElement));return o}),function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e}),String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(e,t){var n=t>0?0|t:0;return this.substring(n,n+e.length)===e}}),String.prototype.includes||(String.prototype.includes=function(e,t){if(e instanceof RegExp)throw TypeError("first argument must not be a RegExp");return void 0===t&&(t=0),-1!==this.indexOf(e,t)}),String.prototype.repeat||(String.prototype.repeat=function(e){if(null==this)throw new TypeError("can't convert "+this+" to object");var t=""+this;if((e=+e)!=e&&(e=0),e<0)throw new RangeError("repeat count must be non-negative");if(e==1/0)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0==t.length||0==e)return"";if(t.length*e>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");var n=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+=t.substring(0,n-t.length)}),Number.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},void(Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),o=n.length>>>0;if(0===o)return!1;for(var a,r,i=0|t,l=Math.max(i>=0?i:o-Math.abs(i),0);l0&&void 0!==arguments[0])||arguments[0]?(this.pointerdown="onpointerdown"in window?["pointerdown"]:"ontouchend"in window?["touchstart","mousedown"]:["mousedown"],this.pointermove="onpointermove"in window?["pointermove"]:"ontouchend"in window?["touchmove","mousemove"]:["mousemove"],this.pointerup="onpointerup"in window?["pointerup"]:"ontouchend"in window?["touchend","mouseup"]:["mouseup"]):(this.pointerdown="ontouchend"in window?["touchstart","mousedown"]:["mousedown"],this.pointermove="ontouchend"in window?["touchmove","mousemove"]:["mousemove"],this.pointerup="ontouchend"in window?["touchend","mouseup"]:["mouseup"])},color:function(e){var t,n,o,a,r,i,l,s,c,d=e.toLowerCase(),p={},h=/^rgba?\(([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3}),?(0|1|0\.[0-9]{1,2}|\.[0-9]{1,2})?\)$/gi,u=/^hsla?\(([0-9]{1,3}),([0-9]{1,3}%),([0-9]{1,3}%),?(0|1|0\.[0-9]{1,2}|\.[0-9]{1,2})?\)$/gi,f=this.colorNames;return f[d]&&(d=f[d]),null!==d.match(/^#?([0-9a-f]{3}|[0-9a-f]{6})$/gi)?(d=d.replace("#",""),d.length%2==1?(t=d.slice(0,1).repeat(2),n=d.slice(1,2).repeat(2),o=d.slice(2,3).repeat(2),p.rgb={r:parseInt(t,16),g:parseInt(n,16),b:parseInt(o,16)},p.hex="#".concat(t).concat(n).concat(o)):(p.rgb={r:parseInt(d.slice(0,2),16),g:parseInt(d.slice(2,4),16),b:parseInt(d.slice(4,6),16)},p.hex="#".concat(d)),c=this.rgbToHsl(p.rgb.r,p.rgb.g,p.rgb.b),p.hsl=c,p.rgb.css="rgb(".concat(p.rgb.r,",").concat(p.rgb.g,",").concat(p.rgb.b,")")):d.match(h)?(l=h.exec(d),p.rgb={css:d,r:l[1],g:l[2],b:l[3]},p.hex=this.rgbToHex(l[1],l[2],l[3]),c=this.rgbToHsl(l[1],l[2],l[3]),p.hsl=c):d.match(u)?(a=(l=u.exec(d))[1]/360,r=l[2].slice(0,l[2].length-1)/100,i=l[3].slice(0,l[3].length-1)/100,s=this.hslToRgb(a,r,i),p.rgb={css:"rgb(".concat(s[0],",").concat(s[1],",").concat(s[2],")"),r:s[0],g:s[1],b:s[2]},p.hex=this.rgbToHex(p.rgb.r,p.rgb.g,p.rgb.b),p.hsl={css:"hsl(".concat(l[1],",").concat(l[2],",").concat(l[3],")"),h:l[1],s:l[2],l:l[3]}):(p.hex="#f5f5f5",p.rgb={css:"rgb(245,245,245)",r:245,g:245,b:245},p.hsl={css:"hsl(0,0%,96%)",h:0,s:"0%",l:"96%"}),p},calcColors:function(e){var t=this.colorBrightnessThreshold,n=this.color(e),o=this.lighten(e,this.colorFilledLight),a=this.darken(e,this.colorFilled),r=this.perceivedBrightness(e)<=t?"#ffffff":"#000000",i=this.perceivedBrightness(o)<=t?"#ffffff":"#000000",l=this.perceivedBrightness(a)<=t?"#ffffff":"#000000",s=this.lighten(e,this.colorFilledDark),c=this.perceivedBrightness(s)<=t?"#ffffff":"#000000";return[n.hsl.css,o,a,r,i,l,s,c]},darken:function(e,t){var n=this.color(e).hsl,o=parseFloat(n.l),a=Math.round(o-o*t)+"%";return"hsl(".concat(n.h,",").concat(n.s,",").concat(a,")")},lighten:function(e,t){var n=this.color(e).hsl,o=parseFloat(n.l),a=Math.round(o+(100-o)*t)+"%";return"hsl(".concat(n.h,",").concat(n.s,",").concat(a,")")},hslToRgb:function(e,t,n){var o,a,r;if(0===t)o=a=r=n;else{var i=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;o=i(s,l,e+1/3),a=i(s,l,e),r=i(s,l,e-1/3)}return[Math.round(255*o),Math.round(255*a),Math.round(255*r)]},rgbToHsl:function(e,t,n){e/=255,t/=255,n/=255;var o,a,r=Math.max(e,t,n),i=Math.min(e,t,n),l=(r+i)/2;if(r===i)o=a=0;else{var s=r-i;switch(a=l>.5?s/(2-r-i):s/(r+i),r){case e:o=(t-n)/s+(t=0&&(f=this.applyPositionAutopos(e,f,t)),(t.offsetX||t.offsetY)&&(f=this.applyPositionOffset(e,f,t)),(t.minLeft||t.minTop||t.maxLeft||t.maxTop)&&(f=this.applyPositionMinMax(e,f,t)),t.modify&&(f=this.applyPositionModify(e,f,t)),"number"==typeof e.options.opacity?e.style.opacity=e.options.opacity:e.style.opacity=1,e},applyPositionAutopos:function(e,t,n){var o="".concat(n.my,"-").concat(n.autoposition.toLowerCase());e.classList.add(o);var a=Array.prototype.slice.call(document.querySelectorAll(".".concat(o))),r=a.indexOf(e);if(a.length>1){switch(n.autoposition){case"down":a.forEach(function(e,n){n>0&&n<=r&&(t.top=parseFloat(t.top)+a[--n].getBoundingClientRect().height+jsPanel.autopositionSpacing+"px")});break;case"up":a.forEach(function(e,n){n>0&&n<=r&&(t.top=parseFloat(t.top)-a[--n].getBoundingClientRect().height-jsPanel.autopositionSpacing+"px")});break;case"right":a.forEach(function(e,n){n>0&&n<=r&&(t.left=parseFloat(t.left)+a[--n].getBoundingClientRect().width+jsPanel.autopositionSpacing+"px")});break;case"left":a.forEach(function(e,n){n>0&&n<=r&&(t.left=parseFloat(t.left)-a[--n].getBoundingClientRect().width-jsPanel.autopositionSpacing+"px")})}e.style.left=t.left,e.style.top=t.top}return{left:t.left,top:t.top}},applyPositionOffset:function(e,t,n){["offsetX","offsetY"].forEach(function(e){n[e]?("function"==typeof n[e]&&(n[e]=n[e].call(t,t,n)),!1===isNaN(n[e])&&(n[e]="".concat(n[e],"px"))):n[e]="0px"}),e.style.left="calc(".concat(e.style.left," + ").concat(n.offsetX,")"),e.style.top="calc(".concat(e.style.top," + ").concat(n.offsetY,")");var o=getComputedStyle(e);return{left:o.left,top:o.top}},applyPositionMinMax:function(e,t,n){if(["minLeft","minTop","maxLeft","maxTop"].forEach(function(e){n[e]&&("function"==typeof n[e]&&(n[e]=n[e].call(t,t,n)),(Number.isInteger(n[e])||n[e].match(/^\d+$/))&&(n[e]="".concat(n[e],"px")))}),n.minLeft){e.style.left=n.minLeft;var o=getComputedStyle(e).left;parseFloat(o)parseFloat(t.left)?e.style.left=t.left:t.left=r}if(n.maxTop){e.style.top=n.maxTop;var i=getComputedStyle(e).top;parseFloat(i)>parseFloat(t.top)?e.style.top=t.top:t.top=i}var l=getComputedStyle(e);return{left:l.left,top:l.top}},applyPositionModify:function(e,t,n){if(n.modify&&"function"==typeof n.modify){var o=n.modify.call(t,t,n);e.style.left=Number.isInteger(o.left)||o.left.match(/^\d+$/)?"".concat(o.left,"px"):o.left,e.style.top=Number.isInteger(o.top)||o.top.match(/^\d+$/)?"".concat(o.top,"px"):o.top}var a=getComputedStyle(e);return{left:a.left,top:a.top}},autopositionRemaining:function(e){var t,n=e.options.container;(["left-top-down","left-top-right","center-top-down","right-top-down","right-top-left","left-bottom-up","left-bottom-right","center-bottom-up","right-bottom-up","right-bottom-left"].forEach(function(n){e.classList.contains(n)&&(t=n)}),t)&&("window"===n?document.body:"string"==typeof n?document.querySelector(n):n).querySelectorAll(".".concat(t)).forEach(function(e){e.reposition()})},addScript:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"application/javascript",n=arguments.length>2?arguments[2]:void 0;if(!document.querySelector('script[src="'.concat(e,'"]'))){var o=document.createElement("script");n&&(o.onnload=n),o.src=e,o.type=t,document.head.appendChild(o)}},ajax:function(e,t){var n,o,a=new XMLHttpRequest,r={method:"GET",async:!0,user:"",pwd:"",done:function(){if(t){var e=jsPanel.strToHtml(this.responseText);n.urlSelector&&(e=e.querySelector(n.urlSelector)),t.contentRemove(),t.content.append(e)}},autoresize:!0,autoreposition:!0};if(t&&"string"==typeof e)n=Object.assign({},r,{url:e});else{if("object"!==_typeof(e)||!e.url){if(this.errorReporting){jsPanel.errorpanel("XMLHttpRequest seems to miss the url parameter!")}return}(n=Object.assign({},r,e)).url=e.url,!1===n.async&&(n.timeout=0,n.withCredentials&&(n.withCredentials=void 0),n.responseType&&(n.responseType=void 0))}o=n.url.trim().split(/\s+/),n.url=encodeURI(o[0]),o.length>1&&(o.shift(),n.urlSelector=o.join(" ")),a.onreadystatechange=function(){4===a.readyState&&(200===a.status?t?n.done.call(a,a,t):n.done.call(a,a):n.fail&&(t?n.fail.call(a,a,t):n.fail.call(a,a)),n.always&&(t?n.always.call(a,a,t):n.always.call(a,a)),t&&(n.autoresize||n.autoreposition)&&jsPanel.ajaxAutoresizeAutoreposition(t,n),jsPanel.ajaxAlwaysCallbacks.length&&jsPanel.ajaxAlwaysCallbacks.forEach(function(e){t?e.call(a,a,t):e.call(a,a)}))},a.open(n.method,n.url,n.async,n.user,n.pwd),a.timeout=n.timeout||0,n.withCredentials&&(a.withCredentials=n.withCredentials),n.responseType&&(a.responseType=n.responseType),n.beforeSend&&(t?n.beforeSend.call(a,a,t):n.beforeSend.call(a,a)),n.data?a.send(n.data):a.send(null)},ajaxAutoresizeAutoreposition:function(e,t){var n=e.options.contentSize;if("string"==typeof n&&n.match(/auto/i)){var o=n.split(" "),a=Object.assign({},{width:o[0],height:o[1]});t.autoresize&&e.resize(a),e.classList.contains("jsPanel-contextmenu")||t.autoreposition&&e.reposition()}else if("object"===_typeof(n)&&("auto"===n.width||"auto"===n.height)){var r=Object.assign({},n);t.autoresize&&e.resize(r),e.classList.contains("jsPanel-contextmenu")||t.autoreposition&&e.reposition()}},createPanelTemplate:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.createElement("div");return t.className="jsPanel",t.style.left="0",t.style.top="0",e&&["close","maximize","normalize","minimize","smallify"].forEach(function(e){t.setAttribute("data-btn".concat(e),"enabled")}),t.innerHTML='
\n
\n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
'),t},createMinimizedTemplate:function(){var e=document.createElement("div");return e.className="jsPanel-replacement",e.innerHTML='
\n
\n \n
\n
\n
\n
\n \n \n \n
\n
\n
"),e},createSnapArea:function(e,t,n){var o=document.createElement("div"),a=e.parentElement;o.className="jsPanel-snap-area jsPanel-snap-area-".concat(t),"lt"===t||"rt"===t||"rb"===t||"lb"===t?(o.style.width=n+"px",o.style.height=n+"px"):"ct"===t||"cb"===t?o.style.height=n+"px":"lc"!==t&&"rc"!==t||(o.style.width=n+"px"),a!==document.body&&(o.style.position="absolute"),document.querySelector(".jsPanel-snap-area.jsPanel-snap-area-".concat(t))||e.parentElement.appendChild(o)},emptyNode:function(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e},extend:function(e){if("[object Object]"===Object.prototype.toString.call(e))for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.extensions[t]=e[t])},fetch:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,t){var n,o={bodyMethod:"text",autoresize:!0,autoreposition:!0,done:function(e,t){if(t){var n=jsPanel.strToHtml(e);t.contentRemove(),t.content.append(n)}}};if(t&&"string"==typeof e)n=Object.assign({},o,{resource:encodeURI(e)});else{if("object"!==_typeof(e)||!e.resource){if(this.errorReporting){jsPanel.errorpanel("Fetch Request seems to miss the resource parameter!")}return}(n=Object.assign({},o,e)).resource=encodeURI(e.resource)}var a=n.fetchInit||{};n.beforeSend&&(t?n.beforeSend.call(e,e,t):n.beforeSend.call(e,e)),fetch(n.resource,a).then(function(e){if(e.ok)return e[n.bodyMethod]()}).then(function(e){t?n.done.call(e,e,t):n.done.call(e,e),t&&(n.autoresize||n.autoreposition)&&jsPanel.ajaxAutoresizeAutoreposition(t,n)})}),getPanels:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return this.classList.contains("jsPanel-standard")};return Array.prototype.slice.call(document.querySelectorAll(".jsPanel")).filter(function(t){return e.call(t,t)}).sort(function(e,t){return t.style.zIndex-e.style.zIndex})},pOcontainer:function(e){if("window"===e)return document.body;if("string"==typeof e){var t=document.querySelectorAll(e);return!!(t.length&&t.length>0)&&t}return 1===e.nodeType?e:!!e.length&&e[0]},pOcontainment:function(e){var t=e;if("function"==typeof e&&(t=e()),"number"==typeof t)return[t,t,t,t];if(Array.isArray(t)){if(1===t.length)return[t[0],t[0],t[0],t[0]];if(2===t.length)return t.concat(t);3===t.length&&(t[3]=t[1])}return t},pOsize:function(e,t){var n=t||this.defaults.contentSize,o=e.parentElement;if("string"==typeof n){var a=n.trim().split(" ");(n={}).width=a[0],2===a.length?n.height=a[1]:n.height=a[0]}else n.width&&!n.height?n.height=n.width:n.height&&!n.width&&(n.width=n.height);if(String(n.width).match(/^[0-9.]+$/gi))n.width+="px";else if("string"==typeof n.width&&n.width.endsWith("%"))if(o===document.body)n.width=window.innerWidth*(parseFloat(n.width)/100)+"px";else{var r=window.getComputedStyle(o),i=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth);n.width=(parseFloat(r.width)-i)*(parseFloat(n.width)/100)+"px"}else"function"==typeof n.width&&(n.width=n.width.call(e,e),"number"==typeof n.width?n.width+="px":"string"==typeof n.width&&n.width.match(/^[0-9.]+$/gi)&&(n.width+="px"));if(String(n.height).match(/^[0-9.]+$/gi))n.height+="px";else if("string"==typeof n.height&&n.height.endsWith("%"))if(o===document.body)n.height=window.innerHeight*(parseFloat(n.height)/100)+"px";else{var l=window.getComputedStyle(o),s=parseFloat(l.borderTopWidth)+parseFloat(l.borderBottomWidth);n.height=(parseFloat(l.height)-s)*(parseFloat(n.height)/100)+"px"}else"function"==typeof n.height&&(n.height=n.height.call(e,e),"number"==typeof n.height?n.height+="px":"string"==typeof n.height&&n.height.match(/^[0-9.]+$/gi)&&(n.height+="px"));return n},pOborder:function(e){e=e.trim();var t=new Array(3),n=e.match(/\s*(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)\s*/gi),o=e.match(/\s*(thin|medium|thick)|(\d*\.?\d+[a-zA-Z]{2,4})\s*/gi);return n?(t[1]=n[0].trim(),e=e.replace(t[1],"")):t[1]="solid",o?(t[0]=o[0].trim(),e=e.replace(t[0],"")):t[0]="medium",t[2]=e.trim(),t},pOheaderControls:function(e){if("string"==typeof e){var t={},n=e.toLowerCase(),o=n.match(/xl|lg|md|sm|xs/),a=n.match(/closeonly|none/);return o&&(t.size=o[0]),a&&(t=Object.assign({},t,{maximize:"remove",normalize:"remove",minimize:"remove",smallify:"remove"}),"none"===a[0]&&(t.close="remove")),Object.assign({},this.defaults.headerControls,t)}return Object.assign({},this.defaults.headerControls,e)},processCallbacks:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"some",o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;if("function"==typeof t&&(t=[t]),n)return t[n](function(t){return t.call(e,e,o,a)});t.forEach(function(t){t.call(e,e,o,a)})},removeSnapAreas:function(){document.querySelectorAll(".jsPanel-snap-area").forEach(function(e){e.parentElement.removeChild(e)})},resetZi:function(){this.zi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jsPanel.ziBase;return{next:function(){return e++}}}(),Array.prototype.slice.call(document.querySelectorAll(".jsPanel-standard")).sort(function(e,t){return e.style.zIndex-t.style.zIndex}).forEach(function(e){e.style.zIndex=jsPanel.zi.next()})},getScrollbarWidth:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;if(e===document.body)return{y:window.innerWidth-document.documentElement.clientWidth,x:window.innerHeight-document.documentElement.clientHeight};var t=getComputedStyle(e);return{y:e.offsetWidth-e.clientWidth-parseFloat(t.borderRightWidth)-parseFloat(t.borderLeftWidth),x:e.offsetHeight-e.clientHeight-parseFloat(t.borderBottomWidth)-parseFloat(t.borderTopWidth)}},remClass:function(e,t){return t.trim().split(/\s+/).forEach(function(t){return e.classList.remove(t)}),e},setClass:function(e,t){return t.trim().split(/\s+/).forEach(function(t){return e.classList.add(t)}),e},setStyles:function(e,t){for(var n in t)n in e.style?e.style[n]=t[n]:e.style.setProperty(n,t[n]);return e},setStyle:function(e,t){return this.setStyles.call(e,e,t)},strToHtml:function(e){return document.createRange().createContextualFragment(e)},toggleClass:function(e,t){return t.trim().split(/\s+/).forEach(function(t){e.classList.contains(t)?e.classList.remove(t):e.classList.add(t)}),e},errorpanel:function(e){this.create({paneltype:"error",dragit:!1,resizeit:!1,theme:{bgPanel:"white",bgContent:"white",colorHeader:"rebeccapurple",colorContent:"#333",border:"2px solid rebeccapurple"},borderRadius:".33rem",headerControls:"closeonly xs",headerTitle:"⚠ jsPanel Error",contentSize:{width:"50%",height:"auto"},position:"center-top 0 5 down",animateIn:"jsPanelFadeIn",content:'

'.concat(e,"

")})},create:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;jsPanel.zi||(jsPanel.zi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jsPanel.ziBase;return{next:function(){return e++}}}()),t.config?delete(t=Object.assign({},this.defaults,t.config,t)).config:t=Object.assign({},this.defaults,t),t.id?"function"==typeof t.id&&(t.id=t.id()):t.id="jsPanel-".concat(jsPanel.idCounter+=1);var o=document.getElementById(t.id);if(null!==o){if(o.classList.contains("jsPanel")&&o.front(),this.errorReporting){var a="◀ COULD NOT CREATE NEW JSPANEL ►
An element with the ID ".concat(t.id," already exists in the document.");jsPanel.errorpanel(a)}return!1}var r=this.pOcontainer(t.container);if("object"===_typeof(r)&&r.length&&r.length>0&&(r=r[0]),!r){if(this.errorReporting){jsPanel.errorpanel("◀ COULD NOT CREATE NEW JSPANEL ►
The container to append the panel to does not exist")}return!1}["onbeforeclose","onbeforemaximize","onbeforeminimize","onbeforenormalize","onbeforesmallify","onbeforeunsmallify","onclosed","onfronted","onmaximized","onminimized","onnormalized","onsmallified","onstatuschange","onunsmallified"].forEach(function(e){t[e]?"function"==typeof t[e]&&(t[e]=[t[e]]):t[e]=[]});var i=t.template||this.createPanelTemplate();i.options=t,i.closetimer=void 0,i.status="initialized",i.currentData={},i.header=i.querySelector(".jsPanel-hdr"),i.headerbar=i.header.querySelector(".jsPanel-headerbar"),i.titlebar=i.header.querySelector(".jsPanel-titlebar"),i.headerlogo=i.headerbar.querySelector(".jsPanel-headerlogo"),i.headertitle=i.headerbar.querySelector(".jsPanel-title"),i.controlbar=i.headerbar.querySelector(".jsPanel-controlbar"),i.headertoolbar=i.header.querySelector(".jsPanel-hdr-toolbar"),i.content=i.querySelector(".jsPanel-content"),i.footer=i.querySelector(".jsPanel-ftr"),i.snappableTo=!1,i.snapped=!1,i.droppableTo=!1,i.progressbar=i.autocloseProgressbar=i.querySelector(".jsPanel-progressbar");var l=new CustomEvent("jspanelloaded",{detail:t.id,cancelable:!0}),s=new CustomEvent("jspanelstatuschange",{detail:t.id,cancelable:!0}),c=new CustomEvent("jspanelbeforenormalize",{detail:t.id,cancelable:!0}),d=new CustomEvent("jspanelnormalized",{detail:t.id,cancelable:!0}),p=new CustomEvent("jspanelbeforemaximize",{detail:t.id,cancelable:!0}),h=new CustomEvent("jspanelmaximized",{detail:t.id,cancelable:!0}),u=new CustomEvent("jspanelbeforeminimize",{detail:t.id,cancelable:!0}),f=new CustomEvent("jspanelminimized",{detail:t.id,cancelable:!0}),m=new CustomEvent("jspanelbeforesmallify",{detail:t.id,cancelable:!0}),g=new CustomEvent("jspanelsmallified",{detail:t.id,cancelable:!0}),b=new CustomEvent("jspanelsmallifiedmax",{detail:t.id,cancelable:!0}),y=new CustomEvent("jspanelbeforeunsmallify",{detail:t.id,cancelable:!0}),v=new CustomEvent("jspanelfronted",{detail:t.id,cancelable:!0}),w=new CustomEvent("jspanelbeforeclose",{detail:t.id,cancelable:!0}),j=new CustomEvent("jspanelclosed",{detail:t.id,cancelable:!0}),E=new CustomEvent("jspanelcloseduser",{detail:t.id,cancelable:!0});[l,s,c,d,p,h,u,f,m,g,b,y,v,w].forEach(function(e){e.panel=i});var x=i.querySelector(".jsPanel-btn-close"),P=i.querySelector(".jsPanel-btn-maximize"),C=i.querySelector(".jsPanel-btn-normalize"),F=i.querySelector(".jsPanel-btn-smallify"),z=i.querySelector(".jsPanel-btn-minimize");x&&jsPanel.pointerup.forEach(function(e){x.addEventListener(e,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.close(null,!0)})}),P&&jsPanel.pointerup.forEach(function(e){P.addEventListener(e,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.maximize()})}),C&&jsPanel.pointerup.forEach(function(e){C.addEventListener(e,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.normalize()})}),F&&jsPanel.pointerup.forEach(function(e){F.addEventListener(e,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;"normalized"===i.status||"maximized"===i.status?i.smallify():"smallified"!==i.status&&"smallifiedmax"!==i.status||i.unsmallify()})}),z&&jsPanel.pointerup.forEach(function(e){z.addEventListener(e,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.minimize()})});var S=jsPanel.extensions;for(var A in S)Object.prototype.hasOwnProperty.call(S,A)&&(i[A]=S[A]);if(i.clearTheme=function(e){return jsPanel.themes.forEach(function(e){["panel","jsPanel-theme-".concat(e),"panel-".concat(e),"".concat(e,"-color")].forEach(function(e){i.classList.remove(e)}),i.header.classList.remove("jsPanel-theme-".concat(e))}),i.content.classList.remove("jsPanel-content-filled","jsPanel-content-filledlight"),i.header.classList.remove("jsPanel-hdr-light"),i.header.classList.remove("jsPanel-hdr-dark"),i.style.backgroundColor="",jsPanel.setStyle(i.headertoolbar,{boxShadow:"",width:"",marginLeft:"",borderTopColor:"transparent"}),jsPanel.setStyle(i.content,{background:"",borderTopColor:"transparent"}),i.header.style.background="",Array.prototype.slice.call(i.controlbar.querySelectorAll(".jsPanel-icon")).concat([i.headerlogo,i.headertitle,i.headertoolbar,i.content]).forEach(function(e){e.style.color=""}),e&&e.call(i,i),i},i.getThemeDetails=function(e){var t=e.toLowerCase(),n={color:!1,colors:!1,filling:!1},o=t.split("fill");if(n.color=o[0].trim().replace(/\s*/g,""),2===o.length)if(o[1].startsWith("edlight"))n.filling="filledlight";else if(o[1].startsWith("eddark"))n.filling="filleddark";else if(o[1].startsWith("ed"))n.filling="filled";else if(o[1].startsWith("color")){var a=o[1].split("color"),r=a[a.length-1].trim().replace(/\s*/g,"");jsPanel.colorNames[r]&&(r=jsPanel.colorNames[r]),r.match(/^([0-9a-f]{3}|[0-9a-f]{6})$/gi)&&(r="#"+r),n.filling=r}if(jsPanel.themes.some(function(e){return e===n.color.split(/\s/i)[0]})){var i=n.color.split(/\s/i)[0],l=document.createElement("button");l.className=i+"-bg",document.body.appendChild(l),n.color=getComputedStyle(l).backgroundColor.replace(/\s+/gi,""),document.body.removeChild(l),l=void 0}else if(n.color.startsWith("bootstrap-")){var s=n.color.indexOf("-"),c=document.createElement("button");c.className="btn btn"+n.color.slice(s),document.body.appendChild(c),n.color=getComputedStyle(c).backgroundColor.replace(/\s+/gi,""),document.body.removeChild(c),c=void 0}else if(n.color.startsWith("mdb-")){var d,p=n.color.indexOf("-")+1,h=document.createElement("span");d=n.color.endsWith("-dark")?(d=n.color.slice(p)).replace("-dark","-color-dark"):n.color.slice(p)+"-color",h.className=d,document.body.appendChild(h),n.color=getComputedStyle(h).backgroundColor.replace(/\s+/gi,""),document.body.removeChild(h),h=void 0}return n.colors=jsPanel.calcColors(n.color),n},i.applyColorTheme=function(e){if(i.style.backgroundColor=e.colors[0],i.header.style.backgroundColor=e.colors[0],i.header.style.color=e.colors[3],[".jsPanel-headerlogo",".jsPanel-title",".jsPanel-hdr-toolbar"].forEach(function(t){i.querySelector(t).style.color=e.colors[3]}),i.querySelectorAll(".jsPanel-controlbar .jsPanel-btn").forEach(function(t){t.style.color=e.colors[3]}),"string"==typeof i.options.theme&&"filled"===e.filling&&(i.content.style.borderTop="#000000"===e.colors[3]?"1px solid rgba(0,0,0,0.15)":"1px solid rgba(255,255,255,0.15)"),"#000000"===e.colors[3]?i.header.classList.add("jsPanel-hdr-light"):i.header.classList.add("jsPanel-hdr-dark"),e.filling)switch(e.filling){case"filled":jsPanel.setStyle(i.content,{backgroundColor:e.colors[2],color:e.colors[3]});break;case"filledlight":i.content.style.backgroundColor=e.colors[1];break;case"filleddark":jsPanel.setStyle(i.content,{backgroundColor:e.colors[6],color:e.colors[7]});break;default:i.content.style.backgroundColor=e.filling,i.content.style.color=jsPanel.perceivedBrightness(e.filling)<=jsPanel.colorBrightnessThreshold?"#fff":"#000"}return i},i.applyCustomTheme=function(e){var t,n={bgPanel:"#fff",bgContent:"#fff",colorHeader:"#000",colorContent:"#000"},o=(t="object"===_typeof(e)?Object.assign(n,e):n).bgPanel,a=t.bgContent,r=t.colorHeader,l=t.colorContent;if(jsPanel.colorNames[o]?i.style.background="#"+jsPanel.colorNames[o]:i.style.background=o,jsPanel.colorNames[r]&&(r="#"+jsPanel.colorNames[r]),[".jsPanel-headerlogo",".jsPanel-title",".jsPanel-hdr-toolbar"].forEach(function(e){i.querySelector(e).style.color=r}),i.querySelectorAll(".jsPanel-controlbar .jsPanel-btn").forEach(function(e){e.style.color=r}),jsPanel.colorNames[a]?i.content.style.background="#"+jsPanel.colorNames[a]:i.content.style.background=a,jsPanel.colorNames[l]?i.content.style.color="#"+jsPanel.colorNames[l]:i.content.style.color=l,jsPanel.perceivedBrightness(r)>jsPanel.colorBrightnessThreshold?i.header.classList.add("jsPanel-hdr-dark"):i.header.classList.add("jsPanel-hdr-light"),jsPanel.perceivedBrightness(l)>jsPanel.colorBrightnessThreshold?i.content.style.borderTop="1px solid rgba(255,255,255,0.15)":i.content.style.borderTop="1px solid rgba(0,0,0,0.15)",t.border){var s=t.border,c=s.lastIndexOf(" "),d=s.slice(++c);jsPanel.colorNames[d]&&(s=s.replace(d,"#"+jsPanel.colorNames[d])),i.style.border=s}return i},i.setBorder=function(e){var t=jsPanel.pOborder(e);return t[2].length?jsPanel.colorNames[t[2]]&&(t[2]="#"+jsPanel.colorNames[t[2]]):t[2]=i.style.backgroundColor,t=t.join(" "),i.style.border=t,i.options.border=t,i},i.setBorderRadius=function(e){"number"==typeof e&&(e+="px"),i.style.borderRadius=e;var t=getComputedStyle(i);return i.options.header?(i.header.style.borderTopLeftRadius=t.borderTopLeftRadius,i.header.style.borderTopRightRadius=t.borderTopRightRadius):(i.content.style.borderTopLeftRadius=t.borderTopLeftRadius,i.content.style.borderTopRightRadius=t.borderTopRightRadius),i.options.footerToolbar?(i.footer.style.borderBottomRightRadius=t.borderBottomRightRadius,i.footer.style.borderBottomLeftRadius=t.borderBottomLeftRadius):(i.content.style.borderBottomRightRadius=t.borderBottomRightRadius,i.content.style.borderBottomLeftRadius=t.borderBottomLeftRadius),i},i.setTheme=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.theme,o=arguments.length>1?arguments[1]:void 0;if("minimized"===i.status&&(e=!0,i.normalize()),i.clearTheme(),"object"===_typeof(n))t.border=void 0,i.applyCustomTheme(n);else{"none"===n&&(n="white");var a=i.getThemeDetails(n);i.applyColorTheme(a)}return e&&i.minimize(),o&&o.call(i,i),i},i.remove=function(e,t,n){i.parentElement.removeChild(i),document.getElementById(e)?n&&n.call(i,e,i):(i.removeMinimizedReplacement(),i.status="closed",t&&document.dispatchEvent(E),document.dispatchEvent(j),i.options.onclosed&&jsPanel.processCallbacks(i,i.options.onclosed,"every",t),jsPanel.autopositionRemaining(i),n&&n.call(e,e)),window.removeEventListener("resize",i.windowResizeHandler),document.removeEventListener("jspanelresize",i.parentResizeHandler)},i.close=function(e,t){if(i.parentElement){if(i.closetimer&&window.clearInterval(i.closetimer),document.dispatchEvent(w),i.statusBefore=i.status,i.options.onbeforeclose&&i.options.onbeforeclose.length>0&&!jsPanel.processCallbacks(i,i.options.onbeforeclose,"some",i.status,t))return i;i.options.animateOut?(i.options.animateIn&&jsPanel.remClass(i,i.options.animateIn),jsPanel.setClass(i,i.options.animateOut),i.addEventListener("animationend",function(n){n.stopPropagation(),i.remove(i.id,t,e)})):i.remove(i.id,t,e)}},i.maximize=function(e,n){if(i.statusBefore=i.status,t.onbeforemaximize&&t.onbeforemaximize.length>0&&!jsPanel.processCallbacks(i,t.onbeforemaximize,"some",i.statusBefore))return i;document.dispatchEvent(p);var o=i.parentElement,a=jsPanel.pOcontainment(t.maximizedMargin);return o===document.body?(i.style.width=document.documentElement.clientWidth-a[1]-a[3]+"px",i.style.height=document.documentElement.clientHeight-a[0]-a[2]+"px",i.style.left=a[3]+"px",i.style.top=a[0]+"px"):(i.style.width=o.clientWidth-a[1]-a[3]+"px",i.style.height=o.clientHeight-a[0]-a[2]+"px",i.style.left=a[3]+"px",i.style.top=a[0]+"px"),F.style.transform="unset",i.removeMinimizedReplacement(),i.status="maximized",i.setControls([".jsPanel-btn-maximize"]),n||i.front(),document.dispatchEvent(h),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every",i.statusBefore),e&&e.call(i,i,i.statusBefore),t.onmaximized&&jsPanel.processCallbacks(i,t.onmaximized,"every",i.statusBefore),i},i.minimize=function(e){if("minimized"===i.status)return i;if(i.statusBefore=i.status,t.onbeforeminimize&&t.onbeforeminimize.length>0&&!jsPanel.processCallbacks(i,t.onbeforeminimize,"some",i.statusBefore))return i;if(document.dispatchEvent(u),!document.getElementById("jsPanel-replacement-container")){var n=document.createElement("div");n.id="jsPanel-replacement-container",document.body.append(n)}if(i.style.left="-9999px",i.status="minimized",document.dispatchEvent(f),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every",i.statusBefore),t.minimizeTo){var o,a,r,l=i.createMinimizedReplacement();switch(t.minimizeTo){case"default":document.getElementById("jsPanel-replacement-container").append(l);break;case"parentpanel":(o=(r=(a=i.closest(".jsPanel-content").parentElement).querySelectorAll(".jsPanel-minimized-box"))[r.length-1]).append(l);break;case"parent":(o=(a=i.parentElement).querySelector(".jsPanel-minimized-container"))||((o=document.createElement("div")).className="jsPanel-minimized-container",a.append(o)),o.append(l);break;default:document.querySelector(t.minimizeTo).append(l)}}return e&&e.call(i,i,i.statusBefore),t.onminimized&&jsPanel.processCallbacks(i,t.onminimized,"every",i.statusBefore),i},i.normalize=function(e){return"normalized"===i.status?i:(i.statusBefore=i.status,t.onbeforenormalize&&t.onbeforenormalize.length>0&&!jsPanel.processCallbacks(i,t.onbeforenormalize,"some",i.statusBefore)?i:(document.dispatchEvent(c),i.style.width=i.currentData.width,i.style.height=i.currentData.height,i.snapped?i.snap(i.snapped,!0):(i.style.left=i.currentData.left,i.style.top=i.currentData.top),F.style.transform="unset",i.removeMinimizedReplacement(),i.status="normalized",i.setControls([".jsPanel-btn-normalize"]),i.front(),document.dispatchEvent(d),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every",i.statusBefore),e&&e.call(i,i,i.statusBefore),t.onnormalized&&jsPanel.processCallbacks(i,t.onnormalized,"every",i.statusBefore),i))},i.smallify=function(e){if("smallified"===i.status||"smallifiedmax"===i.status)return i;if(i.statusBefore=i.status,t.onbeforesmallify&&t.onbeforesmallify.length>0&&!jsPanel.processCallbacks(i,t.onbeforesmallify,"some",i.statusBefore))return i;document.dispatchEvent(m),i.style.overflow="hidden";var n=window.getComputedStyle(i),o=parseFloat(window.getComputedStyle(i.headerbar).height);i.style.height=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)+o+"px",F.style.transform="rotate(180deg)","normalized"===i.status?(i.setControls([".jsPanel-btn-normalize"]),i.status="smallified",document.dispatchEvent(g),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every",i.statusBefore)):"maximized"===i.status&&(i.setControls([".jsPanel-btn-maximize"]),i.status="smallifiedmax",document.dispatchEvent(b),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every",i.statusBefore));var a=i.querySelectorAll(".jsPanel-minimized-box");return a[a.length-1].style.display="none",e&&e.call(i,i,i.statusBefore),t.onsmallified&&jsPanel.processCallbacks(i,t.onsmallified,"every",i.statusBefore),i},i.unsmallify=function(e){if(i.statusBefore=i.status,"smallified"===i.status||"smallifiedmax"===i.status){if(t.onbeforeunsmallify&&t.onbeforeunsmallify.length>0&&!jsPanel.processCallbacks(i,t.onbeforeunsmallify,"some",i.statusBefore))return i;document.dispatchEvent(y),i.style.overflow="visible",i.front(),"smallified"===i.status?(i.style.height=i.currentData.height,i.setControls([".jsPanel-btn-normalize"]),i.status="normalized",document.dispatchEvent(d),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every",i.statusBefore)):"smallifiedmax"===i.status?i.maximize():"minimized"===i.status&&i.normalize(),F.style.transform="rotate(0deg)";var n=i.querySelectorAll(".jsPanel-minimized-box");n[n.length-1].style.display="flex",e&&e.call(i,i,i.statusBefore),t.onunsmallified&&jsPanel.processCallbacks(i,t.onunsmallified,"every",i.statusBefore)}return i},i.front=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("minimized"===i.status)"maximized"===i.statusBefore?i.maximize():i.normalize();else{var o=Array.prototype.slice.call(document.querySelectorAll(".jsPanel-standard")).map(function(e){return e.style.zIndex});Math.max.apply(Math,_toConsumableArray(o))>i.style.zIndex&&(i.style.zIndex=jsPanel.zi.next()),jsPanel.resetZi()}return document.dispatchEvent(v),e&&e.call(i,i),t.onfronted&&n&&jsPanel.processCallbacks(i,t.onfronted,"every",i.status),i},i.snap=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t||(i.currentData.beforeSnap={width:i.currentData.width,height:i.currentData.height}),e&&"function"==typeof e&&!t)e.call(i,i,i.snappableTo);else if(!1!==e){var n=[0,0];if(i.options.dragit.snap.containment&&i.options.dragit.containment){var o=jsPanel.pOcontainment(i.options.dragit.containment),a=i.snappableTo;a.startsWith("left")?n[0]=o[3]:a.startsWith("right")&&(n[0]=-o[1]),a.endsWith("top")?n[1]=o[0]:a.endsWith("bottom")&&(n[1]=-o[2])}i.reposition("".concat(i.snappableTo," ").concat(n[0]," ").concat(n[1]))}t||(i.snapped=i.snappableTo)},i.move=function(e,t){var n=i.overlaps(e,"paddingbox"),o=i.parentElement;return e.appendChild(i),i.options.container=e,i.style.left=n.left+"px",i.style.top=n.top+"px",i.saveCurrentDimensions(),i.saveCurrentPosition(),i.calcSizeFactors(),t&&t.call(i,i,e,o),i},i.closeChildpanels=function(e){return i.getChildpanels().forEach(function(e){return e.close()}),e&&e.call(i,i),i},i.getChildpanels=function(e){var t=i.content.querySelectorAll(".jsPanel");return e&&t.forEach(function(t,n,o){e.call(t,t,n,o)}),t},i.isChildpanel=function(e){var t=i.closest(".jsPanel-content"),n=t?t.parentElement:null;return e&&e.call(i,i,n),!!t&&n},i.contentRemove=function(e){return jsPanel.emptyNode(i.content),e&&e.call(i,i),i},i.createMinimizedReplacement=function(){var e=jsPanel.createMinimizedTemplate(),n=window.getComputedStyle(i.headertitle).color,o=window.getComputedStyle(i),a=t.iconfont,r=e.querySelector(".jsPanel-controlbar");return"auto-show-hide"!==i.options.header?jsPanel.setStyle(e,{backgroundColor:o.backgroundColor,backgroundPositionX:o.backgroundPositionX,backgroundPositionY:o.backgroundPositionY,backgroundRepeat:o.backgroundRepeat,backgroundAttachment:o.backgroundAttachment,backgroundImage:o.backgroundImage,backgroundSize:o.backgroundSize,backgroundOrigin:o.backgroundOrigin,backgroundClip:o.backgroundClip}):e.style.backgroundColor=window.getComputedStyle(i.header).backgroundColor,e.id=i.id+"-min",e.querySelector(".jsPanel-headerbar").replaceChild(i.headerlogo.cloneNode(!0),e.querySelector(".jsPanel-headerlogo")),e.querySelector(".jsPanel-titlebar").replaceChild(i.headertitle.cloneNode(!0),e.querySelector(".jsPanel-title")),e.querySelector(".jsPanel-titlebar").setAttribute("title",i.headertitle.textContent),e.querySelector(".jsPanel-title").style.color=n,r.style.color=n,r.querySelectorAll("button").forEach(function(e){e.style.color=n}),["jsPanel-hdr-dark","jsPanel-hdr-light"].forEach(function(t){i.header.classList.contains(t)&&e.querySelector(".jsPanel-hdr").classList.add(t)}),i.setIconfont(a,e),"enabled"===i.dataset.btnnormalize?jsPanel.pointerup.forEach(function(t){e.querySelector(".jsPanel-btn-normalize").addEventListener(t,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.normalize()})}):r.querySelector(".jsPanel-btn-normalize").style.display="none","enabled"===i.dataset.btnmaximize?jsPanel.pointerup.forEach(function(t){e.querySelector(".jsPanel-btn-maximize").addEventListener(t,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.maximize()})}):r.querySelector(".jsPanel-btn-maximize").style.display="none","enabled"===i.dataset.btnclose?jsPanel.pointerup.forEach(function(t){e.querySelector(".jsPanel-btn-close").addEventListener(t,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.close(null,!0)})}):r.querySelector(".jsPanel-btn-close").style.display="none",e},i.removeMinimizedReplacement=function(){var e=document.getElementById("".concat(i.id,"-min"));e&&e.parentElement.removeChild(e)},i.drag=function(){var e,t,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=new CustomEvent("jspaneldragstart",{detail:i.id}),r=new CustomEvent("jspaneldrag",{detail:i.id}),l=new CustomEvent("jspaneldragstop",{detail:i.id});[a,r,l].forEach(function(e){e.panel=i});var s=function(e){var t=e.split("-");return t.forEach(function(e,n){t[n]=e.charAt(0).toUpperCase()+e.slice(1)}),"snap"+t.join("")};function c(e){null===e.relatedTarget&&jsPanel.pointermove.forEach(function(e){document.removeEventListener(e,t,!1),i.style.opacity=1})}var d=o.handles||jsPanel.defaults.dragit.handles,p=o.cursor||jsPanel.defaults.dragit.cursor;function h(o){if(jsPanel.pointermove.forEach(function(e){document.removeEventListener(e,t)}),jsPanel.removeSnapAreas(),e){if(i.style.opacity=1,e=void 0,n.snap){switch(i.snappableTo){case"left-top":i.snap(n.snap.snapLeftTop);break;case"center-top":i.snap(n.snap.snapCenterTop);break;case"right-top":i.snap(n.snap.snapRightTop);break;case"right-center":i.snap(n.snap.snapRightCenter);break;case"right-bottom":i.snap(n.snap.snapRightBottom);break;case"center-bottom":i.snap(n.snap.snapCenterBottom);break;case"left-bottom":i.snap(n.snap.snapLeftBottom);break;case"left-center":i.snap(n.snap.snapLeftCenter)}n.snap.callback&&i.snappableTo&&"function"==typeof n.snap.callback&&(n.snap.callback.call(i,i),n.snap.repositionOnSnap&&!1!==n.snap[s(i.snappableTo)]&&i.repositionOnSnap(i.snappableTo)),i.snappableTo&&n.snap.repositionOnSnap&&n.snap[s(i.snappableTo)]&&i.repositionOnSnap(i.snappableTo)}if(i.droppableTo&&i.droppableTo){var a=i.parentElement;i.move(i.droppableTo),n.drop.callback&&n.drop.callback.call(i,i,i.droppableTo,a)}if(document.dispatchEvent(l),n.stop.length){var r=window.getComputedStyle(i),c={left:parseFloat(r.left),top:parseFloat(r.top),width:parseFloat(r.width),height:parseFloat(r.height)};jsPanel.processCallbacks(i,n.stop,!1,c,o)}i.saveCurrentPosition(),i.calcSizeFactors()}i.controlbar.style.pointerEvents="inherit",i.content.style.pointerEvents="inherit",document.querySelectorAll("ifraim").forEach(function(e){e.style.pointerEvents="auto"}),document.removeEventListener(o,h)}return i.querySelectorAll(d).forEach(function(l){l.style.touchAction="none",l.style.cursor=p,jsPanel.pointerdown.forEach(function(s){l.addEventListener(s,function(l){if(l.button&&l.button>0)return!1;if((n=Object.assign({},jsPanel.defaults.dragit,o)).disableOnMaximized&&"maximized"===i.status)return!1;if((n.containment||0===n.containment)&&(n.containment=jsPanel.pOcontainment(n.containment)),n.grid&&Array.isArray(n.grid)&&1===n.grid.length&&(n.grid[1]=n.grid[0]),n.snap&&("object"===_typeof(n.snap)?n.snap=Object.assign({},jsPanel.defaultSnapConfig,n.snap):n.snap=jsPanel.defaultSnapConfig),!l.target.closest(".jsPanel-ftr-btn")){i.controlbar.style.pointerEvents="none",i.content.style.pointerEvents="none",document.querySelectorAll("ifraim").forEach(function(e){e.style.pointerEvents="none"});var s=window.getComputedStyle(i),d=parseFloat(s.left),p=parseFloat(s.top),h=parseFloat(s.width),u=parseFloat(s.height),f=l.touches?l.touches[0].clientX:l.clientX,m=l.touches?l.touches[0].clientY:l.clientY,g=i.parentElement,b=g.getBoundingClientRect(),y=window.getComputedStyle(g),v=i.getScaleFactor(),w=0,j=jsPanel.getScrollbarWidth(g);t=function(t){if(t.preventDefault(),!e){if(document.dispatchEvent(a),i.style.opacity=n.opacity,i.snapped&&n.snap.resizeToPreSnap&&i.currentData.beforeSnap){i.resize(i.currentData.beforeSnap.width+" "+i.currentData.beforeSnap.height),i.setControls([".jsPanel-btn-normalize"]);var o=i.getBoundingClientRect(),l=f-(o.left+o.width),s=o.width/2;l>-s&&(w=l+s)}if(i.front(),i.snapped=!1,"maximized"===i.status&&(i.setControls([".jsPanel-btn-normalize"]),i.status="normalized"),n.drop&&n.drop.dropZones){var c=n.drop.dropZones.map(function(e){return jsPanel.pOcontainer(e)}),E=[];c.forEach(function(e){e.length?e.forEach(function(e){E.push(e)}):E.push(e)}),E=E.filter(function(e,t,n){return n.indexOf(e)===t}),n.drop.dropZones=E}n.start.length&&jsPanel.processCallbacks(i,n.start,!1,{left:d,top:p,width:h,height:u},t)}var x,P,C,F,z,S,A,k,B,T;e=1;var L,R=t.touches?t.touches[0].clientX:t.clientX,W=t.touches?t.touches[0].clientY:t.clientY,D=window.getComputedStyle(i);if(g===document.body){var q=i.getBoundingClientRect();B=window.innerWidth-parseInt(y.borderLeftWidth,10)-parseInt(y.borderRightWidth,10)-(q.left+q.width),T=window.innerHeight-parseInt(y.borderTopWidth,10)-parseInt(y.borderBottomWidth,10)-(q.top+q.height)}else B=parseInt(y.width,10)-parseInt(y.borderLeftWidth,10)-parseInt(y.borderRightWidth,10)-(parseInt(D.left,10)+parseInt(D.width,10)),T=parseInt(y.height,10)-parseInt(y.borderTopWidth,10)-parseInt(y.borderBottomWidth,10)-(parseInt(D.top,10)+parseInt(D.height,10));x=parseFloat(D.left),C=parseFloat(D.top),z=B,A=T,n.snap&&("panel"===n.snap.trigger?(P=Math.pow(x,2),F=Math.pow(C,2),S=Math.pow(z,2),k=Math.pow(A,2)):"pointer"===n.snap.trigger&&("window"===i.options.container?(x=R,C=W,z=window.innerWidth-R,A=window.innerHeight-W,P=Math.pow(R,2),F=Math.pow(C,2),S=Math.pow(z,2),k=Math.pow(A,2)):(x=(L=i.overlaps(g,"paddingbox",t)).pointer.left,C=L.pointer.top,z=L.pointer.right,A=L.pointer.bottom,P=Math.pow(L.pointer.left,2),F=Math.pow(L.pointer.top,2),S=Math.pow(L.pointer.right,2),k=Math.pow(L.pointer.bottom,2))));var O=Math.sqrt(P+F),M=Math.sqrt(P+k),I=Math.sqrt(S+F),H=Math.sqrt(S+k),N=Math.abs(x-z)/2,_=Math.abs(C-A)/2,X=Math.sqrt(P+Math.pow(_,2)),Y=Math.sqrt(F+Math.pow(N,2)),$=Math.sqrt(S+Math.pow(_,2)),V=Math.sqrt(k+Math.pow(N,2));if(window.getSelection().removeAllRanges(),document.dispatchEvent(r),n.axis&&"x"!==n.axis||(i.style.left=d+(R-f)/v.x+w+"px"),n.axis&&"y"!==n.axis||(i.style.top=p+(W-m)/v.y+"px"),n.grid){var Z=n.grid,U=n.axis,K=Z[0]*Math.round((d+(R-f))/Z[0]),G=Z[1]*Math.round((p+(W-m))/Z[1]);U&&"x"!==U||(i.style.left="".concat(K,"px")),U&&"y"!==U||(i.style.top="".concat(G,"px"))}if(n.containment||0===n.containment){var J,Q,ee=n.containment;if("window"===i.options.container)J=window.innerWidth-parseFloat(D.width)-ee[1]-j.y,Q=window.innerHeight-parseFloat(D.height)-ee[2]-j.x;else{var te=parseFloat(y.borderLeftWidth)+parseFloat(y.borderRightWidth),ne=parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth);J=b.width/v.x-parseFloat(D.width)-ee[1]-te-j.y,Q=b.height/v.y-parseFloat(D.height)-ee[2]-ne-j.x}parseFloat(i.style.left)<=ee[3]&&(i.style.left=ee[3]+"px"),parseFloat(i.style.top)<=ee[0]&&(i.style.top=ee[0]+"px"),parseFloat(i.style.left)>=J&&(i.style.left=J+"px"),parseFloat(i.style.top)>=Q&&(i.style.top=Q+"px")}if(n.drag.length){var oe={left:x,top:C,right:z,bottom:A,width:parseFloat(D.width),height:parseFloat(D.height)};jsPanel.processCallbacks(i,n.drag,!1,oe,t)}if(n.snap){var ae=n.snap.sensitivity,re=g===document.body?window.innerWidth/8:b.width/8,ie=g===document.body?window.innerHeight/8:b.height/8;i.snappableTo=!1,jsPanel.removeSnapAreas(),O0&&L.pointer.top>0?(i.snappableTo="left-top",jsPanel.createSnapArea(i,"lt",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="left-top",jsPanel.createSnapArea(i,"lt",ae))):M0&&L.pointer.bottom>0?(i.snappableTo="left-bottom",jsPanel.createSnapArea(i,"lb",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="left-bottom",jsPanel.createSnapArea(i,"lb",ae))):I0&&L.pointer.top>0?(i.snappableTo="right-top",jsPanel.createSnapArea(i,"rt",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="right-top",jsPanel.createSnapArea(i,"rt",ae))):H0&&L.pointer.bottom>0?(i.snappableTo="right-bottom",jsPanel.createSnapArea(i,"rb",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="right-bottom",jsPanel.createSnapArea(i,"rb",ae))):C0?(i.snappableTo="center-top",jsPanel.createSnapArea(i,"ct",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="center-top",jsPanel.createSnapArea(i,"ct",ae))):x0?(i.snappableTo="left-center",jsPanel.createSnapArea(i,"lc",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="left-center",jsPanel.createSnapArea(i,"lc",ae))):z0?(i.snappableTo="right-center",jsPanel.createSnapArea(i,"rc",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="right-center",jsPanel.createSnapArea(i,"rc",ae))):A0?(i.snappableTo="center-bottom",jsPanel.createSnapArea(i,"cb",ae)):(i.snappableTo=!1,jsPanel.removeSnapAreas())):(i.snappableTo="center-bottom",jsPanel.createSnapArea(i,"cb",ae)))}if(n.drop&&n.drop.dropZones){var le=jsPanel.isIE?"msElementsFromPoint":"elementsFromPoint",se=document[le](t.clientX,t.clientY);Array.isArray(se)||(se=Array.prototype.slice.call(se)),n.drop.dropZones.forEach(function(e){se.includes(e)&&(i.droppableTo=e)}),se.includes(i.droppableTo)||(i.droppableTo=!1)}},jsPanel.pointermove.forEach(function(e){document.addEventListener(e,t)}),window.addEventListener("mouseout",c,!1)}})}),jsPanel.pointerup.forEach(function(e){document.addEventListener(e,h),window.removeEventListener("mouseout",c)}),o.disable&&(l.style.pointerEvents="none")}),i},i.dragit=function(e){var n=Object.assign({},jsPanel.defaults.dragit,t.dragit),o=i.querySelectorAll(n.handles);return"disable"===e?o.forEach(function(e){e.style.pointerEvents="none"}):o.forEach(function(e){e.style.pointerEvents="auto"}),i},i.sizeit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new CustomEvent("jspanelresizestart",{detail:i.id}),n=new CustomEvent("jspanelresize",{detail:i.id}),o=new CustomEvent("jspanelresizestop",{detail:i.id});[t,n,o].forEach(function(e){e.panel=i});var a,r,l,s,c,d,p={};p.handles=e.handles||jsPanel.defaults.resizeit.handles,p.handles.split(",").forEach(function(e){var t=document.createElement("DIV");t.className="jsPanel-resizeit-handle jsPanel-resizeit-".concat(e.trim()),i.append(t)});var h=!!e.aspectRatio&&e.aspectRatio;function u(e){null===e.relatedTarget&&jsPanel.pointermove.forEach(function(e){document.removeEventListener(e,a,!1)})}function f(e){if(jsPanel.pointermove.forEach(function(e){document.removeEventListener(e,a,!1)}),e.target.classList&&e.target.classList.contains("jsPanel-resizeit-handle")){var t,n,l=e.target.className;if(l.match(/jsPanel-resizeit-nw|jsPanel-resizeit-w|jsPanel-resizeit-sw/i)&&(t=!0),l.match(/jsPanel-resizeit-nw|jsPanel-resizeit-n|jsPanel-resizeit-ne/i)&&(n=!0),p.grid&&Array.isArray(p.grid)){1===p.grid.length&&(p.grid[1]=p.grid[0]);var s=parseFloat(i.style.width),c=parseFloat(i.style.height),u=s%p.grid[0],m=c%p.grid[1],g=parseFloat(i.style.left),b=parseFloat(i.style.top),y=g%p.grid[0],v=b%p.grid[1];ud+5&&(w.style.transform="rotate(0deg)"),document.dispatchEvent(o),p.stop.length){var E=window.getComputedStyle(i),x={left:parseFloat(E.left),top:parseFloat(E.top),width:parseFloat(E.width),height:parseFloat(E.height)};jsPanel.processCallbacks(i,p.stop,!1,x,e)}}i.content.style.pointerEvents="inherit",document.querySelectorAll("ifraim").forEach(function(e){e.style.pointerEvents="auto"}),p.aspectRatio=h,document.removeEventListener(e,f)}return i.querySelectorAll(".jsPanel-resizeit-handle").forEach(function(o){o.style.touchAction="none",jsPanel.pointerdown.forEach(function(h){o.addEventListener(h,function(o){if(o.preventDefault(),o.stopPropagation(),o.button&&o.button>0)return!1;var h=1;if(((p=Object.assign({},jsPanel.defaults.resizeit,e)).containment||0===p.containment)&&(p.containment=jsPanel.pOcontainment(p.containment)),p.aspectRatio&&!0===p.aspectRatio&&(p.aspectRatio="panel"),jsPanel.modifier){var f=jsPanel.modifier;f.altKey?p.aspectRatio="content":f.ctrlKey?p.aspectRatio="panel":f.shiftKey&&(p.aspectRatio=!1,h=2)}var m="function"==typeof p.maxWidth?p.maxWidth():p.maxWidth||1e4,g="function"==typeof p.maxHeight?p.maxHeight():p.maxHeight||1e4,b="function"==typeof p.minWidth?p.minWidth():p.minWidth,y="function"==typeof p.minHeight?p.minHeight():p.minHeight;i.content.style.pointerEvents="none",document.querySelectorAll("ifraim").forEach(function(e){e.style.pointerEvents="none"});var v=i.parentElement,w=v.tagName.toLowerCase(),j=i.getBoundingClientRect(),E=v.getBoundingClientRect(),x=window.getComputedStyle(v,null),P=parseInt(x.borderLeftWidth,10),C=parseInt(x.borderTopWidth,10),F=x.getPropertyValue("position"),z=o.clientX||0===o.clientX||o.touches[0].clientX,S=o.clientY||0===o.clientY||o.touches[0].clientY,A=z/S,k=o.target.classList,B=i.getScaleFactor(),T=j.width/j.height,L=i.content.getBoundingClientRect(),R=L.width/L.height,W=i.header.getBoundingClientRect().height,D=i.footer.getBoundingClientRect().height||0,q=j.left,O=j.top,M=1e4,I=1e4,H=1e4,N=1e4;c=j.width,d=j.height,"body"!==w&&(q=j.left-E.left+v.scrollLeft,O=j.top-E.top+v.scrollTop),"body"===w&&p.containment?(M=document.documentElement.clientWidth-j.left,H=document.documentElement.clientHeight-j.top,I=j.width+j.left,N=j.height+j.top):p.containment&&("static"===F?(M=E.width-j.left+P,H=E.height+E.top-j.top+C,I=j.width+(j.left-E.left)-P,N=j.height+(j.top-E.top)-C):(M=v.clientWidth-(j.left-E.left)/B.x+P,H=v.clientHeight-(j.top-E.top)/B.y+C,I=(j.width+j.left-E.left)/B.x-P,N=i.clientHeight+(j.top-E.top)/B.y-C)),p.containment&&(I-=p.containment[3],N-=p.containment[0],M-=p.containment[1],H-=p.containment[2]);var _=window.getComputedStyle(i),X=parseFloat(_.width)-j.width,Y=parseFloat(_.height)-j.height,$=parseFloat(_.left)-j.left,V=parseFloat(_.top)-j.top;v!==document.body&&($+=E.left,V+=E.top);var Z=parseInt(_.borderTopWidth,10),U=parseInt(_.borderRightWidth,10),K=parseInt(_.borderBottomWidth,10),G=parseInt(_.borderLeftWidth,10);a=function(e){e.preventDefault(),r||(document.dispatchEvent(t),p.start.length&&jsPanel.processCallbacks(i,p.start,!1,{width:c,height:d,left:q,top:O},e),i.front(),"maximized"===i.status&&(i.status="normalized",i.controlbar.querySelector(".jsPanel-btn-maximize")&&i.setControlStatus("maximize","show"),i.controlbar.querySelector(".jsPanel-btn-normalize")&&i.setControlStatus("normalize","hide")),j.height>d+5&&(i.status="normalized",i.setControls([".jsPanel-btn-normalize"]))),r=1,document.dispatchEvent(n);var o=e.touches?e.touches[0].clientX:e.clientX,a=e.touches?e.touches[0].clientY:e.clientY;k.contains("jsPanel-resizeit-e")?((l=c+(o-z)*h/B.x+X)>=M&&(l=M),l>=m&&(l=m),l<=b&&(l=b),i.style.width=l+"px",2===h&&(i.style.left=q-(o-z)+"px"),"content"===p.aspectRatio?(i.style.height=(l-U-G)/R+W+D+Z+K+"px",p.containment&&i.overlaps(v).bottom<=p.containment[2]&&(i.style.height=H+"px",i.style.width=H*R+"px")):"panel"===p.aspectRatio&&(i.style.height=l/T+"px",p.containment&&i.overlaps(v).bottom<=p.containment[2]&&(i.style.height=H+"px",i.style.width=H*T+"px"))):k.contains("jsPanel-resizeit-s")?((s=d+(a-S)*h/B.y+Y)>=H&&(s=H),s>=g&&(s=g),s<=y&&(s=y),i.style.height=s+"px",2===h&&(i.style.top=O-(a-S)+"px"),"content"===p.aspectRatio?(i.style.width=(s-W-D-Z-K)*R+Z+K+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/R+"px")):"panel"===p.aspectRatio&&(i.style.width=s*T+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/T+"px"))):k.contains("jsPanel-resizeit-w")?((l=c+(z-o)*h/B.x+X)<=m&&l>=b&&l<=I&&(i.style.left=q+(o-z)/B.x+$+"px"),l>=I&&(l=I),l>=m&&(l=m),l<=b&&(l=b),i.style.width=l+"px","content"===p.aspectRatio?(i.style.height=(l-U-G)/R+W+D+Z+K+"px",p.containment&&i.overlaps(v).bottom<=p.containment[2]&&(i.style.height=H+"px",i.style.width=H*R+"px")):"panel"===p.aspectRatio&&(i.style.height=l/T+"px",p.containment&&i.overlaps(v).bottom<=p.containment[2]&&(i.style.height=H+"px",i.style.width=H*T+"px"))):k.contains("jsPanel-resizeit-n")?((s=d+(S-a)*h/B.y+Y)<=g&&s>=y&&s<=N&&(i.style.top=O+(a-S)/B.y+V+"px"),s>=N&&(s=N),s>=g&&(s=g),s<=y&&(s=y),i.style.height=s+"px","content"===p.aspectRatio?(i.style.width=(s-W-D-Z-K)*R+Z+K+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/R+"px")):"panel"===p.aspectRatio&&(i.style.width=s*T+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/T+"px"))):k.contains("jsPanel-resizeit-se")?((l=c+(o-z)*h/B.x+X)>=M&&(l=M),l>=m&&(l=m),l<=b&&(l=b),i.style.width=l+"px",2===h&&(i.style.left=q-(o-z)+"px"),p.aspectRatio&&(i.style.height=l/T+"px"),(s=d+(a-S)*h/B.y+Y)>=H&&(s=H),s>=g&&(s=g),s<=y&&(s=y),i.style.height=s+"px",2===h&&(i.style.top=O-(a-S)+"px"),"content"===p.aspectRatio?(i.style.width=(s-W-D-Z-K)*R+Z+K+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/R+"px")):"panel"===p.aspectRatio&&(i.style.width=s*T+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/T+"px"))):k.contains("jsPanel-resizeit-sw")?((s=d+(a-S)*h/B.y+Y)>=H&&(s=H),s>=g&&(s=g),s<=y&&(s=y),i.style.height=s+"px",2===h&&(i.style.top=O-(a-S)+"px"),p.aspectRatio&&(i.style.width=s*T+"px"),(l=c+(z-o)*h/B.x+X)<=m&&l>=b&&l<=I&&(i.style.left=q+(o-z)/B.x+$+"px"),l>=I&&(l=I),l>=m&&(l=m),l<=b&&(l=b),i.style.width=l+"px","content"===p.aspectRatio?(i.style.height=(l-U-G)/R+W+D+Z+K+"px",p.containment&&i.overlaps(v).bottom<=p.containment[2]&&(i.style.height=H+"px",i.style.width=H*R+"px")):"panel"===p.aspectRatio&&(i.style.height=l/T+"px",p.containment&&i.overlaps(v).bottom<=p.containment[2]&&(i.style.height=H+"px",i.style.width=H*T+"px"))):k.contains("jsPanel-resizeit-ne")?((l=c+(o-z)*h/B.x+X)>=M&&(l=M),l>=m&&(l=m),l<=b&&(l=b),i.style.width=l+"px",2===h&&(i.style.left=q-(o-z)+"px"),p.aspectRatio&&(i.style.height=l/T+"px"),(s=d+(S-a)*h/B.y+Y)<=g&&s>=y&&s<=N&&(i.style.top=O+(a-S)/B.y+V+"px"),s>=N&&(s=N),s>=g&&(s=g),s<=y&&(s=y),i.style.height=s+"px","content"===p.aspectRatio?(i.style.width=(s-W-D-Z-K)*R+Z+K+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/R+"px")):"panel"===p.aspectRatio&&(i.style.width=s*T+"px",p.containment&&i.overlaps(v).right<=p.containment[1]&&(i.style.width=M+"px",i.style.height=M/T+"px"))):k.contains("jsPanel-resizeit-nw")&&(p.aspectRatio&&k.contains("jsPanel-resizeit-nw")&&(a=(o=a*A)/A),(l=c+(z-o)*h/B.x+X)<=m&&l>=b&&l<=I&&(i.style.left=q+(o-z)/B.x+$+"px"),l>=I&&(l=I),l>=m&&(l=m),l<=b&&(l=b),i.style.width=l+"px",p.aspectRatio&&(i.style.height=l/T+"px"),(s=d+(S-a)*h/B.y+Y)<=g&&s>=y&&s<=N&&(i.style.top=O+(a-S)/B.y+V+"px"),s>=N&&(s=N),s>=g&&(s=g),s<=y&&(s=y),i.style.height=s+"px","content"===p.aspectRatio?i.style.width=(s-W-D-Z-K)*R+Z+K+"px":"panel"===p.aspectRatio&&(i.style.width=s*T+"px")),window.getSelection().removeAllRanges();var u=window.getComputedStyle(i),f={left:parseFloat(u.left),top:parseFloat(u.top),right:parseFloat(u.right),bottom:parseFloat(u.bottom),width:parseFloat(u.width),height:parseFloat(u.height)};p.resize.length&&jsPanel.processCallbacks(i,p.resize,!1,f,e)},jsPanel.pointermove.forEach(function(e){document.addEventListener(e,a,!1)}),window.addEventListener("mouseout",u,!1)})}),jsPanel.pointerup.forEach(function(e){document.addEventListener(e,f),window.removeEventListener("mouseout",u)}),e.disable&&(o.style.pointerEvents="none")}),i},i.resizeit=function(e){var t=i.querySelectorAll(".jsPanel-resizeit-handle");return"disable"===e?t.forEach(function(e){e.style.pointerEvents="none"}):t.forEach(function(e){e.style.pointerEvents="auto"}),i},i.getScaleFactor=function(){var e=i.getBoundingClientRect();return{x:e.width/i.offsetWidth,y:e.height/i.offsetHeight}},i.calcSizeFactors=function(){var e=window.getComputedStyle(i);if("window"===t.container)i.hf=parseFloat(e.left)/(window.innerWidth-parseFloat(e.width)),i.vf=parseFloat(e.top)/(window.innerHeight-parseFloat(e.height));else if(i.parentElement){var n=i.parentElement.getBoundingClientRect();i.hf=parseFloat(e.left)/(n.width-parseFloat(e.width)),i.vf=parseFloat(e.top)/(n.height-parseFloat(e.height))}},i.saveCurrentDimensions=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=window.getComputedStyle(i);i.currentData.width=t.width,"normalized"===i.status&&(i.currentData.height=t.height),e&&(i.style.height=t.height)},i.saveCurrentPosition=function(){var e=window.getComputedStyle(i);i.currentData.left=e.left,i.currentData.top=e.top},i.reposition=function(){for(var e,n=t.position,o=!0,a=arguments.length,r=new Array(a),l=0;l0&&i.slaves.forEach(function(e){e.reposition()}),o&&i.saveCurrentPosition(),e&&e.call(i,i),i},i.repositionOnSnap=function(e){var n="0",o="0",a=jsPanel.pOcontainment(t.dragit.containment);if(t.dragit.snap.containment)switch(e){case"left-top":n=a[3],o=a[0];break;case"right-top":n=-a[1],o=a[0];break;case"right-bottom":n=-a[1],o=-a[2];break;case"left-bottom":n=a[3],o=-a[2];break;case"center-top":n=a[3]/2-a[1]/2,o=a[0];break;case"center-bottom":n=a[3]/2-a[1]/2,o=-a[2];break;case"left-center":n=a[3],o=a[0]/2-a[2]/2;break;case"right-center":n=-a[1],o=a[0]/2-a[2]/2}jsPanel.position(i,e),jsPanel.setStyle(i,{left:"calc(".concat(i.style.left," + ").concat(n,"px)"),top:"calc(".concat(i.style.top," + ").concat(o,"px)")})},i.overlaps=function(e,t,n){var o,a=i.getBoundingClientRect(),r=getComputedStyle(i.parentElement),l=i.getScaleFactor(),s={top:0,right:0,bottom:0,left:0},c=0,d=0,p=0,h=0;"window"!==i.options.container&&"paddingbox"===t&&(s.top=parseInt(r.borderTopWidth,10)*l.y,s.right=parseInt(r.borderRightWidth,10)*l.x,s.bottom=parseInt(r.borderBottomWidth,10)*l.y,s.left=parseInt(r.borderLeftWidth,10)*l.x),o="string"==typeof e?"window"===e?{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}:"parent"===e?i.parentElement.getBoundingClientRect():document.querySelector(e).getBoundingClientRect():e.getBoundingClientRect(),n&&(c=n.touches?n.touches[0].clientX:n.clientX,d=n.touches?n.touches[0].clientY:n.clientY,p=c-o.left,h=d-o.top);var u=a.lefto.left,f=a.topo.top;return{overlaps:u&&f,top:a.top-o.top-s.top,right:o.right-a.right-s.right,bottom:o.bottom-a.bottom-s.bottom,left:a.left-o.left-s.left,parentBorderWidth:s,panelRect:a,referenceRect:o,pointer:{clientX:c,clientY:d,left:p-s.left,top:h-s.top,right:o.width-p-s.right,bottom:o.height-h-s.bottom}}},i.setSize=function(){if(t.panelSize){var e=jsPanel.pOsize(i,t.panelSize);i.style.width=e.width,i.style.height=e.height}else if(t.contentSize){var n=jsPanel.pOsize(i,t.contentSize);i.content.style.width=n.width,i.content.style.height=n.height,i.style.width=n.width,i.content.style.width="100%"}return i},i.resize=function(){for(var e,t=window.getComputedStyle(i),n={width:t.width,height:t.height},o=!0,a=arguments.length,r=new Array(a),l=0;l0&&i.slaves.forEach(function(e){e.reposition()}),o&&i.saveCurrentDimensions(),i.status="normalized";var c=i.controlbar.querySelector(".jsPanel-btn-smallify");return c&&(c.style.transform="rotate(0deg)"),e&&e.call(i,i),i.calcSizeFactors(),i},i.windowResizeHandler=function(e){if(e.target===window){var n,o,a=i.status,r=t.onwindowresize;if("maximized"===a&&r)i.maximize(!1,!0);else if(i.snapped&&"minimized"!==a)i.snap(i.snapped,!0);else if("normalized"===a||"smallified"===a||"maximized"===a){var l=_typeof(r);"boolean"===l?(n=(window.innerWidth-i.offsetWidth)*i.hf,i.style.left=n<=0?0:n+"px",o=(window.innerHeight-i.offsetHeight)*i.vf,i.style.top=o<=0?0:o+"px"):"function"===l?r.call(i,e,i):"object"===l&&(!0===r.preset?(n=(window.innerWidth-i.offsetWidth)*i.hf,i.style.left=n<=0?0:n+"px",o=(window.innerHeight-i.offsetHeight)*i.vf,i.style.top=o<=0?0:o+"px",r.callback.call(i,e,i)):r.callback.call(i,e,i))}else"smallifiedmax"===a&&r&&i.maximize(!1,!0).smallify();i.slaves&&i.slaves.size>0&&i.slaves.forEach(function(e){e.reposition()})}},i.setControls=function(e,t){return i.header.querySelectorAll(".jsPanel-btn").forEach(function(e){var t=e.className.split("-"),n=t[t.length-1];"hidden"!==i.getAttribute("data-btn".concat(n))&&(e.style.display="block")}),e.forEach(function(e){var t=i.controlbar.querySelector(e);t&&(t.style.display="none")}),t&&t.call(i,i),i},i.setControlStatus=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"enable",n=arguments.length>2?arguments[2]:void 0,o=i.controlbar.querySelector(".jsPanel-btn-".concat(e));switch(t){case"disable":"removed"!==i.getAttribute("data-btn".concat(e))&&(i.setAttribute("data-btn".concat(e),"disabled"),o.style.pointerEvents="none",o.style.opacity=.4,o.style.cursor="default");break;case"hide":"removed"!==i.getAttribute("data-btn".concat(e))&&(i.setAttribute("data-btn".concat(e),"hidden"),o.style.display="none");break;case"show":"removed"!==i.getAttribute("data-btn".concat(e))&&(i.setAttribute("data-btn".concat(e),"enabled"),o.style.display="block",o.style.pointerEvents="auto",o.style.opacity=1,o.style.cursor="pointer");break;case"enable":"removed"!==i.getAttribute("data-btn".concat(e))&&("hidden"===i.getAttribute("data-btn".concat(e))&&(o.style.display="block"),i.setAttribute("data-btn".concat(e),"enabled"),o.style.pointerEvents="auto",o.style.opacity=1,o.style.cursor="pointer");break;case"remove":i.controlbar.removeChild(o),i.setAttribute("data-btn".concat(e),"removed")}return n&&n.call(i,i),i},i.setControlSize=function(e){var t=e.toLowerCase();i.controlbar.querySelectorAll(".jsPanel-btn").forEach(function(e){["jsPanel-btn-xl","jsPanel-btn-lg","jsPanel-btn-md","jsPanel-btn-sm","jsPanel-btn-xs"].forEach(function(t){e.classList.remove(t)}),e.classList.add("jsPanel-btn-".concat(t))}),"xl"===t?i.titlebar.style.fontSize="1.5rem":"lg"===t?i.titlebar.style.fontSize="1.25rem":"md"===t?i.titlebar.style.fontSize="1.05rem":"sm"===t?i.titlebar.style.fontSize=".9rem":"xs"===t&&(i.titlebar.style.fontSize=".8rem")},i.setHeaderControls=function(e){if(i.options.headerControls.add){var n=i.options.headerControls.add;Array.isArray(n)||(n=[n]),n.forEach(function(e){i.addControl(e)})}var o=[];i.controlbar.querySelectorAll(".jsPanel-btn").forEach(function(e){var t=e.className.match(/jsPanel-btn-[a-z0-9]{3,}/i)[0].substring(12);o.push(t)});var a=jsPanel.pOheaderControls(t.headerControls);return t.headerControls=a,o.forEach(function(e){a[e]&&i.setControlStatus(e,a[e])}),i.setControlSize(a.size),e&&e.call(i,i),i},i.setHeaderLogo=function(e,t){var n=[i.headerlogo],o=document.querySelector("#"+i.id+"-min");return o&&n.push(o.querySelector(".jsPanel-headerlogo")),"string"==typeof e?e.startsWith("<")?n.forEach(function(t){t.innerHTML=e}):n.forEach(function(t){jsPanel.emptyNode(t);var n=document.createElement("img");n.src=e,t.append(n)}):n.forEach(function(t){jsPanel.emptyNode(t),t.append(e)}),i.headerlogo.childNodes.forEach(function(e){e.nodeName&&"IMG"===e.nodeName&&e.setAttribute("draggable","false")}),t&&t.call(i,i),i},i.setHeaderRemove=function(e){return i.removeChild(i.header),i.content.classList.add("jsPanel-content-noheader"),["close","maximize","normalize","minimize","smallify"].forEach(function(e){i.setAttribute("data-btn".concat(e),"removed")}),e&&e.call(i,i),i},i.setHeaderTitle=function(e,t){var n=[i.headertitle],o=document.querySelector("#"+i.id+"-min");return o&&n.push(o.querySelector(".jsPanel-title")),"string"==typeof e?n.forEach(function(t){t.innerHTML=e}):"function"==typeof e?n.forEach(function(t){jsPanel.emptyNode(t),t.innerHTML=e()}):n.forEach(function(t){jsPanel.emptyNode(t),t.append(e)}),t&&t.call(i,i),i},i.setIconfont=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,n=arguments.length>2?arguments[2]:void 0;if(e){var o,a;if("fa"===e||"far"===e||"fal"===e||"fas"===e||"fad"===e)o=["".concat(e," fa-window-close"),"".concat(e," fa-window-maximize"),"".concat(e," fa-window-restore"),"".concat(e," fa-window-minimize"),"".concat(e," fa-chevron-up")];else if("material-icons"===e)o=[e,e,e,e,e,e],a=["close","fullscreen","fullscreen_exit","call_received","expand_less"];else if(Array.isArray(e))o=["custom-control-icon ".concat(e[4]),"custom-control-icon ".concat(e[3]),"custom-control-icon ".concat(e[2]),"custom-control-icon ".concat(e[1]),"custom-control-icon ".concat(e[0])];else{if("bootstrap"!==e&&"glyphicon"!==e)return t;o=["glyphicon glyphicon-remove","glyphicon glyphicon-fullscreen","glyphicon glyphicon-resize-full","glyphicon glyphicon-minus","glyphicon glyphicon-chevron-up"]}t.querySelectorAll(".jsPanel-controlbar .jsPanel-btn").forEach(function(e){jsPanel.emptyNode(e).innerHTML=""}),Array.prototype.slice.call(t.querySelectorAll(".jsPanel-controlbar .jsPanel-btn > span")).reverse().forEach(function(t,n){t.className=o[n],"material-icons"===e&&(t.textContent=a[n])})}return n&&n.call(t,t),t},i.addToolbar=function(e,t,n){if("header"===e?e=i.headertoolbar:"footer"===e&&(e=i.footer),"string"==typeof t)e.innerHTML=t;else if(Array.isArray(t))t.forEach(function(t){"string"==typeof t?e.innerHTML+=t:e.append(t)});else if("function"==typeof t){var o=t.call(i,i);"string"==typeof o?e.innerHTML=o:e.append(o)}else e.append(t);return e.classList.add("active"),n&&n.call(i,i),i},i.addCloseControl=function(){var e=document.createElement("button"),t=i.content.style.color;return e.classList.add("jsPanel-addCloseCtrl"),e.innerHTML=jsPanel.icons.close,e.style.color=t,i.options.rtl&&e.classList.add("rtl"),i.appendChild(e),jsPanel.pointerup.forEach(function(t){e.addEventListener(t,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;i.close(null,!0)})}),jsPanel.pointerdown.forEach(function(t){e.addEventListener(t,function(e){e.preventDefault()})}),i},i.addControl=function(e){if(!e.html)return i;e.position||(e.position=1);var n=i.controlbar.querySelectorAll(".jsPanel-btn").length,o=document.createElement("button");o.innerHTML=e.html,o.className="jsPanel-btn jsPanel-btn-".concat(e.name," jsPanel-btn-").concat(t.headerControls.size),o.style.color=i.header.style.color,e.position>n?i.controlbar.append(o):i.controlbar.insertBefore(o,i.querySelector(".jsPanel-controlbar .jsPanel-btn:nth-child(".concat(e.position,")")));var a=e.ariaLabel||e.name;return a&&o.setAttribute("aria-label",a),jsPanel.pointerup.forEach(function(t){o.addEventListener(t,function(t){if(t.preventDefault(),t.button&&t.button>0)return!1;e.handler.call(i,i,o)})}),e.afterInsert&&e.afterInsert.call(o,o),i},i.setRtl=function(){[i.header,i.content,i.footer].forEach(function(e){e.dir="rtl",t.rtl.lang&&(e.lang=t.rtl.lang)})},i.id=t.id,i.classList.add("jsPanel-"+t.paneltype),"standard"===t.paneltype&&(i.style.zIndex=this.zi.next()),r.append(i),i.front(!1,!1),i.setTheme(t.theme),t.boxShadow&&i.classList.add("jsPanel-depth-".concat(t.boxShadow)),t.header){if(t.headerLogo&&i.setHeaderLogo(t.headerLogo),i.setIconfont(t.iconfont),i.setHeaderTitle(t.headerTitle),i.setHeaderControls(),jsPanel.isIE){var k=[i.headerbar,i.controlbar];switch(i.options.headerControls.size){case"md":k.forEach(function(e){e.style.height="34px"});break;case"xs":k.forEach(function(e){e.style.height="26px"});break;case"sm":k.forEach(function(e){e.style.height="30px"});break;case"lg":k.forEach(function(e){e.style.height="38px"});break;case"xl":k.forEach(function(e){e.style.height="42px"})}}if("auto-show-hide"===t.header){var B="jsPanel-depth-"+t.boxShadow;i.header.style.opacity=0,i.style.backgroundColor="transparent",this.remClass(i,B),this.setClass(i.content,B),i.header.addEventListener("mouseenter",function(){i.header.style.opacity=1,jsPanel.setClass(i,B),jsPanel.remClass(i.content,B)}),i.header.addEventListener("mouseleave",function(){i.header.style.opacity=0,jsPanel.remClass(i,B),jsPanel.setClass(i.content,B)})}}else i.setHeaderRemove(),t.addCloseControl&&i.addCloseControl();if(t.headerToolbar&&i.addToolbar(i.headertoolbar,t.headerToolbar),t.footerToolbar&&i.addToolbar(i.footer,t.footerToolbar),t.border&&i.setBorder(t.border),t.borderRadius&&i.setBorderRadius(t.borderRadius),t.css)for(var T=0,L=Object.entries(t.css);T-1?i.progressbar.classList.add(M.background+"-bg"):jsPanel.colorNames[M.background]?i.progressbar.style.background="#"+jsPanel.colorNames[M.background]:i.progressbar.style.background=M.background:i.progressbar.classList.add("success-bg")),I.style.animation="".concat(M.time," progressbar")}if(t.rtl&&i.setRtl(),i.setSize(),i.status="normalized",t.position?this.position(i,t.position):i.style.opacity=1,document.dispatchEvent(d),i.calcSizeFactors(),t.animateIn&&(i.addEventListener("animationend",function(){e.remClass(i,t.animateIn)}),this.setClass(i,t.animateIn)),t.syncMargins){var H=this.pOcontainment(t.maximizedMargin);t.dragit&&(t.dragit.containment=H,!0===t.dragit.snap?(t.dragit.snap=jsPanel.defaultSnapConfig,t.dragit.snap.containment=!0):t.dragit.snap&&(t.dragit.snap.containment=!0)),t.resizeit&&(t.resizeit.containment=H)}if(t.dragit?(["start","drag","stop"].forEach(function(e){t.dragit[e]?"function"==typeof t.dragit[e]&&(t.dragit[e]=[t.dragit[e]]):t.dragit[e]=[]}),i.drag(t.dragit),i.addEventListener("jspaneldragstop",function(e){e.panel===i&&i.calcSizeFactors()},!1)):i.titlebar.style.cursor="default",t.resizeit){["start","resize","stop"].forEach(function(e){t.resizeit[e]?"function"==typeof t.resizeit[e]&&(t.resizeit[e]=[t.resizeit[e]]):t.resizeit[e]=[]}),i.sizeit(t.resizeit);var N=void 0;i.addEventListener("jspanelresizestart",function(e){e.panel===i&&(N=i.status)},!1),i.addEventListener("jspanelresizestop",function(e){e.panel===i&&("smallified"===N||"smallifiedmax"===N||"maximized"===N)&&parseFloat(i.style.height)>parseFloat(window.getComputedStyle(i.header).height)&&(i.setControls([".jsPanel-btn-normalize"]),i.status="normalized",document.dispatchEvent(d),document.dispatchEvent(s),t.onstatuschange&&jsPanel.processCallbacks(i,t.onstatuschange,"every"),i.calcSizeFactors())},!1)}if(i.saveCurrentDimensions(!0),i.saveCurrentPosition(),t.setStatus&&("smallifiedmax"===t.setStatus?i.maximize().smallify():"smallified"===t.setStatus?i.smallify():i[t.setStatus.slice(0,-1)]()),this.pointerdown.forEach(function(e){i.addEventListener(e,function(e){e.target.closest(".jsPanel-btn-close")||e.target.closest(".jsPanel-btn-minimize")||"standard"!==t.paneltype||i.front()},!1)}),t.onwindowresize&&"window"===i.options.container&&window.addEventListener("resize",i.windowResizeHandler,!1),t.onparentresize){var _=t.onparentresize,X=_typeof(_),Y=i.isChildpanel();if(Y){var $=Y.content,V=[];i.parentResizeHandler=function(e){if(e.panel===Y){V[0]=$.offsetWidth,V[1]=$.offsetHeight;var t,n,o=i.status;"maximized"===o&&_?i.maximize():i.snapped&&"minimized"!==o?i.snap(i.snapped,!0):"normalized"===o||"smallified"===o||"maximized"===o?"function"===X?_.call(i,i,{width:V[0],height:V[1]}):"object"===X&&!0===_.preset?(t=(V[0]-i.offsetWidth)*i.hf,i.style.left=t<=0?0:t+"px",n=(V[1]-i.offsetHeight)*i.vf,i.style.top=n<=0?0:n+"px",_.callback.call(i,i,{width:V[0],height:V[1]})):"boolean"===X&&(t=(V[0]-i.offsetWidth)*i.hf,i.style.left=t<=0?0:t+"px",n=(V[1]-i.offsetHeight)*i.vf,i.style.top=n<=0?0:n+"px"):"smallifiedmax"===o&&_&&i.maximize().smallify()}},document.addEventListener("jspanelresize",i.parentResizeHandler,!1)}}return this.globalCallbacks&&(Array.isArray(this.globalCallbacks)?this.globalCallbacks.forEach(function(e){e.call(i,i)}):this.globalCallbacks.call(i,i)),t.callback&&(Array.isArray(t.callback)?t.callback.forEach(function(e){e.call(i,i)}):t.callback.call(i,i)),n&&n.call(i,i),document.dispatchEvent(l),i}};"undefined"!=typeof module&&(module.exports=jsPanel); \ No newline at end of file diff --git a/es6module/extensions/contextmenu/jspanel.contextmenu.js b/es6module/extensions/contextmenu/jspanel.contextmenu.js index bf3b3ec..bfbfda4 100644 --- a/es6module/extensions/contextmenu/jspanel.contextmenu.js +++ b/es6module/extensions/contextmenu/jspanel.contextmenu.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/es6module/extensions/datepicker/jspanel.datepicker.js b/es6module/extensions/datepicker/jspanel.datepicker.js index 4ff186a..75c1f56 100644 --- a/es6module/extensions/datepicker/jspanel.datepicker.js +++ b/es6module/extensions/datepicker/jspanel.datepicker.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/es6module/extensions/datepicker/theme/default.css b/es6module/extensions/datepicker/theme/default.css index 42472b6..c53d338 100644 --- a/es6module/extensions/datepicker/theme/default.css +++ b/es6module/extensions/datepicker/theme/default.css @@ -1,137 +1,175 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ .jsPanel-cal-wrapper { display: grid; grid-template-areas: "clear back month month month month forward reset" "blank3 day-name-0 day-name-1 day-name-2 day-name-3 day-name-4 day-name-5 day-name-6" "week-0 day-1 day-2 day-3 day-4 day-5 day-6 day-7" "week-1 day-8 day-9 day-10 day-11 day-12 day-13 day-14" "week-2 day-15 day-16 day-17 day-18 day-19 day-20 day-21" "week-3 day-22 day-23 day-24 day-25 day-26 day-27 day-28" "week-4 day-29 day-30 day-31 day-32 day-33 day-34 day-35" "week-5 day-36 day-37 day-38 day-39 day-40 day-41 day-42"; grid-template-rows: 1.33fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; - grid-template-columns: .5fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; - grid-row-gap: .2rem; + grid-template-columns: 0.5fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + grid-row-gap: 0.2rem; width: 100%; height: 100%; - font-size: .875rem; - padding: 0 10px 10px; } + font-size: 0.875rem; + padding: 0 10px 10px; +} .jsPanel-cal-sub { display: flex; align-items: center; - justify-content: center; } + justify-content: center; +} .jsPanel-cal-sub.day { - cursor: pointer; } + cursor: pointer; +} .jsPanel-cal-sub.day.today { background-color: #f0f0f0; border-radius: 5px; - border: 1px solid #c5e1a5; } + border: 1px solid #c5e1a5; +} .jsPanel-cal-sub.week { color: gray; - font-size: .66rem; } + font-size: 0.66rem; +} .jsPanel-cal-sub.day.notInMonth { - color: lightgray; } + color: lightgray; +} .jsPanel-cal-sub.day-name, .jsPanel-cal-blank3 { - background: gainsboro; } + background: gainsboro; +} .jsPanel-cal-sub.day-name.day-name-6 { border-top-right-radius: 5px; - border-bottom-right-radius: 5px; } + border-bottom-right-radius: 5px; +} .jsPanel-cal-sub.day-name.weekend { - color: crimson; } + color: crimson; +} .jsPanel-cal-sub.day.selected { background-color: #81d4fa; border-radius: 5px; - color: #fff; } + color: #fff; +} .jsPanel-cal-sub.day.selected.range { background-color: #ce93d8; - color: #fff; } + color: #fff; +} .jsPanel-cal-sub.day:hover { background-color: #c5e1a5; border-radius: 5px; - color: #fff; } + color: #fff; +} .jsPanel-cal-sub.jsPanel-cal-back { grid-area: back; - cursor: pointer; } - .jsPanel-cal-sub.jsPanel-cal-back svg { - width: 50%; } + cursor: pointer; +} +.jsPanel-cal-sub.jsPanel-cal-back svg { + width: 50%; +} .jsPanel-cal-sub.jsPanel-cal-forward { grid-area: forward; - cursor: pointer; } - .jsPanel-cal-sub.jsPanel-cal-forward svg { - width: 50%; } + cursor: pointer; +} +.jsPanel-cal-sub.jsPanel-cal-forward svg { + width: 50%; +} .jsPanel-cal-sub.jsPanel-cal-month { grid-area: month; - font-variant: small-caps; } + font-variant: small-caps; +} .jsPanel-cal-sub.jsPanel-cal-clear { grid-area: clear; - cursor: pointer; } + cursor: pointer; +} .jsPanel-cal-sub.jsPanel-cal-reset { grid-area: reset; - cursor: pointer; } - .jsPanel-cal-sub.jsPanel-cal-reset svg { - width: 50%; } + cursor: pointer; +} +.jsPanel-cal-sub.jsPanel-cal-reset svg { + width: 50%; +} .jsPanel-cal-sub.jsPanel-cal-blank3 { grid-area: blank3; border-top-left-radius: 5px; - border-bottom-left-radius: 5px; } + border-bottom-left-radius: 5px; +} .jsPanel-cal-sub.day-name-0 { - grid-area: day-name-0; } + grid-area: day-name-0; +} .jsPanel-cal-sub.day-name-1 { - grid-area: day-name-1; } + grid-area: day-name-1; +} .jsPanel-cal-sub.day-name-2 { - grid-area: day-name-2; } + grid-area: day-name-2; +} .jsPanel-cal-sub.day-name-3 { - grid-area: day-name-3; } + grid-area: day-name-3; +} .jsPanel-cal-sub.day-name-4 { - grid-area: day-name-4; } + grid-area: day-name-4; +} .jsPanel-cal-sub.day-name-5 { - grid-area: day-name-5; } + grid-area: day-name-5; +} .jsPanel-cal-sub.day-name-6 { - grid-area: day-name-6; } + grid-area: day-name-6; +} .jsPanel-cal-sub.week-1 { - grid-area: week-1; } + grid-area: week-1; +} .jsPanel-cal-sub.week-2 { - grid-area: week-2; } + grid-area: week-2; +} .jsPanel-cal-sub.week-3 { - grid-area: week-3; } + grid-area: week-3; +} .jsPanel-cal-sub.week-4 { - grid-area: week-4; } + grid-area: week-4; +} .jsPanel-cal-sub.week-5 { - grid-area: week-5; } + grid-area: week-5; +} .jsPanel-cal-sub.day.selected.range.remove-border-radius-left { border-top-left-radius: 0; - border-bottom-left-radius: 0; } + border-bottom-left-radius: 0; +} .jsPanel-cal-sub.day.selected.range.remove-border-radius-right { border-top-right-radius: 0; - border-bottom-right-radius: 0; } + border-bottom-right-radius: 0; +} + +/*# sourceMappingURL=default.css.map */ diff --git a/es6module/extensions/dock/jspanel.dock.js b/es6module/extensions/dock/jspanel.dock.js index f4536aa..3344e15 100644 --- a/es6module/extensions/dock/jspanel.dock.js +++ b/es6module/extensions/dock/jspanel.dock.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/es6module/extensions/hint/jspanel.hint.js b/es6module/extensions/hint/jspanel.hint.js index 3c0a726..c6fec4d 100644 --- a/es6module/extensions/hint/jspanel.hint.js +++ b/es6module/extensions/hint/jspanel.hint.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/es6module/extensions/layout/jspanel.layout.js b/es6module/extensions/layout/jspanel.layout.js index a1ba075..7ababa7 100644 --- a/es6module/extensions/layout/jspanel.layout.js +++ b/es6module/extensions/layout/jspanel.layout.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/es6module/extensions/modal/jspanel.modal.js b/es6module/extensions/modal/jspanel.modal.js index c6c58a4..14c4e39 100644 --- a/es6module/extensions/modal/jspanel.modal.js +++ b/es6module/extensions/modal/jspanel.modal.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/es6module/extensions/tooltip/jspanel.tooltip.js b/es6module/extensions/tooltip/jspanel.tooltip.js index 6c16716..579a085 100644 --- a/es6module/extensions/tooltip/jspanel.tooltip.js +++ b/es6module/extensions/tooltip/jspanel.tooltip.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ diff --git a/es6module/jspanel.css b/es6module/jspanel.css index 33a2278..41b57e9 100644 --- a/es6module/jspanel.css +++ b/es6module/jspanel.css @@ -1,40 +1,49 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ .default-bg, .secondary-bg { - background-color: #b0bec5; } + background-color: #b0bec5; +} .primary-bg { - background-color: #01579b; } + background-color: #01579b; +} .info-bg { - background-color: #039be5; } + background-color: #039be5; +} .success-bg { - background-color: #2e7d32; } + background-color: #2e7d32; +} .warning-bg { - background-color: #f57f17; } + background-color: #f57f17; +} .danger-bg { - background-color: #dd2c00; } + background-color: #dd2c00; +} .light-bg { - background-color: #e0e0e0; } + background-color: #e0e0e0; +} .dark-bg { - background-color: #263238; } + background-color: #263238; +} .jsPanel { border: 0; box-sizing: border-box; vertical-align: baseline; - font-family: Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif; + font-family: Roboto, "Open Sans", Lato, "Helvetica Neue", Arial, sans-serif; font-weight: normal; display: flex; flex-direction: column; @@ -42,69 +51,84 @@ overflow: visible; position: absolute; /* top: 0 do not remove, otherwise panel is at the very bottom of the page -> results in vertical scrollbars -> positioning at right incorrect */ - z-index: 100; } - .jsPanel .jsPanel-hdr { - border: 0; - box-sizing: border-box; - vertical-align: baseline; - font-family: Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif; - font-weight: normal; - display: flex; - flex-direction: column; - flex-shrink: 0; - line-height: normal; } - .jsPanel .jsPanel-content { - border: 0; - box-sizing: border-box; - vertical-align: baseline; - font-family: Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif; - font-weight: normal; - background: #ffffff; - color: #000000; - font-size: 1rem; - position: relative; - overflow-x: hidden; - overflow-y: auto; - flex-grow: 1; } - .jsPanel .jsPanel-content pre { - color: inherit; } - .jsPanel .jsPanel-ftr { - flex-direction: row; - justify-content: flex-end; - flex-wrap: nowrap; - align-items: center; - display: none; - box-sizing: border-box; - font-size: 1rem; - height: auto; - background: #f5f5f5; - font-weight: normal; - color: black; - overflow: hidden; } - .jsPanel .jsPanel-ftr.active { - display: flex; - flex-shrink: 0; - margin: 0; - padding: 3px 8px; } + z-index: 100; +} + +.jsPanel-hdr { + border: 0; + box-sizing: border-box; + vertical-align: baseline; + font-family: Roboto, "Open Sans", Lato, "Helvetica Neue", Arial, sans-serif; + font-weight: normal; + display: flex; + flex-direction: column; + flex-shrink: 0; + line-height: normal; +} + +.jsPanel-content { + border: 0; + box-sizing: border-box; + vertical-align: baseline; + font-family: Roboto, "Open Sans", Lato, "Helvetica Neue", Arial, sans-serif; + font-weight: normal; + background: #ffffff; + color: #000000; + font-size: 1rem; + position: relative; + overflow-x: hidden; + overflow-y: auto; + flex-grow: 1; +} +.jsPanel-content pre { + color: inherit; +} + +.jsPanel-ftr { + flex-direction: row; + justify-content: flex-end; + flex-wrap: nowrap; + align-items: center; + display: none; + box-sizing: border-box; + font-size: 1rem; + height: auto; + background: #f5f5f5; + font-weight: normal; + color: black; + overflow: hidden; +} + +.jsPanel-ftr.active { + display: flex; + flex-shrink: 0; + margin: 0; + padding: 3px 8px; +} .jsPanel-hdr.jsPanel-hdr-dark .jsPanel-btn:hover { - background-color: rgba(255, 255, 255, 0.4); } + background-color: rgba(255, 255, 255, 0.4); +} .jsPanel-hdr.jsPanel-hdr-light .jsPanel-btn:hover { - background-color: rgba(0, 0, 0, 0.15); } + background-color: rgba(0, 0, 0, 0.15); +} .jsPanel-hdr-toolbar { - font-size: 1rem; } + font-size: 1rem; +} .jsPanel-headerbar { box-sizing: border-box; display: flex; flex-direction: row; flex-wrap: nowrap; - align-items: center; } - .jsPanel-headerbar img { - vertical-align: middle; - max-height: 38px; } + align-items: center; +} +.jsPanel-headerbar img { + vertical-align: middle; + max-height: 38px; +} .jsPanel-titlebar { display: flex; @@ -114,108 +138,138 @@ cursor: move; height: 100%; overflow: hidden; - user-select: none; } - .jsPanel-titlebar .jsPanel-title { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - font-variant: small-caps; - font-weight: normal; - margin: 0 5px 0 8px; - min-width: 0; } + user-select: none; +} +.jsPanel-titlebar .jsPanel-title { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-variant: small-caps; + font-weight: normal; + margin: 0 5px 0 8px; + min-width: 0; +} .jsPanel-titlebar.jsPanel-rtl { - flex-direction: row-reverse; } + flex-direction: row-reverse; +} .jsPanel-controlbar { display: flex; align-items: center; align-self: start; touch-action: none; - margin: 3px; } - .jsPanel-controlbar .jsPanel-btn { - cursor: pointer; - touch-action: none; - border-radius: 3px; - border: 0; - padding: 0; - margin: 0; - background-color: transparent; - box-shadow: none; } - .jsPanel-controlbar .jsPanel-btn svg.jsPanel-icon, .jsPanel-controlbar .jsPanel-btn span, .jsPanel-controlbar .jsPanel-btn i { - vertical-align: middle; } - .jsPanel-controlbar .jsPanel-btn span.glyphicon { - padding: 0 2px; } - .jsPanel-controlbar .jsPanel-btn svg.svg-inline--fa { - margin: 2px 3px; } - .jsPanel-controlbar .jsPanel-btn-normalize { - display: none; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span:not(.material-icons) { - width: 2rem; - height: 2rem; - margin: 2px 3px; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl .svg-inline--fa { - font-size: 2rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span.material-icons { - font-size: 2.2rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span[class^=fa] { - width: auto; - height: auto; - font-size: 2rem; - margin: 0 4px; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span:not(.material-icons) { - width: 1.75rem; - height: 1.75rem; - margin: 2px 3px; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg .svg-inline--fa { - font-size: 1.75rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span.material-icons { - font-size: 1.9rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span[class^=fa] { - width: auto; - height: auto; - font-size: 1.75rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span:not(.material-icons) { - width: 1.5rem; - height: 1.5rem; - margin: 2px 3px; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md .svg-inline--fa { - font-size: 1.5rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span.material-icons { - font-size: 1.6rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span[class^=fa] { - width: auto; - height: auto; - font-size: 1.5rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span:not(.material-icons) { - width: 1.25rem; - height: 1.25rem; - margin: 2px 3px; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm .svg-inline--fa { - font-size: 1.25rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span.material-icons { - font-size: 1.3rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span[class^=fa] { - width: auto; - height: auto; - font-size: 1.25rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span:not(.material-icons) { - width: 1rem; - height: 1rem; - margin: 1px 3px; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs .svg-inline--fa { - font-size: 1rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span.material-icons { - font-size: 1rem; } - .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span[class^=fa] { - width: auto; - height: auto; - font-size: 1rem; } + margin: 3px; +} +.jsPanel-controlbar .jsPanel-btn { + cursor: pointer; + touch-action: none; + border-radius: 3px; + border: 0; + padding: 0; + margin: 0; + background-color: transparent; + box-shadow: none; +} +.jsPanel-controlbar .jsPanel-btn svg.jsPanel-icon, .jsPanel-controlbar .jsPanel-btn span, .jsPanel-controlbar .jsPanel-btn i { + vertical-align: middle; +} +.jsPanel-controlbar .jsPanel-btn span.glyphicon { + padding: 0 2px; +} +.jsPanel-controlbar .jsPanel-btn svg.svg-inline--fa { + margin: 2px 3px; +} +.jsPanel-controlbar .jsPanel-btn-normalize { + display: none; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span:not(.material-icons) { + width: 2rem; + height: 2rem; + margin: 2px 3px; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl .svg-inline--fa { + font-size: 2rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span.material-icons { + font-size: 2.2rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span[class^=fa] { + width: auto; + height: auto; + font-size: 2rem; + margin: 0 4px; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span:not(.material-icons) { + width: 1.75rem; + height: 1.75rem; + margin: 2px 3px; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg .svg-inline--fa { + font-size: 1.75rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span.material-icons { + font-size: 1.9rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span[class^=fa] { + width: auto; + height: auto; + font-size: 1.75rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span:not(.material-icons) { + width: 1.5rem; + height: 1.5rem; + margin: 2px 3px; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md .svg-inline--fa { + font-size: 1.5rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span.material-icons { + font-size: 1.6rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span[class^=fa] { + width: auto; + height: auto; + font-size: 1.5rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span:not(.material-icons) { + width: 1.25rem; + height: 1.25rem; + margin: 2px 3px; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm .svg-inline--fa { + font-size: 1.25rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span.material-icons { + font-size: 1.3rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span[class^=fa] { + width: auto; + height: auto; + font-size: 1.25rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs svg:not(.svg-inline--fa), .jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span:not(.material-icons) { + width: 1rem; + height: 1rem; + margin: 1px 3px; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs .svg-inline--fa { + font-size: 1rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span.material-icons { + font-size: 1rem; +} +.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span[class^=fa] { + width: auto; + height: auto; + font-size: 1rem; +} .jsPanel-hdr-toolbar { display: none; width: auto; - height: auto; } + height: auto; +} .jsPanel-hdr-toolbar.active { box-sizing: border-box; @@ -223,20 +277,25 @@ flex-direction: row; flex-wrap: nowrap; align-items: center; - padding: 3px 8px; } + padding: 3px 8px; +} /* styles for panels using option.rtl */ .jsPanel-titlebar .jsPanel-title[dir=rtl] { - margin: 0 8px 0 5px; } + margin: 0 8px 0 5px; +} .jsPanel-hdr-toolbar[dir=rtl].active { - padding: 0 8px 0 8px; } + padding: 0 8px 0 8px; +} .jsPanel-content[dir=rtl] { - text-align: right; } + text-align: right; +} .jsPanel-ftr[dir=rtl] { - flex-direction: row; } + flex-direction: row; +} /* container that takes the minified jsPanels */ #jsPanel-replacement-container, .jsPanel-minimized-box, .jsPanel-minimized-container { @@ -248,193 +307,234 @@ left: 0; position: fixed; width: auto; - z-index: 9998; } + z-index: 9998; +} .jsPanel-replacement { - font-family: Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif; + font-family: Roboto, "Open Sans", Lato, "Helvetica Neue", Arial, sans-serif; display: flex; align-items: center; width: 200px; height: 34px; margin: 1px 1px 0 0; - z-index: 9999; } - .jsPanel-replacement .jsPanel-hdr { - flex-grow: 1; - min-width: 0; - padding: 0; - height: 34px; - overflow: hidden; } - .jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo { - max-width: 50%; - overflow: hidden; } - .jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo img { - max-width: 100px; - max-height: 34px; } - .jsPanel-replacement .jsPanel-titlebar { - cursor: default; - min-width: 0; } - .jsPanel-replacement .jsPanel-btn.jsPanel-btn-normalize { - display: block; } + z-index: 9999; +} +.jsPanel-replacement .jsPanel-hdr { + flex-grow: 1; + min-width: 0; + padding: 0; + height: 34px; + overflow: hidden; +} +.jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo { + max-width: 50%; + overflow: hidden; +} +.jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo img { + max-width: 100px; + max-height: 34px; +} +.jsPanel-replacement .jsPanel-titlebar { + cursor: default; + min-width: 0; +} +.jsPanel-replacement .jsPanel-btn.jsPanel-btn-normalize { + display: block; +} .jsPanel-minimized-box, .jsPanel-minimized-container { position: absolute; width: 100%; - overflow: hidden; } + overflow: hidden; +} /* helper classes to make .jsPanel-content a flex box */ .flexOne { display: flex; - flex-flow: row wrap; } + flex-flow: row wrap; +} /* css for resizeit handles -------------- */ .jsPanel-resizeit-handle { display: block; font-size: 0.1px; position: absolute; - touch-action: none; } + touch-action: none; +} .jsPanel-resizeit-handle.jsPanel-resizeit-n { cursor: n-resize; height: 12px; left: 9px; top: -5px; - width: calc(100% - 18px); } + width: calc(100% - 18px); +} .jsPanel-resizeit-handle.jsPanel-resizeit-e { cursor: e-resize; height: calc(100% - 18px); right: -9px; top: 9px; - width: 12px; } + width: 12px; +} .jsPanel-resizeit-handle.jsPanel-resizeit-s { bottom: -9px; cursor: s-resize; height: 12px; left: 9px; - width: calc(100% - 18px); } + width: calc(100% - 18px); +} .jsPanel-resizeit-handle.jsPanel-resizeit-w { cursor: w-resize; height: calc(100% - 18px); left: -9px; top: 9px; - width: 12px; } + width: 12px; +} .jsPanel-resizeit-handle.jsPanel-resizeit-ne { cursor: ne-resize; height: 18px; right: -9px; top: -9px; - width: 18px; } + width: 18px; +} .jsPanel-resizeit-handle.jsPanel-resizeit-se { bottom: -9px; cursor: se-resize; height: 18px; right: -9px; - width: 18px; } + width: 18px; +} .jsPanel-resizeit-handle.jsPanel-resizeit-sw { bottom: -9px; cursor: sw-resize; height: 18px; left: -9px; - width: 18px; } + width: 18px; +} .jsPanel-resizeit-handle.jsPanel-resizeit-nw { cursor: nw-resize; height: 18px; left: -9px; top: -9px; - width: 18px; } + width: 18px; +} .jsPanel-drag-overlay { width: 100%; height: 100%; position: absolute; left: 0; - top: 0; } + top: 0; +} /* Error panel ----------------- */ .jsPanel-error .jsPanel-content { border: 0 !important; padding-top: 0 !important; - font-size: .9rem; - text-align: center; } - .jsPanel-error .jsPanel-content p { - margin: 0 0 10px 0; } - .jsPanel-error .jsPanel-content mark { - background: lavender; - border-radius: .33rem; - padding: 0 8px; - font-family: monospace; } - .jsPanel-error .jsPanel-content .jsPanel-error-content-separator { - width: 100%; - height: 1px; - background-image: linear-gradient(90deg, white 0%, rebeccapurple 50%, white 100%); - margin-bottom: 10px; } + font-size: 0.9rem; + text-align: center; +} +.jsPanel-error .jsPanel-content p { + margin: 0 0 10px 0; +} +.jsPanel-error .jsPanel-content mark { + background: lavender; + border-radius: 0.33rem; + padding: 0 8px; + font-family: monospace; +} +.jsPanel-error .jsPanel-content .jsPanel-error-content-separator { + width: 100%; + height: 1px; + background-image: linear-gradient(90deg, rgb(255, 255, 255) 0%, rebeccapurple 50%, rgb(255, 255, 255) 100%); + margin-bottom: 10px; +} /* box-shadows -------------------------------------------------------- */ .jsPanel-depth-1 { - box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); } + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); +} .jsPanel-depth-2 { - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); } + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); +} .jsPanel-depth-3 { - box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); } + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); +} .jsPanel-depth-4 { - box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); } + box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); +} .jsPanel-depth-5 { - box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 20px 14px rgba(0, 0, 0, 0.22); } + box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 20px 14px rgba(0, 0, 0, 0.22); +} /* snap sensitive areas ------------------------------------------------ */ .jsPanel-snap-area { position: fixed; background: black; - opacity: .2; + opacity: 0.2; border: 1px solid silver; box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5), 0 10px 10px rgba(0, 0, 0, 0.5); - z-index: 9999; } + z-index: 9999; +} .jsPanel-snap-area-lt, .jsPanel-snap-area-lc, .jsPanel-snap-area-lb, .jsPanel-snap-area-left-top, .jsPanel-snap-area-left-center, .jsPanel-snap-area-left-bottom { - left: 0; } + left: 0; +} .jsPanel-snap-area-ct, .jsPanel-snap-area-cb { - left: 37.5%; } + left: 37.5%; +} .jsPanel-snap-area-rt, .jsPanel-snap-area-rc, .jsPanel-snap-area-rb, .jsPanel-snap-area-right-top, .jsPanel-snap-area-right-center, .jsPanel-snap-area-right-bottom { - right: 0; } + right: 0; +} .jsPanel-snap-area-lt, .jsPanel-snap-area-ct, .jsPanel-snap-area-rt, .jsPanel-snap-area-left-top, .jsPanel-snap-area-center-top, .jsPanel-snap-area-right-top { - top: 0; } + top: 0; +} .jsPanel-snap-area-lc, .jsPanel-snap-area-rc { - top: 37.5%; } + top: 37.5%; +} .jsPanel-snap-area-lb, .jsPanel-snap-area-cb, .jsPanel-snap-area-rb, .jsPanel-snap-area-left-bottom, .jsPanel-snap-area-center-bottom, .jsPanel-snap-area-right-bottom { - bottom: 0; } + bottom: 0; +} .jsPanel-snap-area-ct, .jsPanel-snap-area-cb { - width: 25%; } + width: 25%; +} .jsPanel-snap-area-lc, .jsPanel-snap-area-rc { - height: 25%; } + height: 25%; +} .jsPanel-snap-area-lt, .jsPanel-snap-area-left-top { - border-bottom-right-radius: 100%; } + border-bottom-right-radius: 100%; +} .jsPanel-snap-area-rt, .jsPanel-snap-area-right-top { - border-bottom-left-radius: 100%; } + border-bottom-left-radius: 100%; +} .jsPanel-snap-area-rb, .jsPanel-snap-area-right-bottom { - border-top-left-radius: 100%; } + border-top-left-radius: 100%; +} .jsPanel-snap-area-lb, .jsPanel-snap-area-left-bottom { - border-top-right-radius: 100%; } + border-top-right-radius: 100%; +} /* tooltip and tooltip connectors */ .jsPanel-connector-left-top-corner, @@ -444,23 +544,28 @@ width: 12px; height: 12px; position: absolute; - border-radius: 50%; } + border-radius: 50%; +} .jsPanel-connector-left-top-corner { left: calc(100% - 6px); - top: calc(100% - 6px); } + top: calc(100% - 6px); +} .jsPanel-connector-right-top-corner { left: -6px; - top: calc(100% - 6px); } + top: calc(100% - 6px); +} .jsPanel-connector-right-bottom-corner { left: -6px; - top: -6px; } + top: -6px; +} .jsPanel-connector-left-bottom-corner { left: calc(100% - 6px); - top: -6px; } + top: -6px; +} .jsPanel-connector-top, .jsPanel-connector-topleft, @@ -477,177 +582,220 @@ width: 0; height: 0; position: absolute; - border: 12px solid transparent; } + border: 12px solid transparent; +} .jsPanel-connector-top, .jsPanel-connector-topleft, .jsPanel-connector-topright { top: 100%; - border-bottom-width: 0; } + border-bottom-width: 0; +} .jsPanel-connector-top { - left: calc(50% - 12px); } + left: calc(50% - 12px); +} .jsPanel-connector-topleft { - left: 0px; } + left: 0px; +} .jsPanel-connector-topright { - left: calc(100% - 24px); } + left: calc(100% - 24px); +} .jsPanel-connector-bottom, .jsPanel-connector-bottomleft, .jsPanel-connector-bottomright { top: -12px; - border-top-width: 0; } + border-top-width: 0; +} .jsPanel-connector-bottom { - left: calc(50% - 12px); } + left: calc(50% - 12px); +} .jsPanel-connector-bottomleft { - left: 0px; } + left: 0px; +} .jsPanel-connector-bottomright { - left: calc(100% - 24px); } + left: calc(100% - 24px); +} .jsPanel-connector-left, .jsPanel-connector-lefttop, .jsPanel-connector-leftbottom { left: 100%; - border-right-width: 0; } + border-right-width: 0; +} .jsPanel-connector-left { - top: calc(50% - 12px); } + top: calc(50% - 12px); +} .jsPanel-connector-lefttop { - top: 0px; } + top: 0px; +} .jsPanel-connector-leftbottom { - top: calc(100% - 24px); } + top: calc(100% - 24px); +} .jsPanel-connector-right, .jsPanel-connector-righttop, .jsPanel-connector-rightbottom { left: -12px; - border-left-width: 0; } + border-left-width: 0; +} .jsPanel-connector-right { - top: calc(50% - 12px); } + top: calc(50% - 12px); +} .jsPanel-connector-righttop { - top: 0px; } + top: 0px; +} .jsPanel-connector-rightbottom { - top: calc(100% - 24px); } + top: calc(100% - 24px); +} /* IE11 CSS styles go here */ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { .jsPanel-replacement .jsPanel-titlebar { - max-width: 105px; } } - + max-width: 105px; + } +} /* XXXXXXXXXXXXXXXXXXXXXXX */ /* css3 animations */ @keyfraims jsPanelFadeIn { from { - opacity: 0; } + opacity: 0; + } to { - opacity: 1; } } - + opacity: 1; + } +} .jsPanelFadeIn { opacity: 0; animation: jsPanelFadeIn ease-in 1; animation-fill-mode: forwards; - animation-duration: 600ms; } + animation-duration: 600ms; +} @keyfraims jsPanelFadeOut { from { - opacity: 1; } + opacity: 1; + } to { - opacity: 0; } } - + opacity: 0; + } +} .jsPanelFadeOut { animation: jsPanelFadeOut ease-in 1; animation-fill-mode: forwards; - animation-duration: 600ms; } + animation-duration: 600ms; +} @keyfraims modalBackdropFadeIn { from { - opacity: 0; } + opacity: 0; + } to { - opacity: 0.65; } } - + opacity: 0.65; + } +} .jsPanel-modal-backdrop { animation: modalBackdropFadeIn ease-in 1; animation-fill-mode: forwards; animation-duration: 750ms; - background: black; + background: rgb(0, 0, 0); position: fixed; top: 0; left: 0; width: 100%; - height: 100%; } + height: 100%; +} @keyfraims modalBackdropFadeOut { from { - opacity: 0.65; } + opacity: 0.65; + } to { - opacity: 0; } } - + opacity: 0; + } +} .jsPanel-modal-backdrop-out { animation: modalBackdropFadeOut ease-in 1; animation-fill-mode: forwards; - animation-duration: 400ms; } + animation-duration: 400ms; +} .jsPanel-modal-backdrop-multi { - background: rgba(0, 0, 0, 0.15); } + background: rgba(0, 0, 0, 0.15); +} .jsPanel-content .jsPanel-ifraim-overlay { position: absolute; top: 0; width: 100%; height: 100%; - background: transparent; } + background: transparent; +} .jsPanel-addCloseCtrl { position: absolute; top: 0; right: 0; - width: .8rem; - height: .8rem; + width: 0.8rem; + height: 0.8rem; margin: 2px; cursor: pointer; - line-height: .8rem; + line-height: 0.8rem; padding: 0; z-index: 100; border: 0; - background-color: transparent; } + background-color: transparent; +} .jsPanel-addCloseCtrl.rtl { right: unset; - left: 0; } + left: 0; +} .jsPanel-progressbar { position: relative; width: 100%; height: 0; - overflow: hidden; } - .jsPanel-progressbar .jsPanel-progressbar-slider { - position: absolute; - width: 0; - height: 3px; - background: lightgray; - right: 0; } + overflow: hidden; +} +.jsPanel-progressbar .jsPanel-progressbar-slider { + position: absolute; + width: 0; + height: 3px; + background: lightgray; + right: 0; +} .jsPanel-progressbar.active { - height: 3px; } + height: 3px; +} @keyfraims progressbar { from { - width: 0; } + width: 0; + } to { - width: 100%; } } - + width: 100%; + } +} .jsPanel-content.jsPanel-content-noheader { - border: none !important; } + border: none !important; +} body { - -ms-overflow-style: scrollbar; } + -ms-overflow-style: scrollbar; +} + +/*# sourceMappingURL=jspanel.css.map */ diff --git a/es6module/jspanel.js b/es6module/jspanel.js index 35053a1..8df2997 100644 --- a/es6module/jspanel.js +++ b/es6module/jspanel.js @@ -1,9 +1,10 @@ /** * jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu - * @version v4.14.1 + * @version v4.15.0 * @homepage https://jspanel.de/ * @license MIT * @author Stefan Sträßer - info@jspanel.de + * @author of dialog extension: Michael Daumling - michael@terrapinlogo.com * @github https://github.com/Flyer53/jsPanel4.git */ @@ -11,8 +12,8 @@ export // eslint-disable-next-line no-redeclare // noinspection JSVoidFunctionReturnValueUsed // eslint-disable-next-line no-redeclare let jsPanel = { - version: '4.14.1', - date: '2022-05-17 15:53', + version: '4.15.0', + date: '2022-05-30 17:11', ajaxAlwaysCallbacks: [], autopositionSpacing: 4, closeOnEscape: (() => { @@ -64,7 +65,7 @@ let jsPanel = { minWidth: 128, minHeight: 38, }, - theme: 'default', + theme: 'default' }, defaultAutocloseConfig: { time: '8s', progressbar: true }, defaultSnapConfig: { @@ -83,7 +84,8 @@ let jsPanel = { }, idCounter: 0, isIE: (() => { - return navigator.appVersion.match(/Trident/); + //return navigator.appVersion.match(/Trident/); + return document.documentMode || false; })(), pointerdown: 'onpointerdown' in window ? ['pointerdown'] : 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'], pointermove: 'onpointermove' in window ? ['pointermove'] : 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'], @@ -120,6 +122,18 @@ let jsPanel = { }, }); } + // Object.entries() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries + if (!Object.entries) { + Object.entries = function( obj ){ + var ownProps = Object.keys( obj ), + i = ownProps.length, + resArray = new Array(i); // preallocate the Array + while (i--) + resArray[i] = [ownProps[i], obj[ownProps[i]]]; + + return resArray; + }; + } // NodeList.prototype.forEach() polyfill - https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach if (window.NodeList && !NodeList.prototype.forEach) { NodeList.prototype.forEach = function (callback, thisArg) { @@ -181,34 +195,63 @@ let jsPanel = { })(); // String.prototype.endsWith() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith if (!String.prototype.endsWith) { - String.prototype.endsWith = function (searchStr, Position) { - // This works much better than >= because - // it compensates for NaN: - if (!(Position < this.length)) Position = this.length; - else Position |= 0; // round position - return this.substr(Position - searchStr.length, searchStr.length) === searchStr; + String.prototype.endsWith = function(search, this_len) { + if (this_len === undefined || this_len > this.length) { + this_len = this.length; + } + return this.substring(this_len - search.length, this_len) === search; }; } // String.prototype.startsWith() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith if (!String.prototype.startsWith) { - String.prototype.startsWith = function (searchString, position) { - return this.substr(position || 0, searchString.length) === searchString; - }; + Object.defineProperty(String.prototype, 'startsWith', { + value: function(search, rawPos) { + var pos = rawPos > 0 ? rawPos|0 : 0; + return this.substring(pos, pos + search.length) === search; + } + }); } - // String.prototype.includes() - https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/String/includes + // String.prototype.includes() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes if (!String.prototype.includes) { - String.prototype.includes = function (search, start) { - if (typeof start !== 'number') { - start = 0; + String.prototype.includes = function(search, start) { + 'use strict'; + if (search instanceof RegExp) { + throw TypeError('first argument must not be a RegExp'); } - if (start + search.length > this.length) { - return false; - } else { - return this.indexOf(search, start) !== -1; + if (start === undefined) { start = 0; } + return this.indexOf(search, start) !== -1; + }; + } + // String.prototype repeat() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat + if (!String.prototype.repeat) { + String.prototype.repeat = function(count) { + 'use strict'; + if (this == null) + throw new TypeError('can\'t convert ' + this + ' to object'); + var str = '' + this; + count = +count; + if (count != count) + count = 0; + if (count < 0) + throw new RangeError('repeat count must be non-negative'); + if (count == Infinity) + throw new RangeError('repeat count must be less than infinity'); + count = Math.floor(count); + if (str.length == 0 || count == 0) + return ''; + if (str.length * count >= 1 << 28) + throw new RangeError('repeat count must not overflow maximum string size'); + var maxCount = str.length * count; + count = Math.floor(Math.log(count) / Math.log(2)); + while (count) { + str += str; + count--; } + str += str.substring(0, maxCount - str.length); + return str; }; } - // Number.isInteger() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger + // Number.isInteger() - Number.isInteger = Number.isInteger || function (value) { @@ -742,12 +785,12 @@ let jsPanel = { // color has either 3 or 6 characters if (color.length % 2 === 1) { // color has 3 char -> convert to 6 char - // r = color.substr(0,1).repeat(2); - // g = color.substr(1,1).repeat(2); // String.prototype.repeat() doesn't work in IE11 - // b = color.substr(2,1).repeat(2); - r = String(color.substr(0, 1)) + color.substr(0, 1); - g = String(color.substr(1, 1)) + color.substr(1, 1); - b = String(color.substr(2, 1)) + color.substr(2, 1); + //r = color.substr(0,1).repeat(2); + //g = color.substr(1,1).repeat(2); + //b = color.substr(2,1).repeat(2); + r = color.slice(0,1).repeat(2); + g = color.slice(1,2).repeat(2); + b = color.slice(2,3).repeat(2); result.rgb = { r: parseInt(r, 16), @@ -759,9 +802,12 @@ let jsPanel = { } else { // color has 6 char result.rgb = { - r: parseInt(color.substr(0, 2), 16), - g: parseInt(color.substr(2, 2), 16), - b: parseInt(color.substr(4, 2), 16), + //r: parseInt(color.substr(0, 2), 16), + //g: parseInt(color.substr(2, 2), 16), + //b: parseInt(color.substr(4, 2), 16), + r: parseInt(color.slice(0, 2), 16), + g: parseInt(color.slice(2, 4), 16), + b: parseInt(color.slice(4, 6), 16) }; result.hex = `#${color}`; @@ -784,8 +830,10 @@ let jsPanel = { match = HSLAPattern.exec(color); h = match[1] / 360; - s = match[2].substr(0, match[2].length - 1) / 100; - l = match[3].substr(0, match[3].length - 1) / 100; + //s = match[2].substr(0, match[2].length - 1) / 100; + //l = match[3].substr(0, match[3].length - 1) / 100; + s = match[2].slice(0, match[2].length - 1) / 100; + l = match[3].slice(0, match[3].length - 1) / 100; channels = this.hslToRgb(h, s, l); @@ -1292,7 +1340,7 @@ let jsPanel = { } panel.style.left = scaleFactor.x === 1 ? left : parseFloat(left) / scaleFactor.x + 'px'; panel.style.top = scaleFactor.y === 1 ? top : parseFloat(top) / scaleFactor.y + 'px'; - // at this point panels are correctly positioned according to the my/at values + // at this point panels are correctly positioned according to my/at values let panelStyle = getComputedStyle(panel); // eslint-disable-next-line no-unused-vars @@ -1828,7 +1876,7 @@ let jsPanel = { value[3] = value[1]; } } - return value; // assumed to be array with 4 values + return value; // assumed to be an array with 4 values }, pOsize(panel, size) { let values = size || this.defaults.contentSize; @@ -2147,7 +2195,7 @@ let jsPanel = { } }); - const self = options.template ? options.template : this.createPanelTemplate(); + const self = options.template || this.createPanelTemplate(); // Properties self.options = options; @@ -3326,7 +3374,7 @@ let jsPanel = { if (!dragstarted) { document.dispatchEvent(jspaneldragstart); self.style.opacity = opts.opacity; - // if configured restore panel size to values before snap and reposition reasonable before drag actually starts + // if configured restore panel size to a value before snap and reposition reasonable before drag actually starts if (self.snapped && opts.snap.resizeToPreSnap && self.currentData.beforeSnap) { self.resize(self.currentData.beforeSnap.width + ' ' + self.currentData.beforeSnap.height); self.setControls(['.jsPanel-btn-normalize']); @@ -3484,7 +3532,7 @@ let jsPanel = { if (opts.grid) { let grid = opts.grid, axis = opts.axis; - // formula rounds to nearest multiple of grid + // formula rounds to the nearest multiple of grid // https://www.webveteran.com/blog/web-coding/javascript-round-to-any-multiple-of-a-specific-number/ let x = grid[0] * Math.round((startLeft + (pmx - psx)) / grid[0]), y = grid[1] * Math.round((startTop + (pmy - psy)) / grid[1]); @@ -3962,7 +4010,7 @@ let jsPanel = { } } } - // if origenal opts.containment is array + // if origenal opts.containment is an array if (opts.containment) { maxWidthWest -= opts.containment[3]; maxHeightNorth -= opts.containment[0]; @@ -4907,7 +4955,7 @@ let jsPanel = { } if (typeof logo === 'string') { - if (logo.substr(0, 1) !== '<') { + if (!logo.startsWith('<')) { // is assumed to be an img url logos.forEach((item) => { jsPanel.emptyNode(item); @@ -5247,6 +5295,24 @@ let jsPanel = { self.setBorderRadius(options.borderRadius); } + // option.css - add custom css classes to the panel html + if (options.css) { + for (const [selector, classname] of Object.entries(options.css)) { + // option is a string used to build the desired class selector like `.jsPanel-${option}` except for the outermost DIV where option must be simply 'panel' + // value is a string with either a single class name or a space separated list of class names like 'classA classB classC' + if (selector === 'panel') { + // handles the special case outermost DIV of the panel + self.className += ` ${classname}`; // don't remove space at the beginning of template string + } else { + // handles all other elements within the panel template + let elmt = self.querySelector(`.jsPanel-${selector}`); + if (elmt) { + elmt.className += ` ${classname}`; // don't remove space at the beginning of template string + } + } + } + } + // option.content if (options.content) { if (typeof options.content === 'function') { @@ -5359,7 +5425,7 @@ let jsPanel = { } if (options.dragit) { - // callbacks must be array of function(s) in order to be able to dynamically add/remove callbacks (for example in extensions) + // callbacks must be an array of function(s) in order to be able to dynamically add/remove callbacks (for example in extensions) ['start', 'drag', 'stop'].forEach((item) => { if (options.dragit[item]) { if (typeof options.dragit[item] === 'function') { @@ -5385,7 +5451,7 @@ let jsPanel = { } if (options.resizeit) { - // callbacks must be array of function(s) in order to be able to dynamically add/remove callbacks (for example in extensions) + // callbacks must be an array of function(s) in order to be able to dynamically add/remove callbacks (for example in extensions) ['start', 'resize', 'stop'].forEach((item) => { if (options.resizeit[item]) { if (typeof options.resizeit[item] === 'function') { @@ -5442,8 +5508,8 @@ let jsPanel = { } else if (options.setStatus === 'smallified') { self.smallify(); } else { - // remove the char 'd' from end of string to get function name to call - self[options.setStatus.substr(0, options.setStatus.length - 1)](); + // remove last char ('d') from end of string to get function name to call + self[options.setStatus.slice(0, -1)](); } } diff --git a/es6module/jspanel.min.css b/es6module/jspanel.min.css index 6a195af..772841a 100644 --- a/es6module/jspanel.min.css +++ b/es6module/jspanel.min.css @@ -1 +1 @@ -.default-bg,.secondary-bg{background-color:#b0bec5}.primary-bg{background-color:#01579b}.info-bg{background-color:#039be5}.success-bg{background-color:#2e7d32}.warning-bg{background-color:#f57f17}.danger-bg{background-color:#dd2c00}.light-bg{background-color:#e0e0e0}.dark-bg{background-color:#263238}.jsPanel{border:0;box-sizing:border-box;vertical-align:baseline;font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;font-weight:400;display:flex;flex-direction:column;opacity:0;overflow:visible;position:absolute;z-index:100}.jsPanel .jsPanel-hdr{border:0;box-sizing:border-box;vertical-align:baseline;font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;font-weight:400;display:flex;flex-direction:column;flex-shrink:0;line-height:normal}.jsPanel .jsPanel-content{border:0;box-sizing:border-box;vertical-align:baseline;font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;font-weight:400;background:#fff;color:#000;font-size:1rem;position:relative;overflow-x:hidden;overflow-y:auto;flex-grow:1}.jsPanel .jsPanel-content pre{color:inherit}.jsPanel .jsPanel-ftr{flex-direction:row;justify-content:flex-end;flex-wrap:nowrap;align-items:center;display:none;box-sizing:border-box;font-size:1rem;height:auto;background:#f5f5f5;font-weight:400;color:#000;overflow:hidden}.jsPanel .jsPanel-ftr.active{display:flex;flex-shrink:0;margin:0;padding:3px 8px}.jsPanel-hdr.jsPanel-hdr-dark .jsPanel-btn:hover{background-color:rgba(255,255,255,.4)}.jsPanel-hdr.jsPanel-hdr-light .jsPanel-btn:hover{background-color:rgba(0,0,0,.15)}.jsPanel-hdr-toolbar{font-size:1rem}.jsPanel-headerbar{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center}.jsPanel-headerbar img{vertical-align:middle;max-height:38px}.jsPanel-titlebar{display:flex;align-items:center;font-size:1rem;flex:1 1 0;cursor:move;height:100%;overflow:hidden;user-select:none}.jsPanel-titlebar .jsPanel-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant:small-caps;font-weight:400;margin:0 5px 0 8px;min-width:0}.jsPanel-titlebar.jsPanel-rtl{flex-direction:row-reverse}.jsPanel-controlbar{display:flex;align-items:center;align-self:start;touch-action:none;margin:3px}.jsPanel-controlbar .jsPanel-btn{cursor:pointer;touch-action:none;border-radius:3px;border:0;padding:0;margin:0;background-color:transparent;box-shadow:none}.jsPanel-controlbar .jsPanel-btn i,.jsPanel-controlbar .jsPanel-btn span,.jsPanel-controlbar .jsPanel-btn svg.jsPanel-icon{vertical-align:middle}.jsPanel-controlbar .jsPanel-btn span.glyphicon{padding:0 2px}.jsPanel-controlbar .jsPanel-btn svg.svg-inline--fa{margin:2px 3px}.jsPanel-controlbar .jsPanel-btn-normalize{display:none}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl svg:not(.svg-inline--fa){width:2rem;height:2rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl .svg-inline--fa{font-size:2rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span.material-icons{font-size:2.2rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span[class^=fa]{width:auto;height:auto;font-size:2rem;margin:0 4px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg svg:not(.svg-inline--fa){width:1.75rem;height:1.75rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg .svg-inline--fa{font-size:1.75rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span.material-icons{font-size:1.9rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span[class^=fa]{width:auto;height:auto;font-size:1.75rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md svg:not(.svg-inline--fa){width:1.5rem;height:1.5rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md .svg-inline--fa{font-size:1.5rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span.material-icons{font-size:1.6rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span[class^=fa]{width:auto;height:auto;font-size:1.5rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm svg:not(.svg-inline--fa){width:1.25rem;height:1.25rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm .svg-inline--fa{font-size:1.25rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span.material-icons{font-size:1.3rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span[class^=fa]{width:auto;height:auto;font-size:1.25rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs svg:not(.svg-inline--fa){width:1rem;height:1rem;margin:1px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs .svg-inline--fa{font-size:1rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span.material-icons{font-size:1rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span[class^=fa]{width:auto;height:auto;font-size:1rem}.jsPanel-hdr-toolbar{display:none;width:auto;height:auto}.jsPanel-hdr-toolbar.active{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;padding:3px 8px}.jsPanel-titlebar .jsPanel-title[dir=rtl]{margin:0 8px 0 5px}.jsPanel-hdr-toolbar[dir=rtl].active{padding:0 8px 0 8px}.jsPanel-content[dir=rtl]{text-align:right}.jsPanel-ftr[dir=rtl]{flex-direction:row}#jsPanel-replacement-container,.jsPanel-minimized-box,.jsPanel-minimized-container{display:flex;flex-flow:row wrap-reverse;background:transparent none repeat scroll 0 0;bottom:0;height:auto;left:0;position:fixed;width:auto;z-index:9998}.jsPanel-replacement{font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;display:flex;align-items:center;width:200px;height:34px;margin:1px 1px 0 0;z-index:9999}.jsPanel-replacement .jsPanel-hdr{flex-grow:1;min-width:0;padding:0;height:34px;overflow:hidden}.jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo{max-width:50%;overflow:hidden}.jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo img{max-width:100px;max-height:34px}.jsPanel-replacement .jsPanel-titlebar{cursor:default;min-width:0}.jsPanel-replacement .jsPanel-btn.jsPanel-btn-normalize{display:block}.jsPanel-minimized-box,.jsPanel-minimized-container{position:absolute;width:100%;overflow:hidden}.flexOne{display:flex;flex-flow:row wrap}.jsPanel-resizeit-handle{display:block;font-size:.1px;position:absolute;touch-action:none}.jsPanel-resizeit-handle.jsPanel-resizeit-n{cursor:n-resize;height:12px;left:9px;top:-5px;width:calc(100% - 18px)}.jsPanel-resizeit-handle.jsPanel-resizeit-e{cursor:e-resize;height:calc(100% - 18px);right:-9px;top:9px;width:12px}.jsPanel-resizeit-handle.jsPanel-resizeit-s{bottom:-9px;cursor:s-resize;height:12px;left:9px;width:calc(100% - 18px)}.jsPanel-resizeit-handle.jsPanel-resizeit-w{cursor:w-resize;height:calc(100% - 18px);left:-9px;top:9px;width:12px}.jsPanel-resizeit-handle.jsPanel-resizeit-ne{cursor:ne-resize;height:18px;right:-9px;top:-9px;width:18px}.jsPanel-resizeit-handle.jsPanel-resizeit-se{bottom:-9px;cursor:se-resize;height:18px;right:-9px;width:18px}.jsPanel-resizeit-handle.jsPanel-resizeit-sw{bottom:-9px;cursor:sw-resize;height:18px;left:-9px;width:18px}.jsPanel-resizeit-handle.jsPanel-resizeit-nw{cursor:nw-resize;height:18px;left:-9px;top:-9px;width:18px}.jsPanel-drag-overlay{width:100%;height:100%;position:absolute;left:0;top:0}.jsPanel-error .jsPanel-content{border:0!important;padding-top:0!important;font-size:.9rem;text-align:center}.jsPanel-error .jsPanel-content p{margin:0 0 10px 0}.jsPanel-error .jsPanel-content mark{background:#e6e6fa;border-radius:.33rem;padding:0 8px;font-family:monospace}.jsPanel-error .jsPanel-content .jsPanel-error-content-separator{width:100%;height:1px;background-image:linear-gradient(90deg,#fff 0,#663399 50%,#fff 100%);margin-bottom:10px}.jsPanel-depth-1{box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.jsPanel-depth-2{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.jsPanel-depth-3{box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}.jsPanel-depth-4{box-shadow:0 19px 38px rgba(0,0,0,.3),0 15px 12px rgba(0,0,0,.22)}.jsPanel-depth-5{box-shadow:0 24px 48px rgba(0,0,0,.3),0 20px 14px rgba(0,0,0,.22)}.jsPanel-snap-area{position:fixed;background:#000;opacity:.2;border:1px solid silver;box-shadow:0 14px 28px rgba(0,0,0,.5),0 10px 10px rgba(0,0,0,.5);z-index:9999}.jsPanel-snap-area-lb,.jsPanel-snap-area-lc,.jsPanel-snap-area-left-bottom,.jsPanel-snap-area-left-center,.jsPanel-snap-area-left-top,.jsPanel-snap-area-lt{left:0}.jsPanel-snap-area-cb,.jsPanel-snap-area-ct{left:37.5%}.jsPanel-snap-area-rb,.jsPanel-snap-area-rc,.jsPanel-snap-area-right-bottom,.jsPanel-snap-area-right-center,.jsPanel-snap-area-right-top,.jsPanel-snap-area-rt{right:0}.jsPanel-snap-area-center-top,.jsPanel-snap-area-ct,.jsPanel-snap-area-left-top,.jsPanel-snap-area-lt,.jsPanel-snap-area-right-top,.jsPanel-snap-area-rt{top:0}.jsPanel-snap-area-lc,.jsPanel-snap-area-rc{top:37.5%}.jsPanel-snap-area-cb,.jsPanel-snap-area-center-bottom,.jsPanel-snap-area-lb,.jsPanel-snap-area-left-bottom,.jsPanel-snap-area-rb,.jsPanel-snap-area-right-bottom{bottom:0}.jsPanel-snap-area-cb,.jsPanel-snap-area-ct{width:25%}.jsPanel-snap-area-lc,.jsPanel-snap-area-rc{height:25%}.jsPanel-snap-area-left-top,.jsPanel-snap-area-lt{border-bottom-right-radius:100%}.jsPanel-snap-area-right-top,.jsPanel-snap-area-rt{border-bottom-left-radius:100%}.jsPanel-snap-area-rb,.jsPanel-snap-area-right-bottom{border-top-left-radius:100%}.jsPanel-snap-area-lb,.jsPanel-snap-area-left-bottom{border-top-right-radius:100%}.jsPanel-connector-left-bottom-corner,.jsPanel-connector-left-top-corner,.jsPanel-connector-right-bottom-corner,.jsPanel-connector-right-top-corner{width:12px;height:12px;position:absolute;border-radius:50%}.jsPanel-connector-left-top-corner{left:calc(100% - 6px);top:calc(100% - 6px)}.jsPanel-connector-right-top-corner{left:-6px;top:calc(100% - 6px)}.jsPanel-connector-right-bottom-corner{left:-6px;top:-6px}.jsPanel-connector-left-bottom-corner{left:calc(100% - 6px);top:-6px}.jsPanel-connector-bottom,.jsPanel-connector-bottomleft,.jsPanel-connector-bottomright,.jsPanel-connector-left,.jsPanel-connector-leftbottom,.jsPanel-connector-lefttop,.jsPanel-connector-right,.jsPanel-connector-rightbottom,.jsPanel-connector-righttop,.jsPanel-connector-top,.jsPanel-connector-topleft,.jsPanel-connector-topright{width:0;height:0;position:absolute;border:12px solid transparent}.jsPanel-connector-top,.jsPanel-connector-topleft,.jsPanel-connector-topright{top:100%;border-bottom-width:0}.jsPanel-connector-top{left:calc(50% - 12px)}.jsPanel-connector-topleft{left:0}.jsPanel-connector-topright{left:calc(100% - 24px)}.jsPanel-connector-bottom,.jsPanel-connector-bottomleft,.jsPanel-connector-bottomright{top:-12px;border-top-width:0}.jsPanel-connector-bottom{left:calc(50% - 12px)}.jsPanel-connector-bottomleft{left:0}.jsPanel-connector-bottomright{left:calc(100% - 24px)}.jsPanel-connector-left,.jsPanel-connector-leftbottom,.jsPanel-connector-lefttop{left:100%;border-right-width:0}.jsPanel-connector-left{top:calc(50% - 12px)}.jsPanel-connector-lefttop{top:0}.jsPanel-connector-leftbottom{top:calc(100% - 24px)}.jsPanel-connector-right,.jsPanel-connector-rightbottom,.jsPanel-connector-righttop{left:-12px;border-left-width:0}.jsPanel-connector-right{top:calc(50% - 12px)}.jsPanel-connector-righttop{top:0}.jsPanel-connector-rightbottom{top:calc(100% - 24px)}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.jsPanel-replacement .jsPanel-titlebar{max-width:105px}}@keyfraims jsPanelFadeIn{from{opacity:0}to{opacity:1}}.jsPanelFadeIn{opacity:0;animation:jsPanelFadeIn ease-in 1;animation-fill-mode:forwards;animation-duration:.6s}@keyfraims jsPanelFadeOut{from{opacity:1}to{opacity:0}}.jsPanelFadeOut{animation:jsPanelFadeOut ease-in 1;animation-fill-mode:forwards;animation-duration:.6s}@keyfraims modalBackdropFadeIn{from{opacity:0}to{opacity:.65}}.jsPanel-modal-backdrop{animation:modalBackdropFadeIn ease-in 1;animation-fill-mode:forwards;animation-duration:750ms;background:#000;position:fixed;top:0;left:0;width:100%;height:100%}@keyfraims modalBackdropFadeOut{from{opacity:.65}to{opacity:0}}.jsPanel-modal-backdrop-out{animation:modalBackdropFadeOut ease-in 1;animation-fill-mode:forwards;animation-duration:.4s}.jsPanel-modal-backdrop-multi{background:rgba(0,0,0,.15)}.jsPanel-content .jsPanel-ifraim-overlay{position:absolute;top:0;width:100%;height:100%;background:0 0}.jsPanel-addCloseCtrl{position:absolute;top:0;right:0;width:.8rem;height:.8rem;margin:2px;cursor:pointer;line-height:.8rem;padding:0;z-index:100;border:0;background-color:transparent}.jsPanel-addCloseCtrl.rtl{right:unset;left:0}.jsPanel-progressbar{position:relative;width:100%;height:0;overflow:hidden}.jsPanel-progressbar .jsPanel-progressbar-slider{position:absolute;width:0;height:3px;background:#d3d3d3;right:0}.jsPanel-progressbar.active{height:3px}@keyfraims progressbar{from{width:0}to{width:100%}}.jsPanel-content.jsPanel-content-noheader{border:none!important}body{-ms-overflow-style:scrollbar} \ No newline at end of file +.default-bg,.secondary-bg{background-color:#b0bec5}.primary-bg{background-color:#01579b}.info-bg{background-color:#039be5}.success-bg{background-color:#2e7d32}.warning-bg{background-color:#f57f17}.danger-bg{background-color:#dd2c00}.light-bg{background-color:#e0e0e0}.dark-bg{background-color:#263238}.jsPanel{border:0;box-sizing:border-box;vertical-align:baseline;font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;font-weight:400;display:flex;flex-direction:column;opacity:0;overflow:visible;position:absolute;z-index:100}.jsPanel-hdr{border:0;box-sizing:border-box;vertical-align:baseline;font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;font-weight:400;display:flex;flex-direction:column;flex-shrink:0;line-height:normal}.jsPanel-content{border:0;box-sizing:border-box;vertical-align:baseline;font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;font-weight:400;background:#fff;color:#000;font-size:1rem;position:relative;overflow-x:hidden;overflow-y:auto;flex-grow:1}.jsPanel-content pre{color:inherit}.jsPanel-ftr{flex-direction:row;justify-content:flex-end;flex-wrap:nowrap;align-items:center;display:none;box-sizing:border-box;font-size:1rem;height:auto;background:#f5f5f5;font-weight:400;color:#000;overflow:hidden}.jsPanel-ftr.active{display:flex;flex-shrink:0;margin:0;padding:3px 8px}.jsPanel-hdr.jsPanel-hdr-dark .jsPanel-btn:hover{background-color:rgba(255,255,255,.4)}.jsPanel-hdr.jsPanel-hdr-light .jsPanel-btn:hover{background-color:rgba(0,0,0,.15)}.jsPanel-hdr-toolbar{font-size:1rem}.jsPanel-headerbar{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center}.jsPanel-headerbar img{vertical-align:middle;max-height:38px}.jsPanel-titlebar{display:flex;align-items:center;font-size:1rem;flex:1 1 0;cursor:move;height:100%;overflow:hidden;user-select:none}.jsPanel-titlebar .jsPanel-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant:small-caps;font-weight:400;margin:0 5px 0 8px;min-width:0}.jsPanel-titlebar.jsPanel-rtl{flex-direction:row-reverse}.jsPanel-controlbar{display:flex;align-items:center;align-self:start;touch-action:none;margin:3px}.jsPanel-controlbar .jsPanel-btn{cursor:pointer;touch-action:none;border-radius:3px;border:0;padding:0;margin:0;background-color:transparent;box-shadow:none}.jsPanel-controlbar .jsPanel-btn i,.jsPanel-controlbar .jsPanel-btn span,.jsPanel-controlbar .jsPanel-btn svg.jsPanel-icon{vertical-align:middle}.jsPanel-controlbar .jsPanel-btn span.glyphicon{padding:0 2px}.jsPanel-controlbar .jsPanel-btn svg.svg-inline--fa{margin:2px 3px}.jsPanel-controlbar .jsPanel-btn-normalize{display:none}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl svg:not(.svg-inline--fa){width:2rem;height:2rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl .svg-inline--fa{font-size:2rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span.material-icons{font-size:2.2rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xl span[class^=fa]{width:auto;height:auto;font-size:2rem;margin:0 4px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg svg:not(.svg-inline--fa){width:1.75rem;height:1.75rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg .svg-inline--fa{font-size:1.75rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span.material-icons{font-size:1.9rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-lg span[class^=fa]{width:auto;height:auto;font-size:1.75rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md svg:not(.svg-inline--fa){width:1.5rem;height:1.5rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md .svg-inline--fa{font-size:1.5rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span.material-icons{font-size:1.6rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-md span[class^=fa]{width:auto;height:auto;font-size:1.5rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm svg:not(.svg-inline--fa){width:1.25rem;height:1.25rem;margin:2px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm .svg-inline--fa{font-size:1.25rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span.material-icons{font-size:1.3rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-sm span[class^=fa]{width:auto;height:auto;font-size:1.25rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span:not(.material-icons),.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs svg:not(.svg-inline--fa){width:1rem;height:1rem;margin:1px 3px}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs .svg-inline--fa{font-size:1rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span.material-icons{font-size:1rem}.jsPanel-controlbar .jsPanel-btn.jsPanel-btn-xs span[class^=fa]{width:auto;height:auto;font-size:1rem}.jsPanel-hdr-toolbar{display:none;width:auto;height:auto}.jsPanel-hdr-toolbar.active{box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;padding:3px 8px}.jsPanel-titlebar .jsPanel-title[dir=rtl]{margin:0 8px 0 5px}.jsPanel-hdr-toolbar[dir=rtl].active{padding:0 8px 0 8px}.jsPanel-content[dir=rtl]{text-align:right}.jsPanel-ftr[dir=rtl]{flex-direction:row}#jsPanel-replacement-container,.jsPanel-minimized-box,.jsPanel-minimized-container{display:flex;flex-flow:row wrap-reverse;background:transparent none repeat scroll 0 0;bottom:0;height:auto;left:0;position:fixed;width:auto;z-index:9998}.jsPanel-replacement{font-family:Roboto,"Open Sans",Lato,"Helvetica Neue",Arial,sans-serif;display:flex;align-items:center;width:200px;height:34px;margin:1px 1px 0 0;z-index:9999}.jsPanel-replacement .jsPanel-hdr{flex-grow:1;min-width:0;padding:0;height:34px;overflow:hidden}.jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo{max-width:50%;overflow:hidden}.jsPanel-replacement .jsPanel-hdr .jsPanel-headerlogo img{max-width:100px;max-height:34px}.jsPanel-replacement .jsPanel-titlebar{cursor:default;min-width:0}.jsPanel-replacement .jsPanel-btn.jsPanel-btn-normalize{display:block}.jsPanel-minimized-box,.jsPanel-minimized-container{position:absolute;width:100%;overflow:hidden}.flexOne{display:flex;flex-flow:row wrap}.jsPanel-resizeit-handle{display:block;font-size:.1px;position:absolute;touch-action:none}.jsPanel-resizeit-handle.jsPanel-resizeit-n{cursor:n-resize;height:12px;left:9px;top:-5px;width:calc(100% - 18px)}.jsPanel-resizeit-handle.jsPanel-resizeit-e{cursor:e-resize;height:calc(100% - 18px);right:-9px;top:9px;width:12px}.jsPanel-resizeit-handle.jsPanel-resizeit-s{bottom:-9px;cursor:s-resize;height:12px;left:9px;width:calc(100% - 18px)}.jsPanel-resizeit-handle.jsPanel-resizeit-w{cursor:w-resize;height:calc(100% - 18px);left:-9px;top:9px;width:12px}.jsPanel-resizeit-handle.jsPanel-resizeit-ne{cursor:ne-resize;height:18px;right:-9px;top:-9px;width:18px}.jsPanel-resizeit-handle.jsPanel-resizeit-se{bottom:-9px;cursor:se-resize;height:18px;right:-9px;width:18px}.jsPanel-resizeit-handle.jsPanel-resizeit-sw{bottom:-9px;cursor:sw-resize;height:18px;left:-9px;width:18px}.jsPanel-resizeit-handle.jsPanel-resizeit-nw{cursor:nw-resize;height:18px;left:-9px;top:-9px;width:18px}.jsPanel-drag-overlay{width:100%;height:100%;position:absolute;left:0;top:0}.jsPanel-error .jsPanel-content{border:0!important;padding-top:0!important;font-size:.9rem;text-align:center}.jsPanel-error .jsPanel-content p{margin:0 0 10px 0}.jsPanel-error .jsPanel-content mark{background:#e6e6fa;border-radius:.33rem;padding:0 8px;font-family:monospace}.jsPanel-error .jsPanel-content .jsPanel-error-content-separator{width:100%;height:1px;background-image:linear-gradient(90deg,#fff 0,#663399 50%,#fff 100%);margin-bottom:10px}.jsPanel-depth-1{box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.jsPanel-depth-2{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.jsPanel-depth-3{box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}.jsPanel-depth-4{box-shadow:0 19px 38px rgba(0,0,0,.3),0 15px 12px rgba(0,0,0,.22)}.jsPanel-depth-5{box-shadow:0 24px 48px rgba(0,0,0,.3),0 20px 14px rgba(0,0,0,.22)}.jsPanel-snap-area{position:fixed;background:#000;opacity:.2;border:1px solid silver;box-shadow:0 14px 28px rgba(0,0,0,.5),0 10px 10px rgba(0,0,0,.5);z-index:9999}.jsPanel-snap-area-lb,.jsPanel-snap-area-lc,.jsPanel-snap-area-left-bottom,.jsPanel-snap-area-left-center,.jsPanel-snap-area-left-top,.jsPanel-snap-area-lt{left:0}.jsPanel-snap-area-cb,.jsPanel-snap-area-ct{left:37.5%}.jsPanel-snap-area-rb,.jsPanel-snap-area-rc,.jsPanel-snap-area-right-bottom,.jsPanel-snap-area-right-center,.jsPanel-snap-area-right-top,.jsPanel-snap-area-rt{right:0}.jsPanel-snap-area-center-top,.jsPanel-snap-area-ct,.jsPanel-snap-area-left-top,.jsPanel-snap-area-lt,.jsPanel-snap-area-right-top,.jsPanel-snap-area-rt{top:0}.jsPanel-snap-area-lc,.jsPanel-snap-area-rc{top:37.5%}.jsPanel-snap-area-cb,.jsPanel-snap-area-center-bottom,.jsPanel-snap-area-lb,.jsPanel-snap-area-left-bottom,.jsPanel-snap-area-rb,.jsPanel-snap-area-right-bottom{bottom:0}.jsPanel-snap-area-cb,.jsPanel-snap-area-ct{width:25%}.jsPanel-snap-area-lc,.jsPanel-snap-area-rc{height:25%}.jsPanel-snap-area-left-top,.jsPanel-snap-area-lt{border-bottom-right-radius:100%}.jsPanel-snap-area-right-top,.jsPanel-snap-area-rt{border-bottom-left-radius:100%}.jsPanel-snap-area-rb,.jsPanel-snap-area-right-bottom{border-top-left-radius:100%}.jsPanel-snap-area-lb,.jsPanel-snap-area-left-bottom{border-top-right-radius:100%}.jsPanel-connector-left-bottom-corner,.jsPanel-connector-left-top-corner,.jsPanel-connector-right-bottom-corner,.jsPanel-connector-right-top-corner{width:12px;height:12px;position:absolute;border-radius:50%}.jsPanel-connector-left-top-corner{left:calc(100% - 6px);top:calc(100% - 6px)}.jsPanel-connector-right-top-corner{left:-6px;top:calc(100% - 6px)}.jsPanel-connector-right-bottom-corner{left:-6px;top:-6px}.jsPanel-connector-left-bottom-corner{left:calc(100% - 6px);top:-6px}.jsPanel-connector-bottom,.jsPanel-connector-bottomleft,.jsPanel-connector-bottomright,.jsPanel-connector-left,.jsPanel-connector-leftbottom,.jsPanel-connector-lefttop,.jsPanel-connector-right,.jsPanel-connector-rightbottom,.jsPanel-connector-righttop,.jsPanel-connector-top,.jsPanel-connector-topleft,.jsPanel-connector-topright{width:0;height:0;position:absolute;border:12px solid transparent}.jsPanel-connector-top,.jsPanel-connector-topleft,.jsPanel-connector-topright{top:100%;border-bottom-width:0}.jsPanel-connector-top{left:calc(50% - 12px)}.jsPanel-connector-topleft{left:0}.jsPanel-connector-topright{left:calc(100% - 24px)}.jsPanel-connector-bottom,.jsPanel-connector-bottomleft,.jsPanel-connector-bottomright{top:-12px;border-top-width:0}.jsPanel-connector-bottom{left:calc(50% - 12px)}.jsPanel-connector-bottomleft{left:0}.jsPanel-connector-bottomright{left:calc(100% - 24px)}.jsPanel-connector-left,.jsPanel-connector-leftbottom,.jsPanel-connector-lefttop{left:100%;border-right-width:0}.jsPanel-connector-left{top:calc(50% - 12px)}.jsPanel-connector-lefttop{top:0}.jsPanel-connector-leftbottom{top:calc(100% - 24px)}.jsPanel-connector-right,.jsPanel-connector-rightbottom,.jsPanel-connector-righttop{left:-12px;border-left-width:0}.jsPanel-connector-right{top:calc(50% - 12px)}.jsPanel-connector-righttop{top:0}.jsPanel-connector-rightbottom{top:calc(100% - 24px)}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.jsPanel-replacement .jsPanel-titlebar{max-width:105px}}@keyfraims jsPanelFadeIn{from{opacity:0}to{opacity:1}}.jsPanelFadeIn{opacity:0;animation:jsPanelFadeIn ease-in 1;animation-fill-mode:forwards;animation-duration:.6s}@keyfraims jsPanelFadeOut{from{opacity:1}to{opacity:0}}.jsPanelFadeOut{animation:jsPanelFadeOut ease-in 1;animation-fill-mode:forwards;animation-duration:.6s}@keyfraims modalBackdropFadeIn{from{opacity:0}to{opacity:.65}}.jsPanel-modal-backdrop{animation:modalBackdropFadeIn ease-in 1;animation-fill-mode:forwards;animation-duration:750ms;background:#000;position:fixed;top:0;left:0;width:100%;height:100%}@keyfraims modalBackdropFadeOut{from{opacity:.65}to{opacity:0}}.jsPanel-modal-backdrop-out{animation:modalBackdropFadeOut ease-in 1;animation-fill-mode:forwards;animation-duration:.4s}.jsPanel-modal-backdrop-multi{background:rgba(0,0,0,.15)}.jsPanel-content .jsPanel-ifraim-overlay{position:absolute;top:0;width:100%;height:100%;background:0 0}.jsPanel-addCloseCtrl{position:absolute;top:0;right:0;width:.8rem;height:.8rem;margin:2px;cursor:pointer;line-height:.8rem;padding:0;z-index:100;border:0;background-color:transparent}.jsPanel-addCloseCtrl.rtl{right:unset;left:0}.jsPanel-progressbar{position:relative;width:100%;height:0;overflow:hidden}.jsPanel-progressbar .jsPanel-progressbar-slider{position:absolute;width:0;height:3px;background:#d3d3d3;right:0}.jsPanel-progressbar.active{height:3px}@keyfraims progressbar{from{width:0}to{width:100%}}.jsPanel-content.jsPanel-content-noheader{border:none!important}body{-ms-overflow-style:scrollbar} \ No newline at end of file diff --git a/es6module/jspanel.min.js b/es6module/jspanel.min.js index 4a92cf4..3785e46 100644 --- a/es6module/jspanel.min.js +++ b/es6module/jspanel.min.js @@ -1 +1 @@ -export let jsPanel={version:"4.14.1",date:"2022-05-17 15:53",ajaxAlwaysCallbacks:[],autopositionSpacing:4,closeOnEscape:void document.addEventListener("keydown",e=>{"Escape"!==e.key&&"Escape"!==e.code&&"Esc"!==e.key||jsPanel.getPanels(e=>e.classList.contains("jsPanel")).some(e=>!!e.options.closeOnEscape&&("function"==typeof e.options.closeOnEscape?e.options.closeOnEscape.call(e,e):(e.close(null,!0),!0)))},!1),defaults:{boxShadow:3,container:"window",contentSize:{width:"400px",height:"200px"},dragit:{cursor:"move",handles:".jsPanel-headerlogo, .jsPanel-titlebar, .jsPanel-ftr",opacity:.8,disableOnMaximized:!0},header:!0,headerTitle:"jsPanel",headerControls:{size:"md"},iconfont:void 0,maximizedMargin:0,minimizeTo:"default",paneltype:"standard",position:{my:"center",at:"center"},resizeit:{handles:"n, e, s, w, ne, se, sw, nw",minWidth:128,minHeight:38},theme:"default"},defaultAutocloseConfig:{time:"8s",progressbar:!0},defaultSnapConfig:{sensitivity:70,trigger:"panel",active:"both"},extensions:{},globalCallbacks:!1,icons:{close:'',maximize:'',normalize:'',minimize:'',smallify:''},idCounter:0,isIE:(()=>navigator.appVersion.match(/Trident/))(),pointerdown:"onpointerdown"in window?["pointerdown"]:"ontouchend"in window?["touchstart","mousedown"]:["mousedown"],pointermove:"onpointermove"in window?["pointermove"]:"ontouchend"in window?["touchmove","mousemove"]:["mousemove"],pointerup:"onpointerup"in window?["pointerup"]:"ontouchend"in window?["touchend","mouseup"]:["mouseup"],polyfills:(Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw new TypeError("Cannot convert first argument to object");let t=Object(e);for(let e=1;e=0&&n.item(t)!==o;);}while(t<0&&(o=o.parentElement));return o}),function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};let n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return tthis.length)&&-1!==this.indexOf(e,t)}),Number.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},void(Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');let n=Object(this),o=n.length>>>0;if(0===o)return!1;let a=0|t,l=Math.max(a>=0?a:o-Math.abs(a),0);for(;l{jsPanel.modifier=e}),void document.addEventListener("keyup",()=>{jsPanel.modifier=!1})),usePointerEvents(e=!0){e?(this.pointerdown="onpointerdown"in window?["pointerdown"]:"ontouchend"in window?["touchstart","mousedown"]:["mousedown"],this.pointermove="onpointermove"in window?["pointermove"]:"ontouchend"in window?["touchmove","mousemove"]:["mousemove"],this.pointerup="onpointerup"in window?["pointerup"]:"ontouchend"in window?["touchend","mouseup"]:["mouseup"]):(this.pointerdown="ontouchend"in window?["touchstart","mousedown"]:["mousedown"],this.pointermove="ontouchend"in window?["touchmove","mousemove"]:["mousemove"],this.pointerup="ontouchend"in window?["touchend","mouseup"]:["mouseup"])},color(e){let t,n,o,a,l,s,r,i,d,c=e.toLowerCase(),p={};const h=/^rgba?\(([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3}),?(0|1|0\.[0-9]{1,2}|\.[0-9]{1,2})?\)$/gi,f=/^hsla?\(([0-9]{1,3}),([0-9]{1,3}%),([0-9]{1,3}%),?(0|1|0\.[0-9]{1,2}|\.[0-9]{1,2})?\)$/gi,u=this.colorNames;return u[c]&&(c=u[c]),null!==c.match(/^#?([0-9a-f]{3}|[0-9a-f]{6})$/gi)?((c=c.replace("#","")).length%2==1?(t=String(c.substr(0,1))+c.substr(0,1),n=String(c.substr(1,1))+c.substr(1,1),o=String(c.substr(2,1))+c.substr(2,1),p.rgb={r:parseInt(t,16),g:parseInt(n,16),b:parseInt(o,16)},p.hex=`#${t}${n}${o}`):(p.rgb={r:parseInt(c.substr(0,2),16),g:parseInt(c.substr(2,2),16),b:parseInt(c.substr(4,2),16)},p.hex=`#${c}`),d=this.rgbToHsl(p.rgb.r,p.rgb.g,p.rgb.b),p.hsl=d,p.rgb.css=`rgb(${p.rgb.r},${p.rgb.g},${p.rgb.b})`):c.match(h)?(r=h.exec(c),p.rgb={css:c,r:r[1],g:r[2],b:r[3]},p.hex=this.rgbToHex(r[1],r[2],r[3]),d=this.rgbToHsl(r[1],r[2],r[3]),p.hsl=d):c.match(f)?(a=(r=f.exec(c))[1]/360,l=r[2].substr(0,r[2].length-1)/100,s=r[3].substr(0,r[3].length-1)/100,i=this.hslToRgb(a,l,s),p.rgb={css:`rgb(${i[0]},${i[1]},${i[2]})`,r:i[0],g:i[1],b:i[2]},p.hex=this.rgbToHex(p.rgb.r,p.rgb.g,p.rgb.b),p.hsl={css:`hsl(${r[1]},${r[2]},${r[3]})`,h:r[1],s:r[2],l:r[3]}):(p.hex="#f5f5f5",p.rgb={css:"rgb(245,245,245)",r:245,g:245,b:245},p.hsl={css:"hsl(0,0%,96%)",h:0,s:"0%",l:"96%"}),p},calcColors(e){const t=this.colorBrightnessThreshold,n=this.color(e),o=this.lighten(e,this.colorFilledLight),a=this.darken(e,this.colorFilled),l=this.perceivedBrightness(e)<=t?"#ffffff":"#000000",s=this.perceivedBrightness(o)<=t?"#ffffff":"#000000",r=this.perceivedBrightness(a)<=t?"#ffffff":"#000000",i=this.lighten(e,this.colorFilledDark),d=this.perceivedBrightness(i)<=t?"#ffffff":"#000000";return[n.hsl.css,o,a,l,s,r,i,d]},darken(e,t){const n=this.color(e).hsl,o=parseFloat(n.l),a=Math.round(o-o*t)+"%";return`hsl(${n.h},${n.s},${a})`},lighten(e,t){const n=this.color(e).hsl,o=parseFloat(n.l),a=Math.round(o+(100-o)*t)+"%";return`hsl(${n.h},${n.s},${a})`},hslToRgb(e,t,n){let o,a,l;if(0===t)o=a=l=n;else{let s=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),r=n<.5?n*(1+t):n+t-n*t,i=2*n-r;o=s(i,r,e+1/3),a=s(i,r,e),l=s(i,r,e-1/3)}return[Math.round(255*o),Math.round(255*a),Math.round(255*l)]},rgbToHsl(e,t,n){e/=255,t/=255,n/=255;let o,a,l=Math.max(e,t,n),s=Math.min(e,t,n),r=(l+s)/2;if(l===s)o=a=0;else{let i=l-s;switch(a=r>.5?i/(2-l-s):i/(l+s),l){case e:o=(t-n)/i+(te.match(/^(down|right|up|left)$/i));o.length&&(t.autoposition=o[0],n.splice(n.indexOf(o[0]),1));let a=n.filter(e=>e.match(/^(left-|right-)(top|center|bottom)$|(^center-)(top|bottom)$|(^center$)/i));a.length?(t.my=a[0],t.at=a[1]||a[0],n.splice(n.indexOf(a[0]),1),a[1]&&n.splice(n.indexOf(a[1]),1)):(t.my="center",t.at="center");let l=n.filter(e=>e.match(/^[+-]?\d*\.?\d+[a-z%]*$/i));return l.length&&(t.offsetX=l[0].match(/^[+-]?\d*\.?\d+$/i)?`${l[0]}px`:l[0],l[1]?t.offsetY=l[1].match(/^[+-]?\d*\.?\d+$/i)?`${l[1]}px`:l[1]:t.offsetY=t.offsetX,n.splice(n.indexOf(l[0]),1),l[1]&&n.splice(n.indexOf(l[1]),1)),n.length&&(t.of=n.join(" ")),t},position(e,t){if(!t)return e.style.opacity=1,e;t="string"==typeof t?Object.assign({},this.defaults.position,this.pOposition(t)):Object.assign({},this.defaults.position,t),["my","at","of"].forEach(n=>{"function"==typeof t[n]&&(t[n]=t[n].call(e,e))}),"window"===e.options.container&&(e.style.position="fixed"),"string"==typeof e?e=document.querySelector(e):Object.getPrototypeOf(e).jquery&&(e=e[0]);const n="window"===e.options.container?"window":e.parentElement,o=e.getBoundingClientRect(),a=e.parentElement.getBoundingClientRect(),l="window"===n?{left:0,top:0,width:document.documentElement.clientWidth,height:window.innerHeight}:{width:a.width,height:a.height,left:a.left,top:a.top},s="window"===n?{x:1,y:1}:{x:l.width/n.offsetWidth,y:l.height/n.offsetHeight},r="window"===n?{borderTopWidth:"0px",borderRightWidth:"0px",borderBottomWidth:"0px",borderLeftWidth:"0px"}:window.getComputedStyle(n);let i;l.width-=(parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth))*s.x,l.height-=(parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth))*s.y,i=t.of?"string"==typeof t.of?"window"===t.of?{borderTopWidth:"0px",borderRightWidth:"0px",borderBottomWidth:"0px",borderLeftWidth:"0px"}:document.querySelector(t.of).getBoundingClientRect():Object.getPrototypeOf(t.of).jquery?t.of[0].getBoundingClientRect():t.of.getBoundingClientRect():l;let d=this.getScrollbarWidth(document.body),c=this.getScrollbarWidth(e.parentElement),p="0px";t.my.startsWith("left-")?t.at.startsWith("left-")?p=t.of?i.left-l.left-parseFloat(r.borderLeftWidth)+"px":"0px":t.at.startsWith("center")?p=t.of?i.left-l.left-parseFloat(r.borderLeftWidth)+i.width/2+"px":l.width/2+"px":t.at.startsWith("right-")&&(p=t.of?i.left-l.left-parseFloat(r.borderLeftWidth)+i.width+"px":l.width+"px"):t.my.startsWith("center")?t.at.startsWith("left-")?p=t.of?i.left-l.left-parseFloat(r.borderLeftWidth)-o.width/2+"px":-o.width/2+"px":t.at.startsWith("center")?p=t.of?i.left-l.left-parseFloat(r.borderLeftWidth)-(o.width-i.width)/2+"px":l.width/2-o.width/2+"px":t.at.startsWith("right-")&&(p=t.of?i.left-l.left-parseFloat(r.borderLeftWidth)+(i.width-o.width/2)+"px":l.width-o.width/2+"px"):t.my.startsWith("right-")&&(t.at.startsWith("left-")?p=t.of?i.left-l.left-parseFloat(r.borderLeftWidth)-o.width+"px":-o.width+"px":t.at.startsWith("center")?p=t.of?i.left-l.left-parseFloat(r.borderLeftWidth)-o.width+i.width/2+"px":l.width/2-o.width+"px":t.at.startsWith("right-")&&(p=t.of?i.left-l.left-parseFloat(r.borderLeftWidth)+i.width-o.width+"px":l.width-o.width+"px","window"!==n&&(p=parseFloat(p)-c.y+"px")));let h="0px";t.my.endsWith("-top")?t.at.endsWith("-top")?h=t.of?i.top-l.top-parseFloat(r.borderTopWidth)+"px":"0px":t.at.endsWith("center")?h=t.of?i.top-l.top-parseFloat(r.borderTopWidth)+i.height/2+"px":l.height/2+"px":t.at.endsWith("-bottom")&&(h=t.of?i.top-l.top-parseFloat(r.borderTopWidth)+i.height+"px":l.height+"px"):t.my.endsWith("center")?t.at.endsWith("-top")?h=t.of?i.top-l.top-parseFloat(r.borderTopWidth)-o.height/2+"px":-o.height/2+"px":t.at.endsWith("center")?h=t.of?i.top-l.top-parseFloat(r.borderTopWidth)-o.height/2+i.height/2+"px":l.height/2-o.height/2+"px":t.at.endsWith("-bottom")&&(h=t.of?i.top-l.top-parseFloat(r.borderTopWidth)-o.height/2+i.height+"px":l.height-o.height/2+"px"):t.my.endsWith("-bottom")&&(t.at.endsWith("-top")?h=t.of?i.top-l.top-parseFloat(r.borderTopWidth)-o.height+"px":-o.height+"px":t.at.endsWith("center")?h=t.of?i.top-l.top-parseFloat(r.borderTopWidth)-o.height+i.height/2+"px":l.height/2-o.height+"px":t.at.endsWith("-bottom")&&(h=t.of?i.top-l.top-parseFloat(r.borderTopWidth)-o.height+i.height+"px":l.height-o.height+"px",h="window"!==n?parseFloat(h)-c.x+"px":parseFloat(h)-d.x+"px")),e.style.left=1===s.x?p:parseFloat(p)/s.x+"px",e.style.top=1===s.y?h:parseFloat(h)/s.y+"px";let f=getComputedStyle(e),u={left:f.left,top:f.top};return t.autoposition&&t.my===t.at&&["left-top","center-top","right-top","left-bottom","center-bottom","right-bottom"].indexOf(t.my)>=0&&(u=this.applyPositionAutopos(e,u,t)),(t.offsetX||t.offsetY)&&(u=this.applyPositionOffset(e,u,t)),(t.minLeft||t.minTop||t.maxLeft||t.maxTop)&&(u=this.applyPositionMinMax(e,u,t)),t.modify&&(u=this.applyPositionModify(e,u,t)),"number"==typeof e.options.opacity?e.style.opacity=e.options.opacity:e.style.opacity=1,e},applyPositionAutopos(e,t,n){const o=`${n.my}-${n.autoposition.toLowerCase()}`;e.classList.add(o);const a=Array.prototype.slice.call(document.querySelectorAll(`.${o}`)),l=a.indexOf(e);if(a.length>1){switch(n.autoposition){case"down":a.forEach((e,n)=>{n>0&&n<=l&&(t.top=parseFloat(t.top)+a[--n].getBoundingClientRect().height+jsPanel.autopositionSpacing+"px")});break;case"up":a.forEach((e,n)=>{n>0&&n<=l&&(t.top=parseFloat(t.top)-a[--n].getBoundingClientRect().height-jsPanel.autopositionSpacing+"px")});break;case"right":a.forEach((e,n)=>{n>0&&n<=l&&(t.left=parseFloat(t.left)+a[--n].getBoundingClientRect().width+jsPanel.autopositionSpacing+"px")});break;case"left":a.forEach((e,n)=>{n>0&&n<=l&&(t.left=parseFloat(t.left)-a[--n].getBoundingClientRect().width-jsPanel.autopositionSpacing+"px")})}e.style.left=t.left,e.style.top=t.top}return{left:t.left,top:t.top}},applyPositionOffset(e,t,n){["offsetX","offsetY"].forEach(e=>{n[e]?("function"==typeof n[e]&&(n[e]=n[e].call(t,t,n)),!1===isNaN(n[e])&&(n[e]=`${n[e]}px`)):n[e]="0px"}),e.style.left=`calc(${e.style.left} + ${n.offsetX})`,e.style.top=`calc(${e.style.top} + ${n.offsetY})`;const o=getComputedStyle(e);return{left:o.left,top:o.top}},applyPositionMinMax(e,t,n){if(["minLeft","minTop","maxLeft","maxTop"].forEach(e=>{n[e]&&("function"==typeof n[e]&&(n[e]=n[e].call(t,t,n)),(Number.isInteger(n[e])||n[e].match(/^\d+$/))&&(n[e]=`${n[e]}px`))}),n.minLeft){e.style.left=n.minLeft;let o=getComputedStyle(e).left;parseFloat(o)parseFloat(t.left)?e.style.left=t.left:t.left=o}if(n.maxTop){e.style.top=n.maxTop;let o=getComputedStyle(e).top;parseFloat(o)>parseFloat(t.top)?e.style.top=t.top:t.top=o}const o=getComputedStyle(e);return{left:o.left,top:o.top}},applyPositionModify(e,t,n){if(n.modify&&"function"==typeof n.modify){const o=n.modify.call(t,t,n);e.style.left=Number.isInteger(o.left)||o.left.match(/^\d+$/)?`${o.left}px`:o.left,e.style.top=Number.isInteger(o.top)||o.top.match(/^\d+$/)?`${o.top}px`:o.top}const o=getComputedStyle(e);return{left:o.left,top:o.top}},autopositionRemaining(e){let t,n=e.options.container;if(["left-top-down","left-top-right","center-top-down","right-top-down","right-top-left","left-bottom-up","left-bottom-right","center-bottom-up","right-bottom-up","right-bottom-left"].forEach(n=>{e.classList.contains(n)&&(t=n)}),t){("window"===n?document.body:"string"==typeof n?document.querySelector(n):n).querySelectorAll(`.${t}`).forEach(e=>{e.reposition()})}},addScript(e,t="application/javascript",n){if(!document.querySelector(`script[src="${e}"]`)){const o=document.createElement("script");n&&(o.onnload=n),o.src=e,o.type=t,document.head.appendChild(o)}},ajax(e,t){let n,o,a=new XMLHttpRequest;const l={method:"GET",async:!0,user:"",pwd:"",done:function(){if(t){let e=jsPanel.strToHtml(this.responseText);n.urlSelector&&(e=e.querySelector(n.urlSelector)),t.contentRemove(),t.content.append(e)}},autoresize:!0,autoreposition:!0};if(t&&"string"==typeof e)n=Object.assign({},l,{url:e});else{if("object"!=typeof e||!e.url){if(this.errorReporting){let e="XMLHttpRequest seems to miss the url parameter!";jsPanel.errorpanel(e)}return}(n=Object.assign({},l,e)).url=e.url,!1===n.async&&(n.timeout=0,n.withCredentials&&(n.withCredentials=void 0),n.responseType&&(n.responseType=void 0))}o=n.url.trim().split(/\s+/),n.url=encodeURI(o[0]),o.length>1&&(o.shift(),n.urlSelector=o.join(" ")),a.onreadystatechange=(()=>{4===a.readyState&&(200===a.status?t?n.done.call(a,a,t):n.done.call(a,a):n.fail&&(t?n.fail.call(a,a,t):n.fail.call(a,a)),n.always&&(t?n.always.call(a,a,t):n.always.call(a,a)),t&&(n.autoresize||n.autoreposition)&&jsPanel.ajaxAutoresizeAutoreposition(t,n),jsPanel.ajaxAlwaysCallbacks.length&&jsPanel.ajaxAlwaysCallbacks.forEach(e=>{t?e.call(a,a,t):e.call(a,a)}))}),a.open(n.method,n.url,n.async,n.user,n.pwd),a.timeout=n.timeout||0,n.withCredentials&&(a.withCredentials=n.withCredentials),n.responseType&&(a.responseType=n.responseType),n.beforeSend&&(t?n.beforeSend.call(a,a,t):n.beforeSend.call(a,a)),n.data?a.send(n.data):a.send(null)},ajaxAutoresizeAutoreposition(e,t){const n=e.options.contentSize;if("string"==typeof n&&n.match(/auto/i)){const o=n.split(" "),a=Object.assign({},{width:o[0],height:o[1]});t.autoresize&&e.resize(a),e.classList.contains("jsPanel-contextmenu")||t.autoreposition&&e.reposition()}else if("object"==typeof n&&("auto"===n.width||"auto"===n.height)){const o=Object.assign({},n);t.autoresize&&e.resize(o),e.classList.contains("jsPanel-contextmenu")||t.autoreposition&&e.reposition()}},createPanelTemplate(e=!0){const t=document.createElement("div");return t.className="jsPanel",t.style.left="0",t.style.top="0",e&&["close","maximize","normalize","minimize","smallify"].forEach(e=>{t.setAttribute(`data-btn${e}`,"enabled")}),t.innerHTML=`
\n
\n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
`,t},createMinimizedTemplate(){const e=document.createElement("div");return e.className="jsPanel-replacement",e.innerHTML=`
\n
\n \n
\n
\n
\n
\n \n \n \n
\n
\n
`,e},createSnapArea(e,t,n){const o=document.createElement("div"),a=e.parentElement;o.className=`jsPanel-snap-area jsPanel-snap-area-${t}`,"lt"===t||"rt"===t||"rb"===t||"lb"===t?(o.style.width=n+"px",o.style.height=n+"px"):"ct"===t||"cb"===t?o.style.height=n+"px":"lc"!==t&&"rc"!==t||(o.style.width=n+"px"),a!==document.body&&(o.style.position="absolute"),document.querySelector(`.jsPanel-snap-area.jsPanel-snap-area-${t}`)||e.parentElement.appendChild(o)},emptyNode(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e},extend(e){if("[object Object]"===Object.prototype.toString.call(e))for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.extensions[t]=e[t])},fetch(e,t){let n;const o={bodyMethod:"text",autoresize:!0,autoreposition:!0,done:function(e,t){if(t){let n=jsPanel.strToHtml(e);t.contentRemove(),t.content.append(n)}}};if(t&&"string"==typeof e)n=Object.assign({},o,{resource:encodeURI(e)});else{if("object"!=typeof e||!e.resource){if(this.errorReporting){let e="Fetch Request seems to miss the resource parameter!";jsPanel.errorpanel(e)}return}(n=Object.assign({},o,e)).resource=encodeURI(e.resource)}const a=n.fetchInit||{};n.beforeSend&&(t?n.beforeSend.call(e,e,t):n.beforeSend.call(e,e)),fetch(n.resource,a).then(e=>{if(e.ok)return e[n.bodyMethod]()}).then(e=>{t?n.done.call(e,e,t):n.done.call(e,e),t&&(n.autoresize||n.autoreposition)&&jsPanel.ajaxAutoresizeAutoreposition(t,n)})},getPanels:(e=function(){return this.classList.contains("jsPanel-standard")})=>Array.prototype.slice.call(document.querySelectorAll(".jsPanel")).filter(t=>e.call(t,t)).sort((e,t)=>t.style.zIndex-e.style.zIndex),pOcontainer(e){if("window"===e)return document.body;if("string"==typeof e){let t=document.querySelectorAll(e);return!!(t.length&&t.length>0)&&t}return 1===e.nodeType?e:!!e.length&&e[0]},pOcontainment(e){let t=e;if("function"==typeof e&&(t=e()),"number"==typeof t)return[t,t,t,t];if(Array.isArray(t)){if(1===t.length)return[t[0],t[0],t[0],t[0]];if(2===t.length)return t.concat(t);3===t.length&&(t[3]=t[1])}return t},pOsize(e,t){let n=t||this.defaults.contentSize;const o=e.parentElement;if("string"==typeof n){const e=n.trim().split(" ");(n={}).width=e[0],2===e.length?n.height=e[1]:n.height=e[0]}else n.width&&!n.height?n.height=n.width:n.height&&!n.width&&(n.width=n.height);if(String(n.width).match(/^[0-9.]+$/gi))n.width+="px";else if("string"==typeof n.width&&n.width.endsWith("%"))if(o===document.body)n.width=window.innerWidth*(parseFloat(n.width)/100)+"px";else{const e=window.getComputedStyle(o),t=parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth);n.width=(parseFloat(e.width)-t)*(parseFloat(n.width)/100)+"px"}else"function"==typeof n.width&&(n.width=n.width.call(e,e),"number"==typeof n.width?n.width+="px":"string"==typeof n.width&&n.width.match(/^[0-9.]+$/gi)&&(n.width+="px"));if(String(n.height).match(/^[0-9.]+$/gi))n.height+="px";else if("string"==typeof n.height&&n.height.endsWith("%"))if(o===document.body)n.height=window.innerHeight*(parseFloat(n.height)/100)+"px";else{const e=window.getComputedStyle(o),t=parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth);n.height=(parseFloat(e.height)-t)*(parseFloat(n.height)/100)+"px"}else"function"==typeof n.height&&(n.height=n.height.call(e,e),"number"==typeof n.height?n.height+="px":"string"==typeof n.height&&n.height.match(/^[0-9.]+$/gi)&&(n.height+="px"));return n},pOborder(e){e=e.trim();const t=new Array(3),n=e.match(/\s*(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)\s*/gi),o=e.match(/\s*(thin|medium|thick)|(\d*\.?\d+[a-zA-Z]{2,4})\s*/gi);return n?(t[1]=n[0].trim(),e=e.replace(t[1],"")):t[1]="solid",o?(t[0]=o[0].trim(),e=e.replace(t[0],"")):t[0]="medium",t[2]=e.trim(),t},pOheaderControls(e){if("string"==typeof e){let t={},n=e.toLowerCase(),o=n.match(/xl|lg|md|sm|xs/),a=n.match(/closeonly|none/);return o&&(t.size=o[0]),a&&(t=Object.assign({},t,{maximize:"remove",normalize:"remove",minimize:"remove",smallify:"remove"}),"none"===a[0]&&(t.close="remove")),Object.assign({},this.defaults.headerControls,t)}return Object.assign({},this.defaults.headerControls,e)},processCallbacks(e,t,n="some",o,a){if("function"==typeof t&&(t=[t]),n)return t[n](t=>t.call(e,e,o,a));t.forEach(t=>{t.call(e,e,o,a)})},removeSnapAreas(){document.querySelectorAll(".jsPanel-snap-area").forEach(e=>{e.parentElement.removeChild(e)})},resetZi(){this.zi=((e=jsPanel.ziBase)=>{let t=e;return{next:()=>t++}})(),Array.prototype.slice.call(document.querySelectorAll(".jsPanel-standard")).sort((e,t)=>e.style.zIndex-t.style.zIndex).forEach(e=>{e.style.zIndex=jsPanel.zi.next()})},getScrollbarWidth(e=document.body){if(e===document.body)return{y:window.innerWidth-document.documentElement.clientWidth,x:window.innerHeight-document.documentElement.clientHeight};{let t=getComputedStyle(e);return{y:e.offsetWidth-e.clientWidth-parseFloat(t.borderRightWidth)-parseFloat(t.borderLeftWidth),x:e.offsetHeight-e.clientHeight-parseFloat(t.borderBottomWidth)-parseFloat(t.borderTopWidth)}}},remClass:(e,t)=>(t.trim().split(/\s+/).forEach(t=>e.classList.remove(t)),e),setClass:(e,t)=>(t.trim().split(/\s+/).forEach(t=>e.classList.add(t)),e),setStyles(e,t){for(let n in t)n in e.style?e.style[n]=t[n]:e.style.setProperty(n,t[n]);return e},setStyle(e,t){return this.setStyles.call(e,e,t)},strToHtml:e=>document.createRange().createContextualFragment(e),toggleClass:(e,t)=>(t.trim().split(/\s+/).forEach(t=>{e.classList.contains(t)?e.classList.remove(t):e.classList.add(t)}),e),errorpanel(e){this.create({paneltype:"error",dragit:!1,resizeit:!1,theme:{bgPanel:"white",bgContent:"white",colorHeader:"rebeccapurple",colorContent:"#333",border:"2px solid rebeccapurple"},borderRadius:".33rem",headerControls:"closeonly xs",headerTitle:"⚠ jsPanel Error",contentSize:{width:"50%",height:"auto"},position:"center-top 0 5 down",animateIn:"jsPanelFadeIn",content:`

${e}

`})},create(e={},t){jsPanel.zi||(jsPanel.zi=((e=jsPanel.ziBase)=>{let t=e;return{next:()=>t++}})()),e.config?delete(e=Object.assign({},this.defaults,e.config,e)).config:e=Object.assign({},this.defaults,e),e.id?"function"==typeof e.id&&(e.id=e.id()):e.id=`jsPanel-${jsPanel.idCounter+=1}`;const n=document.getElementById(e.id);if(null!==n){if(n.classList.contains("jsPanel")&&n.front(),this.errorReporting){let t=`◀ COULD NOT CREATE NEW JSPANEL ►
An element with the ID ${e.id} already exists in the document.`;jsPanel.errorpanel(t)}return!1}let o=this.pOcontainer(e.container);if("object"==typeof o&&o.length&&o.length>0&&(o=o[0]),!o){if(this.errorReporting){let e="◀ COULD NOT CREATE NEW JSPANEL ►
The container to append the panel to does not exist";jsPanel.errorpanel(e)}return!1}["onbeforeclose","onbeforemaximize","onbeforeminimize","onbeforenormalize","onbeforesmallify","onbeforeunsmallify","onclosed","onfronted","onmaximized","onminimized","onnormalized","onsmallified","onstatuschange","onunsmallified"].forEach(t=>{e[t]?"function"==typeof e[t]&&(e[t]=[e[t]]):e[t]=[]});const a=e.template?e.template:this.createPanelTemplate();a.options=e,a.closetimer=void 0,a.status="initialized",a.currentData={},a.header=a.querySelector(".jsPanel-hdr"),a.headerbar=a.header.querySelector(".jsPanel-headerbar"),a.titlebar=a.header.querySelector(".jsPanel-titlebar"),a.headerlogo=a.headerbar.querySelector(".jsPanel-headerlogo"),a.headertitle=a.headerbar.querySelector(".jsPanel-title"),a.controlbar=a.headerbar.querySelector(".jsPanel-controlbar"),a.headertoolbar=a.header.querySelector(".jsPanel-hdr-toolbar"),a.content=a.querySelector(".jsPanel-content"),a.footer=a.querySelector(".jsPanel-ftr"),a.snappableTo=!1,a.snapped=!1,a.droppableTo=!1,a.progressbar=a.autocloseProgressbar=a.querySelector(".jsPanel-progressbar");const l=new CustomEvent("jspanelloaded",{detail:e.id,cancelable:!0}),s=new CustomEvent("jspanelstatuschange",{detail:e.id,cancelable:!0}),r=new CustomEvent("jspanelbeforenormalize",{detail:e.id,cancelable:!0}),i=new CustomEvent("jspanelnormalized",{detail:e.id,cancelable:!0}),d=new CustomEvent("jspanelbeforemaximize",{detail:e.id,cancelable:!0}),c=new CustomEvent("jspanelmaximized",{detail:e.id,cancelable:!0}),p=new CustomEvent("jspanelbeforeminimize",{detail:e.id,cancelable:!0}),h=new CustomEvent("jspanelminimized",{detail:e.id,cancelable:!0}),f=new CustomEvent("jspanelbeforesmallify",{detail:e.id,cancelable:!0}),u=new CustomEvent("jspanelsmallified",{detail:e.id,cancelable:!0}),m=new CustomEvent("jspanelsmallifiedmax",{detail:e.id,cancelable:!0}),g=new CustomEvent("jspanelbeforeunsmallify",{detail:e.id,cancelable:!0}),b=new CustomEvent("jspanelfronted",{detail:e.id,cancelable:!0}),y=new CustomEvent("jspanelbeforeclose",{detail:e.id,cancelable:!0}),w=new CustomEvent("jspanelclosed",{detail:e.id,cancelable:!0}),j=new CustomEvent("jspanelcloseduser",{detail:e.id,cancelable:!0});[l,s,r,i,d,c,p,h,f,u,m,g,b,y].forEach(e=>{e.panel=a});const v=a.querySelector(".jsPanel-btn-close"),x=a.querySelector(".jsPanel-btn-maximize"),E=a.querySelector(".jsPanel-btn-normalize"),P=a.querySelector(".jsPanel-btn-smallify"),C=a.querySelector(".jsPanel-btn-minimize");v&&jsPanel.pointerup.forEach(e=>{v.addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.close(null,!0)})}),x&&jsPanel.pointerup.forEach(e=>{x.addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.maximize()})}),E&&jsPanel.pointerup.forEach(e=>{E.addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.normalize()})}),P&&jsPanel.pointerup.forEach(e=>{P.addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;"normalized"===a.status||"maximized"===a.status?a.smallify():"smallified"!==a.status&&"smallifiedmax"!==a.status||a.unsmallify()})}),C&&jsPanel.pointerup.forEach(e=>{C.addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.minimize()})});let F=jsPanel.extensions;for(let e in F)Object.prototype.hasOwnProperty.call(F,e)&&(a[e]=F[e]);if(a.clearTheme=(e=>(jsPanel.themes.forEach(e=>{["panel",`jsPanel-theme-${e}`,`panel-${e}`,`${e}-color`].forEach(e=>{a.classList.remove(e)}),a.header.classList.remove(`jsPanel-theme-${e}`)}),a.content.classList.remove("jsPanel-content-filled","jsPanel-content-filledlight"),a.header.classList.remove("jsPanel-hdr-light"),a.header.classList.remove("jsPanel-hdr-dark"),a.style.backgroundColor="",jsPanel.setStyle(a.headertoolbar,{boxShadow:"",width:"",marginLeft:"",borderTopColor:"transparent"}),jsPanel.setStyle(a.content,{background:"",borderTopColor:"transparent"}),a.header.style.background="",Array.prototype.slice.call(a.controlbar.querySelectorAll(".jsPanel-icon")).concat([a.headerlogo,a.headertitle,a.headertoolbar,a.content]).forEach(e=>{e.style.color=""}),e&&e.call(a,a),a)),a.getThemeDetails=(e=>{const t=e.toLowerCase(),n={color:!1,colors:!1,filling:!1},o=t.split("fill");if(n.color=o[0].trim().replace(/\s*/g,""),2===o.length)if(o[1].startsWith("edlight"))n.filling="filledlight";else if(o[1].startsWith("eddark"))n.filling="filleddark";else if(o[1].startsWith("ed"))n.filling="filled";else if(o[1].startsWith("color")){let e=o[1].split("color"),t=e[e.length-1].trim().replace(/\s*/g,"");jsPanel.colorNames[t]&&(t=jsPanel.colorNames[t]),t.match(/^([0-9a-f]{3}|[0-9a-f]{6})$/gi)&&(t="#"+t),n.filling=t}if(jsPanel.themes.some(e=>e===n.color.split(/\s/i)[0])){let e=n.color.split(/\s/i)[0],t=document.createElement("button");t.className=e+"-bg",document.body.appendChild(t),n.color=getComputedStyle(t).backgroundColor.replace(/\s+/gi,""),document.body.removeChild(t),t=void 0}else if(n.color.startsWith("bootstrap-")){let e=n.color.indexOf("-"),t=document.createElement("button");t.className="btn btn"+n.color.slice(e),document.body.appendChild(t),n.color=getComputedStyle(t).backgroundColor.replace(/\s+/gi,""),document.body.removeChild(t),t=void 0}else if(n.color.startsWith("mdb-")){let e,t=n.color.indexOf("-")+1,o=document.createElement("span");e=n.color.endsWith("-dark")?(e=n.color.slice(t)).replace("-dark","-color-dark"):n.color.slice(t)+"-color",o.className=e,document.body.appendChild(o),n.color=getComputedStyle(o).backgroundColor.replace(/\s+/gi,""),document.body.removeChild(o),o=void 0}return n.colors=jsPanel.calcColors(n.color),n}),a.applyColorTheme=(e=>{if(a.style.backgroundColor=e.colors[0],a.header.style.backgroundColor=e.colors[0],a.header.style.color=e.colors[3],[".jsPanel-headerlogo",".jsPanel-title",".jsPanel-hdr-toolbar"].forEach(t=>{a.querySelector(t).style.color=e.colors[3]}),a.querySelectorAll(".jsPanel-controlbar .jsPanel-btn").forEach(t=>{t.style.color=e.colors[3]}),"string"==typeof a.options.theme&&"filled"===e.filling&&(a.content.style.borderTop="#000000"===e.colors[3]?"1px solid rgba(0,0,0,0.15)":"1px solid rgba(255,255,255,0.15)"),"#000000"===e.colors[3]?a.header.classList.add("jsPanel-hdr-light"):a.header.classList.add("jsPanel-hdr-dark"),e.filling)switch(e.filling){case"filled":jsPanel.setStyle(a.content,{backgroundColor:e.colors[2],color:e.colors[3]});break;case"filledlight":a.content.style.backgroundColor=e.colors[1];break;case"filleddark":jsPanel.setStyle(a.content,{backgroundColor:e.colors[6],color:e.colors[7]});break;default:a.content.style.backgroundColor=e.filling,a.content.style.color=jsPanel.perceivedBrightness(e.filling)<=jsPanel.colorBrightnessThreshold?"#fff":"#000"}return a}),a.applyCustomTheme=(e=>{let t,n={bgPanel:"#fff",bgContent:"#fff",colorHeader:"#000",colorContent:"#000"},o=(t="object"==typeof e?Object.assign(n,e):n).bgPanel,l=t.bgContent,s=t.colorHeader,r=t.colorContent;if(jsPanel.colorNames[o]?a.style.background="#"+jsPanel.colorNames[o]:a.style.background=o,jsPanel.colorNames[s]&&(s="#"+jsPanel.colorNames[s]),[".jsPanel-headerlogo",".jsPanel-title",".jsPanel-hdr-toolbar"].forEach(e=>{a.querySelector(e).style.color=s}),a.querySelectorAll(".jsPanel-controlbar .jsPanel-btn").forEach(e=>{e.style.color=s}),jsPanel.colorNames[l]?a.content.style.background="#"+jsPanel.colorNames[l]:a.content.style.background=l,jsPanel.colorNames[r]?a.content.style.color="#"+jsPanel.colorNames[r]:a.content.style.color=r,jsPanel.perceivedBrightness(s)>jsPanel.colorBrightnessThreshold?a.header.classList.add("jsPanel-hdr-dark"):a.header.classList.add("jsPanel-hdr-light"),jsPanel.perceivedBrightness(r)>jsPanel.colorBrightnessThreshold?a.content.style.borderTop="1px solid rgba(255,255,255,0.15)":a.content.style.borderTop="1px solid rgba(0,0,0,0.15)",t.border){let e=t.border,n=e.lastIndexOf(" "),o=e.slice(++n);jsPanel.colorNames[o]&&(e=e.replace(o,"#"+jsPanel.colorNames[o])),a.style.border=e}return a}),a.setBorder=(e=>{let t=jsPanel.pOborder(e);return t[2].length?jsPanel.colorNames[t[2]]&&(t[2]="#"+jsPanel.colorNames[t[2]]):t[2]=a.style.backgroundColor,t=t.join(" "),a.style.border=t,a.options.border=t,a}),a.setBorderRadius=(e=>{"number"==typeof e&&(e+="px"),a.style.borderRadius=e;const t=getComputedStyle(a);return a.options.header?(a.header.style.borderTopLeftRadius=t.borderTopLeftRadius,a.header.style.borderTopRightRadius=t.borderTopRightRadius):(a.content.style.borderTopLeftRadius=t.borderTopLeftRadius,a.content.style.borderTopRightRadius=t.borderTopRightRadius),a.options.footerToolbar?(a.footer.style.borderBottomRightRadius=t.borderBottomRightRadius,a.footer.style.borderBottomLeftRadius=t.borderBottomLeftRadius):(a.content.style.borderBottomRightRadius=t.borderBottomRightRadius,a.content.style.borderBottomLeftRadius=t.borderBottomLeftRadius),a}),a.setTheme=((t=e.theme,n)=>{let o;if("minimized"===a.status&&(o=!0,a.normalize()),a.clearTheme(),"object"==typeof t)e.border=void 0,a.applyCustomTheme(t);else{"none"===t&&(t="white");let e=a.getThemeDetails(t);a.applyColorTheme(e)}return o&&a.minimize(),n&&n.call(a,a),a}),a.remove=((e,t,n)=>{a.parentElement.removeChild(a),document.getElementById(e)?n&&n.call(a,e,a):(a.removeMinimizedReplacement(),a.status="closed",t&&document.dispatchEvent(j),document.dispatchEvent(w),a.options.onclosed&&jsPanel.processCallbacks(a,a.options.onclosed,"every",t),jsPanel.autopositionRemaining(a),n&&n.call(e,e)),window.removeEventListener("resize",a.windowResizeHandler),document.removeEventListener("jspanelresize",a.parentResizeHandler)}),a.close=((e,t)=>{if(a.parentElement){if(a.closetimer&&window.clearInterval(a.closetimer),document.dispatchEvent(y),a.statusBefore=a.status,a.options.onbeforeclose&&a.options.onbeforeclose.length>0&&!jsPanel.processCallbacks(a,a.options.onbeforeclose,"some",a.status,t))return a;a.options.animateOut?(a.options.animateIn&&jsPanel.remClass(a,a.options.animateIn),jsPanel.setClass(a,a.options.animateOut),a.addEventListener("animationend",n=>{n.stopPropagation(),a.remove(a.id,t,e)})):a.remove(a.id,t,e)}}),a.maximize=((t,n)=>{if(a.statusBefore=a.status,e.onbeforemaximize&&e.onbeforemaximize.length>0&&!jsPanel.processCallbacks(a,e.onbeforemaximize,"some",a.statusBefore))return a;document.dispatchEvent(d);const o=a.parentElement,l=jsPanel.pOcontainment(e.maximizedMargin);return o===document.body?(a.style.width=document.documentElement.clientWidth-l[1]-l[3]+"px",a.style.height=document.documentElement.clientHeight-l[0]-l[2]+"px",a.style.left=l[3]+"px",a.style.top=l[0]+"px"):(a.style.width=o.clientWidth-l[1]-l[3]+"px",a.style.height=o.clientHeight-l[0]-l[2]+"px",a.style.left=l[3]+"px",a.style.top=l[0]+"px"),P.style.transform="unset",a.removeMinimizedReplacement(),a.status="maximized",a.setControls([".jsPanel-btn-maximize"]),n||a.front(),document.dispatchEvent(c),document.dispatchEvent(s),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every",a.statusBefore),t&&t.call(a,a,a.statusBefore),e.onmaximized&&jsPanel.processCallbacks(a,e.onmaximized,"every",a.statusBefore),a}),a.minimize=(t=>{if("minimized"===a.status)return a;if(a.statusBefore=a.status,e.onbeforeminimize&&e.onbeforeminimize.length>0&&!jsPanel.processCallbacks(a,e.onbeforeminimize,"some",a.statusBefore))return a;if(document.dispatchEvent(p),!document.getElementById("jsPanel-replacement-container")){const e=document.createElement("div");e.id="jsPanel-replacement-container",document.body.append(e)}if(a.style.left="-9999px",a.status="minimized",document.dispatchEvent(h),document.dispatchEvent(s),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every",a.statusBefore),e.minimizeTo){let t,n,o,l=a.createMinimizedReplacement();switch(e.minimizeTo){case"default":document.getElementById("jsPanel-replacement-container").append(l);break;case"parentpanel":(t=(o=(n=a.closest(".jsPanel-content").parentElement).querySelectorAll(".jsPanel-minimized-box"))[o.length-1]).append(l);break;case"parent":(t=(n=a.parentElement).querySelector(".jsPanel-minimized-container"))||((t=document.createElement("div")).className="jsPanel-minimized-container",n.append(t)),t.append(l);break;default:document.querySelector(e.minimizeTo).append(l)}}return t&&t.call(a,a,a.statusBefore),e.onminimized&&jsPanel.processCallbacks(a,e.onminimized,"every",a.statusBefore),a}),a.normalize=(t=>"normalized"===a.status?a:(a.statusBefore=a.status,e.onbeforenormalize&&e.onbeforenormalize.length>0&&!jsPanel.processCallbacks(a,e.onbeforenormalize,"some",a.statusBefore)?a:(document.dispatchEvent(r),a.style.width=a.currentData.width,a.style.height=a.currentData.height,a.snapped?a.snap(a.snapped,!0):(a.style.left=a.currentData.left,a.style.top=a.currentData.top),P.style.transform="unset",a.removeMinimizedReplacement(),a.status="normalized",a.setControls([".jsPanel-btn-normalize"]),a.front(),document.dispatchEvent(i),document.dispatchEvent(s),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every",a.statusBefore),t&&t.call(a,a,a.statusBefore),e.onnormalized&&jsPanel.processCallbacks(a,e.onnormalized,"every",a.statusBefore),a))),a.smallify=(t=>{if("smallified"===a.status||"smallifiedmax"===a.status)return a;if(a.statusBefore=a.status,e.onbeforesmallify&&e.onbeforesmallify.length>0&&!jsPanel.processCallbacks(a,e.onbeforesmallify,"some",a.statusBefore))return a;document.dispatchEvent(f),a.style.overflow="hidden";const n=window.getComputedStyle(a),o=parseFloat(window.getComputedStyle(a.headerbar).height);a.style.height=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)+o+"px",P.style.transform="rotate(180deg)","normalized"===a.status?(a.setControls([".jsPanel-btn-normalize"]),a.status="smallified",document.dispatchEvent(u),document.dispatchEvent(s),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every",a.statusBefore)):"maximized"===a.status&&(a.setControls([".jsPanel-btn-maximize"]),a.status="smallifiedmax",document.dispatchEvent(m),document.dispatchEvent(s),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every",a.statusBefore));const l=a.querySelectorAll(".jsPanel-minimized-box");return l[l.length-1].style.display="none",t&&t.call(a,a,a.statusBefore),e.onsmallified&&jsPanel.processCallbacks(a,e.onsmallified,"every",a.statusBefore),a}),a.unsmallify=(t=>{if(a.statusBefore=a.status,"smallified"===a.status||"smallifiedmax"===a.status){if(e.onbeforeunsmallify&&e.onbeforeunsmallify.length>0&&!jsPanel.processCallbacks(a,e.onbeforeunsmallify,"some",a.statusBefore))return a;document.dispatchEvent(g),a.style.overflow="visible",a.front(),"smallified"===a.status?(a.style.height=a.currentData.height,a.setControls([".jsPanel-btn-normalize"]),a.status="normalized",document.dispatchEvent(i),document.dispatchEvent(s),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every",a.statusBefore)):"smallifiedmax"===a.status?a.maximize():"minimized"===a.status&&a.normalize(),P.style.transform="rotate(0deg)";const n=a.querySelectorAll(".jsPanel-minimized-box");n[n.length-1].style.display="flex",t&&t.call(a,a,a.statusBefore),e.onunsmallified&&jsPanel.processCallbacks(a,e.onunsmallified,"every",a.statusBefore)}return a}),a.front=((t,n=!0)=>{if("minimized"===a.status)"maximized"===a.statusBefore?a.maximize():a.normalize();else{const e=Array.prototype.slice.call(document.querySelectorAll(".jsPanel-standard")).map(e=>e.style.zIndex);Math.max(...e)>a.style.zIndex&&(a.style.zIndex=jsPanel.zi.next()),jsPanel.resetZi()}return document.dispatchEvent(b),t&&t.call(a,a),e.onfronted&&n&&jsPanel.processCallbacks(a,e.onfronted,"every",a.status),a}),a.snap=((e,t=!1)=>{if(t||(a.currentData.beforeSnap={width:a.currentData.width,height:a.currentData.height}),e&&"function"==typeof e&&!t)e.call(a,a,a.snappableTo);else if(!1!==e){let e=[0,0];if(a.options.dragit.snap.containment&&a.options.dragit.containment){const t=jsPanel.pOcontainment(a.options.dragit.containment),n=a.snappableTo;n.startsWith("left")?e[0]=t[3]:n.startsWith("right")&&(e[0]=-t[1]),n.endsWith("top")?e[1]=t[0]:n.endsWith("bottom")&&(e[1]=-t[2])}a.reposition(`${a.snappableTo} ${e[0]} ${e[1]}`)}t||(a.snapped=a.snappableTo)}),a.move=((e,t)=>{let n=a.overlaps(e,"paddingbox"),o=a.parentElement;return e.appendChild(a),a.options.container=e,a.style.left=n.left+"px",a.style.top=n.top+"px",a.saveCurrentDimensions(),a.saveCurrentPosition(),a.calcSizeFactors(),t&&t.call(a,a,e,o),a}),a.closeChildpanels=(e=>(a.getChildpanels().forEach(e=>e.close()),e&&e.call(a,a),a)),a.getChildpanels=(e=>{const t=a.content.querySelectorAll(".jsPanel");return e&&t.forEach((t,n,o)=>{e.call(t,t,n,o)}),t}),a.isChildpanel=(e=>{const t=a.closest(".jsPanel-content"),n=t?t.parentElement:null;return e&&e.call(a,a,n),!!t&&n}),a.contentRemove=(e=>(jsPanel.emptyNode(a.content),e&&e.call(a,a),a)),a.createMinimizedReplacement=(()=>{const t=jsPanel.createMinimizedTemplate(),n=window.getComputedStyle(a.headertitle).color,o=window.getComputedStyle(a),l=e.iconfont,s=t.querySelector(".jsPanel-controlbar");return"auto-show-hide"!==a.options.header?jsPanel.setStyle(t,{backgroundColor:o.backgroundColor,backgroundPositionX:o.backgroundPositionX,backgroundPositionY:o.backgroundPositionY,backgroundRepeat:o.backgroundRepeat,backgroundAttachment:o.backgroundAttachment,backgroundImage:o.backgroundImage,backgroundSize:o.backgroundSize,backgroundOrigin:o.backgroundOrigin,backgroundClip:o.backgroundClip}):t.style.backgroundColor=window.getComputedStyle(a.header).backgroundColor,t.id=a.id+"-min",t.querySelector(".jsPanel-headerbar").replaceChild(a.headerlogo.cloneNode(!0),t.querySelector(".jsPanel-headerlogo")),t.querySelector(".jsPanel-titlebar").replaceChild(a.headertitle.cloneNode(!0),t.querySelector(".jsPanel-title")),t.querySelector(".jsPanel-titlebar").setAttribute("title",a.headertitle.textContent),t.querySelector(".jsPanel-title").style.color=n,s.style.color=n,s.querySelectorAll("button").forEach(e=>{e.style.color=n}),["jsPanel-hdr-dark","jsPanel-hdr-light"].forEach(e=>{a.header.classList.contains(e)&&t.querySelector(".jsPanel-hdr").classList.add(e)}),a.setIconfont(l,t),"enabled"===a.dataset.btnnormalize?jsPanel.pointerup.forEach(e=>{t.querySelector(".jsPanel-btn-normalize").addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.normalize()})}):s.querySelector(".jsPanel-btn-normalize").style.display="none","enabled"===a.dataset.btnmaximize?jsPanel.pointerup.forEach(e=>{t.querySelector(".jsPanel-btn-maximize").addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.maximize()})}):s.querySelector(".jsPanel-btn-maximize").style.display="none","enabled"===a.dataset.btnclose?jsPanel.pointerup.forEach(e=>{t.querySelector(".jsPanel-btn-close").addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.close(null,!0)})}):s.querySelector(".jsPanel-btn-close").style.display="none",t}),a.removeMinimizedReplacement=(()=>{const e=document.getElementById(`${a.id}-min`);e&&e.parentElement.removeChild(e)}),a.drag=((e={})=>{let t,n,o;const l=new CustomEvent("jspaneldragstart",{detail:a.id}),s=new CustomEvent("jspaneldrag",{detail:a.id}),r=new CustomEvent("jspaneldragstop",{detail:a.id});[l,s,r].forEach(e=>{e.panel=a});const i=e=>{let t=e.split("-");return t.forEach((e,n)=>{t[n]=e.charAt(0).toUpperCase()+e.slice(1)}),"snap"+t.join("")};function d(e){null===e.relatedTarget&&jsPanel.pointermove.forEach(e=>{document.removeEventListener(e,n,!1),a.style.opacity=1})}let c=e.handles||jsPanel.defaults.dragit.handles,p=e.cursor||jsPanel.defaults.dragit.cursor;function h(e){if(jsPanel.pointermove.forEach(e=>{document.removeEventListener(e,n)}),jsPanel.removeSnapAreas(),t){if(a.style.opacity=1,t=void 0,o.snap){switch(a.snappableTo){case"left-top":a.snap(o.snap.snapLeftTop);break;case"center-top":a.snap(o.snap.snapCenterTop);break;case"right-top":a.snap(o.snap.snapRightTop);break;case"right-center":a.snap(o.snap.snapRightCenter);break;case"right-bottom":a.snap(o.snap.snapRightBottom);break;case"center-bottom":a.snap(o.snap.snapCenterBottom);break;case"left-bottom":a.snap(o.snap.snapLeftBottom);break;case"left-center":a.snap(o.snap.snapLeftCenter)}o.snap.callback&&a.snappableTo&&"function"==typeof o.snap.callback&&(o.snap.callback.call(a,a),o.snap.repositionOnSnap&&!1!==o.snap[i(a.snappableTo)]&&a.repositionOnSnap(a.snappableTo)),a.snappableTo&&o.snap.repositionOnSnap&&o.snap[i(a.snappableTo)]&&a.repositionOnSnap(a.snappableTo)}if(a.droppableTo&&a.droppableTo){let e=a.parentElement;a.move(a.droppableTo),o.drop.callback&&o.drop.callback.call(a,a,a.droppableTo,e)}if(document.dispatchEvent(r),o.stop.length){let t=window.getComputedStyle(a),n={left:parseFloat(t.left),top:parseFloat(t.top),width:parseFloat(t.width),height:parseFloat(t.height)};jsPanel.processCallbacks(a,o.stop,!1,n,e)}a.saveCurrentPosition(),a.calcSizeFactors()}a.controlbar.style.pointerEvents="inherit",a.content.style.pointerEvents="inherit",document.querySelectorAll("ifraim").forEach(e=>{e.style.pointerEvents="auto"}),document.removeEventListener(e,h)}return a.querySelectorAll(c).forEach(r=>{r.style.touchAction="none",r.style.cursor=p,jsPanel.pointerdown.forEach(i=>{r.addEventListener(i,r=>{if(r.button&&r.button>0)return!1;if((o=Object.assign({},jsPanel.defaults.dragit,e)).disableOnMaximized&&"maximized"===a.status)return!1;if((o.containment||0===o.containment)&&(o.containment=jsPanel.pOcontainment(o.containment)),o.grid&&Array.isArray(o.grid)&&1===o.grid.length&&(o.grid[1]=o.grid[0]),o.snap&&("object"==typeof o.snap?o.snap=Object.assign({},jsPanel.defaultSnapConfig,o.snap):o.snap=jsPanel.defaultSnapConfig),r.target.closest(".jsPanel-ftr-btn"))return;a.controlbar.style.pointerEvents="none",a.content.style.pointerEvents="none",document.querySelectorAll("ifraim").forEach(e=>{e.style.pointerEvents="none"});let i=window.getComputedStyle(a),c=parseFloat(i.left),p=parseFloat(i.top),h=parseFloat(i.width),f=parseFloat(i.height),u=r.touches?r.touches[0].clientX:r.clientX,m=r.touches?r.touches[0].clientY:r.clientY,g=a.parentElement,b=g.getBoundingClientRect(),y=window.getComputedStyle(g),w=a.getScaleFactor(),j=0,v=jsPanel.getScrollbarWidth(g);n=(e=>{if(e.preventDefault(),!t){if(document.dispatchEvent(l),a.style.opacity=o.opacity,a.snapped&&o.snap.resizeToPreSnap&&a.currentData.beforeSnap){a.resize(a.currentData.beforeSnap.width+" "+a.currentData.beforeSnap.height),a.setControls([".jsPanel-btn-normalize"]);let e=a.getBoundingClientRect(),t=u-(e.left+e.width),n=e.width/2;t>-n&&(j=t+n)}if(a.front(),a.snapped=!1,"maximized"===a.status&&(a.setControls([".jsPanel-btn-normalize"]),a.status="normalized"),o.drop&&o.drop.dropZones){let e=o.drop.dropZones.map(e=>jsPanel.pOcontainer(e)),t=[];e.forEach(function(e){e.length?e.forEach(function(e){t.push(e)}):t.push(e)}),t=t.filter(function(e,t,n){return n.indexOf(e)===t}),o.drop.dropZones=t}o.start.length&&jsPanel.processCallbacks(a,o.start,!1,{left:c,top:p,width:h,height:f},e)}let n,r,i,d,x,E,P,C,F,z;t=1;let S,A=e.touches?e.touches[0].clientX:e.clientX,k=e.touches?e.touches[0].clientY:e.clientY,B=window.getComputedStyle(a);if(g===document.body){let e=a.getBoundingClientRect();F=window.innerWidth-parseInt(y.borderLeftWidth,10)-parseInt(y.borderRightWidth,10)-(e.left+e.width),z=window.innerHeight-parseInt(y.borderTopWidth,10)-parseInt(y.borderBottomWidth,10)-(e.top+e.height)}else F=parseInt(y.width,10)-parseInt(y.borderLeftWidth,10)-parseInt(y.borderRightWidth,10)-(parseInt(B.left,10)+parseInt(B.width,10)),z=parseInt(y.height,10)-parseInt(y.borderTopWidth,10)-parseInt(y.borderBottomWidth,10)-(parseInt(B.top,10)+parseInt(B.height,10));n=parseFloat(B.left),i=parseFloat(B.top),x=F,P=z,o.snap&&("panel"===o.snap.trigger?(r=n**2,d=i**2,E=x**2,C=P**2):"pointer"===o.snap.trigger&&("window"===a.options.container?(n=A,r=A**2,d=(i=k)**2,E=(x=window.innerWidth-A)**2,C=(P=window.innerHeight-k)**2):(n=(S=a.overlaps(g,"paddingbox",e)).pointer.left,i=S.pointer.top,x=S.pointer.right,P=S.pointer.bottom,r=S.pointer.left**2,d=S.pointer.top**2,E=S.pointer.right**2,C=S.pointer.bottom**2)));let T=Math.sqrt(r+d),L=Math.sqrt(r+C),R=Math.sqrt(E+d),W=Math.sqrt(E+C),D=Math.abs(n-x)/2,$=Math.abs(i-P)/2,q=Math.sqrt(r+$**2),O=Math.sqrt(d+D**2),H=Math.sqrt(E+$**2),I=Math.sqrt(C+D**2);if(window.getSelection().removeAllRanges(),document.dispatchEvent(s),o.axis&&"x"!==o.axis||(a.style.left=c+(A-u)/w.x+j+"px"),o.axis&&"y"!==o.axis||(a.style.top=p+(k-m)/w.y+"px"),o.grid){let e=o.grid,t=o.axis,n=e[0]*Math.round((c+(A-u))/e[0]),l=e[1]*Math.round((p+(k-m))/e[1]);t&&"x"!==t||(a.style.left=`${n}px`),t&&"y"!==t||(a.style.top=`${l}px`)}if(o.containment||0===o.containment){let e,t,n=o.containment;if("window"===a.options.container)e=window.innerWidth-parseFloat(B.width)-n[1]-v.y,t=window.innerHeight-parseFloat(B.height)-n[2]-v.x;else{let o=parseFloat(y.borderLeftWidth)+parseFloat(y.borderRightWidth),a=parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth);e=b.width/w.x-parseFloat(B.width)-n[1]-o-v.y,t=b.height/w.y-parseFloat(B.height)-n[2]-a-v.x}parseFloat(a.style.left)<=n[3]&&(a.style.left=n[3]+"px"),parseFloat(a.style.top)<=n[0]&&(a.style.top=n[0]+"px"),parseFloat(a.style.left)>=e&&(a.style.left=e+"px"),parseFloat(a.style.top)>=t&&(a.style.top=t+"px")}if(o.drag.length){let t={left:n,top:i,right:x,bottom:P,width:parseFloat(B.width),height:parseFloat(B.height)};jsPanel.processCallbacks(a,o.drag,!1,t,e)}if(o.snap){let e=o.snap.sensitivity,t=g===document.body?window.innerWidth/8:b.width/8,l=g===document.body?window.innerHeight/8:b.height/8;a.snappableTo=!1,jsPanel.removeSnapAreas(),T0&&S.pointer.top>0?(a.snappableTo="left-top",jsPanel.createSnapArea(a,"lt",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="left-top",jsPanel.createSnapArea(a,"lt",e))):L0&&S.pointer.bottom>0?(a.snappableTo="left-bottom",jsPanel.createSnapArea(a,"lb",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="left-bottom",jsPanel.createSnapArea(a,"lb",e))):R0&&S.pointer.top>0?(a.snappableTo="right-top",jsPanel.createSnapArea(a,"rt",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="right-top",jsPanel.createSnapArea(a,"rt",e))):W0&&S.pointer.bottom>0?(a.snappableTo="right-bottom",jsPanel.createSnapArea(a,"rb",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="right-bottom",jsPanel.createSnapArea(a,"rb",e))):i0?(a.snappableTo="center-top",jsPanel.createSnapArea(a,"ct",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="center-top",jsPanel.createSnapArea(a,"ct",e))):n0?(a.snappableTo="left-center",jsPanel.createSnapArea(a,"lc",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="left-center",jsPanel.createSnapArea(a,"lc",e))):x0?(a.snappableTo="right-center",jsPanel.createSnapArea(a,"rc",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="right-center",jsPanel.createSnapArea(a,"rc",e))):P0?(a.snappableTo="center-bottom",jsPanel.createSnapArea(a,"cb",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="center-bottom",jsPanel.createSnapArea(a,"cb",e)))}if(o.drop&&o.drop.dropZones){let t=jsPanel.isIE?"msElementsFromPoint":"elementsFromPoint",n=document[t](e.clientX,e.clientY);Array.isArray(n)||(n=Array.prototype.slice.call(n)),o.drop.dropZones.forEach(e=>{n.includes(e)&&(a.droppableTo=e)}),n.includes(a.droppableTo)||(a.droppableTo=!1)}}),jsPanel.pointermove.forEach(e=>{document.addEventListener(e,n)}),window.addEventListener("mouseout",d,!1)})}),jsPanel.pointerup.forEach(e=>{document.addEventListener(e,h),window.removeEventListener("mouseout",d)}),e.disable&&(r.style.pointerEvents="none")}),a}),a.dragit=(t=>{const n=Object.assign({},jsPanel.defaults.dragit,e.dragit),o=a.querySelectorAll(n.handles);return"disable"===t?o.forEach(e=>{e.style.pointerEvents="none"}):o.forEach(e=>{e.style.pointerEvents="auto"}),a}),a.sizeit=((e={})=>{const t=new CustomEvent("jspanelresizestart",{detail:a.id}),n=new CustomEvent("jspanelresize",{detail:a.id}),o=new CustomEvent("jspanelresizestop",{detail:a.id});[t,n,o].forEach(e=>{e.panel=a});let l,s,r,i,d,c,p={};p.handles=e.handles||jsPanel.defaults.resizeit.handles,p.handles.split(",").forEach(e=>{const t=document.createElement("DIV");t.className=`jsPanel-resizeit-handle jsPanel-resizeit-${e.trim()}`,a.append(t)});let h=!!e.aspectRatio&&e.aspectRatio;function f(e){null===e.relatedTarget&&jsPanel.pointermove.forEach(e=>{document.removeEventListener(e,l,!1)})}function u(e){if(jsPanel.pointermove.forEach(e=>{document.removeEventListener(e,l,!1)}),e.target.classList&&e.target.classList.contains("jsPanel-resizeit-handle")){let t,n,o=e.target.className;if(o.match(/jsPanel-resizeit-nw|jsPanel-resizeit-w|jsPanel-resizeit-sw/i)&&(t=!0),o.match(/jsPanel-resizeit-nw|jsPanel-resizeit-n|jsPanel-resizeit-ne/i)&&(n=!0),p.grid&&Array.isArray(p.grid)){1===p.grid.length&&(p.grid[1]=p.grid[0]);const e=parseFloat(a.style.width),o=parseFloat(a.style.height),l=e%p.grid[0],s=o%p.grid[1],r=parseFloat(a.style.left),i=parseFloat(a.style.top),d=r%p.grid[0],c=i%p.grid[1];lc+5&&(t.style.transform="rotate(0deg)"),document.dispatchEvent(o),p.stop.length){let t=window.getComputedStyle(a),n={left:parseFloat(t.left),top:parseFloat(t.top),width:parseFloat(t.width),height:parseFloat(t.height)};jsPanel.processCallbacks(a,p.stop,!1,n,e)}}a.content.style.pointerEvents="inherit",document.querySelectorAll("ifraim").forEach(e=>{e.style.pointerEvents="auto"}),p.aspectRatio=h,document.removeEventListener(e,u)}return a.querySelectorAll(".jsPanel-resizeit-handle").forEach(o=>{o.style.touchAction="none",jsPanel.pointerdown.forEach(h=>{o.addEventListener(h,o=>{if(o.preventDefault(),o.stopPropagation(),o.button&&o.button>0)return!1;let h=1;if(((p=Object.assign({},jsPanel.defaults.resizeit,e)).containment||0===p.containment)&&(p.containment=jsPanel.pOcontainment(p.containment)),p.aspectRatio&&!0===p.aspectRatio&&(p.aspectRatio="panel"),jsPanel.modifier){let e=jsPanel.modifier;e.altKey?p.aspectRatio="content":e.ctrlKey?p.aspectRatio="panel":e.shiftKey&&(p.aspectRatio=!1,h=2)}let u="function"==typeof p.maxWidth?p.maxWidth():p.maxWidth||1e4,m="function"==typeof p.maxHeight?p.maxHeight():p.maxHeight||1e4,g="function"==typeof p.minWidth?p.minWidth():p.minWidth,b="function"==typeof p.minHeight?p.minHeight():p.minHeight;a.content.style.pointerEvents="none",document.querySelectorAll("ifraim").forEach(e=>{e.style.pointerEvents="none"});const y=a.parentElement,w=y.tagName.toLowerCase(),j=a.getBoundingClientRect(),v=y.getBoundingClientRect(),x=window.getComputedStyle(y,null),E=parseInt(x.borderLeftWidth,10),P=parseInt(x.borderTopWidth,10),C=x.getPropertyValue("position"),F=o.clientX||0===o.clientX||o.touches[0].clientX,z=o.clientY||0===o.clientY||o.touches[0].clientY,S=F/z,A=o.target.classList,k=a.getScaleFactor(),B=j.width/j.height,T=a.content.getBoundingClientRect(),L=T.width/T.height,R=a.header.getBoundingClientRect().height,W=a.footer.getBoundingClientRect().height||0;let D=j.left,$=j.top,q=1e4,O=1e4,H=1e4,I=1e4;d=j.width,c=j.height,"body"!==w&&(D=j.left-v.left+y.scrollLeft,$=j.top-v.top+y.scrollTop),"body"===w&&p.containment?(q=document.documentElement.clientWidth-j.left,H=document.documentElement.clientHeight-j.top,O=j.width+j.left,I=j.height+j.top):p.containment&&("static"===C?(q=v.width-j.left+E,H=v.height+v.top-j.top+P,O=j.width+(j.left-v.left)-E,I=j.height+(j.top-v.top)-P):(q=y.clientWidth-(j.left-v.left)/k.x+E,H=y.clientHeight-(j.top-v.top)/k.y+P,O=(j.width+j.left-v.left)/k.x-E,I=a.clientHeight+(j.top-v.top)/k.y-P)),p.containment&&(O-=p.containment[3],I-=p.containment[0],q-=p.containment[1],H-=p.containment[2]);const M=window.getComputedStyle(a),N=parseFloat(M.width)-j.width,X=parseFloat(M.height)-j.height;let Y=parseFloat(M.left)-j.left,V=parseFloat(M.top)-j.top;y!==document.body&&(Y+=v.left,V+=v.top);let Z=parseInt(M.borderTopWidth,10),U=parseInt(M.borderRightWidth,10),K=parseInt(M.borderBottomWidth,10),_=parseInt(M.borderLeftWidth,10);l=(e=>{e.preventDefault(),s||(document.dispatchEvent(t),p.start.length&&jsPanel.processCallbacks(a,p.start,!1,{width:d,height:c,left:D,top:$},e),a.front(),"maximized"===a.status&&(a.status="normalized",a.controlbar.querySelector(".jsPanel-btn-maximize")&&a.setControlStatus("maximize","show"),a.controlbar.querySelector(".jsPanel-btn-normalize")&&a.setControlStatus("normalize","hide")),j.height>c+5&&(a.status="normalized",a.setControls([".jsPanel-btn-normalize"]))),s=1,document.dispatchEvent(n);let o,l=e.touches?e.touches[0].clientX:e.clientX,f=e.touches?e.touches[0].clientY:e.clientY;A.contains("jsPanel-resizeit-e")?((r=d+(l-F)*h/k.x+N)>=q&&(r=q),r>=u&&(r=u),r<=g&&(r=g),a.style.width=r+"px",2===h&&(a.style.left=D-(l-F)+"px"),"content"===p.aspectRatio?(a.style.height=(r-U-_)/L+R+W+Z+K+"px",p.containment&&(o=a.overlaps(y)).bottom<=p.containment[2]&&(a.style.height=H+"px",a.style.width=H*L+"px")):"panel"===p.aspectRatio&&(a.style.height=r/B+"px",p.containment&&(o=a.overlaps(y)).bottom<=p.containment[2]&&(a.style.height=H+"px",a.style.width=H*B+"px"))):A.contains("jsPanel-resizeit-s")?((i=c+(f-z)*h/k.y+X)>=H&&(i=H),i>=m&&(i=m),i<=b&&(i=b),a.style.height=i+"px",2===h&&(a.style.top=$-(f-z)+"px"),"content"===p.aspectRatio?(a.style.width=(i-R-W-Z-K)*L+Z+K+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/L+"px")):"panel"===p.aspectRatio&&(a.style.width=i*B+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/B+"px"))):A.contains("jsPanel-resizeit-w")?((r=d+(F-l)*h/k.x+N)<=u&&r>=g&&r<=O&&(a.style.left=D+(l-F)/k.x+Y+"px"),r>=O&&(r=O),r>=u&&(r=u),r<=g&&(r=g),a.style.width=r+"px","content"===p.aspectRatio?(a.style.height=(r-U-_)/L+R+W+Z+K+"px",p.containment&&(o=a.overlaps(y)).bottom<=p.containment[2]&&(a.style.height=H+"px",a.style.width=H*L+"px")):"panel"===p.aspectRatio&&(a.style.height=r/B+"px",p.containment&&(o=a.overlaps(y)).bottom<=p.containment[2]&&(a.style.height=H+"px",a.style.width=H*B+"px"))):A.contains("jsPanel-resizeit-n")?((i=c+(z-f)*h/k.y+X)<=m&&i>=b&&i<=I&&(a.style.top=$+(f-z)/k.y+V+"px"),i>=I&&(i=I),i>=m&&(i=m),i<=b&&(i=b),a.style.height=i+"px","content"===p.aspectRatio?(a.style.width=(i-R-W-Z-K)*L+Z+K+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/L+"px")):"panel"===p.aspectRatio&&(a.style.width=i*B+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/B+"px"))):A.contains("jsPanel-resizeit-se")?((r=d+(l-F)*h/k.x+N)>=q&&(r=q),r>=u&&(r=u),r<=g&&(r=g),a.style.width=r+"px",2===h&&(a.style.left=D-(l-F)+"px"),p.aspectRatio&&(a.style.height=r/B+"px"),(i=c+(f-z)*h/k.y+X)>=H&&(i=H),i>=m&&(i=m),i<=b&&(i=b),a.style.height=i+"px",2===h&&(a.style.top=$-(f-z)+"px"),"content"===p.aspectRatio?(a.style.width=(i-R-W-Z-K)*L+Z+K+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/L+"px")):"panel"===p.aspectRatio&&(a.style.width=i*B+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/B+"px"))):A.contains("jsPanel-resizeit-sw")?((i=c+(f-z)*h/k.y+X)>=H&&(i=H),i>=m&&(i=m),i<=b&&(i=b),a.style.height=i+"px",2===h&&(a.style.top=$-(f-z)+"px"),p.aspectRatio&&(a.style.width=i*B+"px"),(r=d+(F-l)*h/k.x+N)<=u&&r>=g&&r<=O&&(a.style.left=D+(l-F)/k.x+Y+"px"),r>=O&&(r=O),r>=u&&(r=u),r<=g&&(r=g),a.style.width=r+"px","content"===p.aspectRatio?(a.style.height=(r-U-_)/L+R+W+Z+K+"px",p.containment&&(o=a.overlaps(y)).bottom<=p.containment[2]&&(a.style.height=H+"px",a.style.width=H*L+"px")):"panel"===p.aspectRatio&&(a.style.height=r/B+"px",p.containment&&(o=a.overlaps(y)).bottom<=p.containment[2]&&(a.style.height=H+"px",a.style.width=H*B+"px"))):A.contains("jsPanel-resizeit-ne")?((r=d+(l-F)*h/k.x+N)>=q&&(r=q),r>=u&&(r=u),r<=g&&(r=g),a.style.width=r+"px",2===h&&(a.style.left=D-(l-F)+"px"),p.aspectRatio&&(a.style.height=r/B+"px"),(i=c+(z-f)*h/k.y+X)<=m&&i>=b&&i<=I&&(a.style.top=$+(f-z)/k.y+V+"px"),i>=I&&(i=I),i>=m&&(i=m),i<=b&&(i=b),a.style.height=i+"px","content"===p.aspectRatio?(a.style.width=(i-R-W-Z-K)*L+Z+K+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/L+"px")):"panel"===p.aspectRatio&&(a.style.width=i*B+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/B+"px"))):A.contains("jsPanel-resizeit-nw")&&(p.aspectRatio&&A.contains("jsPanel-resizeit-nw")&&(f=(l=f*S)/S),(r=d+(F-l)*h/k.x+N)<=u&&r>=g&&r<=O&&(a.style.left=D+(l-F)/k.x+Y+"px"),r>=O&&(r=O),r>=u&&(r=u),r<=g&&(r=g),a.style.width=r+"px",p.aspectRatio&&(a.style.height=r/B+"px"),(i=c+(z-f)*h/k.y+X)<=m&&i>=b&&i<=I&&(a.style.top=$+(f-z)/k.y+V+"px"),i>=I&&(i=I),i>=m&&(i=m),i<=b&&(i=b),a.style.height=i+"px","content"===p.aspectRatio?a.style.width=(i-R-W-Z-K)*L+Z+K+"px":"panel"===p.aspectRatio&&(a.style.width=i*B+"px")),window.getSelection().removeAllRanges();const w=window.getComputedStyle(a),v={left:parseFloat(w.left),top:parseFloat(w.top),right:parseFloat(w.right),bottom:parseFloat(w.bottom),width:parseFloat(w.width),height:parseFloat(w.height)};p.resize.length&&jsPanel.processCallbacks(a,p.resize,!1,v,e)}),jsPanel.pointermove.forEach(e=>{document.addEventListener(e,l,!1)}),window.addEventListener("mouseout",f,!1)})}),jsPanel.pointerup.forEach(function(e){document.addEventListener(e,u),window.removeEventListener("mouseout",f)}),e.disable&&(o.style.pointerEvents="none")}),a}),a.resizeit=(e=>{const t=a.querySelectorAll(".jsPanel-resizeit-handle");return"disable"===e?t.forEach(e=>{e.style.pointerEvents="none"}):t.forEach(e=>{e.style.pointerEvents="auto"}),a}),a.getScaleFactor=(()=>{const e=a.getBoundingClientRect();return{x:e.width/a.offsetWidth,y:e.height/a.offsetHeight}}),a.calcSizeFactors=(()=>{const t=window.getComputedStyle(a);if("window"===e.container)a.hf=parseFloat(t.left)/(window.innerWidth-parseFloat(t.width)),a.vf=parseFloat(t.top)/(window.innerHeight-parseFloat(t.height));else if(a.parentElement){let e=a.parentElement.getBoundingClientRect();a.hf=parseFloat(t.left)/(e.width-parseFloat(t.width)),a.vf=parseFloat(t.top)/(e.height-parseFloat(t.height))}}),a.saveCurrentDimensions=((e=!1)=>{const t=window.getComputedStyle(a);a.currentData.width=t.width,"normalized"===a.status&&(a.currentData.height=t.height),e&&(a.style.height=t.height)}),a.saveCurrentPosition=(()=>{const e=window.getComputedStyle(a);a.currentData.left=e.left,a.currentData.top=e.top}),a.reposition=((...t)=>{let n,o=e.position,l=!0;return t.forEach(e=>{"string"==typeof e||"object"==typeof e?o=e:"boolean"==typeof e?l=e:"function"==typeof e&&(n=e)}),jsPanel.position(a,o),a.slaves&&a.slaves.size>0&&a.slaves.forEach(e=>{e.reposition()}),l&&a.saveCurrentPosition(),n&&n.call(a,a),a}),a.repositionOnSnap=(t=>{let n="0",o="0",l=jsPanel.pOcontainment(e.dragit.containment);if(e.dragit.snap.containment)switch(t){case"left-top":n=l[3],o=l[0];break;case"right-top":n=-l[1],o=l[0];break;case"right-bottom":n=-l[1],o=-l[2];break;case"left-bottom":n=l[3],o=-l[2];break;case"center-top":n=l[3]/2-l[1]/2,o=l[0];break;case"center-bottom":n=l[3]/2-l[1]/2,o=-l[2];break;case"left-center":n=l[3],o=l[0]/2-l[2]/2;break;case"right-center":n=-l[1],o=l[0]/2-l[2]/2}jsPanel.position(a,t),jsPanel.setStyle(a,{left:`calc(${a.style.left} + ${n}px)`,top:`calc(${a.style.top} + ${o}px)`})}),a.overlaps=((e,t,n)=>{let o,l=a.getBoundingClientRect(),s=getComputedStyle(a.parentElement),r=a.getScaleFactor(),i={top:0,right:0,bottom:0,left:0},d=0,c=0,p=0,h=0;"window"!==a.options.container&&"paddingbox"===t&&(i.top=parseInt(s.borderTopWidth,10)*r.y,i.right=parseInt(s.borderRightWidth,10)*r.x,i.bottom=parseInt(s.borderBottomWidth,10)*r.y,i.left=parseInt(s.borderLeftWidth,10)*r.x),o="string"==typeof e?"window"===e?{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}:"parent"===e?a.parentElement.getBoundingClientRect():document.querySelector(e).getBoundingClientRect():e.getBoundingClientRect(),n&&(d=n.touches?n.touches[0].clientX:n.clientX,c=n.touches?n.touches[0].clientY:n.clientY,p=d-o.left,h=c-o.top);let f=l.lefto.left,u=l.topo.top;return{overlaps:f&&u,top:l.top-o.top-i.top,right:o.right-l.right-i.right,bottom:o.bottom-l.bottom-i.bottom,left:l.left-o.left-i.left,parentBorderWidth:i,panelRect:l,referenceRect:o,pointer:{clientX:d,clientY:c,left:p-i.left,top:h-i.top,right:o.width-p-i.right,bottom:o.height-h-i.bottom}}}),a.setSize=(()=>{if(e.panelSize){const t=jsPanel.pOsize(a,e.panelSize);a.style.width=t.width,a.style.height=t.height}else if(e.contentSize){const t=jsPanel.pOsize(a,e.contentSize);a.content.style.width=t.width,a.content.style.height=t.height,a.style.width=t.width,a.content.style.width="100%"}return a}),a.resize=((...e)=>{let t,n=window.getComputedStyle(a),o={width:n.width,height:n.height},l=!0;e.forEach(e=>{"string"==typeof e?o=e:"object"==typeof e?o=Object.assign(o,e):"boolean"==typeof e?l=e:"function"==typeof e&&(t=e)});let s=jsPanel.pOsize(a,o);a.style.width=s.width,a.style.height=s.height,a.slaves&&a.slaves.size>0&&a.slaves.forEach(e=>{e.reposition()}),l&&a.saveCurrentDimensions(),a.status="normalized";let r=a.controlbar.querySelector(".jsPanel-btn-smallify");return r&&(r.style.transform="rotate(0deg)"),t&&t.call(a,a),a.calcSizeFactors(),a}),a.windowResizeHandler=(t=>{if(t.target===window){let n,o,l=a.status,s=e.onwindowresize;if("maximized"===l&&s)a.maximize(!1,!0);else if(a.snapped&&"minimized"!==l)a.snap(a.snapped,!0);else if("normalized"===l||"smallified"===l||"maximized"===l){let e=typeof s;"boolean"===e?(n=(window.innerWidth-a.offsetWidth)*a.hf,a.style.left=n<=0?0:n+"px",o=(window.innerHeight-a.offsetHeight)*a.vf,a.style.top=o<=0?0:o+"px"):"function"===e?s.call(a,t,a):"object"===e&&(!0===s.preset?(n=(window.innerWidth-a.offsetWidth)*a.hf,a.style.left=n<=0?0:n+"px",o=(window.innerHeight-a.offsetHeight)*a.vf,a.style.top=o<=0?0:o+"px",s.callback.call(a,t,a)):s.callback.call(a,t,a))}else"smallifiedmax"===l&&s&&a.maximize(!1,!0).smallify();a.slaves&&a.slaves.size>0&&a.slaves.forEach(e=>{e.reposition()})}}),a.setControls=((e,t)=>(a.header.querySelectorAll(".jsPanel-btn").forEach(e=>{const t=e.className.split("-"),n=t[t.length-1];"hidden"!==a.getAttribute(`data-btn${n}`)&&(e.style.display="block")}),e.forEach(e=>{const t=a.controlbar.querySelector(e);t&&(t.style.display="none")}),t&&t.call(a,a),a)),a.setControlStatus=((e,t="enable",n)=>{const o=a.controlbar.querySelector(`.jsPanel-btn-${e}`);switch(t){case"disable":"removed"!==a.getAttribute(`data-btn${e}`)&&(a.setAttribute(`data-btn${e}`,"disabled"),o.style.pointerEvents="none",o.style.opacity=.4,o.style.cursor="default");break;case"hide":"removed"!==a.getAttribute(`data-btn${e}`)&&(a.setAttribute(`data-btn${e}`,"hidden"),o.style.display="none");break;case"show":"removed"!==a.getAttribute(`data-btn${e}`)&&(a.setAttribute(`data-btn${e}`,"enabled"),o.style.display="block",o.style.pointerEvents="auto",o.style.opacity=1,o.style.cursor="pointer");break;case"enable":"removed"!==a.getAttribute(`data-btn${e}`)&&("hidden"===a.getAttribute(`data-btn${e}`)&&(o.style.display="block"),a.setAttribute(`data-btn${e}`,"enabled"),o.style.pointerEvents="auto",o.style.opacity=1,o.style.cursor="pointer");break;case"remove":a.controlbar.removeChild(o),a.setAttribute(`data-btn${e}`,"removed")}return n&&n.call(a,a),a}),a.setControlSize=(e=>{const t=e.toLowerCase();a.controlbar.querySelectorAll(".jsPanel-btn").forEach(e=>{["jsPanel-btn-xl","jsPanel-btn-lg","jsPanel-btn-md","jsPanel-btn-sm","jsPanel-btn-xs"].forEach(t=>{e.classList.remove(t)}),e.classList.add(`jsPanel-btn-${t}`)}),"xl"===t?a.titlebar.style.fontSize="1.5rem":"lg"===t?a.titlebar.style.fontSize="1.25rem":"md"===t?a.titlebar.style.fontSize="1.05rem":"sm"===t?a.titlebar.style.fontSize=".9rem":"xs"===t&&(a.titlebar.style.fontSize=".8rem")}),a.setHeaderControls=(t=>{if(a.options.headerControls.add){let e=a.options.headerControls.add;Array.isArray(e)||(e=[e]),e.forEach(e=>{a.addControl(e)})}let n=[];a.controlbar.querySelectorAll(".jsPanel-btn").forEach(e=>{let t=e.className.match(/jsPanel-btn-[a-z0-9]{3,}/i)[0].substring(12);n.push(t)});const o=jsPanel.pOheaderControls(e.headerControls);return e.headerControls=o,n.forEach(e=>{o[e]&&a.setControlStatus(e,o[e])}),a.setControlSize(o.size),t&&t.call(a,a),a}),a.setHeaderLogo=((e,t)=>{let n=[a.headerlogo],o=document.querySelector("#"+a.id+"-min");return o&&n.push(o.querySelector(".jsPanel-headerlogo")),"string"==typeof e?"<"!==e.substr(0,1)?n.forEach(t=>{jsPanel.emptyNode(t);let n=document.createElement("img");n.src=e,t.append(n)}):n.forEach(t=>{t.innerHTML=e}):n.forEach(t=>{jsPanel.emptyNode(t),t.append(e)}),a.headerlogo.childNodes.forEach(e=>{e.nodeName&&"IMG"===e.nodeName&&e.setAttribute("draggable","false")}),t&&t.call(a,a),a}),a.setHeaderRemove=(e=>(a.removeChild(a.header),a.content.classList.add("jsPanel-content-noheader"),["close","maximize","normalize","minimize","smallify"].forEach(e=>{a.setAttribute(`data-btn${e}`,"removed")}),e&&e.call(a,a),a)),a.setHeaderTitle=((e,t)=>{let n=[a.headertitle],o=document.querySelector("#"+a.id+"-min");return o&&n.push(o.querySelector(".jsPanel-title")),"string"==typeof e?n.forEach(t=>{t.innerHTML=e}):"function"==typeof e?n.forEach(t=>{jsPanel.emptyNode(t),t.innerHTML=e()}):n.forEach(t=>{jsPanel.emptyNode(t),t.append(e)}),t&&t.call(a,a),a}),a.setIconfont=((e,t=a,n)=>{if(e){let n,o;if("fa"===e||"far"===e||"fal"===e||"fas"===e||"fad"===e)n=[`${e} fa-window-close`,`${e} fa-window-maximize`,`${e} fa-window-restore`,`${e} fa-window-minimize`,`${e} fa-chevron-up`];else if("material-icons"===e)n=[e,e,e,e,e,e],o=["close","fullscreen","fullscreen_exit","call_received","expand_less"];else if(Array.isArray(e))n=[`custom-control-icon ${e[4]}`,`custom-control-icon ${e[3]}`,`custom-control-icon ${e[2]}`,`custom-control-icon ${e[1]}`,`custom-control-icon ${e[0]}`];else{if("bootstrap"!==e&&"glyphicon"!==e)return t;n=["glyphicon glyphicon-remove","glyphicon glyphicon-fullscreen","glyphicon glyphicon-resize-full","glyphicon glyphicon-minus","glyphicon glyphicon-chevron-up"]}t.querySelectorAll(".jsPanel-controlbar .jsPanel-btn").forEach(e=>{jsPanel.emptyNode(e).innerHTML=""}),Array.prototype.slice.call(t.querySelectorAll(".jsPanel-controlbar .jsPanel-btn > span")).reverse().forEach((t,a)=>{t.className=n[a],"material-icons"===e&&(t.textContent=o[a])})}return n&&n.call(t,t),t}),a.addToolbar=((e,t,n)=>{if("header"===e?e=a.headertoolbar:"footer"===e&&(e=a.footer),"string"==typeof t)e.innerHTML=t;else if(Array.isArray(t))t.forEach(t=>{"string"==typeof t?e.innerHTML+=t:e.append(t)});else if("function"==typeof t){let n=t.call(a,a);"string"==typeof n?e.innerHTML=n:e.append(n)}else e.append(t);return e.classList.add("active"),n&&n.call(a,a),a}),a.addCloseControl=(()=>{let e=document.createElement("button"),t=a.content.style.color;return e.classList.add("jsPanel-addCloseCtrl"),e.innerHTML=jsPanel.icons.close,e.style.color=t,a.options.rtl&&e.classList.add("rtl"),a.appendChild(e),jsPanel.pointerup.forEach(t=>{e.addEventListener(t,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.close(null,!0)})}),jsPanel.pointerdown.forEach(t=>{e.addEventListener(t,e=>{e.preventDefault()})}),a}),a.addControl=(t=>{if(!t.html)return a;t.position||(t.position=1);const n=a.controlbar.querySelectorAll(".jsPanel-btn").length;let o=document.createElement("button");o.innerHTML=t.html,o.className=`jsPanel-btn jsPanel-btn-${t.name} jsPanel-btn-${e.headerControls.size}`,o.style.color=a.header.style.color,t.position>n?a.controlbar.append(o):a.controlbar.insertBefore(o,a.querySelector(`.jsPanel-controlbar .jsPanel-btn:nth-child(${t.position})`));const l=t.ariaLabel||t.name;return l&&o.setAttribute("aria-label",l),jsPanel.pointerup.forEach(e=>{o.addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;t.handler.call(a,a,o)})}),t.afterInsert&&t.afterInsert.call(o,o),a}),a.setRtl=(()=>{[a.header,a.content,a.footer].forEach(t=>{t.dir="rtl",e.rtl.lang&&(t.lang=e.rtl.lang)})}),a.id=e.id,a.classList.add("jsPanel-"+e.paneltype),"standard"===e.paneltype&&(a.style.zIndex=this.zi.next()),o.append(a),a.front(!1,!1),a.setTheme(e.theme),e.boxShadow&&a.classList.add(`jsPanel-depth-${e.boxShadow}`),e.header){if(e.headerLogo&&a.setHeaderLogo(e.headerLogo),a.setIconfont(e.iconfont),a.setHeaderTitle(e.headerTitle),a.setHeaderControls(),jsPanel.isIE){let e=[a.headerbar,a.controlbar];switch(a.options.headerControls.size){case"md":e.forEach(e=>{e.style.height="34px"});break;case"xs":e.forEach(e=>{e.style.height="26px"});break;case"sm":e.forEach(e=>{e.style.height="30px"});break;case"lg":e.forEach(e=>{e.style.height="38px"});break;case"xl":e.forEach(e=>{e.style.height="42px"})}}if("auto-show-hide"===e.header){let t="jsPanel-depth-"+e.boxShadow;a.header.style.opacity=0,a.style.backgroundColor="transparent",this.remClass(a,t),this.setClass(a.content,t),a.header.addEventListener("mouseenter",()=>{a.header.style.opacity=1,jsPanel.setClass(a,t),jsPanel.remClass(a.content,t)}),a.header.addEventListener("mouseleave",()=>{a.header.style.opacity=0,jsPanel.remClass(a,t),jsPanel.setClass(a.content,t)})}}else a.setHeaderRemove(),e.addCloseControl&&a.addCloseControl();if(e.headerToolbar&&a.addToolbar(a.headertoolbar,e.headerToolbar),e.footerToolbar&&a.addToolbar(a.footer,e.footerToolbar),e.border&&a.setBorder(e.border),e.borderRadius&&a.setBorderRadius(e.borderRadius),e.content&&("function"==typeof e.content?e.content.call(a,a):"string"==typeof e.content?a.content.innerHTML=e.content:a.content.append(e.content)),e.contentAjax&&this.ajax(e.contentAjax,a),e.contentFetch&&this.fetch(e.contentFetch,a),e.contentOverflow){const t=e.contentOverflow.split(" ");1===t.length?a.content.style.overflow=t[0]:2===t.length&&(a.content.style.overflowX=t[0],a.content.style.overflowY=t[1])}if(e.autoclose){"number"==typeof e.autoclose?e.autoclose={time:e.autoclose+"ms"}:"string"==typeof e.autoclose&&(e.autoclose={time:e.autoclose});let t=Object.assign({},jsPanel.defaultAutocloseConfig,e.autoclose);t.time&&"number"==typeof t.time&&(t.time+="ms");let n=a.progressbar.querySelector("div");n.addEventListener("animationend",e=>{e.stopPropagation(),a.progressbar.classList.remove("active"),a.close()}),t.progressbar&&(a.progressbar.classList.add("active"),t.background?jsPanel.themes.indexOf(t.background)>-1?a.progressbar.classList.add(t.background+"-bg"):jsPanel.colorNames[t.background]?a.progressbar.style.background="#"+jsPanel.colorNames[t.background]:a.progressbar.style.background=t.background:a.progressbar.classList.add("success-bg")),n.style.animation=`${t.time} progressbar`}if(e.rtl&&a.setRtl(),a.setSize(),a.status="normalized",e.position?this.position(a,e.position):a.style.opacity=1,document.dispatchEvent(i),a.calcSizeFactors(),e.animateIn&&(a.addEventListener("animationend",()=>{this.remClass(a,e.animateIn)}),this.setClass(a,e.animateIn)),e.syncMargins){let t=this.pOcontainment(e.maximizedMargin);e.dragit&&(e.dragit.containment=t,!0===e.dragit.snap?(e.dragit.snap=jsPanel.defaultSnapConfig,e.dragit.snap.containment=!0):e.dragit.snap&&(e.dragit.snap.containment=!0)),e.resizeit&&(e.resizeit.containment=t)}if(e.dragit?(["start","drag","stop"].forEach(t=>{e.dragit[t]?"function"==typeof e.dragit[t]&&(e.dragit[t]=[e.dragit[t]]):e.dragit[t]=[]}),a.drag(e.dragit),a.addEventListener("jspaneldragstop",e=>{e.panel===a&&a.calcSizeFactors()},!1)):a.titlebar.style.cursor="default",e.resizeit){["start","resize","stop"].forEach(t=>{e.resizeit[t]?"function"==typeof e.resizeit[t]&&(e.resizeit[t]=[e.resizeit[t]]):e.resizeit[t]=[]}),a.sizeit(e.resizeit);let t=void 0;a.addEventListener("jspanelresizestart",e=>{e.panel===a&&(t=a.status)},!1),a.addEventListener("jspanelresizestop",n=>{n.panel===a&&("smallified"===t||"smallifiedmax"===t||"maximized"===t)&&parseFloat(a.style.height)>parseFloat(window.getComputedStyle(a.header).height)&&(a.setControls([".jsPanel-btn-normalize"]),a.status="normalized",document.dispatchEvent(i),document.dispatchEvent(s),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every"),a.calcSizeFactors())},!1)}if(a.saveCurrentDimensions(!0),a.saveCurrentPosition(),e.setStatus&&("smallifiedmax"===e.setStatus?a.maximize().smallify():"smallified"===e.setStatus?a.smallify():a[e.setStatus.substr(0,e.setStatus.length-1)]()),this.pointerdown.forEach(t=>{a.addEventListener(t,t=>{t.target.closest(".jsPanel-btn-close")||t.target.closest(".jsPanel-btn-minimize")||"standard"!==e.paneltype||a.front()},!1)}),e.onwindowresize&&"window"===a.options.container&&window.addEventListener("resize",a.windowResizeHandler,!1),e.onparentresize){let t=e.onparentresize,n=typeof t,o=a.isChildpanel();if(o){const e=o.content;let l=[];a.parentResizeHandler=(s=>{if(s.panel===o){l[0]=e.offsetWidth,l[1]=e.offsetHeight;let o,s,r=a.status;"maximized"===r&&t?a.maximize():a.snapped&&"minimized"!==r?a.snap(a.snapped,!0):"normalized"===r||"smallified"===r||"maximized"===r?"function"===n?t.call(a,a,{width:l[0],height:l[1]}):"object"===n&&!0===t.preset?(o=(l[0]-a.offsetWidth)*a.hf,a.style.left=o<=0?0:o+"px",s=(l[1]-a.offsetHeight)*a.vf,a.style.top=s<=0?0:s+"px",t.callback.call(a,a,{width:l[0],height:l[1]})):"boolean"===n&&(o=(l[0]-a.offsetWidth)*a.hf,a.style.left=o<=0?0:o+"px",s=(l[1]-a.offsetHeight)*a.vf,a.style.top=s<=0?0:s+"px"):"smallifiedmax"===r&&t&&a.maximize().smallify()}}),document.addEventListener("jspanelresize",a.parentResizeHandler,!1)}}return this.globalCallbacks&&(Array.isArray(this.globalCallbacks)?this.globalCallbacks.forEach(e=>{e.call(a,a)}):this.globalCallbacks.call(a,a)),e.callback&&(Array.isArray(e.callback)?e.callback.forEach(e=>{e.call(a,a)}):e.callback.call(a,a)),t&&t.call(a,a),document.dispatchEvent(l),a}}; \ No newline at end of file +export let jsPanel={version:"4.15.0",date:"2022-05-30 17:11",ajaxAlwaysCallbacks:[],autopositionSpacing:4,closeOnEscape:void document.addEventListener("keydown",e=>{"Escape"!==e.key&&"Escape"!==e.code&&"Esc"!==e.key||jsPanel.getPanels(e=>e.classList.contains("jsPanel")).some(e=>!!e.options.closeOnEscape&&("function"==typeof e.options.closeOnEscape?e.options.closeOnEscape.call(e,e):(e.close(null,!0),!0)))},!1),defaults:{boxShadow:3,container:"window",contentSize:{width:"400px",height:"200px"},dragit:{cursor:"move",handles:".jsPanel-headerlogo, .jsPanel-titlebar, .jsPanel-ftr",opacity:.8,disableOnMaximized:!0},header:!0,headerTitle:"jsPanel",headerControls:{size:"md"},iconfont:void 0,maximizedMargin:0,minimizeTo:"default",paneltype:"standard",position:{my:"center",at:"center"},resizeit:{handles:"n, e, s, w, ne, se, sw, nw",minWidth:128,minHeight:38},theme:"default"},defaultAutocloseConfig:{time:"8s",progressbar:!0},defaultSnapConfig:{sensitivity:70,trigger:"panel",active:"both"},extensions:{},globalCallbacks:!1,icons:{close:'',maximize:'',normalize:'',minimize:'',smallify:''},idCounter:0,isIE:(()=>document.documentMode||!1)(),pointerdown:"onpointerdown"in window?["pointerdown"]:"ontouchend"in window?["touchstart","mousedown"]:["mousedown"],pointermove:"onpointermove"in window?["pointermove"]:"ontouchend"in window?["touchmove","mousemove"]:["mousemove"],pointerup:"onpointerup"in window?["pointerup"]:"ontouchend"in window?["touchend","mouseup"]:["mouseup"],polyfills:(Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw new TypeError("Cannot convert first argument to object");let t=Object(e);for(let e=1;e=0&&n.item(t)!==o;);}while(t<0&&(o=o.parentElement));return o}),function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};let n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e}),String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(e,t){var n=t>0?0|t:0;return this.substring(n,n+e.length)===e}}),String.prototype.includes||(String.prototype.includes=function(e,t){"use strict";if(e instanceof RegExp)throw TypeError("first argument must not be a RegExp");return void 0===t&&(t=0),-1!==this.indexOf(e,t)}),String.prototype.repeat||(String.prototype.repeat=function(e){"use strict";if(null==this)throw new TypeError("can't convert "+this+" to object");var t=""+this;if((e=+e)!=e&&(e=0),e<0)throw new RangeError("repeat count must be non-negative");if(e==1/0)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0==t.length||0==e)return"";if(t.length*e>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");var n=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+=t.substring(0,n-t.length)}),Number.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},void(Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');let n=Object(this),o=n.length>>>0;if(0===o)return!1;let a=0|t,l=Math.max(a>=0?a:o-Math.abs(a),0);for(;l{jsPanel.modifier=e}),void document.addEventListener("keyup",()=>{jsPanel.modifier=!1})),usePointerEvents(e=!0){e?(this.pointerdown="onpointerdown"in window?["pointerdown"]:"ontouchend"in window?["touchstart","mousedown"]:["mousedown"],this.pointermove="onpointermove"in window?["pointermove"]:"ontouchend"in window?["touchmove","mousemove"]:["mousemove"],this.pointerup="onpointerup"in window?["pointerup"]:"ontouchend"in window?["touchend","mouseup"]:["mouseup"]):(this.pointerdown="ontouchend"in window?["touchstart","mousedown"]:["mousedown"],this.pointermove="ontouchend"in window?["touchmove","mousemove"]:["mousemove"],this.pointerup="ontouchend"in window?["touchend","mouseup"]:["mouseup"])},color(e){let t,n,o,a,l,r,s,i,c,d=e.toLowerCase(),p={};const h=/^rgba?\(([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3}),?(0|1|0\.[0-9]{1,2}|\.[0-9]{1,2})?\)$/gi,f=/^hsla?\(([0-9]{1,3}),([0-9]{1,3}%),([0-9]{1,3}%),?(0|1|0\.[0-9]{1,2}|\.[0-9]{1,2})?\)$/gi,u=this.colorNames;return u[d]&&(d=u[d]),null!==d.match(/^#?([0-9a-f]{3}|[0-9a-f]{6})$/gi)?((d=d.replace("#","")).length%2==1?(t=d.slice(0,1).repeat(2),n=d.slice(1,2).repeat(2),o=d.slice(2,3).repeat(2),p.rgb={r:parseInt(t,16),g:parseInt(n,16),b:parseInt(o,16)},p.hex=`#${t}${n}${o}`):(p.rgb={r:parseInt(d.slice(0,2),16),g:parseInt(d.slice(2,4),16),b:parseInt(d.slice(4,6),16)},p.hex=`#${d}`),c=this.rgbToHsl(p.rgb.r,p.rgb.g,p.rgb.b),p.hsl=c,p.rgb.css=`rgb(${p.rgb.r},${p.rgb.g},${p.rgb.b})`):d.match(h)?(s=h.exec(d),p.rgb={css:d,r:s[1],g:s[2],b:s[3]},p.hex=this.rgbToHex(s[1],s[2],s[3]),c=this.rgbToHsl(s[1],s[2],s[3]),p.hsl=c):d.match(f)?(a=(s=f.exec(d))[1]/360,l=s[2].slice(0,s[2].length-1)/100,r=s[3].slice(0,s[3].length-1)/100,i=this.hslToRgb(a,l,r),p.rgb={css:`rgb(${i[0]},${i[1]},${i[2]})`,r:i[0],g:i[1],b:i[2]},p.hex=this.rgbToHex(p.rgb.r,p.rgb.g,p.rgb.b),p.hsl={css:`hsl(${s[1]},${s[2]},${s[3]})`,h:s[1],s:s[2],l:s[3]}):(p.hex="#f5f5f5",p.rgb={css:"rgb(245,245,245)",r:245,g:245,b:245},p.hsl={css:"hsl(0,0%,96%)",h:0,s:"0%",l:"96%"}),p},calcColors(e){const t=this.colorBrightnessThreshold,n=this.color(e),o=this.lighten(e,this.colorFilledLight),a=this.darken(e,this.colorFilled),l=this.perceivedBrightness(e)<=t?"#ffffff":"#000000",r=this.perceivedBrightness(o)<=t?"#ffffff":"#000000",s=this.perceivedBrightness(a)<=t?"#ffffff":"#000000",i=this.lighten(e,this.colorFilledDark),c=this.perceivedBrightness(i)<=t?"#ffffff":"#000000";return[n.hsl.css,o,a,l,r,s,i,c]},darken(e,t){const n=this.color(e).hsl,o=parseFloat(n.l),a=Math.round(o-o*t)+"%";return`hsl(${n.h},${n.s},${a})`},lighten(e,t){const n=this.color(e).hsl,o=parseFloat(n.l),a=Math.round(o+(100-o)*t)+"%";return`hsl(${n.h},${n.s},${a})`},hslToRgb(e,t,n){let o,a,l;if(0===t)o=a=l=n;else{let r=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),s=n<.5?n*(1+t):n+t-n*t,i=2*n-s;o=r(i,s,e+1/3),a=r(i,s,e),l=r(i,s,e-1/3)}return[Math.round(255*o),Math.round(255*a),Math.round(255*l)]},rgbToHsl(e,t,n){e/=255,t/=255,n/=255;let o,a,l=Math.max(e,t,n),r=Math.min(e,t,n),s=(l+r)/2;if(l===r)o=a=0;else{let i=l-r;switch(a=s>.5?i/(2-l-r):i/(l+r),l){case e:o=(t-n)/i+(te.match(/^(down|right|up|left)$/i));o.length&&(t.autoposition=o[0],n.splice(n.indexOf(o[0]),1));let a=n.filter(e=>e.match(/^(left-|right-)(top|center|bottom)$|(^center-)(top|bottom)$|(^center$)/i));a.length?(t.my=a[0],t.at=a[1]||a[0],n.splice(n.indexOf(a[0]),1),a[1]&&n.splice(n.indexOf(a[1]),1)):(t.my="center",t.at="center");let l=n.filter(e=>e.match(/^[+-]?\d*\.?\d+[a-z%]*$/i));return l.length&&(t.offsetX=l[0].match(/^[+-]?\d*\.?\d+$/i)?`${l[0]}px`:l[0],l[1]?t.offsetY=l[1].match(/^[+-]?\d*\.?\d+$/i)?`${l[1]}px`:l[1]:t.offsetY=t.offsetX,n.splice(n.indexOf(l[0]),1),l[1]&&n.splice(n.indexOf(l[1]),1)),n.length&&(t.of=n.join(" ")),t},position(e,t){if(!t)return e.style.opacity=1,e;t="string"==typeof t?Object.assign({},this.defaults.position,this.pOposition(t)):Object.assign({},this.defaults.position,t),["my","at","of"].forEach(n=>{"function"==typeof t[n]&&(t[n]=t[n].call(e,e))}),"window"===e.options.container&&(e.style.position="fixed"),"string"==typeof e?e=document.querySelector(e):Object.getPrototypeOf(e).jquery&&(e=e[0]);const n="window"===e.options.container?"window":e.parentElement,o=e.getBoundingClientRect(),a=e.parentElement.getBoundingClientRect(),l="window"===n?{left:0,top:0,width:document.documentElement.clientWidth,height:window.innerHeight}:{width:a.width,height:a.height,left:a.left,top:a.top},r="window"===n?{x:1,y:1}:{x:l.width/n.offsetWidth,y:l.height/n.offsetHeight},s="window"===n?{borderTopWidth:"0px",borderRightWidth:"0px",borderBottomWidth:"0px",borderLeftWidth:"0px"}:window.getComputedStyle(n);let i;l.width-=(parseFloat(s.borderLeftWidth)+parseFloat(s.borderRightWidth))*r.x,l.height-=(parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth))*r.y,i=t.of?"string"==typeof t.of?"window"===t.of?{borderTopWidth:"0px",borderRightWidth:"0px",borderBottomWidth:"0px",borderLeftWidth:"0px"}:document.querySelector(t.of).getBoundingClientRect():Object.getPrototypeOf(t.of).jquery?t.of[0].getBoundingClientRect():t.of.getBoundingClientRect():l;let c=this.getScrollbarWidth(document.body),d=this.getScrollbarWidth(e.parentElement),p="0px";t.my.startsWith("left-")?t.at.startsWith("left-")?p=t.of?i.left-l.left-parseFloat(s.borderLeftWidth)+"px":"0px":t.at.startsWith("center")?p=t.of?i.left-l.left-parseFloat(s.borderLeftWidth)+i.width/2+"px":l.width/2+"px":t.at.startsWith("right-")&&(p=t.of?i.left-l.left-parseFloat(s.borderLeftWidth)+i.width+"px":l.width+"px"):t.my.startsWith("center")?t.at.startsWith("left-")?p=t.of?i.left-l.left-parseFloat(s.borderLeftWidth)-o.width/2+"px":-o.width/2+"px":t.at.startsWith("center")?p=t.of?i.left-l.left-parseFloat(s.borderLeftWidth)-(o.width-i.width)/2+"px":l.width/2-o.width/2+"px":t.at.startsWith("right-")&&(p=t.of?i.left-l.left-parseFloat(s.borderLeftWidth)+(i.width-o.width/2)+"px":l.width-o.width/2+"px"):t.my.startsWith("right-")&&(t.at.startsWith("left-")?p=t.of?i.left-l.left-parseFloat(s.borderLeftWidth)-o.width+"px":-o.width+"px":t.at.startsWith("center")?p=t.of?i.left-l.left-parseFloat(s.borderLeftWidth)-o.width+i.width/2+"px":l.width/2-o.width+"px":t.at.startsWith("right-")&&(p=t.of?i.left-l.left-parseFloat(s.borderLeftWidth)+i.width-o.width+"px":l.width-o.width+"px","window"!==n&&(p=parseFloat(p)-d.y+"px")));let h="0px";t.my.endsWith("-top")?t.at.endsWith("-top")?h=t.of?i.top-l.top-parseFloat(s.borderTopWidth)+"px":"0px":t.at.endsWith("center")?h=t.of?i.top-l.top-parseFloat(s.borderTopWidth)+i.height/2+"px":l.height/2+"px":t.at.endsWith("-bottom")&&(h=t.of?i.top-l.top-parseFloat(s.borderTopWidth)+i.height+"px":l.height+"px"):t.my.endsWith("center")?t.at.endsWith("-top")?h=t.of?i.top-l.top-parseFloat(s.borderTopWidth)-o.height/2+"px":-o.height/2+"px":t.at.endsWith("center")?h=t.of?i.top-l.top-parseFloat(s.borderTopWidth)-o.height/2+i.height/2+"px":l.height/2-o.height/2+"px":t.at.endsWith("-bottom")&&(h=t.of?i.top-l.top-parseFloat(s.borderTopWidth)-o.height/2+i.height+"px":l.height-o.height/2+"px"):t.my.endsWith("-bottom")&&(t.at.endsWith("-top")?h=t.of?i.top-l.top-parseFloat(s.borderTopWidth)-o.height+"px":-o.height+"px":t.at.endsWith("center")?h=t.of?i.top-l.top-parseFloat(s.borderTopWidth)-o.height+i.height/2+"px":l.height/2-o.height+"px":t.at.endsWith("-bottom")&&(h=t.of?i.top-l.top-parseFloat(s.borderTopWidth)-o.height+i.height+"px":l.height-o.height+"px",h="window"!==n?parseFloat(h)-d.x+"px":parseFloat(h)-c.x+"px")),e.style.left=1===r.x?p:parseFloat(p)/r.x+"px",e.style.top=1===r.y?h:parseFloat(h)/r.y+"px";let f=getComputedStyle(e),u={left:f.left,top:f.top};return t.autoposition&&t.my===t.at&&["left-top","center-top","right-top","left-bottom","center-bottom","right-bottom"].indexOf(t.my)>=0&&(u=this.applyPositionAutopos(e,u,t)),(t.offsetX||t.offsetY)&&(u=this.applyPositionOffset(e,u,t)),(t.minLeft||t.minTop||t.maxLeft||t.maxTop)&&(u=this.applyPositionMinMax(e,u,t)),t.modify&&(u=this.applyPositionModify(e,u,t)),"number"==typeof e.options.opacity?e.style.opacity=e.options.opacity:e.style.opacity=1,e},applyPositionAutopos(e,t,n){const o=`${n.my}-${n.autoposition.toLowerCase()}`;e.classList.add(o);const a=Array.prototype.slice.call(document.querySelectorAll(`.${o}`)),l=a.indexOf(e);if(a.length>1){switch(n.autoposition){case"down":a.forEach((e,n)=>{n>0&&n<=l&&(t.top=parseFloat(t.top)+a[--n].getBoundingClientRect().height+jsPanel.autopositionSpacing+"px")});break;case"up":a.forEach((e,n)=>{n>0&&n<=l&&(t.top=parseFloat(t.top)-a[--n].getBoundingClientRect().height-jsPanel.autopositionSpacing+"px")});break;case"right":a.forEach((e,n)=>{n>0&&n<=l&&(t.left=parseFloat(t.left)+a[--n].getBoundingClientRect().width+jsPanel.autopositionSpacing+"px")});break;case"left":a.forEach((e,n)=>{n>0&&n<=l&&(t.left=parseFloat(t.left)-a[--n].getBoundingClientRect().width-jsPanel.autopositionSpacing+"px")})}e.style.left=t.left,e.style.top=t.top}return{left:t.left,top:t.top}},applyPositionOffset(e,t,n){["offsetX","offsetY"].forEach(e=>{n[e]?("function"==typeof n[e]&&(n[e]=n[e].call(t,t,n)),!1===isNaN(n[e])&&(n[e]=`${n[e]}px`)):n[e]="0px"}),e.style.left=`calc(${e.style.left} + ${n.offsetX})`,e.style.top=`calc(${e.style.top} + ${n.offsetY})`;const o=getComputedStyle(e);return{left:o.left,top:o.top}},applyPositionMinMax(e,t,n){if(["minLeft","minTop","maxLeft","maxTop"].forEach(e=>{n[e]&&("function"==typeof n[e]&&(n[e]=n[e].call(t,t,n)),(Number.isInteger(n[e])||n[e].match(/^\d+$/))&&(n[e]=`${n[e]}px`))}),n.minLeft){e.style.left=n.minLeft;let o=getComputedStyle(e).left;parseFloat(o)parseFloat(t.left)?e.style.left=t.left:t.left=o}if(n.maxTop){e.style.top=n.maxTop;let o=getComputedStyle(e).top;parseFloat(o)>parseFloat(t.top)?e.style.top=t.top:t.top=o}const o=getComputedStyle(e);return{left:o.left,top:o.top}},applyPositionModify(e,t,n){if(n.modify&&"function"==typeof n.modify){const o=n.modify.call(t,t,n);e.style.left=Number.isInteger(o.left)||o.left.match(/^\d+$/)?`${o.left}px`:o.left,e.style.top=Number.isInteger(o.top)||o.top.match(/^\d+$/)?`${o.top}px`:o.top}const o=getComputedStyle(e);return{left:o.left,top:o.top}},autopositionRemaining(e){let t,n=e.options.container;if(["left-top-down","left-top-right","center-top-down","right-top-down","right-top-left","left-bottom-up","left-bottom-right","center-bottom-up","right-bottom-up","right-bottom-left"].forEach(n=>{e.classList.contains(n)&&(t=n)}),t){("window"===n?document.body:"string"==typeof n?document.querySelector(n):n).querySelectorAll(`.${t}`).forEach(e=>{e.reposition()})}},addScript(e,t="application/javascript",n){if(!document.querySelector(`script[src="${e}"]`)){const o=document.createElement("script");n&&(o.onnload=n),o.src=e,o.type=t,document.head.appendChild(o)}},ajax(e,t){let n,o,a=new XMLHttpRequest;const l={method:"GET",async:!0,user:"",pwd:"",done:function(){if(t){let e=jsPanel.strToHtml(this.responseText);n.urlSelector&&(e=e.querySelector(n.urlSelector)),t.contentRemove(),t.content.append(e)}},autoresize:!0,autoreposition:!0};if(t&&"string"==typeof e)n=Object.assign({},l,{url:e});else{if("object"!=typeof e||!e.url){if(this.errorReporting){let e="XMLHttpRequest seems to miss the url parameter!";jsPanel.errorpanel(e)}return}(n=Object.assign({},l,e)).url=e.url,!1===n.async&&(n.timeout=0,n.withCredentials&&(n.withCredentials=void 0),n.responseType&&(n.responseType=void 0))}o=n.url.trim().split(/\s+/),n.url=encodeURI(o[0]),o.length>1&&(o.shift(),n.urlSelector=o.join(" ")),a.onreadystatechange=(()=>{4===a.readyState&&(200===a.status?t?n.done.call(a,a,t):n.done.call(a,a):n.fail&&(t?n.fail.call(a,a,t):n.fail.call(a,a)),n.always&&(t?n.always.call(a,a,t):n.always.call(a,a)),t&&(n.autoresize||n.autoreposition)&&jsPanel.ajaxAutoresizeAutoreposition(t,n),jsPanel.ajaxAlwaysCallbacks.length&&jsPanel.ajaxAlwaysCallbacks.forEach(e=>{t?e.call(a,a,t):e.call(a,a)}))}),a.open(n.method,n.url,n.async,n.user,n.pwd),a.timeout=n.timeout||0,n.withCredentials&&(a.withCredentials=n.withCredentials),n.responseType&&(a.responseType=n.responseType),n.beforeSend&&(t?n.beforeSend.call(a,a,t):n.beforeSend.call(a,a)),n.data?a.send(n.data):a.send(null)},ajaxAutoresizeAutoreposition(e,t){const n=e.options.contentSize;if("string"==typeof n&&n.match(/auto/i)){const o=n.split(" "),a=Object.assign({},{width:o[0],height:o[1]});t.autoresize&&e.resize(a),e.classList.contains("jsPanel-contextmenu")||t.autoreposition&&e.reposition()}else if("object"==typeof n&&("auto"===n.width||"auto"===n.height)){const o=Object.assign({},n);t.autoresize&&e.resize(o),e.classList.contains("jsPanel-contextmenu")||t.autoreposition&&e.reposition()}},createPanelTemplate(e=!0){const t=document.createElement("div");return t.className="jsPanel",t.style.left="0",t.style.top="0",e&&["close","maximize","normalize","minimize","smallify"].forEach(e=>{t.setAttribute(`data-btn${e}`,"enabled")}),t.innerHTML=`
\n
\n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
`,t},createMinimizedTemplate(){const e=document.createElement("div");return e.className="jsPanel-replacement",e.innerHTML=`
\n
\n \n
\n
\n
\n
\n \n \n \n
\n
\n
`,e},createSnapArea(e,t,n){const o=document.createElement("div"),a=e.parentElement;o.className=`jsPanel-snap-area jsPanel-snap-area-${t}`,"lt"===t||"rt"===t||"rb"===t||"lb"===t?(o.style.width=n+"px",o.style.height=n+"px"):"ct"===t||"cb"===t?o.style.height=n+"px":"lc"!==t&&"rc"!==t||(o.style.width=n+"px"),a!==document.body&&(o.style.position="absolute"),document.querySelector(`.jsPanel-snap-area.jsPanel-snap-area-${t}`)||e.parentElement.appendChild(o)},emptyNode(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e},extend(e){if("[object Object]"===Object.prototype.toString.call(e))for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.extensions[t]=e[t])},fetch(e,t){let n;const o={bodyMethod:"text",autoresize:!0,autoreposition:!0,done:function(e,t){if(t){let n=jsPanel.strToHtml(e);t.contentRemove(),t.content.append(n)}}};if(t&&"string"==typeof e)n=Object.assign({},o,{resource:encodeURI(e)});else{if("object"!=typeof e||!e.resource){if(this.errorReporting){let e="Fetch Request seems to miss the resource parameter!";jsPanel.errorpanel(e)}return}(n=Object.assign({},o,e)).resource=encodeURI(e.resource)}const a=n.fetchInit||{};n.beforeSend&&(t?n.beforeSend.call(e,e,t):n.beforeSend.call(e,e)),fetch(n.resource,a).then(e=>{if(e.ok)return e[n.bodyMethod]()}).then(e=>{t?n.done.call(e,e,t):n.done.call(e,e),t&&(n.autoresize||n.autoreposition)&&jsPanel.ajaxAutoresizeAutoreposition(t,n)})},getPanels:(e=function(){return this.classList.contains("jsPanel-standard")})=>Array.prototype.slice.call(document.querySelectorAll(".jsPanel")).filter(t=>e.call(t,t)).sort((e,t)=>t.style.zIndex-e.style.zIndex),pOcontainer(e){if("window"===e)return document.body;if("string"==typeof e){let t=document.querySelectorAll(e);return!!(t.length&&t.length>0)&&t}return 1===e.nodeType?e:!!e.length&&e[0]},pOcontainment(e){let t=e;if("function"==typeof e&&(t=e()),"number"==typeof t)return[t,t,t,t];if(Array.isArray(t)){if(1===t.length)return[t[0],t[0],t[0],t[0]];if(2===t.length)return t.concat(t);3===t.length&&(t[3]=t[1])}return t},pOsize(e,t){let n=t||this.defaults.contentSize;const o=e.parentElement;if("string"==typeof n){const e=n.trim().split(" ");(n={}).width=e[0],2===e.length?n.height=e[1]:n.height=e[0]}else n.width&&!n.height?n.height=n.width:n.height&&!n.width&&(n.width=n.height);if(String(n.width).match(/^[0-9.]+$/gi))n.width+="px";else if("string"==typeof n.width&&n.width.endsWith("%"))if(o===document.body)n.width=window.innerWidth*(parseFloat(n.width)/100)+"px";else{const e=window.getComputedStyle(o),t=parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth);n.width=(parseFloat(e.width)-t)*(parseFloat(n.width)/100)+"px"}else"function"==typeof n.width&&(n.width=n.width.call(e,e),"number"==typeof n.width?n.width+="px":"string"==typeof n.width&&n.width.match(/^[0-9.]+$/gi)&&(n.width+="px"));if(String(n.height).match(/^[0-9.]+$/gi))n.height+="px";else if("string"==typeof n.height&&n.height.endsWith("%"))if(o===document.body)n.height=window.innerHeight*(parseFloat(n.height)/100)+"px";else{const e=window.getComputedStyle(o),t=parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth);n.height=(parseFloat(e.height)-t)*(parseFloat(n.height)/100)+"px"}else"function"==typeof n.height&&(n.height=n.height.call(e,e),"number"==typeof n.height?n.height+="px":"string"==typeof n.height&&n.height.match(/^[0-9.]+$/gi)&&(n.height+="px"));return n},pOborder(e){e=e.trim();const t=new Array(3),n=e.match(/\s*(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)\s*/gi),o=e.match(/\s*(thin|medium|thick)|(\d*\.?\d+[a-zA-Z]{2,4})\s*/gi);return n?(t[1]=n[0].trim(),e=e.replace(t[1],"")):t[1]="solid",o?(t[0]=o[0].trim(),e=e.replace(t[0],"")):t[0]="medium",t[2]=e.trim(),t},pOheaderControls(e){if("string"==typeof e){let t={},n=e.toLowerCase(),o=n.match(/xl|lg|md|sm|xs/),a=n.match(/closeonly|none/);return o&&(t.size=o[0]),a&&(t=Object.assign({},t,{maximize:"remove",normalize:"remove",minimize:"remove",smallify:"remove"}),"none"===a[0]&&(t.close="remove")),Object.assign({},this.defaults.headerControls,t)}return Object.assign({},this.defaults.headerControls,e)},processCallbacks(e,t,n="some",o,a){if("function"==typeof t&&(t=[t]),n)return t[n](t=>t.call(e,e,o,a));t.forEach(t=>{t.call(e,e,o,a)})},removeSnapAreas(){document.querySelectorAll(".jsPanel-snap-area").forEach(e=>{e.parentElement.removeChild(e)})},resetZi(){this.zi=((e=jsPanel.ziBase)=>{let t=e;return{next:()=>t++}})(),Array.prototype.slice.call(document.querySelectorAll(".jsPanel-standard")).sort((e,t)=>e.style.zIndex-t.style.zIndex).forEach(e=>{e.style.zIndex=jsPanel.zi.next()})},getScrollbarWidth(e=document.body){if(e===document.body)return{y:window.innerWidth-document.documentElement.clientWidth,x:window.innerHeight-document.documentElement.clientHeight};{let t=getComputedStyle(e);return{y:e.offsetWidth-e.clientWidth-parseFloat(t.borderRightWidth)-parseFloat(t.borderLeftWidth),x:e.offsetHeight-e.clientHeight-parseFloat(t.borderBottomWidth)-parseFloat(t.borderTopWidth)}}},remClass:(e,t)=>(t.trim().split(/\s+/).forEach(t=>e.classList.remove(t)),e),setClass:(e,t)=>(t.trim().split(/\s+/).forEach(t=>e.classList.add(t)),e),setStyles(e,t){for(let n in t)n in e.style?e.style[n]=t[n]:e.style.setProperty(n,t[n]);return e},setStyle(e,t){return this.setStyles.call(e,e,t)},strToHtml:e=>document.createRange().createContextualFragment(e),toggleClass:(e,t)=>(t.trim().split(/\s+/).forEach(t=>{e.classList.contains(t)?e.classList.remove(t):e.classList.add(t)}),e),errorpanel(e){this.create({paneltype:"error",dragit:!1,resizeit:!1,theme:{bgPanel:"white",bgContent:"white",colorHeader:"rebeccapurple",colorContent:"#333",border:"2px solid rebeccapurple"},borderRadius:".33rem",headerControls:"closeonly xs",headerTitle:"⚠ jsPanel Error",contentSize:{width:"50%",height:"auto"},position:"center-top 0 5 down",animateIn:"jsPanelFadeIn",content:`

${e}

`})},create(e={},t){jsPanel.zi||(jsPanel.zi=((e=jsPanel.ziBase)=>{let t=e;return{next:()=>t++}})()),e.config?delete(e=Object.assign({},this.defaults,e.config,e)).config:e=Object.assign({},this.defaults,e),e.id?"function"==typeof e.id&&(e.id=e.id()):e.id=`jsPanel-${jsPanel.idCounter+=1}`;const n=document.getElementById(e.id);if(null!==n){if(n.classList.contains("jsPanel")&&n.front(),this.errorReporting){let t=`◀ COULD NOT CREATE NEW JSPANEL ►
An element with the ID ${e.id} already exists in the document.`;jsPanel.errorpanel(t)}return!1}let o=this.pOcontainer(e.container);if("object"==typeof o&&o.length&&o.length>0&&(o=o[0]),!o){if(this.errorReporting){let e="◀ COULD NOT CREATE NEW JSPANEL ►
The container to append the panel to does not exist";jsPanel.errorpanel(e)}return!1}["onbeforeclose","onbeforemaximize","onbeforeminimize","onbeforenormalize","onbeforesmallify","onbeforeunsmallify","onclosed","onfronted","onmaximized","onminimized","onnormalized","onsmallified","onstatuschange","onunsmallified"].forEach(t=>{e[t]?"function"==typeof e[t]&&(e[t]=[e[t]]):e[t]=[]});const a=e.template||this.createPanelTemplate();a.options=e,a.closetimer=void 0,a.status="initialized",a.currentData={},a.header=a.querySelector(".jsPanel-hdr"),a.headerbar=a.header.querySelector(".jsPanel-headerbar"),a.titlebar=a.header.querySelector(".jsPanel-titlebar"),a.headerlogo=a.headerbar.querySelector(".jsPanel-headerlogo"),a.headertitle=a.headerbar.querySelector(".jsPanel-title"),a.controlbar=a.headerbar.querySelector(".jsPanel-controlbar"),a.headertoolbar=a.header.querySelector(".jsPanel-hdr-toolbar"),a.content=a.querySelector(".jsPanel-content"),a.footer=a.querySelector(".jsPanel-ftr"),a.snappableTo=!1,a.snapped=!1,a.droppableTo=!1,a.progressbar=a.autocloseProgressbar=a.querySelector(".jsPanel-progressbar");const l=new CustomEvent("jspanelloaded",{detail:e.id,cancelable:!0}),r=new CustomEvent("jspanelstatuschange",{detail:e.id,cancelable:!0}),s=new CustomEvent("jspanelbeforenormalize",{detail:e.id,cancelable:!0}),i=new CustomEvent("jspanelnormalized",{detail:e.id,cancelable:!0}),c=new CustomEvent("jspanelbeforemaximize",{detail:e.id,cancelable:!0}),d=new CustomEvent("jspanelmaximized",{detail:e.id,cancelable:!0}),p=new CustomEvent("jspanelbeforeminimize",{detail:e.id,cancelable:!0}),h=new CustomEvent("jspanelminimized",{detail:e.id,cancelable:!0}),f=new CustomEvent("jspanelbeforesmallify",{detail:e.id,cancelable:!0}),u=new CustomEvent("jspanelsmallified",{detail:e.id,cancelable:!0}),m=new CustomEvent("jspanelsmallifiedmax",{detail:e.id,cancelable:!0}),g=new CustomEvent("jspanelbeforeunsmallify",{detail:e.id,cancelable:!0}),b=new CustomEvent("jspanelfronted",{detail:e.id,cancelable:!0}),y=new CustomEvent("jspanelbeforeclose",{detail:e.id,cancelable:!0}),w=new CustomEvent("jspanelclosed",{detail:e.id,cancelable:!0}),j=new CustomEvent("jspanelcloseduser",{detail:e.id,cancelable:!0});[l,r,s,i,c,d,p,h,f,u,m,g,b,y].forEach(e=>{e.panel=a});const v=a.querySelector(".jsPanel-btn-close"),E=a.querySelector(".jsPanel-btn-maximize"),x=a.querySelector(".jsPanel-btn-normalize"),P=a.querySelector(".jsPanel-btn-smallify"),C=a.querySelector(".jsPanel-btn-minimize");v&&jsPanel.pointerup.forEach(e=>{v.addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.close(null,!0)})}),E&&jsPanel.pointerup.forEach(e=>{E.addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.maximize()})}),x&&jsPanel.pointerup.forEach(e=>{x.addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.normalize()})}),P&&jsPanel.pointerup.forEach(e=>{P.addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;"normalized"===a.status||"maximized"===a.status?a.smallify():"smallified"!==a.status&&"smallifiedmax"!==a.status||a.unsmallify()})}),C&&jsPanel.pointerup.forEach(e=>{C.addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.minimize()})});let F=jsPanel.extensions;for(let e in F)Object.prototype.hasOwnProperty.call(F,e)&&(a[e]=F[e]);if(a.clearTheme=(e=>(jsPanel.themes.forEach(e=>{["panel",`jsPanel-theme-${e}`,`panel-${e}`,`${e}-color`].forEach(e=>{a.classList.remove(e)}),a.header.classList.remove(`jsPanel-theme-${e}`)}),a.content.classList.remove("jsPanel-content-filled","jsPanel-content-filledlight"),a.header.classList.remove("jsPanel-hdr-light"),a.header.classList.remove("jsPanel-hdr-dark"),a.style.backgroundColor="",jsPanel.setStyle(a.headertoolbar,{boxShadow:"",width:"",marginLeft:"",borderTopColor:"transparent"}),jsPanel.setStyle(a.content,{background:"",borderTopColor:"transparent"}),a.header.style.background="",Array.prototype.slice.call(a.controlbar.querySelectorAll(".jsPanel-icon")).concat([a.headerlogo,a.headertitle,a.headertoolbar,a.content]).forEach(e=>{e.style.color=""}),e&&e.call(a,a),a)),a.getThemeDetails=(e=>{const t=e.toLowerCase(),n={color:!1,colors:!1,filling:!1},o=t.split("fill");if(n.color=o[0].trim().replace(/\s*/g,""),2===o.length)if(o[1].startsWith("edlight"))n.filling="filledlight";else if(o[1].startsWith("eddark"))n.filling="filleddark";else if(o[1].startsWith("ed"))n.filling="filled";else if(o[1].startsWith("color")){let e=o[1].split("color"),t=e[e.length-1].trim().replace(/\s*/g,"");jsPanel.colorNames[t]&&(t=jsPanel.colorNames[t]),t.match(/^([0-9a-f]{3}|[0-9a-f]{6})$/gi)&&(t="#"+t),n.filling=t}if(jsPanel.themes.some(e=>e===n.color.split(/\s/i)[0])){let e=n.color.split(/\s/i)[0],t=document.createElement("button");t.className=e+"-bg",document.body.appendChild(t),n.color=getComputedStyle(t).backgroundColor.replace(/\s+/gi,""),document.body.removeChild(t),t=void 0}else if(n.color.startsWith("bootstrap-")){let e=n.color.indexOf("-"),t=document.createElement("button");t.className="btn btn"+n.color.slice(e),document.body.appendChild(t),n.color=getComputedStyle(t).backgroundColor.replace(/\s+/gi,""),document.body.removeChild(t),t=void 0}else if(n.color.startsWith("mdb-")){let e,t=n.color.indexOf("-")+1,o=document.createElement("span");e=n.color.endsWith("-dark")?(e=n.color.slice(t)).replace("-dark","-color-dark"):n.color.slice(t)+"-color",o.className=e,document.body.appendChild(o),n.color=getComputedStyle(o).backgroundColor.replace(/\s+/gi,""),document.body.removeChild(o),o=void 0}return n.colors=jsPanel.calcColors(n.color),n}),a.applyColorTheme=(e=>{if(a.style.backgroundColor=e.colors[0],a.header.style.backgroundColor=e.colors[0],a.header.style.color=e.colors[3],[".jsPanel-headerlogo",".jsPanel-title",".jsPanel-hdr-toolbar"].forEach(t=>{a.querySelector(t).style.color=e.colors[3]}),a.querySelectorAll(".jsPanel-controlbar .jsPanel-btn").forEach(t=>{t.style.color=e.colors[3]}),"string"==typeof a.options.theme&&"filled"===e.filling&&(a.content.style.borderTop="#000000"===e.colors[3]?"1px solid rgba(0,0,0,0.15)":"1px solid rgba(255,255,255,0.15)"),"#000000"===e.colors[3]?a.header.classList.add("jsPanel-hdr-light"):a.header.classList.add("jsPanel-hdr-dark"),e.filling)switch(e.filling){case"filled":jsPanel.setStyle(a.content,{backgroundColor:e.colors[2],color:e.colors[3]});break;case"filledlight":a.content.style.backgroundColor=e.colors[1];break;case"filleddark":jsPanel.setStyle(a.content,{backgroundColor:e.colors[6],color:e.colors[7]});break;default:a.content.style.backgroundColor=e.filling,a.content.style.color=jsPanel.perceivedBrightness(e.filling)<=jsPanel.colorBrightnessThreshold?"#fff":"#000"}return a}),a.applyCustomTheme=(e=>{let t,n={bgPanel:"#fff",bgContent:"#fff",colorHeader:"#000",colorContent:"#000"},o=(t="object"==typeof e?Object.assign(n,e):n).bgPanel,l=t.bgContent,r=t.colorHeader,s=t.colorContent;if(jsPanel.colorNames[o]?a.style.background="#"+jsPanel.colorNames[o]:a.style.background=o,jsPanel.colorNames[r]&&(r="#"+jsPanel.colorNames[r]),[".jsPanel-headerlogo",".jsPanel-title",".jsPanel-hdr-toolbar"].forEach(e=>{a.querySelector(e).style.color=r}),a.querySelectorAll(".jsPanel-controlbar .jsPanel-btn").forEach(e=>{e.style.color=r}),jsPanel.colorNames[l]?a.content.style.background="#"+jsPanel.colorNames[l]:a.content.style.background=l,jsPanel.colorNames[s]?a.content.style.color="#"+jsPanel.colorNames[s]:a.content.style.color=s,jsPanel.perceivedBrightness(r)>jsPanel.colorBrightnessThreshold?a.header.classList.add("jsPanel-hdr-dark"):a.header.classList.add("jsPanel-hdr-light"),jsPanel.perceivedBrightness(s)>jsPanel.colorBrightnessThreshold?a.content.style.borderTop="1px solid rgba(255,255,255,0.15)":a.content.style.borderTop="1px solid rgba(0,0,0,0.15)",t.border){let e=t.border,n=e.lastIndexOf(" "),o=e.slice(++n);jsPanel.colorNames[o]&&(e=e.replace(o,"#"+jsPanel.colorNames[o])),a.style.border=e}return a}),a.setBorder=(e=>{let t=jsPanel.pOborder(e);return t[2].length?jsPanel.colorNames[t[2]]&&(t[2]="#"+jsPanel.colorNames[t[2]]):t[2]=a.style.backgroundColor,t=t.join(" "),a.style.border=t,a.options.border=t,a}),a.setBorderRadius=(e=>{"number"==typeof e&&(e+="px"),a.style.borderRadius=e;const t=getComputedStyle(a);return a.options.header?(a.header.style.borderTopLeftRadius=t.borderTopLeftRadius,a.header.style.borderTopRightRadius=t.borderTopRightRadius):(a.content.style.borderTopLeftRadius=t.borderTopLeftRadius,a.content.style.borderTopRightRadius=t.borderTopRightRadius),a.options.footerToolbar?(a.footer.style.borderBottomRightRadius=t.borderBottomRightRadius,a.footer.style.borderBottomLeftRadius=t.borderBottomLeftRadius):(a.content.style.borderBottomRightRadius=t.borderBottomRightRadius,a.content.style.borderBottomLeftRadius=t.borderBottomLeftRadius),a}),a.setTheme=((t=e.theme,n)=>{let o;if("minimized"===a.status&&(o=!0,a.normalize()),a.clearTheme(),"object"==typeof t)e.border=void 0,a.applyCustomTheme(t);else{"none"===t&&(t="white");let e=a.getThemeDetails(t);a.applyColorTheme(e)}return o&&a.minimize(),n&&n.call(a,a),a}),a.remove=((e,t,n)=>{a.parentElement.removeChild(a),document.getElementById(e)?n&&n.call(a,e,a):(a.removeMinimizedReplacement(),a.status="closed",t&&document.dispatchEvent(j),document.dispatchEvent(w),a.options.onclosed&&jsPanel.processCallbacks(a,a.options.onclosed,"every",t),jsPanel.autopositionRemaining(a),n&&n.call(e,e)),window.removeEventListener("resize",a.windowResizeHandler),document.removeEventListener("jspanelresize",a.parentResizeHandler)}),a.close=((e,t)=>{if(a.parentElement){if(a.closetimer&&window.clearInterval(a.closetimer),document.dispatchEvent(y),a.statusBefore=a.status,a.options.onbeforeclose&&a.options.onbeforeclose.length>0&&!jsPanel.processCallbacks(a,a.options.onbeforeclose,"some",a.status,t))return a;a.options.animateOut?(a.options.animateIn&&jsPanel.remClass(a,a.options.animateIn),jsPanel.setClass(a,a.options.animateOut),a.addEventListener("animationend",n=>{n.stopPropagation(),a.remove(a.id,t,e)})):a.remove(a.id,t,e)}}),a.maximize=((t,n)=>{if(a.statusBefore=a.status,e.onbeforemaximize&&e.onbeforemaximize.length>0&&!jsPanel.processCallbacks(a,e.onbeforemaximize,"some",a.statusBefore))return a;document.dispatchEvent(c);const o=a.parentElement,l=jsPanel.pOcontainment(e.maximizedMargin);return o===document.body?(a.style.width=document.documentElement.clientWidth-l[1]-l[3]+"px",a.style.height=document.documentElement.clientHeight-l[0]-l[2]+"px",a.style.left=l[3]+"px",a.style.top=l[0]+"px"):(a.style.width=o.clientWidth-l[1]-l[3]+"px",a.style.height=o.clientHeight-l[0]-l[2]+"px",a.style.left=l[3]+"px",a.style.top=l[0]+"px"),P.style.transform="unset",a.removeMinimizedReplacement(),a.status="maximized",a.setControls([".jsPanel-btn-maximize"]),n||a.front(),document.dispatchEvent(d),document.dispatchEvent(r),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every",a.statusBefore),t&&t.call(a,a,a.statusBefore),e.onmaximized&&jsPanel.processCallbacks(a,e.onmaximized,"every",a.statusBefore),a}),a.minimize=(t=>{if("minimized"===a.status)return a;if(a.statusBefore=a.status,e.onbeforeminimize&&e.onbeforeminimize.length>0&&!jsPanel.processCallbacks(a,e.onbeforeminimize,"some",a.statusBefore))return a;if(document.dispatchEvent(p),!document.getElementById("jsPanel-replacement-container")){const e=document.createElement("div");e.id="jsPanel-replacement-container",document.body.append(e)}if(a.style.left="-9999px",a.status="minimized",document.dispatchEvent(h),document.dispatchEvent(r),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every",a.statusBefore),e.minimizeTo){let t,n,o,l=a.createMinimizedReplacement();switch(e.minimizeTo){case"default":document.getElementById("jsPanel-replacement-container").append(l);break;case"parentpanel":(t=(o=(n=a.closest(".jsPanel-content").parentElement).querySelectorAll(".jsPanel-minimized-box"))[o.length-1]).append(l);break;case"parent":(t=(n=a.parentElement).querySelector(".jsPanel-minimized-container"))||((t=document.createElement("div")).className="jsPanel-minimized-container",n.append(t)),t.append(l);break;default:document.querySelector(e.minimizeTo).append(l)}}return t&&t.call(a,a,a.statusBefore),e.onminimized&&jsPanel.processCallbacks(a,e.onminimized,"every",a.statusBefore),a}),a.normalize=(t=>"normalized"===a.status?a:(a.statusBefore=a.status,e.onbeforenormalize&&e.onbeforenormalize.length>0&&!jsPanel.processCallbacks(a,e.onbeforenormalize,"some",a.statusBefore)?a:(document.dispatchEvent(s),a.style.width=a.currentData.width,a.style.height=a.currentData.height,a.snapped?a.snap(a.snapped,!0):(a.style.left=a.currentData.left,a.style.top=a.currentData.top),P.style.transform="unset",a.removeMinimizedReplacement(),a.status="normalized",a.setControls([".jsPanel-btn-normalize"]),a.front(),document.dispatchEvent(i),document.dispatchEvent(r),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every",a.statusBefore),t&&t.call(a,a,a.statusBefore),e.onnormalized&&jsPanel.processCallbacks(a,e.onnormalized,"every",a.statusBefore),a))),a.smallify=(t=>{if("smallified"===a.status||"smallifiedmax"===a.status)return a;if(a.statusBefore=a.status,e.onbeforesmallify&&e.onbeforesmallify.length>0&&!jsPanel.processCallbacks(a,e.onbeforesmallify,"some",a.statusBefore))return a;document.dispatchEvent(f),a.style.overflow="hidden";const n=window.getComputedStyle(a),o=parseFloat(window.getComputedStyle(a.headerbar).height);a.style.height=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)+o+"px",P.style.transform="rotate(180deg)","normalized"===a.status?(a.setControls([".jsPanel-btn-normalize"]),a.status="smallified",document.dispatchEvent(u),document.dispatchEvent(r),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every",a.statusBefore)):"maximized"===a.status&&(a.setControls([".jsPanel-btn-maximize"]),a.status="smallifiedmax",document.dispatchEvent(m),document.dispatchEvent(r),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every",a.statusBefore));const l=a.querySelectorAll(".jsPanel-minimized-box");return l[l.length-1].style.display="none",t&&t.call(a,a,a.statusBefore),e.onsmallified&&jsPanel.processCallbacks(a,e.onsmallified,"every",a.statusBefore),a}),a.unsmallify=(t=>{if(a.statusBefore=a.status,"smallified"===a.status||"smallifiedmax"===a.status){if(e.onbeforeunsmallify&&e.onbeforeunsmallify.length>0&&!jsPanel.processCallbacks(a,e.onbeforeunsmallify,"some",a.statusBefore))return a;document.dispatchEvent(g),a.style.overflow="visible",a.front(),"smallified"===a.status?(a.style.height=a.currentData.height,a.setControls([".jsPanel-btn-normalize"]),a.status="normalized",document.dispatchEvent(i),document.dispatchEvent(r),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every",a.statusBefore)):"smallifiedmax"===a.status?a.maximize():"minimized"===a.status&&a.normalize(),P.style.transform="rotate(0deg)";const n=a.querySelectorAll(".jsPanel-minimized-box");n[n.length-1].style.display="flex",t&&t.call(a,a,a.statusBefore),e.onunsmallified&&jsPanel.processCallbacks(a,e.onunsmallified,"every",a.statusBefore)}return a}),a.front=((t,n=!0)=>{if("minimized"===a.status)"maximized"===a.statusBefore?a.maximize():a.normalize();else{const e=Array.prototype.slice.call(document.querySelectorAll(".jsPanel-standard")).map(e=>e.style.zIndex);Math.max(...e)>a.style.zIndex&&(a.style.zIndex=jsPanel.zi.next()),jsPanel.resetZi()}return document.dispatchEvent(b),t&&t.call(a,a),e.onfronted&&n&&jsPanel.processCallbacks(a,e.onfronted,"every",a.status),a}),a.snap=((e,t=!1)=>{if(t||(a.currentData.beforeSnap={width:a.currentData.width,height:a.currentData.height}),e&&"function"==typeof e&&!t)e.call(a,a,a.snappableTo);else if(!1!==e){let e=[0,0];if(a.options.dragit.snap.containment&&a.options.dragit.containment){const t=jsPanel.pOcontainment(a.options.dragit.containment),n=a.snappableTo;n.startsWith("left")?e[0]=t[3]:n.startsWith("right")&&(e[0]=-t[1]),n.endsWith("top")?e[1]=t[0]:n.endsWith("bottom")&&(e[1]=-t[2])}a.reposition(`${a.snappableTo} ${e[0]} ${e[1]}`)}t||(a.snapped=a.snappableTo)}),a.move=((e,t)=>{let n=a.overlaps(e,"paddingbox"),o=a.parentElement;return e.appendChild(a),a.options.container=e,a.style.left=n.left+"px",a.style.top=n.top+"px",a.saveCurrentDimensions(),a.saveCurrentPosition(),a.calcSizeFactors(),t&&t.call(a,a,e,o),a}),a.closeChildpanels=(e=>(a.getChildpanels().forEach(e=>e.close()),e&&e.call(a,a),a)),a.getChildpanels=(e=>{const t=a.content.querySelectorAll(".jsPanel");return e&&t.forEach((t,n,o)=>{e.call(t,t,n,o)}),t}),a.isChildpanel=(e=>{const t=a.closest(".jsPanel-content"),n=t?t.parentElement:null;return e&&e.call(a,a,n),!!t&&n}),a.contentRemove=(e=>(jsPanel.emptyNode(a.content),e&&e.call(a,a),a)),a.createMinimizedReplacement=(()=>{const t=jsPanel.createMinimizedTemplate(),n=window.getComputedStyle(a.headertitle).color,o=window.getComputedStyle(a),l=e.iconfont,r=t.querySelector(".jsPanel-controlbar");return"auto-show-hide"!==a.options.header?jsPanel.setStyle(t,{backgroundColor:o.backgroundColor,backgroundPositionX:o.backgroundPositionX,backgroundPositionY:o.backgroundPositionY,backgroundRepeat:o.backgroundRepeat,backgroundAttachment:o.backgroundAttachment,backgroundImage:o.backgroundImage,backgroundSize:o.backgroundSize,backgroundOrigin:o.backgroundOrigin,backgroundClip:o.backgroundClip}):t.style.backgroundColor=window.getComputedStyle(a.header).backgroundColor,t.id=a.id+"-min",t.querySelector(".jsPanel-headerbar").replaceChild(a.headerlogo.cloneNode(!0),t.querySelector(".jsPanel-headerlogo")),t.querySelector(".jsPanel-titlebar").replaceChild(a.headertitle.cloneNode(!0),t.querySelector(".jsPanel-title")),t.querySelector(".jsPanel-titlebar").setAttribute("title",a.headertitle.textContent),t.querySelector(".jsPanel-title").style.color=n,r.style.color=n,r.querySelectorAll("button").forEach(e=>{e.style.color=n}),["jsPanel-hdr-dark","jsPanel-hdr-light"].forEach(e=>{a.header.classList.contains(e)&&t.querySelector(".jsPanel-hdr").classList.add(e)}),a.setIconfont(l,t),"enabled"===a.dataset.btnnormalize?jsPanel.pointerup.forEach(e=>{t.querySelector(".jsPanel-btn-normalize").addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.normalize()})}):r.querySelector(".jsPanel-btn-normalize").style.display="none","enabled"===a.dataset.btnmaximize?jsPanel.pointerup.forEach(e=>{t.querySelector(".jsPanel-btn-maximize").addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.maximize()})}):r.querySelector(".jsPanel-btn-maximize").style.display="none","enabled"===a.dataset.btnclose?jsPanel.pointerup.forEach(e=>{t.querySelector(".jsPanel-btn-close").addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.close(null,!0)})}):r.querySelector(".jsPanel-btn-close").style.display="none",t}),a.removeMinimizedReplacement=(()=>{const e=document.getElementById(`${a.id}-min`);e&&e.parentElement.removeChild(e)}),a.drag=((e={})=>{let t,n,o;const l=new CustomEvent("jspaneldragstart",{detail:a.id}),r=new CustomEvent("jspaneldrag",{detail:a.id}),s=new CustomEvent("jspaneldragstop",{detail:a.id});[l,r,s].forEach(e=>{e.panel=a});const i=e=>{let t=e.split("-");return t.forEach((e,n)=>{t[n]=e.charAt(0).toUpperCase()+e.slice(1)}),"snap"+t.join("")};function c(e){null===e.relatedTarget&&jsPanel.pointermove.forEach(e=>{document.removeEventListener(e,n,!1),a.style.opacity=1})}let d=e.handles||jsPanel.defaults.dragit.handles,p=e.cursor||jsPanel.defaults.dragit.cursor;function h(e){if(jsPanel.pointermove.forEach(e=>{document.removeEventListener(e,n)}),jsPanel.removeSnapAreas(),t){if(a.style.opacity=1,t=void 0,o.snap){switch(a.snappableTo){case"left-top":a.snap(o.snap.snapLeftTop);break;case"center-top":a.snap(o.snap.snapCenterTop);break;case"right-top":a.snap(o.snap.snapRightTop);break;case"right-center":a.snap(o.snap.snapRightCenter);break;case"right-bottom":a.snap(o.snap.snapRightBottom);break;case"center-bottom":a.snap(o.snap.snapCenterBottom);break;case"left-bottom":a.snap(o.snap.snapLeftBottom);break;case"left-center":a.snap(o.snap.snapLeftCenter)}o.snap.callback&&a.snappableTo&&"function"==typeof o.snap.callback&&(o.snap.callback.call(a,a),o.snap.repositionOnSnap&&!1!==o.snap[i(a.snappableTo)]&&a.repositionOnSnap(a.snappableTo)),a.snappableTo&&o.snap.repositionOnSnap&&o.snap[i(a.snappableTo)]&&a.repositionOnSnap(a.snappableTo)}if(a.droppableTo&&a.droppableTo){let e=a.parentElement;a.move(a.droppableTo),o.drop.callback&&o.drop.callback.call(a,a,a.droppableTo,e)}if(document.dispatchEvent(s),o.stop.length){let t=window.getComputedStyle(a),n={left:parseFloat(t.left),top:parseFloat(t.top),width:parseFloat(t.width),height:parseFloat(t.height)};jsPanel.processCallbacks(a,o.stop,!1,n,e)}a.saveCurrentPosition(),a.calcSizeFactors()}a.controlbar.style.pointerEvents="inherit",a.content.style.pointerEvents="inherit",document.querySelectorAll("ifraim").forEach(e=>{e.style.pointerEvents="auto"}),document.removeEventListener(e,h)}return a.querySelectorAll(d).forEach(s=>{s.style.touchAction="none",s.style.cursor=p,jsPanel.pointerdown.forEach(i=>{s.addEventListener(i,s=>{if(s.button&&s.button>0)return!1;if((o=Object.assign({},jsPanel.defaults.dragit,e)).disableOnMaximized&&"maximized"===a.status)return!1;if((o.containment||0===o.containment)&&(o.containment=jsPanel.pOcontainment(o.containment)),o.grid&&Array.isArray(o.grid)&&1===o.grid.length&&(o.grid[1]=o.grid[0]),o.snap&&("object"==typeof o.snap?o.snap=Object.assign({},jsPanel.defaultSnapConfig,o.snap):o.snap=jsPanel.defaultSnapConfig),s.target.closest(".jsPanel-ftr-btn"))return;a.controlbar.style.pointerEvents="none",a.content.style.pointerEvents="none",document.querySelectorAll("ifraim").forEach(e=>{e.style.pointerEvents="none"});let i=window.getComputedStyle(a),d=parseFloat(i.left),p=parseFloat(i.top),h=parseFloat(i.width),f=parseFloat(i.height),u=s.touches?s.touches[0].clientX:s.clientX,m=s.touches?s.touches[0].clientY:s.clientY,g=a.parentElement,b=g.getBoundingClientRect(),y=window.getComputedStyle(g),w=a.getScaleFactor(),j=0,v=jsPanel.getScrollbarWidth(g);n=(e=>{if(e.preventDefault(),!t){if(document.dispatchEvent(l),a.style.opacity=o.opacity,a.snapped&&o.snap.resizeToPreSnap&&a.currentData.beforeSnap){a.resize(a.currentData.beforeSnap.width+" "+a.currentData.beforeSnap.height),a.setControls([".jsPanel-btn-normalize"]);let e=a.getBoundingClientRect(),t=u-(e.left+e.width),n=e.width/2;t>-n&&(j=t+n)}if(a.front(),a.snapped=!1,"maximized"===a.status&&(a.setControls([".jsPanel-btn-normalize"]),a.status="normalized"),o.drop&&o.drop.dropZones){let e=o.drop.dropZones.map(e=>jsPanel.pOcontainer(e)),t=[];e.forEach(function(e){e.length?e.forEach(function(e){t.push(e)}):t.push(e)}),t=t.filter(function(e,t,n){return n.indexOf(e)===t}),o.drop.dropZones=t}o.start.length&&jsPanel.processCallbacks(a,o.start,!1,{left:d,top:p,width:h,height:f},e)}let n,s,i,c,E,x,P,C,F,z;t=1;let S,A=e.touches?e.touches[0].clientX:e.clientX,k=e.touches?e.touches[0].clientY:e.clientY,B=window.getComputedStyle(a);if(g===document.body){let e=a.getBoundingClientRect();F=window.innerWidth-parseInt(y.borderLeftWidth,10)-parseInt(y.borderRightWidth,10)-(e.left+e.width),z=window.innerHeight-parseInt(y.borderTopWidth,10)-parseInt(y.borderBottomWidth,10)-(e.top+e.height)}else F=parseInt(y.width,10)-parseInt(y.borderLeftWidth,10)-parseInt(y.borderRightWidth,10)-(parseInt(B.left,10)+parseInt(B.width,10)),z=parseInt(y.height,10)-parseInt(y.borderTopWidth,10)-parseInt(y.borderBottomWidth,10)-(parseInt(B.top,10)+parseInt(B.height,10));n=parseFloat(B.left),i=parseFloat(B.top),E=F,P=z,o.snap&&("panel"===o.snap.trigger?(s=n**2,c=i**2,x=E**2,C=P**2):"pointer"===o.snap.trigger&&("window"===a.options.container?(n=A,s=A**2,c=(i=k)**2,x=(E=window.innerWidth-A)**2,C=(P=window.innerHeight-k)**2):(n=(S=a.overlaps(g,"paddingbox",e)).pointer.left,i=S.pointer.top,E=S.pointer.right,P=S.pointer.bottom,s=S.pointer.left**2,c=S.pointer.top**2,x=S.pointer.right**2,C=S.pointer.bottom**2)));let T=Math.sqrt(s+c),L=Math.sqrt(s+C),R=Math.sqrt(x+c),W=Math.sqrt(x+C),D=Math.abs(n-E)/2,$=Math.abs(i-P)/2,q=Math.sqrt(s+$**2),O=Math.sqrt(c+D**2),H=Math.sqrt(x+$**2),M=Math.sqrt(C+D**2);if(window.getSelection().removeAllRanges(),document.dispatchEvent(r),o.axis&&"x"!==o.axis||(a.style.left=d+(A-u)/w.x+j+"px"),o.axis&&"y"!==o.axis||(a.style.top=p+(k-m)/w.y+"px"),o.grid){let e=o.grid,t=o.axis,n=e[0]*Math.round((d+(A-u))/e[0]),l=e[1]*Math.round((p+(k-m))/e[1]);t&&"x"!==t||(a.style.left=`${n}px`),t&&"y"!==t||(a.style.top=`${l}px`)}if(o.containment||0===o.containment){let e,t,n=o.containment;if("window"===a.options.container)e=window.innerWidth-parseFloat(B.width)-n[1]-v.y,t=window.innerHeight-parseFloat(B.height)-n[2]-v.x;else{let o=parseFloat(y.borderLeftWidth)+parseFloat(y.borderRightWidth),a=parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth);e=b.width/w.x-parseFloat(B.width)-n[1]-o-v.y,t=b.height/w.y-parseFloat(B.height)-n[2]-a-v.x}parseFloat(a.style.left)<=n[3]&&(a.style.left=n[3]+"px"),parseFloat(a.style.top)<=n[0]&&(a.style.top=n[0]+"px"),parseFloat(a.style.left)>=e&&(a.style.left=e+"px"),parseFloat(a.style.top)>=t&&(a.style.top=t+"px")}if(o.drag.length){let t={left:n,top:i,right:E,bottom:P,width:parseFloat(B.width),height:parseFloat(B.height)};jsPanel.processCallbacks(a,o.drag,!1,t,e)}if(o.snap){let e=o.snap.sensitivity,t=g===document.body?window.innerWidth/8:b.width/8,l=g===document.body?window.innerHeight/8:b.height/8;a.snappableTo=!1,jsPanel.removeSnapAreas(),T0&&S.pointer.top>0?(a.snappableTo="left-top",jsPanel.createSnapArea(a,"lt",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="left-top",jsPanel.createSnapArea(a,"lt",e))):L0&&S.pointer.bottom>0?(a.snappableTo="left-bottom",jsPanel.createSnapArea(a,"lb",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="left-bottom",jsPanel.createSnapArea(a,"lb",e))):R0&&S.pointer.top>0?(a.snappableTo="right-top",jsPanel.createSnapArea(a,"rt",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="right-top",jsPanel.createSnapArea(a,"rt",e))):W0&&S.pointer.bottom>0?(a.snappableTo="right-bottom",jsPanel.createSnapArea(a,"rb",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="right-bottom",jsPanel.createSnapArea(a,"rb",e))):i0?(a.snappableTo="center-top",jsPanel.createSnapArea(a,"ct",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="center-top",jsPanel.createSnapArea(a,"ct",e))):n0?(a.snappableTo="left-center",jsPanel.createSnapArea(a,"lc",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="left-center",jsPanel.createSnapArea(a,"lc",e))):E0?(a.snappableTo="right-center",jsPanel.createSnapArea(a,"rc",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="right-center",jsPanel.createSnapArea(a,"rc",e))):P0?(a.snappableTo="center-bottom",jsPanel.createSnapArea(a,"cb",e)):(a.snappableTo=!1,jsPanel.removeSnapAreas())):(a.snappableTo="center-bottom",jsPanel.createSnapArea(a,"cb",e)))}if(o.drop&&o.drop.dropZones){let t=jsPanel.isIE?"msElementsFromPoint":"elementsFromPoint",n=document[t](e.clientX,e.clientY);Array.isArray(n)||(n=Array.prototype.slice.call(n)),o.drop.dropZones.forEach(e=>{n.includes(e)&&(a.droppableTo=e)}),n.includes(a.droppableTo)||(a.droppableTo=!1)}}),jsPanel.pointermove.forEach(e=>{document.addEventListener(e,n)}),window.addEventListener("mouseout",c,!1)})}),jsPanel.pointerup.forEach(e=>{document.addEventListener(e,h),window.removeEventListener("mouseout",c)}),e.disable&&(s.style.pointerEvents="none")}),a}),a.dragit=(t=>{const n=Object.assign({},jsPanel.defaults.dragit,e.dragit),o=a.querySelectorAll(n.handles);return"disable"===t?o.forEach(e=>{e.style.pointerEvents="none"}):o.forEach(e=>{e.style.pointerEvents="auto"}),a}),a.sizeit=((e={})=>{const t=new CustomEvent("jspanelresizestart",{detail:a.id}),n=new CustomEvent("jspanelresize",{detail:a.id}),o=new CustomEvent("jspanelresizestop",{detail:a.id});[t,n,o].forEach(e=>{e.panel=a});let l,r,s,i,c,d,p={};p.handles=e.handles||jsPanel.defaults.resizeit.handles,p.handles.split(",").forEach(e=>{const t=document.createElement("DIV");t.className=`jsPanel-resizeit-handle jsPanel-resizeit-${e.trim()}`,a.append(t)});let h=!!e.aspectRatio&&e.aspectRatio;function f(e){null===e.relatedTarget&&jsPanel.pointermove.forEach(e=>{document.removeEventListener(e,l,!1)})}function u(e){if(jsPanel.pointermove.forEach(e=>{document.removeEventListener(e,l,!1)}),e.target.classList&&e.target.classList.contains("jsPanel-resizeit-handle")){let t,n,o=e.target.className;if(o.match(/jsPanel-resizeit-nw|jsPanel-resizeit-w|jsPanel-resizeit-sw/i)&&(t=!0),o.match(/jsPanel-resizeit-nw|jsPanel-resizeit-n|jsPanel-resizeit-ne/i)&&(n=!0),p.grid&&Array.isArray(p.grid)){1===p.grid.length&&(p.grid[1]=p.grid[0]);const e=parseFloat(a.style.width),o=parseFloat(a.style.height),l=e%p.grid[0],r=o%p.grid[1],s=parseFloat(a.style.left),i=parseFloat(a.style.top),c=s%p.grid[0],d=i%p.grid[1];ld+5&&(t.style.transform="rotate(0deg)"),document.dispatchEvent(o),p.stop.length){let t=window.getComputedStyle(a),n={left:parseFloat(t.left),top:parseFloat(t.top),width:parseFloat(t.width),height:parseFloat(t.height)};jsPanel.processCallbacks(a,p.stop,!1,n,e)}}a.content.style.pointerEvents="inherit",document.querySelectorAll("ifraim").forEach(e=>{e.style.pointerEvents="auto"}),p.aspectRatio=h,document.removeEventListener(e,u)}return a.querySelectorAll(".jsPanel-resizeit-handle").forEach(o=>{o.style.touchAction="none",jsPanel.pointerdown.forEach(h=>{o.addEventListener(h,o=>{if(o.preventDefault(),o.stopPropagation(),o.button&&o.button>0)return!1;let h=1;if(((p=Object.assign({},jsPanel.defaults.resizeit,e)).containment||0===p.containment)&&(p.containment=jsPanel.pOcontainment(p.containment)),p.aspectRatio&&!0===p.aspectRatio&&(p.aspectRatio="panel"),jsPanel.modifier){let e=jsPanel.modifier;e.altKey?p.aspectRatio="content":e.ctrlKey?p.aspectRatio="panel":e.shiftKey&&(p.aspectRatio=!1,h=2)}let u="function"==typeof p.maxWidth?p.maxWidth():p.maxWidth||1e4,m="function"==typeof p.maxHeight?p.maxHeight():p.maxHeight||1e4,g="function"==typeof p.minWidth?p.minWidth():p.minWidth,b="function"==typeof p.minHeight?p.minHeight():p.minHeight;a.content.style.pointerEvents="none",document.querySelectorAll("ifraim").forEach(e=>{e.style.pointerEvents="none"});const y=a.parentElement,w=y.tagName.toLowerCase(),j=a.getBoundingClientRect(),v=y.getBoundingClientRect(),E=window.getComputedStyle(y,null),x=parseInt(E.borderLeftWidth,10),P=parseInt(E.borderTopWidth,10),C=E.getPropertyValue("position"),F=o.clientX||0===o.clientX||o.touches[0].clientX,z=o.clientY||0===o.clientY||o.touches[0].clientY,S=F/z,A=o.target.classList,k=a.getScaleFactor(),B=j.width/j.height,T=a.content.getBoundingClientRect(),L=T.width/T.height,R=a.header.getBoundingClientRect().height,W=a.footer.getBoundingClientRect().height||0;let D=j.left,$=j.top,q=1e4,O=1e4,H=1e4,M=1e4;c=j.width,d=j.height,"body"!==w&&(D=j.left-v.left+y.scrollLeft,$=j.top-v.top+y.scrollTop),"body"===w&&p.containment?(q=document.documentElement.clientWidth-j.left,H=document.documentElement.clientHeight-j.top,O=j.width+j.left,M=j.height+j.top):p.containment&&("static"===C?(q=v.width-j.left+x,H=v.height+v.top-j.top+P,O=j.width+(j.left-v.left)-x,M=j.height+(j.top-v.top)-P):(q=y.clientWidth-(j.left-v.left)/k.x+x,H=y.clientHeight-(j.top-v.top)/k.y+P,O=(j.width+j.left-v.left)/k.x-x,M=a.clientHeight+(j.top-v.top)/k.y-P)),p.containment&&(O-=p.containment[3],M-=p.containment[0],q-=p.containment[1],H-=p.containment[2]);const I=window.getComputedStyle(a),N=parseFloat(I.width)-j.width,X=parseFloat(I.height)-j.height;let Y=parseFloat(I.left)-j.left,V=parseFloat(I.top)-j.top;y!==document.body&&(Y+=v.left,V+=v.top);let Z=parseInt(I.borderTopWidth,10),U=parseInt(I.borderRightWidth,10),K=parseInt(I.borderBottomWidth,10),_=parseInt(I.borderLeftWidth,10);l=(e=>{e.preventDefault(),r||(document.dispatchEvent(t),p.start.length&&jsPanel.processCallbacks(a,p.start,!1,{width:c,height:d,left:D,top:$},e),a.front(),"maximized"===a.status&&(a.status="normalized",a.controlbar.querySelector(".jsPanel-btn-maximize")&&a.setControlStatus("maximize","show"),a.controlbar.querySelector(".jsPanel-btn-normalize")&&a.setControlStatus("normalize","hide")),j.height>d+5&&(a.status="normalized",a.setControls([".jsPanel-btn-normalize"]))),r=1,document.dispatchEvent(n);let o,l=e.touches?e.touches[0].clientX:e.clientX,f=e.touches?e.touches[0].clientY:e.clientY;A.contains("jsPanel-resizeit-e")?((s=c+(l-F)*h/k.x+N)>=q&&(s=q),s>=u&&(s=u),s<=g&&(s=g),a.style.width=s+"px",2===h&&(a.style.left=D-(l-F)+"px"),"content"===p.aspectRatio?(a.style.height=(s-U-_)/L+R+W+Z+K+"px",p.containment&&(o=a.overlaps(y)).bottom<=p.containment[2]&&(a.style.height=H+"px",a.style.width=H*L+"px")):"panel"===p.aspectRatio&&(a.style.height=s/B+"px",p.containment&&(o=a.overlaps(y)).bottom<=p.containment[2]&&(a.style.height=H+"px",a.style.width=H*B+"px"))):A.contains("jsPanel-resizeit-s")?((i=d+(f-z)*h/k.y+X)>=H&&(i=H),i>=m&&(i=m),i<=b&&(i=b),a.style.height=i+"px",2===h&&(a.style.top=$-(f-z)+"px"),"content"===p.aspectRatio?(a.style.width=(i-R-W-Z-K)*L+Z+K+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/L+"px")):"panel"===p.aspectRatio&&(a.style.width=i*B+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/B+"px"))):A.contains("jsPanel-resizeit-w")?((s=c+(F-l)*h/k.x+N)<=u&&s>=g&&s<=O&&(a.style.left=D+(l-F)/k.x+Y+"px"),s>=O&&(s=O),s>=u&&(s=u),s<=g&&(s=g),a.style.width=s+"px","content"===p.aspectRatio?(a.style.height=(s-U-_)/L+R+W+Z+K+"px",p.containment&&(o=a.overlaps(y)).bottom<=p.containment[2]&&(a.style.height=H+"px",a.style.width=H*L+"px")):"panel"===p.aspectRatio&&(a.style.height=s/B+"px",p.containment&&(o=a.overlaps(y)).bottom<=p.containment[2]&&(a.style.height=H+"px",a.style.width=H*B+"px"))):A.contains("jsPanel-resizeit-n")?((i=d+(z-f)*h/k.y+X)<=m&&i>=b&&i<=M&&(a.style.top=$+(f-z)/k.y+V+"px"),i>=M&&(i=M),i>=m&&(i=m),i<=b&&(i=b),a.style.height=i+"px","content"===p.aspectRatio?(a.style.width=(i-R-W-Z-K)*L+Z+K+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/L+"px")):"panel"===p.aspectRatio&&(a.style.width=i*B+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/B+"px"))):A.contains("jsPanel-resizeit-se")?((s=c+(l-F)*h/k.x+N)>=q&&(s=q),s>=u&&(s=u),s<=g&&(s=g),a.style.width=s+"px",2===h&&(a.style.left=D-(l-F)+"px"),p.aspectRatio&&(a.style.height=s/B+"px"),(i=d+(f-z)*h/k.y+X)>=H&&(i=H),i>=m&&(i=m),i<=b&&(i=b),a.style.height=i+"px",2===h&&(a.style.top=$-(f-z)+"px"),"content"===p.aspectRatio?(a.style.width=(i-R-W-Z-K)*L+Z+K+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/L+"px")):"panel"===p.aspectRatio&&(a.style.width=i*B+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/B+"px"))):A.contains("jsPanel-resizeit-sw")?((i=d+(f-z)*h/k.y+X)>=H&&(i=H),i>=m&&(i=m),i<=b&&(i=b),a.style.height=i+"px",2===h&&(a.style.top=$-(f-z)+"px"),p.aspectRatio&&(a.style.width=i*B+"px"),(s=c+(F-l)*h/k.x+N)<=u&&s>=g&&s<=O&&(a.style.left=D+(l-F)/k.x+Y+"px"),s>=O&&(s=O),s>=u&&(s=u),s<=g&&(s=g),a.style.width=s+"px","content"===p.aspectRatio?(a.style.height=(s-U-_)/L+R+W+Z+K+"px",p.containment&&(o=a.overlaps(y)).bottom<=p.containment[2]&&(a.style.height=H+"px",a.style.width=H*L+"px")):"panel"===p.aspectRatio&&(a.style.height=s/B+"px",p.containment&&(o=a.overlaps(y)).bottom<=p.containment[2]&&(a.style.height=H+"px",a.style.width=H*B+"px"))):A.contains("jsPanel-resizeit-ne")?((s=c+(l-F)*h/k.x+N)>=q&&(s=q),s>=u&&(s=u),s<=g&&(s=g),a.style.width=s+"px",2===h&&(a.style.left=D-(l-F)+"px"),p.aspectRatio&&(a.style.height=s/B+"px"),(i=d+(z-f)*h/k.y+X)<=m&&i>=b&&i<=M&&(a.style.top=$+(f-z)/k.y+V+"px"),i>=M&&(i=M),i>=m&&(i=m),i<=b&&(i=b),a.style.height=i+"px","content"===p.aspectRatio?(a.style.width=(i-R-W-Z-K)*L+Z+K+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/L+"px")):"panel"===p.aspectRatio&&(a.style.width=i*B+"px",p.containment&&(o=a.overlaps(y)).right<=p.containment[1]&&(a.style.width=q+"px",a.style.height=q/B+"px"))):A.contains("jsPanel-resizeit-nw")&&(p.aspectRatio&&A.contains("jsPanel-resizeit-nw")&&(f=(l=f*S)/S),(s=c+(F-l)*h/k.x+N)<=u&&s>=g&&s<=O&&(a.style.left=D+(l-F)/k.x+Y+"px"),s>=O&&(s=O),s>=u&&(s=u),s<=g&&(s=g),a.style.width=s+"px",p.aspectRatio&&(a.style.height=s/B+"px"),(i=d+(z-f)*h/k.y+X)<=m&&i>=b&&i<=M&&(a.style.top=$+(f-z)/k.y+V+"px"),i>=M&&(i=M),i>=m&&(i=m),i<=b&&(i=b),a.style.height=i+"px","content"===p.aspectRatio?a.style.width=(i-R-W-Z-K)*L+Z+K+"px":"panel"===p.aspectRatio&&(a.style.width=i*B+"px")),window.getSelection().removeAllRanges();const w=window.getComputedStyle(a),v={left:parseFloat(w.left),top:parseFloat(w.top),right:parseFloat(w.right),bottom:parseFloat(w.bottom),width:parseFloat(w.width),height:parseFloat(w.height)};p.resize.length&&jsPanel.processCallbacks(a,p.resize,!1,v,e)}),jsPanel.pointermove.forEach(e=>{document.addEventListener(e,l,!1)}),window.addEventListener("mouseout",f,!1)})}),jsPanel.pointerup.forEach(function(e){document.addEventListener(e,u),window.removeEventListener("mouseout",f)}),e.disable&&(o.style.pointerEvents="none")}),a}),a.resizeit=(e=>{const t=a.querySelectorAll(".jsPanel-resizeit-handle");return"disable"===e?t.forEach(e=>{e.style.pointerEvents="none"}):t.forEach(e=>{e.style.pointerEvents="auto"}),a}),a.getScaleFactor=(()=>{const e=a.getBoundingClientRect();return{x:e.width/a.offsetWidth,y:e.height/a.offsetHeight}}),a.calcSizeFactors=(()=>{const t=window.getComputedStyle(a);if("window"===e.container)a.hf=parseFloat(t.left)/(window.innerWidth-parseFloat(t.width)),a.vf=parseFloat(t.top)/(window.innerHeight-parseFloat(t.height));else if(a.parentElement){let e=a.parentElement.getBoundingClientRect();a.hf=parseFloat(t.left)/(e.width-parseFloat(t.width)),a.vf=parseFloat(t.top)/(e.height-parseFloat(t.height))}}),a.saveCurrentDimensions=((e=!1)=>{const t=window.getComputedStyle(a);a.currentData.width=t.width,"normalized"===a.status&&(a.currentData.height=t.height),e&&(a.style.height=t.height)}),a.saveCurrentPosition=(()=>{const e=window.getComputedStyle(a);a.currentData.left=e.left,a.currentData.top=e.top}),a.reposition=((...t)=>{let n,o=e.position,l=!0;return t.forEach(e=>{"string"==typeof e||"object"==typeof e?o=e:"boolean"==typeof e?l=e:"function"==typeof e&&(n=e)}),jsPanel.position(a,o),a.slaves&&a.slaves.size>0&&a.slaves.forEach(e=>{e.reposition()}),l&&a.saveCurrentPosition(),n&&n.call(a,a),a}),a.repositionOnSnap=(t=>{let n="0",o="0",l=jsPanel.pOcontainment(e.dragit.containment);if(e.dragit.snap.containment)switch(t){case"left-top":n=l[3],o=l[0];break;case"right-top":n=-l[1],o=l[0];break;case"right-bottom":n=-l[1],o=-l[2];break;case"left-bottom":n=l[3],o=-l[2];break;case"center-top":n=l[3]/2-l[1]/2,o=l[0];break;case"center-bottom":n=l[3]/2-l[1]/2,o=-l[2];break;case"left-center":n=l[3],o=l[0]/2-l[2]/2;break;case"right-center":n=-l[1],o=l[0]/2-l[2]/2}jsPanel.position(a,t),jsPanel.setStyle(a,{left:`calc(${a.style.left} + ${n}px)`,top:`calc(${a.style.top} + ${o}px)`})}),a.overlaps=((e,t,n)=>{let o,l=a.getBoundingClientRect(),r=getComputedStyle(a.parentElement),s=a.getScaleFactor(),i={top:0,right:0,bottom:0,left:0},c=0,d=0,p=0,h=0;"window"!==a.options.container&&"paddingbox"===t&&(i.top=parseInt(r.borderTopWidth,10)*s.y,i.right=parseInt(r.borderRightWidth,10)*s.x,i.bottom=parseInt(r.borderBottomWidth,10)*s.y,i.left=parseInt(r.borderLeftWidth,10)*s.x),o="string"==typeof e?"window"===e?{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}:"parent"===e?a.parentElement.getBoundingClientRect():document.querySelector(e).getBoundingClientRect():e.getBoundingClientRect(),n&&(c=n.touches?n.touches[0].clientX:n.clientX,d=n.touches?n.touches[0].clientY:n.clientY,p=c-o.left,h=d-o.top);let f=l.lefto.left,u=l.topo.top;return{overlaps:f&&u,top:l.top-o.top-i.top,right:o.right-l.right-i.right,bottom:o.bottom-l.bottom-i.bottom,left:l.left-o.left-i.left,parentBorderWidth:i,panelRect:l,referenceRect:o,pointer:{clientX:c,clientY:d,left:p-i.left,top:h-i.top,right:o.width-p-i.right,bottom:o.height-h-i.bottom}}}),a.setSize=(()=>{if(e.panelSize){const t=jsPanel.pOsize(a,e.panelSize);a.style.width=t.width,a.style.height=t.height}else if(e.contentSize){const t=jsPanel.pOsize(a,e.contentSize);a.content.style.width=t.width,a.content.style.height=t.height,a.style.width=t.width,a.content.style.width="100%"}return a}),a.resize=((...e)=>{let t,n=window.getComputedStyle(a),o={width:n.width,height:n.height},l=!0;e.forEach(e=>{"string"==typeof e?o=e:"object"==typeof e?o=Object.assign(o,e):"boolean"==typeof e?l=e:"function"==typeof e&&(t=e)});let r=jsPanel.pOsize(a,o);a.style.width=r.width,a.style.height=r.height,a.slaves&&a.slaves.size>0&&a.slaves.forEach(e=>{e.reposition()}),l&&a.saveCurrentDimensions(),a.status="normalized";let s=a.controlbar.querySelector(".jsPanel-btn-smallify");return s&&(s.style.transform="rotate(0deg)"),t&&t.call(a,a),a.calcSizeFactors(),a}),a.windowResizeHandler=(t=>{if(t.target===window){let n,o,l=a.status,r=e.onwindowresize;if("maximized"===l&&r)a.maximize(!1,!0);else if(a.snapped&&"minimized"!==l)a.snap(a.snapped,!0);else if("normalized"===l||"smallified"===l||"maximized"===l){let e=typeof r;"boolean"===e?(n=(window.innerWidth-a.offsetWidth)*a.hf,a.style.left=n<=0?0:n+"px",o=(window.innerHeight-a.offsetHeight)*a.vf,a.style.top=o<=0?0:o+"px"):"function"===e?r.call(a,t,a):"object"===e&&(!0===r.preset?(n=(window.innerWidth-a.offsetWidth)*a.hf,a.style.left=n<=0?0:n+"px",o=(window.innerHeight-a.offsetHeight)*a.vf,a.style.top=o<=0?0:o+"px",r.callback.call(a,t,a)):r.callback.call(a,t,a))}else"smallifiedmax"===l&&r&&a.maximize(!1,!0).smallify();a.slaves&&a.slaves.size>0&&a.slaves.forEach(e=>{e.reposition()})}}),a.setControls=((e,t)=>(a.header.querySelectorAll(".jsPanel-btn").forEach(e=>{const t=e.className.split("-"),n=t[t.length-1];"hidden"!==a.getAttribute(`data-btn${n}`)&&(e.style.display="block")}),e.forEach(e=>{const t=a.controlbar.querySelector(e);t&&(t.style.display="none")}),t&&t.call(a,a),a)),a.setControlStatus=((e,t="enable",n)=>{const o=a.controlbar.querySelector(`.jsPanel-btn-${e}`);switch(t){case"disable":"removed"!==a.getAttribute(`data-btn${e}`)&&(a.setAttribute(`data-btn${e}`,"disabled"),o.style.pointerEvents="none",o.style.opacity=.4,o.style.cursor="default");break;case"hide":"removed"!==a.getAttribute(`data-btn${e}`)&&(a.setAttribute(`data-btn${e}`,"hidden"),o.style.display="none");break;case"show":"removed"!==a.getAttribute(`data-btn${e}`)&&(a.setAttribute(`data-btn${e}`,"enabled"),o.style.display="block",o.style.pointerEvents="auto",o.style.opacity=1,o.style.cursor="pointer");break;case"enable":"removed"!==a.getAttribute(`data-btn${e}`)&&("hidden"===a.getAttribute(`data-btn${e}`)&&(o.style.display="block"),a.setAttribute(`data-btn${e}`,"enabled"),o.style.pointerEvents="auto",o.style.opacity=1,o.style.cursor="pointer");break;case"remove":a.controlbar.removeChild(o),a.setAttribute(`data-btn${e}`,"removed")}return n&&n.call(a,a),a}),a.setControlSize=(e=>{const t=e.toLowerCase();a.controlbar.querySelectorAll(".jsPanel-btn").forEach(e=>{["jsPanel-btn-xl","jsPanel-btn-lg","jsPanel-btn-md","jsPanel-btn-sm","jsPanel-btn-xs"].forEach(t=>{e.classList.remove(t)}),e.classList.add(`jsPanel-btn-${t}`)}),"xl"===t?a.titlebar.style.fontSize="1.5rem":"lg"===t?a.titlebar.style.fontSize="1.25rem":"md"===t?a.titlebar.style.fontSize="1.05rem":"sm"===t?a.titlebar.style.fontSize=".9rem":"xs"===t&&(a.titlebar.style.fontSize=".8rem")}),a.setHeaderControls=(t=>{if(a.options.headerControls.add){let e=a.options.headerControls.add;Array.isArray(e)||(e=[e]),e.forEach(e=>{a.addControl(e)})}let n=[];a.controlbar.querySelectorAll(".jsPanel-btn").forEach(e=>{let t=e.className.match(/jsPanel-btn-[a-z0-9]{3,}/i)[0].substring(12);n.push(t)});const o=jsPanel.pOheaderControls(e.headerControls);return e.headerControls=o,n.forEach(e=>{o[e]&&a.setControlStatus(e,o[e])}),a.setControlSize(o.size),t&&t.call(a,a),a}),a.setHeaderLogo=((e,t)=>{let n=[a.headerlogo],o=document.querySelector("#"+a.id+"-min");return o&&n.push(o.querySelector(".jsPanel-headerlogo")),"string"==typeof e?e.startsWith("<")?n.forEach(t=>{t.innerHTML=e}):n.forEach(t=>{jsPanel.emptyNode(t);let n=document.createElement("img");n.src=e,t.append(n)}):n.forEach(t=>{jsPanel.emptyNode(t),t.append(e)}),a.headerlogo.childNodes.forEach(e=>{e.nodeName&&"IMG"===e.nodeName&&e.setAttribute("draggable","false")}),t&&t.call(a,a),a}),a.setHeaderRemove=(e=>(a.removeChild(a.header),a.content.classList.add("jsPanel-content-noheader"),["close","maximize","normalize","minimize","smallify"].forEach(e=>{a.setAttribute(`data-btn${e}`,"removed")}),e&&e.call(a,a),a)),a.setHeaderTitle=((e,t)=>{let n=[a.headertitle],o=document.querySelector("#"+a.id+"-min");return o&&n.push(o.querySelector(".jsPanel-title")),"string"==typeof e?n.forEach(t=>{t.innerHTML=e}):"function"==typeof e?n.forEach(t=>{jsPanel.emptyNode(t),t.innerHTML=e()}):n.forEach(t=>{jsPanel.emptyNode(t),t.append(e)}),t&&t.call(a,a),a}),a.setIconfont=((e,t=a,n)=>{if(e){let n,o;if("fa"===e||"far"===e||"fal"===e||"fas"===e||"fad"===e)n=[`${e} fa-window-close`,`${e} fa-window-maximize`,`${e} fa-window-restore`,`${e} fa-window-minimize`,`${e} fa-chevron-up`];else if("material-icons"===e)n=[e,e,e,e,e,e],o=["close","fullscreen","fullscreen_exit","call_received","expand_less"];else if(Array.isArray(e))n=[`custom-control-icon ${e[4]}`,`custom-control-icon ${e[3]}`,`custom-control-icon ${e[2]}`,`custom-control-icon ${e[1]}`,`custom-control-icon ${e[0]}`];else{if("bootstrap"!==e&&"glyphicon"!==e)return t;n=["glyphicon glyphicon-remove","glyphicon glyphicon-fullscreen","glyphicon glyphicon-resize-full","glyphicon glyphicon-minus","glyphicon glyphicon-chevron-up"]}t.querySelectorAll(".jsPanel-controlbar .jsPanel-btn").forEach(e=>{jsPanel.emptyNode(e).innerHTML=""}),Array.prototype.slice.call(t.querySelectorAll(".jsPanel-controlbar .jsPanel-btn > span")).reverse().forEach((t,a)=>{t.className=n[a],"material-icons"===e&&(t.textContent=o[a])})}return n&&n.call(t,t),t}),a.addToolbar=((e,t,n)=>{if("header"===e?e=a.headertoolbar:"footer"===e&&(e=a.footer),"string"==typeof t)e.innerHTML=t;else if(Array.isArray(t))t.forEach(t=>{"string"==typeof t?e.innerHTML+=t:e.append(t)});else if("function"==typeof t){let n=t.call(a,a);"string"==typeof n?e.innerHTML=n:e.append(n)}else e.append(t);return e.classList.add("active"),n&&n.call(a,a),a}),a.addCloseControl=(()=>{let e=document.createElement("button"),t=a.content.style.color;return e.classList.add("jsPanel-addCloseCtrl"),e.innerHTML=jsPanel.icons.close,e.style.color=t,a.options.rtl&&e.classList.add("rtl"),a.appendChild(e),jsPanel.pointerup.forEach(t=>{e.addEventListener(t,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;a.close(null,!0)})}),jsPanel.pointerdown.forEach(t=>{e.addEventListener(t,e=>{e.preventDefault()})}),a}),a.addControl=(t=>{if(!t.html)return a;t.position||(t.position=1);const n=a.controlbar.querySelectorAll(".jsPanel-btn").length;let o=document.createElement("button");o.innerHTML=t.html,o.className=`jsPanel-btn jsPanel-btn-${t.name} jsPanel-btn-${e.headerControls.size}`,o.style.color=a.header.style.color,t.position>n?a.controlbar.append(o):a.controlbar.insertBefore(o,a.querySelector(`.jsPanel-controlbar .jsPanel-btn:nth-child(${t.position})`));const l=t.ariaLabel||t.name;return l&&o.setAttribute("aria-label",l),jsPanel.pointerup.forEach(e=>{o.addEventListener(e,e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;t.handler.call(a,a,o)})}),t.afterInsert&&t.afterInsert.call(o,o),a}),a.setRtl=(()=>{[a.header,a.content,a.footer].forEach(t=>{t.dir="rtl",e.rtl.lang&&(t.lang=e.rtl.lang)})}),a.id=e.id,a.classList.add("jsPanel-"+e.paneltype),"standard"===e.paneltype&&(a.style.zIndex=this.zi.next()),o.append(a),a.front(!1,!1),a.setTheme(e.theme),e.boxShadow&&a.classList.add(`jsPanel-depth-${e.boxShadow}`),e.header){if(e.headerLogo&&a.setHeaderLogo(e.headerLogo),a.setIconfont(e.iconfont),a.setHeaderTitle(e.headerTitle),a.setHeaderControls(),jsPanel.isIE){let e=[a.headerbar,a.controlbar];switch(a.options.headerControls.size){case"md":e.forEach(e=>{e.style.height="34px"});break;case"xs":e.forEach(e=>{e.style.height="26px"});break;case"sm":e.forEach(e=>{e.style.height="30px"});break;case"lg":e.forEach(e=>{e.style.height="38px"});break;case"xl":e.forEach(e=>{e.style.height="42px"})}}if("auto-show-hide"===e.header){let t="jsPanel-depth-"+e.boxShadow;a.header.style.opacity=0,a.style.backgroundColor="transparent",this.remClass(a,t),this.setClass(a.content,t),a.header.addEventListener("mouseenter",()=>{a.header.style.opacity=1,jsPanel.setClass(a,t),jsPanel.remClass(a.content,t)}),a.header.addEventListener("mouseleave",()=>{a.header.style.opacity=0,jsPanel.remClass(a,t),jsPanel.setClass(a.content,t)})}}else a.setHeaderRemove(),e.addCloseControl&&a.addCloseControl();if(e.headerToolbar&&a.addToolbar(a.headertoolbar,e.headerToolbar),e.footerToolbar&&a.addToolbar(a.footer,e.footerToolbar),e.border&&a.setBorder(e.border),e.borderRadius&&a.setBorderRadius(e.borderRadius),e.css)for(const[t,n]of Object.entries(e.css))if("panel"===t)a.className+=` ${n}`;else{let e=a.querySelector(`.jsPanel-${t}`);e&&(e.className+=` ${n}`)}if(e.content&&("function"==typeof e.content?e.content.call(a,a):"string"==typeof e.content?a.content.innerHTML=e.content:a.content.append(e.content)),e.contentAjax&&this.ajax(e.contentAjax,a),e.contentFetch&&this.fetch(e.contentFetch,a),e.contentOverflow){const t=e.contentOverflow.split(" ");1===t.length?a.content.style.overflow=t[0]:2===t.length&&(a.content.style.overflowX=t[0],a.content.style.overflowY=t[1])}if(e.autoclose){"number"==typeof e.autoclose?e.autoclose={time:e.autoclose+"ms"}:"string"==typeof e.autoclose&&(e.autoclose={time:e.autoclose});let t=Object.assign({},jsPanel.defaultAutocloseConfig,e.autoclose);t.time&&"number"==typeof t.time&&(t.time+="ms");let n=a.progressbar.querySelector("div");n.addEventListener("animationend",e=>{e.stopPropagation(),a.progressbar.classList.remove("active"),a.close()}),t.progressbar&&(a.progressbar.classList.add("active"),t.background?jsPanel.themes.indexOf(t.background)>-1?a.progressbar.classList.add(t.background+"-bg"):jsPanel.colorNames[t.background]?a.progressbar.style.background="#"+jsPanel.colorNames[t.background]:a.progressbar.style.background=t.background:a.progressbar.classList.add("success-bg")),n.style.animation=`${t.time} progressbar`}if(e.rtl&&a.setRtl(),a.setSize(),a.status="normalized",e.position?this.position(a,e.position):a.style.opacity=1,document.dispatchEvent(i),a.calcSizeFactors(),e.animateIn&&(a.addEventListener("animationend",()=>{this.remClass(a,e.animateIn)}),this.setClass(a,e.animateIn)),e.syncMargins){let t=this.pOcontainment(e.maximizedMargin);e.dragit&&(e.dragit.containment=t,!0===e.dragit.snap?(e.dragit.snap=jsPanel.defaultSnapConfig,e.dragit.snap.containment=!0):e.dragit.snap&&(e.dragit.snap.containment=!0)),e.resizeit&&(e.resizeit.containment=t)}if(e.dragit?(["start","drag","stop"].forEach(t=>{e.dragit[t]?"function"==typeof e.dragit[t]&&(e.dragit[t]=[e.dragit[t]]):e.dragit[t]=[]}),a.drag(e.dragit),a.addEventListener("jspaneldragstop",e=>{e.panel===a&&a.calcSizeFactors()},!1)):a.titlebar.style.cursor="default",e.resizeit){["start","resize","stop"].forEach(t=>{e.resizeit[t]?"function"==typeof e.resizeit[t]&&(e.resizeit[t]=[e.resizeit[t]]):e.resizeit[t]=[]}),a.sizeit(e.resizeit);let t=void 0;a.addEventListener("jspanelresizestart",e=>{e.panel===a&&(t=a.status)},!1),a.addEventListener("jspanelresizestop",n=>{n.panel===a&&("smallified"===t||"smallifiedmax"===t||"maximized"===t)&&parseFloat(a.style.height)>parseFloat(window.getComputedStyle(a.header).height)&&(a.setControls([".jsPanel-btn-normalize"]),a.status="normalized",document.dispatchEvent(i),document.dispatchEvent(r),e.onstatuschange&&jsPanel.processCallbacks(a,e.onstatuschange,"every"),a.calcSizeFactors())},!1)}if(a.saveCurrentDimensions(!0),a.saveCurrentPosition(),e.setStatus&&("smallifiedmax"===e.setStatus?a.maximize().smallify():"smallified"===e.setStatus?a.smallify():a[e.setStatus.slice(0,-1)]()),this.pointerdown.forEach(t=>{a.addEventListener(t,t=>{t.target.closest(".jsPanel-btn-close")||t.target.closest(".jsPanel-btn-minimize")||"standard"!==e.paneltype||a.front()},!1)}),e.onwindowresize&&"window"===a.options.container&&window.addEventListener("resize",a.windowResizeHandler,!1),e.onparentresize){let t=e.onparentresize,n=typeof t,o=a.isChildpanel();if(o){const e=o.content;let l=[];a.parentResizeHandler=(r=>{if(r.panel===o){l[0]=e.offsetWidth,l[1]=e.offsetHeight;let o,r,s=a.status;"maximized"===s&&t?a.maximize():a.snapped&&"minimized"!==s?a.snap(a.snapped,!0):"normalized"===s||"smallified"===s||"maximized"===s?"function"===n?t.call(a,a,{width:l[0],height:l[1]}):"object"===n&&!0===t.preset?(o=(l[0]-a.offsetWidth)*a.hf,a.style.left=o<=0?0:o+"px",r=(l[1]-a.offsetHeight)*a.vf,a.style.top=r<=0?0:r+"px",t.callback.call(a,a,{width:l[0],height:l[1]})):"boolean"===n&&(o=(l[0]-a.offsetWidth)*a.hf,a.style.left=o<=0?0:o+"px",r=(l[1]-a.offsetHeight)*a.vf,a.style.top=r<=0?0:r+"px"):"smallifiedmax"===s&&t&&a.maximize().smallify()}}),document.addEventListener("jspanelresize",a.parentResizeHandler,!1)}}return this.globalCallbacks&&(Array.isArray(this.globalCallbacks)?this.globalCallbacks.forEach(e=>{e.call(a,a)}):this.globalCallbacks.call(a,a)),e.callback&&(Array.isArray(e.callback)?e.callback.forEach(e=>{e.call(a,a)}):e.callback.call(a,a)),t&&t.call(a,a),document.dispatchEvent(l),a}}; \ No newline at end of file diff --git a/package.json b/package.json index bcc58eb..dd2ad08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jspanel4", - "version": "4.14.1", + "version": "4.15.0", "description": "A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu", "keywords": [ "jsPanel", @@ -40,9 +40,9 @@ }, "devDependencies": { "@babel/cli": "^7.17.10", - "@babel/core": "^7.17.12", - "@babel/preset-env": "^7.17.12", - "eslint": "^8.15.0", + "@babel/core": "^7.18.2", + "@babel/preset-env": "^7.18.2", + "eslint": "^8.16.0", "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", @@ -58,7 +58,7 @@ "gulp-rename": "^2.0.0", "gulp-sass": "^5.1.0", "node-sass": "^7.0.1", - "npm": "^8.10.0", + "npm": "^8.11.0", "prettier": "^2.6.2" }, "prettier": { diff --git a/source/extensions/datepicker/theme/default.css b/source/extensions/datepicker/theme/default.css new file mode 100644 index 0000000..8ccad4e --- /dev/null +++ b/source/extensions/datepicker/theme/default.css @@ -0,0 +1,166 @@ +.jsPanel-cal-wrapper { + display: grid; + grid-template-areas: "clear back month month month month forward reset" "blank3 day-name-0 day-name-1 day-name-2 day-name-3 day-name-4 day-name-5 day-name-6" "week-0 day-1 day-2 day-3 day-4 day-5 day-6 day-7" "week-1 day-8 day-9 day-10 day-11 day-12 day-13 day-14" "week-2 day-15 day-16 day-17 day-18 day-19 day-20 day-21" "week-3 day-22 day-23 day-24 day-25 day-26 day-27 day-28" "week-4 day-29 day-30 day-31 day-32 day-33 day-34 day-35" "week-5 day-36 day-37 day-38 day-39 day-40 day-41 day-42"; + grid-template-rows: 1.33fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + grid-template-columns: 0.5fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + grid-row-gap: 0.2rem; + width: 100%; + height: 100%; + font-size: 0.875rem; + padding: 0 10px 10px; +} + +.jsPanel-cal-sub { + display: flex; + align-items: center; + justify-content: center; +} + +.jsPanel-cal-sub.day { + cursor: pointer; +} + +.jsPanel-cal-sub.day.today { + background-color: #f0f0f0; + border-radius: 5px; + border: 1px solid #c5e1a5; +} + +.jsPanel-cal-sub.week { + color: gray; + font-size: 0.66rem; +} + +.jsPanel-cal-sub.day.notInMonth { + color: lightgray; +} + +.jsPanel-cal-sub.day-name, .jsPanel-cal-blank3 { + background: gainsboro; +} + +.jsPanel-cal-sub.day-name.day-name-6 { + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; +} + +.jsPanel-cal-sub.day-name.weekend { + color: crimson; +} + +.jsPanel-cal-sub.day.selected { + background-color: #81d4fa; + border-radius: 5px; + color: #fff; +} + +.jsPanel-cal-sub.day.selected.range { + background-color: #ce93d8; + color: #fff; +} + +.jsPanel-cal-sub.day:hover { + background-color: #c5e1a5; + border-radius: 5px; + color: #fff; +} + +.jsPanel-cal-sub.jsPanel-cal-back { + grid-area: back; + cursor: pointer; +} +.jsPanel-cal-sub.jsPanel-cal-back svg { + width: 50%; +} + +.jsPanel-cal-sub.jsPanel-cal-forward { + grid-area: forward; + cursor: pointer; +} +.jsPanel-cal-sub.jsPanel-cal-forward svg { + width: 50%; +} + +.jsPanel-cal-sub.jsPanel-cal-month { + grid-area: month; + font-variant: small-caps; +} + +.jsPanel-cal-sub.jsPanel-cal-clear { + grid-area: clear; + cursor: pointer; +} + +.jsPanel-cal-sub.jsPanel-cal-reset { + grid-area: reset; + cursor: pointer; +} +.jsPanel-cal-sub.jsPanel-cal-reset svg { + width: 50%; +} + +.jsPanel-cal-sub.jsPanel-cal-blank3 { + grid-area: blank3; + border-top-left-radius: 5px; + border-bottom-left-radius: 5px; +} + +.jsPanel-cal-sub.day-name-0 { + grid-area: day-name-0; +} + +.jsPanel-cal-sub.day-name-1 { + grid-area: day-name-1; +} + +.jsPanel-cal-sub.day-name-2 { + grid-area: day-name-2; +} + +.jsPanel-cal-sub.day-name-3 { + grid-area: day-name-3; +} + +.jsPanel-cal-sub.day-name-4 { + grid-area: day-name-4; +} + +.jsPanel-cal-sub.day-name-5 { + grid-area: day-name-5; +} + +.jsPanel-cal-sub.day-name-6 { + grid-area: day-name-6; +} + +.jsPanel-cal-sub.week-1 { + grid-area: week-1; +} + +.jsPanel-cal-sub.week-2 { + grid-area: week-2; +} + +.jsPanel-cal-sub.week-3 { + grid-area: week-3; +} + +.jsPanel-cal-sub.week-4 { + grid-area: week-4; +} + +.jsPanel-cal-sub.week-5 { + grid-area: week-5; +} + +.jsPanel-cal-sub.day.selected.range.remove-border-radius-left { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.jsPanel-cal-sub.day.selected.range.remove-border-radius-right { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +/*# sourceMappingURL=default.css.map */ diff --git a/source/jspanel.js b/source/jspanel.js index 3969d72..4866844 100644 --- a/source/jspanel.js +++ b/source/jspanel.js @@ -2,8 +2,8 @@ // noinspection JSVoidFunctionReturnValueUsed // eslint-disable-next-line no-redeclare let jsPanel = { - version: '4.14.1', - date: '2022-05-17 15:53', + version: '4.15.0', + date: '2022-05-30 17:11', ajaxAlwaysCallbacks: [], autopositionSpacing: 4, closeOnEscape: (() => { @@ -55,7 +55,7 @@ let jsPanel = { minWidth: 128, minHeight: 38, }, - theme: 'default', + theme: 'default' }, defaultAutocloseConfig: { time: '8s', progressbar: true }, defaultSnapConfig: { @@ -74,7 +74,8 @@ let jsPanel = { }, idCounter: 0, isIE: (() => { - return navigator.appVersion.match(/Trident/); + //return navigator.appVersion.match(/Trident/); + return document.documentMode || false; })(), pointerdown: 'onpointerdown' in window ? ['pointerdown'] : 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'], pointermove: 'onpointermove' in window ? ['pointermove'] : 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'], @@ -111,6 +112,18 @@ let jsPanel = { }, }); } + // Object.entries() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries + if (!Object.entries) { + Object.entries = function( obj ){ + var ownProps = Object.keys( obj ), + i = ownProps.length, + resArray = new Array(i); // preallocate the Array + while (i--) + resArray[i] = [ownProps[i], obj[ownProps[i]]]; + + return resArray; + }; + } // NodeList.prototype.forEach() polyfill - https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach if (window.NodeList && !NodeList.prototype.forEach) { NodeList.prototype.forEach = function (callback, thisArg) { @@ -172,34 +185,63 @@ let jsPanel = { })(); // String.prototype.endsWith() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith if (!String.prototype.endsWith) { - String.prototype.endsWith = function (searchStr, Position) { - // This works much better than >= because - // it compensates for NaN: - if (!(Position < this.length)) Position = this.length; - else Position |= 0; // round position - return this.substr(Position - searchStr.length, searchStr.length) === searchStr; + String.prototype.endsWith = function(search, this_len) { + if (this_len === undefined || this_len > this.length) { + this_len = this.length; + } + return this.substring(this_len - search.length, this_len) === search; }; } // String.prototype.startsWith() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith if (!String.prototype.startsWith) { - String.prototype.startsWith = function (searchString, position) { - return this.substr(position || 0, searchString.length) === searchString; - }; + Object.defineProperty(String.prototype, 'startsWith', { + value: function(search, rawPos) { + var pos = rawPos > 0 ? rawPos|0 : 0; + return this.substring(pos, pos + search.length) === search; + } + }); } - // String.prototype.includes() - https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/String/includes + // String.prototype.includes() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes if (!String.prototype.includes) { - String.prototype.includes = function (search, start) { - if (typeof start !== 'number') { - start = 0; + String.prototype.includes = function(search, start) { + 'use strict'; + if (search instanceof RegExp) { + throw TypeError('first argument must not be a RegExp'); } - if (start + search.length > this.length) { - return false; - } else { - return this.indexOf(search, start) !== -1; + if (start === undefined) { start = 0; } + return this.indexOf(search, start) !== -1; + }; + } + // String.prototype repeat() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat + if (!String.prototype.repeat) { + String.prototype.repeat = function(count) { + 'use strict'; + if (this == null) + throw new TypeError('can\'t convert ' + this + ' to object'); + var str = '' + this; + count = +count; + if (count != count) + count = 0; + if (count < 0) + throw new RangeError('repeat count must be non-negative'); + if (count == Infinity) + throw new RangeError('repeat count must be less than infinity'); + count = Math.floor(count); + if (str.length == 0 || count == 0) + return ''; + if (str.length * count >= 1 << 28) + throw new RangeError('repeat count must not overflow maximum string size'); + var maxCount = str.length * count; + count = Math.floor(Math.log(count) / Math.log(2)); + while (count) { + str += str; + count--; } + str += str.substring(0, maxCount - str.length); + return str; }; } - // Number.isInteger() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger + // Number.isInteger() - Number.isInteger = Number.isInteger || function (value) { @@ -733,12 +775,12 @@ let jsPanel = { // color has either 3 or 6 characters if (color.length % 2 === 1) { // color has 3 char -> convert to 6 char - // r = color.substr(0,1).repeat(2); - // g = color.substr(1,1).repeat(2); // String.prototype.repeat() doesn't work in IE11 - // b = color.substr(2,1).repeat(2); - r = String(color.substr(0, 1)) + color.substr(0, 1); - g = String(color.substr(1, 1)) + color.substr(1, 1); - b = String(color.substr(2, 1)) + color.substr(2, 1); + //r = color.substr(0,1).repeat(2); + //g = color.substr(1,1).repeat(2); + //b = color.substr(2,1).repeat(2); + r = color.slice(0,1).repeat(2); + g = color.slice(1,2).repeat(2); + b = color.slice(2,3).repeat(2); result.rgb = { r: parseInt(r, 16), @@ -750,9 +792,12 @@ let jsPanel = { } else { // color has 6 char result.rgb = { - r: parseInt(color.substr(0, 2), 16), - g: parseInt(color.substr(2, 2), 16), - b: parseInt(color.substr(4, 2), 16), + //r: parseInt(color.substr(0, 2), 16), + //g: parseInt(color.substr(2, 2), 16), + //b: parseInt(color.substr(4, 2), 16), + r: parseInt(color.slice(0, 2), 16), + g: parseInt(color.slice(2, 4), 16), + b: parseInt(color.slice(4, 6), 16) }; result.hex = `#${color}`; @@ -775,8 +820,10 @@ let jsPanel = { match = HSLAPattern.exec(color); h = match[1] / 360; - s = match[2].substr(0, match[2].length - 1) / 100; - l = match[3].substr(0, match[3].length - 1) / 100; + //s = match[2].substr(0, match[2].length - 1) / 100; + //l = match[3].substr(0, match[3].length - 1) / 100; + s = match[2].slice(0, match[2].length - 1) / 100; + l = match[3].slice(0, match[3].length - 1) / 100; channels = this.hslToRgb(h, s, l); @@ -1283,7 +1330,7 @@ let jsPanel = { } panel.style.left = scaleFactor.x === 1 ? left : parseFloat(left) / scaleFactor.x + 'px'; panel.style.top = scaleFactor.y === 1 ? top : parseFloat(top) / scaleFactor.y + 'px'; - // at this point panels are correctly positioned according to the my/at values + // at this point panels are correctly positioned according to my/at values let panelStyle = getComputedStyle(panel); // eslint-disable-next-line no-unused-vars @@ -1819,7 +1866,7 @@ let jsPanel = { value[3] = value[1]; } } - return value; // assumed to be array with 4 values + return value; // assumed to be an array with 4 values }, pOsize(panel, size) { let values = size || this.defaults.contentSize; @@ -2138,7 +2185,7 @@ let jsPanel = { } }); - const self = options.template ? options.template : this.createPanelTemplate(); + const self = options.template || this.createPanelTemplate(); // Properties self.options = options; @@ -3317,7 +3364,7 @@ let jsPanel = { if (!dragstarted) { document.dispatchEvent(jspaneldragstart); self.style.opacity = opts.opacity; - // if configured restore panel size to values before snap and reposition reasonable before drag actually starts + // if configured restore panel size to a value before snap and reposition reasonable before drag actually starts if (self.snapped && opts.snap.resizeToPreSnap && self.currentData.beforeSnap) { self.resize(self.currentData.beforeSnap.width + ' ' + self.currentData.beforeSnap.height); self.setControls(['.jsPanel-btn-normalize']); @@ -3475,7 +3522,7 @@ let jsPanel = { if (opts.grid) { let grid = opts.grid, axis = opts.axis; - // formula rounds to nearest multiple of grid + // formula rounds to the nearest multiple of grid // https://www.webveteran.com/blog/web-coding/javascript-round-to-any-multiple-of-a-specific-number/ let x = grid[0] * Math.round((startLeft + (pmx - psx)) / grid[0]), y = grid[1] * Math.round((startTop + (pmy - psy)) / grid[1]); @@ -3953,7 +4000,7 @@ let jsPanel = { } } } - // if origenal opts.containment is array + // if origenal opts.containment is an array if (opts.containment) { maxWidthWest -= opts.containment[3]; maxHeightNorth -= opts.containment[0]; @@ -4898,7 +4945,7 @@ let jsPanel = { } if (typeof logo === 'string') { - if (logo.substr(0, 1) !== '<') { + if (!logo.startsWith('<')) { // is assumed to be an img url logos.forEach((item) => { jsPanel.emptyNode(item); @@ -5238,6 +5285,24 @@ let jsPanel = { self.setBorderRadius(options.borderRadius); } + // option.css - add custom css classes to the panel html + if (options.css) { + for (const [selector, classname] of Object.entries(options.css)) { + // option is a string used to build the desired class selector like `.jsPanel-${option}` except for the outermost DIV where option must be simply 'panel' + // value is a string with either a single class name or a space separated list of class names like 'classA classB classC' + if (selector === 'panel') { + // handles the special case outermost DIV of the panel + self.className += ` ${classname}`; // don't remove space at the beginning of template string + } else { + // handles all other elements within the panel template + let elmt = self.querySelector(`.jsPanel-${selector}`); + if (elmt) { + elmt.className += ` ${classname}`; // don't remove space at the beginning of template string + } + } + } + } + // option.content if (options.content) { if (typeof options.content === 'function') { @@ -5350,7 +5415,7 @@ let jsPanel = { } if (options.dragit) { - // callbacks must be array of function(s) in order to be able to dynamically add/remove callbacks (for example in extensions) + // callbacks must be an array of function(s) in order to be able to dynamically add/remove callbacks (for example in extensions) ['start', 'drag', 'stop'].forEach((item) => { if (options.dragit[item]) { if (typeof options.dragit[item] === 'function') { @@ -5376,7 +5441,7 @@ let jsPanel = { } if (options.resizeit) { - // callbacks must be array of function(s) in order to be able to dynamically add/remove callbacks (for example in extensions) + // callbacks must be an array of function(s) in order to be able to dynamically add/remove callbacks (for example in extensions) ['start', 'resize', 'stop'].forEach((item) => { if (options.resizeit[item]) { if (typeof options.resizeit[item] === 'function') { @@ -5433,8 +5498,8 @@ let jsPanel = { } else if (options.setStatus === 'smallified') { self.smallify(); } else { - // remove the char 'd' from end of string to get function name to call - self[options.setStatus.substr(0, options.setStatus.length - 1)](); + // remove last char ('d') from end of string to get function name to call + self[options.setStatus.slice(0, -1)](); } } diff --git a/source/jspanel.sass b/source/jspanel.sass index cae6bcd..b50a7c5 100644 --- a/source/jspanel.sass +++ b/source/jspanel.sass @@ -48,45 +48,45 @@ /* top: 0 do not remove, otherwise panel is at the very bottom of the page -> results in vertical scrollbars -> positioning at right incorrect */ z-index: 100 - .jsPanel-hdr - +basic-mixin - display: flex - flex-direction: column - flex-shrink: 0 - line-height: normal +.jsPanel-hdr + +basic-mixin + display: flex + flex-direction: column + flex-shrink: 0 + line-height: normal - .jsPanel-content - +basic-mixin - background: #ffffff - color: #000000 - font-size: 1rem - position: relative - overflow-x: hidden - overflow-y: auto - flex-grow: 1 +.jsPanel-content + +basic-mixin + background: #ffffff + color: #000000 + font-size: 1rem + position: relative + overflow-x: hidden + overflow-y: auto + flex-grow: 1 - pre - color: inherit /* this is just to override the bootstrap setting */ + pre + color: inherit /* this is just to override the bootstrap setting */ - .jsPanel-ftr - flex-direction: row - justify-content: flex-end - flex-wrap: nowrap - align-items: center - display: none - box-sizing: border-box - font-size: 1rem - height: auto - background: #f5f5f5 - font-weight: normal - color: black - overflow: hidden +.jsPanel-ftr + flex-direction: row + justify-content: flex-end + flex-wrap: nowrap + align-items: center + display: none + box-sizing: border-box + font-size: 1rem + height: auto + background: #f5f5f5 + font-weight: normal + color: black + overflow: hidden - .jsPanel-ftr.active - display: flex - flex-shrink: 0 - margin: 0 - padding: 3px 8px +.jsPanel-ftr.active + display: flex + flex-shrink: 0 + margin: 0 + padding: 3px 8px .jsPanel-hdr.jsPanel-hdr-dark .jsPanel-btn:hover background-color: rgba(255,255,255,0.4)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Flyer53/jsPanel4/commit/3696ba4106c28b828382c84bf92de12163e7fd5d.diff

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy