var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(g,h,k){if(null==g)throw new TypeError("The 'this' value for String.prototype."+k+" must not be null or undefined");if(h instanceof RegExp)throw new TypeError("First argument to String.prototype."+k+" must not be a regular expression");return g+""};$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(g,h,k){g!=Array.prototype&&g!=Object.prototype&&(g[h]=k.value)};$jscomp.getGlobal=function(g){return"undefined"!=typeof window&&window===g?g:"undefined"!=typeof global&&null!=global?global:g};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(g,h,k,p){if(h){k=$jscomp.global;g=g.split(".");for(p=0;p<g.length-1;p++){var q=g[p];q in k||(k[q]={});k=k[q]}g=g[g.length-1];p=k[g];h=h(p);h!=p&&null!=h&&$jscomp.defineProperty(k,g,{configurable:!0,writable:!0,value:h})}};
$jscomp.polyfill("String.prototype.startsWith",function(g){return g?g:function(g,k){var h=$jscomp.checkStringArgs(this,g,"startsWith");g+="";var q=h.length,v=g.length;k=Math.max(0,Math.min(k|0,h.length));for(var u=0;u<v&&k<q;)if(h[k++]!=g[u++])return!1;return u>=v}},"es6","es3");zjq=function(g){this.jq=g};
(function(g,h){function k(a){if(a.offsetParent)return a.offsetParent;if(a==g.body)return a;for(;(a=a.parentNode)&&a!=g.body;)if(a.style&&"static"!=jq(a).css("position"))return a;return g.body}function p(a){zk.afterAnimate(function(){try{a.focus();var b=zk.Widget.$(a);b&&(zk.currentFocus=b);zjq.fixInput(a)}catch(c){zk.debugLog(c.message||c)}},-1)}function q(a){try{a.select()}catch(b){zk.debugLog(b.message||b)}}function v(){this.submit&&(jq.Event.fire(this,"submit"),this.submit())}function u(){var a=
jq(this);a.css("user-select","none");if(zk.ie11_||zk.edge)a.on("selectstart",zk.$void)}function E(){var a=jq(this);a.css("user-select","");(zk.ie11_||zk.edge)&&a.off("selectstart",zk.$void)}function F(a,b,c,d){if(a&&b){var e=zk(a).revisedOffset(),f=c?c.oft:zk(b).revisedOffset(),g=f[1]-e[1]+(a==t()?0:a.scrollTop);e=f[0]-e[0]+(a==t()?0:a.scrollLeft);var l=e+(c?c.w:b.offsetWidth),h=g+(c?c.h:b.offsetHeight);if(a.scrollTop>g){a.scrollTop=g;var k=!0}else h>a.clientHeight+a.scrollTop&&(a.scrollTop=c?h-(a.clientHeight+
(b.parentNode==a?0:a.scrollTop)):h,k=!0);d||(a.scrollLeft>e?(a.scrollLeft=e,k=!0):l>a.clientWidth+a.scrollLeft&&(a.scrollLeft=c?l-(a.clientWidth+(b.parentNode==a?0:a.scrollLeft)):l,k=!0));if(k||!c)c?c.oft=zk(c.el).revisedOffset():c={oft:f,h:b.offsetHeight,w:b.offsetWidth,el:b};return c}}function z(a){var b=0,c=0;if(zk.gecko)for(var d=a.parentNode;d&&d!=g.body&&1===d.nodeType;){var e=jq(d),f=e.css("position");if("relative"==f||"absolute"==f)b+=zk.parseInt(e.css("border-top-width")),c+=zk.parseInt(e.css("border-left-width"));
d=d.offsetParent}do if("fixed"==jq(a).css("position")){b+=jq.innerY()+a.offsetTop;c+=jq.innerX()+a.offsetLeft;break}else{if(zk.opera){m&&jq.nodeName(a,"div")&&0!=a.scrollTop&&(b+=a.scrollTop||0);var m=jq.nodeName(a,"span","input")}b+=a.offsetTop||0;c+=a.offsetLeft||0;a=zk.gecko&&a!=g.body?k(a):a.offsetParent}while(a);return[c,b]}function A(a,b,c){c?(a=a.revisedOffset(),b.left=a[0],b.top=a[1]):(b.left=a.offsetLeft(),b.top=a.offsetTop());return b}function B(){if(y.length){for(var a;a=y.pop();)try{zjq._fixCSS(a)}catch(b){zk.debugLog(b.message||
b)}setTimeout(B)}}var r={},w="font-family font-size font-weight font-style letter-spacing line-height text-align text-decoration text-indent text-shadow text-transform text-overflow direction word-spacing white-space".split(" "),C=["color","background-color","background"],x=[],D=0,G=0,n,y=[],H=function(){var a;return function(){if(void 0===a){if(null===g.doctype)return!1;var b=g.doctype;a="<!DOCTYPE html>"==="<!DOCTYPE "+b.name+(b.publicId?' PUBLIC"'+b.publicId+'"':"")+(!b.publicId&&b.systemId?" SYSTEM":
"")+(b.systemId?' "'+b.systemId+'"':"")+">"}return a}}(),t=function(){var a;return function(){return a||(a=zk.safari||zk.opera?g.body:g.documentElement)}}();zk.copy(zjq,{minWidth:zk.ie11_?function(a){return zk(a).offsetWidth()+1}:function(a){return zk(a).offsetWidth()},fixInput:11==zk.ie?function(a){try{var b=zk(a);if(b.isInput()){var c=b.getSelectionRange();b.setSelectionRange(c[0],c[1])}}catch(d){zk.debugLog(d.message||d)}}:zk.$void,_fixCSS:function(a){a.className+=" ";a.className.trim()},_cleanVisi:function(a){a.style.visibility=
"inherit"},_fixClick:zk.$void,_fixedVParent:zk.$void,_fixIframe:zk.$void,src0:"",eventTypes:{zmousedown:"mousedown",zmouseup:"mouseup",zmousemove:"mousemove",zdblclick:"dblclick",zcontextmenu:"contextmenu"}});jq.fn.zbind=jq.fn.bind;jq.fn.zunbind=jq.fn.unbind;zk.override(jq.fn,r,{init:function(a,b){if(b===zk){if("string"==typeof a&&zUtl.isChar(a.charAt(0),{digit:1,upper:1,lower:1,_:1})){var c=g.getElementById(a);if(!c||c.id==a)return c=jq(c||[]),c.context=g,c.selector="#"+a,c.zk=new zjq(c),c;a="#"+
a}b=null}zk.Widget&&zk.Widget.isInstance(a)&&(a=a.$n()||"#"+a.uuid);c=r.init.apply(this,arguments);c.zk=new zjq(c);return c},replaceWith:function(a,b,c){if(!zk.Widget.isInstance(a))return r.replaceWith.apply(this,arguments);var d=this[0];d&&a.replaceHTML(d,b,c);return this},bind:function(a,b,c){a=zjq.eventTypes[a]||a;return this.zbind.apply(this,arguments)},unbind:function(a,b){a=zjq.eventTypes[a]||a;return this.zunbind.apply(this,arguments)}});jq.fn.init.prototype=jq.fn;jq.each(["remove","empty",
"show","hide"],function(a,b){r[b]=jq.fn[b];jq.fn[b]=function(){return this.selector||this[0]!==g?r[b].apply(this,arguments):this}});jq.each(["before","after","append","prepend"],function(a,b){r[b]=jq.fn[b];jq.fn[b]=function(a,d){if(!zk.Widget.isInstance(a))return r[b].apply(this,arguments);if(!this.length)return this;zk.Desktop._ndt||zk.stateless();var c=r[b].call(this,a.redrawHTML_());a.z_rod||(a.bind(d),zUtl.fireSized(a));return c}});zjq.prototype={cleanVisibility:function(){return this.jq.each(function(){zjq._cleanVisi(this)})},
isVisible:function(a){var b=this.jq[0];return b&&(!b.style||"none"!=b.style.display&&(!a||-1==jq.inArray(b.style.visibility,["hidden","collapse"])))},isRealVisible:function(a){var b=this.jq[0];return b&&this.isVisible(a)&&(0<b.offsetWidth||0<b.offsetHeight||!b.firstChild&&(!(b=b.parentNode)||b==g.body||zk(b).isRealVisible(a)))},scrollTo:function(){if(this.jq.length){var a=this.cmOffset();scrollTo(a[0],a[1])}return this},scrollIntoView:function(a){var b=this;zk.afterAnimate(function(){b._scrollIntoView(a)},
-1);return this},_scrollIntoView:function(a){var b=this.jq[0];if(b){var c=jq("#"+b.id+"-real")[0];c&&(b=c);if(!this.isScrollIntoView(!0)){c=a;var d=b;if(!c){do{if(d==g.body)break;if("absolute"==jq(d).css("position")){c=!0;break}}while(d=d.offsetParent)}!c&&zk.isLoaded("zul.sel")&&(c=(c=zk.Widget.$(b))&&c.$instanceof(zul.sel.ItemWidget));if(c){a=a||g.documentElement;d=b;for(var e;(d=d.parentNode)&&b!=a;b=d)e=F(d,b,e,!0)}else zk.delayFunction(this.$().uuid,function(){b.scrollIntoView()},{urgent:!0})}}return this},
isRealScrollIntoView:function(){var a=this.$();if(a){var b=a.desktop;a=a.parent;for(var c=this.jq[0],d,e=!0;a&&a!=b;){if((d=a._scrollbar)&&(d.hasVScroll()||d.hasHScroll())&&(e=d.isScrollIntoView(c),!e))return e;a=a.parent}return e&&this.isScrollIntoView(!0)}},isScrollIntoView:function(){return function(a){var b=this.viewportOffset(),c=b[0];b=b[1];var d=c+this.jq[0].offsetWidth,e=b+this.jq[0].offsetHeight;if(0<=c&&0<=b&&d<=jq.innerWidth()&&e<=jq.innerHeight()){var f=this.jq[0],m,l,h=[];do{m||f!=t()&&
"auto"!=f.style.overflow&&"auto"!=f.style.overflowY&&"auto"!=jq(f).css("overflow-y")||(m=f);l||f!=t()&&"auto"!=f.style.overflow&&"auto"!=f.style.overflowX&&"auto"!=jq(f).css("overflow-x")||(l=f);if(m&&l){h.push([l,m]);if(!a)break;m=l=null}f=f.parentNode}while(f&&f!=g);m=!0;for(a=0;a<h.length&&(m=h[a],l=zk(this.jq[0]==m[0]?m[0]=m[0].parentNode:m[0]).viewportOffset()[0],f=zk(this.jq[0]==m[1]?m[1]=m[1].parentNode:m[1]).viewportOffset()[1],m=c>=l&&d<=l+m[0].offsetWidth&&b>=f&&e<=f+m[1].offsetHeight,m);a++);
return m}return!1}}(),hasVScroll:function(){var a;if((a=this.$())&&a._scrollbar)return a._scrollbar.hasVScroll();var b=0;if(a=this.jq[0])b=Math.round(jq.css(a,"borderLeftWidth",!0))+Math.round(jq.css(a,"borderRightWidth",!0)),b=a.offsetWidth-b-a.clientWidth;return 0<b},hasHScroll:function(){var a;if((a=this.$())&&a._scrollbar)return a._scrollbar.hasHScroll();var b=0;if(a=this.jq[0])b=Math.round(jq.css(a,"borderTopWidth",!0))+Math.round(jq.css(a,"borderBottomWidth",!0)),b=a.offsetHeight-b-a.clientHeight;
return 0<b},isOverlapped:function(a,b){var c;if(c=this.jq[0])return jq.isOverlapped(this.revisedOffset(),[c.offsetWidth,c.offsetHeight],zk(a).revisedOffset(),[a.offsetWidth,a.offsetHeight],b)},sumStyles:function(a,b){for(var c=0,d=0,e=a.length,f=this.jq;d<e;d++){var g=Math.round(zk.parseFloat(f.css(b[a.charAt(d)])));isNaN(g)||(c+=g)}return c},revisedOffset:function(a){var b=this.jq[0];if(!a){if(b.getBoundingClientRect){var c;if(11>zk.ie&&"none"==b.style.display){var d=(c=b.style).visibility;c.visibility=
"hidden";c.display=""}a=b.getBoundingClientRect();a=[a.left+jq.innerX()-b.ownerDocument.documentElement.clientLeft,a.top+jq.innerY()-b.ownerDocument.documentElement.clientTop];c&&(c.display="none",c.visibility=d);a[0]=Math.ceil(a[0]);a[1]=Math.ceil(a[1]);return a}a=this.cmOffset()}b=zk(b.parentNode).scrollOffset();b[0]-=jq.innerX();b[1]-=jq.innerY();return[a[0]-b[0],a[1]-b[1]]},revisedWidth:function(a,b){"border-box"!=this.jq.css("box-sizing")&&(a-=this.padBorderWidth());0<a&&b&&(a-=this.marginWidth());
return 0>a?0:a},revisedHeight:function(a,b){"border-box"!=this.jq.css("box-sizing")&&(a-=this.padBorderHeight());0<a&&b&&(a-=this.marginHeight());return 0>a?0:a},contentWidth:function(a){var b=this.jq[0].offsetWidth;b-=this.padBorderWidth();0<b&&a&&(b-=this.marginWidth());return 0>b?0:b},contentHeight:function(a){var b=this.jq[0].offsetHeight;b-=this.padBorderHeight();0<b&&a&&(b-=this.marginHeight());return 0>b?0:b},marginWidth:function(){return this.sumStyles("lr",jq.margins)},marginHeight:function(){return this.sumStyles("tb",
jq.margins)},borderWidth:function(){return this.sumStyles("lr",jq.borders)},borderHeight:function(){return this.sumStyles("tb",jq.borders)},paddingWidth:function(){return this.sumStyles("lr",jq.paddings)},paddingHeight:function(){return this.sumStyles("tb",jq.paddings)},padBorderWidth:function(){return this.borderWidth()+this.paddingWidth()},padBorderHeight:function(){return this.borderHeight()+this.paddingHeight()},vflexHeight:function(){for(var a=this.jq[0],b=a.parentNode.clientHeight,c=a;c=c.previousSibling;)c.offsetHeight&&
zk(c).isVisible()&&(b-=c.offsetHeight);for(c=a;c=c.nextSibling;)c.offsetHeight&&zk(c).isVisible()&&(b-=c.offsetHeight);return b},cellIndex:function(){var a=this.jq[0];return a?a.cellIndex:0},ncols:function(a){var b=this.jq[0],c=0,d;if(b&&(d=b.cells)){b=0;for(var e=d.length;b<e;++b){var f=d[b];if(!a||zk(f).isVisible())f=f.colSpan,1<=f?c+=f:++c}}return c},toStyleOffset:function(a,b){var c=this.jq[0],d=c.style.left,e=c.style.top,f=zk.webkit||zk.opera||zk.air||9<=zk.ie;if(f||""==c.style.left||"auto"==
c.style.left)c.style.left="0";if(f||""==c.style.top||"auto"==c.style.top)c.style.top="0";f=this.cmOffset();var g=zk.parseInt(c.style.left),l=zk.parseInt(c.style.top);f=[a-f[0]+g,b-f[1]+l];c.style.left=d;c.style.top=e;return f},center:function(a){var b=this.jq[0],c=this.offsetWidth(),d=this.offsetHeight();c&&d||this.isVisible()||(b.style.left=b.style.top="-10000px",b.style.display="block",c=this.offsetWidth(),d=this.offsetHeight(),b.style.display="none");var e=jq.innerX(),f=jq.innerY();c=jq.innerWidth()-
c;if(a)if(0<=a.indexOf("left"))c=e;else if(0<=a.indexOf("right"))c=e+c-1;else if(0<=a.indexOf("center"))c=e+c/2;else{c=0;var g=!0}else c=e+c/2;d=jq.innerHeight()-d;if(a)if(0<=a.indexOf("top"))a=f;else if(0<=a.indexOf("bottom"))a=f+d-1;else if(0<=a.indexOf("center"))a=f+d/2;else{a=0;var l=!0}else a=f+d/2;c<e&&(c=e);a<f&&(a=f);e=this.toStyleOffset(c,a);g||(b.style.left=jq.px(e[0]));l||(b.style.top=jq.px(e[1]));return this},position:function(a,b,c){b=b||"overlap";if(!a){var d=jq("body")[0];a={left:0,
top:0,width:d.offsetWidth,height:d.offsetHeight}}a.nodeType&&(a=zk(a).dimension(!0));d=a.left;var e=a.top,f=this.dimension(),g=f.height;f=f.width;switch(b){case "before_start":e-=g;break;case "before_center":e-=g;d+=(a.width-f)/2|0;break;case "before_end":e-=g;d+=a.width-f;break;case "after_start":e+=a.height;break;case "after_center":e+=a.height;d+=(a.width-f)/2|0;break;case "after_end":e+=a.height;d+=a.width-f;break;case "start_before":d-=f;break;case "start_center":d-=f;e+=(a.height-g)/2|0;break;
case "start_after":d-=f;e+=a.height-g;break;case "end_before":d+=a.width;break;case "end_center":d+=a.width;e+=(a.height-g)/2|0;break;case "end_after":d+=a.width;e+=a.height-g;break;case "at_pointer":e=zk.currentPointer;d=e[0];e=e[1];break;case "after_pointer":e=zk.currentPointer;d=e[0];e=e[1]+20;break;case "top_right":case "overlap_end":d+=a.width-f;break;case "top_center":d+=(a.width-f)/2|0;break;case "middle_left":e+=(a.height-g)/2|0;break;case "middle_center":d+=(a.width-f)/2|0;e+=(a.height-g)/
2|0;break;case "middle_right":d+=a.width-f;e+=(a.height-g)/2|0;break;case "bottom_left":case "overlap_before":e+=a.height-g;break;case "bottom_center":d+=(a.width-f)/2|0;e+=a.height-g;break;case "bottom_right":case "overlap_after":d+=a.width-f,e+=a.height-g}if(!c||!c.overflow){var l=jq.innerX();var h=jq.innerY();b=l+jq.innerWidth();var k=h+jq.innerHeight();d+f>b&&(d=b-f);d<l&&(d=l);e+g>k&&(e=k-g);e<h&&(e=h)}c&&c.dodgeRef&&(h=a.left,b=a.top,k=h+a.width,a=b+a.height,d+f>h&&d<k&&e+g>b&&e<a&&(c.overflow?
d=k:(l=jq.innerX(),b=l+jq.innerWidth(),c=b-k,d=c>=f||c>=h-l?Math.min(k,b-f):Math.max(h-f,l))));c=this.jq[0];d=this.toStyleOffset(d,e);c.style.left=jq.px(d[0]);c.style.top=jq.px(d[1]);return this},scrollOffset:function(){var a=this.jq[0],b=0,c=0;do b+=a.scrollTop||0,c+=a.scrollLeft||0,a=a.parentNode;while(a);return[c,b]},cmOffset:function(){var a=this.jq[0];zk.webkit&&jq.nodeName(a,"tr")&&a.cells.length&&(a=a.cells[0]);if(!zk.gecko&&!zk.webkit||this.isVisible()||this.offsetWidth())return z(a);a.style.display=
"";var b=z(a);a.style.display="none";return b},$:function(){return zk.Widget.$(this.jq[0])},absolutize:function(){var a=this.jq[0];if("absolute"==a.style.position)return this;var b,c=a;zk.webkit&&jq.nodeName(c,"tr")&&c.cells.length&&(c=c.cells[0]);var d=b=0;do if(b+=c.offsetTop||0,d+=c.offsetLeft||0,c=zk.gecko&&c!=g.body?k(c):c.offsetParent){if(jq.nodeName(c,"body"))break;var e=jq(c).css("position");if("relative"==e||"absolute"==e)break}while(c);b=[d,b];c=b[0];b=b[1];d=a.style;a._$orgLeft=c-parseFloat(d.left||
0);a._$orgTop=b-parseFloat(d.top||0);d.position="absolute";d.top=jq.px(b);d.left=jq.px(c);return this},relativize:function(){var a=this.jq[0];if("relative"==a.style.position)return this;var b=a.style;b.position="relative";var c=parseFloat(b.top||0)-(a._$orgTop||0);a=parseFloat(b.left||0)-(a._$orgLeft||0);b.top=jq.px(c);b.left=jq.px(a);return this},offsetWidth:function(){var a=this.jq[0];if("undefined"!=typeof a.getBoundingClientRect){var b=a.getBoundingClientRect();b=b.width||b.right-b.left}return Math.max(b,
a.offsetWidth)},offsetHeight:function(){var a=this.jq[0];if(H()&&jq.nodeName(a,"SPAN")&&"block"!=this.jq.css("display")){var b=a.outerHTML;zk.Widget.$(a,{exact:1})&&(b=b.replace(/id="[^"]*"/g,""));return zk(g.body).textSize(b)[1]}return a.offsetHeight},offsetTop:function(){return this.jq[0].offsetTop},offsetLeft:function(){return this.jq[0].offsetLeft},offsetWidthDoubleValue:function(){return this.jq[0].getBoundingClientRect().width},offsetHeightDoubleValue:function(){return this.jq[0].getBoundingClientRect().height},
offsetTopDoubleValue:function(){return this.jq[0].getBoundingClientRect().top},offsetLeftDoubleValue:function(){return this.jq[0].getBoundingClientRect().left},viewportOffset:function(){var a=0,b=0,c=this.jq[0],d=c;do if(a+=d.offsetTop||0,b+=d.offsetLeft||0,d.offsetParent==g.body&&"absolute"==jq(d).css("position"))break;while(d=d.offsetParent);for(;c=c.parentNode;)a-=c.scrollTop||0,b-=c.scrollLeft||0;return[b,a]},textSize:function(){var a=[],b,c={};return function(d){var e=this.jq;d=d||e[0].innerHTML;
if(!b){b=g.createElement("div");b.style.cssText="left:-1000px;top:-1000px;position:absolute;visibility:hidden;border:none;display:none;";g.body.appendChild(b);for(var f=w,h=f.length;h--;)a[h]=f[h].$camel()}var k="";f=a;for(h=f.length;h--;)k+=w[h]+":"+e.css(f[h])+";";f=k+d;(e=c[f])||(b.innerHTML=d.replace(/name="[^"]*"/g,""),b.style.cssText="left:-1000px;top:-1000px;position:absolute;visibility:hidden;border:none;display:none;"+k,b.style.display="",e=c[f]=[b.offsetWidth,b.offsetHeight],b.style.display=
"none",b.innerHTML="");return e}}(),dimension:function(a){var b=this.jq.css("display");if("none"!=b&&null!=b)return A(this,{width:this.offsetWidth(),height:this.offsetHeight()},a);b=this.jq[0].style;var c={};zk.copy(b,{visibility:"hidden",position:"absolute",display:"block"},c);try{return A(this,{width:this.offsetWidth(),height:this.offsetHeight()},a)}finally{zk.copy(b,c)}},redoCSS:function(a,b){if(b&&b.fixFontIcon)return this;if(-1==a)for(b=this.jq.length;b--;)zjq._fixCSS(this.jq[b]);else{for(b=
this.jq.length;b--;)y.push(this.jq[b]);setTimeout(B,0<=a?a:100)}return this},redoSrc:function(){for(var a=this.jq.length;a--;){var b=this.jq[a],c=b.src;b.src=zjq.src0;b.src=c}return this},vparentNode:function(a){var b=this.jq[0];if(b){var c=b.z_vp;if(c)return jq("#"+c)[0];if((c=b.z_vpagt)&&(c=jq("#"+c)[0]))return c.parentNode;if(a)return b.parentNode}},makeVParent:function(){var a=this.jq[0],b=a.parentNode;if(a.z_vp||a.z_vpagt||b==g.body)return this;var c=a.nextSibling,d=g.createElement("span");d.id=
a.z_vpagt="_z_vpagt"+G++;d.style.display="none";zjq._fixedVParent(a,!0);c?b.insertBefore(d,c):b.appendChild(d);a.z_vp=b.id;b=a.style;b.top||(b.top="0");g.body.appendChild(a);return this},undoVParent:function(){var a=this.jq[0];if(a.z_vp||a.z_vpagt){var b=a.z_vp;var c=a.z_vpagt,d=jq("#"+c);a.z_vp=a.z_vpagt=null;c=d[0];if(b=b?jq("#"+b)[0]:c?c.parentNode:null){zjq._fixedVParent(a);c?(b.insertBefore(a,c),d.remove()):b.appendChild(a);var e,f;(zk.ff||zk.opera)&&(e=zk._prevFocus)&&(b=zk.Widget.$(a))&&zUtl.isAncestor(b,
e)&&(e.getInputNode?jq(e.getInputNode()).trigger("blur"):(f=e.$n("a"))&&jq.nodeName(f,"button","input","textarea","a","select","iframe")?jq(f).trigger("blur"):e.$instanceof(zul.wgt.Button)&&jq(e.$n("btn")||e.$n()).trigger("blur"))}}return this},hasVParent:function(){var a=this.jq[0];return a&&(a.z_vp||a.z_vpagt)},beforeHideOnUnbind:zk.$void,focus:function(a){var b=this.jq[0];if(!b||!b.focus||!jq.nodeName(b,"button","input","textarea","a","select","iframe"))return!1;0<=a?setTimeout(function(){p(b)},
a):p(b);return!0},select:function(a){var b=this.jq[0];if(!b||"function"!=typeof b.select)return!1;0<=a?setTimeout(function(){q(b)},a):q(b);return!0},getSelectionRange:function(){var a=this.jq[0];try{if(null!=g.selection&&null==a.selectionStart){var b=g.selection.createRange(),c=a.createTextRange(),d="";"text"==a.type.toLowerCase()?d=c.duplicate():(d=b.duplicate(),d.moveToElementText(a));d.setEndPoint("EndToEnd",b);var e=d.text.length-b.text.length;return[e,e+b.text.length]}return[a.selectionStart,
a.selectionEnd]}catch(f){return[0,0]}},setSelectionRange:function(a,b){var c=this.jq[0],d=c.value?c.value.length:0;if(null==a||0>a)a=0;a>d&&(a=d);if(null==b||b>d)b=d;0>b&&(b=0);c.setSelectionRange?c.setSelectionRange(a,b):c.createTextRange&&(c=c.createTextRange(),a!=b?(c.moveEnd("character",b-c.text.length),c.moveStart("character",a)):c.move("character",a),c.select());return this},submit:function(){this.jq.each(v);return this},disableSelection:function(){this.jq.each(u);return this},enableSelection:function(){this.jq.each(E);
return this},setStyles:function(a){this.jq.css(a);return this},clearStyles:function(){var a=this.jq[0];if(a&&(a=a.style))for(var b in a)if(!(11>zk.ie&&"accelerator"==b)&&a[b]&&"string"==typeof a[b])try{a[b]=""}catch(c){zk.debugLog(c.message||c)}return this},detachChildren:function(){var a=this.jq[0];if(a){for(var b=[],c;c=a.firstChild;)b.push(c),a.removeChild(c);return b}return null},isInput:function(){for(var a=this.jq,b=a.length,c="text password number tel url email".split(" "),d=b,e,f;d--;)if("textarea"!=
(e=jq.nodeName(f=a[d]))&&("input"!=e||-1==jq.inArray(f.type,c)))return!1;return 0<b}};zk.copy(jq,{nodeName:function(a){var b=a&&a.nodeName?a.nodeName.toLowerCase():"",c=arguments.length;if(1>=c)return b;for(;--c;)if(b==arguments[c].toLowerCase())return!0;return!1},px:function(a){return(a||0)+"px"},px0:function(a){return Math.max(a||0,0)+"px"},$$:function(a,b){return"string"==typeof a?a?g.getElementsByName(a+(b?"-"+b:"")):null:a},isAncestor:function(a,b){if(!a)return!0;for(;b;b=zk(b).vparentNode(!0))if(a==
b)return!0;return!1},innerX:function(){return Math.round(h.pageXOffset||t().scrollLeft||0)},innerY:function(){return Math.round(h.pageYOffset||t().scrollTop||0)},innerWidth:function(){return jq(h).width()},innerHeight:function(){return jq(h).height()},margins:{l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"},borders:{l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"},paddings:{l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"},
scrollbarWidth:function(){var a=zUtl.getDevicePixelRatio(),b=g.body;this._lastDevicePixelRatio!=a&&(this._lastDevicePixelRatio=a,n&&(b.removeChild(n),n=null));n||(n=g.createElement("div"),n.style.cssText="top:-1000px;left:-1000px;position:absolute;visibility:hidden;border:none;width:50px;height:50px;overflow:scroll;",n.appendChild(g.createElement("div")),b.appendChild(n));return n._value||(n._value=n.getBoundingClientRect().width-n.firstChild.getBoundingClientRect().width)},isOverlapped:function(a,
b,c,d,e){var f=a[0],g=b[0]+f;a=a[1];b=b[1]+a;var h=c[0],k=d[0]+h;c=c[1];d=d[1]+c;return e?h<=g&&k>=f&&c<=b&&d>=a&&g-h>e&&k-f>e&&b-c>e&&d-a>e:h<=g&&k>=f&&c<=b&&d>=a},clearSelection:function(){try{return h.getSelection?zk.webkit?h.getSelection().collapse():h.getSelection().removeAllRanges():g.selection&&(g.selection.empty?g.selection.empty():g.selection.clear&&g.selection.clear()),!0}catch(a){return!1}},filterTextStyle:function(a,b){if("string"==typeof a){var c="";if(a)for(var d=0,e=0;0<=e;d=e+1){e=
a.indexOf(";",d);d=0<=e?a.substring(d,e):a.substring(d);var f=d.indexOf(":");(f=0>f?d.trim():d.substring(0,f).trim())&&(w.$contains(f)||C.$contains(f)||b&&b.$contains(f))&&(c+=d+";")}return c}c={};for(f in a)if(w.$contains(f)||C.$contains(f)||b&&b.$contains(f))c[f]=a[f];return c},parseStyle:function(a){var b={};if(a){a=a.split(";");for(var c=0,d=a.length;c<d;){var e=a[c++].split(":"),f=0<e.length?e[0].trim():"";f&&(b[f]=1<e.length?e[1].trim():"")}}return b},newFrame:function(a,b,c){b||(b=zjq.src0);
null==c&&(c="display:none");b='<iframe id="'+a+'" name="'+a+'" src="'+b+'"'+(' style="'+c+'"></iframe>');jq(g.body).append(b);return zk(a).jq[0]},newStackup:function(a,b,c){a=jq(a||[],zk)[0];var d=g.createElement("iframe");d.id=b||(a?a.id+"-ifrstk":"z_ifrstk");d.style.cssText="position:absolute;overflow:hidden;opacity:0;filter:alpha(opacity=0)";d.frameBorder="no";d.tabIndex=-1;d.src=zjq.src0;a&&(d.style.width=a.offsetWidth+"px",d.style.height=a.offsetHeight+"px",d.style.top=a.style.top,d.style.left=
a.style.left,d.style.zIndex=a.style.zIndex,a.parentNode.insertBefore(d,c||a));return d},newHidden:function(a,b,c){var d=g.createElement("input");d.type="hidden";d.name=a;d.value=b;c&&c.appendChild(d);return d},head:function(){return g.getElementsByTagName("head")[0]||g.documentElement},confirm:function(a){zk.alerting=!0;try{return confirm(a)}finally{try{zk.alerting=!1}catch(b){zk.debugLog(b.message||b)}}},alert:function(a){zk.alerting=!0;try{alert(a)}finally{try{zk.alerting=!1}catch(b){zk.debugLog(b.message||
b)}}},onzsync:function(a){x.unshift(a)},unzsync:function(a){x.$remove(a)},zsync:function(a){++D;setTimeout(function(){if(0>=--D)for(var b=x.length;b--;)x[b].zsync(a)},50)},focusOut:11>zk.ie?function(){h.focus()}:function(){var a=jq("#z_focusOut")[0];a||(jq(g.body).append('<a href="javascript:;" style="position:absolute;left:'+zk.clickPointer[0]+"px;top:"+zk.clickPointer[1]+'px;" id="z_focusOut"/>'),a=jq("#z_focusOut")[0]);a.focus();setTimeout(function(){jq(a).remove()},500)},_syncScroll:{},onSyncScroll:function(a){var b=
this._syncScroll;b[a.uuid]||(b[a.uuid]=a)},doSyncScroll:function(){var a=this._syncScroll,b;for(b in a)a[b].doResizeScroll_();this._syncScroll={}},unSyncScroll:function(a){delete this._syncScroll[a.id]}});zk.copy(jq.Event.prototype,{stop:function(){this.preventDefault();this.stopPropagation()},mouseData:function(){return zk.copy({pageX:this.pageX,pageY:this.pageY},this.metaData())},keyData:function(){return zk.copy({keyCode:this.keyCode,charCode:this.charCode},this.metaData())},metaData:function(){var a=
{};this.altKey&&(a.altKey=!0);this.ctrlKey&&(a.ctrlKey=!0);this.shiftKey&&(a.shiftKey=!0);this.metaKey&&(a.metaKey=!0);a.which=this.which||0;return a}});zk.copy(jq.Event,{fire:g.createEvent?function(a,b){var c=g.createEvent("HTMLEvents");c.initEvent(b,!1,!1);a.dispatchEvent(c)}:function(a,b){a.fireEvent("on"+b)},stop:function(a){a.stop()},filterMetaData:function(a){var b={};a.altKey&&(b.altKey=!0);a.ctrlKey&&(b.ctrlKey=!0);a.shiftKey&&(b.shiftKey=!0);a.metaKey&&(b.metaKey=!0);b.which=a.which||0;return b},
zk:function(a,b){var c=a.type;b=zk.Widget.$(a)||b;if(c.startsWith("mouse")){5<c.length&&(c="Mouse"+c.charAt(5).toUpperCase()+c.substring(6));var d=a.mouseData()}else c.startsWith("key")?(3<c.length&&(c="Key"+c.charAt(3).toUpperCase()+c.substring(4)),d=a.keyData()):"dblclick"==c?(d=a.mouseData(),c="DoubleClick"):("click"==c&&(d=a.mouseData()),c=c.charAt(0).toUpperCase()+c.substring(1));return new zk.Event(b,"on"+c,d,{},a)}});zk.delayQue={};zk.delayFunction=function(a,b,c){if(a&&"function"==typeof b){c||
(c={});var d=c.timeout;c=c.urgent;var e=zk.delayQue[a];e&&e.length?c?e.splice(0,0,b):e.push(b):(zk.delayQue[a]=e=[b],setTimeout(function(){for(var a=e.shift();a;)a(),a=e.shift()},0<=d?d:50))}}})(document,window);
