var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(d,a,b){if(null==d)throw new TypeError("The 'this' value for String.prototype."+b+" must not be null or undefined");if(a instanceof RegExp)throw new TypeError("First argument to String.prototype."+b+" must not be a regular expression");return d+""};$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(d,a,b){d!=Array.prototype&&d!=Object.prototype&&(d[a]=b.value)};$jscomp.getGlobal=function(d){return"undefined"!=typeof window&&window===d?d:"undefined"!=typeof global&&null!=global?global:d};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(d,a,b,c){if(a){b=$jscomp.global;d=d.split(".");for(c=0;c<d.length-1;c++){var f=d[c];f in b||(b[f]={});b=b[f]}d=d[d.length-1];c=b[d];a=a(c);a!=c&&null!=a&&$jscomp.defineProperty(b,d,{configurable:!0,writable:!0,value:a})}};
$jscomp.polyfill("String.prototype.endsWith",function(d){return d?d:function(a,b){var c=$jscomp.checkStringArgs(this,a,"endsWith");a+="";void 0===b&&(b=c.length);b=Math.max(0,Math.min(b|0,c.length));for(var f=a.length;0<f&&0<b;)if(c[--b]!=a[--f])return!1;return 0>=f}},"es6","es3");
(function(){function d(a,b,c){var f=a.getCollapse();if(f&&"none"!=f){var d=a.$n("chdex"),n=a.isVertical(),e=a.$class,m="before"==f;f=m?e._prev(d):e._next(d);var g=zk.Widget.$(f),p=n?"height":"width",k=0;if(f){b||zWatch.fireDown("onHide",g);g.setDomVisible_(f,b);g.parent._fixChildDomVisible(g,b);var l=n&&f.cells.length?f.cells[0]:f;k=zk.parseInt(l.style[p]);!m&&g&&!g.nextSibling&&(l=a.$n("chdex2"))&&(l.style.display=b?"":"none",k+=zk.parseInt(l.style[p]))}if(d=m?e._next(d):e._prev(d))l=n&&d.cells.length?
d.cells[0]:d,(sz=l.style[p])&&-1<sz.indexOf("px")&&(k=zk.parseInt(l.style[p])+(b?-k:k),0>k&&(k=0),l.style[p]=k+"px");f&&b&&zUtl.fireShown(g);d&&zUtl.fireSized(zk.Widget.$(d),-1);a._fixNSDomClass();a._fixbtn();a._fixszAll();c&&!c.sendOnOpen||a.fire("onOpen",{open:b})}}zul.box.Splitter=zk.$extends(zul.Widget,{_collapse:"none",_open:!0,$define:{open:function(a,b){this.desktop&&d(this,a,b)}},isVertical:function(){var a=this.parent;return!a||a.isVertical()},getOrient:function(){var a=this.parent;return a?
a.getOrient():"vertical"},getCollapse:function(){return this._collapse},setCollapse:function(a){if(this._collapse!=a){var b=this._open;b||this.setOpen(!0,{sendOnOpen:!1});this._collapse=a;this.desktop&&(this._fixbtn(),this._fixsz());b||this.setOpen(!1,{sendOnOpen:!1})}},domClass_:function(a){var b=this.$supers("domClass_",arguments);a&&a.zclass||(b+=" "+this.$s("vertical"==this.getOrient()?"vertical":"horizontal"));return b},setZclass:function(){this.$supers("setZclass",arguments);this.desktop&&this._fixDomClass(!0)},
bind_:function(){this.$supers(zul.box.Splitter,"bind_",arguments);var a=this.parent;a&&!a._splitterKid&&a._bindWatch();zWatch.listen({onSize:this,beforeSize:this});this._fixDomClass();a=this.$n();var b=this.$class;this.$weave||jq(this.$n("btn")).click(b.onclick);this._fixbtn();this._drag=new zk.Draggable(this,a,{constraint:this.getOrient(),ignoredrag:b._ignoresizing,ghosting:b._ghostsizing,overlay:!0,zIndex:12E3,initSensitivity:0,snap:b._snap,endeffect:b._endDrag});this._shallClose=!this._open},unbind_:function(){zWatch.unlisten({onSize:this,
beforeSize:this});var a=this.$class,b;(b=this.$n("btn"))&&jq(b).unbind("click",a.onclick);this._drag.destroy();this._drag=null;this.$supers(zul.box.Splitter,"unbind_",arguments)},_fixDomClass:function(a){var b=this.$n().parentNode;b&&(this.isVertical()&&(b=b.parentNode),b&&b.id.endsWith("chdex")&&(b.className=this.$s("outer")));a&&this._fixbtn()},_fixNSDomClass:function(){jq(this.$n())[this._open?"removeClass":"addClass"](this.$s("nosplitter"))},_fixbtn:function(){var a=jq(this.$n("btn")),b=jq(this.$n("icon")),
c=this.getCollapse();c&&"none"!=c?(c="before"==c,this._open||(c=!c),this.isVertical()?jq(this.$n("icon")).removeClass(c?"z-icon-caret-down":"z-icon-caret-up").addClass(c?"z-icon-caret-up":"z-icon-caret-down"):jq(this.$n("icon")).removeClass(c?"z-icon-caret-right":"z-icon-caret-left").addClass(c?"z-icon-caret-left":"z-icon-caret-right"),a.removeClass(this.$s("button-disabled")),b.show()):(a.addClass(this.$s("button-disabled")),b.hide())},setBtnPos_:function(a){var b=this.$n("btn"),c=this.$n();a?b.style.marginLeft=
(c.offsetWidth-b.offsetWidth)/2+"px":b.style.marginTop=(c.offsetHeight-b.offsetHeight)/2+"px"},_fixsz:_zkf=function(){if(this.isRealVisible()){var a=this.$n(),b=a.parentNode;b&&(b.style.width="",this.getCollapse(),this.isVertical()?(a.style.width="100%",this.setBtnPos_(!0)):(a.style.height=(zk.webkit?b.parentNode.clientHeight:b.clientHeight)+"px",this.setBtnPos_()));this._shallClose&&(delete this._shallClose,d(this,!1,{sendOnOpen:!1}))}},onSize:_zkf,beforeSize:function(){this.$n().style[this.isVertical()?
"width":"height"]="";this.$n("btn").style[this.isVertical()?"margin-left":"margin-top"]=""},_fixszAll:function(){for(var a,b=this;b=b.parent;)b.$instanceof(zul.box.Box)&&(a=b);a?this.$class._fixKidSplts(a):this._fixsz()}},{onclick:function(a){a=zk.Widget.$(a);a.setOpen(!a._open)},_ignoresizing:function(a,b,c){b=a.control;if(!b._open||b.$n("icon")==c.domTarget)return!0;a=a.run={};c=b.$n();var d=b.$n("chdex"),r=zul.box.Splitter;a.prev=r._prev(d);a.next=r._next(d);if(!a.prev||!a.next)return!0;a.prevwgt=
b.previousSibling;a.nextwgt=b.nextSibling;a.z_offset=zk(c).cmOffset();return!1},_ghostsizing:function(a,b,c){a=zk(a.node.parentNode);jq(document.body).append('<div id="zk_ddghost" class="z-splitter-ghost" style="font-size:0;line-height:0;background:#AAA;position:absolute;top:'+b[1]+"px;left:"+b[0]+"px;width:"+a.offsetWidth()+"px;height:"+a.offsetHeight()+'px;"></div>');return jq("#zk_ddghost")[0]},_endDrag:function(a){var b=a.control,c=b.isVertical();b.$n();var d=zul.box.Splitter,r=d._fixLayout(b),
n="before"==b.getCollapse(),e=a.run,m=["width","height"];if(c){var g=e.z_point[1];var p=m[1];e.next&&e.next.cells.length&&(e.next=e.next.cells[0]);e.prev&&e.prev.cells.length&&(e.prev=e.prev.cells[0])}else g=e.z_point[0],p=m[0];var k=e.next,l=e.prev,t=e.nextwgt,u=e.prevwgt;0>g&&(k=e.prev,l=e.next,g=-g,n=!n);if(g){e=[t,u];t=[];u=[];if(k&&l){for(var q=[],h=0;2>h;h++)q[h]=m[h].charAt(0).toUpperCase()+m[h].slice(1);m=c?q[1]:q[0];s=k["client"+m];s2=l["client"+m];totalFd=s+s2;for(h=0;2>h;h++)if(c=e[h])c.getHflex()&&
(c.setHflex("false"),t[h]=!0),c.getVflex()&&(c.setVflex("false"),u[h]=!0),zWatch.fireDown("beforeSize",c);s-=g;0>s&&(s=0);g=totalFd-s;k.style[p]=s+"px";l.style[p]=g+"px";n?l.style.overflow="hidden":k.style.overflow="hidden";for(h=0;2>h;h++){if((c=e[h])&&t[h])c["set"+q[0]]("100%");if(c&&u[h])c["set"+q[1]]("100%");zUtl.fireSized(c,-1)}n=k["client"+m];c=totalFd-n;n!=s&&(k.style[p]=n+"px");c!=g&&(l.style[p]=c+"px")}d._unfixLayout(r);b._fixszAll();a.run=null}},_snap:function(a,b){var c=a.run;var d=a.control;
a=b[0];b=b[1];d.isVertical()?b<=c.z_offset[1]-c.prev.offsetHeight?b=c.z_offset[1]-c.prev.offsetHeight:(d=c.z_offset[1]+c.next.offsetHeight-d.$n().offsetHeight,b>d&&(b=d)):a<=c.z_offset[0]-c.prev.offsetWidth?a=c.z_offset[0]-c.prev.offsetWidth:(d=c.z_offset[0]+c.next.offsetWidth-d.$n().offsetWidth,a>d&&(a=d));c.z_point=[a-c.z_offset[0],b-c.z_offset[1]];return[a,b]},_next:function(a){return jq(a).next().next()[0]},_prev:function(a){return jq(a).prev().prev()[0]},_fixKidSplts:function(a){if(a.isVisible()){var b=
zul.box.Splitter;a.$instanceof(b)&&a._fixsz();for(a=a.firstChild;a;a=a.nextSibling)b._fixKidSplts(a)}}});zk.opera?(zul.box.Splitter._fixLayout=function(a){a=a.parent.$n();if("fixed"!=a.style.tableLayout){var b=[a,a.style.tableLayout];a.style.tableLayout="fixed";return b}},zul.box.Splitter._unfixLayout=function(a){a&&(a[0].style.tableLayout=a[1])}):zul.box.Splitter._fixLayout=zul.box.Splitter._unfixLayout=zk.$void})();
