var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,b){var c=$jscomp.propertyToPolyfillSymbol[b];if(null==c)return a[b];c=a[c];return void 0!==c?c:a[b]};
$jscomp.polyfill=function(a,b,c,d){b&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,b,c,d):$jscomp.polyfillUnisolated(a,b,c,d))};$jscomp.polyfillUnisolated=function(a,b,c,d){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))return;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.polyfillIsolated=function(a,b,c,d){var e=a.split(".");a=1===e.length;d=e[0];d=!a&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var f=0;f<e.length-1;f++){var m=e[f];if(!(m in d))return;d=d[m]}e=e[e.length-1];c=$jscomp.IS_SYMBOL_NATIVE&&"es6"===c?d[e]:null;b=b(c);null!=b&&(a?$jscomp.defineProperty($jscomp.polyfills,e,{configurable:!0,writable:!0,value:b}):b!==c&&(void 0===$jscomp.propertyToPolyfillSymbol[e]&&(c=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[e]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(e):$jscomp.POLYFILL_PREFIX+c+"$"+e),$jscomp.defineProperty(d,$jscomp.propertyToPolyfillSymbol[e],{configurable:!0,writable:!0,value:b})))};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(b,c){return $jscomp.findInternal(this,b,c).v}},"es6","es3");
(function(){zul.mesh.Frozen=zk.$extends(zul.Widget,{_start:0,_scrollScale:0,$define:{columns:[function(a){return 0>a?0:a},function(a){this._columns?this.desktop&&(this.onSize(),this.syncScroll()):this.rerender()}],start:function(){this.syncScroll()}},syncScroll:function(){var a=this.parent;a&&a._nativebar&&(a=this.$n("scrollX"))&&(a.scrollLeft=50*this._start)},syncScrollByParentBody:function(){var a=this.parent,b,c;a&&a._nativebar&&(b=a.ebody)&&0<(c=b.scrollLeft)&&(a=this.$n("scrollX"))&&(a.scrollLeft=
Math.ceil(c/(b.scrollWidth-b.clientWidth)*(a.scrollWidth-a.clientWidth)))},bind_:function(){this.$supers(zul.mesh.Frozen,"bind_",arguments);var a=this.parent,b=a.$n("body"),c=a.$n("foot");if(a._nativebar){zWatch.listen({onSize:this});var d=this.$n("scrollX"),e=jq.scrollbarWidth();this.$n().style.height=this.$n("cave").style.height=this.$n("right").style.height=d.style.height=d.firstChild.style.height=jq.px0(zk.ie?e+1:e);a._currentLeft=0;this.domListen_(d,"onScroll");(a=a.$n("head"))&&this.domListen_(a,
"onScroll","_doHeadScroll")}else this._shallSyncScale=!0;zWatch.listen({onResponse:this});b&&jq(b).addClass("z-word-nowrap");c&&jq(c).addClass("z-word-nowrap")},unbind_:function(){var a=this.parent,b=a.$n("body"),c=a.$n("foot"),d=a.$n("head");a._nativebar?(this.domUnlisten_(this.$n("scrollX"),"onScroll"),a.unlisten({onScroll:this.proxy(this._onScroll)}),zWatch.unlisten({onSize:this}),d&&this.domUnlisten_(d,"onScroll","_doHeadScroll")):this._shallSyncScale=!1;zWatch.unlisten({onResponse:this});b&&
jq(b).removeClass("z-word-nowrap");c&&jq(c).removeClass("z-word-nowrap");this.$supers(zul.mesh.Frozen,"unbind_",arguments)},onResponse:function(){if(this.parent._nativebar)this._syncFrozenNow();else if(this._shallSyncScale){var a=this.parent.ehdfaker;a&&(this._scrollScale=a.childNodes.length-this._columns-1);this._shallSyncScale=!1}},onSize:function(){if(this._columns){var a=this;a._syncFrozen();var b=this.parent,c=b.head;b._nativebar&&c&&(b=(b=c.$n())?b.cells?b.cells[0]:null:null)&&(c=b.style,c.height||
(c.height=b.offsetHeight+"px"));setTimeout(function(){var d=a.parent;if(d.eheadtbl&&d._nativebar){var e=d._getFirstRowCells(d.eheadrows),f=d.head;f=e.length-jq(f).find(f.$n("bar")).length;var m=a._columns,q=0;if(e&&!(0>=f)){for(var g=d.head.firstChild;g;g=g.nextSibling)g.isVisible()||--f;for(g=0;g<m;g++)q+=e[g].offsetWidth;d._deleteFakeRow(d.eheadrows);a.$n("cave").style.width=jq.px0(q);e=a.$n("scrollX");g=d.$n("body").offsetWidth;d.$n("frozen").style.width=jq.px0(g);g-=q;e.style.width=jq.px0(g);
e.firstChild.style.width=jq.px0(g+50*(f-m-1));a.syncScroll()}}a._syncFrozenNow()})}},_syncFrozen:function(){this._shallSync=!0},_syncFrozenNow:function(){var a=this._start;this._shallSync&&a&&this._doScrollNow(a,!0);this._shallSync=!1},beforeParentChanged_:function(a){this.desktop&&this._lastScale&&this._doScroll(0);this.$supers("beforeParentChanged_",arguments)},_onScroll:function(a){if(a.data&&zk.currentFocus){var b=this.parent,c,d=this,e=function(){var f=zk.currentFocus;if(f){c=b.getFocusCell(f.$n());
var m;c&&0<=(m=c.cellIndex-d._columns)&&(d.setStart(m),b.ebody.scrollLeft=0,b.ehead&&(b.ehead.scrollLeft=0))}};b&&(11>zk.ie?setTimeout(e,0):e());a.stop()}},_doHeadScroll:function(a){var b=a.domTarget,c=Math.ceil(b.scrollLeft/50);b.scrollLeft&&this._lastScale!=c&&(a.data=b.scrollLeft,this._onScroll(a))},_doScroll:function(a){var b=this.parent._nativebar?Math.ceil(this.$n("scrollX").scrollLeft/50):Math.ceil(a);if(this._lastScale!=b){var c=this;this._delayedScroll&&clearTimeout(this._delayedScroll);
this._delayedScroll=setTimeout(function(){c._lastScale=b;c._doScrollNow(b);c.smartUpdate("start",b);c._start=b;c._delayedScroll=null},0)}},_doScrollNow:function(a,b){var c=0,d=this.parent,e=a,f=this._columns,m=zul.mesh.MeshWidget.WIDTH0;a=zk(d.ebody).hasVScroll()?jq.scrollbarWidth():0;if(d.head){var q=d.head.nChildren,g=d.head.$n().cells,k=d.ehdfaker.firstChild,t=d.foot?d.efootrows:null;t=t?t.rows[0].cells:null;for(var h,l=0;k&&l<q;k=k.nextSibling,l++)if(-1==k.style.width.indexOf("px")){var p=k.style.width=
jq.px0(g[l].offsetWidth),r=zk.Widget.$(k);if(!r.$instanceof(zul.mesh.HeadWidget)){if(h=r.$n("bdfaker"))h.style.width=p;if(h=r.$n("ftfaker"))h.style.width=p}}k=[];for(l=f;l<q;l++){f=g[l];var u=(p=zk.Widget.$(f))&&p.isVisible();r=!1;if(p.isVisible()){if(0>=e--){var v=u?zk.ie?Math.max(jq(f).width(),0):f.offsetWidth:0;if(b||2>v){var n=p._origWd||jq.px(v);1<v&&(h=jq("#"+f.id+"-hdfaker")[0])&&h.style.width&&(n=h.style.width);p._origWd=null;r=!0}}else if(b||0!=(zk.ie?Math.max(jq(f).width(),0):f.offsetWidth))h=
jq("#"+f.id+"-hdfaker")[0],h.style.width&&1<zk.parseInt(h.style.width)&&(p._origWd=h.style.width),n=m,r=!0;(b||r)&&k.push({node:f,index:l,width:n})}}for(jq(d).css({position:"absolute",left:-9999});b=k.shift();){f=b.node;n=b.width;l=b.index;if(h=jq("#"+f.id+"-hdfaker")[0])h.style.width=n;(h=jq("#"+f.id+"-bdfaker")[0])&&u&&(h.style.width=n);if(h=jq("#"+f.id+"-ftfaker")[0])h.style.width=n;g[l].style.width=n;t&&t.length>l&&(t[l].style.width=n)}k=d.ehdfaker.firstChild;for(l=0;k&&l<q;k=k.nextSibling,l++)"none"!=
k.style.display&&(c+=zk.parseInt(k.style.width));c+=a;jq(d).css({position:"",left:""})}if(u=d.eheadtbl)u.style.width=jq.px(c);if(u=d.ebodytbl)u.style.width=jq.px(c-a);if(a=d.efoottbl)a.style.width=jq.px(c);d._restoreFocus();zk.ie9_&&(f=d.$n(),f.className+=" ",f.className.trim())}})})();
