var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(b,g,f){if(null==b)throw new TypeError("The 'this' value for String.prototype."+f+" must not be null or undefined");if(g instanceof RegExp)throw new TypeError("First argument to String.prototype."+f+" must not be a regular expression");return b+""};$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(b,g,f){b!=Array.prototype&&b!=Object.prototype&&(b[g]=f.value)};$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(b,g,f,m){if(g){f=$jscomp.global;b=b.split(".");for(m=0;m<b.length-1;m++){var l=b[m];l in f||(f[l]={});f=f[l]}b=b[b.length-1];m=f[b];g=g(m);g!=m&&null!=g&&$jscomp.defineProperty(f,b,{configurable:!0,writable:!0,value:g})}};
$jscomp.polyfill("String.prototype.startsWith",function(b){return b?b:function(b,f){var g=$jscomp.checkStringArgs(this,b,"startsWith");b+="";var l=g.length,q=b.length;f=Math.max(0,Math.min(f|0,g.length));for(var n=0;n<q&&f<l;)if(g[f++]!=b[n++])return!1;return n>=q}},"es6","es3");
$jscomp.polyfill("String.prototype.endsWith",function(b){return b?b:function(b,f){var g=$jscomp.checkStringArgs(this,b,"endsWith");b+="";void 0===f&&(f=g.length);f=Math.max(0,Math.min(f|0,g.length));for(var l=b.length;0<l&&0<f;)if(g[--f]!=b[--l])return!1;return 0>=l}},"es6","es3");
(function(){function b(a,h,c,e){k!=a||p!=h?(m(),n={tip:a,ref:h,params:c,timer:setTimeout(function(){var a=n;if(a){k=a.tip;p=a.ref;n=null;var d=p.$n();if(d&&zk(d).isRealVisible()){a=a.params;d=a.x;var c=a.y;d&&(a.x=q(e,d));c&&(a.y=q(e,c));k.open(p,void 0!==a.x?[a.x,a.y]:zk.currentPointer,a.position?a.position:null===a.x?"after_pointer":null,{sendOnOpen:!0})}else k=p=null}},void 0!==c.delay?c.delay:zk.tipDelay)}):f()}function g(){var a=n;a&&(n=null,clearTimeout(a.timer))}function f(){var a=r;a&&(r=
null,clearTimeout(a))}function m(){g();f();var a=k;if(a&&a.desktop){var h=jq(a.$n()),c=h.offset(),e=zk.currentPointer;e[0]>=c.left&&e[0]<=c.left+h.width()&&e[1]>=c.top&&e[1]<=c.top+h.height()||(k=p=null,a.close({sendOnOpen:!0}))}}function l(a){zk.error("setCtrlKeys: "+a)}function q(a,h){return-1!=h.indexOf("(")&&-1!=h.indexOf(")")?(new Function("event","return "+h+";"))(a):zk.parseInt(h)}var n,r,k,p;zul.Widget=zk.$extends(zk.Widget,{getContext:function(){return this._context},setContext:function(a){zk.Widget.isInstance(a)&&
(a="uuid("+a.uuid+")");this._context=a;return this},getPopup:function(){return this._popup},setPopup:function(a){zk.Widget.isInstance(a)&&(a="uuid("+a.uuid+")");this._popup=a;return this},getTooltip:function(){return this._tooltip},setTooltip:function(a){zk.Widget.isInstance(a)&&(a="uuid("+a.uuid+")");this._tooltip=a;return this},getCtrlKeys:function(){return this._ctrlKeys},setCtrlKeys:function(a){if(this._ctrlKeys!=a){if(a){for(var h=[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],c=0,e=0,b=a.length;e<
b;++e){var d=a.charAt(e);switch(d){case "^":case "@":case "$":case "%":var f="^"==d?1:"@"==d?2:"$"==d?4:8;if(0!=(c&f))return l("Unexpected key combination: "+a);c|=f;break;case "#":for(f=e+1;f<b;++f){var g=a.charAt(f);if(("Z"<g||"A">g)&&("z"<g||"a">g)&&("9"<g||"0">g))break}if(f==e+1)return l("Unexpected character "+d+" in "+a);e=a.substring(e+1,f).toLowerCase();if("pgup"==e)d=33;else if("pgdn"==e)d=34;else if("end"==e)d=35;else if("home"==e)d=36;else if("left"==e)d=37;else if("up"==e)d=38;else if("right"==
e)d=39;else if("down"==e)d=40;else if("ins"==e)d=45;else if("del"==e)d=46;else if("bak"==e)d=8;else if(1<e.length&&"f"==e.charAt(0)){e=zk.parseInt(e.substring(1));if(0==e||12<e)return l("Unsupported function key: #f"+e);d=112+e-1}else return l("Unknown #"+e+" in "+a);h[c][d]=!0;c=0;e=f-1;break;default:if(!c||("Z"<d||"A">d)&&("z"<d||"a">d)&&("9"<d||"0">d))return l("Unexpected character "+d+" in "+a);if(4==c)return l("$a - $z not supported (found in "+a+"). Allowed: $#f1, $#home and so on.");"z">=d&&
"a"<=d&&(d=d.toUpperCase());h[c][d.charCodeAt(0)]=!0;c=0}}this._parsedCtlKeys=h;this._ctrlKeys=a;return this}this._ctrlKeys=this._parsedCtlKeys=null}},_parsePopParams:function(a,h){var c={},e=a.indexOf(","),b=a.indexOf("="),d=a;-1!=b&&(d=a.substring(0,a.substring(0,b).lastIndexOf(",")));if(-1!=e){c.id=d.substring(0,e).trim();if(e=d.substring(e+1,d.length))c.position=e.trim();zk.copy(c,zUtl.parseMap(a.substring(d.length,a.length)))}else c.id=a.trim();if(this._popup||this._context)a=c.x,d=c.y,a&&(c.x=
q(h,a)),d&&(c.y=q(h,d));c.delay&&(c.delay=zk.parseInt(c.delay));return c},doClick_:function(a,h){if(!this.shallIgnoreClick_(a)&&!a.contextSelected){var c=this._popup?this._parsePopParams(this._popup,a):{},e=this._smartFellow(c.id);if(e){a.contextSelected=!0;var b=this,d=void 0!==c.x?[c.x,c.y]:[a.pageX,a.pageY];c.type&&"toggle"==c.type&&e.isOpen()?e.close({sendOnOpen:!0}):setTimeout(function(){b.desktop&&e.open(b,d,c.position?c.position:null,{sendOnOpen:!0,type:c.type,which:1})},0);a.stop({dom:!0})}}!0!==
h&&this.$supers("doClick_",arguments)},doRightClick_:function(a){if(!this.shallIgnoreClick_(a)&&!a.contextSelected){var b=this._context?this._parsePopParams(this._context,a):{},c=this._smartFellow(b.id);if(c){a.contextSelected=!0;var e=this,f=void 0!==b.x?[b.x,b.y]:[a.pageX,a.pageY];b.type&&"toggle"==b.type&&c.isOpen()?c.close({sendOnOpen:!0}):setTimeout(function(){e.desktop&&c.open(e,f,b.position?b.position:null,{sendOnOpen:!0,type:b.type,which:3})},0);a.stop({dom:!0})}}this.$supers("doRightClick_",
arguments)},doTooltipOver_:function(a){var h;if(h=!a.tooltipped)k&&!k.isOpen()&&(g(),f(),k=p=null),(h=k&&zUtl.isAncestor(k,this))&&f(),h=!h;if(h){h=this._tooltip?this._parsePopParams(this._tooltip):{};var c=this._smartFellow(h.id);c&&(a.tooltipped=!0,b(c,this,h,a))}this.$supers("doTooltipOver_",arguments)},doTooltipOut_:function(a){p==this||k==this?(f(),r=setTimeout(m,100)):g();this.$supers("doTooltipOut_",arguments)},_smartFellow:function(a){return a?a.startsWith("uuid(")&&a.endsWith(")")?zk.Widget.$(a.substring(5,
a.length-1)):this.$f(a,!0):null},doKeyDown_:function(a){this.getCtrlKeys()||this.isListen("onOK")||this.isListen("onCancel")?this.afterKeyDown_(a)||this.$supers("doKeyDown_",arguments):this.$supers("doKeyDown_",arguments)},afterKeyDown_:function(a){var b=a.keyCode,c="onCtrlKey",e=zk.mac&&a.metaKey;switch(b){case 13:var f=a.domTarget;var d=jq.nodeName(f);if("textarea"==d||!("button"!=d||f.id&&f.id.endsWith("-a"))||"input"==d&&"button"==f.type.toLowerCase())return;d=c="onOK";break;case 27:d=c="onCancel";
break;case 16:case 17:case 18:return;case 45:case 46:case 8:break;default:if(!(33<=b&&40>=b||112<=b&&123>=b||a.ctrlKey||a.altKey||e))return}for(var g=f=a.target;;g=g.parent){if(!g)return;if(g.isListen(c,{any:!0})){if(d)break;var l=g._parsedCtlKeys,k=0;if(l&&(a.ctrlKey&&(k|=1),a.altKey&&(k|=2),a.shiftKey&&(k|=4),e&&(k|=8),l[k][b]))break}}setTimeout(function(){for(var b=f;;b=b.parent){if(b.beforeCtrlKeys_&&b.beforeCtrlKeys_(a))return;if(b==g)break}g.fire(c,zk.copy({reference:f},a.data))},0);a.stop();
jq.nodeName(a.domTarget,"select")&&a.stop({dom:!0,revoke:!0});11>zk.ie&&112==b&&(zk._oldOnHelp=window.onhelp,window.onhelp=function(){return!1},setTimeout(function(){window.onhelp=zk._oldOnHelp;zk._oldOnHelp=null},200));return!0},beforeCtrlKeys_:function(a){}},{getOpenTooltip:function(){return k&&k.isOpen()?k:null}})})();
