%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/usr/share/webmin/authentic-theme/unauthenticated/js/
Upload File :
Create Path :
Current File : //proc/self/root/usr/share/webmin/authentic-theme/unauthenticated/js/jquery.jspanel.min.js

"use strict";Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),o=1;o<arguments.length;o++){var n=arguments[o];if(void 0!==n&&null!==n){n=Object(n);for(var s=Object.keys(Object(n)),a=0,i=s.length;a<i;a++){var l=s[a],r=Object.getOwnPropertyDescriptor(n,l);void 0!==r&&r.enumerable&&(t[l]=n[l])}}}return t}});var jsPanel={version:"3.11.3",date:"2019-11-25 21:49",id:0,ziBase:10004,zi:10004,modalcount:0,autopositionSpacing:5,pbTreshold:.556,lastbeforeclose:!1,template:'<div class="jsPanel">\n                <div class="jsPanel-hdr">\n                    <div class="jsPanel-headerbar">\n                        <div class="jsPanel-headerlogo"></div>\n                        <div class="jsPanel-titlebar">\n                            <h3 class="jsPanel-title"></h3>\n                        </div>\n                        <div class="jsPanel-controlbar">\n                            <div class="jsPanel-btn jsPanel-btn-smallify"><span class="jsglyph jsglyph-chevron-up"></span></div>\n                            <div class="jsPanel-btn jsPanel-btn-smallifyrev"><span class="jsglyph jsglyph-chevron-down"></span></div>\n                            <div class="jsPanel-btn jsPanel-btn-minimize"><span class="jsglyph jsglyph-minimize"></span></div>\n                            <div class="jsPanel-btn jsPanel-btn-normalize"><span class="jsglyph jsglyph-normalize"></span></div>\n                            <div class="jsPanel-btn jsPanel-btn-maximize"><span class="jsglyph jsglyph-maximize"></span></div>\n                            <div class="jsPanel-btn jsPanel-btn-close"><span class="jsglyph jsglyph-close"></span></div>\n                        </div>\n                    </div>\n                    <div class="jsPanel-hdr-toolbar"></div>\n                </div>\n                <div class="jsPanel-content jsPanel-content-nofooter"></div>\n                <div class="jsPanel-minimized-box"></div>\n                <div class="jsPanel-ftr"></div>\n               </div>',replacementTemplate:'<div class="jsPanel-replacement">\n                            <div class="jsPanel-hdr">\n                                <div class="jsPanel-headerbar">\n                                    <div class="jsPanel-titlebar">\n                                        <h3 class="jsPanel-title"></h3>\n                                    </div>\n                                    <div class="jsPanel-controlbar">\n                                        <div class="jsPanel-btn jsPanel-btn-normalize"><span class="jsglyph jsglyph-normalize"></span></div>\n                                        <div class="jsPanel-btn jsPanel-btn-maximize"><span class="jsglyph jsglyph-maximize"></span></div>\n                                        <div class="jsPanel-btn jsPanel-btn-close"><span class="jsglyph jsglyph-close"></span></div>\n                                    </div>\n                                </div>\n                            </div>\n                          </div>',themes:["default","primary","info","success","warning","danger"],mdbthemes:["secondary","elegant","stylish","unique","special"],controls:["close","maximize","normalize","minimize","smallify","smallifyrev"],tplHeaderOnly:'<div class="jsPanel">\n                        <div class="jsPanel-hdr">\n                            <div class="jsPanel-headerbar">\n                                <div class="jsPanel-headerlogo"></div>\n                                <div class="jsPanel-titlebar">\n                                    <h3 class="jsPanel-title"></h3>\n                                </div>\n                                <div class="jsPanel-controlbar">\n                                    <div class="jsPanel-btn jsPanel-btn-close"><span class="jsglyph jsglyph-close"></span></div>\n                                </div>\n                            </div>\n                            <div class="jsPanel-hdr-toolbar"></div>\n                        </div>\n                    </div>',tplContentOnly:'<div class="jsPanel">\n                        <div class="jsPanel-content jsPanel-content-noheader jsPanel-content-nofooter"></div>\n                        <div class="jsPanel-minimized-box"></div>\n                     </div>',activePanels:{list:[],getPanel(e){return"string"==typeof e?document.getElementById(e).jspanel.noop():document.getElementById(this.list[e]).jspanel.noop()}},closeOnEscape:!1,isIE:-1!==navigator.appVersion.indexOf("Trident"),isEdge:-1!==navigator.appVersion.indexOf("Edge"),addConnector(e){const t=e.option.paneltype.connectorBG||null;e[0].classList.contains("jsPanel-tooltip-top")?(e.append('<div class="jsPanel-connector jsPanel-connector-top">'),jQuery(".jsPanel-connector-top",e).css("border-top-color",t||this.calcConnectorBg(e,"top")),e.option.position.offsetY=e.option.position.offsetY-10||-10):e[0].classList.contains("jsPanel-tooltip-bottom")?(e.append('<div class="jsPanel-connector jsPanel-connector-bottom">'),jQuery(".jsPanel-connector-bottom",e).css("border-bottom-color",t||this.calcConnectorBg(e,"bottom")),e.option.position.offsetY=e.option.position.offsetY+10||10):e[0].classList.contains("jsPanel-tooltip-left")?(e.append('<div class="jsPanel-connector jsPanel-connector-left">'),jQuery(".jsPanel-connector-left",e).css("border-left-color",t||this.calcConnectorBg(e,"left")),e.option.position.offsetX=e.option.position.offsetX-12||-12):e[0].classList.contains("jsPanel-tooltip-right")?(e.append('<div class="jsPanel-connector jsPanel-connector-right">'),jQuery(".jsPanel-connector-right",e).css("border-right-color",t||this.calcConnectorBg(e,"right")),e.option.position.offsetX=e.option.position.offsetX+12||12):e[0].classList.contains("jsPanel-tooltip-lefttopcorner")?(e.append('<div class="jsPanel-connector jsPanel-connector-lefttopcorner">'),jQuery(".jsPanel-connector-lefttopcorner",e).css("background-color",t||this.calcConnectorBg(e,"lefttopcorner"))):e[0].classList.contains("jsPanel-tooltip-righttopcorner")?(e.append('<div class="jsPanel-connector jsPanel-connector-righttopcorner">'),jQuery(".jsPanel-connector-righttopcorner",e).css("background-color",t||this.calcConnectorBg(e,"righttopcorner"))):e[0].classList.contains("jsPanel-tooltip-rightbottomcorner")?(e.append('<div class="jsPanel-connector jsPanel-connector-rightbottomcorner">'),jQuery(".jsPanel-connector-rightbottomcorner",e).css("background-color",t||this.calcConnectorBg(e,"rightbottomcorner"))):e[0].classList.contains("jsPanel-tooltip-leftbottomcorner")?(e.append('<div class="jsPanel-connector jsPanel-connector-leftbottomcorner">'),jQuery(".jsPanel-connector-leftbottomcorner",e).css("background-color",t||this.calcConnectorBg(e,"leftbottomcorner"))):e[0].classList.contains("jsPanel-tooltip-lefttop")?(e.append('<div class="jsPanel-connector jsPanel-connector-lefttop">'),jQuery(".jsPanel-connector-lefttop",e).css("border-left-color",t||this.calcConnectorBg(e,"lefttop")),e.option.position.offsetX=e.option.position.offsetX-12||-12):e[0].classList.contains("jsPanel-tooltip-leftbottom")?(e.append('<div class="jsPanel-connector jsPanel-connector-leftbottom">'),jQuery(".jsPanel-connector-leftbottom",e).css("border-left-color",t||this.calcConnectorBg(e,"leftbottom")),e.option.position.offsetX=e.option.position.offsetX-12||-12):e[0].classList.contains("jsPanel-tooltip-topleft")?(e.append('<div class="jsPanel-connector jsPanel-connector-topleft">'),jQuery(".jsPanel-connector-topleft",e).css("border-top-color",t||this.calcConnectorBg(e,"topleft")),e.option.position.offsetY=e.option.position.offsetY-10||-10):e[0].classList.contains("jsPanel-tooltip-topright")?(e.append('<div class="jsPanel-connector jsPanel-connector-topright">'),jQuery(".jsPanel-connector-topright",e).css("border-top-color",t||this.calcConnectorBg(e,"topright")),e.option.position.offsetY=e.option.position.offsetY-10||-10):e[0].classList.contains("jsPanel-tooltip-righttop")?(e.append('<div class="jsPanel-connector jsPanel-connector-righttop">'),jQuery(".jsPanel-connector-righttop",e).css("border-right-color",t||this.calcConnectorBg(e,"righttop")),e.option.position.offsetX=e.option.position.offsetX+12||12):e[0].classList.contains("jsPanel-tooltip-rightbottom")?(e.append('<div class="jsPanel-connector jsPanel-connector-rightbottom">'),jQuery(".jsPanel-connector-rightbottom",e).css("border-right-color",t||this.calcConnectorBg(e,"rightbottom")),e.option.position.offsetX=e.option.position.offsetX+12||12):e[0].classList.contains("jsPanel-tooltip-bottomleft")?(e.append('<div class="jsPanel-connector jsPanel-connector-bottomleft">'),jQuery(".jsPanel-connector-bottomleft",e).css("border-bottom-color",t||this.calcConnectorBg(e,"bottomleft")),e.option.position.offsetY=e.option.position.offsetY+10||10):e[0].classList.contains("jsPanel-tooltip-bottomright")&&(e.append('<div class="jsPanel-connector jsPanel-connector-bottomright">'),jQuery(".jsPanel-connector-bottomright",e).css("border-bottom-color",t||this.calcConnectorBg(e,"bottomright")),e.option.position.offsetY=e.option.position.offsetY+10||10)},addCustomTheme(e){-1===this.themes.indexOf(e)&&this.themes.push(e)},ajax(e){const t=e.option.contentAjax,o=e.option.contentSize;t.then&&(t.then[0]&&(t.done=t.then[0]),t.then[1]&&(t.fail=t.then[1])),jQuery.ajax(t).done((o,n,s)=>{t.autoload&&e.content.append(o),jQuery.isFunction(t.done)&&t.done.call(e,o,n,s,e)}).fail((o,n,s)=>{jQuery.isFunction(t.fail)&&t.fail.call(e,o,n,s,e)}).always((n,s,a)=>{if(jQuery.isFunction(t.always)&&t.always.call(e,n,s,a,e),e.hasClass("jsPanel-contextmenu")&&jsPanel.checkContextmenuOverflow(e),"string"==typeof o&&o.match(/auto/i)){var i=o.split(" "),l=Object.assign({},jQuery.jsPanel.resizedefaults,{width:i[0],height:i[1]});t.autoresize&&e.resize(l),e.hasClass("jsPanel-contextmenu")||t.autoreposition&&e.reposition()}else if(jQuery.isPlainObject(o)&&("auto"===o.width||"auto"===o.height)){l=Object.assign({},jQuery.jsPanel.resizedefaults,o);t.autoresize&&e.resize(l),e.hasClass("jsPanel-contextmenu")||t.autoreposition&&e.reposition()}}),e.data("ajaxURL",t.url)},applyBuiltInTheme(e,t){e[0].classList.add(`jsPanel-theme-${t.color}`),e.header[0]&&e.header[0].classList.add(`jsPanel-theme-${t.color}`),"filled"===t.filling?e.content.css("background","")[0].classList.add("jsPanel-content-filled"):"filledlight"===t.filling&&e.content.css("background","")[0].classList.add("jsPanel-content-filledlight"),e.option.headerToolbar||e.content.css({borderTop:`1px solid ${e.header.title.css("color")}`})},applyArbitraryTheme(e,t){e.header.css("background-color",t.colors[0]),jQuery(".jsPanel-headerlogo, .jsPanel-title, .jsPanel-controlbar .jsPanel-btn .jsglyph, .jsPanel-hdr-toolbar",e).css({color:t.colors[3]}),e.option.headerToolbar?e.header.toolbar.css({boxShadow:`0 0 1px ${t.colors[3]} inset`,width:"calc(100% + 4px)",marginLeft:"-1px"}):e.content.css({borderTop:`1px solid ${t.colors[3]}`}),"filled"===t.filling?e.content.css({backgroundColor:t.colors[0],color:t.colors[3]}):"filledlight"===t.filling&&e.content.css({backgroundColor:t.colors[1]})},applyBootstrapTheme(e,t){let o;if(e.addClass(`panel panel-${t.bstheme} card card-inverse card-${t.bstheme}`),e.header[0]&&(e.header[0].classList.add("panel-heading"),e.header.title[0].classList.add("panel-title")),"mdb"===t.bs){let o=`${t.bstheme}-color`;t.mdbStyle&&(o=`${o}-dark`),e.removeClass(`panel panel-${t.bstheme}`),e[0].classList.add(o)}e.content[0].classList.add("panel-body"),e.content.css("border-top-color",()=>e.header.css("border-top-color")),e.footer.addClass("panel-footer card-footer"),o="transparent"===jQuery(".panel-heading",e).css("background-color")?e.css("background-color").replace(/\s+/g,""):jQuery(".panel-heading",e).css("background-color").replace(/\s+/g,"");const n=this.calcColors(o);jQuery(".jsPanel-headerlogo, .jsPanel-title, .jsPanel-controlbar .jsPanel-btn, .jsPanel-hdr-toolbar",e.header).css("color",n[3]),e.option.headerToolbar?e.header.toolbar.css({boxShadow:`0 0 1px ${n[3]} inset`,width:"calc(100% + 4px)",marginLeft:"-1px"}):e.content.css({borderTop:`1px solid ${n[3]}`}),"filled"===t.filling?e.content.css({backgroundColor:o,color:n[3]}):"filledlight"===t.filling&&e.content.css({backgroundColor:n[1],color:"#000000"})},applyThemeBorder(e,t){const o=e.option.border.split(" ");if(e.css({borderWidth:o[0],borderStyle:o[1],borderColor:o[2]}),t.bs){let t;t="transparent"===jQuery(".panel-heading",e).css("background-color")?e.css("background-color").replace(/\s+/g,""):jQuery(".panel-heading",e).css("background-color").replace(/\s+/g,""),o[2]?e.css("border-color",o[2]):e.css("border-color",t)}else-1===this.themes.indexOf(t.color)&&(o[2]?e.css("border-color",o[2]):e.css("border-color",t.colors[0]))},calcColors(e){const t=this.color(e),o=this.lighten(e,.81),n=this.darken(e,.5),s=this.perceivedBrightness(e)<=this.pbTreshold?"#ffffff":"#000000",a=this.perceivedBrightness(o)<=this.pbTreshold?"#ffffff":"#000000",i=this.perceivedBrightness(n)<=this.pbTreshold?"#000000":"#ffffff";return[t.hsl.css,o,n,s,a,i]},calcConnectorBg(e,t){const o=e.content.css("background-color"),n=e.footer.css("background-color"),s=e.header.css("background-color");if(t.match(/^(top|topleft|topright|lefttopcorner|righttopcorner|leftbottom|rightbottom)$/))return"none"!==e.footer.css("display")?n:parseFloat(e.option.contentSize.height)>0?o:s;if(t.match(/^(bottom|bottomleft|bottomright|leftbottomcorner|rightbottomcorner)$/)){if(!e.option.headerRemove)return s;if(parseFloat(e.option.contentSize.height)>0)return o;if("none"!==e.footer.css("display"))return n}else{if(t.match(/^(lefttop|righttop)$/))return e.option.headerRemove?o:s;if(t.match(/^(left|right)$/)){if(parseFloat(e.option.contentSize.height)>0)return o;if(!e.option.headerRemove)return s;if("none"!==e.footer.css("display"))return n}}},clearTheme(e){this.themes.concat(this.mdbthemes).forEach(function(t){e.removeClass(`panel card card-inverse jsPanel-theme-${t} panel-${t} card-${t} ${t}-color`),e.header.removeClass(`panel-heading jsPanel-theme-${t}`)}),e.content.removeClass("panel-body jsPanel-content-filled jsPanel-content-filledlight"),e.css({borderWidth:"",borderStyle:"",borderColor:""}),jQuery(".jsPanel-hdr, .jsPanel-content",e).css({background:""}),jQuery(".jsPanel-headerlogo, .jsPanel-title, .jsPanel-controlbar .jsPanel-btn .jsglyph, .jsPanel-hdr-toolbar, .jsPanel-content",e).css({color:""}),e.header.title.removeClass("panel-title"),e.header.toolbar.css({boxShadow:"",width:"",marginLeft:""}),e.css({borderTop:"",borderTopColor:""}),e.footer.removeClass("panel-footer card-footer")},close(e,...t){const o=e.attr("id"),n=this.setTrigger(e.option.position),s=e.option.delayClose,a=t;function i(e,...t){t=a;const s=e.option.position;if(s.autoposition||"string"==typeof s&&s.match(/DOWN|RIGHT|UP|LEFT/i)){const t=/left-top|center-top|right-top|left-center|center|right-center|left-bottom|center-bottom|right-bottom/,n=jQuery(e).parent(),s=document.getElementById(o).className.match(t);s&&(jsPanel.lastbeforeclose={parent:n,class:s[0]})}if(e.closeChildpanels().remove(),!jQuery(`#${o}`).length){let s,a,i,l=jsPanel.activePanels.list.indexOf(o);l>-1&&jsPanel.activePanels.list.splice(l,1),jsPanel.remMinReplacement(e),"modal"===e.option.paneltype&&jsPanel.removeModalBackdrop(e),e.option.paneltype.tooltip&&n.classList.remove("hasTooltip"),jQuery(document).trigger("jspanelclosed",o),jQuery(document).trigger("jspanelstatuschange",o),jsPanel.lastbeforeclose&&(s=jsPanel.lastbeforeclose.parent,a=jQuery(`.${jsPanel.lastbeforeclose.class}`,s),i=jsPanel.lastbeforeclose.class),a&&(a.each(function(e,t){t.classList.remove(i)}),a.each(function(t,o){jsPanel.position(o,e.option.position)})),jsPanel.lastbeforeclose=!1,!0===t[2]?jQuery.noop():jQuery.isFunction(e.option.onclosed)&&e.option.onclosed.call(e,e),t[0]&&jQuery.isFunction(t[0])&&t[0].call(e,e),jsPanel.resetZis()}}if(jQuery(document).trigger("jspanelbeforeclose",o),jQuery.isFunction(e.option.onbeforeclose))if(!0===t[1])jQuery.noop();else if(!1===e.option.onbeforeclose.call(e,e))return e;s&&"number"==typeof s&&s>0?window.setTimeout(function(){i(e,t[0],t[2])},s):i(e,t[0],t[2])},closeChildpanels:e=>(jQuery(".jsPanel",e).each((e,t)=>{t.jspanel.close()}),e),closePanels(e){jQuery(`.jsPanel-${e}`).each((e,t)=>{t.jspanel&&t.jspanel.close()})},calcPositionFactors(e){"body"===e.option.container?(e.hf=parseInt(e.css("left"),10)/(jQuery(window).outerWidth()-e.outerWidth()),e.vf=parseInt(e.css("top"),10)/(jQuery(window).outerHeight()-e.outerHeight())):(e.hf=parseInt(e.css("left"),10)/(e.parent().outerWidth()-e.outerWidth()),e.vf=parseInt(e.css("top"),10)/(e.parent().outerHeight()-e.outerHeight()))},color(e){let t,o,n,s,a,i,l,r,c,d=e.toLowerCase(),p={};const f=/^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,h=/^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={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};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=String(d.substr(0,1))+d.substr(0,1),o=String(d.substr(1,1))+d.substr(1,1),n=String(d.substr(2,1))+d.substr(2,1),p.rgb={r:parseInt(t,16),g:parseInt(o,16),b:parseInt(n,16)},p.hex=`#${t}${o}${n}`):(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=`#${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(f)?(l=f.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(h)?(s=(l=h.exec(d))[1]/360,a=l[2].substr(0,l[2].length-1)/100,i=l[3].substr(0,l[3].length-1)/100,r=this.hslToRgb(s,a,i),p.rgb={css:`rgb(${r[0]},${r[1]},${r[2]})`,r:r[0],g:r[1],b:r[2]},p.hex=this.rgbToHex(p.rgb.r,p.rgb.g,p.rgb.b),p.hsl={css:`hsl(${l[1]},${l[2]},${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.08%)",h:0,s:"0%",l:"96.08%"}),p},configIconfont(e){const t=["remove","fullscreen","resize-full","minus","chevron-up","chevron-down"],o=["times fa-window-close","arrows-alt fa-window-maximize","expand fa-window-restore","minus fa-window-minimize","chevron-up","chevron-down"],n=["close","fullscreen","fullscreen_exit","call_received","expand_less","expand_more"],s=e.option.headerControls.iconfont,a=e.header.headerbar;"bootstrap"===s||"glyphicon"===s?this.controls.forEach((e,o)=>{jQuery(`.jsPanel-btn-${e} span`,a).removeClass().addClass(`glyphicon glyphicon-${t[o]}`)}):"font-awesome"===s?this.controls.forEach((e,t)=>{jQuery(`.jsPanel-btn-${e} span`,a).removeClass().addClass(`fa fa-${o[t]}`)}):"material-icons"===s?this.controls.forEach((e,t)=>{jQuery(`.jsPanel-btn-${e} span`,a).removeClass().addClass("material-icons").text(n[t])}):Array.isArray(s)&&this.controls.forEach((e,t)=>{jQuery(`.jsPanel-btn-${e} span`,a).removeClass().addClass(`custom-control-icon ${s[t]}`)})},configToolbar(e,t,o){e.forEach(e=>{if("object"==typeof e){const n=jQuery(e.item);if("string"==typeof e.btntext&&n.append(e.btntext),"string"==typeof e.btnclass&&e.btnclass.split(" ").forEach(function(e){n[0].classList.add(e)}),t.append(n),jQuery.isFunction(e.callback)){const t=e.event||"click";n.on(t,o,e.callback)}}})},contentReload(e,t){return e.option.content?e.content.empty().append(e.option.content):e.option.contentAjax?(e.content.empty(),this.ajax(e)):e.option.contentIframe&&(e.content.empty(),this.iframe(e)),t&&jQuery.isFunction(t)&&t.call(e,e),e},contentResize(e,t){const o=e.footer[0].classList.contains("active")?e.header.outerHeight()+e.footer.outerHeight():e.header.outerHeight(),n=parseInt(e.css("border-top-width"),10)+parseInt(e.css("border-bottom-width"),10);return e.content.css({height:e.outerHeight()-o-n}),t&&jQuery.isFunction(t)&&t.call(e,e),e},createMinimizedReplacement(e){const t=jQuery(this.replacementTemplate),o=e.header.title.css("color"),n=e.header.title[0].textContent;let s;s="transparent"===e.header.css("background-color")?e.css("background-color"):e.header.css("background-color"),e.css("left","-9999px").data("status","minimized"),t.css("background-color",s).prop("id",`${e.prop("id")}-min`).find("h3").css("color",o).prop("title",n).html(n),e.header.logo.children().length&&jQuery(".jsPanel-headerbar",t).prepend(e.header.logo.clone());const a=e.option.headerControls.iconfont;return"font-awesome"===a?(jQuery(".jsglyph.jsglyph-normalize",t).removeClass().addClass("fa fa-expand fa-window-restore"),jQuery(".jsglyph.jsglyph-maximize",t).removeClass().addClass("fa fa-arrows-alt fa-window-maximize"),jQuery(".jsglyph.jsglyph-close",t).removeClass().addClass("fa fa-times fa-window-close")):"bootstrap"===a||"glyphicon"===a?(jQuery(".jsglyph.jsglyph-normalize",t).removeClass().addClass("glyphicon glyphicon-resize-full"),jQuery(".jsglyph.jsglyph-maximize",t).removeClass().addClass("glyphicon glyphicon-fullscreen"),jQuery(".jsglyph.jsglyph-close",t).removeClass().addClass("glyphicon glyphicon-remove")):"material-icons"===a?(jQuery(".jsglyph.jsglyph-normalize",t).removeClass().addClass("material-icons").text("call_made"),jQuery(".jsglyph.jsglyph-maximize",t).removeClass().addClass("material-icons").text("fullscreen"),jQuery(".jsglyph.jsglyph-close",t).removeClass().addClass("material-icons").text("close")):Array.isArray(a)&&(jQuery(".jsglyph.jsglyph-normalize",t).removeClass().addClass(`custom-control-icon ${a[2]}`),jQuery(".jsglyph.jsglyph-maximize",t).removeClass().addClass(`custom-control-icon ${a[1]}`),jQuery(".jsglyph.jsglyph-close",t).removeClass().addClass(`custom-control-icon ${a[0]}`)),jQuery(".jsPanel-btn span",t).css({color:o}),t},darken(e,t){const o=this.color(e).hsl,n=parseFloat(o.l),s=n-n*t+"%";return`hsl(${o.h},${o.s},${s})`},dblclickhelper(e,t){"string"==typeof e&&("maximize"===e||"normalize"===e?"normalized"===t.data("status")?t.maximize():t.normalize():"minimize"!==e&&"smallify"!==e&&"close"!==e||t[e]())},dragit(e,t={}){let o;o="string"==typeof e?document.querySelector(e):e.jquery?e[0]:e;let n,s,a,i,l,r,c,d,p,f=e.jquery?e:o,h=Object.assign({},jQuery.jsPanel.defaults.dragit,t),u=h.containment,m=o.parentElement,g=window.getComputedStyle(o,null).getPropertyValue("position"),j=m.tagName.toLowerCase(),b=o.querySelector(".jsPanel-content"),y=[];jsPanel.isIE?(l=document.createEvent("CustomEvent"),r=document.createEvent("CustomEvent"),c=document.createEvent("CustomEvent"),l.initCustomEvent("dragstart",!0,!0,{}),r.initCustomEvent("drag",!0,!0,{}),c.initCustomEvent("dragstop",!0,!0,{})):(l=new Event("dragstart"),r=new Event("drag"),c=new Event("dragstop")),i=h.handles?o.querySelectorAll(h.handles):[o],"number"==typeof u?u=[].concat(u,u,u,u):"[object Array]"===Object.prototype.toString.call(u)&&(2===u.length?u=u.concat(u):3===u.length&&(u[3]=u[1])),"[object Array]"===Object.prototype.toString.call(u)&&(s=u,h.containment=u="body"===j?"window":"parent"),u&&"body"===j&&(h.containment=u="window");for(let e=0;e<i.length;e++)jsPanel.evtStart.forEach(function(t){i[e].addEventListener(t,function(e){if(e.preventDefault(),e.button&&e.button>0)return!1;(y=Array.prototype.slice.call(document.querySelectorAll("iframe"))).length&&y.forEach(function(e){e.style.pointerEvents="none"});let t,i,c,b,P,w,v=o.getBoundingClientRect(),z=m.getBoundingClientRect(),x=window.getComputedStyle(m,null),Q=x.getPropertyValue("position"),C=parseInt(x.getPropertyValue("border-left-width"),10),E=parseInt(x.getPropertyValue("border-right-width"),10),k=parseInt(x.getPropertyValue("border-top-width"),10),L=parseInt(x.getPropertyValue("border-bottom-width"),10),O=e.touches?e.touches[0].pageX:e.pageX,T=e.touches?e.touches[0].pageY:e.pageY,$=window.scrollX||window.pageXOffset,F=window.scrollY||window.pageYOffset;"fixed"===g?(t=v.left,i=v.top):"body"===j||"static"===Q?(t=v.left,i=v.top):"body"!==j&&(t=v.left-z.left-C+m.scrollLeft,i=v.top-z.top-k+m.scrollTop),"body"===j&&u?"fixed"===g?(c=0,P=0,b=document.documentElement.clientWidth-v.width,w=document.documentElement.clientHeight-v.height):(c=$,P=F,b=document.documentElement.clientWidth-v.width+$,w=document.documentElement.clientHeight-v.height+F):"parent"===u?"static"===Q?(c=z.left+C+$,P=z.top+k+F,b=c+z.width-v.width-C-E,w=P+z.height-v.height-k-L):(c=0,P=0,b=z.width-v.width-C-E,w=z.height-v.height-k-L):"window"===u&&("static"===Q?(c=$,P=F,b=document.documentElement.clientWidth-v.width+$,w=document.documentElement.clientHeight-v.height+F):(c=-z.left-C,P=-z.top-k,b=document.documentElement.clientWidth-z.left-v.width-E,w=document.documentElement.clientHeight-z.top-v.height-L)),s&&(c+=s[3],P+=s[0],b-=s[1],w-=s[2]);let S=parseFloat(o.style.left)-v.left,X=parseFloat(o.style.top)-v.top;m!==document.body&&(S+=z.left,X+=z.top),a=function(s){if(e.preventDefault(),h.disableOnMaximized&&"maximized"===jQuery(o).data("status"))return!1;if(n||(document.dispatchEvent(l),o.style.opacity=h.opacity,"function"==typeof h.start&&h.start.call(f,f,{left:t,top:i})),n=1,document.dispatchEvent(r),d=C+t+(s.touches?s.touches[0].pageX:s.pageX)-O+S,p=k+i+(s.touches?s.touches[0].pageY:s.pageY)-T+X,d<=c?d=c:d>=b&&(d=b),p<=P?p=P:p>=w&&(p=w),"x"===h.axis?o.style.left=d+"px":"y"===h.axis?o.style.top=p+"px":(o.style.left=d+"px",o.style.top=p+"px"),h.grid&&Array.isArray(h.grid)){1===h.grid.length&&(h.grid[1]=h.grid[0]);let e=parseFloat(o.style.left),t=parseFloat(o.style.top),n=e%h.grid[0],s=t%h.grid[1];n<h.grid[0]/2?o.style.left=e-n+"px":o.style.left=e+(h.grid[0]-n)+"px",s<h.grid[1]/2?o.style.top=t-s+"px":o.style.top=t+(h.grid[1]-s)+"px"}window.getSelection().removeAllRanges(),"function"==typeof h.drag&&h.drag.call(f,f,{left:parseFloat(f.css("left")),top:parseFloat(f.css("top"))})},jsPanel.evtMove.forEach(function(e){document.addEventListener(e,a,!1)})},!1)});return jsPanel.evtEnd.forEach(function(t){document.addEventListener(t,function(){jsPanel.evtMove.forEach(function(e){document.removeEventListener(e,a,!1)}),n&&(b.style.pointerEvents="inherit",document.dispatchEvent(c),o.style.opacity=1,n=void 0,jsPanel.calcPositionFactors(e),"function"==typeof h.stop&&h.stop.call(f,f,{left:parseFloat(f.css("left")),top:parseFloat(f.css("top"))})),y.length&&y.forEach(function(e){e.style.pointerEvents="inherit"})},!1)}),f},resizeit(e,t={}){let o;o="string"==typeof e?document.querySelector(e):e.jquery?e[0]:e;let n,s,a,i,l,r,c=e.jquery?e:o,d=Object.assign({},jQuery.jsPanel.defaults.resizeit,t),p=d.containment,f=window.getComputedStyle(o,null),h=f.getPropertyValue("position"),u=parseInt(f.getPropertyValue("border-left-width"),10),m=parseInt(f.getPropertyValue("border-top-width"),10),g=parseInt(f.getPropertyValue("border-right-width"),10),j=parseInt(f.getPropertyValue("border-bottom-width"),10),b=o.parentElement,y=b.tagName.toLowerCase(),P=o.querySelector(".jsPanel-content"),w="function"==typeof d.maxWidth?d.maxWidth():d.maxWidth,v="function"==typeof d.maxHeight?d.maxHeight():d.maxHeight,z="function"==typeof d.minWidth?d.minWidth():d.minWidth,x="function"==typeof d.minHeight?d.minHeight():d.minHeight,Q=[];jsPanel.isIE?(i=document.createEvent("CustomEvent"),l=document.createEvent("CustomEvent"),r=document.createEvent("CustomEvent"),i.initCustomEvent("dragstart",!0,!0,{}),l.initCustomEvent("drag",!0,!0,{}),r.initCustomEvent("dragstop",!0,!0,{})):(i=new Event("dragstart"),l=new Event("drag"),r=new Event("dragstop")),"number"==typeof p?p=[].concat(p,p,p,p):"[object Array]"===Object.prototype.toString.call(p)&&(2===p.length?p=p.concat(p):3===p.length&&(p[3]=p[1])),"[object Array]"===Object.prototype.toString.call(p)&&(s=p,d.containment=p="body"===y?"window":"parent"),p&&"body"===y&&(d.containment=p="window"),d.handles.split(",").forEach(function(e){let t=document.createElement("DIV");t.className=`jsPanel-resizeit-handle jsPanel-resizeit-${e.trim()}`,t.style.zIndex=90,o.appendChild(t)});let C=o.getElementsByClassName("jsPanel-resizeit-handle");for(let t=0;t<C.length;t++)jsPanel.evtStart.forEach(function(r){C[t].addEventListener(r,function(t){if(t.preventDefault(),t.button&&t.button>0)return!1;(Q=Array.prototype.slice.call(document.querySelectorAll("iframe"))).length&&Q.forEach(function(e){e.style.pointerEvents="none"});let r,f,C=o.getBoundingClientRect(),E=b.getBoundingClientRect(),k=window.getComputedStyle(b,null),L=k.getPropertyValue("position"),O=parseInt(k.getPropertyValue("border-left-width"),10),T=parseInt(k.getPropertyValue("border-top-width"),10),$=parseInt(k.getPropertyValue("border-bottom-width"),10),F=t.pageX||t.touches[0].pageX,S=t.pageY||t.touches[0].pageY,X=window.scrollX||window.pageXOffset,Y=C.width,I=C.height,R=t.target,B=1e4,A=1e4,H=1e4,M=1e4;P.style.pointerEvents="none","fixed"===h?(r=C.left-u-g,f=C.top-m-j):"body"===y||"static"===L?(r=C.left-u-g,f=C.top-m-j):"body"!==y&&(r=C.left-E.left-O+b.scrollLeft-u-g,f=C.top-E.top-T+b.scrollTop-m-j),"body"===y&&p?(B=document.documentElement.clientWidth-C.left-u-g,H=document.documentElement.clientHeight-C.top-m-j,A=C.width+C.left-u-g,M=C.height+C.top-m-j):"parent"===p?"static"===L?(B=E.width-C.left-u-X,H=E.height+E.top-C.top+m-T-$,A=C.width+(C.left-E.left)-O,M=C.height+(C.top-E.top)-T):(B=b.clientWidth-(C.left-E.left)+u,H=b.clientHeight-(C.top-E.top)+m,A=C.width+(C.left-E.left)-O-u-g,M=o.clientHeight+(C.top-E.top)-m-m-j):"window"===p&&(B=document.documentElement.clientWidth-C.left-u-g,H=document.documentElement.clientHeight-C.top-m-j,A=C.left+C.width-u-g,M=C.top+C.height-m-j),s&&(A-=s[3],M-=s[0],B-=s[1],H-=s[2]);let W=window.getComputedStyle(o),D=parseFloat(W.width)-C.width,q=parseFloat(W.height)-C.height,N=parseFloat(W.left)-C.left,V=parseFloat(W.top)-C.top;b!==document.body&&(N+=E.left,V+=E.top),a=function(t){if(t.preventDefault(),n||(document.dispatchEvent(i),"function"==typeof d.start&&d.start.call(c,c,{width:Y,height:I})),n=1,document.dispatchEvent(l),R.classList.contains("jsPanel-resizeit-e")){let e=Y+(t.pageX||t.touches[0].pageX)-F+D;e>=B&&(e=B),e>=w?e=w:e<=z&&(e=z),o.style.width=e+"px"}else if(R.classList.contains("jsPanel-resizeit-se")){let e=Y+(t.pageX||t.touches[0].pageX)-F+D,n=I+(t.pageY||t.touches[0].pageY)-S+q;e>=B&&(e=B),n>=H&&(n=H),e>=w?e=w:e<=z&&(e=z),n>=v?n=v:n<=x&&(n=x),o.style.width=e+"px",o.style.height=n+"px"}else if(R.classList.contains("jsPanel-resizeit-s")){let e=I+(t.pageY||t.touches[0].pageY)-S+q;e>=H&&(e=H),e>=v?e=v:e<=x&&(e=x),o.style.height=e+"px"}else if(R.classList.contains("jsPanel-resizeit-w")){let e=Y+F-(t.pageX||t.touches[0].pageX)+D;e<=w&&e>=z&&e<=A&&(o.style.left=r+O+(t.pageX||t.touches[0].pageX)-F+N+"px"),e>=A&&(e=A),e>=w?e=w:e<=z&&(e=z),o.style.width=e+"px"}else if(R.classList.contains("jsPanel-resizeit-n")){let e=I+S-(t.pageY||t.touches[0].pageY)+q;e<=v&&e>=x&&e<=M&&(o.style.top=f+T+(t.pageY||t.touches[0].pageY)-S+V+"px"),e>=M&&(e=M),e>=v?e=v:e<=x&&(e=x),o.style.height=e+"px"}else if(R.classList.contains("jsPanel-resizeit-sw")){let e=I+(t.pageY||t.touches[0].pageY)-S+q;e>=H&&(e=H),e>=v?e=v:e<=x&&(e=x),o.style.height=e+"px";let n=Y+F-(t.pageX||t.touches[0].pageX)+D;n<=w&&n>=z&&n<=A&&(o.style.left=r+O+(t.pageX||t.touches[0].pageX)-F+N+"px"),n>=A&&(n=A),n>=w?n=w:n<=z&&(n=z),o.style.width=n+"px"}else if(R.classList.contains("jsPanel-resizeit-nw")){let e=I+S-(t.pageY||t.touches[0].pageY)+q;e<=v&&e>=x&&e<=M&&(o.style.top=f+T+(t.pageY||t.touches[0].pageY)-S+V+"px"),e>=M&&(e=M),e>=v?e=v:e<=x&&(e=x),o.style.height=e+"px";let n=Y+F-(t.pageX||t.touches[0].pageX)+D;n<=w&&n>=z&&n<=A&&(o.style.left=r+O+(t.pageX||t.touches[0].pageX)-F+N+"px"),n>=A&&(n=A),n>=w?n=w:n<=z&&(n=z),o.style.width=n+"px"}else if(R.classList.contains("jsPanel-resizeit-ne")){let e=I+S-(t.pageY||t.touches[0].pageY)+q;e<=v&&e>=x&&e<=M&&(o.style.top=f+T+(t.pageY||t.touches[0].pageY)-S+V+"px"),e>=M&&(e=M),e>=v?e=v:e<=x&&(e=x),o.style.height=e+"px";let n=Y+(t.pageX||t.touches[0].pageX)-F+D;n>=B&&(n=B),n>=w?n=w:n<=z&&(n=z),o.style.width=n+"px"}jsPanel.contentResize(e),window.getSelection().removeAllRanges(),"function"==typeof d.resize&&d.resize.call(c,c,{width:parseFloat(c.css("width")),height:parseFloat(c.css("height"))})},jsPanel.evtMove.forEach(function(e){document.addEventListener(e,a,!1)}),window.addEventListener("mouseout",function(e){null===e.relatedTarget&&jsPanel.evtMove.forEach(function(e){document.removeEventListener(e,a,!1)})},!1)},!1)});return jsPanel.evtEnd.forEach(function(t){document.addEventListener(t,function(t){if(t.target.classList&&t.target.classList.contains("jsPanel-resizeit-handle")){let n,s,a=t.target.className;if(a.match(/jsPanel-resizeit-nw|jsPanel-resizeit-w|jsPanel-resizeit-sw/i)&&(n=!0),a.match(/jsPanel-resizeit-nw|jsPanel-resizeit-n|jsPanel-resizeit-ne/i)&&(s=!0),d.grid&&Array.isArray(d.grid)){1===d.grid.length&&(d.grid[1]=d.grid[0]);let e=parseFloat(o.style.width),t=parseFloat(o.style.height),a=e%d.grid[0],i=t%d.grid[1],l=parseFloat(o.style.left),r=parseFloat(o.style.top),c=l%d.grid[0],p=r%d.grid[1];a<d.grid[0]/2?o.style.width=e-a+"px":o.style.width=e+(d.grid[0]-a)+"px",i<d.grid[1]/2?o.style.height=t-i+"px":o.style.height=t+(d.grid[1]-i)+"px",n&&(c<d.grid[0]/2?o.style.left=l-c+"px":o.style.left=l+(d.grid[0]-c)+"px"),s&&(p<d.grid[1]/2?o.style.top=r-p+"px":o.style.top=r+(d.grid[1]-p)+"px")}jsPanel.contentResize(e)}jsPanel.evtMove.forEach(function(e){document.removeEventListener(e,a,!1)}),n&&(P.style.pointerEvents="inherit",document.dispatchEvent(r),n=void 0,("smallified"===jQuery(o).data("status")||"smallifiedMax"===jQuery(o).data("status"))&&jQuery(o).height()>jQuery(o).header.height()&&(jQuery(o).hideControls([".jsPanel-btn-normalize",".jsPanel-btn-smallifyrev"]),jQuery(o).data("status","normalized"),jQuery(document).trigger("jspanelnormalized"),jQuery(document).trigger("jspanelstatuschange")),jsPanel.calcPositionFactors(e),"function"==typeof d.stop&&d.stop.call(c,c,{width:parseFloat(c.css("width")),height:parseFloat(c.css("height"))})),Q.length&&Q.forEach(function(e){e.style.pointerEvents="inherit"})},!1)}),c},exportPanels(e=".jsPanel",t="jspanels"){let o=[];const n=jQuery(".jsPanel").not(".jsPanel-tooltip, .jsPanel-hint, .jsPanel-modal").filter(e);return n.each((e,t)=>{"normalized"!==jQuery(t).data("status")&&jQuery(".jsPanel-btn-normalize",t).trigger("click")}),n.each((e,t)=>{let n,s,a,i,l;const r=jQuery(t).data("container"),c=jQuery(t).offset(),d=jQuery(t).position();switch("minimized"===jQuery(t).data("status")?("body"===r.toLowerCase()?(n=jQuery(t).data("paneltop")-jQuery(window).scrollTop(),s=jQuery(t).data("panelleft")-jQuery(window).scrollLeft()):(n=jQuery(t).data("paneltop"),s=jQuery(t).data("panelleft")),a=jQuery(t).data("panelwidth"),i=jQuery(t).data("panelheight")):("body"===r.toLowerCase()?(n=Math.floor(c.top-jQuery(window).scrollTop()),s=Math.floor(c.left-jQuery(window).scrollLeft())):(n=Math.floor(d.top),s=Math.floor(d.left)),a=jQuery(t).css("width"),i=jQuery(".jsPanel-content",t).css("height")),l={status:jQuery(t).data("status"),id:jQuery(t).prop("id"),headerTitle:jQuery(".jsPanel-title",t).html(),custom:jQuery(t).data("custom"),content:jQuery(t).data("content"),contentSize:{width:a,height:i},position:{my:"left-top",at:"left-top",offsetX:s,offsetY:n}},jQuery(t).data("ajaxURL")&&(l.contentAjax={url:jQuery(t).data("ajaxURL"),autoload:!0}),(jQuery(t).data("iframeDOC")||jQuery(t).data("iframeSRC"))&&(l.contentIframe={src:jQuery(t).data("iframeSRC")||"",srcdoc:jQuery(t).data("iframeDOC")||""}),o.push(l),l.status){case"minimized":jQuery(".jsPanel-btn-minimize",t).trigger("click");break;case"maximized":jQuery(".jsPanel-btn-maximize",t).trigger("click");break;case"smallified":case"smallifiedMax":jQuery(".jsPanel-btn-smallify",t).trigger("click")}}),window.localStorage.setItem(t,JSON.stringify(o)),o},front(e,t){if(e.css("z-index",this.setZi(e)),this.resetZis(),jQuery(document).trigger("jspanelfronted",e.prop("id")),jQuery.isFunction(e.option.onfronted)){if(!1===e.option.onfronted.call(e,e))return e;e.option.onfronted.call(e,e)}return t&&jQuery.isFunction(t)&&t.call(e,e),e},getThemeDetails(e){const t={color:!1,colors:!1,filling:!1,bs:!1,bstheme:!1};if("filled"===e.substr(-6,6)?(t.filling="filled",t.color=e.substr(0,e.length-6)):"filledlight"===e.substr(-11,11)?(t.filling="filledlight",t.color=e.substr(0,e.length-11)):(t.filling="",t.color=e),t.colors=this.calcColors(t.color),t.color.match("-")){const e=t.color.split("-");t.bs=e[0],t.bstheme=e[1],t.mdbStyle=e[2]||void 0}return t},getTopmostPanel(){let e=[];return jQuery(".jsPanel:not(.jsPanel-tooltip):not(.jsPanel-hint)").each(function(t,o){e.push(o)}),e.sort(function(e,t){return jQuery(t).css("z-index")-jQuery(e).css("z-index")}),e[0].getAttribute("id")},headerTitle:(e,t)=>t?(e.header.title.empty().append(t),e):e.header.title.html(),headerControl(e,t,o="enable"){return t?this.setControlStatus(e,t,o):this.controls.forEach(function(t){jsPanel.setControlStatus(e,t)}),e},hslToRgb(e,t,o){let n,s,a;if(0===t)n=s=a=o;else{let i=function(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+6*(t-e)*o:o<.5?t:o<2/3?e+(t-e)*(2/3-o)*6:e},l=o<.5?o*(1+t):o+t-o*t,r=2*o-l;n=i(r,l,e+1/3),s=i(r,l,e),a=i(r,l,e-1/3)}return[Math.round(255*n),Math.round(255*s),Math.round(255*a)]},iframe(e){let t=jQuery("<iframe></iframe>");const o=e.option.contentIframe;o.srcdoc&&(t.prop("srcdoc",o.srcdoc),e.data("iframeDOC",o.srcdoc)),o.src&&(t.prop("src",o.src),e.data("iframeSRC",o.src)),"auto"===e.option.contentSize.width||o.width?t.prop("width",o.width):t.css("width","100%"),"auto"===e.option.contentSize.height||o.height?t.prop("height",o.height):t.css("height","100%"),o.name&&t.prop("name",o.name),o.sandbox&&t.prop("sandox",o.sandbox),o.id&&t.prop("id",o.id),jQuery.isPlainObject(o.style)&&t.css(o.style),"string"==typeof o.classname?t.addClass(o.classname):jQuery.isFunction(o.classname)&&t.addClass(o.classname()),e.content.append(t)},importPanels(e,t="jspanels"){const o=e.default||{};let n;JSON.parse(localStorage[t]).forEach(t=>{n="string"==typeof t.custom.config?jQuery.extend(!0,{},o,e[t.custom.config],t):jQuery.extend(!0,{},o,t),jQuery.jsPanel(n)})},insertModalBackdrop(e){const t=0===jQuery(".jsPanel-modal-backdrop").length?"jsPanel-modal-backdrop":"jsPanel-modal-backdrop jsPanel-modal-backdrop-multi",o=`<div id="jsPanel-modal-backdrop-${e.attr("id")}" class="${t}" style="z-index:${this.modalcount+9999}"></div>`;jQuery("body").append(o),this.modalcount+=1},removeModalBackdrop(e){const t=jQuery(`#jsPanel-modal-backdrop-${e.attr("id")}`);t[0].classList.add("jsPanel-modal-backdrop-out");const o=1e3*parseFloat(t.css("animation-duration"),10);window.setTimeout(function(){t.remove()},o),this.modalcount-=1},lighten(e,t){const o=this.color(e).hsl,n=parseFloat(o.l),s=n+(100-n)*t+"%";return`hsl(${o.h},${o.s},${s})`},maximize(e,t,o=!0){let n=e.option.maximizedMargin,s=e[0].parentNode,a=e.attr("id");if(jQuery.isPlainObject(n)){n=["number"==typeof n.top?n.top:5,"number"==typeof n.right?n.right:5,"number"==typeof n.bottom?n.bottom:5,"number"==typeof n.left?n.left:5]}return"number"==typeof n?n=[].concat(n,n,n,n):jQuery.isArray(n)&&2===n.length?n=n.concat(n):jQuery.isArray(n)&&3===n.length&&(n[3]=n[1]),"normalized"===e.data("status")&&e.updateCachedData(),jQuery(document).trigger("jspanelbeforemaximize",a),jQuery.isFunction(e.option.onbeforemaximize)&&!1===e.option.onbeforemaximize.call(e,e)?e:(e.css("overflow","visible"),s===document.body?(e.css({width:document.documentElement.clientWidth-n[3]-n[1]+"px",height:document.documentElement.clientHeight-n[0]-n[2]+"px",left:n[3]+"px",top:n[0]+"px"}),!1===e.option.position.fixed&&e.css({left:window.pageXOffset+n[3]+"px",top:window.pageYOffset+n[0]+"px"})):e.css({width:s.clientWidth-n[3]-n[1]+"px",height:s.clientHeight-n[0]-n[2]+"px",left:n[3]+"px",top:n[0]+"px"}),e.contentResize().data("status","maximized"),o&&e.css("z-index",this.setZi(e)),e.hideControls([".jsPanel-btn-maximize",".jsPanel-btn-smallifyrev"]),this.remMinReplacement(e),jQuery(document).trigger("jspanelmaximized",a),jQuery(document).trigger("jspanelstatuschange",a),jQuery.isFunction(e.option.onmaximized)&&e.option.onmaximized.call(e,e),t&&jQuery.isFunction(t)&&t.call(e,e),e)},minimize(e,t){const o=e.attr("id");if("minimized"===e.data("status"))return e;if(jQuery(document).trigger("jspanelbeforeminimize",o),jQuery.isFunction(e.option.onbeforeminimize)&&!1===e.option.onbeforeminimize.call(e,e))return e;const n=e.data("status");"normalized"===n?e.updateCachedData():"smallified"===n&&(e.cachedData.top=e.css("top"),e.cachedData.left=e.css("left"));const s=this.createMinimizedReplacement(e),a=jQuery(e.option.container).closest(".jsPanel-content");if(a.length){let t=".jsPanel-minimized-box";e.option.minimizeTo&&("string"==typeof e.option.minimizeTo?(t=e.option.minimizeTo,jQuery(t).append(s)):jQuery(t,a.parent()).append(s))}else{let t="#jsPanel-replacement-container";e.option.minimizeTo&&("string"==typeof e.option.minimizeTo&&(t=e.option.minimizeTo),jQuery(t).append(s))}return jQuery(document).trigger("jspanelminimized",o),jQuery(document).trigger("jspanelstatuschange",o),jQuery.isFunction(e.option.onminimized)&&e.option.onminimized.call(e,e),t&&jQuery.isFunction(t)&&t.call(e,e),jQuery(".jsPanel-btn-normalize",s).css("display","block").on("click",()=>e.normalize()),"disabled"===e[0].dataset.btnnormalize?jQuery(".jsPanel-btn-normalize",s).css({pointerEvents:"none",opacity:.5,cursor:"default"}):"removed"===e[0].dataset.btnnormalize&&jQuery(".jsPanel-btn-normalize",s).remove(),jQuery(".jsPanel-btn-maximize",s).on("click",()=>e.maximize()),"disabled"===e[0].dataset.btnmaximize?jQuery(".jsPanel-btn-maximize",s).css({pointerEvents:"none",opacity:.5,cursor:"default"}):"removed"===e[0].dataset.btnmaximize&&jQuery(".jsPanel-btn-maximize",s).remove(),jQuery(".jsPanel-btn-close",s).on("click",()=>e.close()),"disabled"===e[0].dataset.btnclose&&jQuery(".jsPanel-btn-close",s).css({pointerEvents:"none",opacity:.5,cursor:"default"}),e},normalize(e,t){const o=e.attr("id");return"normalized"===e.data("status")?e:(jQuery(document).trigger("jspanelbeforenormalize",o),jQuery.isFunction(e.option.onbeforenormalize)&&!1===e.option.onbeforenormalize.call(e,e)?e:"smallified"===e.data("status")?(e.smallify(),jQuery(document).trigger("jspanelnormalized",o),jQuery(document).trigger("jspanelstatuschange",o),jQuery.isFunction(e.option.onnormalized)&&e.option.onnormalized.call(e,e),e):(e.css({left:e.cachedData.left,top:e.cachedData.top,width:e.cachedData.width,height:e.cachedData.height,zIndex:function(){jsPanel.setZi(e)},overflow:"visible"}).data("status","normalized").contentResize(),e.hideControls([".jsPanel-btn-normalize",".jsPanel-btn-smallifyrev"]),this.remMinReplacement(e),jQuery(document).trigger("jspanelnormalized",o),jQuery(document).trigger("jspanelstatuschange",o),jQuery.isFunction(e.option.onnormalized)&&e.option.onnormalized.call(e,e),t&&jQuery.isFunction(t)&&t.call(e,e),e))},noscroll(e){e.preventDefault()},perceivedBrightness(e){const t=this.color(e).rgb;return t.r/255*.2627+t.g/255*.678+t.b/255*.0593},position(e,t){let o,n,s,a,i,l,r,c=0,d=0;const p=["left-top","left-center","left-bottom"],f=["center-top","center","center-bottom"],h=["right-top","right-center","right-bottom"],u=["left-top","center-top","right-top"],m=["left-center","center","right-center"],g=["left-bottom","center-bottom","right-bottom"];function j(e){let t;return t=e.jquery?e[0].getBoundingClientRect():"string"==typeof e?document.querySelector(e).getBoundingClientRect():e.getBoundingClientRect(),{width:Math.round(t.width),height:Math.round(t.height),left:Math.round(t.left+window.pageXOffset),top:Math.round(t.top+window.pageYOffset)}}if("string"==typeof t){const e=/\b[a-z]{4,6}-{1}[a-z]{3,6}\b/,o=/DOWN|UP|RIGHT|LEFT/,n=/[+-]?\d+\.?\d*%?/g,s=t.match(e),a=t.match(o),i=t.match(n);let l;l=jQuery.isArray(s)?{my:s[0],at:s[0]}:{my:"center",at:"center"},jQuery.isArray(a)&&(l.autoposition=a[0]),jQuery.isArray(i)&&(l.offsetX=i[0],2===i.length&&(l.offsetY=i[1])),t=l}else{const e=0===t.left||t.left,o=0===t.top||t.top,n=0===t.right||t.right,s=0===t.bottom||t.bottom;e&&o?(t.my="left-top",t.at="left-top",t.offsetX=t.left,t.offsetY=t.top):e&&s?(t.my="left-bottom",t.at="left-bottom",t.offsetX=t.left,t.offsetY=-t.bottom):n&&o?(t.my="right-top",t.at="right-top",t.offsetX=-t.right,t.offsetY=t.top):n&&s&&(t.my="right-bottom",t.at="right-bottom",t.offsetX=-t.right,t.offsetY=-t.bottom)}if(s=Object.assign({my:"center",at:"center",offsetX:0,offsetY:0,modify:!1,fixed:"true"},t),o="string"==typeof e?document.querySelector(e):e.jquery?e[0]:e,"boolean"==typeof t&&!1===t)return o.style.opacity=1,o;if(a=o.parentElement||document.body,s.of||(a===document.body?s.of="window":s.of=a),n=j(o),"string"==typeof s.offsetX&&"%"===s.offsetX.slice(-1)?"window"===s.of?s.offsetX=window.innerWidth*(parseInt(s.offsetX,10)/100):s.offsetX=a.clientWidth*(parseInt(s.offsetX,10)/100):"string"==typeof s.offsetX?s.offsetX=parseFloat(s.offsetX):jQuery.isFunction(s.offsetX)&&(s.offsetX=parseInt(s.offsetX.call(e,e),10)),"string"==typeof s.offsetY&&"%"===s.offsetY.slice(-1)?"window"===s.of?s.offsetY=window.innerHeight*(parseInt(s.offsetY,10)/100):s.offsetY=a.clientHeight*(parseInt(s.offsetY,10)/100):"string"==typeof s.offsetY?s.offsetY=parseFloat(s.offsetY):jQuery.isFunction(s.offsetY)&&(s.offsetY=parseInt(s.offsetY.call(e,e),10)),p.indexOf(s.my)>-1?c=0:f.indexOf(s.my)>-1?c=n.width/2:h.indexOf(s.my)>-1&&(c=n.width),u.indexOf(s.my)>-1?d=0:m.indexOf(s.my)>-1?d=n.height/2:g.indexOf(s.my)>-1&&(d=n.height),a===document.body)if("window"===s.of){const e=function(e){let t={};return p.indexOf(e)>-1?t.left=window.pageXOffset:f.indexOf(e)>-1?t.left=window.pageXOffset+document.documentElement.clientWidth/2:h.indexOf(e)>-1?t.left=window.pageXOffset+document.documentElement.clientWidth:t.left=window.pageXOffset,u.indexOf(e)>-1?t.top=window.pageYOffset:m.indexOf(e)>-1?t.top=window.pageYOffset+window.innerHeight/2:g.indexOf(e)>-1?t.top=window.pageYOffset+window.innerHeight:t.top=window.pageYOffset,t}(s.at);s.fixed?(l=e.left-c+s.offsetX-window.pageXOffset,r=e.top-d+s.offsetY-window.pageYOffset):(l=e.left-c+s.offsetX,r=e.top-d+s.offsetY)}else{const e=function(e){let t={},o=j(s.of);return p.indexOf(e)>-1?t.left=o.left:f.indexOf(e)>-1?t.left=o.left+o.width/2:h.indexOf(e)>-1?t.left=o.left+o.width:t.left=o.left,u.indexOf(e)>-1?t.top=o.top:m.indexOf(e)>-1?t.top=o.top+o.height/2:g.indexOf(e)>-1?t.top=o.top+o.height:t.top=o.top,t}(s.at);l=e.left-c+s.offsetX,r=e.top-d+s.offsetY}else{let e,t;t="string"==typeof s.of?document.querySelector(s.of):s.of.jquery?s.of[0]:s.of,a===t?(e=function(e){let t={},o=a.getBoundingClientRect();return p.indexOf(e)>-1?t.left=0:f.indexOf(e)>-1?t.left=o.width/2:h.indexOf(e)>-1?t.left=o.width:t.left=0,u.indexOf(e)>-1?t.top=0:m.indexOf(e)>-1?t.top=o.height/2:g.indexOf(e)>-1?t.top=o.height:t.top=0,t}(s.at),l=e.left-c+s.offsetX,r=e.top-d+s.offsetY):(e=function(e){let t={};const o=a.getBoundingClientRect(),n=document.querySelector(s.of).getBoundingClientRect(),i=n.left-o.left,l=n.top-o.top;return p.indexOf(e)>-1?t.left=i:f.indexOf(e)>-1?t.left=i+n.width/2:h.indexOf(e)>-1?t.left=i+n.width:t.left=i,u.indexOf(e)>-1?t.top=l:m.indexOf(e)>-1?t.top=l+n.height/2:g.indexOf(e)>-1?t.top=l+n.height:t.top=l,t}(s.at),l=e.left-c+s.offsetX,r=e.top-d+s.offsetY)}if(s.autoposition){let e,t=[];s.my===s.at&&(e=s.my),o.classList.add(e),t=Array.prototype.slice.call(a.getElementsByClassName(e)),"DOWN"===s.autoposition?t.forEach(function(e,o){o>0&&(r+=t[--o].getBoundingClientRect().height+jsPanel.autopositionSpacing)}):"UP"===s.autoposition?t.forEach(function(e,o){o>0&&(r-=t[--o].getBoundingClientRect().height+jsPanel.autopositionSpacing)}):"RIGHT"===s.autoposition?t.forEach(function(e,o){o>0&&(l+=t[--o].getBoundingClientRect().width+jsPanel.autopositionSpacing)}):"LEFT"===s.autoposition&&t.forEach(function(e,o){o>0&&(l-=t[--o].getBoundingClientRect().width+jsPanel.autopositionSpacing)})}return i={left:l,top:r},(s.minLeft||0===s.minLeft)&&"number"==typeof s.minLeft&&i.left<s.minLeft&&(i.left=s.minLeft),(s.maxLeft||0===s.maxLeft)&&"number"==typeof s.maxLeft&&i.left>s.maxLeft&&(i.left=s.maxLeft),(s.minTop||0===s.minTop)&&"number"==typeof s.minTop&&i.top<s.minTop&&(i.top=s.minTop),(s.maxTop||0===s.maxTop)&&"number"==typeof s.maxTop&&i.top>s.maxTop&&(i.top=s.maxTop),"function"==typeof s.modify&&(i=s.modify.call(i,i)),o.style.position="absolute",o.style.left=`${i.left}px`,o.style.top=`${i.top}px`,"window"===s.of&&s.fixed&&a===document.body&&(o.style.position="fixed"),o},remMinReplacement(e){jQuery(`[id^="${e.prop("id")}-min"]`).remove()},reposition(e,t=e.option.position,o){if("minimized"!==e.data("status")){if(e.option.position=t,e.option.paneltype.tooltip){const t=e.attr("class").split(" ");jQuery.each(t,function(t,o){0===o.indexOf("jsPanel-tooltip-")&&e.removeClass(o)}),this.setTooltipClass(e),jQuery(".jsPanel-connector",e).remove(),e.option.paneltype.connector&&this.addConnector(e)}this.position(e,t)}return o&&jQuery.isFunction(o)&&o.call(e,e),e},resetZis(){let e=[];jQuery(".jsPanel:not(.jsPanel-modal):not(.jsPanel-hint)").each(function(t,o){e.push(o)}),e.sort(function(e,t){return jQuery(e).css("z-index")-jQuery(t).css("z-index")}).forEach(function(e,t){(jsPanel.zi+=1)>jQuery(e).css("z-index")&&jQuery(e).css("z-index",jsPanel.ziBase+t)}),this.zi=this.ziBase-1+e.length},resize(e,t){if("minimized"!==e.data("status")){if(jQuery.isFunction(e.option.onbeforeresize)&&!1===e.option.onbeforeresize.call(e,e))return e;if(jQuery.isPlainObject(t)){let o,n,s=jQuery.extend({},!1,jQuery.jsPanel.resizedefaults,t);if(s.width&&"auto"===s.width?(e.content.css("width","auto"),e.css("width","auto"),e.css("width",e.outerWidth())):s.width&&e.css("width",s.width),s.height&&"auto"===s.height?(e.content.css("height","auto"),e.css("height","auto")):s.height&&e.css("height",s.height),o=e.outerWidth(),n=e.outerHeight(),s.minwidth&&o<s.minwidth&&e.css("width",s.minwidth),s.maxwidth&&o>s.maxwidth&&e.css("width",s.maxwidth),s.minheight&&n<s.minheight&&e.css("height",s.minheight),s.maxheight&&n>s.maxheight&&e.css("height",s.maxheight),this.contentResize(e),jQuery.isFunction(e.option.onresized)&&!1===e.option.onresized.call(e,e))return e;s.callback&&jQuery.isFunction(s.callback)&&s.callback.call(e,e)}}return e},rgbToHsl(e,t,o){e/=255,t/=255,o/=255;let n,s,a=Math.max(e,t,o),i=Math.min(e,t,o),l=(a+i)/2;if(a===i)n=s=0;else{let r=a-i;switch(s=l>.5?r/(2-a-i):r/(a+i),a){case e:n=(t-o)/r+(t<o?6:0);break;case t:n=(o-e)/r+2;break;case o:n=(e-t)/r+4}n/=6}return{css:"hsl("+(n*=360)+","+(s=100*s+"%")+","+(l=100*l+"%")+")",h:n,s:s,l:l}},rgbToHex(e,t,o){let n=Number(e).toString(16),s=Number(t).toString(16),a=Number(o).toString(16);return 1===n.length&&(n=`0${n}`),1===s.length&&(s=`0${s}`),1===a.length&&(a=`0${a}`),`#${n}${s}${a}`},setControlStatus(e,t,o="enable"){const n=e.header.headerbar,s=e[0];"disable"===o?"removed"!==s.getAttribute(`data-btn${t}`)&&(s.setAttribute(`data-btn${t}`,"disabled"),jQuery(`.jsPanel-btn-${t}`,n).css({pointerEvents:"none",opacity:.4,cursor:"default"})):"enable"===o?"removed"!==s.getAttribute(`data-btn${t}`)&&(s.setAttribute(`data-btn${t}`,"enabled"),jQuery(`.jsPanel-btn-${t}`,n).css({pointerEvents:"auto",opacity:1,cursor:"pointer"})):"remove"===o&&(jQuery(`.jsPanel-btn-${t}`,n).remove(),s.setAttribute(`data-btn${t}`,"removed"))},setTooltipClass(e){const t=e.option.position.my+e.option.position.at;"center-bottomcenter-top"===t?e[0].classList.add("jsPanel-tooltip-top"):"left-bottomright-top"===t?e[0].classList.add("jsPanel-tooltip-righttopcorner"):"left-centerright-center"===t?e[0].classList.add("jsPanel-tooltip-right"):"left-topright-bottom"===t?e[0].classList.add("jsPanel-tooltip-rightbottomcorner"):"center-topcenter-bottom"===t?e[0].classList.add("jsPanel-tooltip-bottom"):"right-topleft-bottom"===t?e[0].classList.add("jsPanel-tooltip-leftbottomcorner"):"right-centerleft-center"===t?e[0].classList.add("jsPanel-tooltip-left"):"right-bottomleft-top"===t?e[0].classList.add("jsPanel-tooltip-lefttopcorner"):"centercenter"===t?e[0].classList.add("jsPanel-tooltip-center"):"right-topleft-top"===t?e[0].classList.add("jsPanel-tooltip-lefttop"):"right-bottomleft-bottom"===t?e[0].classList.add("jsPanel-tooltip-leftbottom"):"left-bottomleft-top"===t?e[0].classList.add("jsPanel-tooltip-topleft"):"right-bottomright-top"===t?e[0].classList.add("jsPanel-tooltip-topright"):"left-topright-top"===t?e[0].classList.add("jsPanel-tooltip-righttop"):"left-bottomright-bottom"===t?e[0].classList.add("jsPanel-tooltip-rightbottom"):"left-topleft-bottom"===t?e[0].classList.add("jsPanel-tooltip-bottomleft"):"right-topright-bottom"===t&&e[0].classList.add("jsPanel-tooltip-bottomright")},setTooltipMode(e,t){"semisticky"===e.option.paneltype.mode?e.hover(()=>jQuery.noop(),()=>{e.close(),t.classList.remove("hasTooltip")}):"sticky"===e.option.paneltype.mode?jQuery.noop():jQuery(t).mouseout(()=>{e.close(),t.classList.remove("hasTooltip")})},setTrigger(e){const t=e.of||"window";return"string"==typeof t?document.querySelector(t):t.jquery?t[0]:t},setZi(e){e[0].classList.contains("jsPanel-modal")||(this.zi+=1)>e.css("z-index")&&e.css("z-index",this.zi)},smallify(e,t){const o=e.attr("id");if("normalized"===e.data("status")||"maximized"===e.data("status")){if("smallified"!==e.data("status")&&"smallifiedMax"!==e.data("status")){if(jQuery(document).trigger("jspanelbeforesmallify",o),jQuery.isFunction(e.option.onbeforesmallify)&&!1===e.option.onbeforesmallify.call(e,e))return e;e.smallify.height=e.outerHeight(),e.css("overflow","hidden"),e.animate({height:e.header.headerbar.outerHeight()+"px"},{done:function(){"maximized"===e.data("status")?(e.hideControls([".jsPanel-btn-maximize",".jsPanel-btn-smallify"]),e.data("status","smallifiedMax"),jQuery(document).trigger("jspanelsmallifiedmax",o)):(e.hideControls([".jsPanel-btn-normalize",".jsPanel-btn-smallify"]),e.data("status","smallified"),jQuery(document).trigger("jspanelsmallified",o)),jQuery.isFunction(e.option.onsmallified)&&e.option.onsmallified.call(e,e),jQuery(document).trigger("jspanelstatuschange",o)}})}}else if("minimized"!==e.data("status")){if(jQuery(document).trigger("jspanelbeforeunsmallify",o),jQuery.isFunction(e.option.onbeforeunsmallify)&&!1===e.option.onbeforeunsmallify.call(e,e))return e;e.css("overflow","visible"),e.animate({height:e.smallify.height},{done:function(){"smallified"===e.data("status")?(e.hideControls([".jsPanel-btn-normalize",".jsPanel-btn-smallifyrev"]),e.data("status","normalized"),jQuery(document).trigger("jspanelnormalized",o)):(e.hideControls([".jsPanel-btn-maximize",".jsPanel-btn-smallifyrev"]),e.data("status","maximized"),jQuery(document).trigger("jspanelmaximized",o)),e.contentResize(),jQuery(document).trigger("jspanelunsmallified",o),jQuery(document).trigger("jspanelstatuschange",o),jQuery.isFunction(e.option.onunsmallified)&&e.option.onunsmallified.call(e,e)}})}return e.css("z-index",this.setZi(e)),t&&jQuery.isFunction(t)&&t.call(e,e),e},toolbarAdd(e,t,o,n){return"header"===t?(e.header.toolbar[0].classList.add("active"),jQuery.isArray(o)?this.configToolbar(o,e.header.toolbar,e):jQuery.isFunction(o)?e.header.toolbar.append(o(e.header)):e.header.toolbar.append(o)):"footer"===t&&(e.content[0].classList.remove("jsPanel-content-nofooter"),e.footer[0].classList.add("active"),"none"===e.option.theme&&e.footer.css({background:"transparent",borderTop:"none"}),jQuery.isArray(o)?this.configToolbar(o,e.footer,e):jQuery.isFunction(o)?e.footer.append(o(e.footer)):e.footer.append(o)),this.contentResize(e),n&&jQuery.isFunction(n)&&n.call(e,e),e},contextmenu(e,t,o){let n;(n="string"==typeof e?document.querySelector(e):e.jquery?jQuery(e)[0]:e).addEventListener("contextmenu",function(e){e.preventDefault(),e.stopPropagation(),jsPanel.closePanels("contextmenu");let n=e.clientX+(window.scrollX||window.pageXOffset),s=e.clientY+(window.scrollY||window.pageYOffset),a=Object.assign({},jQuery.jsPanel.defaults,jQuery.jsPanel.contextmenudefaults,t,{container:"body",position:!1}),i=jQuery.jsPanel(a).css({position:"absolute",left:n,top:s}).addClass("jsPanel-contextmenu").on("mouseleave",function(e){i.close()}).on("click",function(e){e.stopPropagation()});jQuery(e.target).closest(".jsPanel-modal")&&i.css("z-index",jQuery(e.target).closest(".jsPanel-modal").css("z-index")),i[0].cmEvent=e,jsPanel.checkContextmenuOverflow(i),o&&jQuery.isFunction(o)&&o.call(i,i)},!1)},checkContextmenuOverflow(e){let t=e[0].cmEvent.clientX,o=e[0].cmEvent.clientY,n=e.outerWidth(),s=e.outerHeight(),a=window.innerWidth-(t+n),i=window.innerHeight-(o+s);a<0&&e.css("left",t+(window.scrollX||window.pageXOffset)-n),i<0&&e.css("top",o+(window.scrollY||window.pageYOffset)-s)}};"ontouchend"in window?(jsPanel.evtStart=["touchstart","mousedown"],jsPanel.evtMove=["touchmove","mousemove"],jsPanel.evtEnd=["touchend","mouseup"]):(jsPanel.evtStart=["mousedown"],jsPanel.evtMove=["mousemove"],jsPanel.evtEnd=["mouseup"]),function(e){e.jsPanel=function(t){let o,n,s=t||{},a=s.config||{},i=e.extend(!0,{},a,s),l=s.template?e(s.template):a.template?e(a.template):e(jsPanel.template);if(delete i.config,e.isArray(i.maximizedMargin)&&!0===i.maximizedMargin[4]){let t,o;i.maximizedMargin.pop(),i.dragit&&(t=i.dragit.containment||i.maximizedMargin,i.dragit=e.extend({},!0,i.dragit,{containment:t})),i.resizeit&&(o=i.resizeit.containment||i.maximizedMargin,i.resizeit=e.extend({},!0,i.resizeit,{containment:o}))}i.position&&e.isFunction(i.position)&&(i.position=i.position()),"tooltip"===i.paneltype&&(i.paneltype={tooltip:!0}),i.paneltype?"modal"===i.paneltype?l.option=e.extend(!0,{},e.jsPanel.defaults,e.jsPanel.modaldefaults,i):i.paneltype.tooltip?l.option=e.extend(!0,{},e.jsPanel.defaults,e.jsPanel.tooltipdefaults,i):"hint"===i.paneltype&&(l.option=e.extend(!0,{},e.jsPanel.defaults,e.jsPanel.hintdefaults,i)):l.option=e.extend(!0,{},e.jsPanel.defaults,i);let{autoclose:r,border:c,callback:d,closeOnEscape:p,container:f,content:h,contentAjax:u,contentIframe:m,contentOverflow:g,contentSize:j,custom:b,dblclicks:y,draggable:P,dragit:w,footerToolbar:v,headerControls:z,headerLogo:x,headerRemove:Q,headerTitle:C,headerToolbar:E,id:k,onwindowresize:L,panelSize:O,paneltype:T,position:$,resizable:F,resizeit:S,rtl:X,setstatus:Y,show:I,theme:R}=l.option;if(T.tooltip&&(n=jsPanel.setTrigger($)).classList.contains("hasTooltip"))return!1;if("string"==typeof k?o=k:"function"==typeof k&&(o=k()),e(`#${o}`).length>0)return console.warn("jsPanel Error: No jsPanel created - id attribute passed with option.id already exists in document"),e(`#${o}`)[0].jspanel.front(),!1;if(l[0].id=o,l.data("custom",b),l.header=e(".jsPanel-hdr",l),l.header.headerbar=e(".jsPanel-headerbar",l.header),l.header.logo=e(".jsPanel-headerlogo",l.header.headerbar),l.header.title=e(".jsPanel-title",l.header.headerbar),l.header.controls=e(".jsPanel-controlbar",l.header.headerbar),l.header.toolbar=e(".jsPanel-hdr-toolbar",l.header),l.content=e(".jsPanel-content",l),l.footer=e(".jsPanel-ftr",l),l.data("status","initialized"),l.cachedData={},l.close=((...e)=>jsPanel.close(l,...e)),l.closeChildpanels=(()=>jsPanel.closeChildpanels(l)),l.contentReload=(e=>jsPanel.contentReload(l,e)),l.contentResize=(e=>jsPanel.contentResize(l,e)),l.front=(e=>jsPanel.front(l,e)),l.headerControl=((e,t)=>jsPanel.headerControl(l,e,t)),l.headerTitle=(e=>jsPanel.headerTitle(l,e)),l.hideControls=(e=>{Array.prototype.slice.call(l.header.controls[0].getElementsByClassName("jsPanel-btn")).forEach(function(e){e&&(e.style.display="block")}),e.forEach(function(e){l.header.controls[0].querySelector(e)&&(l.header.controls[0].querySelector(e).style.display="none")})}),l.maximize=(e=>jsPanel.maximize(l,e)),l.minimize=(e=>jsPanel.minimize(l,e)),l.normalize=(e=>jsPanel.normalize(l,e)),l.reposition=((e,t)=>jsPanel.reposition(l,e,t)),l.resize=function(t=e.jsPanel.resizedefaults.width,o=e.jsPanel.resizedefaults.height,n=e.jsPanel.resizedefaults.callback){let s={},a=t;return e.isPlainObject(a)?"content"===a.resize&&(String(a.height).match(/[^0-9\.]/)||(a.height+="px"),String(a.width).match(/[^0-9\.]/)||(a.width+="px"),a.height=`calc(${a.height} + ${l.header.outerHeight()+"px"} + ${l.css("border-top-width")} + ${l.css("border-bottom-width")})`,a.width=`calc(${a.width} + ${l.css("border-left-width")} + ${l.css("border-right-width")})`):(s.width=t,s.height=o,s.callback=n,a=e.extend({},!1,e.jsPanel.resizedefaults,s)),jsPanel.resize(l,a),l},l.setTheme=((t=R.toLowerCase().replace(/ /g,""),o)=>{if(t=t.toLowerCase().replace(/ /g,""),jsPanel.clearTheme(l),"none"===R)return l.css("background-color","white"),l;const n=jsPanel.getThemeDetails(t);return n.bs?jsPanel.applyBootstrapTheme(l,n):jsPanel.themes.indexOf(n.color)>-1?jsPanel.applyBuiltInTheme(l,n):jsPanel.applyArbitraryTheme(l,n),c?jsPanel.applyThemeBorder(l,n):l.css({borderWidth:"",borderStyle:"",borderColor:""}),o&&e.isFunction(o)&&o.call(l,l),l}),l.smallify=(e=>jsPanel.smallify(l,e)),l.toolbarAdd=((e,t,o)=>jsPanel.toolbarAdd(l,e,t,o)),l.updateCachedData=(()=>{l.cachedData.top=l.css("top"),l.cachedData.left=l.css("left"),l.cachedData.width=l.css("width"),l.cachedData.height=l.css("height")}),l.dragit=(t=>("disable"===t?e(w.handles,l).css("pointer-events","none"):e(w.handles,l).css("pointer-events","auto"),l)),l.resizeit=(t=>("disable"===t?e(".jsPanel-resizeit-handle",l).css("pointer-events","none"):e(".jsPanel-resizeit-handle",l).css("pointer-events","auto"),l)),e(".jsPanel-btn-close",l).on("click",e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;jsPanel.close(l)}),e(".jsPanel-btn-minimize",l).on("click",e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;jsPanel.minimize(l)}),e(".jsPanel-btn-maximize",l).on("click",e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;jsPanel.maximize(l)}),e(".jsPanel-btn-normalize",l).on("click",e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;jsPanel.normalize(l)}),e(".jsPanel-btn-smallify, .jsPanel-btn-smallifyrev",l).on("click",e=>{if(e.preventDefault(),e.button&&e.button>0)return!1;jsPanel.smallify(l)}),l.appendTo(e(f)[0]),jsPanel.activePanels.list.push(o),e(document).trigger("jspanelloaded",o),l.data("container",f),l.setTheme(),Q)l.header.remove(),l.content[0].classList.add("jsPanel-content-noheader"),jsPanel.controls.forEach(e=>{l[0].setAttribute(`data-btn${e}`,"removed")});else if("closeonly"===z.controls?jsPanel.controls.forEach(e=>{"close"!==e&&jsPanel.setControlStatus(l,e,"remove")}):"none"===z.controls?jsPanel.controls.forEach(e=>{jsPanel.setControlStatus(l,e,"remove")}):jsPanel.controls.forEach(e=>{"disable"===z[e]?jsPanel.setControlStatus(l,e,"disable"):"remove"===z[e]?jsPanel.setControlStatus(l,e,"remove"):l[0].setAttribute(`data-btn${e}`,"enabled")}),x){let e=x;"string"==typeof e&&"<"!==e.substring(0,1)?l.header.logo.append(`<img src="${e}" alt="logo">`):l.header.logo.append(e)}(Q||e(".jsPanel-hdr").length<1)&&l.content.css("border","none"),jsPanel.configIconfont(l),"modal"===T?(jsPanel.insertModalBackdrop(l),l[0].classList.add("jsPanel-modal"),l.css("z-index",jsPanel.modalcount+9999)):"hint"===T?(l[0].classList.add("jsPanel-hint"),l.css("z-index",1e4)):T.tooltip&&(n=jsPanel.setTrigger($),l[0].classList.add("jsPanel-tooltip"),jsPanel.setTooltipClass(l),T.solo&&jsPanel.closePanels("tooltip"),jsPanel.setTooltipMode(l,n),e(n).closest(".jsPanel-modal")&&(l[0].style.zIndex=e(n).closest(".jsPanel-modal").css("z-index"))),T.tooltip&&n.classList.add("hasTooltip"),E&&!Q&&l.toolbarAdd("header",E),v&&l.toolbarAdd("footer",v),h&&(l.content.append(h),l.data("content",h)),u&&(l.option.contentAjax="string"==typeof u?{url:u,autoload:!0,autoresize:!0,autoreposition:!0}:Object.assign({autoresize:!0,autoreposition:!0},u),jsPanel.ajax(l)),e.isPlainObject(m)&&(m.src||m.srcdoc)&&jsPanel.iframe(l),T.connector&&jsPanel.addConnector(l);let B=O||j,A=B;if("string"==typeof B){B=B.trim().split(/\s{1,}/);for(let e=0;e<B.length;e++)B[e].match(/^\d{1,}$/)&&(B[e]=parseInt(B[e],10));A={width:B[0]||e.jsPanel.defaults.contentSize.width,height:B[1]||e.jsPanel.defaults.contentSize.height}}return 0===A.height&&(A.height="0"),O?(l.css({width:A.width,height:A.height}),l.contentResize()):l.content.css({width:A.width,height:A.height}),l.css({width:function(){return e(".jsPanel-content",l).length>0?l.content.outerWidth()+"px":j.width||e.jsPanel.defaults.contentSize.width},zIndex:function(){jsPanel.setZi(l)}}),l.content.css("width","100%"),$&&(jsPanel.position(l,$),jsPanel.calcPositionFactors(l)),l.css("opacity",1),l.data("status","normalized"),e(document).trigger("jspanelstatuschange",o),T||y&&(y.title&&l.header.headerbar.on("dblclick",e=>{e.preventDefault(),jsPanel.dblclickhelper(y.title,l)}),y.content&&l.content.on("dblclick",e=>{e.preventDefault(),jsPanel.dblclickhelper(y.content,l)}),y.footer&&l.footer.on("dblclick",e=>{e.preventDefault(),jsPanel.dblclickhelper(y.footer,l)})),"string"==typeof g?l.content.css("overflow",g):e.isPlainObject(g)&&l.content.css({"overflow-y":g.vertical||g["overflow-y"],"overflow-x":g.horizontal||g["overflow-x"]}),e.ui&&e.ui.draggable&&!w.disableui?e.isPlainObject(P)?l.draggable(P):"disabled"===P?(e(".jsPanel-headerlogo, .jsPanel-titlebar, .jsPanel-ftr",l).css("cursor","default"),l.draggable({disabled:!0})):e(".jsPanel-headerlogo, .jsPanel-titlebar, .jsPanel-ftr",l).css("cursor","default"):w?(jsPanel.dragit(l,w),w.disable&&l.dragit("disable")):e(".jsPanel-headerlogo, .jsPanel-titlebar, .jsPanel-ftr",l).css("cursor","default"),e.ui&&e.ui.resizable&&!S.disableui?e.isPlainObject(F)?l.resizable(F):"disabled"===F&&(l.resizable({disabled:!0}),e(".ui-icon-gripsmall-diagonal-se, .ui-resizable-handle.ui-resizable-sw",l).css({"background-image":"none","text-indent":-9999}),e(".ui-resizable-handle",l).css({cursor:"inherit"})):S&&(jsPanel.resizeit(l,S),S.disable&&l.resizeit("disable")),!0===X.rtl&&(e(".jsPanel-hdr, .jsPanel-headerbar, .jsPanel-titlebar, .jsPanel-controlbar, .jsPanel-hdr-toolbar, .jsPanel-ftr",l).addClass("jsPanel-rtl"),[l.header.title,l.content,e("*",l.header.toolbar),e("*",l.footer)].forEach(e=>{e.prop("dir","rtl"),X.lang&&e.prop("lang",X.lang)}),e(".ui-icon-gripsmall-diagonal-se",l).css({backgroundImage:"none",textIndent:-9999})),"string"==typeof I&&l.addClass(I).css("opacity",1),l.header.title.empty().prepend(C),l.updateCachedData(),"string"==typeof Y&&("maximize smallify"===Y?l.maximize().smallify():l[Y]()),"number"==typeof r&&r>0&&window.setTimeout(()=>{l&&l.close()},r),e.ui&&e.ui.resizable&&(l.on("resize",()=>jsPanel.contentResize(l)),l.on("resizestop",function(){"smallified"!==l.data("status")&&"smallifiedMax"!==l.data("status")||(l.hideControls([".jsPanel-btn-normalize",".jsPanel-btn-smallifyrev"]),l.data("status","normalized"),e(document).trigger("jspanelnormalized",o),e(document).trigger("jspanelstatuschange",o)),jsPanel.calcPositionFactors(l)})),e.ui&&e.ui.draggable&&l.on("dragstop",()=>jsPanel.calcPositionFactors(l)),jsPanel.evtStart.forEach(function(t){l.on(t,t=>{if(t.target.classList.contains("jsglyph-close")||t.target.classList.contains("jsglyph-minimize"))return;const o=e(t.target).closest(".jsPanel").css("z-index");!l[0].classList.contains("jsPanel-modal")&&o<=jsPanel.zi&&l.front()})}),p&&l[0].setAttribute("data-closeonescape","true"),L&&e(window).resize(function(t){if(t.target===window){let o=L,n=l.data("status");"maximized"!==n||e.isFunction(o)?"normalized"!==n&&"smallified"!==n&&"maximized"!==n||(e.isFunction(o)?o.call(l,t,l):l.reposition({left:function(){let t;return(t="body"===this.option.container?(e(window).outerWidth()-this.outerWidth())*this.hf:(this.parent().outerWidth()-this.outerWidth())*this.hf)<=0?0:t},top:function(){let t;return(t="body"===this.option.container?(e(window).outerHeight()-this.outerHeight())*this.vf:(this.parent().outerHeight()-this.outerHeight())*this.vf)<=0?0:t}})):l.maximize(!1,!1)}}),l[0].jspanel={options:l.option,close(...e){const t=e[0]||!1,o=e[1]||!1,n=e[2]||!1;jsPanel.close(l,t,o,n)},normalize:e=>jsPanel.normalize(l,e),maximize:e=>jsPanel.maximize(l,e),minimize:e=>jsPanel.minimize(l,e),smallify:e=>jsPanel.smallify(l,e),front:e=>jsPanel.front(l,e),closeChildpanels:()=>jsPanel.closeChildpanels(l),reposition:(e,t)=>jsPanel.reposition(l,e,t),resize:(e,t,o)=>l.resize(e,t,o),contentResize:e=>jsPanel.contentResize(l,e),contentReload:e=>jsPanel.contentReload(l,e),headerTitle:e=>jsPanel.headerTitle(l,e),headerControl:(e,t)=>jsPanel.headerControl(l,e,t),toolbarAdd:(e,t,o)=>jsPanel.toolbarAdd(l,e,t,o),setTheme:(e,t)=>l.setTheme(e,t),noop:()=>l,dragit:e=>l.dragit(e),resizeit:e=>l.resizeit(e)},d&&e.isFunction(d)?d.call(l,l):e.isArray(d)&&d.forEach(t=>{e.isFunction(t)&&t.call(l,l)}),l},e.jsPanel.defaults={autoclose:!1,border:!1,callback:!1,closeOnEscape:!1,container:"body",content:!1,contentAjax:!1,contentIframe:!1,contentOverflow:"hidden",contentSize:{width:400,height:200},custom:!1,dblclicks:!1,delayClose:0,draggable:{handle:"div.jsPanel-headerlogo, div.jsPanel-titlebar, div.jsPanel-ftr",opacity:.8},dragit:{axis:!1,containment:!1,grid:!1,handles:".jsPanel-headerlogo, .jsPanel-titlebar, .jsPanel-ftr.active",opacity:.8,start:!1,drag:!1,stop:!1,disable:!1,disableui:!1},footerToolbar:!1,headerControls:{close:!1,maximize:!1,minimize:!1,normalize:!1,smallify:!1,controls:"all",iconfont:"jsglyph"},headerLogo:!1,headerRemove:!1,headerTitle:"jsPanel",headerToolbar:!1,id:()=>`jsPanel-${jsPanel.id+=1}`,maximizedMargin:[5,5,5,5],minimizeTo:!0,onbeforeclose:!1,onbeforemaximize:!1,onbeforeminimize:!1,onbeforenormalize:!1,onbeforesmallify:!1,onbeforeunsmallify:!1,onclosed:!1,onmaximized:!1,onminimized:!1,onnormalized:!1,onbeforeresize:!1,onresized:!1,onsmallified:!1,onunsmallified:!1,onfronted:!1,onwindowresize:!1,paneltype:!1,position:"center",resizable:{handles:"n, e, s, w, ne, se, sw, nw",autoHide:!1,minWidth:40,minHeight:40},resizeit:{containment:!1,grid:!1,handles:"n, e, s, w, ne, se, sw, nw",minWidth:40,minHeight:40,maxWidth:1e4,maxHeight:1e4,start:!1,resize:!1,stop:!1,disable:!1,disableui:!1},rtl:!1,setstatus:!1,show:!1,template:!1,theme:"default"},e.jsPanel.modaldefaults={draggable:!1,dragit:!1,headerControls:{controls:"closeonly"},position:"center",resizable:!1,resizeit:!1,onwindowresize:!0},e.jsPanel.tooltipdefaults={draggable:!1,dragit:!1,headerControls:{controls:"closeonly"},position:{fixed:!1},resizable:!1,resizeit:!1},e.jsPanel.hintdefaults={autoclose:8e3,draggable:!1,dragit:!1,headerControls:{controls:"closeonly"},resizable:!1,resizeit:!1},e.jsPanel.contextmenudefaults={draggable:!1,resizable:!1,dragit:!1,resizeit:!1,headerRemove:!0,headerControls:{controls:"none"}},e.jsPanel.resizedefaults={width:"auto",height:"auto",minwidth:!1,maxwidth:!1,minheight:!1,maxheight:!1,resize:!1,callback:!1},e(document).ready(function(){document.body.addEventListener("click",t=>{e(t.target).closest(".jsPanel").length<1&&!t.target.classList.contains("hasTooltip")&&(jsPanel.closePanels("tooltip"),e(".hasTooltip").removeClass("hasTooltip")),jsPanel.closePanels("contextmenu")},!1),e("body").css("-ms-overflow-style","scrollbar").append('<div id="jsPanel-replacement-container">'),window.addEventListener("keydown",t=>{const o=t.key||t.code;"Escape"!==o&&"Esc"!==o||jsPanel.activePanels.list.sort(function(e,t){return document.getElementById(t).style.zIndex-document.getElementById(e).style.zIndex}).some(function(o){let n=e("#"+o),s=n.parent().closest(".jsPanel");if(jsPanel.closeOnEscape||n[0].getAttribute("data-closeonescape"))return s.length&&("closeparent"===jsPanel.closeOnEscape||n[0].getAttribute("data-closeonescape"))||t.shiftKey?(jsPanel.activePanels.getPanel(s[0].id).close(),!0):(jsPanel.activePanels.getPanel(n[0].id).close(),!0)})},!1)})}(jQuery);

Zerion Mini Shell 1.0