var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
$jscomp.polyfill("String.prototype.startsWith",function(a){return a?a:function(a,c){var b=$jscomp.checkStringArgs(this,a,"startsWith");a+="";var e=b.length,g=a.length;c=Math.max(0,Math.min(c|0,b.length));for(var f=0;f<g&&c<e;)if(b[c++]!=a[f++])return!1;return f>=g}},"es6","es3");$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var g=a[e];if(b.call(c,g,e,a))return{i:e,v:g}}return{i:-1,v:void 0}};
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
(function(){zul.wnd.Panel=zk.$extends(zul.Widget,{_border:"none",_title:"",_open:!0,_minheight:100,_minwidth:200,_tabindex:0,$init:function(){this.$supers("$init",arguments);this.listen({onMaximize:this,onClose:this,onMove:this,onSize:this.onSizeEvent},-1E3);this._skipper=new zul.wnd.PanelSkipper(this)},$define:{minheight:null,minwidth:null,sizable:function(a){this.desktop&&(a?this._makeSizer():this._sizer&&(this._sizer.destroy(),this._sizer=null))},movable:_zkf=function(){var a=this._lastSize;this.rerender(this._skipper);
a&&(this._lastSize=a)},floatable:_zkf,maximizable:_zkf,minimizable:_zkf,collapsible:_zkf,closable:_zkf,border:function(){var a=this._lastSize;this.rerender();a&&(this._lastSize=a)},title:function(){if(this.caption)this.caption.updateDomContent_();else{var a=this._lastSize;this.rerender(this._skipper);a&&(this._lastSize=a)}},open:function(a,b){var c=this.$n(),d=this.getCollapseOpenIconClass_(),e=this.getCollapseCloseIconClass_();if(c){var g=jq(this.$n("body"));g[0]&&!g.is(":animated")&&(a?(jq(c).removeClass(this.$s("collapsed")),
jq(this.$n("exp")).attr("title",msgzul.PANEL_COLLAPSE).children("."+e).removeClass(e).addClass(d),g.zk.slideDown(this)):(jq(c).addClass(this.$s("collapsed")),jq(this.$n("exp")).attr("title",msgzul.PANEL_EXPAND).children("."+d).removeClass(d).addClass(e),this._hideShadow(),g.zk.slideUp(this)),b||this.fire("onOpen",{open:a}))}},maximized:function(a,b){var c,d=this.$n();if(d){var e=zk(d),g=e.isRealVisible();if(g||!a){var f=d.style;var k=this.getMaximizableIconClass_();var l=this.getMaximizedIconClass_();
if(a){jq(this.$n("max")).addClass(this.$s("maximized")).attr("title",msgzul.PANEL_RESTORE).children("."+k).removeClass(k).addClass(l);this._hideShadow();this._collapsible&&!this._open&&(e.jq.removeClass(this.$s("collapsed")),k=this.$n("body"))&&(k.style.display="");var h=(c=this.isFloatable())?jq(d).offsetParent():jq(d).parent();k=h[0].clientHeight;zk.isLoaded("zkmax.layout")&&this.parent.$instanceof(zkmax.layout.Portalchildren)&&(l=this.parent.parent,"whole"==l.getMaximizedMode()&&(this._inWholeMode=
!0,c=l.$n(),l=c.style,k=c.clientHeight,h=this._oldNodeInfo={_scrollTop:c.parentNode.scrollTop},c.parentNode.scrollTop=0,e.makeVParent(),zWatch.fireDown("onVParent",this),h._pos=f.position,h._ppos=l.position,h._zIndex=f.zIndex,f.position="absolute",this.setFloating_(!0),this.setTopmost(),c.appendChild(d),l.position="relative",l.height||(l.height=jq.px0(k),h._pheight=!0)));h=(c=this.isFloatable())?jq(d).offsetParent():jq(d).parent();l=f.left;var m=f.top;var n=f.width;var p=f.height;f.top="-10000px";
f.left="-10000px";d=h[0].clientWidth;c||(d-=h.zk.paddingWidth(),d=e.revisedWidth(d),k-=h.zk.paddingHeight(),k=e.revisedHeight(k));f.width=jq.px0(d);f.height=jq.px0(k);this._lastSize||(this._lastSize={l:l,t:m,w:n,h:p});f.top="0";f.left="0";n=f.width;p=f.height}else{m=this.$n("max");jq(m).removeClass(this.$s("maximized")).attr("title",msgzul.PANEL_MAXIMIZE).children("."+l).removeClass(l).addClass(k);this._lastSize&&(f.left=this._lastSize.l,f.top=this._lastSize.t,f.width=this._lastSize.w,f.height=this._lastSize.h,
this._lastSize=null);l=f.left;m=f.top;n=f.width;p=f.height;this._collapsible&&!this._open&&(jq(d).addClass(this.$s("collapsed")),k=this.$n("body"))&&(k.style.display="none");if(k=this.panelchildren?this.panelchildren.$n():null)k.style.width=k.style.height="";this._inWholeMode&&(e.undoVParent(),zWatch.fireDown("onVParent",this),h=this._oldNodeInfo,d.style.position=h?h._pos:"",this.setZIndex(h?h._zIndex:"",{fire:!0}),this.setFloating_(!1),c=this.parent.parent.$n(),c.style.position=h?h._ppos:"",c.parentNode.scrollTop=
h?h._scrollTop:0,h&&h._pheight&&(c.style.height=""),this._oldNodeInfo=null,this._inWholeMode=!1)}!b&&g&&(this._visible=!0,this.fire("onMaximize",{left:l,top:m,width:n,height:p,maximized:a,fromServer:b}));g&&zUtl.fireSized(this)}}},minimized:function(a,b){this._maximized&&this.setMaximized(!1);var c=this.$n();if(c){var d=c.style;a?(zWatch.fireDown("onHide",this),jq(c).hide()):(jq(c).show(),zUtl.fireShown(this));b||(this._visible=!1,this.fire("onMinimize",{left:d.left,top:d.top,width:d.width,height:d.height,
minimized:a}))}},tbar:function(a){this.tbar=zk.Widget.$(a);this.bbar==this.tbar&&(this.bbar=null);this.fbar==this.tbar&&(this.fbar=null);this.rerender()},bbar:function(a){this.bbar=zk.Widget.$(a);this.tbar==this.bbar&&(this.tbar=null);this.fbar==this.bbar&&(this.fbar=null);this.rerender()},fbar:function(a){this.fbar=zk.Widget.$(a);this.tbar==this.fbar&&(this.tbar=null);this.bbar==this.fbar&&(this.bbar=null);this.rerender()}},setVisible:function(a){this._visible!=a&&(this._maximized?this.setMaximized(!1):
this._minimized&&this.setMinimized(!1),this.$supers("setVisible",arguments))},setHeight:function(){this.$supers("setHeight",arguments);this.desktop&&zUtl.fireSized(this)},setWidth:function(){this.$supers("setWidth",arguments);this.desktop&&zUtl.fireSized(this)},setTop:function(){this._hideShadow();this.$supers("setTop",arguments);this.zsync()},setLeft:function(){this._hideShadow();this.$supers("setLeft",arguments);this.zsync()},updateDomStyle_:function(){this.$supers("updateDomStyle_",arguments);
this.desktop&&zUtl.fireSized(this)},addToolbar:function(a,b){switch(a){case "tbar":this.tbar=b;break;case "bbar":this.bbar=b;break;case "fbar":this.fbar=b;break;default:return!1}return this.appendChild(b)},onClose:function(){this.inServer&&this.isListen("onClose",{asapOnly:1})||this.parent.removeChild(this)},onMove:function(a){this._left=a.left;this._top=a.top},onMaximize:function(a){a=a.data;this._top=a.top;this._left=a.left;this._height=a.height;this._width=a.width},onSizeEvent:function(a){var b=
a.data,c=this.$n(),d=c.style;this._hideShadow();b.width!=d.width&&(this._width=d.width=b.width);b.height!=d.height&&(this._height=d.height=b.height,this._fixHgh(!0));if(b.left!=d.left||b.top!=d.top)d.left=b.left,d.top=b.top,this.fire("onMove",zk.copy({left:c.style.left,top:c.style.top},a.data),{ignorable:!0});this.zsync();var e=this;setTimeout(function(){zUtl.fireSized(e)})},setFlexSizeH_:function(a,b,c,d){d&&(c+=this._titleHeight(a));this.$supers("setFlexSizeH_",arguments)},setFlexSizeW_:function(a,
b,c,d){d&&this.caption&&c==this.caption.$n().offsetWidth&&(c+=zk(this.$n("head")).padBorderWidth());this.$supers("setFlexSizeW_",arguments)},beforeSize:function(){this._flexListened||(this.$n("body").style.width="")},resetSize_:function(a){this.$supers(zul.wnd.Panel,"resetSize_",arguments);this.$n("body").style["w"==a?"width":"height"]=""},onSize:function(){return function(a){this._hideShadow();if(this._maximized&&this._lastSize){var b=this.$n(),c=zk(b),d=this.isFloatable(),e=d?jq(b).offsetParent():
jq(b).parent();b=b.style;var g=e[0].clientWidth;d||(g-=e.zk.paddingWidth(),g=c.revisedWidth(g));b.width=jq.px0(g);this._open&&(g=e[0].clientHeight,d||(g-=e.zk.paddingHeight(),g=c.revisedHeight(g)),b.height=jq.px0(g))}this.tbar&&a.fireDown(this.tbar);this.bbar&&a.fireDown(this.bbar);this.fbar&&a.fireDown(this.fbar);this._fixHgh(!0);this._fixWdh();this.zsync()}}(),onHide:function(){this._hideShadow()},_fixHgh:function(a){var b;if((b=this.panelchildren)&&!b.z_rod&&(a||this.isRealVisible())){a=this.$n();
b=b.$n();var c=a.style.height;c&&"auto"!=c&&(b.style.height=jq.px0(this._offsetHeight(a)))}},_fixWdh:function(){var a=this.panelchildren;if(a&&!a.z_rod&&this.isRealVisible()){a=a.$n();var b,c;a&&(b=a.style)&&(c=b.width)&&"auto"!=c&&(c=zk(this.$n()).contentWidth(),b.width=c-zk(this.$n("body")).padBorderWidth()+"px")}},_rounded:_zkf=function(){return this._border.startsWith("rounded")},isFramable:_zkf,_bordered:function(){var a;return"none"!=(a=this._border)&&"rounded"!=a},_offsetHeight:function(a){var b=
this._titleHeight(),c=this.$n("body");a=zk(b?a:c).contentHeight()-this._titleHeight();b&&(a-=zk(c).padBorderHeight());b=this.tbar?this.$n("tb"):null;c=this.bbar?this.$n("bb"):null;var d=this.fbar?this.$n("fb"):null;b&&(a-=b.offsetHeight);c&&(a-=c.offsetHeight);d&&(a-=d.offsetHeight);return a},_titleHeight:function(){var a=this.getTitle()||this.caption?this.$n("head"):null;return a?a.offsetHeight:0},onFloatUp:function(a){if(this._visible&&this.isFloatable())for(a=a.origin;a;a=a.parent){if(a==this){this.setTopmost();
break}if(a.isFloating_())break}},_makeSizer:function(){if(!this._sizer){this.domListen_(this.$n(),"onMouseMove");this.domListen_(this.$n(),"onMouseOut");var a=this.$class;this._sizer=new zk.Draggable(this,null,{stackup:!0,draw:a._drawsizing,snap:a._snapsizing,starteffect:a._startsizing,ghosting:a._ghostsizing,endghosting:a._endghostsizing,ignoredrag:a._ignoresizing,endeffect:a._aftersizing})}},_initFloat:function(){var a=this.$n();if(!a.style.top||!a.style.left){var b=zk(a).revisedOffset();a.style.left=
jq.px(b[0]);a.style.top=jq.px(b[1])}a.style.position="absolute";this.isMovable()&&this._initMove();this.zsync();this.isRealVisible()&&this.setTopmost()},_initMove:function(a){if((a=this.$n("head"))&&!this._drag){jq(a).addClass(this.$s("header-move"));var b=this.$class;this._drag=new zk.Draggable(this,null,{handle:a,stackup:!0,starteffect:b._startmove,ignoredrag:b._ignoremove,endeffect:b._aftermove})}},zsync:function(){this.$supers("zsync",arguments);if(this.isFloatable()){var a=this.$n("body");a&&
zk(a).isRealVisible()&&(this._shadow||(this._shadow=new zk.eff.Shadow(this.$n(),{left:-4,right:4,top:-2,bottom:3})),this._maximized||this._minimized||!this._visible?this._hideShadow():this._shadow.sync())}else this._shadow&&(this._shadow.destroy(),this._shadow=null)},_hideShadow:function(){var a=this._shadow;a&&a.hide()},afterAnima_:function(a){this.$supers("afterAnima_",arguments);var b=this.parent;if(b.getHflex()&&"min"!=b.getHflex()||b.getVflex()&&"min"!=b.getVflex())zUtl.fireSized(b);else for(var c=
b.firstChild;c;c=c.nextSibling)if(c!=this){var d=c.getVflex();if(d&&"min"!=d){zUtl.fireSized(b);break}}},bind_:function(a,b,c){this.$supers(zul.wnd.Panel,"bind_",arguments);zWatch.listen({onSize:this,onHide:this});this._sizable&&this._makeSizer();if(this.isFloatable()&&(zWatch.listen({onFloatUp:this}),this.setFloating_(!0),this._initFloat(),!zk.css3))jq.onzsync(this);if(this._maximizable&&this._maximized){var d=this;c.push(function(){d._maximized=!1;d.setMaximized(!0,!0)})}},unbind_:function(){if(this._inWholeMode){var a=
this.$n(),b;if(9<zk.ie){var c=jq(this.$n()).find("iframe");c.length&&c.hide().remove()}zk(a).undoVParent();(a=this.parent)&&(a=a.parent)&&(a=a.$n())&&(b=this._oldNodeInfo)&&(a.style.position=b._ppos,a.parentNode.scrollTop=b._scrollTop);this._inWholeMode=!1}zWatch.unlisten({onSize:this,onHide:this,onFloatUp:this});this.setFloating_(!1);zk.css3||jq.unzsync(this);this._shadow&&(this._shadow.destroy(),this._shadow=null);this._drag&&(this._drag.destroy(),this._drag=null);this._sizer&&(this._sizer.destroy(),
this._sizer=null);this.domUnlisten_(this.$n(),"onMouseMove");this.domUnlisten_(this.$n(),"onMouseOut");this.$supers(zul.wnd.Panel,"unbind_",arguments)},_doMouseMove:function(a){if(this._sizer&&zUtl.isAncestor(this,a.target)){var b=this.$n();a=this.$class._insizer(b,zk(b).revisedOffset(),a.pageX,a.pageY);var c=this.isMovable()?this.$n("head"):!1;!this._maximized&&this._open&&a?(void 0==this._backupCursor&&(this._backupCursor=b.style.cursor),b.style.cursor=1==a?"n-resize":2==a?"ne-resize":3==a?"e-resize":
4==a?"se-resize":5==a?"s-resize":6==a?"sw-resize":7==a?"w-resize":"nw-resize",c&&jq(c).removeClass(this.$s("header-move"))):(b.style.cursor=this._backupCursor||"",c&&jq(c).addClass(this.$s("header-move")))}},_doMouseOut:function(a){this.$n().style.cursor=this._backupCursor||""},doClick_:function(a){var b=this.$n("max"),c=this.$n("min"),d=a.domTarget;d.id||(d=d.parentNode);switch(d){case this.$n("close"):this.fire("onClose");break;case b:this.setMaximized(!this._maximized);break;case c:this.setMinimized(!this._minimized);
break;case this.$n("exp"):b=(b=this.$n("body"))?zk(b).isVisible():this._open;!b==this._open&&(this._open=b);this.setOpen(!b);break;default:this.$supers("doClick_",arguments);return}a.stop()},doKeyDown_:function(a){var b=a.domTarget,c=a.keyCode;if("9"==c||"16"==c)this.$supers("doKeyDown_",arguments);else switch(b.id||(b=b.parentNode),b){case this.$n("close"):this.fire("onClose");break;case this.$n("max"):this.setMaximized(!this._maximized);break;case this.$n("min"):this.setMinimized(!this._minimized);
break;case this.$n("exp"):b=(b=this.$n("body"))?zk(b).isVisible():this._open;!b==this._open&&(this._open=b);this.setOpen(!b);break;default:this.$supers("doKeyDown_",arguments)}},domClass_:function(a){var b=this.$supers("domClass_",arguments);if(!a||!a.zclass){var c=this._bordered()?"":this.$s("noborder");c&&(b+=(b?" ":"")+c);(c=this._open?"":this.$s("collapsed"))&&(b+=(b?" ":"")+c);this.getTitle()||this.caption||(b+=" "+this.$s("noheader"));this._rounded()||(b+=" "+this.$s("noframe"))}return b},onChildAdded_:function(a){this.$supers("onChildAdded_",
arguments);a.$instanceof(zul.wgt.Caption)?this.caption=a:a.$instanceof(zul.wnd.Panelchildren)?this.panelchildren=a:a.$instanceof(zul.wgt.Toolbar)&&(this.firstChild==a||this.nChildren==(this.caption?2:1)?this.tbar=a:this.lastChild==a&&a.previousSibling.$instanceof(zul.wgt.Toolbar)?this.fbar=a:a.previousSibling.$instanceof(zul.wnd.Panelchildren)&&(this.bbar=a));this.rerender()},onChildRemoved_:function(a){this.$supers("onChildRemoved_",arguments);a==this.caption?this.caption=null:a==this.panelchildren?
this.panelchildren=null:a==this.tbar?this.tbar=null:a==this.bbar?this.bbar=null:a==this.fbar&&(this.fbar=null);this.childReplacing_||this.rerender()},onChildVisible_:function(a){this.$supers("onChildVisible_",arguments);a!=this.tbar&&a!=this.bbar&&a!=this.fbar||!this.$n()||this._fixHgh()},getChildMinSize_:function(a,b){var c=!0;b==this.caption&&(c="w"==a?!!b.$n().style.width:!!b.$n().style.height);return c?this.$supers("getChildMinSize_",arguments):0},isExcludedHflex_:function(){if(zk.isLoaded("zkmax.layout")&&
this.parent.$instanceof(zkmax.layout.Portalchildren)){var a=this.parent;if(a.parent)return a.parent.isVertical()}},isExcludedVflex_:function(){if(zk.isLoaded("zkmax.layout")&&this.parent.$instanceof(zkmax.layout.Portalchildren)){var a=this.parent;if(a.parent)return!a.parent.isVertical()}},getCollapseOpenIconClass_:function(){return"z-icon-angle-up"},getCollapseCloseIconClass_:function(){return"z-icon-angle-down"},getClosableIconClass_:function(){return"z-icon-times"},getMaximizableIconClass_:function(){return"z-icon-expand"},
getMaximizedIconClass_:function(){return"z-icon-compress"},getMinimizableIconClass_:function(){return"z-icon-minus"}},{_startmove:function(a){a.control._hideShadow();a=a.node;a.style.top&&0<=a.style.top.indexOf("%")&&(a.style.top=a.offsetTop+"px");a.style.left&&0<=a.style.left.indexOf("%")&&(a.style.left=a.offsetLeft+"px")},_ignoremove:function(a,b,c){a=a.control;c=c.domTarget;c.id||(c=c.parentNode);switch(c){case a.$n("close"):case a.$n("max"):case a.$n("min"):case a.$n("exp"):return!0}return!1},
_aftermove:function(a,b){a.control.zsync();zk(a.control).redoCSS(-1,{fixFontIcon:!0})},_startsizing:zul.wnd.Window._startsizing,_ghostsizing:zul.wnd.Window._ghostsizing,_endghostsizing:zul.wnd.Window._endghostsizing,_insizer:zul.wnd.Window._insizer,_ignoresizing:function(a,b,c){c=a.node;var d=a.control;if(d._maximized||!d._open)return!0;var e=zk(c).revisedOffset();return(b=d.$class._insizer(c,e,b[0],b[1]))?(d._hideShadow(),a.z_dir=b,a.z_box={top:e[1],left:e[0],height:c.offsetHeight,width:c.offsetWidth,
minHeight:zk.parseInt(d.getMinheight()),minWidth:zk.parseInt(d.getMinwidth())},a.z_orgzi=c.style.zIndex,!1):!0},_snapsizing:zul.wnd.Window._snapsizing,_aftersizing:zul.wnd.Window._aftersizing,_drawsizing:zul.wnd.Window._drawsizing});zul.wnd.PanelSkipper=zk.$extends(zk.Skipper,{$init:function(a){this._p=a},skip:function(a,b){if(a=jq(b||a.uuid+"-body",zk)[0])return a.parentNode.removeChild(a),a},restore:function(){this.$supers("restore",arguments);this._p.zsync()}});zul.wnd.PanelRenderer={isFrameRequired:function(a){return!0}}})();
