(function(){function h(a,c,b,d){if(b[d]){var e={};e[a+c]=!0;b[d]=e}}function p(a,c,b){var d=c._cookies,e=function(a){return encodeURIComponent(a).replace(/['()]/g,escape).replace(/\*/g,"%2A").replace(/%(?:7C|60|5E)/g,unescape)};if(a.matches){var f="",g=1;if(zk.mobile){if(l&&m||!l&&!m)k={"-90":!0,90:!0};f=k[window.orientation]?"portrait":"landscape"}else f=jq.innerWidth()>jq.innerHeight()?"landscape":"portrait";window.devicePixelRatio&&(g=window.devicePixelRatio);a=[(new Date).getTimezoneOffset(),
screen.width,screen.height,screen.colorDepth,jq.innerWidth(),jq.innerHeight(),jq.innerX(),jq.innerY(),g.toFixed(1),f,zk.mm.tz.guess(),a.matches,b.substring(16)];c.command(b,{$ZKCLIENTINFO$:a});d.$contains(b)||d.push(b);document.cookie="ZKMatchMedia="+e(d);document.cookie="ZKClientInfo="+e(JSON.stringify(a))}else d.$remove(b),document.cookie="ZKMatchMedia="+e(d)}var n={},q=/ZKMatchMedia=([^;]*)/,k={0:!0,180:!0},l=jq.innerWidth()>jq.innerHeight(),m=k[window.orientation];zk.override(zk.Widget.prototype,
n,{$binder:function(){for(var a=this;a&&!a.$ZKBINDER$;a=a.parent);return a?(a._$binder||(a._$binder=new zkbind.Binder(a,this)),a._$binder):null},$afterCommand:function(a,c){var b=this.$binder();b&&b.$doAfterCommand(a,c)},unbind_:function(){this._$binder&&(this._$binder.destroy(),this._$binder=null);n.unbind_.apply(this,arguments)}});zkbind.$=function(a,c){if(c=zk.Widget.$(a,c))return c.$binder();zk.error("Not found ZK Binder with ["+a+"]")};zkbind.Binder=zk.$extends(zk.Object,{$init:function(a,c){this.$supers("$init",
arguments);this.$view=a;this.$currentTarget=c;this._aftercmd={};if(a.$ZKMATCHMEDIA$){var b=[];if(matched=q.exec(document.cookie)){var d=matched[1];d&&(b=decodeURIComponent(d).trim().split(","))}this._cookies=b;var e=this;b=[];for(d=0;d<a.$ZKMATCHMEDIA$.length;d++){var f=a.$ZKMATCHMEDIA$[d],g=window.matchMedia(f.substring(16));f=function(a){return function(b){p(b,e,a)}}(f);g.addListener(f);f(g);b.push({mql:g,handler:f})}this._mediaQueryLists=b}},after:function(a,c){!c&&jq.isFunction(a)&&(c=a,a=this._lastcmd);
var b=this._aftercmd[a];b?b.push(c):this._aftercmd[a]=[c];return this},unAfter:function(a,c){for(var b=(a=this._aftercmd[a])?a.length:0;b--;)a[b]==c&&a.splice(b,1);return this},destroy:function(){this._aftercmd=null;if(null!=this._mediaQueryLists){for(var a=this._mediaQueryLists,c=0;c<a.length;c++)a[c].mql.removeListener(a[c].handler);this._cookies=this._mediaQueryLists=null}this.$currentTarget=this.$view=null},command:function(a,c,b,d){var e=this.$view;b&&(b.duplicateIgnore&&h("onBindCommand$",a,
b,"duplicateIgnore"),b.repeatIgnore&&h("onBindCommand$",a,b,"repeatIgnore"));zAu.send(new zk.Event(e,"onBindCommand$"+a,{cmd:a,args:c},zk.copy({toServer:!0},b)),void 0!=d?d:38);this._lastcmd=a;return this},globalCommand:function(a,c,b,d){var e=this.$view;b&&(b.duplicateIgnore&&h("onBindGlobalCommand$",a,b,"duplicateIgnore"),b.repeatIgnore&&h("onBindGlobalCommand$",a,b,"repeatIgnore"));zAu.send(new zk.Event(e,"onBindGlobalCommand$"+a,{cmd:a,args:c},zk.copy({toServer:!0},b)),void 0!=d?d:38);this._lastcmd=
a;return this},$doAfterCommand:function(a,c){a=this._aftercmd[a];for(var b=0,d=a?a.length:0;b<d;b++)a[b].apply(this,[c])}},{postCommand:function(a,c,b,d,e){(a=zk.Widget.$(a))&&(a=a.$binder())&&a.command(c,b,d,e)},postGlobalCommand:function(a,c,b,d,e){(a=zk.Widget.$(a))&&(a=a.$binder())&&a.globalCommand(c,b,d,e)}})})();
