blob: cc8000ff5cff88f73beedf1baf66f56f9c62419e [file]
// Copyright 2014 The Cloud Input Tools Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
var g,n=this;function aa(){}function ba(a){a.ea=function(){return a.ac?a.ac:a.ac=new a}}
function ca(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function da(a){return"array"==ca(a)}function ea(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function s(a){return a[ha]||(a[ha]=++ia)}var ha="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),ia=0;
function ja(a,b,c){return a.call.apply(a.bind,arguments)}function ka(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function ma(a,b,c){ma=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ja:ka;return ma.apply(null,arguments)}
function na(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var oa=Date.now||function(){return+new Date};function pa(a,b){var c=a.split("."),d=n;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var f;c.length&&(f=c.shift());)c.length||void 0===b?d=d[f]?d[f]:d[f]={}:d[f]=b}function qa(a,b,c){a[b]=c}
function v(a,b){function c(){}c.prototype=b.prototype;a.f=b.prototype;a.prototype=new c;a.prototype.constructor=a};function ra(a,b){var c=a.length-b.length;return 0<=c&&a.indexOf(b,c)==c}function sa(a){if(!ta.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(ua,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(va,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(wa,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(xa,"&quot;"));return a}var ua=/&/g,va=/</g,wa=/>/g,xa=/\"/g,ta=/[&<>\"]/;function ya(a,b){return a<b?-1:a>b?1:0}function za(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})}
function Aa(a){var b=p(void 0)?"undefined".replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"):"\\s";return a.replace(RegExp("(^"+(b?"|["+b+"]+":"")+")([a-z])","g"),function(a,b,f){return b+f.toUpperCase()})};var w=Array.prototype,Ba=w.indexOf?function(a,b,c){return w.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Ca=w.forEach?function(a,b,c){w.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=p(a)?a.split(""):a,e=0;e<d;e++)e in f&&b.call(c,f[e],e,a)},Da=w.filter?function(a,b,c){return w.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=[],e=0,h=p(a)?
a.split(""):a,k=0;k<d;k++)if(k in h){var l=h[k];b.call(c,l,k,a)&&(f[e++]=l)}return f},Ea=w.every?function(a,b,c){return w.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=p(a)?a.split(""):a,e=0;e<d;e++)if(e in f&&!b.call(c,f[e],e,a))return!1;return!0};function x(a,b){return 0<=Ba(a,b)}function Fa(a,b){var c=Ba(a,b);0<=c&&w.splice.call(a,c,1)}function Ga(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]}
function Ha(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],f;if(da(d)||(f=ea(d))&&Object.prototype.hasOwnProperty.call(d,"callee"))a.push.apply(a,d);else if(f)for(var e=a.length,h=d.length,k=0;k<h;k++)a[e+k]=d[k];else a.push(d)}}function Ia(a,b,c){return 2>=arguments.length?w.slice.call(a,b):w.slice.call(a,b,c)};var Ja={},Ka,La,Ma,Na,z,Oa,Pa;function Qa(){return n.navigator?n.navigator.userAgent:null}function Ra(){return n.navigator}Na=Ma=La=Ka=!1;var Sa;if(Sa=Qa()){var Ta=Ra();Ka=0==Sa.indexOf("Opera");La=!Ka&&-1!=Sa.indexOf("MSIE");Ma=!Ka&&-1!=Sa.indexOf("WebKit");Na=!Ka&&!Ma&&"Gecko"==Ta.product}var A=Ka,B=La,C=Na,D=Ma,Ua,Va=Ra();Ua=Va&&Va.platform||"";z=-1!=Ua.indexOf("Mac");Oa=-1!=Ua.indexOf("Win");Pa=-1!=Ua.indexOf("Linux");var Wa=!!Ra()&&-1!=(Ra().appVersion||"").indexOf("X11");
function Xa(){var a=n.document;return a?a.documentMode:void 0}var Ya;a:{var Za="",$a;if(A&&n.opera)var ab=n.opera.version,Za="function"==typeof ab?ab():ab;else if(C?$a=/rv\:([^\);]+)(\)|;)/:B?$a=/MSIE\s+([^\);]+)(\)|;)/:D&&($a=/WebKit\/(\S+)/),$a)var bb=$a.exec(Qa()),Za=bb?bb[1]:"";if(B){var cb=Xa();if(cb>parseFloat(Za)){Ya=String(cb);break a}}Ya=Za}var db={};
function E(a){var b;if(!(b=db[a])){b=0;for(var c=String(Ya).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(c.length,d.length),e=0;0==b&&e<f;e++){var h=c[e]||"",k=d[e]||"",l=RegExp("(\\d*)(\\D*)","g"),m=RegExp("(\\d*)(\\D*)","g");do{var r=l.exec(h)||["","",""],q=m.exec(k)||["","",""];if(0==r[0].length&&0==q[0].length)break;b=ya(0==r[1].length?0:parseInt(r[1],10),0==q[1].length?0:parseInt(q[1],10))||ya(0==r[2].length,0==q[2].length)||
ya(r[2],q[2])}while(0==b)}b=db[a]=0<=b}return b}var eb=n.document,fb=eb&&B?Xa()||("CSS1Compat"==eb.compatMode?parseInt(Ya,10):5):void 0;var gb=!B||B&&9<=fb,hb=!B||B&&9<=fb,ib=B&&!E("9");!D||E("528");C&&E("1.9b")||B&&E("8")||A&&E("9.5")||D&&E("528");C&&!E("8")||B&&E("9");function F(){0!=jb&&(kb[s(this)]=this)}var jb=0,kb={};F.prototype.Sa=!1;F.prototype.P=function(){if(!this.Sa&&(this.Sa=!0,this.i(),0!=jb)){var a=s(this);delete kb[a]}};F.prototype.i=function(){this.Ra&&lb.apply(null,this.Ra);if(this.gc)for(;this.gc.length;)this.gc.shift()()};function G(a){a&&"function"==typeof a.P&&a.P()}function lb(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];ea(d)?lb.apply(null,d):G(d)}};function H(a,b){this.type=a;this.currentTarget=this.target=b}g=H.prototype;g.i=function(){};g.P=function(){};g.ia=!1;g.defaultPrevented=!1;g.hb=!0;g.stopPropagation=function(){this.ia=!0};g.preventDefault=function(){this.defaultPrevented=!0;this.hb=!1};function mb(a){a.stopPropagation()}function nb(a){a.preventDefault()};function ob(a){ob[" "](a);return a}ob[" "]=aa;function pb(a,b){a&&this.ga(a,b)}v(pb,H);var qb=[1,4,2];g=pb.prototype;g.target=null;g.relatedTarget=null;g.offsetX=0;g.offsetY=0;g.clientX=0;g.clientY=0;g.screenX=0;g.screenY=0;g.button=0;g.keyCode=0;g.charCode=0;g.ctrlKey=!1;g.altKey=!1;g.shiftKey=!1;g.metaKey=!1;g.Hb=!1;g.s=null;
g.ga=function(a,b){var c=this.type=a.type;H.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(C){var f;a:{try{ob(d.nodeName);f=!0;break a}catch(e){}f=!1}f||(d=null)}}else"mouseover"==c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.offsetX=D||void 0!==a.offsetX?a.offsetX:a.layerX;this.offsetY=D||void 0!==a.offsetY?a.offsetY:a.layerY;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:
a.pageY;this.screenX=a.screenX||0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.Hb=z?a.metaKey:a.ctrlKey;this.state=a.state;this.s=a;a.defaultPrevented&&this.preventDefault();delete this.ia};function rb(a){return(gb?0==a.s.button:"click"==a.type?!0:!!(a.s.button&qb[0]))&&!(D&&z&&a.ctrlKey)}
g.stopPropagation=function(){pb.f.stopPropagation.call(this);this.s.stopPropagation?this.s.stopPropagation():this.s.cancelBubble=!0};g.preventDefault=function(){pb.f.preventDefault.call(this);var a=this.s;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,ib)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};g.tc=function(){return this.s};g.i=function(){};function sb(){}var tb=0;g=sb.prototype;g.key=0;g.ja=!1;g.Oa=!1;g.ga=function(a,b,c,d,f,e){if(fa(a))this.bc=!0;else if(a&&a.handleEvent&&fa(a.handleEvent))this.bc=!1;else throw Error("Invalid listener argument");this.sa=a;this.ic=b;this.src=c;this.type=d;this.za=!!f;this.Xa=e;this.Oa=!1;this.key=++tb;this.ja=!1};g.handleEvent=function(a){return this.bc?this.sa.call(this.Xa||this.src,a):this.sa.handleEvent.call(this.sa,a)};function ub(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function vb(a){var b={},c;for(c in a)b[c]=a[c];return b}var wb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function xb(a,b){for(var c,d,f=1;f<arguments.length;f++){d=arguments[f];for(c in d)a[c]=d[c];for(var e=0;e<wb.length;e++)c=wb[e],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}
function yb(a){var b=arguments.length;if(1==b&&da(arguments[0]))return yb.apply(null,arguments[0]);if(b%2)throw Error("Uneven number of arguments");for(var c={},d=0;d<b;d+=2)c[arguments[d]]=arguments[d+1];return c};var zb={},I={},J={},Ab={};
function K(a,b,c,d,f){if(da(b)){for(var e=0;e<b.length;e++)K(a,b[e],c,d,f);return null}a:{if(!b)throw Error("Invalid event type");d=!!d;var h=I;b in h||(h[b]={F:0,C:0});h=h[b];d in h||(h[d]={F:0,C:0},h.F++);var h=h[d],e=s(a),k;h.C++;if(h[e]){k=h[e];for(var l=0;l<k.length;l++)if(h=k[l],h.sa==c&&h.Xa==f){if(h.ja)break;k[l].Oa=!1;a=k[l].key;break a}}else k=h[e]=[],h.F++;l=Bb();l.src=a;h=new sb;h.ga(c,l,a,b,d,f);h.Oa=!1;c=h.key;l.key=c;k.push(h);zb[c]=h;J[e]||(J[e]=[]);J[e].push(h);a.addEventListener?
a!=n&&a.Qb||a.addEventListener(b,l,d):a.attachEvent(b in Ab?Ab[b]:Ab[b]="on"+b,l);a=c}return a}function Bb(){var a=Cb,b=hb?function(c){return a.call(b.src,b.key,c)}:function(c){c=a.call(b.src,b.key,c);if(!c)return c};return b}function Db(a,b,c,d,f){if(da(b))for(var e=0;e<b.length;e++)Db(a,b[e],c,d,f);else if(d=!!d,a=Eb(a,b,d))for(e=0;e<a.length;e++)if(a[e].sa==c&&a[e].za==d&&a[e].Xa==f){L(a[e].key);break}}
function L(a){if(!zb[a])return!1;var b=zb[a];if(b.ja)return!1;var c=b.src,d=b.type,f=b.ic,e=b.za;c.removeEventListener?c!=n&&c.Qb||c.removeEventListener(d,f,e):c.detachEvent&&c.detachEvent(d in Ab?Ab[d]:Ab[d]="on"+d,f);c=s(c);J[c]&&(f=J[c],Fa(f,b),0==f.length&&delete J[c]);b.ja=!0;if(b=I[d][e][c])b.ec=!0,Fb(d,e,c,b);delete zb[a];return!0}
function Fb(a,b,c,d){if(!d.cb&&d.ec){for(var f=0,e=0;f<d.length;f++)d[f].ja?d[f].ic.src=null:(f!=e&&(d[e]=d[f]),e++);d.length=e;d.ec=!1;0==e&&(delete I[a][b][c],I[a][b].F--,0==I[a][b].F&&(delete I[a][b],I[a].F--),0==I[a].F&&delete I[a])}}function Gb(a){var b,c=0,d=null==b;b=!!b;if(null==a)ub(J,function(a){for(var e=a.length-1;0<=e;e--){var f=a[e];if(d||b==f.za)L(f.key),c++}});else if(a=s(a),J[a]){a=J[a];for(var f=a.length-1;0<=f;f--){var e=a[f];if(d||b==e.za)L(e.key),c++}}}
function Eb(a,b,c){var d=I;return b in d&&(d=d[b],c in d&&(d=d[c],a=s(a),d[a]))?d[a]:null}function Hb(a,b,c,d,f){var e=1;b=s(b);if(a[b]){a.C--;a=a[b];a.cb?a.cb++:a.cb=1;try{for(var h=a.length,k=0;k<h;k++){var l=a[k];l&&!l.ja&&(e&=!1!==Ib(l,f))}}finally{a.cb--,Fb(c,d,b,a)}}return Boolean(e)}function Ib(a,b){a.Oa&&L(a.key);return a.handleEvent(b)}
function Cb(a,b){if(!zb[a])return!0;var c=zb[a],d=c.type,f=I;if(!(d in f))return!0;var f=f[d],e,h;if(!hb){var k;if(!(k=b))a:{k=["window","event"];for(var l=n;e=k.shift();)if(null!=l[e])l=l[e];else{k=null;break a}k=l}e=k;k=!0 in f;l=!1 in f;if(k){if(0>e.keyCode||void 0!=e.returnValue)return!0;a:{var m=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(r){m=!0}if(m||void 0==e.returnValue)e.returnValue=!0}}m=new pb;m.ga(e,this);e=!0;try{if(k){for(var q=[],u=m.currentTarget;u;u=u.parentNode)q.push(u);
h=f[!0];h.C=h.F;for(var y=q.length-1;!m.ia&&0<=y&&h.C;y--)m.currentTarget=q[y],e&=Hb(h,q[y],d,!0,m);if(l)for(h=f[!1],h.C=h.F,y=0;!m.ia&&y<q.length&&h.C;y++)m.currentTarget=q[y],e&=Hb(h,q[y],d,!1,m)}else e=Ib(c,m)}finally{q&&(q.length=0)}return e}d=new pb(b,this);return e=Ib(c,d)};function M(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0}M.prototype.la=function(){return new M(this.x,this.y)};M.prototype.toString=function(){return"("+this.x+", "+this.y+")"};function Jb(a,b){return new M(a.x-b.x,a.y-b.y)};function N(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}N.prototype.la=function(){return new N(this.top,this.right,this.bottom,this.left)};N.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};N.prototype.contains=function(a){return this&&a?a instanceof N?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1};var Kb,Lb=!B||B&&9<=fb;!C&&!B||B&&B&&9<=fb||C&&E("1.9.1");B&&E("9");function Mb(a){a=a.className;return p(a)&&a.match(/\S+/g)||[]}function O(a,b){for(var c=Mb(a),d=Ia(arguments,1),f=c.length+d.length,e=c,h=0;h<d.length;h++)x(e,d[h])||e.push(d[h]);a.className=c.join(" ");return c.length==f}function Nb(a,b){var c=Mb(a),d=Ia(arguments,1),f=Ob(c,d);a.className=f.join(" ");return f.length==c.length-d.length}function Ob(a,b){return Da(a,function(a){return!x(b,a)})};function P(a,b){this.width=a;this.height=b}function Pb(a,b){return a==b?!0:a&&b?a.width==b.width&&a.height==b.height:!1}P.prototype.la=function(){return new P(this.width,this.height)};P.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};P.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};P.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function Q(a){return a?new Qb(R(a)):Kb||(Kb=new Qb)}function Rb(a,b){ub(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in Sb?a.setAttribute(Sb[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})}var Sb={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};
function Tb(a){a=a.document;a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new P(a.clientWidth,a.clientHeight)}function Ub(a){return D||"CSS1Compat"!=a.compatMode?a.body:a.documentElement}function Vb(a){return a?Wb(a):window}function Wb(a){return a.parentWindow||a.defaultView}
function Xb(a,b,c,d){function f(c){c&&b.appendChild(p(c)?a.createTextNode(c):c)}for(;d<c.length;d++){var e=c[d];if(!ea(e)||ga(e)&&0<e.nodeType)f(e);else{var h;a:{if(e&&"number"==typeof e.length){if(ga(e)){h="function"==typeof e.item||"string"==typeof e.item;break a}if(fa(e)){h="function"==typeof e.item;break a}}h=!1}Ca(h?Ga(e):e,f)}}}function Yb(a){a&&a.parentNode&&a.parentNode.removeChild(a)}
function Zb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}function R(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function $b(a){return a.contentDocument||a.contentWindow.document}function ac(a){var b=a.getAttributeNode("tabindex");return b&&b.specified?(a=a.tabIndex,"number"==typeof a&&0<=a&&32768>a):!1}
function Qb(a){this.e=a||n.document||document}g=Qb.prototype;g.g=Q;function bc(a){return a.e}g.b=function(a){return p(a)?this.e.getElementById(a):a};function cc(a,b){var c;c=a.e;var d=b&&"*"!=b?b.toUpperCase():"";c=c.querySelectorAll&&c.querySelector&&d?c.querySelectorAll(d+""):c.getElementsByTagName(d||"*");return c}
g.h=function(a,b,c){var d=this.e,f=arguments,e=f[0],h=f[1];if(!Lb&&h&&(h.name||h.type)){e=["<",e];h.name&&e.push(' name="',sa(h.name),'"');if(h.type){e.push(' type="',sa(h.type),'"');var k={};xb(k,h);delete k.type;h=k}e.push(">");e=e.join("")}e=d.createElement(e);h&&(p(h)?e.className=h:da(h)?O.apply(null,[e].concat(h)):Rb(e,h));2<f.length&&Xb(d,e,f,2);return e};g.createElement=function(a){return this.e.createElement(a)};g.createTextNode=function(a){return this.e.createTextNode(a)};
function dc(a){return"CSS1Compat"==a.e.compatMode}function ec(a){var b=a.e;a=Ub(b);b=Wb(b);return new M(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}g.appendChild=function(a,b){a.appendChild(b)};g.append=function(a,b){Xb(R(a),a,arguments,1)};g.jc=function(a){for(var b;b=a.firstChild;)a.removeChild(b)};g.contains=Zb;g.uc=$b;function S(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}S.prototype.la=function(){return new S(this.left,this.top,this.width,this.height)};function fc(a){return new S(a.left,a.top,a.right-a.left,a.bottom-a.top)}S.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};
S.prototype.contains=function(a){return a instanceof S?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};S.prototype.Rb=function(){return new P(this.width,this.height)};var gc={};function hc(a,b,c){var d;a:if(d=za(c),void 0===a.style[d]&&(c=(D?"Webkit":C?"Moz":B?"ms":A?"O":null)+Aa(c),void 0!==a.style[c])){d=c;break a}d&&(a.style[d]=b)}function T(a,b){var c=R(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function U(a,b){return T(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
function ic(a,b){var c,d,f=C&&(z||Wa)&&E("1.9");b instanceof M?(c=b.x,d=b.y):(c=b,d=void 0);a.style.left=jc(c,f);a.style.top=jc(d,f)}function kc(a){var b=a.getBoundingClientRect();B&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
function lc(a){if(B&&!(B&&8<=fb))return a.offsetParent;var b=R(a),c=U(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=U(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null}
function mc(a){for(var b=new N(0,Infinity,Infinity,0),c=Q(a),d=c.e.body,f=c.e.documentElement,e=Ub(c.e);a=lc(a);)if(!(B&&0==a.clientWidth||D&&0==a.clientHeight&&a==d||a==d||a==f||"visible"==U(a,"overflow"))){var h=nc(a),k;k=a;if(C&&!E("1.9")){var l=parseFloat(T(k,"borderLeftWidth"));if(oc(k))var m=k.offsetWidth-k.clientWidth-l-parseFloat(T(k,"borderRightWidth")),l=l+m;k=new M(l,parseFloat(T(k,"borderTopWidth")))}else k=new M(k.clientLeft,k.clientTop);h.x+=k.x;h.y+=k.y;b.top=Math.max(b.top,h.y);b.right=
Math.min(b.right,h.x+a.clientWidth);b.bottom=Math.min(b.bottom,h.y+a.clientHeight);b.left=Math.max(b.left,h.x)}d=e.scrollLeft;e=e.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,e);c=Tb(Wb(c.e)||window);b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,e+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null}
function nc(a){var b,c=R(a),d=U(a,"position"),f=C&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),e=new M(0,0),h;b=c?R(c):document;h=!B||B&&9<=fb||dc(Q(b))?b.documentElement:b.body;if(a==h)return e;if(a.getBoundingClientRect)b=kc(a),a=ec(Q(c)),e.x=b.left+a.x,e.y=b.top+a.y;else if(c.getBoxObjectFor&&!f)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(h),e.x=b.screenX-a.screenX,e.y=b.screenY-a.screenY;else{b=a;do{e.x+=b.offsetLeft;e.y+=b.offsetTop;
b!=a&&(e.x+=b.clientLeft||0,e.y+=b.clientTop||0);if(D&&"fixed"==U(b,"position")){e.x+=c.body.scrollLeft;e.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(A||D&&"absolute"==d)e.y-=c.body.offsetTop;for(b=a;(b=lc(b))&&b!=c.body&&b!=h;)e.x-=b.scrollLeft,A&&"TR"==b.tagName||(e.y-=b.scrollTop)}return e}
function pc(a){var b=new M;if(1==a.nodeType){if(a.getBoundingClientRect){var c=kc(a);b.x=c.left;b.y=c.top}else{var c=ec(Q(a)),d=nc(a);b.x=d.x-c.x;b.y=d.y-c.y}if(C&&!E(12)){var f;B?f="-ms-transform":D?f="-webkit-transform":A?f="-o-transform":C&&(f="-moz-transform");var e;f&&(e=U(a,f));e||(e=U(a,"transform"));a=e?(a=e.match(qc))?new M(parseFloat(a[1]),parseFloat(a[2])):new M(0,0):new M(0,0);b=new M(b.x+a.x,b.y+a.y)}}else f=fa(a.tc),e=a,a.targetTouches?e=a.targetTouches[0]:f&&a.s.targetTouches&&(e=a.s.targetTouches[0]),
b.x=e.clientX,b.y=e.clientY;return b}function jc(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}function rc(a){if("none"!=U(a,"display"))return sc(a);var b=a.style,c=b.display,d=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=sc(a);b.display=c;b.position=f;b.visibility=d;return a}
function sc(a){var b=a.offsetWidth,c=a.offsetHeight,d=D&&!b&&!c;return(void 0===b||d)&&a.getBoundingClientRect?(a=kc(a),new P(a.right-a.left,a.bottom-a.top)):new P(b,c)}function tc(a,b){var c=Q(b),d=null;if(B)c=d=c.e.createStyleSheet(),B?c.cssText=a:c.innerHTML=a;else{var f=cc(c,"head")[0];f||(d=cc(c,"body")[0],f=c.h("head"),d.parentNode.insertBefore(f,d));var e=d=c.h("style");B?e.cssText=a:e.innerHTML=a;c.appendChild(f,d)}}function oc(a){return"rtl"==U(a,"direction")}
var uc=C?"MozUserSelect":D?"WebkitUserSelect":null;function vc(a,b,c){c=c?null:a.getElementsByTagName("*");if(uc){if(b=b?"none":"",a.style[uc]=b,c){a=0;for(var d;d=c[a];a++)d.style[uc]=b}}else if(B||A)if(b=b?"on":"",a.setAttribute("unselectable",b),c)for(a=0;d=c[a];a++)d.setAttribute("unselectable",b)}
function wc(a,b){var c=dc(Q(R(a)));if(!B||c&&E("8"))xc(a,b,"content-box");else{var d=a.style;if(c)d.pixelWidth=b.width,d.pixelHeight=b.height;else{var c=yc(a,"padding"),f=zc(a);d.pixelWidth=b.width+f.left+c.left+c.right+f.right;d.pixelHeight=b.height+f.top+c.top+c.bottom+f.bottom}}}function xc(a,b,c){a=a.style;C?a.MozBoxSizing=c:D?a.WebkitBoxSizing=c:a.boxSizing=c;a.width=Math.max(b.width,0)+"px";a.height=Math.max(b.height,0)+"px"}
function Ac(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;var f=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return f}function Bc(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?Ac(a,c):0}
function yc(a,b){if(B){var c=Bc(a,b+"Left"),d=Bc(a,b+"Right"),f=Bc(a,b+"Top"),e=Bc(a,b+"Bottom");return new N(f,d,e,c)}c=T(a,b+"Left");d=T(a,b+"Right");f=T(a,b+"Top");e=T(a,b+"Bottom");return new N(parseFloat(f),parseFloat(d),parseFloat(e),parseFloat(c))}var Cc={thin:2,medium:4,thick:6};function Dc(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null;return c in Cc?Cc[c]:Ac(a,c)}
function zc(a){if(B){var b=Dc(a,"borderLeft"),c=Dc(a,"borderRight"),d=Dc(a,"borderTop");a=Dc(a,"borderBottom");return new N(d,c,a,b)}b=T(a,"borderLeftWidth");c=T(a,"borderRightWidth");d=T(a,"borderTopWidth");a=T(a,"borderBottomWidth");return new N(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}var qc=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Ec(a,b){return(b&4&&oc(a)?b^2:b)&-5};function Fc(){}Fc.prototype.T=function(){};function Gc(a,b,c){this.element=a;this.rc=b;this.Vc=c}v(Gc,Fc);
Gc.prototype.T=function(a,b,c){var d=this.element,f=this.rc,e=this.Vc,h,k;if(h=a.offsetParent){var l="HTML"==h.tagName||"BODY"==h.tagName;l&&"static"==U(h,"position")||(k=nc(h),l||(l=(l=oc(h))&&C?-h.scrollLeft:!l||B&&E("8")?h.scrollLeft:h.scrollWidth-h.clientWidth-h.scrollLeft,k=Jb(k,new M(l,h.scrollTop))))}h=k||new M;k=nc(d);l=rc(d);k=new S(k.x,k.y,l.width,l.height);if(l=mc(d)){var m=fc(l),l=Math.max(k.left,m.left),r=Math.min(k.left+k.width,m.left+m.width);if(l<=r){var q=Math.max(k.top,m.top),m=
Math.min(k.top+k.height,m.top+m.height);q<=m&&(k.left=l,k.top=q,k.width=r-l,k.height=m-q)}}l=Q(d);q=Q(a);if(l.e!=q.e){var r=l.e.body,q=Wb(q.e),m=new M(0,0),u=Vb(R(r)),y=r;do{var la=u==q?nc(y):pc(y);m.x+=la.x;m.y+=la.y}while(u&&u!=q&&(y=u.frameElement)&&(u=u.parent));r=Jb(m,nc(r));B&&!dc(l)&&(r=Jb(r,ec(l)));k.left+=r.x;k.top+=r.y}var d=Ec(d,f),f=new M(d&2?k.left+k.width:k.left,d&1?k.top+k.height:k.top),f=Jb(f,h),t;e&&(t=mc(a))&&(t.top-=h.y,t.right-=h.x,t.bottom-=h.y,t.left-=h.x);a:{d=t;t=f.la();h=
Ec(a,b);f=rc(a);b=f.la();if(c||0!=h)h&2?t.x-=b.width+(c?c.right:0):c&&(t.x+=c.left),h&1?t.y-=b.height+(c?c.bottom:0):c&&(t.y+=c.top);if(e&&(d?(c=t,h=0,65==(e&65)&&(c.x<d.left||c.x>=d.right)&&(e&=-2),132==(e&132)&&(c.y<d.top||c.y>=d.bottom)&&(e&=-5),c.x<d.left&&e&1&&(c.x=d.left,h|=1),c.x<d.left&&c.x+b.width>d.right&&e&16&&(b.width=Math.max(b.width-(c.x+b.width-d.right),0),h|=4),c.x+b.width>d.right&&e&1&&(c.x=Math.max(d.right-b.width,d.left),h|=1),e&2&&(h=h|(c.x<d.left?16:0)|(c.x+b.width>d.right?32:
0)),c.y<d.top&&e&4&&(c.y=d.top,h|=2),c.y>=d.top&&c.y+b.height>d.bottom&&e&32&&(b.height=Math.max(b.height-(c.y+b.height-d.bottom),0),h|=8),c.y+b.height>d.bottom&&e&4&&(c.y=Math.max(d.bottom-b.height,d.top),h|=2),e&8&&(h=h|(c.y<d.top?64:0)|(c.y+b.height>d.bottom?128:0)),e=h):e=256,e&496))break a;ic(a,t);Pb(f,b)||(c=dc(Q(R(a))),!B||c&&E("8")?xc(a,b,"border-box"):(e=a.style,c?(c=yc(a,"padding"),a=zc(a),e.pixelWidth=b.width-a.left-c.left-c.right-a.right,e.pixelHeight=b.height-a.top-c.top-c.bottom-a.bottom):
(e.pixelWidth=b.width,e.pixelHeight=b.height)))}};function V(a){F.call(this);this.Wb=a;this.ab=[]}v(V,F);var Hc=[];function W(a,b,c,d,f){da(c)||(Hc[0]=c,c=Hc);for(var e=0;e<c.length;e++){var h=K(b,c[e],d||a,f||!1,a.Wb||a);a.ab.push(h)}return a}function Ic(a,b,c,d,f,e){if(da(c))for(var h=0;h<c.length;h++)Ic(a,b,c[h],d,f,e);else{a:{d=d||a;e=e||a.Wb||a;f=!!f;if(b=Eb(b,c,f))for(c=0;c<b.length;c++)if(!b[c].ja&&b[c].sa==d&&b[c].za==f&&b[c].Xa==e){b=b[c];break a}b=null}b&&(b=b.key,L(b),Fa(a.ab,b))}return a}function Jc(a){Ca(a.ab,L);a.ab.length=0}
V.prototype.i=function(){V.f.i.call(this);Jc(this)};V.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function Kc(){F.call(this)}v(Kc,F);g=Kc.prototype;g.Qb=!0;g.gb=null;g.Ja=function(a){this.gb=a};g.addEventListener=function(a,b,c,d){K(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){Db(this,a,b,c,d)};
g.dispatchEvent=function(a){var b=a.type||a,c=I;if(b in c){if(p(a))a=new H(a,this);else if(a instanceof H)a.target=a.target||this;else{var d=a;a=new H(b,this);xb(a,d)}var d=1,f,c=c[b],b=!0 in c,e;if(b){f=[];for(e=this;e;e=e.gb)f.push(e);e=c[!0];e.C=e.F;for(var h=f.length-1;!a.ia&&0<=h&&e.C;h--)a.currentTarget=f[h],d&=Hb(e,f[h],a.type,!0,a)&&!1!=a.hb}if(!1 in c)if(e=c[!1],e.C=e.F,b)for(h=0;!a.ia&&h<f.length&&e.C;h++)a.currentTarget=f[h],d&=Hb(e,f[h],a.type,!1,a)&&!1!=a.hb;else for(f=this;!a.ia&&f&&
e.C;f=f.gb)a.currentTarget=f,d&=Hb(e,f,a.type,!1,a)&&!1!=a.hb;a=Boolean(d)}else a=!0;return a};g.i=function(){Kc.f.i.call(this);Gb(this);this.gb=null};function Lc(a,b,c,d,f){if(!(B||D&&E("525")))return!0;if(z&&f)return Mc(a);if(f&&!d||!c&&(17==b||18==b||z&&91==b))return!1;if(D&&d&&c)switch(a){case 220:case 219:case 221:case 192:case 186:case 189:case 187:case 188:case 190:case 191:case 192:case 222:return!1}if(B&&d&&b==a)return!1;switch(a){case 13:return!(B&&B&&9<=fb);case 27:return!D}return Mc(a)}
function Mc(a){if(48<=a&&57>=a||96<=a&&106>=a||65<=a&&90>=a||D&&0==a)return!0;switch(a){case 32:case 63:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:return!0;default:return!1}}function Nc(a){switch(a){case 61:return 187;case 59:return 186;case 224:return 91;case 0:return 224;default:return a}};function Oc(){}ba(Oc);Oc.prototype.Lc=0;Oc.ea();function X(a){F.call(this);this.Ta=a||Q();this.Z=Pc}v(X,Kc);X.prototype.Hc=Oc.ea();var Pc=null;function Qc(a,b){switch(a){case 1:return b?"disable":"enable";case 2:return b?"highlight":"unhighlight";case 4:return b?"activate":"deactivate";case 8:return b?"select":"unselect";case 16:return b?"check":"uncheck";case 32:return b?"focus":"blur";case 64:return b?"open":"close"}throw Error("Invalid component state");}g=X.prototype;g.Zb=null;g.t=!1;g.l=null;g.Z=null;g.L=null;g.ha=null;g.o=null;g.Pa=null;
g.ed=!1;function Rc(a){return a.Zb||(a.Zb=":"+(a.Hc.Lc++).toString(36))}g.b=function(){return this.l};g.Ca=function(){return this.pa||(this.pa=new V(this))};g.getParent=function(){return this.ha};g.Ja=function(a){if(this.ha&&this.ha!=a)throw Error("Method not supported");X.f.Ja.call(this,a)};g.g=function(){return this.Ta};g.h=function(){this.l=this.Ta.createElement("div")};
g.Ib=function(a){if(this.t)throw Error("Component already rendered");this.l||this.h();a?a.insertBefore(this.l,null):this.Ta.e.body.appendChild(this.l);this.ha&&!this.ha.t||this.I()};g.I=function(){this.t=!0;Sc(this,function(a){!a.t&&a.b()&&a.I()})};g.Q=function(){Sc(this,function(a){a.t&&a.Q()});this.pa&&Jc(this.pa);this.t=!1};
g.i=function(){X.f.i.call(this);this.t&&this.Q();this.pa&&(this.pa.P(),delete this.pa);Sc(this,function(a){a.P()});!this.ed&&this.l&&Yb(this.l);this.ha=this.L=this.l=this.Pa=this.o=null};function Tc(a){null==a.Z&&(a.Z=oc(a.t?a.l:a.Ta.e.body));return a.Z}g.Ka=function(a){if(this.t)throw Error("Component already rendered");this.Z=a};function Uc(a,b){var c;a.Pa&&b?(c=a.Pa,c=(b in c?c[b]:void 0)||null):c=null;return c}function Vc(a,b){return a.o?a.o[b]||null:null}function Sc(a,b,c){a.o&&Ca(a.o,b,c)}
function Wc(a,b){return a.o&&b?Ba(a.o,b):-1}g.removeChild=function(a,b){if(a){var c=p(a)?a:Rc(a);a=Uc(this,c);if(c&&a){var d=this.Pa;c in d&&delete d[c];Fa(this.o,a);b&&(a.Q(),a.l&&Yb(a.l));c=a;if(null==c)throw Error("Unable to set parent component");c.ha=null;X.f.Ja.call(c,null)}}if(!a)throw Error("Child is not in parent component");return a};g.jc=function(a){for(var b=[];this.o&&0!=this.o.length;)b.push(this.removeChild(Vc(this,0),a));return b};function Xc(){return null};function Yc(){}v(Yc,F);g=Yc.prototype;g.cd=Xc;g.yb=Xc;g.set=Xc;g.ad=Xc;g.push=Xc;g.Zc=Xc;function Zc(){this.ib={};this.d=new V(this);W(this.d,window,["beforeunload","unload"],this.Gc)}v(Zc,F);ba(Zc);Zc.prototype.Gc=function(){this.P()};Zc.prototype.i=function(){G(this.d);for(var a in this.ib)G(this.ib[a]),delete this.ib[a];Zc.f.i.call(this)};var $c={hd:"kc",kd:"kmi",jd:"kma",gd:"kcs",fd:"kce",md:"lld",ld:"lat"};var ad={de:yb(["Y",90,"Z",89,"\u00dc",192,"\u00db",189,"\u00dd",187,"\u00ba",219,"\u00bb",221,"\u00bf",220,"\u00cc",186,"\u00bd",191]),fr:yb(["Q",65,"A",81,"Z",87,"W",90,"\u00dd",219,"\u00ba",221,"M",186,"\u00c0",222,"\u00de",192,"\u00bc",77,"\u00be",188,"\u00bf",190,"\u00df",191,"\u00db",189])},bd={59:186,61:187,107:187,109:189,173:189},cd={126:192,95:189,124:220,58:186,60:188,62:190,63:191};function dd(a,b){H.call(this,a);this.Jc=b}v(dd,H);function ed(a){this.id=a.id;this.view={id:a.id,title:a.title,Ab:"rtl"==a.direction,Ea:!!a.is102Keyboard,eb:yb(["",null,"s",null,"c",null,"l",null,"sc",null,"cl",null,"sl",null,"scl",null])};this.ya=this.Ma=null;var b=this.view.Ea?"\u00c01234567890\u00bd\u00bbQWERTYUIOP\u00db\u00ddASDFGHJKL\u00ba\u00de\u00dc\u00e2ZXCVBNM\u00bc\u00be\u00bf ":"\u00c01234567890\u00bd\u00bbQWERTYUIOP\u00db\u00dd\u00dcASDFGHJKL\u00ba\u00deZXCVBNM\u00bc\u00be\u00bf ",c=a.mappings,d;for(d in c){var f=c[d],e=d.split(/,/);
e.join(",")!=d&&e.push("");var h={},k;for(k in f){var l=f[k];if(""==k&&(k=b,this.view.Ea))var m=l.slice(0,25),m=m+l.slice(26,37),m=m+l.charAt(25),l=m+=l.slice(37);k=k.replace("m","\u00bd");k=k.replace("=","\u00bb");k=k.replace(";","\u00ba");if(1==k.length)h[k]=da(l)?l:["S",l,l];else for(var r=0,m=0,q;q=k.charAt(m);++m){var u=l.charAt(r++);if(u==l.charAt(r)&&"{"==u){u=l.indexOf("}}",r);if(u<r)break;var r=l.slice(r+1,u),y=r.split("||");3==y.length?h[q]=y:1==y.length&&(h[q]=["S",r,r]);r=u+2}else h[q]=
["S",u,u]}}for(var m=0,la;la=e[m],void 0!=la;++m)this.view.eb[la]=h}if(b=a.transform){c=[];d=[];var f=1,t;for(t in b)c[f]=[RegExp(t+"$"),b[t]],d.push("("+t+"$)"),e=RegExp(t+"|.*").exec("").length,f+=e;this.Ma=[RegExp(d.join("|")),c]}if(a=a.historyPruneRegex)this.ya=RegExp("^("+a+")$")}
ed.prototype.transform=function(a,b,c){if(!this.Ma)return null;a=0<b?a.slice(0,b)+"\u001d"+a.slice(b)+c:a+c;if(b=this.Ma[0].exec(a)){for(var d=this.Ma[1],f=1;f<b.length&&!b[f];f++);b=d[f][0];var d=d[f][1],f=b.exec(a),e=a.slice(f.index),h=-1<e.search("\u001d")?1:0;c=e.length-h-c.length;a=a.replace(b,d).slice(f.index);a=a.replace("\u001d","");return{back:c,aa:a}}return null};function fd(){F.call(this);this.ra={};this.Aa=this.xa="";this.fa={B:{text:"",G:-1},r:"",current:{text:"",G:-1}};pa("google.elements.keyboard.loadme",ma(this.Rc,this))}v(fd,Kc);fd.prototype.Fb=function(a){if(a){var b=this.ra[a];void 0==b?(this.ra[a]=!1,"ko"==a&&(a="hangul"),gd(a)):b&&this.dispatchEvent(new dd("lld",b.view))}};fd.prototype.Na=function(a){if(a&&this.xa!=a){var b=this.ra[a];b?(this.xa=a,this.Aa="",hd(this),this.dispatchEvent(new dd("lat",b.view))):!1==b&&(this.Aa=a)}};
fd.prototype.translate=function(a,b){if(!this.xa||!a)return null;var c=this.ra[this.xa];if(!c)return null;id(this,b);var d,f=this.fa;f.r&&(d=c.transform(f.B.text,f.B.G,f.r+a))&&0>d.back&&(d=null);if(d){var e=f.B.text,e=e.slice(0,e.length-d.back),e=e+d.aa;d.back=f.current.text.length;d.aa=e}else d=c.transform(f.current.text,f.current.G,a);c.ya&&c.ya.exec(f.r+a)?(f.r||(f.B=vb(f.current)),f.r+=a):c.ya&&c.ya.exec(a)?(f.B=vb(f.current),f.r=a):(f.B.text="",f.B.G=-1,f.r="");c=f.current.text;e=f.current.G;
d?(c=c.slice(0,c.length-d.back),c+=d.aa,e=c.length):(c+=a,d={back:0,aa:a});var h=c.lastIndexOf(" ");0<=h&&(c=c.slice(h+1),e=e>h?e-(h+1):-1);f.current.text=c;f.current.G=e;return d};fd.prototype.Rc=function(a){if("hangul"==a.id)gd("ko");else{var b=new ed(a);b.id&&(this.ra[b.id]=b);this.Aa==a.id&&(this.Na(this.Aa),this.Aa="");this.dispatchEvent(new dd("lld",b.view))}};function id(a,b){var c=a.fa.current.text;c&&b&&(ra(b,c)||ra(c,b))||hd(a)}
function hd(a){a.fa.r="";a.fa.B={text:"",G:-1};a.fa.current=vb(a.fa.B)}function gd(a){var b;b=document.createElement("script");b.src="//ssl.gstatic.com/inputtools/js/kbd/1/"+a+".js";document.body.appendChild(b)};function jd(a,b,c){F.call(this);this.target=a;this.handle=b||a;this.Eb=c||new S(NaN,NaN,NaN,NaN);this.e=R(a);this.d=new V(this);K(this.handle,["touchstart","mousedown"],this.jb,!1,this)}v(jd,Kc);var kd=B||C&&E("1.9.3");g=jd.prototype;g.clientX=0;g.clientY=0;g.screenX=0;g.screenY=0;g.lc=0;g.mc=0;g.na=0;g.oa=0;g.ca=!0;g.ba=!1;g.Yb=0;g.$b=!1;g.Lb=!1;g.Ca=function(){return this.d};
g.i=function(){jd.f.i.call(this);Db(this.handle,["touchstart","mousedown"],this.jb,!1,this);Jc(this.d);kd&&this.e.releaseCapture();this.d=this.handle=this.target=null};function ld(a){void 0===a.Z&&(a.Z=oc(a.target));return a.Z}
g.jb=function(a){var b="mousedown"==a.type;if(!this.ca||this.ba||b&&!rb(a))this.dispatchEvent("earlycancel");else{md(a);if(0==this.Yb)if(this.dispatchEvent(new nd("start",this,a.clientX,a.clientY)))this.ba=!0,a.preventDefault();else return;else a.preventDefault();this.kc();this.clientX=this.lc=a.clientX;this.clientY=this.mc=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;if(this.Lb){a=this.target;var b=a.offsetLeft,c=a.offsetParent;c||"fixed"!=U(a,"position")||(c=R(a).documentElement);if(c){if(C)var d=
zc(c),b=b+d.left;else B&&8<=fb&&(d=zc(c),b-=d.left);a=oc(c)?c.clientWidth-(b+a.offsetWidth):b}else a=b}else a=this.target.offsetLeft;this.na=a;this.oa=this.target.offsetTop;this.Gb=ec(Q(this.e));oa()}};
g.kc=function(){var a=this.e,b=a.documentElement,c=!kd;W(this.d,a,["touchmove","mousemove"],this.Vb,c);W(this.d,a,["touchend","mouseup"],this.da,c);kd?(b.setCapture(!1),W(this.d,b,"losecapture",this.da)):W(this.d,Vb(a),"blur",this.da);B&&this.$b&&W(this.d,a,"dragstart",nb);this.Jb&&W(this.d,this.Jb,"scroll",this.hc,c)};
g.da=function(a){Jc(this.d);kd&&this.e.releaseCapture();if(this.ba){md(a);this.ba=!1;var b=od(this,this.na),c=pd(this,this.oa);this.dispatchEvent(new nd("end",this,a.clientX,a.clientY,0,b,c))}else this.dispatchEvent("earlycancel");"touchend"!=a.type&&"touchcancel"!=a.type||a.preventDefault()};function md(a){var b=a.type;"touchstart"==b||"touchmove"==b?a.ga(a.s.targetTouches[0],a.currentTarget):"touchend"!=b&&"touchcancel"!=b||a.ga(a.s.changedTouches[0],a.currentTarget)}
g.Vb=function(a){if(this.ca){md(a);var b=(this.Lb&&ld(this)?-1:1)*(a.clientX-this.clientX),c=a.clientY-this.clientY;this.clientX=a.clientX;this.clientY=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;if(!this.ba){var d=this.lc-this.clientX,f=this.mc-this.clientY;if(d*d+f*f>this.Yb)if(this.dispatchEvent(new nd("start",this,a.clientX,a.clientY)))this.ba=!0;else{this.Sa||this.da(a);return}}c=qd(this,b,c);b=c.x;c=c.y;this.ba&&this.dispatchEvent(new nd("beforedrag",this,a.clientX,a.clientY,0,b,
c))&&(rd(this,a,b,c),a.preventDefault())}};function qd(a,b,c){var d=ec(Q(a.e));b+=d.x-a.Gb.x;c+=d.y-a.Gb.y;a.Gb=d;a.na+=b;a.oa+=c;b=od(a,a.na);a=pd(a,a.oa);return new M(b,a)}g.hc=function(a){var b=qd(this,0,0);a.clientX=this.clientX;a.clientY=this.clientY;rd(this,a,b.x,b.y)};function rd(a,b,c,d){a.Lb&&ld(a)?a.target.style.right=c+"px":a.target.style.left=c+"px";a.target.style.top=d+"px";a.dispatchEvent(new nd("drag",a,b.clientX,b.clientY,0,c,d))}
function od(a,b){var c=a.Eb,d=isNaN(c.left)?null:c.left,c=isNaN(c.width)?0:c.width;return Math.min(null!=d?d+c:Infinity,Math.max(null!=d?d:-Infinity,b))}function pd(a,b){var c=a.Eb,d=isNaN(c.top)?null:c.top,c=isNaN(c.height)?0:c.height;return Math.min(null!=d?d+c:Infinity,Math.max(null!=d?d:-Infinity,b))}function nd(a,b,c,d,f,e,h){H.call(this,a);this.clientX=c;this.clientY=d;this.left=void 0!==e?e:b.na;this.top=void 0!==h?h:b.oa}v(nd,H);function sd(a,b){F.call(this);a&&td(this,a,b)}v(sd,Kc);g=sd.prototype;g.l=null;g.Za=null;g.Bb=null;g.$a=null;g.u=-1;g.Y=-1;g.mb=!1;
var ud={3:13,12:144,63232:38,63233:40,63234:37,63235:39,63236:112,63237:113,63238:114,63239:115,63240:116,63241:117,63242:118,63243:119,63244:120,63245:121,63246:122,63247:123,63248:44,63272:46,63273:36,63275:35,63276:33,63277:34,63289:144,63302:45},vd={Up:38,Down:40,Left:37,Right:39,Enter:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"U+007F":46,Home:36,End:35,PageUp:33,PageDown:34,Insert:45},wd=B||D&&E("525"),xd=z&&C;g=sd.prototype;
g.Bc=function(a){D&&(17==this.u&&!a.ctrlKey||18==this.u&&!a.altKey||z&&91==this.u&&!a.metaKey)&&(this.Y=this.u=-1);-1==this.u&&(a.ctrlKey&&17!=a.keyCode?this.u=17:a.altKey&&18!=a.keyCode?this.u=18:a.metaKey&&91!=a.keyCode&&(this.u=91));wd&&!Lc(a.keyCode,this.u,a.shiftKey,a.ctrlKey,a.altKey)?this.handleEvent(a):(this.Y=C?Nc(a.keyCode):a.keyCode,xd&&(this.mb=a.altKey))};g.Cc=function(a){this.Y=this.u=-1;this.mb=a.altKey};
g.handleEvent=function(a){var b=a.s,c,d,f=b.altKey;B&&"keypress"==a.type?(c=this.Y,d=13!=c&&27!=c?b.keyCode:0):D&&"keypress"==a.type?(c=this.Y,d=0<=b.charCode&&63232>b.charCode&&Mc(c)?b.charCode:0):A?(c=this.Y,d=Mc(c)?b.keyCode:0):(c=b.keyCode||this.Y,d=b.charCode||0,xd&&(f=this.mb),z&&63==d&&224==c&&(c=191));var e=c,h=b.keyIdentifier;c?63232<=c&&c in ud?e=ud[c]:25==c&&a.shiftKey&&(e=9):h&&h in vd&&(e=vd[h]);a=e==this.u;this.u=e;b=new yd(e,d,a,b);b.altKey=f;this.dispatchEvent(b)};g.b=function(){return this.l};
function td(a,b,c){a.$a&&a.detach();a.l=b;a.Za=K(a.l,"keypress",a,c);a.Bb=K(a.l,"keydown",a.Bc,c,a);a.$a=K(a.l,"keyup",a.Cc,c,a)}g.detach=function(){this.Za&&(L(this.Za),L(this.Bb),L(this.$a),this.$a=this.Bb=this.Za=null);this.l=null;this.Y=this.u=-1};g.i=function(){sd.f.i.call(this);this.detach()};function yd(a,b,c,d){d&&this.ga(d,void 0);this.type="key";this.keyCode=a;this.charCode=b;this.repeat=c}v(yd,pb);function zd(){}var Ad;ba(zd);g=zd.prototype;g.h=function(a){var b=a.g().h("div",this.tb(a).join(" "),a.qb);a.isEnabled()||Bd(b,1,!0);a.a&8&&Bd(b,8,!0);a.v&16&&Bd(b,16,!!(a.a&16));a.v&64&&Bd(b,64,!!(a.a&64));return b};g.Ba=function(a,b,c){if(a=a.b?a.b():a)if(B&&!E("7")){var d=Cd(Mb(a),b);d.push(b);na(c?O:Nb,a).apply(null,d)}else c?O(a,b):Nb(a,b)};g.zb=function(a){Tc(a)&&this.Ka(a.b(),!0);a.isEnabled()&&this.Ia(a,a.j)};g.Kb=function(a,b){vc(a,!b,!B&&!A)};
g.Ka=function(a,b){this.Ba(a,this.W()+"-rtl",b)};g.Fa=function(a){var b;return a.v&32&&(b=a.p())?ac(b):!1};g.Ia=function(a,b){var c;if(a.v&32&&(c=a.p())){if(!b&&a.a&32){try{c.blur()}catch(d){}a.a&32&&a.Da(null)}ac(c)!=b&&(b?c.tabIndex=0:(c.tabIndex=-1,c.removeAttribute("tabIndex")))}};g.D=function(a,b){a.style.display=b?"":"none"};g.M=function(a,b,c){var d=a.b();if(d){var f=Dd(this,b);f&&this.Ba(a,f,c);Bd(d,b,c)}};
function Bd(a,b,c){Ad||(Ad={1:"disabled",8:"selected",16:"checked",64:"expanded"});(b=Ad[b])&&a.setAttribute("aria-"+b,c)}g.p=function(a){return a.b()};g.W=function(){return"goog-control"};g.tb=function(a){var b=this.W(),c=[b],d=this.W();d!=b&&c.push(d);b=a.a;for(d=[];b;){var f=b&-b;d.push(Dd(this,f));b&=~f}c.push.apply(c,d);(a=a.J)&&c.push.apply(c,a);B&&!E("7")&&c.push.apply(c,Cd(c));return c};
function Cd(a,b){var c=[];b&&(a=a.concat([b]));Ca([],function(d){!Ea(d,na(x,a))||b&&!x(d,b)||c.push(d.join("_"))});return c}function Dd(a,b){if(!a.Pb){var c=a.W();a.Pb={1:c+"-disabled",2:c+"-hover",4:c+"-active",8:c+"-selected",16:c+"-checked",32:c+"-focused",64:c+"-open"}}return a.Pb[b]};function Ed(a,b){if(!a)throw Error("Invalid class name "+a);if(!fa(b))throw Error("Invalid decorator function "+b);}var Fd={};function Y(a,b,c){X.call(this,c);if(!b){b=this.constructor;for(var d;b;){d=s(b);if(d=Fd[d])break;b=b.f?b.f.constructor:null}b=d?fa(d.ea)?d.ea():new d:null}this.k=b;this.qb=a}v(Y,X);g=Y.prototype;g.qb=null;g.a=0;g.v=39;g.qc=255;g.dd=0;g.j=!0;g.J=null;g.wb=!0;g.lb=!1;g.Yc=null;g.p=function(){return this.k.p(this)};g.Ua=function(){return this.A||(this.A=new sd)};
g.Ba=function(a,b){b?a&&(this.J?x(this.J,a)||this.J.push(a):this.J=[a],this.k.Ba(this,a,!0)):a&&this.J&&(Fa(this.J,a),0==this.J.length&&(this.J=null),this.k.Ba(this,a,!1))};g.h=function(){var a=this.k.h(this);this.l=a;var b=this.Yc||void 0;b&&a.setAttribute("role",b);this.lb||this.k.Kb(a,!1);this.j||this.k.D(a,!1)};
g.I=function(){Y.f.I.call(this);this.k.zb(this);if(this.v&-2&&(this.wb&&Gd(this),this.v&32)){var a=this.p();if(a){var b=this.Ua();td(b,a);W(W(W(this.Ca(),b,"key",this.X),a,"focus",this.Va),a,"blur",this.Da)}}};function Gd(a){var b=a.Ca(),c=a.b();W(W(W(W(b,c,"mouseover",a.Tb),c,"mousedown",a.Wa),c,"mouseup",a.Ub),c,"mouseout",a.Sb);a.ub!=aa&&W(b,c,"contextmenu",a.ub);B&&W(b,c,"dblclick",a.xc)}g.Q=function(){Y.f.Q.call(this);this.A&&this.A.detach();this.j&&this.isEnabled()&&this.k.Ia(this,!1)};
g.i=function(){Y.f.i.call(this);this.A&&(this.A.P(),delete this.A);delete this.k;this.J=this.qb=null};g.Ka=function(a){Y.f.Ka.call(this,a);var b=this.b();b&&this.k.Ka(b,a)};g.Kb=function(a){this.lb=a;var b=this.b();b&&this.k.Kb(b,a)};g.D=function(a,b){if(b||this.j!=a&&this.dispatchEvent(a?"show":"hide")){var c=this.b();c&&this.k.D(c,a);this.isEnabled()&&this.k.Ia(this,a);this.j=a;return!0}return!1};g.isEnabled=function(){return!(this.a&1)};g.U=function(a){Hd(this,2,a)&&this.M(2,a)};
g.setActive=function(a){Hd(this,4,a)&&this.M(4,a)};function Id(a,b){Hd(a,64,b)&&a.M(64,b)}g.M=function(a,b){this.v&a&&b!=!!(this.a&a)&&(this.k.M(this,a,b),this.a=b?this.a|a:this.a&~a)};function Jd(a,b){if(a.t&&a.a&b)throw Error("Component already rendered");a.a&b&&a.M(b,!1);a.v&=~b}function Z(a,b){return!!(a.qc&b)&&!!(a.v&b)}function Hd(a,b,c){return!!(a.v&b)&&!!(a.a&b)!=c&&(!(a.dd&b)||a.dispatchEvent(Qc(b,c)))&&!a.Sa}
g.Tb=function(a){(!a.relatedTarget||!Zb(this.b(),a.relatedTarget))&&this.dispatchEvent("enter")&&this.isEnabled()&&Z(this,2)&&this.U(!0)};g.Sb=function(a){a.relatedTarget&&Zb(this.b(),a.relatedTarget)||!this.dispatchEvent("leave")||(Z(this,4)&&this.setActive(!1),Z(this,2)&&this.U(!1))};g.ub=aa;g.Wa=function(a){this.isEnabled()&&(Z(this,2)&&this.U(!0),rb(a)&&(Z(this,4)&&this.setActive(!0),this.k.Fa(this)&&this.p().focus()));!this.lb&&rb(a)&&a.preventDefault()};
g.Ub=function(a){this.isEnabled()&&(Z(this,2)&&this.U(!0),this.a&4&&Kd(this,a)&&Z(this,4)&&this.setActive(!1))};g.xc=function(a){this.isEnabled()&&Kd(this,a)};function Kd(a,b){if(Z(a,16)){var c=!(a.a&16);Hd(a,16,c)&&a.M(16,c)}Z(a,8)&&Hd(a,8,!0)&&a.M(8,!0);Z(a,64)&&Id(a,!(a.a&64));c=new H("action",a);b&&(c.altKey=b.altKey,c.ctrlKey=b.ctrlKey,c.metaKey=b.metaKey,c.shiftKey=b.shiftKey,c.Hb=b.Hb);return a.dispatchEvent(c)}g.Va=function(){Z(this,32)&&Hd(this,32,!0)&&this.M(32,!0)};
g.Da=function(){Z(this,4)&&this.setActive(!1);Z(this,32)&&Hd(this,32,!1)&&this.M(32,!1)};g.X=function(a){return this.j&&this.isEnabled()&&this.vb(a)?(a.preventDefault(),a.stopPropagation(),!0):!1};g.vb=function(a){return 13==a.keyCode&&Kd(this,a)};if(!fa(Y))throw Error("Invalid component class "+Y);if(!fa(zd))throw Error("Invalid renderer class "+zd);var Ld=s(Y);Fd[Ld]=zd;Ed("goog-control",function(){return new Y(null)});function Md(){}v(Md,zd);ba(Md);Md.prototype.h=function(a){return a.g().h("div",this.W())};Md.prototype.W=function(){return"goog-menuseparator"};function Nd(a,b){Y.call(this,null,a||Md.ea(),b);Jd(this,1);Jd(this,2);Jd(this,4);Jd(this,32);this.a=1}v(Nd,Y);Nd.prototype.I=function(){Nd.f.I.call(this);this.b().setAttribute("role","separator")};Ed("goog-menuseparator",function(){return new Nd});function Od(){}ba(Od);g=Od.prototype;g.h=function(a){return a.g().h("div",this.tb(a).join(" "))};g.zb=function(a){a=a.b();vc(a,!0,C);B&&(a.hideFocus=!0)};g.p=function(a){return a.b()};g.W=function(){return"goog-container"};g.tb=function(a){var b=this.W(),c=[b,a.ta==Pd?b+"-horizontal":b+"-vertical"];a.isEnabled()||c.push(b+"-disabled");return c};function Qd(a,b,c){X.call(this,c);this.k=b||Od.ea();this.ta=a||Rd}v(Qd,X);var Pd="horizontal",Rd="vertical";g=Qd.prototype;g.Cb=null;g.A=null;g.k=null;g.ta=null;g.j=!0;g.ca=!0;g.rb=!0;g.q=-1;g.m=null;g.Ha=!1;g.Uc=!0;g.O=null;g.p=function(){return this.Cb||this.k.p(this)};g.Ua=function(){return this.A||(this.A=new sd(this.p()))};g.h=function(){this.l=this.k.h(this)};
g.I=function(){Qd.f.I.call(this);Sc(this,function(a){if(a.t){var c=a.b(),c=c.id||(c.id=Rc(a));this.O||(this.O={});this.O[c]=a}},this);var a=this.b();this.k.zb(this);this.D(this.j,!0);W(W(W(W(W(W(W(W(this.Ca(),this,"enter",this.zc),this,"highlight",this.Ac),this,"unhighlight",this.Fc),this,"open",this.Ec),this,"close",this.wc),a,"mousedown",this.Wa),R(a),"mouseup",this.yc),a,["mousedown","mouseup","mouseover","mouseout","contextmenu"],this.vc);this.Fa()&&Sd(this,!0)};
function Sd(a,b){var c=a.Ca(),d=a.p();b?W(W(W(c,d,"focus",a.Va),d,"blur",a.Da),a.Ua(),"key",a.X):Ic(Ic(Ic(c,d,"focus",a.Va),d,"blur",a.Da),a.Ua(),"key",a.X)}g.Q=function(){Td(this,-1);this.m&&Id(this.m,!1);this.Ha=!1;Qd.f.Q.call(this)};g.i=function(){Qd.f.i.call(this);this.A&&(this.A.P(),this.A=null);this.k=this.m=this.O=this.Cb=null};g.zc=function(){return!0};
g.Ac=function(a){var b=Wc(this,a.target);if(-1<b&&b!=this.q){var c=Vc(this,this.q);c&&c.U(!1);this.q=b;c=Vc(this,this.q);this.Ha&&c.setActive(!0);this.Uc&&this.m&&c!=this.m&&(c.v&64?Id(c,!0):Id(this.m,!1))}this.b().setAttribute("aria-activedescendant",a.target.b().id)};g.Fc=function(a){a.target==Vc(this,this.q)&&(this.q=-1);this.b().setAttribute("aria-activedescendant","")};g.Ec=function(a){(a=a.target)&&a!=this.m&&a.getParent()==this&&(this.m&&Id(this.m,!1),this.m=a)};
g.wc=function(a){a.target==this.m&&(this.m=null)};g.Wa=function(a){this.ca&&(this.Ha=!0);var b=this.p();b&&ac(b)?b.focus():a.preventDefault()};g.yc=function(){this.Ha=!1};g.vc=function(a){var b;a:{b=a.target;if(this.O)for(var c=this.b();b&&b!==c;){var d=b.id;if(d in this.O){b=this.O[d];break a}b=b.parentNode}b=null}if(b)switch(a.type){case "mousedown":b.Wa(a);break;case "mouseup":b.Ub(a);break;case "mouseover":b.Tb(a);break;case "mouseout":b.Sb(a);break;case "contextmenu":b.ub(a)}};g.Va=function(){};
g.Da=function(){Td(this,-1);this.Ha=!1;this.m&&Id(this.m,!1)};g.X=function(a){return this.isEnabled()&&this.j&&(0!=(this.o?this.o.length:0)||this.Cb)&&this.vb(a)?(a.preventDefault(),a.stopPropagation(),!0):!1};
g.vb=function(a){var b=Vc(this,this.q);if(b&&"function"==typeof b.X&&b.X(a)||this.m&&this.m!=b&&"function"==typeof this.m.X&&this.m.X(a))return!0;if(a.shiftKey||a.ctrlKey||a.metaKey||a.altKey)return!1;switch(a.keyCode){case 27:if(this.Fa())this.p().blur();else return!1;break;case 36:Ud(this);break;case 35:Vd(this);break;case 38:if(this.ta==Rd)Wd(this);else return!1;break;case 37:if(this.ta==Pd)Tc(this)?Xd(this):Wd(this);else return!1;break;case 40:if(this.ta==Rd)Xd(this);else return!1;break;case 39:if(this.ta==
Pd)Tc(this)?Wd(this):Xd(this);else return!1;break;default:return!1}return!0};g.removeChild=function(a,b){if(a=p(a)?Uc(this,a):a){var c=Wc(this,a);-1!=c&&(c==this.q?a.U(!1):c<this.q&&this.q--);var d=a.b();d&&d.id&&this.O&&(c=this.O,d=d.id,d in c&&delete c[d])}c=a=Qd.f.removeChild.call(this,a,b);c.t&&!0!=c.wb&&Gd(c);c.wb=!0;return a};
g.D=function(a,b){if(b||this.j!=a&&this.dispatchEvent(a?"show":"hide")){this.j=a;var c=this.b();c&&(c.style.display=a?"":"none",this.Fa()&&(c=this.p())&&(c.tabIndex=this.ca&&this.j?0:-1),b||this.dispatchEvent(this.j?"aftershow":"afterhide"));return!0}return!1};g.isEnabled=function(){return this.ca};g.Fa=function(){return this.rb};g.Ia=function(a){a!=this.rb&&this.t&&Sd(this,a);this.rb=a;if(this.ca&&this.j){var b=this.p();b&&(b.tabIndex=a?0:-1)}};
function Td(a,b){var c=Vc(a,b);c?c.U(!0):-1<a.q&&Vc(a,a.q).U(!1)}g.U=function(a){Td(this,Wc(this,a))};function Ud(a){Yd(a,function(a,c){return(a+1)%c},(a.o?a.o.length:0)-1)}function Vd(a){Yd(a,function(a,c){a--;return 0>a?c-1:a},0)}function Xd(a){Yd(a,function(a,c){return(a+1)%c},a.q)}function Wd(a){Yd(a,function(a,c){a--;return 0>a?c-1:a},a.q)}
function Yd(a,b,c){c=0>c?Wc(a,a.m):c;var d=a.o?a.o.length:0;c=b.call(a,c,d);for(var f=0;f<=d;){var e=Vc(a,c);if(e&&e.j&&e.isEnabled()&&e.v&2){Td(a,c);break}f++;c=b.call(a,c,d)}};function Zd(a){F.call(this);this.ka=a||window;this.bb=K(this.ka,"resize",this.xb,!1,this);this.ua=Tb(this.ka||window);if(D&&Oa||A&&this.ka.self!=this.ka.top)this.kb=window.setInterval(ma(this.Ob,this),$d)}v(Zd,Kc);var $d=500;g=Zd.prototype;g.bb=null;g.ka=null;g.ua=null;g.kb=null;g.Rb=function(){return this.ua?this.ua.la():null};g.i=function(){Zd.f.i.call(this);this.bb&&(L(this.bb),this.bb=null);this.kb&&(window.clearInterval(this.kb),this.kb=null);this.ua=this.ka=null};g.xb=function(){this.Ob()};
g.Ob=function(){var a=Tb(this.ka||window);Pb(a,this.ua)||(this.ua=a,this.dispatchEvent("resize"))};function ae(a,b,c){jd.call(this,a,b,c);b&&this.e!=R(b)&&(this.sb=Vb(R(b)).frameElement)}v(ae,jd);ae.prototype.jb=function(a){be(this,a);ae.f.jb.call(this,a)};ae.prototype.kc=function(){ce(this,this.e);var a=R(this.handle);a!=this.e&&ce(this,a);this.Jb&&W(this.d,this.Jb,"scroll",this.hc,!kd)};
function ce(a,b){var c=b.documentElement,d=!kd;W(a.d,b,["touchmove","mousemove"],a.Dc,d);W(a.d,b,["touchend","mouseup"],a.da,d);kd?(c.setCapture(!1),W(a.d,c,"losecapture",a.da)):W(a.d,Vb(b),"blur",a.da);B&&a.$b&&W(a.d,b,"dragstart",nb)}ae.prototype.Dc=function(a){be(this,a);this.Vb(a)};function be(a,b){R(b.target)!=a.e&&a.sb&&(b.clientX+=a.sb.offsetLeft,b.clientY+=a.sb.offsetTop)};function de(a,b){ae.call(this,a,b);var c=Q(a);this.Mb=new Zd(Wb(c.e));c=new V(this);W(c,this.Mb,"resize",this.xb);this.Ra||(this.Ra=[]);this.Ra.push(c)}v(de,ae);de.prototype.xb=function(){"none"!=this.target.style.display.toLowerCase()&&ee(this)};function fe(a){var b=rc(a.target);a=a.Mb.Rb();a.width-=2+b.width;a.height-=2+b.height;return new N(2,a.width,a.height,2)}
function ee(a,b){var c=fe(a);a.Eb=fc(c)||new S(NaN,NaN,NaN,NaN);var d=b||pc(a.target);d.x=Math.min(d.x,c.right);d.y=Math.min(d.y,c.bottom);d.x=Math.max(d.x,c.left);d.y=Math.max(d.y,c.top);ic(a.target,d)}de.prototype.i=function(){G(this.Mb);de.f.i.call(this)};!B||Ja.Ga(9);var ge=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");var he={};function ie(a,b){if(a)for(var c=0;c<b.length;c++)0==c?a.className=b[0]:O(a,b[c])}
function je(a){a=a||document;var b=[],c=[];Ha(b,a.getElementsByTagName("IFRAME"),a.getElementsByTagName("FRAME"));Ca(b,function(a){var b;var e=s(document),h=s(a),k=he[e];k||(k=he[e]={});try{var l=window.location.href||"";if(!(h in k))if(a.src){var m=a.src.indexOf("//"),r=0>m?"N/A":a.src.slice(0,m),e=k,q;if(!(q=""!=r&&"http:"!=r&&"https:"!=r)){var u=a.src.match(ge),y=l.match(ge);q=u[3]==y[3]&&u[1]==y[1]&&u[4]==y[4]}e[h]=q}else k[h]=!0;b=k[h]?$b(a):null}catch(la){k[h]=!1,b=null}b&&c.push(b)});return c}
var ke=["box-shadow","z-index","margin","position","display"];function le(a,b){wc(b,rc(a));Ca(ke,function(c){var d=T(a,c);p(c)?hc(b,d,c):ub(c,na(hc,b))})};function $(a,b,c,d){this.Db=c||"";if(this.K=!!d)c=b.e||document,d=Q(),b=d.h("IFRAME",{frameborder:"0",scrolling:"no",style:"background-color:transparent;border:0;display:none;"}),d.append(c.body,b),c=d.uc(b),tc("html body{border:0;margin:0;padding:0} html,body{overflow:hidden}",c.body),this.S=b,b=Q($b(this.S));this.N=a;this.a="";this.V={};this.cc=B&&!Ja.Ga(7);this.dc=A&&!Ja.Ga(11);this.Ic=C&&!Ja.Ga(3);this.d=new V(this);Qd.call(this,void 0,void 0,b)}v($,Qd);g=$.prototype;g.H=null;g.Ya=!1;g.va=null;
g.La=null;g.ma=null;g.fb=null;g.Xb=null;g.Qa=null;g.wa=null;g.R=null;g.nc=0;g.Ib=function(a){$.f.Ib.call(this,a);this.K&&(gc.bd(this.S,!0),le(this.b(),this.S));this.T()};
g.h=function(){$.f.h.call(this);var a=this.b();a.id="kbd";O(a,"notranslate");O(a,"vk-box");B&&O(a,"vk-sf-ie");this.Ic&&O(a,"vk-sf-ff2");var b=me(this),c=this.N.Ea,d=[14,14,c?14:13,c?13:12,3],c=c?"\u00c01234567890\u00bd\u00bb\b\tQWERTYUIOP\u00db\u00dd\r\u0014ASDFGHJKL\u00ba\u00de\u00dc\r\u0010\u00e2ZXCVBNM\u00bc\u00be\u00bf\u0010\u0111 \u0111":"\u00c01234567890\u00bd\u00bb\b\tQWERTYUIOP\u00db\u00dd\u00dc\u0014ASDFGHJKL\u00ba\u00de\r\u0010ZXCVBNM\u00bc\u00be\u00bf\u0010\u0111 \u0111",f=0,e=this.g().h("DIV");
e.dir=e.style.direction="ltr";for(var h=0;5>h;++h){var k=this.g().h("DIV");k.style.whiteSpace="nowrap";for(var l=0;l<d[h];++l){var m;m=c.charCodeAt(f++);var r=ne(this,m),q=this.g().h("BUTTON",{id:"K"+m,type:"button","class":"vk-btn",style:"visibility:"+(r?"":"hidden")});r&&this.g().appendChild(q,r);this.V[m]=this.V[m]?[this.V[m],q]:q;m=q;this.g().appendChild(k,m)}this.g().appendChild(e,k)}this.Qa=e;this.g().appendChild(a,b);this.g().appendChild(a,this.Qa);this.cc&&(a.style.position="absolute",a.style.width=
"1px");this.dc&&(a.style.height="201px",a.style.bottom="10px",a.style.zIndex="20001")};
g.I=function(){$.f.I.call(this);oe(this);this.Ia(!1);this.H=new de(this.K?this.S:this.b(),this.va);W(this.d,this.H,"start",function(){this.Ya=!0;ee(this.H)});var a=["mousedown","mouseover","mouseout"],b=bc(this.g());this.K&&(b=R(this.S));var c=ma(this.fc,this,null);W(this.d,b,"mouseup",c);Ca(je(b),function(a){W(this.d,a,"mouseup",c)},this);for(var d in this.V){b=this.V[Number(d)];d=parseInt(d,10);ea(b)||(b=[b]);for(var f=0,e;e=b[f];++f)W(this.d,e,"click",ma(this.Nc,this,d)),this.cc||W(this.d,e,a,
ma(this.fc,this,e))}d=[this.ma,this.fb];for(f in d)d[f]&&W(this.d,d[f],"click",this.Sc);d.push(this.Xb);for(f in d)d[f]&&W(this.d,d[f],a,this.Tc);W(this.d,this.b(),"mousedown",mb)};g.Q=function(){$.f.Q.call(this);Jc(this.d)};g.Nc=function(a){this.dispatchEvent(new H("action",{keyCode:a}))};
g.fc=function(a,b){var c=!1,d=!1;a&&(c=x(Mb(a),"vk-sf-a"),d=x(Mb(a),"vk-sf-s"));switch(b.type){case "mouseover":this.R=a;c||d||(ie(a,["vk-btn","vk-sf-h"]),O(a.firstChild,"vk-sf-h"));break;case "mouseout":this.R=null;c||d||(a.className="vk-btn",Nb(a.firstChild,"vk-sf-h"));break;case "mousedown":d||(ie(a,["vk-btn","vk-sf-a"]),this.wa=a);break;case "mouseup":this.wa&&(this.wa.className="vk-btn",Nb(this.wa.firstChild,"vk-sf-h"),this.wa=null),this.R&&(ie(this.R,["vk-btn","vk-sf-h"]),O(this.R.firstChild,
"vk-sf-h"))}};g.Tc=function(a){if("mouseover"==a.type||"mouseout"==a.type){var b=null,c=[this.ma,this.fb,this.Xb];x(c,a.target)?b=a.target.firstChild:x(c,a.target.parentElement)&&(b=a.target);if(b)switch(a.type){case "mouseover":O(b,"vk-sf-th");break;case "mouseout":Nb(b,"vk-sf-th")}}};g.Sc=function(a){switch(a.target){case this.ma:case this.ma.firstChild:this.dispatchEvent("kc");break;case this.fb:case this.fb.firstChild:this.dispatchEvent("kmi")}};
g.T=function(a){if(this.b()&&!this.dc){var b=bc(this.g());this.K&&(b=R(this.S));a||(a=fe(this.H),b=Ec(b.body,7),a=new M(b&2?a.right:a.left,b&1?a.bottom:a.top));ee(this.H,a)}};
function pe(a,b){if(a.N){a.N.eb[b]&&(a.a=b);var c={20:"l",16:"s",273:"c"},d;for(d in a.V){var f=a.V[Number(d)];d=parseInt(d,10);var e=c[d];if(e){ea(f)||(f=[f]);for(var h=0,k;k=f[h];++h)k.className="vk-btn",0<=b.indexOf(e)&&O(k,"vk-sf-s")}else if(e=ne(a,d))a.g().jc(f),a.g().appendChild(f,e)}a.R&&!x(Mb(a.R),"vk-sf-s")&&(ie(a.R,["vk-btn","vk-sf-h"]),O(a.R.firstChild,"vk-sf-h"))}}g.D=function(a){var b=$.f.D.call(this,a,!0);this.K&&gc.bd(this.S,a);a&&this.H&&ee(this.H);return b};
function qe(a,b){if(a.j){var c=a.V[b];c&&(ie(c,["vk-btn","vk-sf-a"]),window.setTimeout(function(){c.className="vk-btn"},250))}}g.Ab=function(){return this.N.Ab};
function oe(a){var b=a.N.Ea?[{13:2},{0:1.5,13:1.5},{0:1.75,13:1.25},{0:1.25,12:2.75},{0:3,1:9,2:3}]:[{13:2},{0:1.5,13:1.5},{0:1.75,12:2.25},{0:2.25,11:2.75},{0:3,1:9,2:3}],c=29,d=4,f=a.Qa.children[0].children[0];f&&(c=T(f,"width"),c=D&&c?Number(c.slice(0,-2)):rc(f).width,d=yc(f,"margin"),d=d.right+d.left,c+=d);for(f=0;f<b.length;f++)for(var e in b[f])e=Number(e),a.Qa.children[f].children[e].style.width=c*b[f][e]-d+"px";B&&!Ja.Ga(8)&&(a.nc=15*c-d-2,a.va.style.width=a.nc+"px")}
function re(a){B&&!Ja.Ga(8)?(a.style.display="inline",a.style.zoom=1):a.style.display="inline-block"}
function me(a){var b=a.Ab(),c=a.g().h("DIV",{dir:b?"rtl":"ltr",style:"white-space: nowrap;"});a.va=a.g().h("DIV",{"class":"vk-t"},a.N.title);a.va.style.textAlign=b?"right":"left";re(a.va);a.g().appendChild(c,a.va);a.La=a.g().h("DIV",{"class":"vk-t-btns"});a.g().appendChild(c,a.La);var d=b?"paddingLeft":"paddingRight";a.La.style[b?"left":"right"]=0;re(a.La);a.ma=function(b,c){var d=a.g().h(c?"A":"DIV",c?{target:"_blank",href:this.Db,"class":"vk-t-btn-o"}:{"class":"vk-t-btn-o"});O(d,b);var k=a.g().h("DIV",
{"class":"vk-t-btn"});O(k,b);a.g().appendChild(d,k);a.g().appendChild(a.La,d);re(d);return d}("vk-sf-cl");a.ma.style[d]="14px";return c}var se={8:"vk-sf-c8",16:"vk-sf-c16",20:"vk-sf-c20"};
function ne(a,b){if(9==b||13==b)return null;var c=a.g().h("SPAN");if(se[b])return ie(c,["vk-cap","vk-sf-b",se[b]]),c;if(273==b)return ie(c,["vk-cap","vk-sf-c273"]),c.innerHTML="Ctrl + Alt",c;var d=null,f=a.N.eb[a.a][String.fromCharCode(b)];f&&f[1]&&("S"==f[0]?(d=a.g().createTextNode(f[1]),c.className="vk-cap"):"P"==f[0]&&(d=a.g().h("IMG",{src:"//ssl.gstatic.com/inputtools/images/vk/layouts/"+a.N.id+"_"+f[1]+".png"}),d.className="vk-cap-i"));d?a.g().appendChild(c,d):(a.g().appendChild(c,document.createTextNode(".")),
c.style.visibility="hidden");return c}$.prototype.i=function(){G(this.d);G(this.H);$.f.i.call(this);this.K&&Yb(this.S)};function te(a,b){F.call(this);this.L=new fd;this.sc=Q();this.w={};this.d=new V(this);this.$=Zc.ea().ib.vk||new Yc;this.pc={};this.oc={};this.Db=a||"";this.K=!!b;this.L.Ja(this);W(this.d,this.L,"lat",this.Qc);for(var c=0,d;d=" \u00a0\n\r`~!@#$%^&*()_+-=[]{}\\|;:'\",./<>?".charAt(c);++c)this.pc[d]=!0;ue&&(tc(ue),ue="")}var ve;v(te,Kc);g=te.prototype;g.qa=null;g.Kc=!0;g.a=0;g.c=null;g.Mc="en";g.pb=null;g.nb=null;g.ob=null;g.j=!0;g.Xc=!1;g.Wc=!1;var ue="";function we(){ve||(ve=new te);return ve}g=te.prototype;
g.Fb=function(a){this.L.Fb(a)};g.Na=function(a,b){b&&(this.oc[a]=b);this.L.Na(a)};g.D=function(a){this.j=a;this.c&&(a||(this.a=0,pe(this.c,xe(this))),this.c.D(a))};g.T=function(a,b,c){if(this.c){var d=this.c;d.b()&&(a.T(d.b(),b,c),d.j&&ee(d.H))}else this.pb=a,this.nb=b,this.ob=c||new N(0,0,0,0)};
g.handleEvent=function(a){if(!this.Kc||!this.c)return!1;var b=!1;switch(a.type){case "keydown":b=ye(this,a);break;case "keypress":a:if(this.w[0])b=!0;else{if(z&&C&&(a=cd[a.charCode])){b=ze(this,a);break a}b=this.w[0]}break;case "keyup":a=Ae(this,a.keyCode),b=this.a,20==a&&z&&D?b&=-9:16==a?b&=-258:18==a?(b&=-3,b&=-513):17==a?(b&=-5,b&=-513):91==a&&(b&=-17),this.a!=b&&(this.a=b,pe(this.c,xe(this))),b=this.w[a],delete this.w[a]}return b};g.Pc=function(){this.D(!1)};
g.Oc=function(a){if(this.c){if(this.qa){var b=this.qa;b.n&&b.n.focus()}if(a=a.target.keyCode){switch(a){case 16:this.a&1&&(this.a|=256,this.a&=-2);this.a^=256;pe(this.c,xe(this));break;case 273:this.a&2&&this.a&4&&(this.a|=512,this.a&=-7);this.a^=512;pe(this.c,xe(this));break;case 20:this.a^=8;pe(this.c,xe(this));break;default:ze(this,a)}this.$.yb("kcc")}}};
g.Qc=function(a){var b=a.Jc;b.title=this.oc[b.id]||b.title;a=this.pb;var c=this.nb,d=this.ob;this.ob=this.nb=this.pb=null;var f=!1,e=null;this.c&&(this.j=this.c.j,f=this.c.Ya,this.c.j&&f&&(e=this.c,e=e.K?e.S:e.b(),e=new M(e.offsetLeft,e.offsetTop)),this.c.P(),this.$.set("act","sw"),this.$.Zc());this.$.ad("lay",b.id);this.$.cd("vkd_"+b.id);this.c=new $(b,this.sc,this.Db,this.K);this.c.Ja(this);this.c.Ib();this.c.Ya=f;this.c.D(this.j);e?this.c.T(e):a&&null!=c?(b=this.c,b.b()&&(a.T(b.b(),c,d),b.j&&ee(b.H)),
this.c.Ya=!0):this.c.T();pe(this.c,xe(this));W(W(this.d,this.c,"action",this.Oc),this.c,["kc","kmi"],this.Pc)};
function ye(a,b){var c=Ae(a,b.keyCode),d=a.a&776;20==c&&(d=z&&D?d|8:d^8);if(16==c||b.shiftKey)d|=1;if(18==c||b.altKey)d|=2;if(17==c||b.ctrlKey)d|=4;if(91==c||b.metaKey)d|=16;a.a!=d&&(a.a=d,pe(a.c,xe(a)));if(a.a&16)return a.w[0]=a.w[c]=!1;var d=!!(a.a&4),f=!!(a.a&2),e=!!(a.a&16);if(17==c||18==c||16==c||20==c)return a.w[0]=a.w[c]=20==c;if(e||d!=f)return a.w[0]=a.w[c]=!1;a.$.yb("kkc");qe(a.c,c);d=ze(a,c);return a.w[0]=a.w[c]=d}
function ze(a,b){if(!a.qa)return!1;var c;a:{var d=a.c;c=String.fromCharCode(b);var f=d.N.eb[d.a][c];if(f&&(f=f[2])){c=f;break a}c=32==b?" ":0<=(d.N.Ea?"\u00c01234567890\u00bd\u00bbQWERTYUIOP\u00db\u00ddASDFGHJKL\u00ba\u00de\u00dc\u00e2ZXCVBNM\u00bc\u00be\u00bf ":"\u00c01234567890\u00bd\u00bbQWERTYUIOP\u00db\u00dd\u00dcASDFGHJKL\u00ba\u00deZXCVBNM\u00bc\u00be\u00bf ").indexOf(c)?"":null}c&&!a.pc[c]?a.Nb||(a.Nb=!0,a.$.yb("wc")):a.Nb&&8!=b&&(a.Nb=!1);if(a.a&256||a.a&512)d=a.a,a.Xc||(d&=-257),a.Wc||(d&=
-513),d!=a.a&&(a.a=d,pe(a.c,xe(a)));if(""==c)return!0;if(null==c&&8!=b)return!1;d={back:1,aa:""};f=a.L;if((f=f.ra[f.xa])&&f.Ma){var e=a.qa;if(e.n)if(document.selection){var h=document.selection.createRange().getBookmark(),f=e.n.createTextRange();f.moveToBookmark(h);e=e.n.createTextRange();e.collapse(!0);e.setEndPoint("EndToStart",f);f=e.text}else f=e.n.value.slice(0,e.n.selectionStart);else f="";f=f||"";if(8==b)if(c=a.L,id(c,f),c=c.fa,f=c.current.text){f=f.slice(0,f.length-1);c.current.text=f;c.current.G>
f.length&&(c.current.G=f.length);if(f=c.r)c.r=f.slice(0,f.length-1);c.r||(c.B={text:"",G:-1})}else c.B={text:"",G:-1},c.r="",c.current=vb(c.B);else d=a.L.translate(c,f)}else c&&(d={back:0,aa:c});a.dispatchEvent(new H("kcs"));c=a.qa;f=d.aa;d=d.back;if(c.n)if(d=d?d:0,document.selection)e=document.selection.createRange(),e.parentElement()==c.n&&(!f&&1==d&&e.text&&(d=0),e.moveStart("character",-d),e.text=f,e.collapse(!1),e.select());else{var e=c.n.value,h=c.n.selectionStart,k=c.n.selectionEnd;h>k&&(h+=
k,k=h-k,h-=k);!f&&1==d&&h<k&&(d=0);h-=h<d?h:d;c.n.value=e.slice(0,h)+f+e.slice(k);h+=f.length;c.n.setSelectionRange(h,h)}a.dispatchEvent(new H("kce"));return!0}function Ae(a,b){var c=b;Pa&&(91==c&&D||224==c&&C)&&(c=18);var c=bd[c]||c,d=ad[a.Mc];d&&(c=d[String.fromCharCode(c)]||c);return c}function xe(a){var b="";if(a.a&1||a.a&256)b+="s";if(a.a&2&&a.a&4||a.a&512)b+="c";a.a&8&&(b+="l");return b}g.i=function(){G(this.c);G(this.L);G(this.$);G(this.d);te.f.i.call(this)};function Be(){this.n=null;we().qa=this}Be.prototype.handleEvent=function(a){var b=!1;if(!x(["keydown","keypress","keyup"],a.type))return!1;we().handleEvent(a)&&(a.stopPropagation(),a.preventDefault());b||(b=void 0);return b};
Be.prototype.$c=function(a){var b=a.tagName.toUpperCase(),c=a.type.toUpperCase();if(!("INPUT"!=b&&"TEXTAREA"!=b||"INPUT"==b&&"TEXT"!=c)){for(var b=["keydown","keypress","keyup"],c=0,d;d=b[c];++c)this.n&&Db(this.n,d,this.handleEvent,!1,this),a&&K(a,d,this.handleEvent,!1,this);this.n=a}};
(function(){pa("i18n.input.keyboard.Keyboard",Be);pa("i18n.input.keyboard.EventType",$c);var a=Be.prototype;a.register=a.$c;qa(a,"loadLayout",function(a){we().Fb(a)});qa(a,"activateLayout",function(a){we().Na(a)});qa(a,"setVisible",function(a){we().D(a)});qa(a,"reposition",function(a,c,d,f){a=new Gc(a,c);var e;f&&4==f.length&&(e=new N(f[0],f[1],f[2],f[3]));we().T(a,d,e)});qa(a,"addEventListener",function(a,c,d){W(we(),a,c,d)})})();