Skip to content

Instantly share code, notes, and snippets.

@Saulis
Last active November 11, 2015 21:14
Show Gist options
  • Save Saulis/2037bcebfe217251df62 to your computer and use it in GitHub Desktop.
Save Saulis/2037bcebfe217251df62 to your computer and use it in GitHub Desktop.
vaadin-grid.js 0.9.0-beta5
This file has been truncated, but you can view the full file.
function VaadinGridImport(){
var $wnd_0 = window, $doc_0 = document, gwtOnLoad_0, bodyDone, base = '', metaProps = {}, values = [], providers = [], answers = [], softPermutationId = 0, onLoadErrorFunc, propertyErrorFunc;
if (!$wnd_0.__gwt_stylesLoaded) {
$wnd_0.__gwt_stylesLoaded = {};
}
if (!$wnd_0.__gwt_scriptsLoaded) {
$wnd_0.__gwt_scriptsLoaded = {};
}
function isHostedMode(){
var result = false;
try {
var query = $wnd_0.location.search;
return (query.indexOf('gwt.codesvr=') != -1 || (query.indexOf('gwt.hosted=') != -1 || $wnd_0.external && $wnd_0.external.gwtOnLoad)) && query.indexOf('gwt.hybrid') == -1;
}
catch (e) {
}
isHostedMode = function(){
return result;
}
;
return result;
}
function maybeStartModule(){
if (gwtOnLoad_0 && bodyDone) {
gwtOnLoad_0(onLoadErrorFunc, 'VaadinGridImport', base, softPermutationId);
}
}
function processMetas(){
var metas = document.getElementsByTagName('meta');
for (var i = 0, n = metas.length; i < n; ++i) {
var meta = metas[i], name_0 = meta.getAttribute('name'), content_0;
if (name_0) {
if (name_0 == 'gwt:property') {
content_0 = meta.getAttribute('content');
if (content_0) {
var value_0, eq = content_0.indexOf('=');
if (eq >= 0) {
name_0 = content_0.substring(0, eq);
value_0 = content_0.substring(eq + 1);
}
else {
name_0 = content_0;
value_0 = '';
}
metaProps[name_0] = value_0;
}
}
else if (name_0 == 'gwt:onPropertyErrorFn') {
content_0 = meta.getAttribute('content');
if (content_0) {
try {
propertyErrorFunc = eval(content_0);
}
catch (e) {
alert('Bad handler "' + content_0 + '" for "gwt:onPropertyErrorFn"');
}
}
}
else if (name_0 == 'gwt:onLoadErrorFn') {
content_0 = meta.getAttribute('content');
if (content_0) {
try {
onLoadErrorFunc = eval(content_0);
}
catch (e) {
alert('Bad handler "' + content_0 + '" for "gwt:onLoadErrorFn"');
}
}
}
}
}
}
__gwt_isKnownPropertyValue = function(propName, propValue){
return propValue in values[propName];
}
;
__gwt_getMetaProperty = function(name_0){
var value_0 = metaProps[name_0];
return value_0 == null?null:value_0;
}
;
function unflattenKeylistIntoAnswers(propValArray, value_0){
var answer = answers;
for (var i = 0, n = propValArray.length - 1; i < n; ++i) {
answer = answer[propValArray[i]] || (answer[propValArray[i]] = []);
}
answer[propValArray[n]] = value_0;
}
function computePropValue(propName){
var value_0 = providers[propName](), allowedValuesMap = values[propName];
if (value_0 in allowedValuesMap) {
return value_0;
}
var allowedValuesList = [];
for (var k in allowedValuesMap) {
allowedValuesList[allowedValuesMap[k]] = k;
}
if (propertyErrorFunc) {
propertyErrorFunc(propName, allowedValuesList, value_0);
}
throw null;
}
providers['modernie'] = function(){
{
var ua = $wnd_0.navigator.userAgent;
if (ua.indexOf('MSIE') == -1 && ua.indexOf('Trident') != -1) {
return 'yes';
}
return 'none';
}
}
;
values['modernie'] = {none:0, yes:1};
providers['observeCapability'] = function(){
return 'observe' in Object?'native':'js';
}
;
values['observeCapability'] = {js:0, 'native':1};
providers['selectorCapability'] = function(){
return !/_force_no_native/.test(document.location.search) && typeof document.querySelectorAll == 'function'?'native':'js';
}
;
values['selectorCapability'] = {js:0, 'native':1};
providers['user.agent'] = function(){
var ua = navigator.userAgent.toLowerCase();
var docMode = $doc_0.documentMode;
if (function(){
return ua.indexOf('webkit') != -1;
}
())
return 'safari';
if (function(){
return ua.indexOf('msie') != -1 && (docMode >= 10 && docMode < 11);
}
())
return 'ie10';
if (function(){
return ua.indexOf('msie') != -1 && (docMode >= 9 && docMode < 11);
}
())
return 'ie9';
if (function(){
return ua.indexOf('msie') != -1 && (docMode >= 8 && docMode < 11);
}
())
return 'ie8';
if (function(){
return ua.indexOf('gecko') != -1 || docMode >= 11;
}
())
return 'gecko1_8';
return '';
}
;
values['user.agent'] = {gecko1_8:0, ie10:1, ie8:2, ie9:3, safari:4};
VaadinGridImport.onScriptLoad = function(gwtOnLoadFunc){
VaadinGridImport = null;
gwtOnLoad_0 = gwtOnLoadFunc;
maybeStartModule();
}
;
if (isHostedMode()) {
alert('Single-script hosted mode not yet implemented. See issue ' + 'http://code.google.com/p/google-web-toolkit/issues/detail?id=2079');
return;
}
processMetas();
try {
var strongName;
unflattenKeylistIntoAnswers(['none', 'js', 'js', 'gecko1_8'], '3F9EEFB5BB46593A369FA3E0E186F4E7');
unflattenKeylistIntoAnswers(['none', 'js', 'native', 'gecko1_8'], '3F9EEFB5BB46593A369FA3E0E186F4E7' + ':1');
unflattenKeylistIntoAnswers(['none', 'js', 'native', 'safari'], '3F9EEFB5BB46593A369FA3E0E186F4E7' + ':10');
unflattenKeylistIntoAnswers(['none', 'native', 'native', 'safari'], '3F9EEFB5BB46593A369FA3E0E186F4E7' + ':11');
unflattenKeylistIntoAnswers(['none', 'native', 'js', 'gecko1_8'], '3F9EEFB5BB46593A369FA3E0E186F4E7' + ':2');
unflattenKeylistIntoAnswers(['none', 'native', 'native', 'gecko1_8'], '3F9EEFB5BB46593A369FA3E0E186F4E7' + ':3');
unflattenKeylistIntoAnswers(['yes', 'js', 'js', 'gecko1_8'], '3F9EEFB5BB46593A369FA3E0E186F4E7' + ':4');
unflattenKeylistIntoAnswers(['yes', 'js', 'native', 'gecko1_8'], '3F9EEFB5BB46593A369FA3E0E186F4E7' + ':5');
unflattenKeylistIntoAnswers(['yes', 'native', 'js', 'gecko1_8'], '3F9EEFB5BB46593A369FA3E0E186F4E7' + ':6');
unflattenKeylistIntoAnswers(['yes', 'native', 'native', 'gecko1_8'], '3F9EEFB5BB46593A369FA3E0E186F4E7' + ':7');
unflattenKeylistIntoAnswers(['none', 'js', 'js', 'ie10'], '3F9EEFB5BB46593A369FA3E0E186F4E7' + ':8');
unflattenKeylistIntoAnswers(['none', 'js', 'native', 'ie10'], '3F9EEFB5BB46593A369FA3E0E186F4E7' + ':9');
strongName = answers[computePropValue('modernie')][computePropValue('observeCapability')][computePropValue('selectorCapability')][computePropValue('user.agent')];
var idx = strongName.indexOf(':');
if (idx != -1) {
softPermutationId = Number(strongName.substring(idx + 1));
}
}
catch (e) {
return;
}
var onBodyDoneTimerId;
function onBodyDone(){
if (!bodyDone) {
bodyDone = true;
maybeStartModule();
if ($doc_0.removeEventListener) {
$doc_0.removeEventListener('DOMContentLoaded', onBodyDone, false);
}
if (onBodyDoneTimerId) {
clearInterval(onBodyDoneTimerId);
}
}
}
if ($doc_0.addEventListener) {
$doc_0.addEventListener('DOMContentLoaded', function(){
onBodyDone();
}
, false);
}
var onBodyDoneTimerId = setInterval(function(){
if (/loaded|complete/.test($doc_0.readyState)) {
onBodyDone();
}
}
, 50);
}
VaadinGridImport();
(function () {var $gwt_version = "2.8.0-SNAPSHOT";var $wnd = window;var $doc = $wnd.document;var $moduleName, $moduleBase;var $stats = $wnd.__gwtStatsEvent ? function(a) {$wnd.__gwtStatsEvent(a)} : null;var $strongName = '3F9EEFB5BB46593A369FA3E0E186F4E7';var $intern_0 = {3:1, 4:1}, $intern_1 = 65536, $intern_2 = {3:1, 13:1}, $intern_3 = {3:1, 16:1, 12:1, 13:1}, $intern_4 = {98:1}, $intern_5 = {18:1, 20:1, 3:1, 6:1, 5:1}, $intern_6 = {20:1, 69:1, 3:1, 6:1, 5:1}, $intern_7 = {20:1, 70:1, 3:1, 6:1, 5:1}, $intern_8 = {20:1, 109:1, 3:1, 6:1, 5:1}, $intern_9 = {37:1, 3:1, 6:1, 5:1}, $intern_10 = {20:1, 110:1, 3:1, 6:1, 5:1}, $intern_11 = {106:1, 3:1, 16:1, 12:1, 13:1}, $intern_12 = 4194303, $intern_13 = 1048575, $intern_14 = 524288, $intern_15 = 4194304, $intern_16 = 17592186044416, $intern_17 = {82:1}, $intern_18 = {7:1}, $intern_19 = {25:1}, $intern_20 = {72:1}, $intern_21 = {113:1, 86:1}, $intern_22 = {115:1, 99:1}, $intern_23 = {158:1}, $intern_24 = {153:1}, $intern_25 = 131072, $intern_26 = 1048576, $intern_27 = 2097152, $intern_28 = 8388608, $intern_29 = 16777216, $intern_30 = 33554432, $intern_31 = 67108864, $intern_32 = {97:1}, $intern_33 = {30:1, 29:1, 28:1, 27:1, 26:1, 24:1, 14:1}, $intern_34 = {30:1, 29:1, 28:1, 27:1, 50:1, 26:1, 24:1, 14:1}, $intern_35 = {156:1, 30:1, 29:1, 28:1, 114:1, 27:1, 26:1, 24:1, 14:1}, $intern_36 = {87:1, 15:1}, $intern_37 = {30:1, 29:1, 28:1, 27:1, 130:1, 26:1, 24:1, 14:1}, $intern_38 = {30:1, 29:1, 28:1, 154:1, 27:1, 50:1, 26:1, 24:1, 14:1}, $intern_39 = {30:1, 29:1, 28:1, 27:1, 50:1, 26:1, 142:1, 24:1, 14:1}, $intern_40 = {112:1, 150:1}, $intern_41 = {87:1, 15:1, 48:1, 80:1}, $intern_42 = {15:1, 105:1}, $intern_43 = {15:1, 131:1}, $intern_44 = {15:1, 248:1}, $intern_45 = {30:1, 29:1, 28:1, 114:1, 27:1, 50:1, 130:1, 26:1, 24:1, 14:1, 247:1}, $intern_46 = 1.7976931348623157E308, $intern_47 = {15:1, 194:1, 249:1, 682:1}, $intern_48 = {681:1, 15:1}, $intern_49 = {76:1, 3:1, 6:1, 5:1}, $intern_50 = {60:1, 3:1, 6:1, 5:1}, $intern_51 = {79:1, 3:1, 6:1, 5:1}, $intern_52 = {62:1}, $intern_53 = {55:1}, $intern_54 = {39:1}, $intern_55 = {3:1, 39:1, 250:1}, $intern_56 = {3:1, 62:1}, $intern_57 = {3:1, 55:1}, $intern_58 = {3:1, 6:1, 5:1, 74:1};
var _, prototypesByTypeId_0, initFnList_0, permutationId = -1;
function create_com_google_gwt_useragent_client_UserAgent(){
switch (permutationId) {
case 8:
case 9:
return new UserAgentImplIe10;
case 10:
case 11:
return new UserAgentImplSafari;
}
return new UserAgentImplGecko1_8;
}
function create_com_google_gwt_user_client_ui_impl_FocusImpl(){
switch (permutationId) {
case 8:
case 9:
return new FocusImpl;
case 10:
case 11:
return new FocusImplSafari;
}
return new FocusImplStandard;
}
function create_com_google_gwt_user_client_impl_WindowImpl(){
switch (permutationId) {
case 8:
case 9:
return new WindowImplIE;
case 10:
case 11:
return new WindowImpl;
}
return new WindowImplMozilla;
}
function create_com_google_gwt_user_client_impl_DOMImpl(){
switch (permutationId) {
case 8:
case 9:
return new DOMImplIE9_0;
case 10:
case 11:
return new DOMImplWebkit_0;
}
return new DOMImplMozilla_0;
}
function create_com_google_gwt_query_client_impl_SelectorEngineImpl(){
switch (permutationId) {
case 8:
return new SelectorEngineNative;
case 9:
return new SelectorEngineNativeMinIE8;
}
return new SelectorEngineNativeMin;
}
function create_com_google_gwt_query_client_impl_HasSelector(){
switch (permutationId) {
case 8:
case 9:
return new SelectorEngineSizzleIE;
}
return new SelectorEngineCssToXPath;
}
function create_com_google_gwt_query_client_Browser(){
switch (permutationId) {
case 10:
case 11:
return new Browser_safari;
case 8:
case 9:
return new Browser_ie10;
}
return new Browser_gecko1_8;
}
function create_com_google_gwt_dom_client_DOMImpl(){
switch (permutationId) {
case 10:
case 11:
return new DOMImplWebkit;
case 8:
case 9:
return new DOMImplIE9;
}
return new DOMImplMozilla;
}
function setGwtProperty(propertyName, propertyValue){
typeof window === 'object' && typeof window['$gwt'] === 'object' && (window['$gwt'][propertyName] = propertyValue);
}
function gwtOnLoad_0(errFn, modName, modBase, softPermutationId){
ensureModuleInit();
var initFnList = initFnList_0;
$moduleName = modName;
$moduleBase = modBase;
permutationId = softPermutationId;
function initializeModules(){
for (var i_0 = 0; i_0 < initFnList.length; i_0++) {
initFnList[i_0]();
}
}
if (errFn) {
try {
$entry(initializeModules)();
}
catch (e) {
errFn(modName, e);
}
}
else {
$entry(initializeModules)();
}
}
function ensureModuleInit(){
initFnList_0 == null && (initFnList_0 = []);
}
function addInitFunctions(){
ensureModuleInit();
var initFnList = initFnList_0;
for (var i_0 = 0; i_0 < arguments.length; i_0++) {
initFnList.push(arguments[i_0]);
}
}
function typeMarkerFn(){
}
function provide(namespace, optCtor){
var cur = $wnd;
if (namespace === '') {
return cur;
}
var parts = namespace.split('.');
!(parts[0] in cur) && cur.execScript && cur.execScript('var ' + parts[0]);
for (var part; parts.length && (part = parts.shift());) {
cur = cur[part] = cur[part] || !parts.length && optCtor || {};
}
return cur;
}
function portableObjCreate(obj){
function F(){
}
;
F.prototype = obj || {};
return new F;
}
function emptyMethod(){
}
function defineClass(typeId, superTypeIdOrPrototype, castableTypeMap){
var prototypesByTypeId = prototypesByTypeId_0, superPrototype;
var prototype_0 = prototypesByTypeId[typeId];
var clazz = prototype_0 instanceof Array?prototype_0[0]:null;
if (prototype_0 && !clazz) {
_ = prototype_0;
}
else {
_ = (superPrototype = superTypeIdOrPrototype && superTypeIdOrPrototype.prototype , !superPrototype && (superPrototype = prototypesByTypeId_0[superTypeIdOrPrototype]) , portableObjCreate(superPrototype));
_.castableTypeMap = castableTypeMap;
_.constructor = _;
!superTypeIdOrPrototype && (_.typeMarker = typeMarkerFn);
prototypesByTypeId[typeId] = _;
}
for (var i_0 = 3; i_0 < arguments.length; ++i_0) {
arguments[i_0].prototype = _;
}
clazz && (_.___clazz = clazz);
}
function bootstrap(){
prototypesByTypeId_0 = {};
!Array.isArray && (Array.isArray = function(vArg){
return Object.prototype.toString.call(vArg) === '[object Array]';
}
);
}
bootstrap();
function $toString(this$static){
return $getName(getClass__Ljava_lang_Class___devirtual$(this$static)) + '@' + (hashCode__I__devirtual$(this$static) >>> 0).toString(16);
}
function Object_1(){
}
function equals_Ljava_lang_Object__Z__devirtual$(this$static, other){
return instanceOfString(this$static)?$equals_2(this$static, other):instanceOfDouble(this$static)?(checkCriticalNotNull(this$static) , this$static === other):instanceOfBoolean(this$static)?(checkCriticalNotNull(this$static) , this$static === other):hasJavaObjectVirtualDispatch(this$static)?this$static.equals(other):isJavaArray(this$static)?this$static === other:this$static === other;
}
function getClass__Ljava_lang_Class___devirtual$(this$static){
return instanceOfString(this$static)?Ljava_lang_String_2_classLit:instanceOfDouble(this$static)?Ljava_lang_Double_2_classLit:instanceOfBoolean(this$static)?Ljava_lang_Boolean_2_classLit:hasJavaObjectVirtualDispatch(this$static)?this$static.___clazz:isJavaArray(this$static)?this$static.___clazz:this$static.___clazz || Lcom_google_gwt_core_client_JavaScriptObject_2_classLit;
}
function hashCode__I__devirtual$(this$static){
return instanceOfString(this$static)?getHashCode(this$static):instanceOfDouble(this$static)?round_int((checkCriticalNotNull(this$static) , this$static)):instanceOfBoolean(this$static)?unsafeCast((checkCriticalNotNull(this$static) , this$static))?1231:1237:hasJavaObjectVirtualDispatch(this$static)?this$static.hashCode():isJavaArray(this$static)?getObjectIdentityHashCode(this$static):getObjectIdentityHashCode(this$static);
}
function toString__Ljava_lang_String___devirtual$(this$static){
return instanceOfString(this$static)?this$static:instanceOfDouble(this$static)?toString_8((checkCriticalNotNull(this$static) , this$static)):instanceOfBoolean(this$static)?toString_6(unsafeCast((checkCriticalNotNull(this$static) , this$static))):hasJavaObjectVirtualDispatch(this$static)?this$static.toString_0():isJavaArray(this$static)?$toString(this$static):toStringSimple(this$static);
}
defineClass(1, null, {}, Object_1);
_.equals = function(other){
return this === other;
}
;
_.getClass_0 = function(){
return this.___clazz;
}
;
_.hashCode = function(){
return getObjectIdentityHashCode(this);
}
;
_.toString_0 = function(){
return $toString(this);
}
;
_.toString = function(){
return this.toString_0();
}
;
function canCast(src_0, dstId){
if (instanceOfString(src_0)) {
return !!stringCastMap[dstId];
}
else if (src_0.castableTypeMap) {
return !!src_0.castableTypeMap[dstId];
}
else if (instanceOfDouble(src_0)) {
return !!doubleCastMap[dstId];
}
else if (instanceOfBoolean(src_0)) {
return !!booleanCastMap[dstId];
}
return false;
}
function castTo(src_0, dstId){
checkCriticalType(src_0 == null || canCast(src_0, dstId));
return src_0;
}
function castToAllowJso(src_0, dstId){
checkCriticalType(src_0 == null || isJsObjectOrFunction(src_0) && !(src_0.typeMarker === typeMarkerFn) || canCast(src_0, dstId));
return src_0;
}
function castToBoolean(src_0){
checkCriticalType(src_0 == null || instanceOfBoolean(src_0));
return src_0;
}
function castToDouble(src_0){
checkCriticalType(src_0 == null || instanceOfDouble(src_0));
return src_0;
}
function castToJso(src_0){
checkCriticalType(src_0 == null || isJsObjectOrFunction(src_0) && !(src_0.typeMarker === typeMarkerFn));
return src_0;
}
function castToString(src_0){
checkCriticalType(src_0 == null || instanceOfString(src_0));
return src_0;
}
function hasJavaObjectVirtualDispatch(src_0){
return !Array.isArray(src_0) && src_0.typeMarker === typeMarkerFn;
}
function instanceOf(src_0, dstId){
return src_0 != null && canCast(src_0, dstId);
}
function instanceOfBoolean(src_0){
return typeof src_0 === 'boolean';
}
function instanceOfDouble(src_0){
return typeof src_0 === 'number';
}
function instanceOfJso(src_0){
return src_0 != null && isJsObjectOrFunction(src_0) && !(src_0.typeMarker === typeMarkerFn);
}
function instanceOfString(src_0){
return typeof src_0 === 'string';
}
function isJsObjectOrFunction(src_0){
return typeof src_0 === 'object' || typeof src_0 === 'function';
}
function maskUndefined(src_0){
return src_0 == null?null:src_0;
}
function round_byte(x_0){
return round_int(x_0) << 24 >> 24;
}
function round_int(x_0){
return Math.max(Math.min(x_0, 2147483647), -2147483648) | 0;
}
function round_short(x_0){
return round_int(x_0) << 16 >> 16;
}
function throwClassCastExceptionUnlessNull(o){
checkCriticalType(o == null);
return o;
}
var booleanCastMap, doubleCastMap, stringCastMap;
function $ensureNamesAreInitialized(this$static){
if (this$static.typeName != null) {
return;
}
initializeNames(this$static);
}
function $getName(this$static){
$ensureNamesAreInitialized(this$static);
return this$static.typeName;
}
function $getSimpleName(this$static){
$ensureNamesAreInitialized(this$static);
return this$static.simpleName;
}
function Class(){
++nextSequentialId;
this.typeName = null;
this.simpleName = null;
this.packageName = null;
this.compoundName = null;
this.canonicalName = null;
this.typeId = null;
this.arrayLiterals = null;
}
function createClassObject(packageName, compoundClassName){
var clazz;
clazz = new Class;
clazz.packageName = packageName;
clazz.compoundName = compoundClassName;
return clazz;
}
function createForClass(packageName, compoundClassName, typeId){
var clazz;
clazz = createClassObject(packageName, compoundClassName);
maybeSetClassLiteral(typeId, clazz);
return clazz;
}
function createForEnum(packageName, compoundClassName, typeId, enumConstantsFunc){
var clazz;
clazz = createClassObject(packageName, compoundClassName);
maybeSetClassLiteral(typeId, clazz);
clazz.modifiers = enumConstantsFunc?8:0;
return clazz;
}
function createForInterface(packageName, compoundClassName){
var clazz;
clazz = createClassObject(packageName, compoundClassName);
clazz.modifiers = 2;
return clazz;
}
function createForPrimitive(className, primitiveTypeId){
var clazz;
clazz = createClassObject('', className);
clazz.typeId = primitiveTypeId;
clazz.modifiers = 1;
return clazz;
}
function getClassLiteralForArray_0(leafClass, dimensions){
var arrayLiterals = leafClass.arrayLiterals = leafClass.arrayLiterals || [];
return arrayLiterals[dimensions] || (arrayLiterals[dimensions] = leafClass.createClassLiteralForArray(dimensions));
}
function getPrototypeForClass(clazz){
if (clazz.isPrimitive()) {
return null;
}
var typeId = clazz.typeId;
var prototype_0 = prototypesByTypeId_0[typeId];
return prototype_0;
}
function initializeNames(clazz){
if (clazz.isArray_0()) {
var componentType = clazz.componentType;
componentType.isPrimitive()?(clazz.typeName = '[' + componentType.typeId):!componentType.isArray_0()?(clazz.typeName = '[L' + componentType.getName() + ';'):(clazz.typeName = '[' + componentType.getName());
clazz.canonicalName = componentType.getCanonicalName() + '[]';
clazz.simpleName = componentType.getSimpleName() + '[]';
return;
}
var packageName = clazz.packageName;
var compoundName = clazz.compoundName;
compoundName = compoundName.split('/');
clazz.typeName = join_0('.', [packageName, join_0('$', compoundName)]);
clazz.canonicalName = join_0('.', [packageName, join_0('.', compoundName)]);
clazz.simpleName = compoundName[compoundName.length - 1];
}
function join_0(separator, strings){
var i_0 = 0;
while (!strings[i_0] || strings[i_0] == '') {
i_0++;
}
var result = strings[i_0++];
for (; i_0 < strings.length; i_0++) {
if (!strings[i_0] || strings[i_0] == '') {
continue;
}
result += separator + strings[i_0];
}
return result;
}
function maybeSetClassLiteral(typeId, clazz){
var proto;
if (!typeId) {
return;
}
clazz.typeId = typeId;
var prototype_0 = getPrototypeForClass(clazz);
if (!prototype_0) {
prototypesByTypeId_0[typeId] = [clazz];
return;
}
prototype_0.___clazz = clazz;
}
defineClass(207, 1, {}, Class);
_.createClassLiteralForArray = function(dimensions){
var clazz;
clazz = new Class;
clazz.modifiers = 4;
dimensions > 1?(clazz.componentType = getClassLiteralForArray_0(this, dimensions - 1)):(clazz.componentType = this);
return clazz;
}
;
_.getCanonicalName = function(){
$ensureNamesAreInitialized(this);
return this.canonicalName;
}
;
_.getName = function(){
return $getName(this);
}
;
_.getSimpleName = function(){
return $getSimpleName(this);
}
;
_.isArray_0 = function(){
return (this.modifiers & 4) != 0;
}
;
_.isPrimitive = function(){
return (this.modifiers & 1) != 0;
}
;
_.toString_0 = function(){
return ((this.modifiers & 2) != 0?'interface ':(this.modifiers & 1) != 0?'':'class ') + ($ensureNamesAreInitialized(this) , this.typeName);
}
;
_.modifiers = 0;
var nextSequentialId = 1;
function $clinit_String(){
$clinit_String = emptyMethod;
new String$1;
}
function $equals_2(this$static, other){
return this$static === other;
}
function $replaceAll_0(this$static, regex, replace){
var jsRegEx;
replace = translateReplaceString(replace);
jsRegEx = RegExp(regex, 'g');
return this$static.replace(jsRegEx, replace);
}
function $replaceFirst(this$static, regex, replace){
var jsRegEx;
replace = translateReplaceString(replace);
jsRegEx = RegExp(regex, '');
return this$static.replace(jsRegEx, replace);
}
function $split(this$static, regex){
var compiled, count, lastNonEmpty, lastTrail, matchObj, out, trail;
compiled = RegExp(regex, 'g');
out = initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_0, 2, 0, 5, 1);
count = 0;
trail = this$static;
lastTrail = null;
while (true) {
matchObj = compiled.exec(trail);
if (matchObj == null || trail == '') {
out[count] = trail;
break;
}
else {
out[count] = $substring_0(trail, 0, matchObj.index);
trail = $substring_0(trail, matchObj.index + matchObj[0].length, ($clinit_String() , trail.length));
compiled.lastIndex = 0;
if (lastTrail == trail) {
out[count] = trail.substr(0, 1);
trail = __substr(trail, 1, trail.length - 1);
}
lastTrail = trail;
++count;
}
}
if (($clinit_String() , this$static.length) > 0) {
lastNonEmpty = out.length;
while (lastNonEmpty > 0 && out[lastNonEmpty - 1] == '') {
--lastNonEmpty;
}
lastNonEmpty < out.length && (out.length = lastNonEmpty , undefined);
}
return out;
}
function $startsWith(this$static, prefix){
return $equals_2(__substr(this$static, 0, ($clinit_String() , prefix.length)), prefix);
}
function $substring(this$static, beginIndex){
return __substr(this$static, beginIndex, ($clinit_String() , this$static.length) - beginIndex);
}
function $substring_0(this$static, beginIndex, endIndex){
return $clinit_String() , this$static.substr(beginIndex, endIndex - beginIndex);
}
function $trim(this$static){
var end, length_0, start_0;
length_0 = ($clinit_String() , this$static.length);
start_0 = 0;
while (start_0 < length_0 && this$static.charCodeAt(start_0) <= 32) {
++start_0;
}
end = length_0;
while (end > start_0 && this$static.charCodeAt(end - 1) <= 32) {
--end;
}
return start_0 > 0 || end < length_0?this$static.substr(start_0, end - start_0):this$static;
}
function __substr(str, beginIndex, len){
$clinit_String();
return str.substr(beginIndex, len);
}
function charAt(s, index_0){
$clinit_String();
return s.charCodeAt(index_0);
}
function compareTo(thisStr, otherStr){
$clinit_String();
if (thisStr == otherStr) {
return 0;
}
return thisStr < otherStr?-1:1;
}
function equalsIgnoreCase(s, other){
$clinit_String();
if (other == null) {
return false;
}
if (s == other) {
return true;
}
return s.length == other.length && s.toLowerCase() == other.toLowerCase();
}
function fromCodePoint(codePoint){
$clinit_String();
var hiSurrogate, loSurrogate;
if (codePoint >= $intern_1) {
hiSurrogate = 55296 + (codePoint - $intern_1 >> 10 & 1023) & 65535;
loSurrogate = 56320 + (codePoint - $intern_1 & 1023) & 65535;
return String.fromCharCode(hiSurrogate) + ('' + String.fromCharCode(loSurrogate));
}
else {
return String.fromCharCode(codePoint & 65535);
}
}
function indexOf(s, str){
$clinit_String();
return s.indexOf(str);
}
function indexOf_0(s, str, startIndex){
$clinit_String();
return s.indexOf(str, startIndex);
}
function length_1(s){
$clinit_String();
return s.length;
}
function matches(s, regex){
$clinit_String();
return (new RegExp('^(' + regex + ')$')).test(s);
}
function toLowerCase(s){
$clinit_String();
return s.toLowerCase();
}
function translateReplaceString(replaceStr){
var pos;
pos = 0;
while (0 <= (pos = ($clinit_String() , replaceStr.indexOf('\\', pos)))) {
replaceStr.charCodeAt(pos + 1) == 36?(replaceStr = replaceStr.substr(0, pos) + '$' + $substring(replaceStr, ++pos)):(replaceStr = replaceStr.substr(0, pos) + ('' + $substring(replaceStr, ++pos)));
}
return replaceStr;
}
function valueOf_5(x_0){
$clinit_String();
return x_0 == null?'null':toString__Ljava_lang_String___devirtual$(x_0);
}
stringCastMap = {3:1, 683:1, 6:1, 2:1};
function $compare(a, b){
return compareTo(($clinit_String() , a.toLowerCase()), b.toLowerCase());
}
function String$1(){
}
defineClass(352, 1, {}, String$1);
_.compare = function(a, b){
return $compare(castToString(a), castToString(b));
}
;
var Ljava_lang_Object_2_classLit = createForClass('java.lang', 'Object', 1);
var Ljava_lang_Class_2_classLit = createForClass('java.lang', 'Class', 207);
var Ljava_lang_String_2_classLit = createForClass('java.lang', 'String', 2);
var Ljava_lang_String$1_2_classLit = createForClass('java.lang', 'String/1', 352);
function $cancel(this$static){
if (!this$static.isRunning) {
return;
}
this$static.wasStarted = this$static.isStarted;
this$static.element = null;
this$static.isRunning = false;
this$static.isStarted = false;
if (this$static.requestHandle) {
this$static.requestHandle.cancel_0();
this$static.requestHandle = null;
}
this$static.wasStarted && (this$static.this$21.touching = false , $reschedule(this$static.this$21.escalator.body_0.domSorter));
}
function $run(this$static, duration, startTime){
$cancel(this$static);
this$static.isRunning = true;
this$static.isStarted = false;
this$static.duration = duration;
this$static.startTime = startTime;
this$static.element = null;
++this$static.runId;
$execute(this$static.callback, now_1());
}
function $update(this$static, curTime){
var curRunId, finished, progress;
curRunId = this$static.runId;
finished = curTime >= this$static.startTime + this$static.duration;
if (this$static.isStarted && !finished) {
progress = (curTime - this$static.startTime) / this$static.duration;
$onUpdate(this$static, Math.sqrt(1 - (progress - 1) * (progress - 1)));
return this$static.isRunning && this$static.runId == curRunId;
}
if (!this$static.isStarted && curTime >= this$static.startTime) {
this$static.isStarted = true;
$onUpdate(this$static, Math.sqrt(0));
if (!(this$static.isRunning && this$static.runId == curRunId)) {
return false;
}
}
if (finished) {
this$static.isRunning = false;
this$static.isStarted = false;
this$static.this$21.touching = false;
$reschedule(this$static.this$21.escalator.body_0.domSorter);
return false;
}
return true;
}
function Animation(scheduler){
this.callback = new Animation$1(this);
this.scheduler = scheduler;
}
defineClass(206, 1, {});
_.duration = -1;
_.isRunning = false;
_.isStarted = false;
_.runId = -1;
_.startTime = -1;
_.wasStarted = false;
var Lcom_google_gwt_animation_client_Animation_2_classLit = createForClass('com.google.gwt.animation.client', 'Animation', 206);
function $execute(this$static, timestamp){
$update(this$static.this$01, timestamp)?(this$static.this$01.requestHandle = this$static.this$01.scheduler.requestAnimationFrame_0(this$static.this$01.callback, this$static.this$01.element)):(this$static.this$01.requestHandle = null);
}
function Animation$1(this$0){
this.this$01 = this$0;
}
defineClass(343, 1, {}, Animation$1);
_.execute = function(timestamp){
$execute(this, timestamp);
}
;
var Lcom_google_gwt_animation_client_Animation$1_2_classLit = createForClass('com.google.gwt.animation.client', 'Animation/1', 343);
defineClass(726, 1, {});
var instance;
var Lcom_google_gwt_animation_client_AnimationScheduler_2_classLit = createForClass('com.google.gwt.animation.client', 'AnimationScheduler', 726);
defineClass(190, 1, {190:1});
var Lcom_google_gwt_animation_client_AnimationScheduler$AnimationHandle_2_classLit = createForClass('com.google.gwt.animation.client', 'AnimationScheduler/AnimationHandle', 190);
function $isNativelySupported(){
return !!$wnd.requestAnimationFrame && !!$wnd.cancelAnimationFrame;
}
function AnimationSchedulerImplStandard(){
}
function cancelImpl(holder){
$wnd.cancelAnimationFrame(holder.id);
}
function requestImpl(cb, element){
var callback = $entry(function(){
var time = now_1();
cb.execute(time);
}
);
var handle = $wnd.requestAnimationFrame(callback, element);
return {id:handle};
}
defineClass(103, 726, {}, AnimationSchedulerImplStandard);
_.requestAnimationFrame_0 = function(callback, element){
var handle;
handle = requestImpl(callback, element);
return new AnimationSchedulerImplStandard$1(handle);
}
;
var Lcom_google_gwt_animation_client_AnimationSchedulerImplStandard_2_classLit = createForClass('com.google.gwt.animation.client', 'AnimationSchedulerImplStandard', 103);
function AnimationSchedulerImplStandard$1(val$handle){
this.val$handle2 = val$handle;
}
defineClass(670, 190, {190:1}, AnimationSchedulerImplStandard$1);
_.cancel_0 = function(){
cancelImpl(this.val$handle2);
}
;
var Lcom_google_gwt_animation_client_AnimationSchedulerImplStandard$1_2_classLit = createForClass('com.google.gwt.animation.client', 'AnimationSchedulerImplStandard/1', 670);
function $cancelAnimationFrame(this$static, requestId){
$remove_10(this$static.animationRequests, requestId);
this$static.animationRequests.array.length == 0 && $cancel_0(this$static.timer);
}
function $updateAnimations(this$static){
var curAnimations, duration, requestId, requestId$index, requestId$max;
curAnimations = initUnidimensionalArray(Lcom_google_gwt_animation_client_AnimationSchedulerImplTimer$AnimationHandleImpl_2_classLit, {756:1, 3:1, 4:1}, 191, this$static.animationRequests.array.length, 0, 1);
curAnimations = castTo($toArray_1(this$static.animationRequests, curAnimations), 756);
duration = new Duration;
for (requestId$index = 0 , requestId$max = curAnimations.length; requestId$index < requestId$max; ++requestId$index) {
requestId = curAnimations[requestId$index];
$remove_10(this$static.animationRequests, requestId);
requestId.callback.execute(duration.start_0);
}
this$static.animationRequests.array.length > 0 && $schedule(this$static.timer, max_2(5, 16 - (now_1() - duration.start_0)));
}
function AnimationSchedulerImplTimer(){
this.animationRequests = new ArrayList;
this.timer = new AnimationSchedulerImplTimer$1(this);
}
defineClass(104, 726, {}, AnimationSchedulerImplTimer);
_.requestAnimationFrame_0 = function(callback, element){
var requestId;
requestId = new AnimationSchedulerImplTimer$AnimationHandleImpl(this, callback);
$add_7(this.animationRequests, requestId);
this.animationRequests.array.length == 1 && $schedule(this.timer, 16);
return requestId;
}
;
var Lcom_google_gwt_animation_client_AnimationSchedulerImplTimer_2_classLit = createForClass('com.google.gwt.animation.client', 'AnimationSchedulerImplTimer', 104);
function $cancel_0(this$static){
if (!this$static.timerId) {
return;
}
++this$static.cancelCounter;
this$static.isRepeating?clearInterval_0(this$static.timerId.value_0):clearTimeout_0(this$static.timerId.value_0);
this$static.timerId = null;
}
function $schedule(this$static, delayMillis){
if (delayMillis < 0) {
throw new IllegalArgumentException('must be non-negative');
}
!!this$static.timerId && $cancel_0(this$static);
this$static.isRepeating = false;
this$static.timerId = valueOf_2(setTimeout_0(createCallback(this$static, this$static.cancelCounter), delayMillis));
}
function Timer(){
}
function clearInterval_0(timerId){
$wnd.clearInterval(timerId);
}
function clearTimeout_0(timerId){
$wnd.clearTimeout(timerId);
}
function createCallback(timer, cancelCounter){
return $entry(function(){
timer.fire(cancelCounter);
}
);
}
function setTimeout_0(func, time){
return $wnd.setTimeout(func, time);
}
defineClass(75, 1, {});
_.fire = function(scheduleCancelCounter){
if (scheduleCancelCounter != this.cancelCounter) {
return;
}
this.isRepeating || (this.timerId = null);
this.run_0();
}
;
_.cancelCounter = 0;
_.isRepeating = false;
_.timerId = null;
var Lcom_google_gwt_user_client_Timer_2_classLit = createForClass('com.google.gwt.user.client', 'Timer', 75);
function AnimationSchedulerImplTimer$1(this$0){
this.this$01 = this$0;
Timer.call(this);
}
defineClass(671, 75, {}, AnimationSchedulerImplTimer$1);
_.run_0 = function(){
$updateAnimations(this.this$01);
}
;
var Lcom_google_gwt_animation_client_AnimationSchedulerImplTimer$1_2_classLit = createForClass('com.google.gwt.animation.client', 'AnimationSchedulerImplTimer/1', 671);
function AnimationSchedulerImplTimer$AnimationHandleImpl(this$0, callback){
this.this$01 = this$0;
this.callback = callback;
}
defineClass(191, 190, {190:1, 191:1}, AnimationSchedulerImplTimer$AnimationHandleImpl);
_.cancel_0 = function(){
$cancelAnimationFrame(this.this$01, this);
}
;
var Lcom_google_gwt_animation_client_AnimationSchedulerImplTimer$AnimationHandleImpl_2_classLit = createForClass('com.google.gwt.animation.client', 'AnimationSchedulerImplTimer/AnimationHandleImpl', 191);
function $set(this$static, element){
$setAttribute(element, 'role', this$static.roleName);
}
function RoleImpl(roleName){
this.roleName = roleName;
}
defineClass(8, 1, {});
var Lcom_google_gwt_aria_client_RoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'RoleImpl', 8);
function AlertRoleImpl(){
RoleImpl.call(this, 'alert');
}
defineClass(590, 8, {}, AlertRoleImpl);
var Lcom_google_gwt_aria_client_AlertRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'AlertRoleImpl', 590);
function AlertdialogRoleImpl(){
RoleImpl.call(this, 'alertdialog');
}
defineClass(589, 8, {}, AlertdialogRoleImpl);
var Lcom_google_gwt_aria_client_AlertdialogRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'AlertdialogRoleImpl', 589);
function ApplicationRoleImpl(){
RoleImpl.call(this, 'application');
}
defineClass(591, 8, {}, ApplicationRoleImpl);
var Lcom_google_gwt_aria_client_ApplicationRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ApplicationRoleImpl', 591);
function $getAriaValue(value_0){
var buf, item_0, item$index, item$max;
buf = new StringBuilder;
for (item$index = 0 , item$max = value_0.length; item$index < item$max; ++item$index) {
item_0 = value_0[item$index];
$append_1($append_1(buf, item_0.id_0), ' ');
}
return $trim(buf.string);
}
function $set_0(this$static, element, values){
$setAttribute(element, this$static.name_0, $getAriaValue(values));
}
function Attribute(name_0){
this.name_0 = name_0;
}
defineClass(243, 1, {});
var Lcom_google_gwt_aria_client_Attribute_2_classLit = createForClass('com.google.gwt.aria.client', 'Attribute', 243);
function AriaValueAttribute(name_0){
Attribute.call(this, name_0);
}
defineClass(61, 243, {}, AriaValueAttribute);
var Lcom_google_gwt_aria_client_AriaValueAttribute_2_classLit = createForClass('com.google.gwt.aria.client', 'AriaValueAttribute', 61);
function ArticleRoleImpl(){
RoleImpl.call(this, 'article');
}
defineClass(592, 8, {}, ArticleRoleImpl);
var Lcom_google_gwt_aria_client_ArticleRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ArticleRoleImpl', 592);
function BannerRoleImpl(){
RoleImpl.call(this, 'banner');
}
defineClass(593, 8, {}, BannerRoleImpl);
var Lcom_google_gwt_aria_client_BannerRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'BannerRoleImpl', 593);
function ButtonRoleImpl(){
RoleImpl.call(this, 'button');
}
defineClass(594, 8, {}, ButtonRoleImpl);
var Lcom_google_gwt_aria_client_ButtonRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ButtonRoleImpl', 594);
function CheckboxRoleImpl(){
RoleImpl.call(this, 'checkbox');
}
defineClass(595, 8, {}, CheckboxRoleImpl);
var Lcom_google_gwt_aria_client_CheckboxRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'CheckboxRoleImpl', 595);
function ColumnheaderRoleImpl(){
RoleImpl.call(this, 'columnheader');
}
defineClass(596, 8, {}, ColumnheaderRoleImpl);
var Lcom_google_gwt_aria_client_ColumnheaderRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ColumnheaderRoleImpl', 596);
function ComboboxRoleImpl(){
RoleImpl.call(this, 'combobox');
}
defineClass(597, 8, {}, ComboboxRoleImpl);
var Lcom_google_gwt_aria_client_ComboboxRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ComboboxRoleImpl', 597);
function ComplementaryRoleImpl(){
RoleImpl.call(this, 'complementary');
}
defineClass(598, 8, {}, ComplementaryRoleImpl);
var Lcom_google_gwt_aria_client_ComplementaryRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ComplementaryRoleImpl', 598);
function ContentinfoRoleImpl(){
RoleImpl.call(this, 'contentinfo');
}
defineClass(599, 8, {}, ContentinfoRoleImpl);
var Lcom_google_gwt_aria_client_ContentinfoRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ContentinfoRoleImpl', 599);
function DefinitionRoleImpl(){
RoleImpl.call(this, 'definition');
}
defineClass(600, 8, {}, DefinitionRoleImpl);
var Lcom_google_gwt_aria_client_DefinitionRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'DefinitionRoleImpl', 600);
function DialogRoleImpl(){
RoleImpl.call(this, 'dialog');
}
defineClass(601, 8, {}, DialogRoleImpl);
var Lcom_google_gwt_aria_client_DialogRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'DialogRoleImpl', 601);
function DirectoryRoleImpl(){
RoleImpl.call(this, 'directory');
}
defineClass(602, 8, {}, DirectoryRoleImpl);
var Lcom_google_gwt_aria_client_DirectoryRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'DirectoryRoleImpl', 602);
function DocumentRoleImpl(){
RoleImpl.call(this, 'document');
}
defineClass(603, 8, {}, DocumentRoleImpl);
var Lcom_google_gwt_aria_client_DocumentRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'DocumentRoleImpl', 603);
function FormRoleImpl(){
RoleImpl.call(this, 'form');
}
defineClass(604, 8, {}, FormRoleImpl);
var Lcom_google_gwt_aria_client_FormRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'FormRoleImpl', 604);
function GridRoleImpl(){
RoleImpl.call(this, 'grid');
}
defineClass(606, 8, {}, GridRoleImpl);
var Lcom_google_gwt_aria_client_GridRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'GridRoleImpl', 606);
function GridcellRoleImpl(){
RoleImpl.call(this, 'gridcell');
}
defineClass(605, 8, {}, GridcellRoleImpl);
var Lcom_google_gwt_aria_client_GridcellRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'GridcellRoleImpl', 605);
function GroupRoleImpl(){
RoleImpl.call(this, 'group');
}
defineClass(607, 8, {}, GroupRoleImpl);
var Lcom_google_gwt_aria_client_GroupRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'GroupRoleImpl', 607);
function HeadingRoleImpl(){
RoleImpl.call(this, 'heading');
}
defineClass(608, 8, {}, HeadingRoleImpl);
var Lcom_google_gwt_aria_client_HeadingRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'HeadingRoleImpl', 608);
function $init(this$static, elementId){
this$static.id_0 = elementId;
}
function Id(element){
$init(this, element.id);
}
defineClass(187, 1, {761:1, 187:1}, Id);
var Lcom_google_gwt_aria_client_Id_2_classLit = createForClass('com.google.gwt.aria.client', 'Id', 187);
function ImgRoleImpl(){
RoleImpl.call(this, 'img');
}
defineClass(609, 8, {}, ImgRoleImpl);
var Lcom_google_gwt_aria_client_ImgRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ImgRoleImpl', 609);
function LinkRoleImpl(){
RoleImpl.call(this, 'link');
}
defineClass(610, 8, {}, LinkRoleImpl);
var Lcom_google_gwt_aria_client_LinkRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'LinkRoleImpl', 610);
function ListRoleImpl(){
RoleImpl.call(this, 'list');
}
defineClass(613, 8, {}, ListRoleImpl);
var Lcom_google_gwt_aria_client_ListRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ListRoleImpl', 613);
function ListboxRoleImpl(){
RoleImpl.call(this, 'listbox');
}
defineClass(611, 8, {}, ListboxRoleImpl);
var Lcom_google_gwt_aria_client_ListboxRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ListboxRoleImpl', 611);
function ListitemRoleImpl(){
RoleImpl.call(this, 'listitem');
}
defineClass(612, 8, {}, ListitemRoleImpl);
var Lcom_google_gwt_aria_client_ListitemRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ListitemRoleImpl', 612);
function LogRoleImpl(){
RoleImpl.call(this, 'log');
}
defineClass(614, 8, {}, LogRoleImpl);
var Lcom_google_gwt_aria_client_LogRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'LogRoleImpl', 614);
function MainRoleImpl(){
RoleImpl.call(this, 'main');
}
defineClass(615, 8, {}, MainRoleImpl);
var Lcom_google_gwt_aria_client_MainRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'MainRoleImpl', 615);
function MarqueeRoleImpl(){
RoleImpl.call(this, 'marquee');
}
defineClass(616, 8, {}, MarqueeRoleImpl);
var Lcom_google_gwt_aria_client_MarqueeRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'MarqueeRoleImpl', 616);
function MathRoleImpl(){
RoleImpl.call(this, 'math');
}
defineClass(617, 8, {}, MathRoleImpl);
var Lcom_google_gwt_aria_client_MathRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'MathRoleImpl', 617);
function MenuRoleImpl(){
RoleImpl.call(this, 'menu');
}
defineClass(622, 8, {}, MenuRoleImpl);
var Lcom_google_gwt_aria_client_MenuRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'MenuRoleImpl', 622);
function $setAriaActivedescendantProperty(element, value_0){
$set_0(($clinit_Property() , ACTIVEDESCENDANT), element, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_aria_client_Id_2_classLit, 1), $intern_0, 187, 0, [value_0]));
}
function MenubarRoleImpl(){
RoleImpl.call(this, 'menubar');
}
defineClass(618, 8, {}, MenubarRoleImpl);
var Lcom_google_gwt_aria_client_MenubarRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'MenubarRoleImpl', 618);
function MenuitemRoleImpl(){
RoleImpl.call(this, 'menuitem');
}
defineClass(621, 8, {}, MenuitemRoleImpl);
var Lcom_google_gwt_aria_client_MenuitemRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'MenuitemRoleImpl', 621);
function MenuitemcheckboxRoleImpl(){
RoleImpl.call(this, 'menuitemcheckbox');
}
defineClass(619, 8, {}, MenuitemcheckboxRoleImpl);
var Lcom_google_gwt_aria_client_MenuitemcheckboxRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'MenuitemcheckboxRoleImpl', 619);
function MenuitemradioRoleImpl(){
RoleImpl.call(this, 'menuitemradio');
}
defineClass(620, 8, {}, MenuitemradioRoleImpl);
var Lcom_google_gwt_aria_client_MenuitemradioRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'MenuitemradioRoleImpl', 620);
function NavigationRoleImpl(){
RoleImpl.call(this, 'navigation');
}
defineClass(623, 8, {}, NavigationRoleImpl);
var Lcom_google_gwt_aria_client_NavigationRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'NavigationRoleImpl', 623);
function NoteRoleImpl(){
RoleImpl.call(this, 'note');
}
defineClass(624, 8, {}, NoteRoleImpl);
var Lcom_google_gwt_aria_client_NoteRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'NoteRoleImpl', 624);
function OptionRoleImpl(){
RoleImpl.call(this, 'option');
}
defineClass(625, 8, {}, OptionRoleImpl);
var Lcom_google_gwt_aria_client_OptionRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'OptionRoleImpl', 625);
function PresentationRoleImpl(){
RoleImpl.call(this, 'presentation');
}
defineClass(626, 8, {}, PresentationRoleImpl);
var Lcom_google_gwt_aria_client_PresentationRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'PresentationRoleImpl', 626);
function PrimitiveValueAttribute(name_0){
Attribute.call(this, name_0);
}
defineClass(54, 243, {}, PrimitiveValueAttribute);
var Lcom_google_gwt_aria_client_PrimitiveValueAttribute_2_classLit = createForClass('com.google.gwt.aria.client', 'PrimitiveValueAttribute', 54);
function ProgressbarRoleImpl(){
RoleImpl.call(this, 'progressbar');
}
defineClass(627, 8, {}, ProgressbarRoleImpl);
var Lcom_google_gwt_aria_client_ProgressbarRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ProgressbarRoleImpl', 627);
function $clinit_Property(){
$clinit_Property = emptyMethod;
ACTIVEDESCENDANT = new AriaValueAttribute('aria-activedescendant');
new PrimitiveValueAttribute('aria-atomic');
new AriaValueAttribute('aria-autocomplete');
new AriaValueAttribute('aria-controls');
new AriaValueAttribute('aria-describedby');
new AriaValueAttribute('aria-dropeffect');
new AriaValueAttribute('aria-flowto');
new PrimitiveValueAttribute('aria-haspopup');
new PrimitiveValueAttribute('aria-label');
new AriaValueAttribute('aria-labelledby');
new PrimitiveValueAttribute('aria-level');
new AriaValueAttribute('aria-live');
new PrimitiveValueAttribute('aria-multiline');
new PrimitiveValueAttribute('aria-multiselectable');
new AriaValueAttribute('aria-orientation');
new AriaValueAttribute('aria-owns');
new PrimitiveValueAttribute('aria-posinset');
new PrimitiveValueAttribute('aria-readonly');
new AriaValueAttribute('aria-relevant');
new PrimitiveValueAttribute('aria-required');
new PrimitiveValueAttribute('aria-setsize');
new AriaValueAttribute('aria-sort');
new PrimitiveValueAttribute('aria-valuemax');
new PrimitiveValueAttribute('aria-valuemin');
new PrimitiveValueAttribute('aria-valuenow');
new PrimitiveValueAttribute('aria-valuetext');
}
var ACTIVEDESCENDANT;
function RadioRoleImpl(){
RoleImpl.call(this, 'radio');
}
defineClass(629, 8, {}, RadioRoleImpl);
var Lcom_google_gwt_aria_client_RadioRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'RadioRoleImpl', 629);
function RadiogroupRoleImpl(){
RoleImpl.call(this, 'radiogroup');
}
defineClass(628, 8, {}, RadiogroupRoleImpl);
var Lcom_google_gwt_aria_client_RadiogroupRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'RadiogroupRoleImpl', 628);
function RegionRoleImpl(){
RoleImpl.call(this, 'region');
}
defineClass(630, 8, {}, RegionRoleImpl);
var Lcom_google_gwt_aria_client_RegionRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'RegionRoleImpl', 630);
function $clinit_Roles(){
$clinit_Roles = emptyMethod;
ALERTDIALOG = new AlertdialogRoleImpl;
ALERT = new AlertRoleImpl;
APPLICATION = new ApplicationRoleImpl;
ARTICLE = new ArticleRoleImpl;
BANNER = new BannerRoleImpl;
BUTTON = new ButtonRoleImpl;
CHECKBOX = new CheckboxRoleImpl;
COLUMNHEADER = new ColumnheaderRoleImpl;
COMBOBOX = new ComboboxRoleImpl;
COMPLEMENTARY = new ComplementaryRoleImpl;
CONTENTINFO = new ContentinfoRoleImpl;
DEFINITION = new DefinitionRoleImpl;
DIALOG = new DialogRoleImpl;
DIRECTORY = new DirectoryRoleImpl;
DOCUMENT = new DocumentRoleImpl;
FORM = new FormRoleImpl;
GRIDCELL = new GridcellRoleImpl;
GRID = new GridRoleImpl;
GROUP = new GroupRoleImpl;
HEADING = new HeadingRoleImpl;
IMG = new ImgRoleImpl;
LINK = new LinkRoleImpl;
LISTBOX = new ListboxRoleImpl;
LISTITEM = new ListitemRoleImpl;
LIST = new ListRoleImpl;
LOG = new LogRoleImpl;
MAIN = new MainRoleImpl;
MARQUEE = new MarqueeRoleImpl;
MATH = new MathRoleImpl;
MENUBAR = new MenubarRoleImpl;
MENUITEMCHECKBOX = new MenuitemcheckboxRoleImpl;
MENUITEMRADIO = new MenuitemradioRoleImpl;
MENUITEM = new MenuitemRoleImpl;
MENU = new MenuRoleImpl;
NAVIGATION = new NavigationRoleImpl;
NOTE = new NoteRoleImpl;
OPTION = new OptionRoleImpl;
PRESENTATION = new PresentationRoleImpl;
PROGRESSBAR = new ProgressbarRoleImpl;
RADIOGROUP = new RadiogroupRoleImpl;
RADIO = new RadioRoleImpl;
REGION = new RegionRoleImpl;
ROWGROUP = new RowgroupRoleImpl;
ROWHEADER = new RowheaderRoleImpl;
ROW = new RowRoleImpl;
SCROLLBAR = new ScrollbarRoleImpl;
SEARCH = new SearchRoleImpl;
SEPARATOR = new SeparatorRoleImpl;
SLIDER = new SliderRoleImpl;
SPINBUTTON = new SpinbuttonRoleImpl;
STATUS = new StatusRoleImpl;
TABLIST = new TablistRoleImpl;
TABPANEL = new TabpanelRoleImpl;
TAB = new TabRoleImpl;
TEXTBOX = new TextboxRoleImpl;
TIMER = new TimerRoleImpl;
TOOLBAR = new ToolbarRoleImpl;
TOOLTIP = new TooltipRoleImpl;
TREEGRID = new TreegridRoleImpl;
TREEITEM = new TreeitemRoleImpl;
TREE = new TreeRoleImpl;
ROLES_MAP = new HashMap;
$putStringValue(ROLES_MAP, 'region', REGION);
$putStringValue(ROLES_MAP, 'alert', ALERT);
$putStringValue(ROLES_MAP, 'dialog', DIALOG);
$putStringValue(ROLES_MAP, 'alertdialog', ALERTDIALOG);
$putStringValue(ROLES_MAP, 'application', APPLICATION);
$putStringValue(ROLES_MAP, 'document', DOCUMENT);
$putStringValue(ROLES_MAP, 'article', ARTICLE);
$putStringValue(ROLES_MAP, 'banner', BANNER);
$putStringValue(ROLES_MAP, 'button', BUTTON);
$putStringValue(ROLES_MAP, 'checkbox', CHECKBOX);
$putStringValue(ROLES_MAP, 'gridcell', GRIDCELL);
$putStringValue(ROLES_MAP, 'columnheader', COLUMNHEADER);
$putStringValue(ROLES_MAP, 'group', GROUP);
$putStringValue(ROLES_MAP, 'combobox', COMBOBOX);
$putStringValue(ROLES_MAP, 'complementary', COMPLEMENTARY);
$putStringValue(ROLES_MAP, 'contentinfo', CONTENTINFO);
$putStringValue(ROLES_MAP, 'definition', DEFINITION);
$putStringValue(ROLES_MAP, 'list', LIST);
$putStringValue(ROLES_MAP, 'directory', DIRECTORY);
$putStringValue(ROLES_MAP, 'form', FORM);
$putStringValue(ROLES_MAP, 'grid', GRID);
$putStringValue(ROLES_MAP, 'heading', HEADING);
$putStringValue(ROLES_MAP, 'img', IMG);
$putStringValue(ROLES_MAP, 'link', LINK);
$putStringValue(ROLES_MAP, 'listbox', LISTBOX);
$putStringValue(ROLES_MAP, 'listitem', LISTITEM);
$putStringValue(ROLES_MAP, 'log', LOG);
$putStringValue(ROLES_MAP, 'main', MAIN);
$putStringValue(ROLES_MAP, 'marquee', MARQUEE);
$putStringValue(ROLES_MAP, 'math', MATH);
$putStringValue(ROLES_MAP, 'menu', MENU);
$putStringValue(ROLES_MAP, 'menubar', MENUBAR);
$putStringValue(ROLES_MAP, 'menuitem', MENUITEM);
$putStringValue(ROLES_MAP, 'menuitemcheckbox', MENUITEMCHECKBOX);
$putStringValue(ROLES_MAP, 'option', OPTION);
$putStringValue(ROLES_MAP, 'radio', RADIO);
$putStringValue(ROLES_MAP, 'menuitemradio', MENUITEMRADIO);
$putStringValue(ROLES_MAP, 'navigation', NAVIGATION);
$putStringValue(ROLES_MAP, 'note', NOTE);
$putStringValue(ROLES_MAP, 'presentation', PRESENTATION);
$putStringValue(ROLES_MAP, 'progressbar', PROGRESSBAR);
$putStringValue(ROLES_MAP, 'radiogroup', RADIOGROUP);
$putStringValue(ROLES_MAP, 'row', ROW);
$putStringValue(ROLES_MAP, 'rowgroup', ROWGROUP);
$putStringValue(ROLES_MAP, 'rowheader', ROWHEADER);
$putStringValue(ROLES_MAP, 'search', SEARCH);
$putStringValue(ROLES_MAP, 'separator', SEPARATOR);
$putStringValue(ROLES_MAP, 'scrollbar', SCROLLBAR);
$putStringValue(ROLES_MAP, 'slider', SLIDER);
$putStringValue(ROLES_MAP, 'spinbutton', SPINBUTTON);
$putStringValue(ROLES_MAP, 'status', STATUS);
$putStringValue(ROLES_MAP, 'tab', TAB);
$putStringValue(ROLES_MAP, 'tablist', TABLIST);
$putStringValue(ROLES_MAP, 'tabpanel', TABPANEL);
$putStringValue(ROLES_MAP, 'textbox', TEXTBOX);
$putStringValue(ROLES_MAP, 'timer', TIMER);
$putStringValue(ROLES_MAP, 'toolbar', TOOLBAR);
$putStringValue(ROLES_MAP, 'tooltip', TOOLTIP);
$putStringValue(ROLES_MAP, 'tree', TREE);
$putStringValue(ROLES_MAP, 'treegrid', TREEGRID);
$putStringValue(ROLES_MAP, 'treeitem', TREEITEM);
}
var ALERT, ALERTDIALOG, APPLICATION, ARTICLE, BANNER, BUTTON, CHECKBOX, COLUMNHEADER, COMBOBOX, COMPLEMENTARY, CONTENTINFO, DEFINITION, DIALOG, DIRECTORY, DOCUMENT, FORM, GRID, GRIDCELL, GROUP, HEADING, IMG, LINK, LIST, LISTBOX, LISTITEM, LOG, MAIN, MARQUEE, MATH, MENU, MENUBAR, MENUITEM, MENUITEMCHECKBOX, MENUITEMRADIO, NAVIGATION, NOTE, OPTION, PRESENTATION, PROGRESSBAR, RADIO, RADIOGROUP, REGION, ROLES_MAP, ROW, ROWGROUP, ROWHEADER, SCROLLBAR, SEARCH, SEPARATOR, SLIDER, SPINBUTTON, STATUS, TAB, TABLIST, TABPANEL, TEXTBOX, TIMER, TOOLBAR, TOOLTIP, TREE, TREEGRID, TREEITEM;
function RowRoleImpl(){
RoleImpl.call(this, 'row');
}
defineClass(633, 8, {}, RowRoleImpl);
var Lcom_google_gwt_aria_client_RowRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'RowRoleImpl', 633);
function RowgroupRoleImpl(){
RoleImpl.call(this, 'rowgroup');
}
defineClass(631, 8, {}, RowgroupRoleImpl);
var Lcom_google_gwt_aria_client_RowgroupRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'RowgroupRoleImpl', 631);
function RowheaderRoleImpl(){
RoleImpl.call(this, 'rowheader');
}
defineClass(632, 8, {}, RowheaderRoleImpl);
var Lcom_google_gwt_aria_client_RowheaderRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'RowheaderRoleImpl', 632);
function ScrollbarRoleImpl(){
RoleImpl.call(this, 'scrollbar');
}
defineClass(634, 8, {}, ScrollbarRoleImpl);
var Lcom_google_gwt_aria_client_ScrollbarRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ScrollbarRoleImpl', 634);
function SearchRoleImpl(){
RoleImpl.call(this, 'search');
}
defineClass(635, 8, {}, SearchRoleImpl);
var Lcom_google_gwt_aria_client_SearchRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'SearchRoleImpl', 635);
function SeparatorRoleImpl(){
RoleImpl.call(this, 'separator');
}
defineClass(636, 8, {}, SeparatorRoleImpl);
var Lcom_google_gwt_aria_client_SeparatorRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'SeparatorRoleImpl', 636);
function SliderRoleImpl(){
RoleImpl.call(this, 'slider');
}
defineClass(637, 8, {}, SliderRoleImpl);
var Lcom_google_gwt_aria_client_SliderRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'SliderRoleImpl', 637);
function SpinbuttonRoleImpl(){
RoleImpl.call(this, 'spinbutton');
}
defineClass(638, 8, {}, SpinbuttonRoleImpl);
var Lcom_google_gwt_aria_client_SpinbuttonRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'SpinbuttonRoleImpl', 638);
function StatusRoleImpl(){
RoleImpl.call(this, 'status');
}
defineClass(639, 8, {}, StatusRoleImpl);
var Lcom_google_gwt_aria_client_StatusRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'StatusRoleImpl', 639);
function TabRoleImpl(){
RoleImpl.call(this, 'tab');
}
defineClass(642, 8, {}, TabRoleImpl);
var Lcom_google_gwt_aria_client_TabRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'TabRoleImpl', 642);
function TablistRoleImpl(){
RoleImpl.call(this, 'tablist');
}
defineClass(640, 8, {}, TablistRoleImpl);
var Lcom_google_gwt_aria_client_TablistRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'TablistRoleImpl', 640);
function TabpanelRoleImpl(){
RoleImpl.call(this, 'tabpanel');
}
defineClass(641, 8, {}, TabpanelRoleImpl);
var Lcom_google_gwt_aria_client_TabpanelRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'TabpanelRoleImpl', 641);
function TextboxRoleImpl(){
RoleImpl.call(this, 'textbox');
}
defineClass(643, 8, {}, TextboxRoleImpl);
var Lcom_google_gwt_aria_client_TextboxRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'TextboxRoleImpl', 643);
function TimerRoleImpl(){
RoleImpl.call(this, 'timer');
}
defineClass(644, 8, {}, TimerRoleImpl);
var Lcom_google_gwt_aria_client_TimerRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'TimerRoleImpl', 644);
function ToolbarRoleImpl(){
RoleImpl.call(this, 'toolbar');
}
defineClass(645, 8, {}, ToolbarRoleImpl);
var Lcom_google_gwt_aria_client_ToolbarRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'ToolbarRoleImpl', 645);
function TooltipRoleImpl(){
RoleImpl.call(this, 'tooltip');
}
defineClass(646, 8, {}, TooltipRoleImpl);
var Lcom_google_gwt_aria_client_TooltipRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'TooltipRoleImpl', 646);
function TreeRoleImpl(){
RoleImpl.call(this, 'tree');
}
defineClass(649, 8, {}, TreeRoleImpl);
var Lcom_google_gwt_aria_client_TreeRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'TreeRoleImpl', 649);
function TreegridRoleImpl(){
RoleImpl.call(this, 'treegrid');
}
defineClass(647, 8, {}, TreegridRoleImpl);
var Lcom_google_gwt_aria_client_TreegridRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'TreegridRoleImpl', 647);
function TreeitemRoleImpl(){
RoleImpl.call(this, 'treeitem');
}
defineClass(648, 8, {}, TreeitemRoleImpl);
var Lcom_google_gwt_aria_client_TreeitemRoleImpl_2_classLit = createForClass('com.google.gwt.aria.client', 'TreeitemRoleImpl', 648);
function Duration(){
this.start_0 = now_1();
}
defineClass(231, 1, {}, Duration);
_.start_0 = 0;
var Lcom_google_gwt_core_client_Duration_2_classLit = createForClass('com.google.gwt.core.client', 'Duration', 231);
function $addSuppressed(this$static, exception){
checkCriticalNotNull_0(exception);
checkCriticalArgument(exception != this$static, 'Exception can not suppress itself.');
if (this$static.disableSuppression) {
return;
}
this$static.suppressedExceptions == null?(this$static.suppressedExceptions = stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Throwable_2_classLit, 1), $intern_0, 13, 0, [exception])):(this$static.suppressedExceptions[this$static.suppressedExceptions.length] = exception);
}
function $fillInStackTrace(this$static){
this$static.stackTrace = null;
captureStackTrace(this$static, this$static.detailMessage);
return this$static;
}
function $printStackTraceImpl(this$static, out, ident){
var t, t$array, t$index, t$max, theCause;
$printStackTraceItems(this$static);
for (t$array = (this$static.suppressedExceptions == null && (this$static.suppressedExceptions = initUnidimensionalArray(Ljava_lang_Throwable_2_classLit, $intern_0, 13, 0, 0, 1)) , this$static.suppressedExceptions) , t$index = 0 , t$max = t$array.length; t$index < t$max; ++t$index) {
t = t$array[t$index];
$printStackTraceImpl(t, out, '\t' + ident);
}
theCause = this$static.cause;
!!theCause && $printStackTraceImpl(theCause, out, ident);
}
function $printStackTraceItems(this$static){
var element$array, element$index, element$max, stackTrace;
for (element$array = (this$static.stackTrace == null && (this$static.stackTrace = ($clinit_StackTraceCreator() , stackTrace = initUnidimensionalArray(Ljava_lang_StackTraceElement_2_classLit, $intern_0, 875, 0, 0, 1) , dropInternalFrames(stackTrace))) , this$static.stackTrace) , element$index = 0 , element$max = element$array.length; element$index < element$max; ++element$index)
;
}
function Throwable(message, cause){
this.cause = cause;
this.detailMessage = message;
$fillInStackTrace(this);
}
defineClass(13, 1, $intern_2);
_.getMessage = function(){
return this.detailMessage;
}
;
_.toString_0 = function(){
var className, msg;
return className = $getName(this.___clazz) , msg = this.getMessage() , msg != null?className + ': ' + msg:className;
}
;
_.disableSuppression = false;
var Ljava_lang_Throwable_2_classLit = createForClass('java.lang', 'Throwable', 13);
defineClass(16, 13, {3:1, 16:1, 13:1});
var Ljava_lang_Exception_2_classLit = createForClass('java.lang', 'Exception', 16);
function RuntimeException(){
$fillInStackTrace(this);
}
function RuntimeException_0(message){
this.detailMessage = message;
$fillInStackTrace(this);
}
function RuntimeException_1(message, cause){
Throwable.call(this, message, cause);
}
defineClass(12, 16, $intern_3, RuntimeException_0);
var Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang', 'RuntimeException', 12);
function $clinit_JavaScriptException(){
$clinit_JavaScriptException = emptyMethod;
NOT_SET = new Object_1;
}
function $ensureInit(this$static){
var exception;
if (this$static.message_0 == null) {
exception = maskUndefined(this$static.e) === maskUndefined(NOT_SET)?null:this$static.e;
this$static.name_0 = exception == null?'null':instanceOfJso(exception)?getExceptionName0(castToJso(exception)):instanceOfString(exception)?'String':$getName(getClass__Ljava_lang_Class___devirtual$(exception));
this$static.description = this$static.description + ': ' + (instanceOfJso(exception)?getExceptionDescription0(castToJso(exception)):exception + '');
this$static.message_0 = '(' + this$static.name_0 + ') ' + this$static.description;
}
}
function JavaScriptException(e){
$clinit_JavaScriptException();
this.cause = null;
this.detailMessage = null;
this.disableSuppression = !true;
this.description = '';
this.e = e;
this.description = '';
}
function getExceptionDescription0(e){
return e == null?null:e.message;
}
function getExceptionName0(e){
return e == null?null:e.name;
}
defineClass(78, 12, {78:1, 3:1, 16:1, 12:1, 13:1}, JavaScriptException);
_.getMessage = function(){
$ensureInit(this);
return this.message_0;
}
;
_.getThrown = function(){
return maskUndefined(this.e) === maskUndefined(NOT_SET)?null:this.e;
}
;
var NOT_SET;
var Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client', 'JavaScriptException', 78);
function toStringSimple(obj){
return obj.toString?obj.toString():'[JavaScriptObject]';
}
var Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client', 'JavaScriptObject$', 0);
function $push(this$static, value_0){
this$static[this$static.length] = value_0;
}
function now_1(){
if (Date.now) {
return Date.now();
}
return (new Date).getTime();
}
function escapeChar(c, escapeTable){
var lookedUp = escapeTable_0[c.charCodeAt(0)];
return lookedUp == null?c:lookedUp;
}
function escapeValue(toEscape){
var escapeTable = (!escapeTable_0 && (escapeTable_0 = initEscapeTable()) , escapeTable_0);
var s = toEscape.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g, function(x_0){
return escapeChar(x_0, escapeTable);
}
);
return '"' + s + '"';
}
function initEscapeTable(){
var out = ['\\u0000', '\\u0001', '\\u0002', '\\u0003', '\\u0004', '\\u0005', '\\u0006', '\\u0007', '\\b', '\\t', '\\n', '\\u000B', '\\f', '\\r', '\\u000E', '\\u000F', '\\u0010', '\\u0011', '\\u0012', '\\u0013', '\\u0014', '\\u0015', '\\u0016', '\\u0017', '\\u0018', '\\u0019', '\\u001A', '\\u001B', '\\u001C', '\\u001D', '\\u001E', '\\u001F'];
out[34] = '\\"';
out[92] = '\\\\';
out[173] = '\\u00ad';
out[1536] = '\\u0600';
out[1537] = '\\u0601';
out[1538] = '\\u0602';
out[1539] = '\\u0603';
out[1757] = '\\u06dd';
out[1807] = '\\u070f';
out[6068] = '\\u17b4';
out[6069] = '\\u17b5';
out[8203] = '\\u200b';
out[8204] = '\\u200c';
out[8205] = '\\u200d';
out[8206] = '\\u200e';
out[8207] = '\\u200f';
out[8232] = '\\u2028';
out[8233] = '\\u2029';
out[8234] = '\\u202a';
out[8235] = '\\u202b';
out[8236] = '\\u202c';
out[8237] = '\\u202d';
out[8238] = '\\u202e';
out[8288] = '\\u2060';
out[8289] = '\\u2061';
out[8290] = '\\u2062';
out[8291] = '\\u2063';
out[8292] = '\\u2064';
out[8298] = '\\u206a';
out[8299] = '\\u206b';
out[8300] = '\\u206c';
out[8301] = '\\u206d';
out[8302] = '\\u206e';
out[8303] = '\\u206f';
out[65279] = '\\ufeff';
out[65529] = '\\ufff9';
out[65530] = '\\ufffa';
out[65531] = '\\ufffb';
return out;
}
function safeEval(json){
try {
return JSON.parse(json);
}
catch (e) {
return throwIllegalArgumentException('Error parsing JSON: ' + e, json);
}
}
function throwIllegalArgumentException(message, data_0){
throw new IllegalArgumentException(message + '\n' + data_0);
}
var escapeTable_0;
defineClass(685, 1, {});
var Lcom_google_gwt_core_client_Scheduler_2_classLit = createForClass('com.google.gwt.core.client', 'Scheduler', 685);
function $clinit_ScriptInjector(){
$clinit_ScriptInjector = emptyMethod;
TOP_WINDOW = $wnd;
}
var TOP_WINDOW;
function apply_0(jsFunction, thisObj, args){
return jsFunction.apply(thisObj, args);
var __0;
}
function enter(){
var now_0;
if (entryDepth != 0) {
now_0 = now_1();
if (now_0 - watchdogEntryDepthLastScheduled > 2000) {
watchdogEntryDepthLastScheduled = now_0;
watchdogEntryDepthTimerId = $wnd.setTimeout(watchdogEntryDepthRun, 10);
}
}
if (entryDepth++ == 0) {
$flushEntryCommands(($clinit_SchedulerImpl() , INSTANCE));
return true;
}
return false;
}
function entry_0(jsFunction){
return function(){
return entry0_0(jsFunction, this, arguments);
var __0;
}
;
}
function entry0_0(jsFunction, thisObj, args){
var initialEntry;
initialEntry = enter();
try {
return apply_0(jsFunction, thisObj, args);
}
finally {
exit(initialEntry);
}
}
function exit(initialEntry){
initialEntry && $flushFinallyCommands(($clinit_SchedulerImpl() , INSTANCE));
--entryDepth;
if (initialEntry) {
if (watchdogEntryDepthTimerId != -1) {
watchdogEntryDepthCancel(watchdogEntryDepthTimerId);
watchdogEntryDepthTimerId = -1;
}
}
}
function reportToBrowser(e){
$wnd.setTimeout(function(){
throw e;
}
, 0);
}
function watchdogEntryDepthCancel(timerId){
$wnd.clearTimeout(timerId);
}
function watchdogEntryDepthRun(){
entryDepth != 0 && (entryDepth = 0);
watchdogEntryDepthTimerId = -1;
}
var entryDepth = 0, watchdogEntryDepthLastScheduled = 0, watchdogEntryDepthTimerId = -1;
function $clinit_SchedulerImpl(){
$clinit_SchedulerImpl = emptyMethod;
INSTANCE = new VSchedulerImpl;
}
function $flushEntryCommands(this$static){
var oldQueue, rescheduled;
if (this$static.entryCommands) {
rescheduled = null;
do {
oldQueue = this$static.entryCommands;
this$static.entryCommands = null;
rescheduled = runScheduledTasks(oldQueue, rescheduled);
}
while (this$static.entryCommands);
this$static.entryCommands = rescheduled;
}
}
function $flushFinallyCommands(this$static){
var oldQueue, rescheduled;
if (this$static.finallyCommands) {
rescheduled = null;
do {
oldQueue = this$static.finallyCommands;
this$static.finallyCommands = null;
rescheduled = runScheduledTasks(oldQueue, rescheduled);
}
while (this$static.finallyCommands);
this$static.finallyCommands = rescheduled;
}
}
function $flushPostEventPumpCommands(this$static){
var oldDeferred;
if (this$static.deferredCommands) {
oldDeferred = this$static.deferredCommands;
this$static.deferredCommands = null;
!this$static.incrementalCommands && (this$static.incrementalCommands = []);
runScheduledTasks(oldDeferred, this$static.incrementalCommands);
}
!!this$static.incrementalCommands && (this$static.incrementalCommands = $runRepeatingTasks(this$static.incrementalCommands));
}
function $isWorkQueued(this$static){
return !!this$static.deferredCommands || !!this$static.incrementalCommands;
}
function $maybeSchedulePostEventPumpCommands(this$static){
if (!this$static.shouldBeRunning) {
this$static.shouldBeRunning = true;
!this$static.flusher && (this$static.flusher = new SchedulerImpl$Flusher(this$static));
scheduleFixedDelayImpl(this$static.flusher, 1);
!this$static.rescue && (this$static.rescue = new SchedulerImpl$Rescuer(this$static));
scheduleFixedDelayImpl(this$static.rescue, 50);
}
}
function $runRepeatingTasks(tasks){
var canceledSomeTasks, duration, executedSomeTask, i_0, length_0, newTasks, t;
length_0 = tasks.length;
if (length_0 == 0) {
return null;
}
canceledSomeTasks = false;
duration = new Duration;
while (now_1() - duration.start_0 < 16) {
executedSomeTask = false;
for (i_0 = 0; i_0 < length_0; i_0++) {
t = tasks[i_0];
if (!t) {
continue;
}
executedSomeTask = true;
if (!t[0].execute_0()) {
tasks[i_0] = null;
canceledSomeTasks = true;
}
}
if (!executedSomeTask) {
break;
}
}
if (canceledSomeTasks) {
newTasks = [];
for (i_0 = 0; i_0 < length_0; i_0++) {
!!tasks[i_0] && (newTasks[newTasks.length] = tasks[i_0] , undefined);
}
return newTasks.length == 0?null:newTasks;
}
else {
return tasks;
}
}
function $scheduleDeferred(this$static, cmd){
this$static.deferredCommands = push_0(this$static.deferredCommands, [cmd, false]);
$maybeSchedulePostEventPumpCommands(this$static);
}
function $scheduleFinally(this$static, cmd){
this$static.finallyCommands = push_0(this$static.finallyCommands, [cmd, false]);
}
function execute(cmd){
return cmd.execute_0();
}
function push_0(queue, task){
!queue && (queue = []);
queue[queue.length] = task;
return queue;
}
function runScheduledTasks(tasks, rescheduled){
var e, i_0, j, t;
for (i_0 = 0 , j = tasks.length; i_0 < j; i_0++) {
t = tasks[i_0];
try {
t[1]?t[0].execute_0() && (rescheduled = push_0(rescheduled, t)):t[0].execute_1();
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 13)) {
e = $e0;
reportToBrowser(instanceOf(e, 78)?castTo(e, 78).getThrown():e);
}
else
throw unwrap($e0);
}
}
return rescheduled;
}
function scheduleFixedDelayImpl(cmd, delayMs){
$clinit_SchedulerImpl();
function callback(){
var ret = $entry(execute)(cmd);
ret && $wnd.setTimeout(callback, delayMs);
}
$wnd.setTimeout(callback, delayMs);
}
function scheduleFixedPeriodImpl(cmd, delayMs){
$clinit_SchedulerImpl();
var intervalId = $wnd.setInterval(function(){
var ret = $entry(execute)(cmd);
!ret && $wnd.clearInterval(intervalId);
}
, delayMs);
}
defineClass(497, 685, {});
_.flushRunning = false;
_.shouldBeRunning = false;
var INSTANCE;
var Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit = createForClass('com.google.gwt.core.client.impl', 'SchedulerImpl', 497);
function SchedulerImpl$Flusher(this$0){
this.this$01 = this$0;
}
defineClass(498, 1, {}, SchedulerImpl$Flusher);
_.execute_0 = function(){
this.this$01.flushRunning = true;
$flushPostEventPumpCommands(this.this$01);
this.this$01.flushRunning = false;
return this.this$01.shouldBeRunning = $isWorkQueued(this.this$01);
}
;
var Lcom_google_gwt_core_client_impl_SchedulerImpl$Flusher_2_classLit = createForClass('com.google.gwt.core.client.impl', 'SchedulerImpl/Flusher', 498);
function SchedulerImpl$Rescuer(this$0){
this.this$01 = this$0;
}
defineClass(499, 1, {}, SchedulerImpl$Rescuer);
_.execute_0 = function(){
this.this$01.flushRunning && scheduleFixedDelayImpl(this.this$01.flusher, 1);
return this.this$01.shouldBeRunning;
}
;
var Lcom_google_gwt_core_client_impl_SchedulerImpl$Rescuer_2_classLit = createForClass('com.google.gwt.core.client.impl', 'SchedulerImpl/Rescuer', 499);
function $clinit_StackTraceCreator(){
$clinit_StackTraceCreator = emptyMethod;
!(!!Error.stackTraceLimit || 'stack' in new Error);
}
function captureStackTrace(throwable, reference){
$clinit_StackTraceCreator();
}
function dropInternalFrames(stackTrace){
var i_0, numberOfFrameToSearch;
numberOfFrameToSearch = min_1(stackTrace.length, 5);
for (i_0 = 0; i_0 < numberOfFrameToSearch; i_0++) {
if (null.$_nullMethod()) {
stackTrace.length >= i_0 + 1 && (stackTrace.splice(0, i_0 + 1) , undefined);
break;
}
}
return stackTrace;
}
function $appendChild(this$static, newChild){
return this$static.appendChild(newChild);
}
function $getChild(this$static, index_0){
return this$static.childNodes[index_0];
}
function $getParentElement(this$static){
return $getParentElement_0(($clinit_DOMImpl() , this$static));
}
function $insertAfter(this$static, newChild, refChild){
var next;
next = !refChild?null:refChild.nextSibling;
return !next?this$static.appendChild(newChild):this$static.insertBefore(newChild, next);
}
function $insertBefore(this$static, newChild, refChild){
return this$static.insertBefore(newChild, refChild);
}
function $insertFirst(this$static, child){
return $insertBefore(this$static, child, this$static.firstChild);
}
function $isOrHasChild(this$static, child){
return ($clinit_DOMImpl() , impl_0).isOrHasChild(this$static, child);
}
function $removeAllChildren(this$static){
while (this$static.lastChild) {
this$static.removeChild(this$static.lastChild);
}
}
function $removeChild(this$static, oldChild){
return this$static.removeChild(oldChild);
}
function $removeFromParent(this$static){
var parent_0;
parent_0 = $getParentElement_0(($clinit_DOMImpl() , this$static));
!!parent_0 && parent_0.removeChild(this$static);
}
function is(o){
try {
return !!o && !!o.nodeType;
}
catch (e) {
return false;
}
}
function $addClassName(this$static, className){
var idx, oldClassName;
className = trimClassName(className);
oldClassName = this$static.className || '';
idx = indexOfName(oldClassName, className);
if (idx == -1) {
($clinit_String() , oldClassName.length) > 0?(this$static.className = oldClassName + ' ' + className || '' , undefined):(this$static.className = className || '' , undefined);
return true;
}
return false;
}
function $dispatchEvent(this$static, evt){
($clinit_DOMImpl() , impl_0).dispatchEvent_0(this$static, evt);
}
function $getAbsoluteBottom(this$static){
return ($clinit_DOMImpl() , impl_0).getAbsoluteTop(this$static) + ((this$static.offsetHeight || 0) | 0);
}
function $getAbsoluteLeft(this$static){
return ($clinit_DOMImpl() , impl_0).getAbsoluteLeft(this$static);
}
function $getAbsoluteRight(this$static){
return ($clinit_DOMImpl() , impl_0).getAbsoluteLeft(this$static) + ((this$static.offsetWidth || 0) | 0);
}
function $getAbsoluteTop(this$static){
return ($clinit_DOMImpl() , impl_0).getAbsoluteTop(this$static);
}
function $getFirstChildElement(this$static){
return $getFirstChildElement_0(($clinit_DOMImpl() , this$static));
}
function $getInnerHTML(this$static){
return ($clinit_DOMImpl() , this$static).innerHTML;
}
function $getInnerText(this$static){
return ($clinit_DOMImpl() , impl_0).getInnerText(this$static);
}
function $getPropertyInt(this$static, name_0){
return parseInt(this$static[name_0]) | 0;
}
function $getPropertyString(this$static, name_0){
return this$static[name_0] == null?null:String(this$static[name_0]);
}
function $getScrollLeft(this$static){
return ($clinit_DOMImpl() , impl_0).getScrollLeft(this$static);
}
function $getString(this$static){
return ($clinit_DOMImpl() , impl_0).toString_1(this$static);
}
function $getTabIndex(this$static){
return ($clinit_DOMImpl() , impl_0).getTabIndex(this$static);
}
function $hasClassName(this$static, className){
var idx;
className = trimClassName(className);
idx = indexOfName(this$static.className || '', className);
return idx != -1;
}
function $removeClassName(this$static, className){
var begin, end, idx, newClassName, oldStyle;
className = trimClassName(className);
oldStyle = this$static.className || '';
idx = indexOfName(oldStyle, className);
if (idx != -1) {
begin = $trim(($clinit_String() , oldStyle.substr(0, idx)));
end = $trim($substring(oldStyle, idx + className.length));
begin.length == 0?(newClassName = end):end.length == 0?(newClassName = begin):(newClassName = begin + ' ' + end);
this$static.className = newClassName || '';
return true;
}
return false;
}
function $setAttribute(this$static, name_0, value_0){
this$static.setAttribute(name_0, value_0);
}
function $setClassName(this$static, className){
this$static.className = className || '';
}
function $setInnerHTML(this$static, html){
this$static.innerHTML = html || '';
}
function $setInnerText(this$static, text_0){
($clinit_DOMImpl() , impl_0).setInnerText(this$static, text_0);
}
function $setScrollLeft(this$static, scrollLeft){
($clinit_DOMImpl() , impl_0).setScrollLeft(this$static, scrollLeft);
}
function $setScrollTop(this$static, scrollTop){
this$static.scrollTop = scrollTop;
}
function $setTabIndex(this$static, tabIndex){
this$static.tabIndex = tabIndex;
}
function indexOfName(nameList, name_0){
var idx, last, lastPos;
idx = ($clinit_String() , nameList.indexOf(name_0));
while (idx != -1) {
if (idx == 0 || nameList.charCodeAt(idx - 1) == 32) {
last = idx + name_0.length;
lastPos = nameList.length;
if (last == lastPos || last < lastPos && nameList.charCodeAt(last) == 32) {
break;
}
}
idx = nameList.indexOf(name_0, idx + 1);
}
return idx;
}
function is_0(o){
if (is(o)) {
return !!o && o.nodeType == 1;
}
return false;
}
function trimClassName(className){
className = $trim(className);
return className;
}
function $clinit_DOMImpl(){
$clinit_DOMImpl = emptyMethod;
impl_0 = castTo(create_com_google_gwt_dom_client_DOMImpl(), 98);
}
function $createElement(doc, tag){
return doc.createElement(tag);
}
function $getAttribute(elem, name_0){
return elem.getAttribute(name_0) || '';
}
function $getFirstChildElement_0(elem){
var child = elem.firstChild;
while (child && child.nodeType != 1)
child = child.nextSibling;
return child;
}
function $getNextSiblingElement(elem){
var sib = elem.nextSibling;
while (sib && sib.nodeType != 1)
sib = sib.nextSibling;
return sib;
}
function $getParentElement_0(node){
var parent_0 = node.parentNode;
(!parent_0 || parent_0.nodeType != 1) && (parent_0 = null);
return parent_0;
}
function $getPreviousSiblingElement(elem){
var sib = elem.previousSibling;
while (sib && sib.nodeType != 1)
sib = sib.previousSibling;
return sib;
}
function $getSubPixelAbsoluteLeft(elem){
var left = 0;
var curr = elem;
while (curr.offsetParent) {
left -= curr.scrollLeft;
curr = curr.parentNode;
}
while (elem) {
left += elem.offsetLeft;
elem = elem.offsetParent;
}
return left;
}
function $getSubPixelAbsoluteTop(elem){
var top_0 = 0;
var curr = elem;
while (curr.offsetParent) {
top_0 -= curr.scrollTop;
curr = curr.parentNode;
}
while (elem) {
top_0 += elem.offsetTop;
elem = elem.offsetParent;
}
return top_0;
}
function $hasAttribute(elem, name_0){
return elem.hasAttribute(name_0);
}
function toInt32(val){
$clinit_DOMImpl();
return val | 0;
}
defineClass(98, 1, $intern_4);
_.createButtonElement = function createButtonElement(doc, type_0){
var e = doc.createElement('BUTTON');
e.type = type_0;
return e;
}
;
_.createScriptElement = function(doc, source){
var elem;
elem = doc.createElement('script');
elem.text = source;
return elem;
}
;
_.eventGetButton = function eventGetButton(evt){
return evt.button | 0;
}
;
_.eventGetCurrentTarget = function eventGetCurrentTarget(event_0){
return event_0.currentTarget;
}
;
_.getAbsoluteLeft = function(elem){
return toInt32($getSubPixelAbsoluteLeft(elem));
}
;
_.getAbsoluteTop = function(elem){
return toInt32($getSubPixelAbsoluteTop(elem));
}
;
_.getInnerText = function getInnerText(node){
var text_0 = '', child = node.firstChild;
while (child) {
child.nodeType == 1?(text_0 += this.getInnerText(child)):child.nodeValue && (text_0 += child.nodeValue);
child = child.nextSibling;
}
return text_0;
}
;
_.getScrollLeft = function(elem){
return toInt32(elem.scrollLeft || 0);
}
;
_.getTabIndex = function getTabIndex(elem){
return elem.tabIndex;
}
;
_.setInnerText = function setInnerText(elem, text_0){
while (elem.firstChild) {
elem.removeChild(elem.firstChild);
}
text_0 != null && elem.appendChild(elem.ownerDocument.createTextNode(text_0));
}
;
_.setScrollLeft = function(elem, left){
elem.scrollLeft = left;
}
;
_.toString_1 = function toString_1(elem){
return elem.outerHTML;
}
;
var impl_0;
var Lcom_google_gwt_dom_client_DOMImpl_2_classLit = createForClass('com.google.gwt.dom.client', 'DOMImpl', 98);
defineClass(712, 98, $intern_4);
_.createHtmlEvent = function createHtmlEvent(doc, type_0, canBubble, cancelable){
var evt = doc.createEvent('HTMLEvents');
evt.initEvent(type_0, canBubble, cancelable);
return evt;
}
;
_.dispatchEvent_0 = function dispatchEvent_0(target, evt){
target.dispatchEvent(evt);
}
;
_.eventGetButton = function eventGetButton_0(evt){
var button = evt.button;
if (button == 1) {
return 4;
}
else if (button == 2) {
return 2;
}
return 1;
}
;
_.eventGetRelatedTarget = function eventGetRelatedTarget(evt){
return evt.relatedTarget;
}
;
_.eventGetTarget = function eventGetTarget(evt){
return evt.target;
}
;
_.eventPreventDefault = function eventPreventDefault(evt){
evt.preventDefault();
}
;
_.getInnerText = function getInnerText_0(elem){
return elem.textContent;
}
;
_.isOrHasChild = function isOrHasChild(parent_0, child){
return parent_0.contains(child);
}
;
_.setInnerText = function setInnerText_0(elem, text_0){
elem.textContent = text_0 || '';
}
;
var Lcom_google_gwt_dom_client_DOMImplStandard_2_classLit = createForClass('com.google.gwt.dom.client', 'DOMImplStandard', 712);
function $isRTL(elem){
return elem.ownerDocument.defaultView.getComputedStyle(elem, '').direction == 'rtl';
}
function getAbsoluteLeftUsingOffsets(elem){
if (elem.offsetLeft == null) {
return 0;
}
var left = 0;
var doc = elem.ownerDocument;
var curr = elem.parentNode;
if (curr) {
while (curr.offsetParent) {
left -= curr.scrollLeft;
doc.defaultView.getComputedStyle(curr, '').getPropertyValue('direction') == 'rtl' && (left += curr.scrollWidth - curr.clientWidth);
curr = curr.parentNode;
}
}
while (elem) {
left += elem.offsetLeft;
if (doc.defaultView.getComputedStyle(elem, '')['position'] == 'fixed') {
left += doc.body.scrollLeft;
return left;
}
var parent_0 = elem.offsetParent;
parent_0 && $wnd.devicePixelRatio && (left += parseInt(doc.defaultView.getComputedStyle(parent_0, '').getPropertyValue('border-left-width')));
if (parent_0 && parent_0.tagName == 'BODY' && elem.style.position == 'absolute') {
break;
}
elem = parent_0;
}
return left;
}
function getAbsoluteTopUsingOffsets(elem){
if (elem.offsetTop == null) {
return 0;
}
var top_0 = 0;
var doc = elem.ownerDocument;
var curr = elem.parentNode;
if (curr) {
while (curr.offsetParent) {
top_0 -= curr.scrollTop;
curr = curr.parentNode;
}
}
while (elem) {
top_0 += elem.offsetTop;
if (doc.defaultView.getComputedStyle(elem, '')['position'] == 'fixed') {
top_0 += doc.body.scrollTop;
return top_0;
}
var parent_0 = elem.offsetParent;
parent_0 && $wnd.devicePixelRatio && (top_0 += parseInt(doc.defaultView.getComputedStyle(parent_0, '').getPropertyValue('border-top-width')));
if (parent_0 && parent_0.tagName == 'BODY' && elem.style.position == 'absolute') {
break;
}
elem = parent_0;
}
return top_0;
}
defineClass(713, 712, $intern_4);
_.createButtonElement = function createButtonElement_0(doc, type_0){
var e = doc.createElement('BUTTON');
e.setAttribute('type', type_0);
return e;
}
;
_.createScriptElement = function(doc, source){
var elem;
elem = doc.createElement('script');
impl_0.setInnerText(elem, source);
return elem;
}
;
_.eventGetCurrentTarget = function eventGetCurrentTarget_0(event_0){
return event_0.currentTarget || $wnd;
}
;
_.getAbsoluteLeft = function(elem){
var left, rect;
rect = elem.getBoundingClientRect && elem.getBoundingClientRect();
left = rect?rect.left + $getScrollLeft(elem.ownerDocument.body):getAbsoluteLeftUsingOffsets(elem);
return $clinit_DOMImpl() , left | 0;
}
;
_.getAbsoluteTop = function(elem){
var rect, top_0, top_1;
rect = elem.getBoundingClientRect && elem.getBoundingClientRect();
top_0 = rect?rect.top + ((elem.ownerDocument.body.scrollTop || 0) | 0):getAbsoluteTopUsingOffsets(elem);
return $clinit_DOMImpl() , top_0 | 0;
}
;
_.getScrollLeft = function(elem){
if (!equalsIgnoreCase('body', ($clinit_DOMImpl() , elem).tagName) && $isRTL(elem)) {
return toInt32(elem.scrollLeft || 0) - (((elem.scrollWidth || 0) | 0) - (elem.clientWidth | 0));
}
return toInt32(elem.scrollLeft || 0);
}
;
_.getTabIndex = function getTabIndex_0(elem){
return typeof elem.tabIndex != 'undefined'?elem.tabIndex:-1;
}
;
_.setScrollLeft = function(elem, left){
!equalsIgnoreCase('body', ($clinit_DOMImpl() , elem).tagName) && $isRTL(elem) && (left += ((elem.scrollWidth || 0) | 0) - (elem.clientWidth | 0));
elem.scrollLeft = left;
}
;
var Lcom_google_gwt_dom_client_DOMImplStandardBase_2_classLit = createForClass('com.google.gwt.dom.client', 'DOMImplStandardBase', 713);
function $getBoundingClientRectLeft(elem){
try {
return elem.getBoundingClientRect().left;
}
catch (e) {
return 0;
}
}
function $getBoundingClientRectTop(elem){
try {
return elem.getBoundingClientRect().top;
}
catch (e) {
return 0;
}
}
function $getParentOffsetDelta(elem){
var offsetParent = elem.offsetParent;
if (offsetParent) {
return offsetParent.offsetWidth - offsetParent.clientWidth;
}
return 0;
}
function DOMImplIE9(){
$clinit_DOMImpl();
}
defineClass(546, 713, $intern_4, DOMImplIE9);
_.getAbsoluteLeft = function(elem){
var left;
left = $getBoundingClientRectLeft(elem) + $wnd.pageXOffset;
$isRTL(elem) && (left += $getParentOffsetDelta(elem));
return $clinit_DOMImpl() , left | 0;
}
;
_.getAbsoluteTop = function(elem){
return toInt32($getBoundingClientRectTop(elem) + $wnd.pageYOffset);
}
;
_.getScrollLeft = function(elem){
var left;
left = toInt32(elem.scrollLeft || 0);
$isRTL(elem) && (left = -left);
return left;
}
;
_.getTabIndex = function getTabIndex_1(elem){
return elem.tabIndex < 65535?elem.tabIndex:-(elem.tabIndex % 65535) - 1;
}
;
_.isOrHasChild = function(parent_0, child){
return isOrHasChildImpl(parent_0, child);
}
;
_.setScrollLeft = function(elem, left){
$isRTL(elem) && (left = -left);
elem.scrollLeft = left;
}
;
var Lcom_google_gwt_dom_client_DOMImplIE9_2_classLit = createForClass('com.google.gwt.dom.client', 'DOMImplIE9', 546);
function $getAbsoluteLeftImpl(viewport, elem){
if (Element.prototype.getBoundingClientRect) {
return elem.getBoundingClientRect().left + viewport.scrollLeft | 0;
}
else {
var doc = elem.ownerDocument;
return doc.getBoxObjectFor(elem).screenX - doc.getBoxObjectFor(doc.documentElement).screenX;
}
}
function $getAbsoluteTopImpl(viewport, elem){
if (Element.prototype.getBoundingClientRect) {
return elem.getBoundingClientRect().top + viewport.scrollTop | 0;
}
else {
var doc = elem.ownerDocument;
return doc.getBoxObjectFor(elem).screenY - doc.getBoxObjectFor(doc.documentElement).screenY;
}
}
function $isRTL_0(elem){
var style = elem.ownerDocument.defaultView.getComputedStyle(elem, null);
return style.direction == 'rtl';
}
function DOMImplMozilla(){
$clinit_DOMImpl();
}
function getGeckoVersion(){
var result = /rv:([0-9]+)\.([0-9]+)(\.([0-9]+))?.*?/.exec(navigator.userAgent.toLowerCase());
if (result && result.length >= 3) {
var version = parseInt(result[1]) * 1000000 + parseInt(result[2]) * 1000 + parseInt(result.length >= 5 && !isNaN(result[4])?result[4]:0);
return version;
}
return -1;
}
defineClass(545, 712, $intern_4, DOMImplMozilla);
_.eventGetRelatedTarget = function eventGetRelatedTarget_0(evt){
var relatedTarget = evt.relatedTarget;
if (!relatedTarget) {
return null;
}
try {
var nodeName = relatedTarget.nodeName;
return relatedTarget;
}
catch (e) {
return null;
}
}
;
_.getAbsoluteLeft = function(elem){
return $getAbsoluteLeftImpl($getViewportElement(elem.ownerDocument), elem);
}
;
_.getAbsoluteTop = function(elem){
return $getAbsoluteTopImpl($getViewportElement(elem.ownerDocument), elem);
}
;
_.getScrollLeft = function(elem){
var geckoVersion;
geckoVersion = getGeckoVersion();
if (!(geckoVersion != -1 && geckoVersion >= 1009000) && $isRTL_0(elem)) {
return toInt32(elem.scrollLeft || 0) - (((elem.scrollWidth || 0) | 0) - (elem.clientWidth | 0));
}
return toInt32(elem.scrollLeft || 0);
}
;
_.isOrHasChild = function isOrHasChild_0(parent_0, child){
return parent_0 === child || !!(parent_0.compareDocumentPosition(child) & 16);
}
;
_.setScrollLeft = function(elem, left){
var geckoVersion;
geckoVersion = getGeckoVersion();
!(geckoVersion != -1 && geckoVersion >= 1009000) && $isRTL_0(elem) && (left += ((elem.scrollWidth || 0) | 0) - (elem.clientWidth | 0));
elem.scrollLeft = left;
}
;
_.toString_1 = function toString_2(elem){
var doc = elem.ownerDocument;
var temp = elem.cloneNode(true);
var tempDiv = doc.createElement('DIV');
tempDiv.appendChild(temp);
outer = tempDiv.innerHTML;
temp.innerHTML = '';
return outer;
}
;
var Lcom_google_gwt_dom_client_DOMImplMozilla_2_classLit = createForClass('com.google.gwt.dom.client', 'DOMImplMozilla', 545);
function isOrHasChildImpl(parent_0, child){
if (parent_0.nodeType != 1 && parent_0.nodeType != 9) {
return parent_0 == child;
}
if (child.nodeType != 1) {
child = child.parentNode;
if (!child) {
return false;
}
}
if (parent_0.nodeType == 9) {
return parent_0 === child || parent_0.body && parent_0.body.contains(child);
}
else {
return parent_0 === child || parent_0.contains(child);
}
}
function DOMImplWebkit(){
$clinit_DOMImpl();
}
defineClass(544, 713, $intern_4, DOMImplWebkit);
_.eventGetTarget = function eventGetTarget_0(evt){
var target = evt.target;
target && target.nodeType == 3 && (target = target.parentNode);
return target;
}
;
var Lcom_google_gwt_dom_client_DOMImplWebkit_2_classLit = createForClass('com.google.gwt.dom.client', 'DOMImplWebkit', 544);
function $createCheckInputElement(this$static){
var e;
return e = ($clinit_DOMImpl() , this$static).createElement('INPUT') , e.type = 'checkbox' , e.value = 'on' , e;
}
function $createDivElement(this$static){
return ($clinit_DOMImpl() , this$static).createElement('div');
}
function $createElement_0(this$static, tagName){
return $createElement(($clinit_DOMImpl() , this$static), tagName);
}
function $createHtmlEvent(this$static, type_0){
return ($clinit_DOMImpl() , impl_0).createHtmlEvent(this$static, type_0, false, true);
}
function $createIFrameElement(this$static){
return ($clinit_DOMImpl() , this$static).createElement('iframe');
}
function $createLabelElement(this$static){
return ($clinit_DOMImpl() , this$static).createElement('label');
}
function $createPushButtonElement(this$static){
return ($clinit_DOMImpl() , impl_0).createButtonElement(this$static, 'button');
}
function $createScriptElement(this$static){
return ($clinit_DOMImpl() , impl_0).createScriptElement(this$static, 'function __gwt_initWindowCloseHandler(beforeunload, unload) {\n var wnd = window\n , oldOnBeforeUnload = wnd.onbeforeunload\n , oldOnUnload = wnd.onunload;\n \n wnd.onbeforeunload = function(evt) {\n var ret, oldRet;\n try {\n ret = beforeunload();\n } finally {\n oldRet = oldOnBeforeUnload && oldOnBeforeUnload(evt);\n }\n // Avoid returning null as IE6 will coerce it into a string.\n // Ensure that "" gets returned properly.\n if (ret != null) {\n return ret;\n }\n if (oldRet != null) {\n return oldRet;\n }\n // returns undefined.\n };\n \n wnd.onunload = function(evt) {\n try {\n unload();\n } finally {\n oldOnUnload && oldOnUnload(evt);\n wnd.onresize = null;\n wnd.onscroll = null;\n wnd.onbeforeunload = null;\n wnd.onunload = null;\n }\n };\n \n // Remove the reference once we\'ve initialize the handler\n wnd.__gwt_initWindowCloseHandler = undefined;\n}\n');
}
function $createSpanElement(this$static){
return ($clinit_DOMImpl() , this$static).createElement('span');
}
function $createTBodyElement(this$static){
return ($clinit_DOMImpl() , this$static).createElement('tbody');
}
function $createTDElement(this$static){
return ($clinit_DOMImpl() , this$static).createElement('td');
}
function $createTFootElement(this$static){
return ($clinit_DOMImpl() , this$static).createElement('tfoot');
}
function $createTHeadElement(this$static){
return ($clinit_DOMImpl() , this$static).createElement('thead');
}
function $createTRElement(this$static){
return ($clinit_DOMImpl() , this$static).createElement('tr');
}
function $createTableElement(this$static){
return ($clinit_DOMImpl() , this$static).createElement('table');
}
function $createTextInputElement(this$static){
var e;
return e = ($clinit_DOMImpl() , this$static).createElement('INPUT') , e.type = 'text' , e;
}
function $createUniqueId(this$static){
!this$static.gwt_uid && (this$static.gwt_uid = 1);
return 'gwt-uid-' + this$static.gwt_uid++;
}
function $getViewportElement(this$static){
return $equals_2(this$static.compatMode, 'CSS1Compat')?this$static.documentElement:this$static.body;
}
function $setChecked(this$static, checked){
this$static.checked = checked;
}
function $setDefaultChecked(this$static, defaultChecked){
this$static.defaultChecked = defaultChecked;
}
function $setDisabled(this$static, disabled){
this$static.disabled = disabled;
}
function $setHtmlFor(this$static, htmlFor){
this$static.htmlFor = htmlFor;
}
function $getButton(this$static){
return ($clinit_DOMImpl() , impl_0).eventGetButton(this$static);
}
function $getEventTarget(this$static){
return ($clinit_DOMImpl() , impl_0).eventGetTarget(this$static);
}
function $getKeyCode(this$static){
return ($clinit_DOMImpl() , this$static).keyCode | 0;
}
function $getShiftKey(this$static){
return !!($clinit_DOMImpl() , this$static).shiftKey;
}
function $getTouches(this$static){
return ($clinit_DOMImpl() , this$static).touches;
}
function $getType(this$static){
return ($clinit_DOMImpl() , this$static).type;
}
function $preventDefault(this$static){
($clinit_DOMImpl() , impl_0).eventPreventDefault(this$static);
}
function $stopPropagation(this$static){
($clinit_DOMImpl() , this$static).stopPropagation();
}
function $getDisplay(this$static){
return ($clinit_DOMImpl() , this$static)['display'];
}
function $getHeight(this$static){
return ($clinit_DOMImpl() , this$static)['height'];
}
function $getOpacity(this$static){
return ($clinit_DOMImpl() , this$static)['opacity'];
}
function $getProperty(this$static, name_0){
return ($clinit_DOMImpl() , this$static)[name_0];
}
function $getWidth(this$static){
return ($clinit_DOMImpl() , this$static)['width'];
}
function $compareTo(this$static, other){
return this$static.ordinal - other.ordinal;
}
function $name(this$static){
return this$static.name_1 != null?this$static.name_1:'' + this$static.ordinal;
}
function Enum(name_0, ordinal){
this.name_1 = name_0;
this.ordinal = ordinal;
}
function createValueOfMap(enumConstants){
var result, value_0, value$index, value$max;
result = {};
for (value$index = 0 , value$max = enumConstants.length; value$index < value$max; ++value$index) {
value_0 = enumConstants[value$index];
result[':' + (value_0.name_1 != null?value_0.name_1:'' + value_0.ordinal)] = value_0;
}
return result;
}
function valueOf(map_0, name_0){
var result;
checkCriticalNotNull(name_0);
result = map_0[':' + name_0];
checkCriticalArgument_0(!!result, 'Enum constant undefined: %s', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [name_0]));
return result;
}
defineClass(5, 1, {3:1, 6:1, 5:1});
_.compareTo = function(other){
return $compareTo(this, castTo(other, 5));
}
;
_.equals = function(other){
return this === other;
}
;
_.hashCode = function(){
return getObjectIdentityHashCode(this);
}
;
_.toString_0 = function(){
return this.name_1 != null?this.name_1:'' + this.ordinal;
}
;
_.ordinal = 0;
var Ljava_lang_Enum_2_classLit = createForClass('java.lang', 'Enum', 5);
function $clinit_Style$Display(){
$clinit_Style$Display = emptyMethod;
NONE = new Style$Display$1;
BLOCK = new Style$Display$2;
INLINE = new Style$Display$3;
INLINE_BLOCK = new Style$Display$4;
INLINE_TABLE = new Style$Display$5;
LIST_ITEM = new Style$Display$6;
RUN_IN = new Style$Display$7;
TABLE = new Style$Display$8;
TABLE_CAPTION = new Style$Display$9;
TABLE_COLUMN_GROUP = new Style$Display$10;
TABLE_HEADER_GROUP = new Style$Display$11;
TABLE_FOOTER_GROUP = new Style$Display$12;
TABLE_ROW_GROUP = new Style$Display$13;
TABLE_CELL = new Style$Display$14;
TABLE_COLUMN = new Style$Display$15;
TABLE_ROW = new Style$Display$16;
INITIAL = new Style$Display$17;
}
function Style$Display(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_0(){
$clinit_Style$Display();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_dom_client_Style$Display_2_classLit, 1), $intern_0, 18, 0, [NONE, BLOCK, INLINE, INLINE_BLOCK, INLINE_TABLE, LIST_ITEM, RUN_IN, TABLE, TABLE_CAPTION, TABLE_COLUMN_GROUP, TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, TABLE_ROW_GROUP, TABLE_CELL, TABLE_COLUMN, TABLE_ROW, INITIAL]);
}
defineClass(18, 5, $intern_5);
var BLOCK, INITIAL, INLINE, INLINE_BLOCK, INLINE_TABLE, LIST_ITEM, NONE, RUN_IN, TABLE, TABLE_CAPTION, TABLE_CELL, TABLE_COLUMN, TABLE_COLUMN_GROUP, TABLE_FOOTER_GROUP, TABLE_HEADER_GROUP, TABLE_ROW, TABLE_ROW_GROUP;
var Lcom_google_gwt_dom_client_Style$Display_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display', 18, values_0);
function Style$Display$1(){
Style$Display.call(this, 'NONE', 0);
}
defineClass(399, 18, $intern_5, Style$Display$1);
var Lcom_google_gwt_dom_client_Style$Display$1_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/1', 399, null);
function Style$Display$10(){
Style$Display.call(this, 'TABLE_COLUMN_GROUP', 9);
}
defineClass(408, 18, $intern_5, Style$Display$10);
var Lcom_google_gwt_dom_client_Style$Display$10_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/10', 408, null);
function Style$Display$11(){
Style$Display.call(this, 'TABLE_HEADER_GROUP', 10);
}
defineClass(409, 18, $intern_5, Style$Display$11);
var Lcom_google_gwt_dom_client_Style$Display$11_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/11', 409, null);
function Style$Display$12(){
Style$Display.call(this, 'TABLE_FOOTER_GROUP', 11);
}
defineClass(410, 18, $intern_5, Style$Display$12);
var Lcom_google_gwt_dom_client_Style$Display$12_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/12', 410, null);
function Style$Display$13(){
Style$Display.call(this, 'TABLE_ROW_GROUP', 12);
}
defineClass(411, 18, $intern_5, Style$Display$13);
var Lcom_google_gwt_dom_client_Style$Display$13_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/13', 411, null);
function Style$Display$14(){
Style$Display.call(this, 'TABLE_CELL', 13);
}
defineClass(412, 18, $intern_5, Style$Display$14);
var Lcom_google_gwt_dom_client_Style$Display$14_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/14', 412, null);
function Style$Display$15(){
Style$Display.call(this, 'TABLE_COLUMN', 14);
}
defineClass(413, 18, $intern_5, Style$Display$15);
var Lcom_google_gwt_dom_client_Style$Display$15_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/15', 413, null);
function Style$Display$16(){
Style$Display.call(this, 'TABLE_ROW', 15);
}
defineClass(414, 18, $intern_5, Style$Display$16);
var Lcom_google_gwt_dom_client_Style$Display$16_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/16', 414, null);
function Style$Display$17(){
Style$Display.call(this, 'INITIAL', 16);
}
defineClass(415, 18, $intern_5, Style$Display$17);
var Lcom_google_gwt_dom_client_Style$Display$17_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/17', 415, null);
function Style$Display$2(){
Style$Display.call(this, 'BLOCK', 1);
}
defineClass(400, 18, $intern_5, Style$Display$2);
var Lcom_google_gwt_dom_client_Style$Display$2_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/2', 400, null);
function Style$Display$3(){
Style$Display.call(this, 'INLINE', 2);
}
defineClass(401, 18, $intern_5, Style$Display$3);
var Lcom_google_gwt_dom_client_Style$Display$3_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/3', 401, null);
function Style$Display$4(){
Style$Display.call(this, 'INLINE_BLOCK', 3);
}
defineClass(402, 18, $intern_5, Style$Display$4);
var Lcom_google_gwt_dom_client_Style$Display$4_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/4', 402, null);
function Style$Display$5(){
Style$Display.call(this, 'INLINE_TABLE', 4);
}
defineClass(403, 18, $intern_5, Style$Display$5);
var Lcom_google_gwt_dom_client_Style$Display$5_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/5', 403, null);
function Style$Display$6(){
Style$Display.call(this, 'LIST_ITEM', 5);
}
defineClass(404, 18, $intern_5, Style$Display$6);
var Lcom_google_gwt_dom_client_Style$Display$6_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/6', 404, null);
function Style$Display$7(){
Style$Display.call(this, 'RUN_IN', 6);
}
defineClass(405, 18, $intern_5, Style$Display$7);
var Lcom_google_gwt_dom_client_Style$Display$7_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/7', 405, null);
function Style$Display$8(){
Style$Display.call(this, 'TABLE', 7);
}
defineClass(406, 18, $intern_5, Style$Display$8);
var Lcom_google_gwt_dom_client_Style$Display$8_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/8', 406, null);
function Style$Display$9(){
Style$Display.call(this, 'TABLE_CAPTION', 8);
}
defineClass(407, 18, $intern_5, Style$Display$9);
var Lcom_google_gwt_dom_client_Style$Display$9_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Display/9', 407, null);
function $clinit_Style$Overflow(){
$clinit_Style$Overflow = emptyMethod;
VISIBLE = new Style$Overflow$1;
HIDDEN = new Style$Overflow$2;
SCROLL = new Style$Overflow$3;
AUTO = new Style$Overflow$4;
}
function Style$Overflow(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_1(){
$clinit_Style$Overflow();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_dom_client_Style$Overflow_2_classLit, 1), $intern_0, 69, 0, [VISIBLE, HIDDEN, SCROLL, AUTO]);
}
defineClass(69, 5, $intern_6);
var AUTO, HIDDEN, SCROLL, VISIBLE;
var Lcom_google_gwt_dom_client_Style$Overflow_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Overflow', 69, values_1);
function Style$Overflow$1(){
Style$Overflow.call(this, 'VISIBLE', 0);
}
defineClass(416, 69, $intern_6, Style$Overflow$1);
var Lcom_google_gwt_dom_client_Style$Overflow$1_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Overflow/1', 416, null);
function Style$Overflow$2(){
Style$Overflow.call(this, 'HIDDEN', 1);
}
defineClass(417, 69, $intern_6, Style$Overflow$2);
var Lcom_google_gwt_dom_client_Style$Overflow$2_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Overflow/2', 417, null);
function Style$Overflow$3(){
Style$Overflow.call(this, 'SCROLL', 2);
}
defineClass(418, 69, $intern_6, Style$Overflow$3);
var Lcom_google_gwt_dom_client_Style$Overflow$3_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Overflow/3', 418, null);
function Style$Overflow$4(){
Style$Overflow.call(this, 'AUTO', 3);
}
defineClass(419, 69, $intern_6, Style$Overflow$4);
var Lcom_google_gwt_dom_client_Style$Overflow$4_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Overflow/4', 419, null);
function $clinit_Style$TextAlign(){
$clinit_Style$TextAlign = emptyMethod;
CENTER = new Style$TextAlign$1;
JUSTIFY = new Style$TextAlign$2;
LEFT = new Style$TextAlign$3;
RIGHT = new Style$TextAlign$4;
}
function Style$TextAlign(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_2(){
$clinit_Style$TextAlign();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_dom_client_Style$TextAlign_2_classLit, 1), $intern_0, 70, 0, [CENTER, JUSTIFY, LEFT, RIGHT]);
}
defineClass(70, 5, $intern_7);
var CENTER, JUSTIFY, LEFT, RIGHT;
var Lcom_google_gwt_dom_client_Style$TextAlign_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/TextAlign', 70, values_2);
function Style$TextAlign$1(){
Style$TextAlign.call(this, 'CENTER', 0);
}
defineClass(420, 70, $intern_7, Style$TextAlign$1);
var Lcom_google_gwt_dom_client_Style$TextAlign$1_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/TextAlign/1', 420, null);
function Style$TextAlign$2(){
Style$TextAlign.call(this, 'JUSTIFY', 1);
}
defineClass(421, 70, $intern_7, Style$TextAlign$2);
var Lcom_google_gwt_dom_client_Style$TextAlign$2_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/TextAlign/2', 421, null);
function Style$TextAlign$3(){
Style$TextAlign.call(this, 'LEFT', 2);
}
defineClass(422, 70, $intern_7, Style$TextAlign$3);
var Lcom_google_gwt_dom_client_Style$TextAlign$3_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/TextAlign/3', 422, null);
function Style$TextAlign$4(){
Style$TextAlign.call(this, 'RIGHT', 3);
}
defineClass(423, 70, $intern_7, Style$TextAlign$4);
var Lcom_google_gwt_dom_client_Style$TextAlign$4_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/TextAlign/4', 423, null);
function $clinit_Style$TextOverflow(){
$clinit_Style$TextOverflow = emptyMethod;
CLIP = new Style$TextOverflow$1;
ELLIPSIS = new Style$TextOverflow$2;
}
function Style$TextOverflow(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_3(){
$clinit_Style$TextOverflow();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_dom_client_Style$TextOverflow_2_classLit, 1), $intern_0, 109, 0, [CLIP, ELLIPSIS]);
}
defineClass(109, 5, $intern_8);
var CLIP, ELLIPSIS;
var Lcom_google_gwt_dom_client_Style$TextOverflow_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/TextOverflow', 109, values_3);
function Style$TextOverflow$1(){
Style$TextOverflow.call(this, 'CLIP', 0);
}
defineClass(424, 109, $intern_8, Style$TextOverflow$1);
var Lcom_google_gwt_dom_client_Style$TextOverflow$1_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/TextOverflow/1', 424, null);
function Style$TextOverflow$2(){
Style$TextOverflow.call(this, 'ELLIPSIS', 1);
}
defineClass(425, 109, $intern_8, Style$TextOverflow$2);
var Lcom_google_gwt_dom_client_Style$TextOverflow$2_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/TextOverflow/2', 425, null);
function $clinit_Style$Unit(){
$clinit_Style$Unit = emptyMethod;
PX = new Style$Unit$1;
PCT = new Style$Unit$2;
EM = new Style$Unit$3;
EX = new Style$Unit$4;
PT = new Style$Unit$5;
PC = new Style$Unit$6;
IN = new Style$Unit$7;
CM = new Style$Unit$8;
MM = new Style$Unit$9;
}
function Style$Unit(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_4(){
$clinit_Style$Unit();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_dom_client_Style$Unit_2_classLit, 1), $intern_0, 37, 0, [PX, PCT, EM, EX, PT, PC, IN, CM, MM]);
}
defineClass(37, 5, $intern_9);
var CM, EM, EX, IN, MM, PC, PCT, PT, PX;
var Lcom_google_gwt_dom_client_Style$Unit_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Unit', 37, values_4);
function Style$Unit$1(){
Style$Unit.call(this, 'PX', 0);
}
defineClass(390, 37, $intern_9, Style$Unit$1);
var Lcom_google_gwt_dom_client_Style$Unit$1_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Unit/1', 390, null);
function Style$Unit$2(){
Style$Unit.call(this, 'PCT', 1);
}
defineClass(391, 37, $intern_9, Style$Unit$2);
var Lcom_google_gwt_dom_client_Style$Unit$2_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Unit/2', 391, null);
function Style$Unit$3(){
Style$Unit.call(this, 'EM', 2);
}
defineClass(392, 37, $intern_9, Style$Unit$3);
var Lcom_google_gwt_dom_client_Style$Unit$3_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Unit/3', 392, null);
function Style$Unit$4(){
Style$Unit.call(this, 'EX', 3);
}
defineClass(393, 37, $intern_9, Style$Unit$4);
var Lcom_google_gwt_dom_client_Style$Unit$4_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Unit/4', 393, null);
function Style$Unit$5(){
Style$Unit.call(this, 'PT', 4);
}
defineClass(394, 37, $intern_9, Style$Unit$5);
var Lcom_google_gwt_dom_client_Style$Unit$5_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Unit/5', 394, null);
function Style$Unit$6(){
Style$Unit.call(this, 'PC', 5);
}
defineClass(395, 37, $intern_9, Style$Unit$6);
var Lcom_google_gwt_dom_client_Style$Unit$6_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Unit/6', 395, null);
function Style$Unit$7(){
Style$Unit.call(this, 'IN', 6);
}
defineClass(396, 37, $intern_9, Style$Unit$7);
var Lcom_google_gwt_dom_client_Style$Unit$7_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Unit/7', 396, null);
function Style$Unit$8(){
Style$Unit.call(this, 'CM', 7);
}
defineClass(397, 37, $intern_9, Style$Unit$8);
var Lcom_google_gwt_dom_client_Style$Unit$8_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Unit/8', 397, null);
function Style$Unit$9(){
Style$Unit.call(this, 'MM', 8);
}
defineClass(398, 37, $intern_9, Style$Unit$9);
var Lcom_google_gwt_dom_client_Style$Unit$9_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Unit/9', 398, null);
function $clinit_Style$Visibility(){
$clinit_Style$Visibility = emptyMethod;
VISIBLE_0 = new Style$Visibility$1;
HIDDEN_0 = new Style$Visibility$2;
}
function Style$Visibility(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_5(){
$clinit_Style$Visibility();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_dom_client_Style$Visibility_2_classLit, 1), $intern_0, 110, 0, [VISIBLE_0, HIDDEN_0]);
}
defineClass(110, 5, $intern_10);
var HIDDEN_0, VISIBLE_0;
var Lcom_google_gwt_dom_client_Style$Visibility_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Visibility', 110, values_5);
function Style$Visibility$1(){
Style$Visibility.call(this, 'VISIBLE', 0);
}
defineClass(426, 110, $intern_10, Style$Visibility$1);
var Lcom_google_gwt_dom_client_Style$Visibility$1_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Visibility/1', 426, null);
function Style$Visibility$2(){
Style$Visibility.call(this, 'HIDDEN', 1);
}
defineClass(427, 110, $intern_10, Style$Visibility$2);
var Lcom_google_gwt_dom_client_Style$Visibility$2_2_classLit = createForEnum('com.google.gwt.dom.client', 'Style/Visibility/2', 427, null);
function $setColSpan(this$static, colSpan){
this$static.colSpan = colSpan;
}
function $getClientX(this$static){
return toInt32(($clinit_DOMImpl() , this$static).clientX || 0);
}
function $getClientY(this$static){
return toInt32(($clinit_DOMImpl() , this$static).clientY || 0);
}
function $getPageX(this$static){
return toInt32(($clinit_DOMImpl() , this$static).pageX || 0);
}
function $getPageY(this$static){
return toInt32(($clinit_DOMImpl() , this$static).pageY || 0);
}
defineClass(699, 1, {});
_.toString_0 = function(){
return 'An event type';
}
;
var Lcom_google_web_bindery_event_shared_Event_2_classLit = createForClass('com.google.web.bindery.event.shared', 'Event', 699);
function $overrideSource(this$static, source){
this$static.source_0 = source;
}
defineClass(700, 699, {});
_.getSource = function(){
return this.source_0;
}
;
_.revive = function(){
this.dead = false;
this.source_0 = null;
}
;
_.dead = false;
var Lcom_google_gwt_event_shared_GwtEvent_2_classLit = createForClass('com.google.gwt.event.shared', 'GwtEvent', 700);
function $setNativeEvent(this$static, nativeEvent){
this$static.nativeEvent = nativeEvent;
}
function $setRelativeElement(this$static, relativeElem){
this$static.relativeElem = relativeElem;
}
function fireNativeEvent(nativeEvent, handlerSource, relativeElem){
var currentNative, currentRelativeElem, type_0, type$iterator, types;
if (registered) {
types = castTo($unsafeGet(registered, ($clinit_DOMImpl() , nativeEvent).type), 39);
if (types) {
for (type$iterator = types.iterator(); type$iterator.hasNext_0();) {
type_0 = castTo(type$iterator.next_1(), 68);
currentNative = type_0.flyweight.nativeEvent;
currentRelativeElem = type_0.flyweight.relativeElem;
$setNativeEvent(type_0.flyweight, nativeEvent);
$setRelativeElement(type_0.flyweight, relativeElem);
$fireEvent_0(handlerSource, type_0.flyweight);
$setNativeEvent(type_0.flyweight, currentNative);
$setRelativeElement(type_0.flyweight, currentRelativeElem);
}
}
}
}
defineClass(714, 700, {});
_.getAssociatedType = function(){
return this.getAssociatedType_0();
}
;
var registered;
var Lcom_google_gwt_event_dom_client_DomEvent_2_classLit = createForClass('com.google.gwt.event.dom.client', 'DomEvent', 714);
function $clinit_BlurEvent(){
$clinit_BlurEvent = emptyMethod;
TYPE = new DomEvent$Type('blur', new BlurEvent);
}
function BlurEvent(){
}
defineClass(667, 714, {}, BlurEvent);
_.dispatch = function(handler){
$selectItem(castTo(handler, 744).this$01, null);
}
;
_.getAssociatedType_0 = function(){
return TYPE;
}
;
var TYPE;
var Lcom_google_gwt_event_dom_client_BlurEvent_2_classLit = createForClass('com.google.gwt.event.dom.client', 'BlurEvent', 667);
defineClass(716, 714, {});
var Lcom_google_gwt_event_dom_client_HumanInputEvent_2_classLit = createForClass('com.google.gwt.event.dom.client', 'HumanInputEvent', 716);
defineClass(717, 716, {});
var Lcom_google_gwt_event_dom_client_MouseEvent_2_classLit = createForClass('com.google.gwt.event.dom.client', 'MouseEvent', 717);
function $clinit_ClickEvent(){
$clinit_ClickEvent = emptyMethod;
TYPE_0 = new DomEvent$Type('click', new ClickEvent);
}
function ClickEvent(){
}
defineClass(576, 717, {}, ClickEvent);
_.dispatch = function(handler){
castTo(handler, 87).onClick(this);
}
;
_.getAssociatedType_0 = function(){
return TYPE_0;
}
;
var TYPE_0;
var Lcom_google_gwt_event_dom_client_ClickEvent_2_classLit = createForClass('com.google.gwt.event.dom.client', 'ClickEvent', 576);
defineClass(334, 1, {});
_.hashCode = function(){
return this.index_0;
}
;
_.toString_0 = function(){
return 'Event type';
}
;
_.index_0 = 0;
var nextHashCode = 0;
var Lcom_google_web_bindery_event_shared_Event$Type_2_classLit = createForClass('com.google.web.bindery.event.shared', 'Event/Type', 334);
function GwtEvent$Type(){
this.index_0 = ++nextHashCode;
}
defineClass(45, 334, {}, GwtEvent$Type);
var Lcom_google_gwt_event_shared_GwtEvent$Type_2_classLit = createForClass('com.google.gwt.event.shared', 'GwtEvent/Type', 45);
function DomEvent$Type(eventName, flyweight){
var types;
GwtEvent$Type.call(this);
this.flyweight = flyweight;
!registered && (registered = new PrivateMap);
types = castTo($unsafeGet(registered, eventName), 39);
if (!types) {
types = new ArrayList;
$unsafePut(registered, eventName, types);
}
types.add_2(this);
this.name_0 = eventName;
}
defineClass(68, 45, {68:1}, DomEvent$Type);
var Lcom_google_gwt_event_dom_client_DomEvent$Type_2_classLit = createForClass('com.google.gwt.event.dom.client', 'DomEvent/Type', 68);
function $clinit_FocusEvent(){
$clinit_FocusEvent = emptyMethod;
TYPE_1 = new DomEvent$Type('focus', new FocusEvent_0);
}
function FocusEvent_0(){
}
defineClass(668, 714, {}, FocusEvent_0);
_.dispatch = function(handler){
castTo(handler, 681).onFocus(this);
}
;
_.getAssociatedType_0 = function(){
return TYPE_1;
}
;
var TYPE_1;
var Lcom_google_gwt_event_dom_client_FocusEvent_2_classLit = createForClass('com.google.gwt.event.dom.client', 'FocusEvent', 668);
defineClass(715, 714, {});
var Lcom_google_gwt_event_dom_client_KeyEvent_2_classLit = createForClass('com.google.gwt.event.dom.client', 'KeyEvent', 715);
defineClass(722, 715, {});
var Lcom_google_gwt_event_dom_client_KeyCodeEvent_2_classLit = createForClass('com.google.gwt.event.dom.client', 'KeyCodeEvent', 722);
function $clinit_KeyDownEvent(){
$clinit_KeyDownEvent = emptyMethod;
TYPE_2 = new DomEvent$Type('keydown', new KeyDownEvent);
}
function $dispatch(this$static, handler){
$getKeyCode(this$static.nativeEvent) == 27 && $close(handler.this$11);
}
function KeyDownEvent(){
}
defineClass(567, 722, {}, KeyDownEvent);
_.dispatch = function(handler){
$dispatch(this, castTo(handler, 745));
}
;
_.getAssociatedType_0 = function(){
return TYPE_2;
}
;
var TYPE_2;
var Lcom_google_gwt_event_dom_client_KeyDownEvent_2_classLit = createForClass('com.google.gwt.event.dom.client', 'KeyDownEvent', 567);
function $clinit_MouseDownEvent(){
$clinit_MouseDownEvent = emptyMethod;
TYPE_3 = new DomEvent$Type('mousedown', new MouseDownEvent);
}
function $dispatch_0(this$static, handler){
$getButton(this$static.nativeEvent) == 1 && $startDragSelect(handler.this$01, this$static.nativeEvent, $getElement(handler.checkBox));
}
function MouseDownEvent(){
}
defineClass(676, 717, {}, MouseDownEvent);
_.dispatch = function(handler){
$dispatch_0(this, castTo(handler, 748));
}
;
_.getAssociatedType_0 = function(){
return TYPE_3;
}
;
var TYPE_3;
var Lcom_google_gwt_event_dom_client_MouseDownEvent_2_classLit = createForClass('com.google.gwt.event.dom.client', 'MouseDownEvent', 676);
function $unsafeGet(this$static, key){
return this$static.map_0[key];
}
function $unsafePut(this$static, key, value_0){
this$static.map_0[key] = value_0;
}
function PrivateMap(){
this.map_0 = {};
}
defineClass(651, 1, {}, PrivateMap);
var Lcom_google_gwt_event_dom_client_PrivateMap_2_classLit = createForClass('com.google.gwt.event.dom.client', 'PrivateMap', 651);
defineClass(727, 716, {});
var Lcom_google_gwt_event_dom_client_TouchEvent_2_classLit = createForClass('com.google.gwt.event.dom.client', 'TouchEvent', 727);
function $clinit_TouchStartEvent(){
$clinit_TouchStartEvent = emptyMethod;
TYPE_4 = new DomEvent$Type('touchstart', new TouchStartEvent);
}
function $dispatch_1(this$static, handler){
$startDragSelect(handler.this$01, this$static.nativeEvent, $getElement(handler.checkBox));
}
function TouchStartEvent(){
}
defineClass(677, 727, {}, TouchStartEvent);
_.dispatch = function(handler){
$dispatch_1(this, castTo(handler, 749));
}
;
_.getAssociatedType_0 = function(){
return TYPE_4;
}
;
var TYPE_4;
var Lcom_google_gwt_event_dom_client_TouchStartEvent_2_classLit = createForClass('com.google.gwt.event.dom.client', 'TouchStartEvent', 677);
function CloseEvent_0(){
}
function fire(source){
var event_0;
if (TYPE_5) {
event_0 = new CloseEvent_0;
$fireEvent(source, event_0);
}
}
defineClass(654, 700, {}, CloseEvent_0);
_.dispatch = function(handler){
castTo(handler, 751);
detachWidgets();
}
;
_.getAssociatedType = function(){
return TYPE_5;
}
;
var TYPE_5;
var Lcom_google_gwt_event_logical_shared_CloseEvent_2_classLit = createForClass('com.google.gwt.event.logical.shared', 'CloseEvent', 654);
function ValueChangeEvent(value_0){
this.value_0 = value_0;
}
function fire_0(source, value_0){
var event_0;
if (TYPE_6) {
event_0 = new ValueChangeEvent(value_0);
!!source.handlerManager && $fireEvent(source.handlerManager, event_0);
}
}
defineClass(519, 700, {}, ValueChangeEvent);
_.dispatch = function(handler){
castTo(handler, 742).onValueChange(this);
}
;
_.getAssociatedType = function(){
return TYPE_6;
}
;
var TYPE_6;
var Lcom_google_gwt_event_logical_shared_ValueChangeEvent_2_classLit = createForClass('com.google.gwt.event.logical.shared', 'ValueChangeEvent', 519);
function $addHandler(this$static, type_0, handler){
return new LegacyHandlerWrapper($doAdd(this$static.eventBus, type_0, handler));
}
function $fireEvent(this$static, event_0){
var e, oldSource;
!event_0.dead || event_0.revive();
oldSource = event_0.getSource();
$overrideSource(event_0, this$static.source_0);
try {
$doFire(this$static.eventBus, event_0);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 106)) {
e = $e0;
throw new UmbrellaException_0(e.causes);
}
else
throw unwrap($e0);
}
finally {
oldSource == null?(event_0.dead = true , event_0.source_0 = null):(event_0.source_0 = oldSource);
}
}
function $isEventHandled(this$static, e){
return $isEventHandled_0(this$static.eventBus, e);
}
function HandlerManager(source){
HandlerManager_0.call(this, source, false);
}
function HandlerManager_0(source, fireInReverseOrder){
this.eventBus = new HandlerManager$Bus(fireInReverseOrder);
this.source_0 = source;
}
defineClass(73, 1, {29:1}, HandlerManager, HandlerManager_0);
var Lcom_google_gwt_event_shared_HandlerManager_2_classLit = createForClass('com.google.gwt.event.shared', 'HandlerManager', 73);
defineClass(706, 1, {});
var Lcom_google_web_bindery_event_shared_EventBus_2_classLit = createForClass('com.google.web.bindery.event.shared', 'EventBus', 706);
function $defer(this$static, command){
!this$static.deferredDeltas && (this$static.deferredDeltas = new ArrayList);
$add_7(this$static.deferredDeltas, command);
}
function $doAdd(this$static, type_0, handler){
var l;
if (!type_0) {
throw new NullPointerException_0('Cannot add a handler with a null type');
}
this$static.firingDepth > 0?$defer(this$static, new SimpleEventBus$2(this$static, type_0, handler)):(l = $ensureHandlerList(this$static, type_0, null) , l.add_2(handler));
return new SimpleEventBus$1(this$static, type_0, handler);
}
function $doAddNow(this$static, type_0, source, handler){
var l;
l = $ensureHandlerList(this$static, type_0, source);
l.add_2(handler);
}
function $doFire(this$static, event_0){
var causes, directHandlers, e, handler, handlers, it;
if (!event_0) {
throw new NullPointerException_0('Cannot fire null event');
}
try {
++this$static.firingDepth;
handlers = (directHandlers = $getHandlerList(this$static, event_0.getAssociatedType(), null) , directHandlers);
causes = null;
it = this$static.isReverseOrder?handlers.listIterator_0(handlers.size_2()):handlers.listIterator();
while (this$static.isReverseOrder?it.hasPrevious():it.hasNext_0()) {
handler = this$static.isReverseOrder?it.previous():it.next_1();
try {
event_0.dispatch(castTo(handler, 15));
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 13)) {
e = $e0;
!causes && (causes = new HashSet);
causes.map_0.put(e, causes);
}
else
throw unwrap($e0);
}
}
if (causes) {
throw new UmbrellaException(causes);
}
}
finally {
--this$static.firingDepth;
this$static.firingDepth == 0 && $handleQueuedAddsAndRemoves(this$static);
}
}
function $doRemoveNow(this$static, type_0, source, handler){
var l, removed, sourceMap;
l = $getHandlerList(this$static, type_0, source);
removed = l.remove_3(handler);
removed && l.isEmpty() && (sourceMap = castTo($get_5(this$static.map_0, type_0), 62) , castTo(sourceMap.remove_1(source), 39) , sourceMap.isEmpty() && $remove_6(this$static.map_0, type_0) , undefined);
}
function $ensureHandlerList(this$static, type_0, source){
var handlers, sourceMap;
sourceMap = castTo($get_5(this$static.map_0, type_0), 62);
if (!sourceMap) {
sourceMap = new HashMap;
$put_2(this$static.map_0, type_0, sourceMap);
}
handlers = castTo(sourceMap.get_0(source), 39);
if (!handlers) {
handlers = new ArrayList;
sourceMap.put(source, handlers);
}
return handlers;
}
function $getHandlerList(this$static, type_0, source){
var handlers, sourceMap;
sourceMap = castTo($get_5(this$static.map_0, type_0), 62);
if (!sourceMap) {
return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST;
}
handlers = castTo(sourceMap.get_0(source), 39);
if (!handlers) {
return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST;
}
return handlers;
}
function $handleQueuedAddsAndRemoves(this$static){
var c, c$iterator;
if (this$static.deferredDeltas) {
try {
for (c$iterator = new ArrayList$1(this$static.deferredDeltas); c$iterator.i < c$iterator.this$01.array.length;) {
c = castTo($next_3(c$iterator), 684);
c.execute_1();
}
}
finally {
this$static.deferredDeltas = null;
}
}
}
function $isEventHandled_0(this$static, eventKey){
return $containsKey(this$static.map_0, eventKey);
}
defineClass(438, 706, {});
_.firingDepth = 0;
_.isReverseOrder = false;
var Lcom_google_web_bindery_event_shared_SimpleEventBus_2_classLit = createForClass('com.google.web.bindery.event.shared', 'SimpleEventBus', 438);
function $doRemove(this$static, type_0, source, handler){
this$static.firingDepth > 0?$defer(this$static, new SimpleEventBus$3(this$static, type_0, source, handler)):$doRemoveNow(this$static, type_0, source, handler);
}
function HandlerManager$Bus(fireInReverseOrder){
this.map_0 = new HashMap;
this.isReverseOrder = fireInReverseOrder;
}
defineClass(439, 438, {}, HandlerManager$Bus);
var Lcom_google_gwt_event_shared_HandlerManager$Bus_2_classLit = createForClass('com.google.gwt.event.shared', 'HandlerManager/Bus', 439);
function LegacyHandlerWrapper(real){
this.real = real;
}
defineClass(556, 1, {740:1}, LegacyHandlerWrapper);
var Lcom_google_gwt_event_shared_LegacyHandlerWrapper_2_classLit = createForClass('com.google.gwt.event.shared', 'LegacyHandlerWrapper', 556);
function UmbrellaException(causes){
var cause, cause$iterator, i_0;
RuntimeException_1.call(this, makeMessage(causes), causes.isEmpty()?null:castTo(causes.iterator().next_1(), 13));
this.causes = causes;
i_0 = 0;
for (cause$iterator = causes.iterator(); cause$iterator.hasNext_0();) {
cause = castTo(cause$iterator.next_1(), 13);
if (i_0++ == 0) {
continue;
}
$addSuppressed(this, cause);
}
}
function makeMessage(causes){
var b, count, first, t, t$iterator;
count = causes.size_2();
if (count == 0) {
return null;
}
b = new StringBuilder_1(count == 1?'Exception caught: ':count + ' exceptions caught: ');
first = true;
for (t$iterator = causes.iterator(); t$iterator.hasNext_0();) {
t = castTo(t$iterator.next_1(), 13);
first?(first = false):(b.string += '; ' , b);
$append_1(b, t.getMessage());
}
return b.string;
}
defineClass(106, 12, $intern_11, UmbrellaException);
var Lcom_google_web_bindery_event_shared_UmbrellaException_2_classLit = createForClass('com.google.web.bindery.event.shared', 'UmbrellaException', 106);
function UmbrellaException_0(causes){
UmbrellaException.call(this, causes);
}
defineClass(205, 106, $intern_11, UmbrellaException_0);
var Lcom_google_gwt_event_shared_UmbrellaException_2_classLit = createForClass('com.google.gwt.event.shared', 'UmbrellaException', 205);
function getDirectionOnElement(elem){
var dirPropertyValue;
dirPropertyValue = $getPropertyString(elem, 'dir');
if (equalsIgnoreCase('rtl', dirPropertyValue)) {
return $clinit_HasDirection$Direction() , RTL;
}
else if (equalsIgnoreCase('ltr', dirPropertyValue)) {
return $clinit_HasDirection$Direction() , LTR;
}
return $clinit_HasDirection$Direction() , DEFAULT;
}
function setDirectionOnElement(elem, direction){
switch (direction.ordinal) {
case 0:
{
elem['dir'] = 'rtl';
break;
}
case 1:
{
elem['dir'] = 'ltr';
break;
}
case 2:
{
getDirectionOnElement(elem) != ($clinit_HasDirection$Direction() , DEFAULT) && (elem['dir'] = '' , undefined);
break;
}
}
}
function $clinit_HasDirection$Direction(){
$clinit_HasDirection$Direction = emptyMethod;
RTL = new HasDirection$Direction('RTL', 0);
LTR = new HasDirection$Direction('LTR', 1);
DEFAULT = new HasDirection$Direction('DEFAULT', 2);
}
function HasDirection$Direction(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_6(){
$clinit_HasDirection$Direction();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_i18n_client_HasDirection$Direction_2_classLit, 1), $intern_0, 126, 0, [RTL, LTR, DEFAULT]);
}
defineClass(126, 5, {126:1, 3:1, 6:1, 5:1}, HasDirection$Direction);
var DEFAULT, LTR, RTL;
var Lcom_google_gwt_i18n_client_HasDirection$Direction_2_classLit = createForEnum('com.google.gwt.i18n.client', 'HasDirection/Direction', 126, values_6);
defineClass(724, 1, {});
_.isString = function(){
return null;
}
;
var Lcom_google_gwt_json_client_JSONValue_2_classLit = createForClass('com.google.gwt.json.client', 'JSONValue', 724);
function JSONArray(arr){
this.jsArray = arr;
}
defineClass(192, 724, {192:1}, JSONArray);
_.equals = function(other){
if (!instanceOf(other, 192)) {
return false;
}
return this.jsArray == castTo(other, 192).jsArray;
}
;
_.hashCode = function(){
return getObjectIdentityHashCode(this.jsArray);
}
;
_.toString_0 = function(){
var c, i_0, sb, v, func;
sb = new StringBuilder_1('[');
for (i_0 = 0 , c = this.jsArray.length; i_0 < c; i_0++) {
i_0 > 0 && (sb.string += ',' , sb);
$append_0(sb, (v = this.jsArray[i_0] , func = ($clinit_JSONParser() , typeMap)[typeof v] , func?func(v):throwUnknownTypeException(typeof v)));
}
sb.string += ']';
return sb.string;
}
;
var Lcom_google_gwt_json_client_JSONArray_2_classLit = createForClass('com.google.gwt.json.client', 'JSONArray', 192);
function $clinit_JSONBoolean(){
$clinit_JSONBoolean = emptyMethod;
FALSE = new JSONBoolean(false);
TRUE = new JSONBoolean(true);
}
function JSONBoolean(value_0){
this.value_0 = value_0;
}
defineClass(244, 724, {}, JSONBoolean);
_.toString_0 = function(){
return toString_6(this.value_0);
}
;
_.value_0 = false;
var FALSE, TRUE;
var Lcom_google_gwt_json_client_JSONBoolean_2_classLit = createForClass('com.google.gwt.json.client', 'JSONBoolean', 244);
function JSONException(message){
RuntimeException_0.call(this, message);
}
defineClass(666, 12, $intern_3, JSONException);
var Lcom_google_gwt_json_client_JSONException_2_classLit = createForClass('com.google.gwt.json.client', 'JSONException', 666);
function $clinit_JSONNull(){
$clinit_JSONNull = emptyMethod;
instance_0 = new JSONNull;
}
function JSONNull(){
}
defineClass(673, 724, {}, JSONNull);
_.toString_0 = function(){
return 'null';
}
;
var instance_0;
var Lcom_google_gwt_json_client_JSONNull_2_classLit = createForClass('com.google.gwt.json.client', 'JSONNull', 673);
function JSONNumber(value_0){
this.value_0 = value_0;
}
defineClass(151, 724, {151:1}, JSONNumber);
_.equals = function(other){
if (!instanceOf(other, 151)) {
return false;
}
return this.value_0 == castTo(other, 151).value_0;
}
;
_.hashCode = function(){
return round_int(checkNotNull(this.value_0));
}
;
_.toString_0 = function toString_3(){
return this.value_0 + '';
}
;
_.value_0 = 0;
var Lcom_google_gwt_json_client_JSONNumber_2_classLit = createForClass('com.google.gwt.json.client', 'JSONNumber', 151);
function $computeKeys0(this$static, result){
var jsObject = this$static.jsObject;
var i_0 = 0;
for (var key in jsObject) {
jsObject.hasOwnProperty(key) && (result[i_0++] = key);
}
return result;
}
function $get(this$static, key){
if (key == null) {
throw new NullPointerException;
}
return $get0(this$static, key);
}
function $get0(this$static, key){
var jsObject = this$static.jsObject;
var v;
key = String(key);
jsObject.hasOwnProperty(key) && (v = jsObject[key]);
var func = ($clinit_JSONParser() , typeMap)[typeof v];
var ret = func?func(v):throwUnknownTypeException(typeof v);
return ret;
}
function JSONObject(jsValue){
this.jsObject = jsValue;
}
defineClass(147, 724, {147:1}, JSONObject);
_.equals = function(other){
if (!instanceOf(other, 147)) {
return false;
}
return this.jsObject == castTo(other, 147).jsObject;
}
;
_.hashCode = function(){
return getObjectIdentityHashCode(this.jsObject);
}
;
_.toString_0 = function(){
var first, key, key$index, key$max, keys_0, sb;
sb = new StringBuilder_1('{');
first = true;
keys_0 = $computeKeys0(this, initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_0, 2, 0, 5, 1));
for (key$index = 0 , key$max = keys_0.length; key$index < key$max; ++key$index) {
key = keys_0[key$index];
first?(first = false):(sb.string += ', ' , sb);
$append_1(sb, escapeValue(key));
sb.string += ':';
$append_0(sb, $get(this, key));
}
sb.string += '}';
return sb.string;
}
;
var Lcom_google_gwt_json_client_JSONObject_2_classLit = createForClass('com.google.gwt.json.client', 'JSONObject', 147);
function $clinit_JSONParser(){
$clinit_JSONParser = emptyMethod;
typeMap = {'boolean':createBoolean, number:createNumber, string:createString, object:createObject, 'function':createObject, undefined:createUndefined};
}
function createBoolean(v){
return $clinit_JSONBoolean() , v?TRUE:FALSE;
}
function createNumber(v){
return new JSONNumber(v);
}
function createObject(o){
if (!o) {
return $clinit_JSONNull() , instance_0;
}
var v = o.valueOf?o.valueOf():o;
if (v !== o) {
var func = typeMap[typeof v];
return func?func(v):throwUnknownTypeException(typeof v);
}
else if (o instanceof Array || o instanceof $wnd.Array) {
return new JSONArray(o);
}
else {
return new JSONObject(o);
}
}
function createString(v){
return new JSONString(v);
}
function createUndefined(){
return null;
}
function throwUnknownTypeException(typeString){
$clinit_JSONParser();
throw new JSONException("Unexpected typeof result '" + typeString + "'; please report this bug to the GWT team");
}
var typeMap;
function JSONString(value_0){
if (value_0 == null) {
throw new NullPointerException;
}
this.value_0 = value_0;
}
defineClass(148, 724, {148:1}, JSONString);
_.equals = function(other){
if (!instanceOf(other, 148)) {
return false;
}
return $equals_2(this.value_0, castTo(other, 148).value_0);
}
;
_.hashCode = function(){
return getHashCode(this.value_0);
}
;
_.isString = function(){
return this;
}
;
_.toString_0 = function(){
return escapeValue(this.value_0);
}
;
var Lcom_google_gwt_json_client_JSONString_2_classLit = createForClass('com.google.gwt.json.client', 'JSONString', 148);
function canSet(array, value_0){
switch (getElementTypeCategory(array)) {
case 5:
return instanceOfString(value_0);
case 6:
return instanceOfDouble(value_0);
case 7:
return instanceOfBoolean(value_0);
case 0:
return canCast(value_0, array.__elementTypeId$);
case 2:
return isJsObjectOrFunction(value_0) && !(value_0.typeMarker === typeMarkerFn);
case 1:
return isJsObjectOrFunction(value_0) && !(value_0.typeMarker === typeMarkerFn) || canCast(value_0, array.__elementTypeId$);
default:return true;
}
}
function getClassLiteralForArray(clazz, dimensions){
return getClassLiteralForArray_0(clazz, dimensions);
}
function getElementTypeCategory(array){
return array.__elementTypeCategory$ == null?9:array.__elementTypeCategory$;
}
function initUnidimensionalArray(leafClassLiteral, castableTypeMap, elementTypeId, length_0, elementTypeCategory, dimensions){
var result;
result = initializeArrayElementsWithDefaults(elementTypeCategory, length_0);
elementTypeCategory != 9 && stampJavaTypeInfo(getClassLiteralForArray(leafClassLiteral, dimensions), castableTypeMap, elementTypeId, elementTypeCategory, result);
return result;
}
function initializeArrayElementsWithDefaults(elementTypeCategory, length_0){
var array = new Array(length_0);
var initValue;
switch (elementTypeCategory) {
case 11:
case 12:
initValue = 0;
break;
case 13:
initValue = false;
break;
default:return array;
}
for (var i_0 = 0; i_0 < length_0; ++i_0) {
array[i_0] = initValue;
}
return array;
}
function isJavaArray(src_0){
return Array.isArray(src_0) && src_0.typeMarker === typeMarkerFn;
}
function setCheck(array, index_0, value_0){
checkCriticalArrayType(value_0 == null || canSet(array, value_0));
return array[index_0] = value_0;
}
function stampJavaTypeInfo(arrayClass, castableTypeMap, elementTypeId, elementTypeCategory, array){
array.___clazz = arrayClass;
array.castableTypeMap = castableTypeMap;
array.typeMarker = typeMarkerFn;
array.__elementTypeId$ = elementTypeId;
array.__elementTypeCategory$ = elementTypeCategory;
return array;
}
function stampJavaTypeInfo_0(array, referenceType){
getElementTypeCategory(referenceType) != 9 && stampJavaTypeInfo(getClass__Ljava_lang_Class___devirtual$(referenceType), referenceType.castableTypeMap, referenceType.__elementTypeId$, getElementTypeCategory(referenceType), array);
return array;
}
function create(value_0){
var a0, a1, a2;
a0 = value_0 & $intern_12;
a1 = value_0 >> 22 & $intern_12;
a2 = value_0 < 0?$intern_13:0;
return create0(a0, a1, a2);
}
function create_0(a){
return create0(a.l, a.m, a.h);
}
function create0(l, m, h){
return {l:l, m:m, h:h};
}
function divMod(a, b, computeRemainder){
var aIsCopy, aIsMinValue, aIsNegative, bpower, c, negative;
if (b.l == 0 && b.m == 0 && b.h == 0) {
throw new ArithmeticException;
}
if (a.l == 0 && a.m == 0 && a.h == 0) {
computeRemainder && (remainder = create0(0, 0, 0));
return create0(0, 0, 0);
}
if (b.h == $intern_14 && b.m == 0 && b.l == 0) {
return divModByMinValue(a, computeRemainder);
}
negative = false;
if (b.h >> 19 != 0) {
b = neg(b);
negative = true;
}
bpower = powerOfTwo(b);
aIsNegative = false;
aIsMinValue = false;
aIsCopy = false;
if (a.h == $intern_14 && a.m == 0 && a.l == 0) {
aIsMinValue = true;
aIsNegative = true;
if (bpower == -1) {
a = create_0(($clinit_BigLongLib$Const() , MAX_VALUE));
aIsCopy = true;
negative = !negative;
}
else {
c = shr(a, bpower);
negative && negate(c);
computeRemainder && (remainder = create0(0, 0, 0));
return c;
}
}
else if (a.h >> 19 != 0) {
aIsNegative = true;
a = neg(a);
aIsCopy = true;
negative = !negative;
}
if (bpower != -1) {
return divModByShift(a, bpower, negative, aIsNegative, computeRemainder);
}
if (compare_0(a, b) < 0) {
computeRemainder && (aIsNegative?(remainder = neg(a)):(remainder = create0(a.l, a.m, a.h)));
return create0(0, 0, 0);
}
return divModHelper(aIsCopy?a:create0(a.l, a.m, a.h), b, negative, aIsNegative, aIsMinValue, computeRemainder);
}
function divModByMinValue(a, computeRemainder){
if (a.h == $intern_14 && a.m == 0 && a.l == 0) {
computeRemainder && (remainder = create0(0, 0, 0));
return create_0(($clinit_BigLongLib$Const() , ONE));
}
computeRemainder && (remainder = create0(a.l, a.m, a.h));
return create0(0, 0, 0);
}
function divModByShift(a, bpower, negative, aIsNegative, computeRemainder){
var c;
c = shr(a, bpower);
negative && negate(c);
if (computeRemainder) {
a = maskRight(a, bpower);
aIsNegative?(remainder = neg(a)):(remainder = create0(a.l, a.m, a.h));
}
return c;
}
function divModHelper(a, b, negative, aIsNegative, aIsMinValue, computeRemainder){
var bshift, gte, quotient, shift_0, a1, a2, a0;
shift_0 = numberOfLeadingZeros(b) - numberOfLeadingZeros(a);
bshift = shl(b, shift_0);
quotient = create0(0, 0, 0);
while (shift_0 >= 0) {
gte = trialSubtract(a, bshift);
if (gte) {
shift_0 < 22?(quotient.l |= 1 << shift_0 , undefined):shift_0 < 44?(quotient.m |= 1 << shift_0 - 22 , undefined):(quotient.h |= 1 << shift_0 - 44 , undefined);
if (a.l == 0 && a.m == 0 && a.h == 0) {
break;
}
}
a1 = bshift.m;
a2 = bshift.h;
a0 = bshift.l;
bshift.h = a2 >>> 1;
bshift.m = a1 >>> 1 | (a2 & 1) << 21;
bshift.l = a0 >>> 1 | (a1 & 1) << 21;
--shift_0;
}
negative && negate(quotient);
if (computeRemainder) {
if (aIsNegative) {
remainder = neg(a);
aIsMinValue && (remainder = sub_0(remainder, ($clinit_BigLongLib$Const() , ONE)));
}
else {
remainder = create0(a.l, a.m, a.h);
}
}
return quotient;
}
function maskRight(a, bits){
var b0, b1, b2;
if (bits <= 22) {
b0 = a.l & (1 << bits) - 1;
b1 = b2 = 0;
}
else if (bits <= 44) {
b0 = a.l;
b1 = a.m & (1 << bits - 22) - 1;
b2 = 0;
}
else {
b0 = a.l;
b1 = a.m;
b2 = a.h & (1 << bits - 44) - 1;
}
return create0(b0, b1, b2);
}
function negate(a){
var neg0, neg1, neg2;
neg0 = ~a.l + 1 & $intern_12;
neg1 = ~a.m + (neg0 == 0?1:0) & $intern_12;
neg2 = ~a.h + (neg0 == 0 && neg1 == 0?1:0) & $intern_13;
a.l = neg0;
a.m = neg1;
a.h = neg2;
}
function numberOfLeadingZeros(a){
var b1, b2;
b2 = numberOfLeadingZeros_0(a.h);
if (b2 == 32) {
b1 = numberOfLeadingZeros_0(a.m);
return b1 == 32?numberOfLeadingZeros_0(a.l) + 32:b1 + 20 - 10;
}
else {
return b2 - 12;
}
}
function powerOfTwo(a){
var h, l, m;
l = a.l;
if ((l & l - 1) != 0) {
return -1;
}
m = a.m;
if ((m & m - 1) != 0) {
return -1;
}
h = a.h;
if ((h & h - 1) != 0) {
return -1;
}
if (h == 0 && m == 0 && l == 0) {
return -1;
}
if (h == 0 && m == 0 && l != 0) {
return numberOfTrailingZeros(l);
}
if (h == 0 && m != 0 && l == 0) {
return numberOfTrailingZeros(m) + 22;
}
if (h != 0 && m == 0 && l == 0) {
return numberOfTrailingZeros(h) + 44;
}
return -1;
}
function toDoubleHelper(a){
return a.l + a.m * $intern_15 + a.h * $intern_16;
}
function trialSubtract(a, b){
var sum0, sum1, sum2;
sum2 = a.h - b.h;
if (sum2 < 0) {
return false;
}
sum0 = a.l - b.l;
sum1 = a.m - b.m + (sum0 >> 22);
sum2 += sum1 >> 22;
if (sum2 < 0) {
return false;
}
a.l = sum0 & $intern_12;
a.m = sum1 & $intern_12;
a.h = sum2 & $intern_13;
return true;
}
var remainder;
function compare_0(a, b){
var a0, a1, a2, b0, b1, b2, signA, signB;
signA = a.h >> 19;
signB = b.h >> 19;
if (signA != signB) {
return signB - signA;
}
a2 = a.h;
b2 = b.h;
if (a2 != b2) {
return a2 - b2;
}
a1 = a.m;
b1 = b.m;
if (a1 != b1) {
return a1 - b1;
}
a0 = a.l;
b0 = b.l;
return a0 - b0;
}
function fromDouble(value_0){
var a0, a1, a2, negative, result;
if (isNaN(value_0)) {
return $clinit_BigLongLib$Const() , ZERO;
}
if (value_0 < -9223372036854775808) {
return $clinit_BigLongLib$Const() , MIN_VALUE;
}
if (value_0 >= 9223372036854775807) {
return $clinit_BigLongLib$Const() , MAX_VALUE;
}
negative = false;
if (value_0 < 0) {
negative = true;
value_0 = -value_0;
}
a2 = 0;
if (value_0 >= $intern_16) {
a2 = round_int(value_0 / $intern_16);
value_0 -= a2 * $intern_16;
}
a1 = 0;
if (value_0 >= $intern_15) {
a1 = round_int(value_0 / $intern_15);
value_0 -= a1 * $intern_15;
}
a0 = round_int(value_0);
result = create0(a0, a1, a2);
negative && negate(result);
return result;
}
function neg(a){
var neg0, neg1, neg2;
neg0 = ~a.l + 1 & $intern_12;
neg1 = ~a.m + (neg0 == 0?1:0) & $intern_12;
neg2 = ~a.h + (neg0 == 0 && neg1 == 0?1:0) & $intern_13;
return create0(neg0, neg1, neg2);
}
function shl(a, n){
var res0, res1, res2;
n &= 63;
if (n < 22) {
res0 = a.l << n;
res1 = a.m << n | a.l >> 22 - n;
res2 = a.h << n | a.m >> 22 - n;
}
else if (n < 44) {
res0 = 0;
res1 = a.l << n - 22;
res2 = a.m << n - 22 | a.l >> 44 - n;
}
else {
res0 = 0;
res1 = 0;
res2 = a.l << n - 44;
}
return create0(res0 & $intern_12, res1 & $intern_12, res2 & $intern_13);
}
function shr(a, n){
var a2, negative, res0, res1, res2;
n &= 63;
a2 = a.h;
negative = (a2 & $intern_14) != 0;
negative && (a2 |= -1048576);
if (n < 22) {
res2 = a2 >> n;
res1 = a.m >> n | a2 << 22 - n;
res0 = a.l >> n | a.m << 22 - n;
}
else if (n < 44) {
res2 = negative?$intern_13:0;
res1 = a2 >> n - 22;
res0 = a.m >> n - 22 | a2 << 44 - n;
}
else {
res2 = negative?$intern_13:0;
res1 = negative?$intern_12:0;
res0 = a2 >> n - 44;
}
return create0(res0 & $intern_12, res1 & $intern_12, res2 & $intern_13);
}
function sub_0(a, b){
var sum0, sum1, sum2;
sum0 = a.l - b.l;
sum1 = a.m - b.m + (sum0 >> 22);
sum2 = a.h - b.h + (sum1 >> 22);
return create0(sum0 & $intern_12, sum1 & $intern_12, sum2 & $intern_13);
}
function toDouble(a){
if (compare_0(a, ($clinit_BigLongLib$Const() , ZERO)) < 0) {
return -toDoubleHelper(neg(a));
}
return a.l + a.m * $intern_15 + a.h * $intern_16;
}
function toInt(a){
return a.l | a.m << 22;
}
function toString_4(a){
var digits, rem, res, tenPowerLong, zeroesNeeded;
if (a.l == 0 && a.m == 0 && a.h == 0) {
return '0';
}
if (a.h == $intern_14 && a.m == 0 && a.l == 0) {
return '-9223372036854775808';
}
if (a.h >> 19 != 0) {
return '-' + toString_4(neg(a));
}
rem = a;
res = '';
while (!(rem.l == 0 && rem.m == 0 && rem.h == 0)) {
tenPowerLong = create(1000000000);
rem = divMod(rem, tenPowerLong, true);
digits = '' + toInt(remainder);
if (!(rem.l == 0 && rem.m == 0 && rem.h == 0)) {
zeroesNeeded = 9 - ($clinit_String() , digits.length);
for (; zeroesNeeded > 0; zeroesNeeded--) {
digits = '0' + digits;
}
}
res = digits + res;
}
return res;
}
function $clinit_BigLongLib$Const(){
$clinit_BigLongLib$Const = emptyMethod;
MAX_VALUE = create0($intern_12, $intern_12, 524287);
MIN_VALUE = create0(0, 0, $intern_14);
ONE = create(1);
create(2);
ZERO = create(0);
}
var MAX_VALUE, MIN_VALUE, ONE, ZERO;
function cacheJavaScriptException(e, jse){
if (e && typeof e == 'object') {
try {
e.__gwt$exception = jse;
}
catch (ignored) {
}
}
}
function unwrap(e){
var jse;
if (instanceOf(e, 78)) {
jse = castTo(e, 78);
if (maskUndefined(jse.e) !== maskUndefined(($clinit_JavaScriptException() , NOT_SET))) {
return maskUndefined(jse.e) === maskUndefined(NOT_SET)?null:jse.e;
}
}
return e;
}
function wrap_0(e){
var jse;
if (instanceOf(e, 13)) {
return e;
}
jse = e && e.__gwt$exception;
if (!jse) {
jse = new JavaScriptException(e);
captureStackTrace(jse, e);
cacheJavaScriptException(e, jse);
}
return jse;
}
function compare_1(a, b){
var result;
if (isSmallLong0(a) && isSmallLong0(b)) {
result = a - b;
if (!isNaN(result)) {
return result;
}
}
return compare_0(isSmallLong0(a)?toBigLong(a):a, isSmallLong0(b)?toBigLong(b):b);
}
function createLongEmul(big_0){
var a2;
a2 = big_0.h;
if (a2 == 0) {
return big_0.l + big_0.m * $intern_15;
}
if (a2 == $intern_13) {
return big_0.l + big_0.m * $intern_15 - $intern_16;
}
return big_0;
}
function eq(a, b){
return compare_1(a, b) == 0;
}
function fromDouble_0(value_0){
if (-17592186044416 < value_0 && value_0 < $intern_16) {
return value_0 < 0?Math.ceil(value_0):Math.floor(value_0);
}
return createLongEmul(fromDouble(value_0));
}
function isSmallLong0(value_0){
return typeof value_0 === 'number';
}
function toBigLong(longValue){
var a0, a1, a3, value_0;
value_0 = longValue;
a3 = 0;
if (value_0 < 0) {
value_0 += $intern_16;
a3 = $intern_13;
}
a1 = round_int(value_0 / $intern_15);
a0 = round_int(value_0 - a1 * $intern_15);
return create0(a0, a1, a3);
}
function toDouble_0(a){
var d;
if (isSmallLong0(a)) {
d = a;
return d == -0.?0:d;
}
return toDouble(a);
}
function toInt_0(a){
if (isSmallLong0(a)) {
return a | 0;
}
return toInt(a);
}
function toString_5(a){
if (isSmallLong0(a)) {
return $clinit_String() , '' + a;
}
return toString_4(a);
}
function init_0(){
$wnd.setTimeout($entry(assertCompileTimeUserAgent));
$onModuleLoad();
$clinit_LogConfiguration();
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), new GridEntryPoint$1);
delete $wnd.vaadin.elements.grid._api;
}
function $clinit_LogConfiguration(){
$clinit_LogConfiguration = emptyMethod;
impl_1 = new LogConfiguration$LogConfigurationImplNull;
}
function loggingIsEnabled(){
$clinit_LogConfiguration();
if (!impl_1) {
return true;
}
return false;
}
var impl_1;
function LogConfiguration$LogConfigurationImplNull(){
}
defineClass(253, 1, {}, LogConfiguration$LogConfigurationImplNull);
var Lcom_google_gwt_logging_client_LogConfiguration$LogConfigurationImplNull_2_classLit = createForClass('com.google.gwt.logging.client', 'LogConfiguration/LogConfigurationImplNull', 253);
function Browser(){
this.ie6 = this.isIe6();
this.ie8 = this.isIe8();
this.ie9 = this.isIe9();
this.mozilla = this.isMozilla();
this.msie = this.isMsie();
this.opera = this.isOpera_0();
this.isWebkit();
this.webkit = this.isWebkit();
}
defineClass(82, 1, $intern_17);
_.ie6 = false;
_.ie8 = false;
_.ie9 = false;
_.mozilla = false;
_.msie = false;
_.opera = false;
_.webkit = false;
var Lcom_google_gwt_query_client_Browser_2_classLit = createForClass('com.google.gwt.query.client', 'Browser', 82);
function Browser_gecko1_8(){
Browser.call(this);
}
defineClass(501, 82, $intern_17, Browser_gecko1_8);
_.isIe6 = function(){
return false;
}
;
_.isIe8 = function(){
return false;
}
;
_.isIe9 = function(){
return false;
}
;
_.isMozilla = function(){
return true;
}
;
_.isMsie = function(){
return false;
}
;
_.isOpera_0 = function(){
return false;
}
;
_.isWebkit = function(){
return false;
}
;
_.toString_0 = function(){
return 'Browser: webkit=' + this.webkit + ' mozilla=' + this.mozilla + ' opera=' + this.opera + ' msie=' + this.msie + ' ie6=' + this.ie6 + ' ie8=' + this.ie8 + ' ie9=' + this.ie9;
}
;
var Lcom_google_gwt_query_client_Browser_1gecko1_18_2_classLit = createForClass('com.google.gwt.query.client', 'Browser_gecko1_8', 501);
function Browser_ie10(){
Browser.call(this);
}
defineClass(503, 82, $intern_17, Browser_ie10);
_.isIe6 = function(){
return false;
}
;
_.isIe8 = function(){
return false;
}
;
_.isIe9 = function(){
return false;
}
;
_.isMozilla = function(){
return false;
}
;
_.isMsie = function(){
return true;
}
;
_.isOpera_0 = function(){
return false;
}
;
_.isWebkit = function(){
return false;
}
;
_.toString_0 = function(){
return 'Browser: webkit=' + this.webkit + ' mozilla=' + this.mozilla + ' opera=' + this.opera + ' msie=' + this.msie + ' ie6=' + this.ie6 + ' ie8=' + this.ie8 + ' ie9=' + this.ie9;
}
;
var Lcom_google_gwt_query_client_Browser_1ie10_2_classLit = createForClass('com.google.gwt.query.client', 'Browser_ie10', 503);
function Browser_safari(){
Browser.call(this);
}
defineClass(502, 82, $intern_17, Browser_safari);
_.isIe6 = function(){
return false;
}
;
_.isIe8 = function(){
return false;
}
;
_.isIe9 = function(){
return false;
}
;
_.isMozilla = function(){
return false;
}
;
_.isMsie = function(){
return false;
}
;
_.isOpera_0 = function(){
return false;
}
;
_.isWebkit = function(){
return true;
}
;
_.toString_0 = function(){
return 'Browser: webkit=' + this.webkit + ' mozilla=' + this.mozilla + ' opera=' + this.opera + ' msie=' + this.msie + ' ie6=' + this.ie6 + ' ie8=' + this.ie8 + ' ie9=' + this.ie9;
}
;
var Lcom_google_gwt_query_client_Browser_1safari_2_classLit = createForClass('com.google.gwt.query.client', 'Browser_safari', 502);
function $f(this$static, args){
this$static.arguments_0 = args;
this$static.f();
return $clinit_Boolean() , $clinit_Boolean() , TRUE_0;
}
function $fe(this$static){
$f(this$static, this$static.arguments_0);
}
function $getArgument(this$static, pos){
var o, objs;
objs = $getArgumentArray(this$static);
o = objs.length > pos?objs[pos]:null;
if (o != null) {
return o;
}
return null;
}
function $getArgumentArray(this$static){
var o;
o = this$static.arguments_0;
if (o != null) {
return (getClass__Ljava_lang_Class___devirtual$(o).modifiers & 4) != 0?o:stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [o]);
}
return initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_0, 1, 0, 4, 1);
}
function $setArguments(this$static, arguments_0){
this$static.arguments_0 = arguments_0;
return this$static;
}
function Function_0(){
this.arguments_0 = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_0, 1, 0, 4, 1);
}
defineClass(7, 1, $intern_18);
_.f = function(){
throw new RuntimeException_0("You have to override the adequate method to handle this action, or you have to override 'public void f()' to avoid this error");
}
;
_.f_0 = function(args){
return $f(this, args);
}
;
_.fe = function(args){
return this.f_0(args);
}
;
_.setArguments = function(arguments_0){
return $setArguments(this, arguments_0);
}
;
var Lcom_google_gwt_query_client_Function_2_classLit = createForClass('com.google.gwt.query.client', 'Function', 7);
function create_1(clz, obj){
var ret;
ret = (!jsonFactory && (jsonFactory = new JsonFactory_JsonBuilder) , $create(clz));
$load(ret, obj);
return ret;
}
var jsonFactory;
function $clinit_GQuery(){
$clinit_GQuery = emptyMethod;
browser = castTo(create_com_google_gwt_query_client_Browser(), 82);
console_1 = new ConsoleBrowser;
document_1 = $doc;
$clinit_Effects();
$clinit_Events();
new RegExp('^:(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\))?(?=[^\\-]|$)$');
tagNameRegex = new RegExp('<([\\w:-]+)');
$clinit_Widgets();
window_1 = ($clinit_ScriptInjector() , TOP_WINDOW);
}
function $$init(this$static){
this$static.elements_0 = initUnidimensionalArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, $intern_0, 0, 0, 2, 1);
this$static.nodeList = [];
}
function $(o){
var r;
$clinit_GQuery();
var c, elms, i_0, jso, obj;
if (o != null) {
if (instanceOfString(o)) {
return $_0(castToString(o), document_1);
}
if (instanceOf(o, 25)) {
return castTo(o, 25);
}
if (instanceOf(o, 7)) {
return new GQuery_0((castTo(o, 7) , null.$_nullMethod()));
}
if (instanceOf(o, 86)) {
return new GQuery_0(getDataImpl__Ljava_lang_Object___devirtual$(castTo(o, 86)));
}
if (instanceOf(o, 26)) {
return $_1(new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [o])));
}
if (instanceOfJso(o)) {
jso = castToJso(o);
if (isFunction(jso)) {
$fe(new JsUtils$JsFunction(jso));
return new GQuery_3(create_2(null));
}
if (!hasProperty(jso, 'alert') && !isElement_0(jso) && isArray_0(jso)) {
c = jso;
elms = create_2(null);
for (i_0 = 0; i_0 < c.length; i_0++) {
obj = c[i_0] != null?Object(c[i_0]):null;
!!obj && $addNode(elms, obj);
}
return new GQuery_3(elms);
}
if (r = Object.prototype.toString.call(jso) , r == '[object HTMLCollection]' || r == '[object NodeList]' || typeof jso == 'object' && jso.length && jso[0] && jso[0].tagName?true:false) {
return new GQuery_1(jso);
}
hasProperty(jso, 'currentTarget') && (jso = ($clinit_DOMImpl() , impl_0).eventGetCurrentTarget(jso));
return new GQuery_0(jso);
}
throw new RuntimeException_0('Error: GQuery.$(Object o) could not wrap the type : ' + $getName(getClass__Ljava_lang_Class___devirtual$(o)) + ' ' + o);
}
return new GQuery_3(create_2(null));
}
function $_0(selectorOrHtml, ctx){
$clinit_GQuery();
var selector;
selector = null;
if (selectorOrHtml == null || length_1(selector = $trim(selectorOrHtml)) == 0) {
return new GQuery_3(create_2(null));
}
if ($equals_2(__substr(selector, 0, ($clinit_String() , '<'.length)), '<')) {
return cleanHtmlString(selectorOrHtml, !ctx || !isElement_0(ctx)?null:ctx.nodeType == 9?ctx:ctx.ownerDocument);
}
return $select(new GQuery, selectorOrHtml, ctx);
}
function $_1(nodesOrWidgets){
var elms, o, o$iterator;
elms = create_2(null);
for (o$iterator = new AbstractList$IteratorImpl(nodesOrWidgets); o$iterator.i < o$iterator.this$01_0.size_2();) {
o = (checkCriticalElement(o$iterator.i < o$iterator.this$01_0.size_2()) , o$iterator.this$01_0.get_1(o$iterator.last = o$iterator.i++));
instanceOfJso(o)?$addNode(elms, castToJso(o)):instanceOf(o, 26) && $addNode(elms, $getElement(castTo(o, 26).asWidget()));
}
return new GQuery_3(elms);
}
function $addClass(this$static, classes){
var clz, clz$index, clz$max, e, e$array, e$index, e$max;
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
if (!!e && e.nodeType == 1) {
for (clz$index = 0 , clz$max = classes.length; clz$index < clz$max; ++clz$index) {
clz = classes[clz$index];
$addClassName(e, clz);
}
}
}
return this$static;
}
function $allNextSiblingElements(firstChildElement, result){
while (firstChildElement) {
!!firstChildElement && $add(result, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 1), $intern_0, 0, 2, [firstChildElement]));
firstChildElement = $getNextSiblingElement(($clinit_DOMImpl() , firstChildElement));
}
}
function $as(this$static, plugin){
var p;
if (plugin == Lcom_google_gwt_query_client_GQuery_2_classLit) {
return this$static;
}
else if (plugins) {
p = castTo($get_3(plugins, getObjectIdentityHashCode(plugin)), 153);
if (p) {
return p.init_1(this$static);
}
}
throw new RuntimeException_0(($ensureNamesAreInitialized(plugin) , 'No plugin registered for class ' + plugin.typeName));
}
function $attr(this$static){
$setAttribute_0((!attributeImpl && (attributeImpl = new AttributeImpl) , this$static), '');
return this$static;
}
function $children(this$static){
var e, e$array, e$index, e$max, result;
result = create_2(null);
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
$allNextSiblingElements($getFirstChildElement_0(($clinit_DOMImpl() , e)), result);
}
return new GQuery_3($unique(result));
}
function $children_0(this$static, filters){
return $filter($children(this$static), filters);
}
function $clone(this$static){
var e, e$array, e$index, e$max, result, ret;
result = create_2(null);
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
$addNode(result, e.cloneNode(true));
}
ret = new GQuery_3(result);
ret.currentContext = this$static.currentContext;
ret.currentSelector = this$static.currentSelector;
return ret;
}
function $css(this$static, prop, val){
var e, e$array, e$index, e$max;
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
$setStyleProperty((!styleImpl && (styleImpl = (!engine && (engine = new SelectorEngine) , $clinit_SelectorEngine() , styleImpl_0)) , e), prop, val);
}
return this$static;
}
function $domManip(this$static, g, type_0, elms){
var e, i_0, j, l, n, newNodes, size_0;
newNodes = create_2(null);
elms.length == 0 && (elms = this$static.elements_0);
for (i_0 = 0 , l = elms.length; i_0 < l; i_0++) {
e = elms[i_0];
e.nodeType == 9 && (e = e.body);
for (j = 0 , size_0 = g.elements_0.length; j < size_0; j++) {
n = $get_0(g, j);
i_0 > 0 && (n = n.cloneNode(true));
switch (type_0) {
case 3:
$addNode(newNodes, $insertBefore(e, n, e.firstChild));
break;
case 1:
$addNode(newNodes, e.appendChild(n));
break;
case 0:
$addNode(newNodes, $insertBefore(e.parentNode, n, e.nextSibling));
break;
case 2:
$addNode(newNodes, $insertBefore(e.parentNode, n, e));
}
$clinit_EventsListener();
}
}
$length(newNodes) >= g.elements_0.length && $setArray(g, newNodes);
return this$static;
}
function $filter(this$static, filters){
var result, selector;
selector = $join(filters);
result = $filter_1((!engine && (engine = new SelectorEngine) , engine), this$static.nodeList, selector);
return $pushStack(this$static, result, selector);
}
function $find(this$static, filters){
var array, c, c$array, c$index, c$max, e, e$array, e$index, e$max, selector, selector$index, selector$max;
array = create_2(null);
for (selector$index = 0 , selector$max = filters.length; selector$index < selector$max; ++selector$index) {
selector = filters[selector$index];
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
for (c$array = $_0(selector, e).elements_0 , c$index = 0 , c$max = c$array.length; c$index < c$max; ++c$index) {
c = c$array[c$index];
$add(array, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 1), $intern_0, 0, 2, [c]));
}
}
}
return $pushStack(this$static, $unique(array), filters[0]);
}
function $get_0(this$static, i_0){
var l;
l = this$static.elements_0.length;
if (i_0 >= 0 && i_0 < l) {
return this$static.elements_0[i_0];
}
if (i_0 < 0 && l + i_0 >= 0) {
return this$static.elements_0[l + i_0];
}
return null;
}
function $html(this$static){
return this$static.elements_0.length == 0?'':$getInnerHTML($get_0(this$static, 0));
}
function $insertBefore_0(this$static, query){
var e, e$array, e$index, e$max;
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
$domManip(query, $(e), 2, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 1), $intern_0, 0, 2, []));
}
return this$static;
}
function $join(values){
var i_0, value_0;
value_0 = '';
for (i_0 = 0; i_0 < values.length; i_0++) {
value_0 += i_0 > 0?', ' + values[i_0]:values[i_0];
}
return value_0;
}
function $last(this$static){
return $($get_0(this$static, this$static.elements_0.length - 1));
}
function $parent(this$static){
var e, e$array, e$index, e$max, p, result;
result = create_2(null);
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
p = $getParentElement_0(($clinit_DOMImpl() , e));
!!p && $add(result, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 1), $intern_0, 0, 2, [p]));
}
return new GQuery_3($unique(result));
}
function $parents(this$static, filters){
return $filter($parentsUntil(this$static), filters);
}
function $parentsUntil(this$static){
var e, e$array, e$index, e$max, i_0, par, result;
result = create_2(null);
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
i_0 = 0;
par = e.parentNode;
while (!!par && par != document_1) {
$add(result, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 1), $intern_0, 0, 2, [par]));
par = par.parentNode;
++i_0;
}
}
return new GQuery_3($unique(result));
}
function $prop(this$static, value_0){
var e, e$array, e$index, e$max;
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
!!e && $put(e, 'indeterminate', value_0);
}
return this$static;
}
function $pushStack(this$static, elts, selector){
var g;
g = new GQuery_3(elts);
g.currentSelector = selector;
g.currentContext = this$static.currentContext;
return g;
}
function $remove(this$static){
var e, e$array, e$index, e$max, parent_0, w;
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
w = getAssociatedWidget(e);
w?$removeFromParent_0(w):(parent_0 = $getParentElement_0(($clinit_DOMImpl() , e)) , !!parent_0 && parent_0.removeChild(e));
}
return this$static;
}
function $select(this$static, selector, context){
var n;
n = $select_0((!engine && (engine = new SelectorEngine) , engine), selector, !context?document_1:context);
this$static.currentSelector = selector;
this$static.currentContext = context?context:document_1;
return $setArray(this$static, n);
}
function $setArray(this$static, list){
var i_0, l;
if (list) {
$clear(this$static.nodeList);
l = list.length;
this$static.elements_0 = initUnidimensionalArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, $intern_0, 0, l, 2, 1);
for (i_0 = 0; i_0 < l; i_0++) {
setCheck(this$static.elements_0, i_0, list[i_0]);
$add(this$static.nodeList, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 1), $intern_0, 0, 2, [list[i_0]]));
}
}
return this$static;
}
function $slice(this$static, start_0, end){
var i_0, l, slice_0;
slice_0 = create_2(null);
l = this$static.elements_0.length;
(end == -1 || end > l) && (end = l);
for (i_0 = start_0; i_0 < end; i_0++) {
$addNode(slice_0, $get_0(this$static, i_0));
}
return new GQuery_3(slice_0);
}
function $toString_0(this$static){
var e, e$array, e$index, e$max, e2, elStr, r;
r = '';
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
if (window_1 == e) {
continue;
}
try {
elStr = !!e && !$equals_2('HTML', (!e || !isElement_0(e)?null:e.nodeType == 9?e:e.ownerDocument).documentElement.nodeName)?(new XMLSerializer).serializeToString(e):($clinit_DOMImpl() , impl_0).toString_1(e);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 16)) {
e2 = $e0;
elStr = '< ' + (!e?'null':e.nodeName) + '(gquery, error getting the element string representation: ' + e2.getMessage() + ')/>';
}
else
throw unwrap($e0);
}
r += '' + elStr;
}
return r;
}
function $val(this$static, value_0){
var e, e$array, e$index, e$max;
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
e.value = value_0;
}
return this$static;
}
function $widget(this$static, n){
var e, e$array, e$index, e$max, w;
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
w = getAssociatedWidget(e);
if (w) {
if (n == 0) {
return w;
}
--n;
}
}
return null;
}
function $wrap(this$static, query){
var e, e$array, e$index, e$max;
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
$wrapAll($(e), query);
}
return this$static;
}
function $wrapAll(this$static, query){
var e, e$array, e$index, e$max, n, wrap;
if (this$static.elements_0.length != 0) {
wrap = $clone(query);
!!$get_0(this$static, 0).parentNode && $insertBefore_0(wrap, $($get_0(this$static, 0)));
for (e$array = wrap.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
n = e;
while (!!n.firstChild && n.firstChild.nodeType == 1) {
n = n.firstChild;
}
$domManip($(n), this$static, 1, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 1), $intern_0, 0, 2, []));
}
}
return this$static;
}
function GQuery(){
$$init(this);
}
function GQuery_0(element){
GQuery_3.call(this, element?[element]:[]);
}
function GQuery_1(list){
$$init(this);
$setArray(this, list);
}
function GQuery_2(gq){
$clinit_GQuery();
$$init(this);
this.elements_0 = gq.elements_0;
this.nodeList = gq.nodeList;
this.currentSelector = gq.currentSelector;
this.currentContext = gq.currentContext;
}
function GQuery_3(nodes){
GQuery_1.call(this, nodes);
}
function cleanHtmlString(elem, doc){
var depth, div, mResult, n, tag, wrapper, tableWrapper, selectWrapper, trWrapper;
mResult = $exec_0(tagNameRegex, elem);
if (!mResult) {
return $(doc.createTextNode(elem));
}
tag = mResult[1];
!wrapperMap && (tableWrapper = new GQuery$TagWrapper(1, '<table>', '<\/table>') , selectWrapper = new GQuery$TagWrapper(1, '<select multiple="multiple">', '<\/select>') , trWrapper = new GQuery$TagWrapper(3, '<table><tbody><tr>', '<\/tr><\/tbody><\/table>') , wrapperMap = {} , $put_1(wrapperMap, 'option', selectWrapper) , $put_1(wrapperMap, 'optgroup', selectWrapper) , $put_1(wrapperMap, 'legend', new GQuery$TagWrapper(1, '<fieldset>', '<\/fieldset>')) , $put_1(wrapperMap, 'thead', tableWrapper) , $put_1(wrapperMap, 'tbody', tableWrapper) , $put_1(wrapperMap, 'tfoot', tableWrapper) , $put_1(wrapperMap, 'colgroup', tableWrapper) , $put_1(wrapperMap, 'caption', tableWrapper) , $put_1(wrapperMap, 'tr', new GQuery$TagWrapper(2, '<table><tbody>', '<\/tbody><\/table>')) , $put_1(wrapperMap, 'td', trWrapper) , $put_1(wrapperMap, 'th', trWrapper) , $put_1(wrapperMap, 'col', new GQuery$TagWrapper(2, '<table><tbody><\/tbody><colgroup>', '<\/colgroup><\/table>')) , $put_1(wrapperMap, 'area', new GQuery$TagWrapper(1, '<map>', '<\/map>')) , undefined);
wrapper = castTo($get_4(wrapperMap, ($clinit_String() , tag.toLowerCase())), 65);
!wrapper && (wrapper = ($clinit_GQuery$TagWrapper() , DEFAULT_0));
div = ($clinit_DOMImpl() , doc).createElement('div');
$setInnerHTML(div, wrapper.preWrap + ('' + $trim(elem)) + wrapper.postWrap);
n = div;
depth = wrapper.wrapDepth;
while (depth-- != 0) {
n = n.lastChild;
}
return $remove($(n.childNodes));
}
function getAssociatedWidget(e){
var e2, listener;
try {
listener = ($clinit_DOM() , getEventListener(e));
if (!listener) {
return null;
}
if (instanceOf(listener, 14)) {
return castTo(listener, 14);
}
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 16)) {
e2 = $e0;
$printStackTraceImpl(e2, ($clinit_System() , err), '');
}
else
throw unwrap($e0);
}
return null;
}
function registerPlugin(plugin, pluginFactory){
$clinit_GQuery();
!plugins && (plugins = {});
$put_0(plugins, plugin, pluginFactory);
return plugin;
}
defineClass(25, 1, $intern_19, GQuery, GQuery_0, GQuery_1, GQuery_3);
_.toString_0 = function(){
return $toString_0(this);
}
;
var attributeImpl, browser, console_1, document_1, engine, plugins, styleImpl, tagNameRegex, window_1, wrapperMap;
var Lcom_google_gwt_query_client_GQuery_2_classLit = createForClass('com.google.gwt.query.client', 'GQuery', 25);
function $clinit_GQuery$TagWrapper(){
$clinit_GQuery$TagWrapper = emptyMethod;
DEFAULT_0 = new GQuery$TagWrapper(0, '', '');
}
function GQuery$TagWrapper(wrapDepth, preWrap, postWrap){
$clinit_GQuery$TagWrapper();
this.wrapDepth = wrapDepth;
this.postWrap = postWrap;
this.preWrap = preWrap;
}
defineClass(65, 1, {65:1}, GQuery$TagWrapper);
_.wrapDepth = 0;
var DEFAULT_0;
var Lcom_google_gwt_query_client_GQuery$TagWrapper_2_classLit = createForClass('com.google.gwt.query.client', 'GQuery/TagWrapper', 65);
defineClass(72, 1, $intern_20);
_.f_1 = function(e, index_0){
return false;
}
;
var Lcom_google_gwt_query_client_Predicate_2_classLit = createForClass('com.google.gwt.query.client', 'Predicate', 72);
function $set_1(this$static, val){
$put(this$static, ($clinit_String() , 'changes'), val);
return this$static;
}
function $setBoolean(this$static, name_0){
this$static[name_0] = true;
}
function getDataImpl__Ljava_lang_Object___devirtual$(this$static){
return hasJavaObjectVirtualDispatch(this$static)?this$static.getDataImpl():this$static;
}
var Lcom_google_gwt_query_client_builders_JsonBuilder_2_classLit = createForInterface('com.google.gwt.query.client.builders', 'JsonBuilder');
function $getIsPropertiesArrayBase(js, r, clazz){
var a1, i_0;
a1 = js;
for (i_0 = 0; i_0 < r.length; i_0++) {
setCheck(r, i_0, $getIsPropertiesBase($get_1(a1, valueOf_2(i_0)), clazz));
}
return r;
}
function $getIsPropertiesBase(o, clazz){
return !jsonFactory && (jsonFactory = new JsonFactory_JsonBuilder) , $load($create(clazz), o);
}
function $load(this$static, prp){
if (prp != null && instanceOfString(prp)) {
return $load(this$static, parseJSON(castToString(prp)));
}
prp != null && (this$static.p = castToJso(prp));
return this$static;
}
function JsonBuilderBase(){
this.p = {};
}
defineClass(101, 1, $intern_21);
_.getDataImpl = function(){
return this.p;
}
;
_.toString_0 = function(){
return $JSON2String(this.p);
}
;
var Lcom_google_gwt_query_client_builders_JsonBuilderBase_2_classLit = createForClass('com.google.gwt.query.client.builders', 'JsonBuilderBase', 101);
function JsonBuilder_JsonBuilder(){
JsonBuilderBase.call(this);
}
defineClass(656, 101, $intern_21, JsonBuilder_JsonBuilder);
var Lcom_google_gwt_query_client_builders_JsonBuilder_1JsonBuilder_2_classLit = createForClass('com.google.gwt.query.client.builders', 'JsonBuilder_JsonBuilder', 656);
function $create(clz){
if (clz == Lcom_google_gwt_query_client_builders_JsonBuilder_2_classLit)
return new JsonBuilder_JsonBuilder;
if (clz == Lcom_google_gwt_query_client_plugins_ajax_Ajax$Settings_2_classLit)
return new Ajax_Settings_JsonBuilder;
if (clz == Lcom_google_gwt_query_client_plugins_observe_Observe$Changes_2_classLit)
return new Observe_Changes_JsonBuilder;
if (clz == Lcom_google_gwt_query_client_plugins_observe_Observe$Changes$ChangeRecord_2_classLit)
return new Observe_Changes_ChangeRecord_JsonBuilder;
if (clz == Lcom_google_gwt_query_client_plugins_observe_Observe$Changes$MutationRecord_2_classLit)
return new Observe_Changes_MutationRecord_JsonBuilder;
if (clz == Lcom_google_gwt_query_client_plugins_observe_Observe$MutationObserverInit_2_classLit)
return new Observe_MutationObserverInit_JsonBuilder;
if (clz == Lcom_google_gwt_query_client_plugins_observe_Observe$ObjectObserverInit_2_classLit)
return new Observe_ObjectObserverInit_JsonBuilder;
$error(($clinit_GQuery() , console_1), 'GQ.create: not registered class :' + clz);
return null;
}
function JsonFactory_JsonBuilder(){
}
defineClass(146, 1, {}, JsonFactory_JsonBuilder);
var Lcom_google_gwt_query_client_builders_JsonFactory_1JsonBuilder_2_classLit = createForClass('com.google.gwt.query.client.builders', 'JsonFactory_JsonBuilder', 146);
function $clinit_AttributeImpl(){
$clinit_AttributeImpl = emptyMethod;
BOOLEAN_ATTR_REGEX = new RegExp('^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$', 'i');
}
function $getAttributeSetter(){
if (equalsIgnoreCase('type', 'invisible')) {
return $clinit_AttributeImpl$TypeAttrSetter() , !INSTANCE_2 && (INSTANCE_2 = new AttributeImpl$TypeAttrSetter) , $clinit_AttributeImpl$TypeAttrSetter() , INSTANCE_2;
}
else if (BOOLEAN_ATTR_REGEX.test('invisible')) {
return !INSTANCE_1 && (INSTANCE_1 = new AttributeImpl$BooleanAttrSetter) , INSTANCE_1;
}
return !INSTANCE_0 && (INSTANCE_0 = new AttributeImpl$DefaultSetter) , INSTANCE_0;
}
function $removeAttribute(gQuery){
var e, e$array, e$index, e$max;
for (e$array = gQuery.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
if (e.nodeType != 1) {
continue;
}
hasProperty(e, 'invisible') && (BOOLEAN_ATTR_REGEX.test('invisible')?(e['invisible'] = false , undefined):(e['invisible'] = null , undefined));
e.removeAttribute('invisible');
}
}
function $setAttribute_0(gQuery, value_0){
var e, e$array, e$index, e$max, nodeType, setter;
setter = $getAttributeSetter();
if (setter.isRemoval(value_0)) {
$removeAttribute((!($clinit_GQuery() , attributeImpl) && (attributeImpl = new AttributeImpl) , gQuery));
return;
}
value_0 = value_0;
for (e$array = gQuery.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
nodeType = e.nodeType;
if (nodeType == 3 || nodeType == 8 || nodeType == 2) {
continue;
}
setter.setAttribute_0(e, 'invisible', value_0);
}
}
function AttributeImpl(){
$clinit_AttributeImpl();
}
defineClass(226, 1, {}, AttributeImpl);
var BOOLEAN_ATTR_REGEX;
var Lcom_google_gwt_query_client_impl_AttributeImpl_2_classLit = createForClass('com.google.gwt.query.client.impl', 'AttributeImpl', 226);
function $setAttribute_1(e, key, value_0){
$setAttribute(e, key, ($clinit_String() , value_0 == null?'null':toString__Ljava_lang_String___devirtual$(value_0)));
}
function AttributeImpl$DefaultSetter(){
}
defineClass(527, 1, {}, AttributeImpl$DefaultSetter);
_.isRemoval = function(value_0){
return value_0 == null;
}
;
_.setAttribute_0 = function(e, key, value_0){
$setAttribute_1(e, key, value_0);
}
;
var INSTANCE_0;
var Lcom_google_gwt_query_client_impl_AttributeImpl$DefaultSetter_2_classLit = createForClass('com.google.gwt.query.client.impl', 'AttributeImpl/DefaultSetter', 527);
function AttributeImpl$BooleanAttrSetter(){
}
defineClass(528, 527, {}, AttributeImpl$BooleanAttrSetter);
_.isRemoval = function(value_0){
return value_0 == null || $equals_0(($clinit_Boolean() , FALSE_0), value_0);
}
;
_.setAttribute_0 = function(e, key, value_0){
hasProperty(e, key) && (e[key] = true , undefined);
$setAttribute_1(e, key, ($clinit_String() , key.toLowerCase()));
}
;
var INSTANCE_1;
var Lcom_google_gwt_query_client_impl_AttributeImpl$BooleanAttrSetter_2_classLit = createForClass('com.google.gwt.query.client.impl', 'AttributeImpl/BooleanAttrSetter', 528);
function $clinit_AttributeImpl$TypeAttrSetter(){
$clinit_AttributeImpl$TypeAttrSetter = emptyMethod;
NOT_AUTHORIZED_NODE = new RegExp('^(?:button|input)$', 'i');
}
function AttributeImpl$TypeAttrSetter(){
$clinit_AttributeImpl$TypeAttrSetter();
}
defineClass(529, 527, {}, AttributeImpl$TypeAttrSetter);
_.setAttribute_0 = function(e, name_0, value_0){
var ie, keepValue, tag;
tag = e.nodeName;
if ($test(NOT_AUTHORIZED_NODE, tag) && $parents($(e), stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['body'])).elements_0.length > 0) {
throw new RuntimeException_0('You cannot change type of button or input element if the element is already attached to the dom');
}
if ($equals_2('input', ($clinit_String() , tag.toLowerCase())) && $equals_2('radio', value_0)) {
ie = e;
keepValue = ie.value;
$setAttribute(ie, 'type', value_0 == null?'null':toString__Ljava_lang_String___devirtual$(value_0));
ie.value = keepValue;
}
else {
$setAttribute(e, name_0, value_0 == null?'null':toString__Ljava_lang_String___devirtual$(value_0));
}
}
;
var INSTANCE_2, NOT_AUTHORIZED_NODE;
var Lcom_google_gwt_query_client_impl_AttributeImpl$TypeAttrSetter_2_classLit = createForClass('com.google.gwt.query.client.impl', 'AttributeImpl/TypeAttrSetter', 529);
function $error(this$static, arg){
this$static.impl.error_0($toJs(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [arg])));
}
function $info(this$static, arg){
this$static.impl.info_0($toJs(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [arg])));
}
function $toJs(arg){
var o, o$index, o$max, ret;
ret = [];
for (o$index = 0 , o$max = arg.length; o$index < o$max; ++o$index) {
o = arg[o$index];
$add(ret, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [o]));
}
return ret;
}
function ConsoleBrowser(){
this.impl = ($clinit_GQuery() , browser).ie8?new ConsoleBrowser$ConsoleIe8:browser.ie9?new ConsoleBrowser$ConsoleIe9:new ConsoleBrowser$ConsoleImpl;
}
defineClass(504, 1, {}, ConsoleBrowser);
var Lcom_google_gwt_query_client_impl_ConsoleBrowser_2_classLit = createForClass('com.google.gwt.query.client.impl', 'ConsoleBrowser', 504);
function $error_0(arg){
$wnd.console.error.apply($wnd.console, arg);
}
function $info_0(arg){
$wnd.console.info.apply($wnd.console, arg);
}
function $log(arg){
$wnd.console.log.apply($wnd.console, arg);
}
function ConsoleBrowser$ConsoleImpl(){
}
defineClass(505, 1, {}, ConsoleBrowser$ConsoleImpl);
_.error_0 = function(arg){
$error_0(arg);
}
;
_.info_0 = function(arg){
$info_0(arg);
}
;
var Lcom_google_gwt_query_client_impl_ConsoleBrowser$ConsoleImpl_2_classLit = createForClass('com.google.gwt.query.client.impl', 'ConsoleBrowser/ConsoleImpl', 505);
function ConsoleBrowser$ConsoleIe9(){
this.init_0();
}
defineClass(221, 505, {}, ConsoleBrowser$ConsoleIe9);
_.error_0 = function(arg){
this.initialized && $error_0(arg);
}
;
_.info_0 = function(arg){
this.initialized && $info_0(arg);
}
;
_.init_0 = function init_1(){
try {
['log', 'info', 'warn', 'error', 'dir', 'clear', 'profile', 'profileEnd'].forEach(function(method){
$wnd.console[method] = this.call($wnd.console[method], $wnd.console);
}
, Function.prototype.bind);
this.initialized = true;
}
catch (e) {
}
}
;
_.initialized = false;
var Lcom_google_gwt_query_client_impl_ConsoleBrowser$ConsoleIe9_2_classLit = createForClass('com.google.gwt.query.client.impl', 'ConsoleBrowser/ConsoleIe9', 221);
function ConsoleBrowser$ConsoleIe8(){
ConsoleBrowser$ConsoleIe9.call(this);
}
defineClass(506, 221, {}, ConsoleBrowser$ConsoleIe8);
_.init_0 = function init_2(){
try {
Function.prototype.call.call($wnd.console.log, $wnd.console, Array.prototype.slice.call(arguments));
this.initialized = true;
}
catch (e) {
}
}
;
var Lcom_google_gwt_query_client_impl_ConsoleBrowser$ConsoleIe8_2_classLit = createForClass('com.google.gwt.query.client.impl', 'ConsoleBrowser/ConsoleIe8', 506);
function $clinit_DocumentStyleImpl(){
$clinit_DocumentStyleImpl = emptyMethod;
cssNumberRegex = new RegExp('^(fillOpacity|fontWeight|lineHeight|opacity|orphans|widows|zIndex|zoom)$', 'i');
sizeRegex = new RegExp('^(client|offset|)(width|height)$', 'i');
}
function $curCSS(this$static, elem, name_0, force){
var o, parent_0, ret, toDetach, lastParent;
if (!elem) {
return '';
}
name_0 = $fixPropertyName(name_0);
ret = $getProperty(elem.style, name_0);
if (force) {
toDetach = null;
isDetached(elem) && (toDetach = (lastParent = $get_0($last($parentsUntil($(elem))), 0) , !lastParent && (lastParent = elem) , $appendChild($doc.body, lastParent) , lastParent));
$test(sizeRegex, name_0)?(ret = $getVisibleSize(this$static, elem, name_0) + 'px'):equalsIgnoreCase('opacity', name_0)?(ret = ($clinit_String() , o = $getOpacity(elem.style) , '' + ((o?true:false)?$num(o):1))):(ret = $getComputedStyle(elem, name_0.replace(/([A-Z])/g, '-$1').toLowerCase(), null));
!!toDetach && (parent_0 = $getParentElement_0(($clinit_DOMImpl() , toDetach)) , !!parent_0 && parent_0.removeChild(toDetach));
}
return ret == null?'':ret;
}
function $fixInlineElement(this$static, e){
if ((e.clientHeight | 0) == 0 && (e.clientWidth | 0) == 0 && $equals_2('inline', $curCSS(this$static, e, 'display', true))) {
$setStyleProperty(e, 'display', 'inline-block');
$setStyleProperty(e, 'width', 'auto');
$setStyleProperty(e, 'height', 'auto');
}
}
function $fixPropertyName(name_0){
if (equalsIgnoreCase('float', name_0)) {
return 'cssFloat';
}
else if (equalsIgnoreCase('for', name_0)) {
return 'htmlFor';
}
return camelize(name_0);
}
function $getComputedStyle(elem, hyphenName, pseudo){
try {
var cStyle = $doc.defaultView.getComputedStyle(elem, pseudo);
return cStyle && cStyle.getPropertyValue?cStyle.getPropertyValue(hyphenName):null;
}
catch (e) {
return null;
}
}
function $getSize(this$static, e, name_0){
var ret;
ret = 0;
$equals_2('width', name_0)?(ret = ($fixInlineElement(this$static, e) , round_int((e.clientWidth | 0) - $num($curCSS(this$static, e, 'paddingLeft', true)) - $num($curCSS(this$static, e, 'paddingRight', true))))):$equals_2('height', name_0)?(ret = ($fixInlineElement(this$static, e) , round_int((e.clientHeight | 0) - $num($curCSS(this$static, e, 'paddingTop', true)) - $num($curCSS(this$static, e, 'paddingBottom', true))))):$equals_2('clientWidth', name_0)?(ret = e.clientWidth | 0):$equals_2('clientHeight', name_0)?(ret = e.clientHeight | 0):$equals_2('offsetWidth', name_0)?(ret = (e.offsetWidth || 0) | 0):$equals_2('offsetHeight', name_0) && (ret = (e.offsetHeight || 0) | 0);
return ret;
}
function $getVisibleSize(this$static, e, name_0){
var display, position, ret, visibility;
if (castTo($get_3(($clinit_SelectorEngine() , filters_0), getHashCode('visible')), 72).f_1(e, 0)) {
ret = $getSize(this$static, e, name_0);
}
else {
display = $curCSS(this$static, e, 'display', false);
position = $curCSS(this$static, e, 'position', false);
visibility = $curCSS(this$static, e, 'visibility', false);
$setStyleProperty(e, 'display', 'block');
$setStyleProperty(e, 'position', 'absolute');
$setStyleProperty(e, 'visibility', 'hidden');
ret = $getSize(this$static, e, name_0);
$setStyleProperty(e, 'display', display);
$setStyleProperty(e, 'position', position);
$setStyleProperty(e, 'visibility', visibility);
}
return ret;
}
function $num(val){
val = $replaceAll_0($trim(val), '[^\\d\\.\\-]+.*$', '');
return (val?true:false)?__parseAndValidateDouble(val):0;
}
function $setStyleProperty(e, prop, val){
if (!e || prop == null) {
return;
}
prop = $fixPropertyName(prop);
matches(prop, '^[A-Z]+$') && (prop = ($clinit_String() , prop.toLowerCase()));
prop = camelize(prop);
if (val == null || length_1($trim(val)) == 0) {
e.style[prop] = '';
}
else {
matches(val, '-?[\\d\\.]+') && !$test(cssNumberRegex, prop) && (val += 'px');
e.style[prop] = val;
}
}
function DocumentStyleImpl(){
$clinit_DocumentStyleImpl();
}
defineClass(521, 1, {}, DocumentStyleImpl);
var cssNumberRegex, sizeRegex;
var Lcom_google_gwt_query_client_impl_DocumentStyleImpl_2_classLit = createForClass('com.google.gwt.query.client.impl', 'DocumentStyleImpl', 521);
function $clinit_SelectorEngine(){
$clinit_SelectorEngine = emptyMethod;
hasQuerySelector = $doc.location.href.indexOf('_force_no_native') < 0 && typeof $doc.querySelectorAll == 'function';
filters_0 = {};
$put_0(filters_0, 'visible', new SelectorEngine$1);
$put_0(filters_0, 'hidden', new SelectorEngine$2);
$put_0(filters_0, 'selected', new SelectorEngine$3);
$put_0(filters_0, 'input', new SelectorEngine$4);
$put_0(filters_0, 'header', new SelectorEngine$5);
}
function $filter_0(nodes, p){
var e, i_0, j, l, res;
res = create_2(null);
for (i_0 = 0 , l = nodes.length , j = 0; i_0 < l; i_0++) {
e = nodes[i_0];
p.f_1(e, i_0) && $addNode_0(res, e, j++);
}
return res;
}
function $filter_1(this$static, nodes, selector){
return $filter_2(this$static, nodes, selector, this$static.filterDetached);
}
function $filter_2(this$static, nodes, selector, filterDetached){
var e, e$iterator, el, elmList, entry, ghostParent, i_0, i0, l, l0, n, old, outerIter, p, parents, res;
res = create_2(null);
if (($clinit_String() , selector.length) == 0) {
return res;
}
ghostParent = null;
parents = new HashSet;
elmList = new HashSet;
for (i0 = 0 , l0 = nodes.length; i0 < l0; i0++) {
e = nodes[i0];
if (e == ($clinit_GQuery() , window_1) || e == document_1 || e.nodeName == null || equalsIgnoreCase('html', e.nodeName)) {
continue;
}
elmList.map_0.put(e, elmList);
if (filterDetached) {
p = $getParentElement_0(($clinit_DOMImpl() , e));
if (!p) {
if (!ghostParent) {
ghostParent = $createDivElement($doc);
parents.map_0.put(ghostParent, parents);
}
p = ghostParent;
p.appendChild(e);
}
else
parents.map_0.containsKey(p) || (old = parents.map_0.put(p, parents) , old == null);
}
else
parents.map_0.size_2() == 0 && $add_9(parents, document_1);
}
for (e$iterator = (outerIter = (new AbstractMap$1(parents.map_0)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter)); e$iterator.val$outerIter2.hasNext_0();) {
e = (entry = castTo(e$iterator.val$outerIter2.next_1(), 9) , castToJso(entry.getKey()));
n = $select_0(this$static, selector, e);
for (i_0 = 0 , l = n.length; i_0 < l; i_0++) {
el = n[i_0];
elmList.map_0.remove_1(el) != null && $add(res, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 1), $intern_0, 0, 2, [el]));
}
}
!!ghostParent && (ghostParent.innerHTML = '' , undefined);
return res;
}
function $select_0(this$static, selector, ctx){
var a, nodes, pred, pseudo, r, res, s, s$array, s$index, s$max, select;
if ($test(this$static.nativePseudo, selector)) {
while (r = $exec_0(this$static.nativePseudo, selector)) {
selector = r[1] + ':' + r[3];
$equals_2(r[3], r[2]) || (selector += ':' + r[2]);
selector += '' + r[4];
}
}
if ($test(this$static.gQueryPseudo, selector)) {
res = create_2(null);
for (s$array = $split($trim(selector), '\\s*,\\s*') , s$index = 0 , s$max = s$array.length; s$index < s$max; ++s$index) {
s = s$array[s$index];
a = $exec_0(this$static.gQueryPseudo, s);
if (a) {
select = ($clinit_String() , a[1].length) == 0?'*':a[1];
pseudo = a[2];
pred = castTo($get_3(filters_0, getHashCode(pseudo.toLowerCase())), 72);
pred?(nodes = $filter_0($select_0(this$static, select, ctx), pred)):$test(this$static.nativePseudo, pseudo)?(nodes = $select_0(this$static, select, ctx)):(nodes = $select_0(this$static, select + '[type=' + pseudo + ']', ctx));
}
else {
nodes = $select_0(this$static, s, ctx);
}
copyNodeList(res, nodes);
}
return res;
}
else {
return this$static.impl.select_0(selector, ctx);
}
}
function SelectorEngine(){
$clinit_SelectorEngine();
this.gQueryPseudo = new RegExp('(.*):((visible|hidden|selected|input|header)|((button|checkbox|file|hidden|image|password|radio|reset|submit|text)\\s*(,|$)))(.*)', 'i');
this.nativePseudo = new RegExp('(.*):([\\w]+):(disabled|checked|enabled|empty|focus)\\s*([:,].*|$)', 'i');
this.impl = castTo(create_com_google_gwt_query_client_impl_SelectorEngineImpl(), 99);
'GQuery - Created SelectorEngineImpl: ' + $getName(this.impl.___clazz);
styleImpl_0 = new DocumentStyleImpl;
$ensureNamesAreInitialized(Lcom_google_gwt_query_client_impl_DocumentStyleImpl_2_classLit);
}
function xpathEvaluate(selector, ctx, r){
$clinit_SelectorEngine();
var node;
var ownerDoc = ctx && (ctx.ownerDocument || ctx);
var evalDoc = ownerDoc?ownerDoc:$doc;
var result = evalDoc.evaluate(selector, ctx, null, 0, null);
while (node = result.iterateNext()) {
r.push(node);
}
return r;
}
defineClass(174, 1, {115:1}, SelectorEngine);
_.select_0 = function(selector, ctx){
return $select_0(this, selector, ctx);
}
;
_.filterDetached = true;
var filters_0, hasQuerySelector = false, styleImpl_0;
var Lcom_google_gwt_query_client_impl_SelectorEngine_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngine', 174);
function SelectorEngine$1(){
}
defineClass(522, 72, $intern_20, SelectorEngine$1);
_.f_1 = function(e, index_0){
return ((e.offsetWidth || 0) | 0) + ((e.offsetHeight || 0) | 0) > 0 && !equalsIgnoreCase('none', $curCSS(($clinit_SelectorEngine() , styleImpl_0), e, 'display', true));
}
;
var Lcom_google_gwt_query_client_impl_SelectorEngine$1_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngine/1', 522);
function SelectorEngine$2(){
}
defineClass(523, 72, $intern_20, SelectorEngine$2);
_.f_1 = function(e, index_0){
return !castTo($get_3(($clinit_SelectorEngine() , filters_0), getHashCode('visible')), 72).f_1(e, index_0);
}
;
var Lcom_google_gwt_query_client_impl_SelectorEngine$2_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngine/2', 523);
function SelectorEngine$3(){
}
defineClass(524, 72, $intern_20, SelectorEngine$3);
_.f_1 = function(e, index_0){
return !!e['selected'];
}
;
var Lcom_google_gwt_query_client_impl_SelectorEngine$3_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngine/3', 524);
function SelectorEngine$4(){
}
defineClass(525, 72, $intern_20, SelectorEngine$4);
_.f_1 = function(e, index_0){
return matches(toLowerCase(e.nodeName), 'input|select|textarea|button');
}
;
var Lcom_google_gwt_query_client_impl_SelectorEngine$4_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngine/4', 525);
function SelectorEngine$5(){
}
defineClass(526, 72, $intern_20, SelectorEngine$5);
_.f_1 = function(e, index_0){
return matches(toLowerCase(e.nodeName), 'h\\d');
}
;
var Lcom_google_gwt_query_client_impl_SelectorEngine$5_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngine/5', 526);
defineClass(99, 1, $intern_22);
var Lcom_google_gwt_query_client_impl_SelectorEngineImpl_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngineImpl', 99);
function $clinit_SelectorEngineCssToXPath(){
$clinit_SelectorEngineCssToXPath = emptyMethod;
rc_scp = new SelectorEngineCssToXPath$1;
rc_$Attr = new SelectorEngineCssToXPath$2;
rc_Not = new SelectorEngineCssToXPath$3;
rc_nth_child = new SelectorEngineCssToXPath$4;
regs = stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, ["(['\\[])([^'\\]]*)([\\s\\.#])([^'\\]]*)(['\\]])", rc_scp, '\\[([^@\\]~\\$\\*\\^\\|\\!]+)(=[^\\]]+)?\\]', '[@$1$2]', '\\s*,\\s*', '|.//', '\\s*(\\+|~|>)\\s*', '$1', '([\\w\\-\\*])~([\\w\\-\\*])', '$1/following-sibling::$2', '([\\w\\-\\*])\\+([\\w\\-\\*])', '$1/following-sibling::*[1]/self::$2', '([\\w\\-\\*])>([\\w\\-\\*])', '$1/$2', '\\[([^=]+)=([^\'|"][^\\]]*)\\]', "[$1='$2']", '(^|[^\\w\\-\\*])(#|\\.)([\\w\\-]+)', '$1*$2$3', '([\\>\\+\\|\\~\\,\\s])([a-zA-Z\\*]+)', '$1//$2', '\\s+//', '//', '([\\w\\-\\*]+):first-child', '*[1]/self::$1', '([\\w\\-\\*]+):last-child', '$1[not(following-sibling::*)]', '([\\w\\-\\*]+):only-child', '*[last()=1]/self::$1', '([\\w\\-\\*]+):empty', '$1[not(*) and not(normalize-space())]', ':odd', ':nth-child(even)', ':even', ':nth-child(odd)', '(.+):not\\(([^\\)]*)\\)', rc_Not, '([a-zA-Z0-9\\_\\-\\*]*|\\]):nth-child\\(([^\\)]*)\\)', rc_nth_child, ':contains\\(([^\\)]*)\\)', "[contains(string(.),'$1')]", '\\[([\\w\\-]+)\\|=([^\\]]+)\\]', "[@$1=$2 or starts-with(@$1,concat($2,'-'))]", '\\[([\\w\\-]+)\\*=([^\\]]+)\\]', '[contains(@$1,$2)]', '\\[([\\w\\-]+)~=([^\\]]+)\\]', "[contains(concat(' ',normalize-space(@$1),' '),concat(' ',$2,' '))]", '\\[([\\w\\-]+)\\^=([^\\]]+)\\]', '[starts-with(@$1,$2)]', '\\[([\\w\\-]+)\\$=([^\\]]+)\\]', rc_$Attr, '\\[([\\w\\-]+)\\!=([^\\]]+)\\]', '[not(@$1) or @$1!=$2]', '#([\\w\\-]+)', "[@id='$1']", '\\.([\\w\\-]+)', "[contains(concat(' ',normalize-space(@class),' '),' $1 ')]", '\\]\\[([^\\]]+)', ' and ($1)', ':(enabled)', '[not(@disabled)]', ':(checked)', "[@$1='$1']", ':(disabled)', '[@$1]', ':(first)', '[1]', ':(last)', '[last()]', '(^|\\|[\\./]*)(\\[)', '$1*$2', '%S%', ' ', '%P%', '.', '%H%', '#', "'+", "'"]);
new SelectorEngineCssToXPath$6;
}
function $css2Xpath(selector){
var i_0, ret;
ret = selector;
for (i_0 = 0; i_0 < regs.length;) {
ret = $replaceAll(ret, toString__Ljava_lang_String___devirtual$(regs[i_0++]), regs[i_0++]);
}
return './/' + ret;
}
function SelectorEngineCssToXPath(){
$clinit_SelectorEngineCssToXPath();
instance_1 = this;
}
defineClass(239, 99, $intern_22, SelectorEngineCssToXPath);
_.select_0 = function(sel, ctx){
var elm, xsel;
!cache_0 && (cache_0 = {});
xsel = castToString($get_4(cache_0, sel));
if (xsel == null) {
xsel = $equals_2(($clinit_String() , sel.substr(0, 2)), './') || $equals_2(sel.substr(0, 1), '/')?sel:$css2Xpath(sel);
$put_1(cache_0, sel, xsel);
}
elm = create_2(null);
try {
xpathEvaluate(xsel, ctx, elm);
return $unique(elm);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 16)) {
return elm;
}
else
throw unwrap($e0);
}
}
;
var cache_0, instance_1, rc_$Attr, rc_Not, rc_nth_child, rc_scp, regs;
var Lcom_google_gwt_query_client_impl_SelectorEngineCssToXPath_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngineCssToXPath', 239);
function SelectorEngineCssToXPath$1(){
}
defineClass(579, 1, $intern_23, SelectorEngineCssToXPath$1);
_.foundMatch = function(s){
return checkCriticalElementIndex(1, s.array.length) , castToString(s.array[1]) + ('' + (checkCriticalElementIndex(2, s.array.length) , castToString(s.array[2]))) + ($startsWith((checkCriticalElementIndex(3, s.array.length) , castToString(s.array[3])), ' ')?'%S%':$startsWith((checkCriticalElementIndex(3, s.array.length) , castToString(s.array[3])), '#')?'%H%':'%P%') + (checkCriticalElementIndex(4, s.array.length) , castToString(s.array[4])) + (checkCriticalElementIndex(5, s.array.length) , castToString(s.array[5]));
}
;
var Lcom_google_gwt_query_client_impl_SelectorEngineCssToXPath$1_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngineCssToXPath/1', 579);
function SelectorEngineCssToXPath$2(){
}
defineClass(580, 1, $intern_23, SelectorEngineCssToXPath$2);
_.foundMatch = function(s){
return checkCriticalElementIndex(1, s.array.length) , '[substring(@' + castToString(s.array[1]) + ',string-length(@' + (checkCriticalElementIndex(1, s.array.length) , castToString(s.array[1])) + ')-' + (length_1($replaceAll_0((checkCriticalElementIndex(2, s.array.length) , castToString(s.array[2])), "'", '')) - 1) + ')=' + (checkCriticalElementIndex(2, s.array.length) , castToString(s.array[2])) + ']';
}
;
var Lcom_google_gwt_query_client_impl_SelectorEngineCssToXPath$2_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngineCssToXPath/2', 580);
function SelectorEngineCssToXPath$3(){
}
defineClass(581, 1, $intern_23, SelectorEngineCssToXPath$3);
_.foundMatch = function(s){
return checkCriticalElementIndex(1, s.array.length) , castToString(s.array[1]) + '[not(' + $replaceAll_0($css2Xpath(($clinit_SelectorEngineCssToXPath() , !instance_1 && (instance_1 = new SelectorEngineCssToXPath) , checkCriticalElementIndex(2, s.array.length) , castToString(s.array[2]))), '^[^\\[]+\\[([^\\]]*)\\].*$', '$1)]');
}
;
var Lcom_google_gwt_query_client_impl_SelectorEngineCssToXPath$3_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngineCssToXPath/3', 581);
function SelectorEngineCssToXPath$4(){
}
defineClass(582, 1, $intern_23, SelectorEngineCssToXPath$4);
_.foundMatch = function(s){
var afterAttr, noPrefix, prefix, s1, s2, t, t0, t1;
s1 = (checkCriticalElementIndex(1, s.array.length) , castToString(s.array[1]));
s2 = (checkCriticalElementIndex(2, s.array.length) , castToString(s.array[2]));
afterAttr = $equals_2(']', s1);
prefix = afterAttr?s1:'*';
noPrefix = afterAttr || s1 == null || ($clinit_String() , s1.length) == 0;
if ($equals_2('n', s2)) {
return s1;
}
if ($equals_2('even', s2)) {
return prefix + '[position() mod 2=0 and position()>=0]' + (noPrefix?'':'/self::' + s1);
}
if ($equals_2('odd', s2)) {
prefix = afterAttr?prefix:noPrefix?'':s1;
return prefix + '[(count(preceding-sibling::*) + 1) mod 2=1]';
}
if (($clinit_String() , s2.indexOf('n')) == -1) {
return prefix + '[position() = ' + s2 + ']' + (noPrefix?'':'/self::' + s1);
}
t = $split($replaceAll_0(s2, '^([0-9]*)n.*?([0-9]*)?$', '$1+$2'), '\\+');
t0 = t[0];
t1 = t.length > 1?t[1]:'0';
return prefix + '[(position()-' + t1 + ') mod ' + t0 + '=0 and position()>=' + t1 + ']' + (noPrefix?'':'/self::' + s1);
}
;
var Lcom_google_gwt_query_client_impl_SelectorEngineCssToXPath$4_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngineCssToXPath/4', 582);
function $replaceAll(s, r, o){
var a, args, callback, f, i_0, p;
p = new RegExp(r);
if (instanceOf(o, 158)) {
callback = castTo(o, 158);
while (p.test(s)) {
a = p.exec(s);
args = new ArrayList;
for (i_0 = 0; !!a && i_0 < a.length; i_0++) {
$add_7(args, a[i_0]);
}
f = callback.foundMatch(args);
s = $replaceFirst(s, r, f);
}
return s;
}
else {
return $replaceAll_0(s, r, toString__Ljava_lang_String___devirtual$(o));
}
}
function SelectorEngineCssToXPath$6(){
}
defineClass(583, 1, {}, SelectorEngineCssToXPath$6);
var Lcom_google_gwt_query_client_impl_SelectorEngineCssToXPath$6_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngineCssToXPath/6', 583);
function SelectorEngineNative(){
if (!impl_2) {
impl_2 = castTo(create_com_google_gwt_query_client_impl_HasSelector(), 115);
'GQuery - Created HasSelector: ' + $getName(getClass__Ljava_lang_Class___devirtual$(impl_2));
}
}
defineClass(568, 99, $intern_22, SelectorEngineNative);
_.select_0 = function(selector, ctx){
var e, xsel;
if (($clinit_String() , selector.indexOf('!=')) != -1) {
!cache_1 && (cache_1 = {});
xsel = castToString($get_4(cache_1, selector));
if (xsel == null) {
xsel = $replaceAll_0(selector, '(\\[\\w+)!(=[^\\]]+\\])', ':not($1$2)');
$put_1(cache_1, selector, xsel);
}
selector = xsel;
}
if (!($clinit_SelectorEngine() , hasQuerySelector) || matches(selector, NATIVE_EXCEPTIONS_REGEXP)) {
return impl_2.select_0(selector, ctx);
}
else {
try {
return ctx.querySelectorAll(selector);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 16)) {
e = $e0;
$info(($clinit_GQuery() , console_1), 'ERROR SelectorEngineNative ' + e.getMessage() + ' ' + selector + ', falling back to ' + $replaceAll_0($getName(getClass__Ljava_lang_Class___devirtual$(impl_2)), '.*\\.', ''));
return impl_2.select_0(selector, ctx);
}
else
throw unwrap($e0);
}
}
}
;
var NATIVE_EXCEPTIONS_REGEXP = '(^[\\./]/.*)|(.*(:contains|:first([^-]|$)|:last([^-]|$)|:even|:odd)).*', cache_1, impl_2;
var Lcom_google_gwt_query_client_impl_SelectorEngineNative_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngineNative', 568);
function SelectorEngineNativeMin(){
}
defineClass(569, 99, $intern_22, SelectorEngineNativeMin);
_.select_0 = function(selector, ctx){
var e;
try {
return $clinit_SelectorEngine() , ctx.querySelectorAll(selector);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 16)) {
e = $e0;
$error(($clinit_GQuery() , console_1), "GwtQuery: Selector '" + selector + "' is unsupported in this SelectorEngineNativeMin engine." + ' Do not use this syntax or configure your module to use a JS fallback. ' + e.getMessage());
return null;
}
else
throw unwrap($e0);
}
}
;
var Lcom_google_gwt_query_client_impl_SelectorEngineNativeMin_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngineNativeMin', 569);
function SelectorEngineNativeMinIE8(){
}
defineClass(570, 99, $intern_22, SelectorEngineNativeMinIE8);
_.select_0 = function(selector, ctx){
var e;
try {
return $clinit_SelectorEngine() , ctx.querySelectorAll(selector);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 16)) {
e = $e0;
$error(($clinit_GQuery() , console_1), "GwtQuery: Selector '" + selector + "' is unsupported in this SelectorEngineNativeMinIE8 engine," + " check that you are in 'standards mode' or configure your module to use JS fallback. " + e.getMessage());
return null;
}
else
throw unwrap($e0);
}
}
;
var Lcom_google_gwt_query_client_impl_SelectorEngineNativeMinIE8_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngineNativeMinIE8', 570);
function SelectorEngineSizzleIE(){
initialize();
}
function initialize(){
(function(){
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, done = 0, toString_0 = Object.prototype.toString, hasDuplicate = false;
var IES = function(selector, context, results, seed){
results = results || [];
context = context || document;
var origContext = context;
if (context.nodeType !== 1 && context.nodeType !== 9) {
return [];
}
if (!selector || typeof selector !== 'string') {
return results;
}
var parts = [], m, set_0, checkSet, extra, prune = true, contextXML = IES.isXML(context), soFar = selector, ret, cur, pop_0, i_0;
do {
chunker.exec('');
m = chunker.exec(soFar);
if (m) {
soFar = m[3];
parts.push(m[1]);
if (m[2]) {
extra = m[3];
break;
}
}
}
while (m);
if (parts.length > 1 && origPOS.exec(selector)) {
if (parts.length === 2 && Expr.relative[parts[0]]) {
set_0 = posProcess(parts[0] + parts[1], context);
}
else {
set_0 = Expr.relative[parts[0]]?[context]:IES(parts.shift(), context);
while (parts.length) {
selector = parts.shift();
Expr.relative[selector] && (selector += parts.shift());
set_0 = posProcess(selector, set_0);
}
}
}
else {
if (!seed && parts.length > 1 && context.nodeType === 9 && !contextXML && Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1])) {
ret = IES.find(parts.shift(), context, contextXML);
context = ret.expr?IES.filter(ret.expr, ret.set)[0]:ret.set[0];
}
if (context) {
ret = seed?{expr:parts.pop(), set:makeArray(seed)}:IES.find(parts.pop(), parts.length === 1 && (parts[0] === '~' || parts[0] === '+') && context.parentNode?context.parentNode:context, contextXML);
set_0 = ret.expr?IES.filter(ret.expr, ret.set):ret.set;
parts.length > 0?(checkSet = makeArray(set_0)):(prune = false);
while (parts.length) {
cur = parts.pop();
pop_0 = cur;
!Expr.relative[cur]?(cur = '-'):(pop_0 = parts.pop());
pop_0 == null && (pop_0 = context);
Expr.relative[cur](checkSet, pop_0, contextXML);
}
}
else {
checkSet = parts = [];
}
}
!checkSet && (checkSet = set_0);
!checkSet && IES.error(cur || selector);
if (toString_0.call(checkSet) === '[object Array]') {
if (!prune) {
results.push.apply(results, checkSet);
}
else if (context && context.nodeType === 1) {
for (i_0 = 0; checkSet[i_0] != null; i_0++) {
checkSet[i_0] && (checkSet[i_0] === true || checkSet[i_0].nodeType === 1 && IES.contains(context, checkSet[i_0])) && results.push(set_0[i_0]);
}
}
else {
for (i_0 = 0; checkSet[i_0] != null; i_0++) {
checkSet[i_0] && checkSet[i_0].nodeType === 1 && results.push(set_0[i_0]);
}
}
}
else {
makeArray(checkSet, results);
}
if (extra) {
IES(extra, origContext, results, seed);
IES.uniqueSort(results);
}
return results;
}
;
IES.uniqueSort = function(results){
if (sortOrder) {
hasDuplicate = false;
results.sort(sortOrder);
if (hasDuplicate) {
for (var i_0 = 1; i_0 < results.length; i_0++) {
results[i_0] === results[i_0 - 1] && results.splice(i_0--, 1);
}
}
}
return results;
}
;
IES.matches = function(expr, set_0){
return IES(expr, null, null, set_0);
}
;
IES.find = function(expr, context, isXML){
var set_0;
if (!expr) {
return [];
}
for (var i_0 = 0, l = Expr.order.length; i_0 < l; i_0++) {
var type_0 = Expr.order[i_0], match_0;
if (match_0 = Expr.leftMatch[type_0].exec(expr)) {
var left = match_0[1];
match_0.splice(1, 1);
if (left.substr(left.length - 1) !== '\\') {
match_0[1] = (match_0[1] || '').replace(/\\/g, '');
set_0 = Expr.find[type_0](match_0, context, isXML);
if (set_0 != null) {
expr = expr.replace(Expr.match[type_0], '');
break;
}
}
}
}
!set_0 && (set_0 = context.getElementsByTagName('*'));
return {set:set_0, expr:expr};
}
;
IES.filter = function(expr, set_0, inplace, not){
var old = expr, result = [], curLoop = set_0, match_0, anyFound, isXMLFilter = set_0 && set_0[0] && IES.isXML(set_0[0]);
while (expr && set_0.length) {
for (var type_0 in Expr.filter) {
if ((match_0 = Expr.leftMatch[type_0].exec(expr)) != null && match_0[2]) {
var filter = Expr.filter[type_0], found, item_0, left = match_0[1];
anyFound = false;
match_0.splice(1, 1);
if (left.substr(left.length - 1) === '\\') {
continue;
}
curLoop === result && (result = []);
if (Expr.preFilter[type_0]) {
match_0 = Expr.preFilter[type_0](match_0, curLoop, inplace, result, not, isXMLFilter);
if (!match_0) {
anyFound = found = true;
}
else if (match_0 === true) {
continue;
}
}
if (match_0) {
for (var i_0 = 0; (item_0 = curLoop[i_0]) != null; i_0++) {
if (item_0) {
found = filter(item_0, match_0, i_0, curLoop);
var pass = not ^ !!found;
if (inplace && found != null) {
pass?(anyFound = true):(curLoop[i_0] = false);
}
else if (pass) {
result.push(item_0);
anyFound = true;
}
}
}
}
if (found !== undefined) {
!inplace && (curLoop = result);
expr = expr.replace(Expr.match[type_0], '');
if (!anyFound) {
return [];
}
break;
}
}
}
if (expr === old) {
if (anyFound == null) {
IES.error(expr);
}
else {
break;
}
}
old = expr;
}
return curLoop;
}
;
IES.error = function(msg){
throw 'Syntax error, unrecognized expression: ' + msg;
}
;
var Expr = IES.selectors = {order:['ID', 'NAME', 'TAG'], match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/, POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/}, leftMatch:{}, attrMap:{'class':'className', 'for':'htmlFor'}, attrHandle:{href:function(elem){
return elem.getAttribute('href', 2);
}
}, relative:{'+':function(checkSet, part){
var isPartStr = typeof part === 'string', isTag = isPartStr && !/\W/.test(part), isPartStrNotTag = isPartStr && !isTag;
isTag && (part = part.toLowerCase());
for (var i_0 = 0, l = checkSet.length, elem; i_0 < l; i_0++) {
if (elem = checkSet[i_0]) {
while ((elem = elem.previousSibling) && elem.nodeType !== 1) {
}
checkSet[i_0] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part?elem || false:elem === part;
}
}
isPartStrNotTag && IES.filter(part, checkSet, true);
}
, '>':function(checkSet, part){
var isPartStr = typeof part === 'string', elem, i_0 = 0, l = checkSet.length;
if (isPartStr && !/\W/.test(part)) {
part = part.toLowerCase();
for (; i_0 < l; i_0++) {
elem = checkSet[i_0];
if (elem) {
var parent_0 = elem.parentNode;
checkSet[i_0] = parent_0.nodeName.toLowerCase() === part?parent_0:false;
}
}
}
else {
for (; i_0 < l; i_0++) {
elem = checkSet[i_0];
elem && (checkSet[i_0] = isPartStr?elem.parentNode:elem.parentNode === part);
}
isPartStr && IES.filter(part, checkSet, true);
}
}
, '-':function(checkSet, part, isXML){
var doneName = done++, checkFn = dirCheck, nodeCheck;
if (typeof part === 'string' && !/\W/.test(part)) {
part = part.toLowerCase();
nodeCheck = part;
checkFn = dirNodeCheck;
}
checkFn('parentNode', part, doneName, checkSet, nodeCheck, isXML);
}
, '~':function(checkSet, part, isXML){
var doneName = done++, checkFn = dirCheck, nodeCheck;
if (typeof part === 'string' && !/\W/.test(part)) {
part = part.toLowerCase();
nodeCheck = part;
checkFn = dirNodeCheck;
}
checkFn('previousSibling', part, doneName, checkSet, nodeCheck, isXML);
}
}, find:{ID:function(match_0, context, isXML){
if (typeof context.getElementById !== 'undefined' && !isXML) {
var m = context.getElementById(match_0[1]);
return m?m.id === match_0[1] || typeof m.getAttributeNode !== 'undefined' && m.getAttributeNode('id').nodeValue === match_0[1]?[m]:undefined:[];
}
}
, NAME:function(match_0, context){
if (typeof context.getElementsByName !== 'undefined') {
var ret = [], results = context.getElementsByName(match_0[1]);
for (var i_0 = 0, l = results.length; i_0 < l; i_0++) {
results[i_0].getAttribute('name') === match_0[1] && ret.push(results[i_0]);
}
return ret.length === 0?null:ret;
}
}
, TAG:function(match_0, context){
var results = context.getElementsByTagName(match_0[1]);
if (match_0[1] === '*') {
var tmp = [];
for (var i_0 = 0; results[i_0]; i_0++) {
results[i_0].nodeType === 1 && tmp.push(results[i_0]);
}
results = tmp;
}
return results;
}
}, preFilter:{CLASS:function(match_0, curLoop, inplace, result, not, isXML){
match_0 = ' ' + match_0[1].replace(/\\/g, '') + ' ';
if (isXML) {
return match_0;
}
for (var i_0 = 0, elem; (elem = curLoop[i_0]) != null; i_0++) {
elem && (not ^ (elem.className && (' ' + elem.className + ' ').replace(/[\t\n]/g, ' ').indexOf(match_0) >= 0)?!inplace && result.push(elem):inplace && (curLoop[i_0] = false));
}
return false;
}
, ID:function(match_0){
return match_0[1].replace(/\\/g, '');
}
, TAG:function(match_0, curLoop){
return match_0[1].toLowerCase();
}
, CHILD:function(match_0){
if (match_0[1] === 'nth') {
var test_0 = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(match_0[2] === 'even' && '2n' || match_0[2] === 'odd' && '2n+1' || !/\D/.test(match_0[2]) && '0n+' + match_0[2] || match_0[2]);
match_0[2] = test_0[1] + (test_0[2] || 1) - 0;
match_0[3] = test_0[3] - 0;
}
match_0[0] = done++;
return match_0;
}
, ATTR:function(match_0, curLoop, inplace, result, not, isXML){
var name_0 = match_0[1].replace(/\\/g, '');
!isXML && Expr.attrMap[name_0] && (match_0[1] = Expr.attrMap[name_0]);
match_0[2] === '~=' && (match_0[4] = ' ' + match_0[4] + ' ');
return match_0;
}
, PSEUDO:function(match_0, curLoop, inplace, result, not){
if (match_0[1] === 'not') {
if ((chunker.exec(match_0[3]) || '').length > 1 || /^\w/.test(match_0[3])) {
match_0[3] = IES(match_0[3], null, null, curLoop);
}
else {
var ret = IES.filter(match_0[3], curLoop, inplace, true ^ not);
!inplace && result.push.apply(result, ret);
return false;
}
}
else if (Expr.match.POS.test(match_0[0]) || Expr.match.CHILD.test(match_0[0])) {
return true;
}
return match_0;
}
, POS:function(match_0){
match_0.unshift(true);
return match_0;
}
}, filters:{enabled:function(elem){
return elem.disabled === false && elem.type !== 'hidden';
}
, disabled:function(elem){
return elem.disabled === true;
}
, checked:function(elem){
return elem.checked === true;
}
, selected:function(elem){
return elem.selected === true;
}
, parent:function(elem){
return !!elem.firstChild;
}
, empty:function(elem){
return !elem.firstChild;
}
, has:function(elem, i_0, match_0){
return !!IES(match_0[3], elem).length;
}
, header:function(elem){
return /h\d/i.test(elem.nodeName);
}
, text:function(elem){
return 'text' === elem.type;
}
, radio:function(elem){
return 'radio' === elem.type;
}
, checkbox:function(elem){
return 'checkbox' === elem.type;
}
, file:function(elem){
return 'file' === elem.type;
}
, password:function(elem){
return 'password' === elem.type;
}
, submit:function(elem){
return 'submit' === elem.type;
}
, image:function(elem){
return 'image' === elem.type;
}
, reset:function(elem){
return 'reset' === elem.type;
}
, button:function(elem){
return 'button' === elem.type || elem.nodeName.toLowerCase() === 'button';
}
, input:function(elem){
return /input|select|textarea|button/i.test(elem.nodeName);
}
}, setFilters:{first:function(elem, i_0){
return i_0 === 0;
}
, last:function(elem, i_0, match_0, array){
return i_0 === array.length - 1;
}
, even:function(elem, i_0){
return i_0 % 2 === 0;
}
, odd:function(elem, i_0){
return i_0 % 2 === 1;
}
, lt:function(elem, i_0, match_0){
return i_0 < match_0[3] - 0;
}
, gt:function(elem, i_0, match_0){
return i_0 > match_0[3] - 0;
}
, nth:function(elem, i_0, match_0){
return match_0[3] - 0 === i_0;
}
, eq:function(elem, i_0, match_0){
return match_0[3] - 0 === i_0;
}
}, filter:{PSEUDO:function(elem, match_0, i_0, array){
var name_0 = match_0[1], filter = Expr.filters[name_0];
if (filter) {
return filter(elem, i_0, match_0, array);
}
else if (name_0 === 'contains') {
return (elem.textContent || elem.innerText || IES.getText([elem]) || '').indexOf(match_0[3]) >= 0;
}
else if (name_0 === 'not') {
var not = match_0[3];
for (var j = 0, l = not.length; j < l; j++) {
if (not[j] === elem) {
return false;
}
}
return true;
}
else {
IES.error('Syntax error, unrecognized expression: ' + name_0);
}
}
, CHILD:function(elem, match_0){
var type_0 = match_0[1], node = elem;
switch (type_0) {
case 'only':
case 'first':
while (node = node.previousSibling) {
if (node.nodeType === 1) {
return false;
}
}
if (type_0 === 'first') {
return true;
}
node = elem;
case 'last':
while (node = node.nextSibling) {
if (node.nodeType === 1) {
return false;
}
}
return true;
case 'nth':
var first = match_0[2], last = match_0[3];
if (first === 1 && last === 0) {
return true;
}
var doneName = match_0[0], parent_0 = elem.parentNode;
if (parent_0 && (parent_0.sizcache !== doneName || !elem.nodeIndex)) {
var count = 0;
for (node = parent_0.firstChild; node; node = node.nextSibling) {
node.nodeType === 1 && (node.nodeIndex = ++count);
}
parent_0.sizcache = doneName;
}
var diff = elem.nodeIndex - last;
if (first === 0) {
return diff === 0;
}
else {
return diff % first === 0 && diff / first >= 0;
}
}
}
, ID:function(elem, match_0){
var node = typeof elem.getAttributeNode !== 'undefined' && elem.getAttributeNode('id');
return elem.nodeType === 1 && node && node.nodeValue === match_0;
}
, TAG:function(elem, match_0){
return match_0 === '*' && elem.nodeType === 1 || elem.nodeName.toLowerCase() === match_0;
}
, CLASS:function(elem, match_0){
return (' ' + (elem.className || elem.getAttribute('class')) + ' ').indexOf(match_0) > -1;
}
, ATTR:function(elem, match_0){
var name_0 = match_0[1], result = Expr.attrHandle[name_0]?Expr.attrHandle[name_0](elem):elem[name_0] != null?elem[name_0]:elem.getAttribute(name_0), value_0 = result + '', type_0 = match_0[2], check = match_0[4];
return result == null?type_0 === '!=':type_0 === '='?value_0 === check:type_0 === '*='?value_0.indexOf(check) >= 0:type_0 === '~='?(' ' + value_0 + ' ').indexOf(check) >= 0:!check?value_0 && result !== false:type_0 === '!='?value_0 !== check:type_0 === '^='?value_0.indexOf(check) === 0:type_0 === '$='?value_0.substr(value_0.length - check.length) === check:type_0 === '|='?value_0 === check || value_0.substr(0, check.length + 1) === check + '-':false;
}
, POS:function(elem, match_0, i_0, array){
var name_0 = match_0[2], filter = Expr.setFilters[name_0];
if (filter) {
return filter(elem, i_0, match_0, array);
}
}
}};
var origPOS = Expr.match.POS, fescape = function(all, num){
return '\\' + (num - 0 + 1);
}
;
for (var type_1 in Expr.match) {
Expr.match[type_1] = new RegExp(Expr.match[type_1].source + /(?![^\[]*\])(?![^\(]*\))/.source);
Expr.leftMatch[type_1] = new RegExp(/(^(?:.|\r|\n)*?)/.source + Expr.match[type_1].source.replace(/\\(\d+)/g, fescape));
}
var makeArray = function(array, results){
array = Array.prototype.slice.call(array, 0);
if (results) {
results.push.apply(results, array);
return results;
}
return array;
}
;
try {
Array.prototype.slice.call(document.documentElement.childNodes, 0)[0].nodeType;
}
catch (e) {
makeArray = function(array, results){
var ret = results || [], i_0 = 0;
if (toString_0.call(array) === '[object Array]') {
Array.prototype.push.apply(ret, array);
}
else {
if (typeof array.length === 'number') {
for (var l = array.length; i_0 < l; i_0++) {
ret.push(array[i_0]);
}
}
else {
for (; array[i_0]; i_0++) {
ret.push(array[i_0]);
}
}
}
return ret;
}
;
}
var sortOrder = function(a, b){
if (!a.sourceIndex || !b.sourceIndex) {
a == b && (hasDuplicate = true);
return a.sourceIndex?-1:1;
}
var ret = a.sourceIndex - b.sourceIndex;
ret === 0 && (hasDuplicate = true);
return ret;
}
;
IES.getText = function(elems){
var ret = '', elem;
for (var i_0 = 0; elems[i_0]; i_0++) {
elem = elems[i_0];
elem.nodeType === 3 || elem.nodeType === 4?(ret += elem.nodeValue):elem.nodeType !== 8 && (ret += IES.getText(elem.childNodes));
}
return ret;
}
;
function dirNodeCheck(dir_0, cur, doneName, checkSet, nodeCheck, isXML){
for (var i_0 = 0, l = checkSet.length; i_0 < l; i_0++) {
var elem = checkSet[i_0];
if (elem) {
elem = elem[dir_0];
var match_0 = false;
while (elem) {
if (elem.sizcache === doneName) {
match_0 = checkSet[elem.sizset];
break;
}
if (elem.nodeType === 1 && !isXML) {
elem.sizcache = doneName;
elem.sizset = i_0;
}
if (elem.nodeName.toLowerCase() === cur) {
match_0 = elem;
break;
}
elem = elem[dir_0];
}
checkSet[i_0] = match_0;
}
}
}
function dirCheck(dir_0, cur, doneName, checkSet, nodeCheck, isXML){
for (var i_0 = 0, l = checkSet.length; i_0 < l; i_0++) {
var elem = checkSet[i_0];
if (elem) {
elem = elem[dir_0];
var match_0 = false;
while (elem) {
if (elem.sizcache === doneName) {
match_0 = checkSet[elem.sizset];
break;
}
if (elem.nodeType === 1) {
if (!isXML) {
elem.sizcache = doneName;
elem.sizset = i_0;
}
if (typeof cur !== 'string') {
if (elem === cur) {
match_0 = true;
break;
}
}
else if (IES.filter(cur, [elem]).length > 0) {
match_0 = elem;
break;
}
}
elem = elem[dir_0];
}
checkSet[i_0] = match_0;
}
}
}
IES.contains = function(a, b){
return a !== b && (a.contains?a.contains(b):true);
}
;
IES.isXML = function(elem){
var documentElement = (elem?elem.ownerDocument || elem:0).documentElement;
return documentElement?documentElement.nodeName !== 'HTML':false;
}
;
var posProcess = function(selector, context){
var tmpSet = [], later = '', match_0, root = context.nodeType?[context]:context;
while (match_0 = Expr.match.PSEUDO.exec(selector)) {
later += match_0[0];
selector = selector.replace(Expr.match.PSEUDO, '');
}
selector = Expr.relative[selector]?selector + '*':selector;
for (var i_0 = 0, l = root.length; i_0 < l; i_0++) {
IES(selector, root[i_0], tmpSet);
}
return IES.filter(later, tmpSet);
}
;
window.IES = IES;
$wnd.IES = IES;
}
());
}
defineClass(578, 99, $intern_22, SelectorEngineSizzleIE);
_.select_0 = function(selector, context){
var results;
results = [];
return $wnd.IES(selector, context, results, null);
}
;
var Lcom_google_gwt_query_client_impl_SelectorEngineSizzleIE_2_classLit = createForClass('com.google.gwt.query.client.impl', 'SelectorEngineSizzleIE', 578);
function $clear(this$static){
var k, k$array, k$index, k$max;
for (k$array = $keys(this$static) , k$index = 0 , k$max = k$array.length; k$index < k$max; ++k$index) {
k = k$array[k$index];
delete this$static[k];
}
}
function $get_1(this$static, id_0){
return gwtBox([this$static && this$static[id_0]]);
}
function $get_2(this$static, id_0, clz){
var d, o;
o = $get_1(this$static, id_0);
if (o != null && !!clz) {
if (instanceOfDouble(o)) {
d = castToDouble(o);
clz == Ljava_lang_Float_2_classLit?(o = new Float((checkCriticalNotNull(d) , d))):clz == Ljava_lang_Integer_2_classLit?(o = valueOf_2(round_int((checkCriticalNotNull(d) , d)))):clz == Ljava_lang_Long_2_classLit?(o = valueOf_3(fromDouble_0((checkCriticalNotNull(d) , d)))):clz == Ljava_lang_Short_2_classLit?(o = valueOf_4(round_short((checkCriticalNotNull(d) , d)))):clz == Ljava_lang_Byte_2_classLit && (o = valueOf_1(round_byte((checkCriticalNotNull(d) , d))));
}
else
clz == Ljava_lang_Boolean_2_classLit && !instanceOfBoolean(o)?(o = ($clinit_Boolean() , equalsIgnoreCase('true', ($clinit_String() , o == null?'null':toString__Ljava_lang_String___devirtual$(o)))?TRUE_0:FALSE_0)):clz == Ljava_lang_String_2_classLit && !instanceOfString(o) && (o = ($clinit_String() , o == null?'null':toString__Ljava_lang_String___devirtual$(o)));
}
return o;
}
function $getArray(this$static, id_0){
var r = this$static[id_0];
if (Object.prototype.toString.call(r) == '[object Array]') {
return r;
}
return null;
}
function $keys(this$static){
var a, i_0, ret;
a = $keysImpl(this$static);
ret = initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_0, 2, a.length, 5, 1);
for (i_0 = 0; i_0 < a.length; i_0++) {
ret[i_0] = a[i_0];
}
return ret;
}
function $keysImpl(this$static){
var key, keys_0 = [];
for (key in this$static) {
this$static.hasOwnProperty(key) && key != '__gwt_ObjectId' && key != '$H' && keys_0.push(String(key));
}
return keys_0;
}
function $length(this$static){
if (typeof this$static.length == 'number')
return this$static.length;
var key, ret = 0;
for (key in this$static) {
key != '__gwt_ObjectId' && ret++;
}
return ret;
}
function $put(this$static, id_0, obj){
instanceOfBoolean(obj)?$putBoolean(this$static, id_0, unsafeCast(checkNotNull(castToBoolean(obj)))):instanceOf(obj, 58)?$putNumber(this$static, id_0, doubleValue__D__devirtual$(castTo(obj, 58))):(this$static[id_0] = obj , this$static);
return this$static;
}
function $putBoolean(this$static, id_0, b){
this$static[id_0] = b;
return this$static;
}
function $putNumber(this$static, id_0, n){
this$static[id_0] = n;
return this$static;
}
function gwtBox(oneElementArray){
var r = oneElementArray;
if (typeof r == 'object' && r.length == 1) {
var r = r[0], t = typeof r;
if (t == 'boolean')
return $clinit_Boolean() , r?TRUE_0:FALSE_0;
if (t == 'number')
return r;
}
return r || null;
}
function $get_3(this$static, hashCode){
return $get_1(this$static, valueOf_2(hashCode));
}
function $put_0(this$static, key, val){
$put(this$static, valueOf_2(hashCode__I__devirtual$(key)), val);
}
function $get_4(this$static, key){
return $get_1(this$static, key);
}
function $put_1(this$static, key, val){
$put(this$static, key, val);
}
function $addNode(this$static, n){
$add(this$static, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 1), $intern_0, 0, 2, [n]));
}
function $addNode_0(this$static, n, i_0){
$put(this$static, valueOf_2(i_0), n);
}
function create_2(node){
return node?[node]:[];
}
function $add(this$static, vals){
var t, t$index, t$max;
for (t$index = 0 , t$max = vals.length; t$index < t$max; ++t$index) {
t = vals[t$index];
instanceOf(t, 58)?$putNumber(this$static, valueOf_2($length(this$static)), doubleValue__D__devirtual$(castTo(t, 58))):instanceOfBoolean(t)?$putBoolean(this$static, valueOf_2($length(this$static)), unsafeCast(checkNotNull(castToBoolean(t)))):$put(this$static, valueOf_2($length(this$static)), t);
}
return this$static;
}
function camelize(s){
return s.replace(/\-(\w)/g, function(all, letter){
return letter.toUpperCase();
}
);
}
function copyNodeList(oldNodes, newNodes){
var e, i_0, i0, idlist, j, l, ret;
ret = !oldNodes?create_2(null):oldNodes;
idlist = {};
for (i0 = 0; !!oldNodes && i0 < oldNodes.length; i0++) {
e = oldNodes[i0];
$put(idlist, valueOf_2(getObjectIdentityHashCode(e)), valueOf_2(1));
}
for (i_0 = 0 , l = newNodes.length , j = ret.length; i_0 < l; i_0++) {
e = newNodes[i_0];
!!idlist[valueOf_2(getObjectIdentityHashCode(e))] || $addNode_0(ret, newNodes[i_0], j++);
}
return ret;
}
function hasProperty(o, name_0){
var p = name_0.split('.');
for (var i_0 in p) {
if (!(o && p[i_0] in o))
return false;
o = o[p[i_0]];
}
return true;
}
function isArray_0(o){
return Object.prototype.toString.call(o) == '[object Array]' || typeof o.length == 'number';
}
function isDetached(n){
if (equalsIgnoreCase('html', n.nodeName)) {
return false;
}
return !$isOrHasChild((!n || !isElement_0(n)?null:n.nodeType == 9?n:n.ownerDocument).body, n);
}
function isElement_0(o){
return !!o && 'nodeType' in o && 'nodeName' in o;
}
function isFunction(o){
return Object.prototype.toString.call(o) == '[object Function]';
}
function jsni(jso, meth, args){
return runJavascriptFunctionImpl(jso, meth, $add([], args));
}
function parseJSON(json){
try {
return safeEval(json);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 16)) {
return {};
}
else
throw unwrap($e0);
}
}
function prop_0(o, id_0){
return !o?null:$get_1(o, id_0);
}
function prop_1(o, val){
!!o && $put(o, 'sortOrder', val);
}
function runJavascriptFunction(o, meth, args){
return runJavascriptFunctionImpl(o, meth, $add([], args));
}
function runJavascriptFunctionImpl(o, meth, args){
var f = o || $wnd, p = meth.split('.');
for (var i_0 in p) {
o = f;
f = f[p[i_0]];
if (!f)
return null;
}
return isFunction(f) && gwtBox([f.apply(o, args)]);
}
function wrapFunction(f){
return function(r){
var o = new ArrayList;
for (i in arguments) {
r = gwtBox([arguments[i]]);
o.add_2(r);
}
o = o.toArray();
f.setArguments(o);
return f.fe(o);
}
;
}
function $exec(f, data_0){
return gwtBox([f(data_0)]);
}
function JsUtils$JsFunction(f){
Function_0.call(this);
isFunction(f) && (this.jso = f);
}
defineClass(122, 7, $intern_18, JsUtils$JsFunction);
_.equals = function(obj){
return maskUndefined(this.jso) === maskUndefined(obj);
}
;
_.execute_1 = function(){
!!this.jso && $setArguments(this, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [$exec(this.jso, $getArgument(this, 0))]));
}
;
_.f = function(){
!!this.jso && $setArguments(this, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [$exec(this.jso, $getArgument(this, 0))]));
}
;
_.hashCode = function(){
return getObjectIdentityHashCode(this.jso);
}
;
_.jso = null;
var Lcom_google_gwt_query_client_js_JsUtils$JsFunction_2_classLit = createForClass('com.google.gwt.query.client.js', 'JsUtils/JsFunction', 122);
function $JSON2String(o){
return $wnd.JSON.stringify(o);
}
function $unique(a){
var cache, e, i_0, id_0, ret;
ret = [];
cache = {};
for (i_0 = 0; i_0 < a.length; i_0++) {
e = a[i_0];
id_0 = getObjectIdentityHashCode(e);
if (!cache[valueOf_2(id_0)]) {
$putNumber(cache, valueOf_2(id_0), 1);
ret[ret.length] = e;
}
}
return ret;
}
function $clinit_QueuePlugin(){
$clinit_QueuePlugin = emptyMethod;
$clinit_GQuery();
registerPlugin(Lcom_google_gwt_query_client_plugins_QueuePlugin_2_classLit, new QueuePlugin$1);
$ensureNamesAreInitialized(Lcom_google_gwt_query_client_plugins_QueuePlugin_2_classLit);
$ensureNamesAreInitialized(Lcom_google_gwt_query_client_plugins_QueuePlugin_2_classLit);
}
function QueuePlugin(gq){
$clinit_QueuePlugin();
GQuery_2.call(this, gq);
}
defineClass(172, 25, $intern_19, QueuePlugin);
var Lcom_google_gwt_query_client_plugins_QueuePlugin_2_classLit = createForClass('com.google.gwt.query.client.plugins', 'QueuePlugin', 172);
function $clinit_Effects(){
$clinit_Effects = emptyMethod;
$clinit_QueuePlugin();
registerPlugin(Lcom_google_gwt_query_client_plugins_Effects_2_classLit, new Effects$1);
browser.msie?'ms':browser.opera?'o':browser.mozilla?'moz':browser.webkit?'webkit':'';
}
function Effects(gq){
$clinit_Effects();
QueuePlugin.call(this, gq);
}
defineClass(507, 172, $intern_19, Effects);
var Lcom_google_gwt_query_client_plugins_Effects_2_classLit = createForClass('com.google.gwt.query.client.plugins', 'Effects', 507);
function Effects$1(){
}
defineClass(508, 1, $intern_24, Effects$1);
_.init_1 = function(gq){
return new Effects(gq);
}
;
var Lcom_google_gwt_query_client_plugins_Effects$1_2_classLit = createForClass('com.google.gwt.query.client.plugins', 'Effects/1', 508);
function $clinit_Events(){
$clinit_Events = emptyMethod;
$clinit_GQuery();
registerPlugin(Lcom_google_gwt_query_client_plugins_Events_2_classLit, new Events$1);
}
function Events(gq){
$clinit_Events();
GQuery_2.call(this, gq);
}
defineClass(197, 25, $intern_19, Events);
var Lcom_google_gwt_query_client_plugins_Events_2_classLit = createForClass('com.google.gwt.query.client.plugins', 'Events', 197);
function Events$1(){
}
defineClass(266, 1, $intern_24, Events$1);
_.init_1 = function(gq){
return new Events(gq);
}
;
var Lcom_google_gwt_query_client_plugins_Events$1_2_classLit = createForClass('com.google.gwt.query.client.plugins', 'Events/1', 266);
function QueuePlugin$1(){
}
defineClass(509, 1, $intern_24, QueuePlugin$1);
_.init_1 = function(gq){
return new QueuePlugin(gq);
}
;
var Lcom_google_gwt_query_client_plugins_QueuePlugin$1_2_classLit = createForClass('com.google.gwt.query.client.plugins', 'QueuePlugin/1', 509);
function $clinit_Widgets(){
$clinit_Widgets = emptyMethod;
$clinit_QueuePlugin();
registerPlugin(Lcom_google_gwt_query_client_plugins_Widgets_2_classLit, new Widgets$1);
}
function Widgets(gq){
$clinit_Widgets();
QueuePlugin.call(this, gq);
}
defineClass(510, 172, $intern_19, Widgets);
var Lcom_google_gwt_query_client_plugins_Widgets_2_classLit = createForClass('com.google.gwt.query.client.plugins', 'Widgets', 510);
function Widgets$1(){
}
defineClass(511, 1, $intern_24, Widgets$1);
_.init_1 = function(gq){
return new Widgets(gq);
}
;
var Lcom_google_gwt_query_client_plugins_Widgets$1_2_classLit = createForClass('com.google.gwt.query.client.plugins', 'Widgets/1', 511);
var Lcom_google_gwt_query_client_plugins_ajax_Ajax$Settings_2_classLit = createForInterface('com.google.gwt.query.client.plugins.ajax', 'Ajax/Settings');
function Ajax_Settings_JsonBuilder(){
JsonBuilderBase.call(this);
}
defineClass(657, 101, $intern_21, Ajax_Settings_JsonBuilder);
var Lcom_google_gwt_query_client_plugins_ajax_Ajax_1Settings_1JsonBuilder_2_classLit = createForClass('com.google.gwt.query.client.plugins.ajax', 'Ajax_Settings_JsonBuilder', 657);
function $add_0(this$static, f){
$addAll(this$static, f);
return this$static;
}
function $addAll(this$static, o){
var c, c$index, c$max;
for (c$index = 0 , c$max = o.length; c$index < c$max; ++c$index) {
c = o[c$index];
!this$static.done_0 && !!this$static.stack_0 && !!c && (!this$static.isUnique || $indexOf_2(this$static.stack_0, c, 0) == -1) && $add_7(this$static.stack_0, c);
this$static.isMemory && !!this$static.memory && $run_0(c, $toArray_0(this$static.memory));
}
}
function $disable(this$static){
this$static.stack_0 = null;
this$static.done_0 = true;
return this$static;
}
function $fire(this$static, o){
var c, c$iterator;
if (!this$static.done_0) {
this$static.done_0 = this$static.isOnce;
this$static.isMemory && (this$static.memory = new ArrayList_1(new Arrays$ArrayList(o)));
if (this$static.stack_0)
for (c$iterator = new ArrayList$1(this$static.stack_0); c$iterator.i < c$iterator.this$01.array.length;) {
c = $next_3(c$iterator);
if (!$run_0(c, o) && this$static.stopOnFalse) {
break;
}
}
}
return this$static;
}
function $lock(this$static){
this$static.isMemory || $disable(this$static);
this$static.stack_0 = null;
return this$static;
}
function $run_0(c, o){
var r;
o != null && o.length == 1 && o[0] != null && (getClass__Ljava_lang_Class___devirtual$(o[0]).modifiers & 4) != 0 && (o = castTo(o[0], 4));
if (instanceOf(c, 7)) {
r = castTo(c, 7).f_0(o);
return !instanceOfBoolean(r) || unsafeCast(checkNotNull(castToBoolean(r)));
}
return true;
}
function $status(this$static){
return 'stack=' + (!this$static.stack_0?'null':valueOf_2(this$static.stack_0.array.length)) + ' ' + this$static.done_0;
}
function Callbacks(options){
this.stack_0 = new ArrayList;
this.isOnce = ($clinit_String() , options.indexOf('once')) != -1;
this.isMemory = options.indexOf('memory') != -1;
this.isUnique = options.indexOf('unique') != -1;
this.stopOnFalse = options.indexOf('stopOnFalse') != -1;
}
defineClass(182, 1, {}, Callbacks);
_.done_0 = false;
_.isMemory = false;
_.isOnce = false;
_.isUnique = false;
_.memory = null;
_.stopOnFalse = false;
var Lcom_google_gwt_query_client_plugins_deferred_Callbacks_2_classLit = createForClass('com.google.gwt.query.client.plugins.deferred', 'Callbacks', 182);
function $notify(this$static, o){
return this$static.state_0 == 'pending' && $fire(this$static.notify, o) , this$static;
}
function $promise(this$static){
!this$static.promise && (this$static.promise = new Deferred$DeferredPromiseImpl(this$static));
return this$static.promise;
}
function $reject(this$static, o){
return this$static.state_0 == 'pending' && $fire(this$static.reject, o) , this$static;
}
function $reject_0(this$static, o){
this$static.state_0 == 'pending' && $fire(this$static.reject, o);
return this$static;
}
function $resolve(this$static, o){
return this$static.state_0 == 'pending' && $fire(this$static.resolve, o) , this$static;
}
function $resolve_0(this$static, o){
this$static.state_0 == 'pending' && $fire(this$static.resolve, o);
return this$static;
}
function Deferred(){
this.notify = new Callbacks('memory');
this.reject = new Callbacks('once memory');
this.resolve = new Callbacks('once memory');
$add_0(this.resolve, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_query_client_Function_2_classLit, 1), $intern_0, 7, 0, [new Deferred$2(this)]));
$add_0(this.reject, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_query_client_Function_2_classLit, 1), $intern_0, 7, 0, [new Deferred$3(this)]));
}
defineClass(198, 1, {}, Deferred);
_.toString_0 = function(){
return 'Deferred this=' + getObjectIdentityHashCode(this) + ' promise=' + (!this.promise && (this.promise = new Deferred$DeferredPromiseImpl(this)) , getObjectIdentityHashCode(this.promise)) + ' state=' + this.promise.dfd.state_0 + ' restatus=' + $status(this.resolve);
}
;
_.promise = null;
_.state_0 = 'pending';
var Lcom_google_gwt_query_client_plugins_deferred_Deferred_2_classLit = createForClass('com.google.gwt.query.client.plugins.deferred', 'Deferred', 198);
function Deferred$2(this$0){
this.this$01 = this$0;
Function_0.call(this);
}
defineClass(271, 7, $intern_18, Deferred$2);
_.f = function(){
this.this$01.state_0 = 'resolved';
$disable(this.this$01.resolve);
$lock(this.this$01.notify);
}
;
var Lcom_google_gwt_query_client_plugins_deferred_Deferred$2_2_classLit = createForClass('com.google.gwt.query.client.plugins.deferred', 'Deferred/2', 271);
function Deferred$3(this$0){
this.this$01 = this$0;
Function_0.call(this);
}
defineClass(272, 7, $intern_18, Deferred$3);
_.f = function(){
this.this$01.state_0 = 'rejected';
$disable(this.this$01.reject);
$lock(this.this$01.notify);
}
;
var Lcom_google_gwt_query_client_plugins_deferred_Deferred$3_2_classLit = createForClass('com.google.gwt.query.client.plugins.deferred', 'Deferred/3', 272);
function $always(this$static, f){
return $add_0(this$static.dfd.resolve, f) , $add_0(this$static.dfd.reject, f) , this$static;
}
function $done(this$static, f){
$add_0(this$static.dfd.resolve, f);
return this$static;
}
function $fail(this$static, f){
$add_0(this$static.dfd.reject, f);
return this$static;
}
function $progress(this$static, f){
$add_0(this$static.dfd.notify, f);
return this$static;
}
function $then(this$static, f){
var newDfd;
newDfd = new Deferred;
$done(this$static, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_query_client_Function_2_classLit, 1), $intern_0, 7, 0, [new Deferred$DeferredPromiseImpl$ThenFunction(newDfd, f, 0)]));
$fail(this$static, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_query_client_Function_2_classLit, 1), $intern_0, 7, 0, [new Deferred$DeferredPromiseImpl$ThenFunction(newDfd, f, 1)]));
$progress(this$static, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_query_client_Function_2_classLit, 1), $intern_0, 7, 0, [new Deferred$DeferredPromiseImpl$ThenFunction(newDfd, f, 2)]));
return !newDfd.promise && (newDfd.promise = new Deferred$DeferredPromiseImpl(newDfd)) , newDfd.promise;
}
function Deferred$DeferredPromiseImpl(o){
new Deferred$DeferredPromiseImpl$1(this);
new Deferred$DeferredPromiseImpl$2(this);
this.dfd = o;
}
defineClass(116, 1, {739:1, 116:1}, Deferred$DeferredPromiseImpl);
_.toString_0 = function(){
return 'Promise this=' + getObjectIdentityHashCode(this) + ' ' + this.dfd;
}
;
var Lcom_google_gwt_query_client_plugins_deferred_Deferred$DeferredPromiseImpl_2_classLit = createForClass('com.google.gwt.query.client.plugins.deferred', 'Deferred/DeferredPromiseImpl', 116);
function Deferred$DeferredPromiseImpl$1(this$1){
this.this$11 = this$1;
Function_0.call(this);
}
defineClass(269, 7, $intern_18, Deferred$DeferredPromiseImpl$1);
_.f = function(){
$resolve_0(this.this$11.dfd, this.arguments_0);
}
;
var Lcom_google_gwt_query_client_plugins_deferred_Deferred$DeferredPromiseImpl$1_2_classLit = createForClass('com.google.gwt.query.client.plugins.deferred', 'Deferred/DeferredPromiseImpl/1', 269);
function Deferred$DeferredPromiseImpl$2(this$1){
this.this$11 = this$1;
Function_0.call(this);
}
defineClass(270, 7, $intern_18, Deferred$DeferredPromiseImpl$2);
_.f = function(){
$reject_0(this.this$11.dfd, this.arguments_0);
}
;
var Lcom_google_gwt_query_client_plugins_deferred_Deferred$DeferredPromiseImpl$2_2_classLit = createForClass('com.google.gwt.query.client.plugins.deferred', 'Deferred/DeferredPromiseImpl/2', 270);
function $settle(this$static, action, args){
action == 0 && $resolve(this$static.dfd, args);
action == 1 && $reject(this$static.dfd, args);
action == 2 && $notify(this$static.dfd, args);
}
function Deferred$DeferredPromiseImpl$ThenFunction(newDfd, subordinates, funcType){
Function_0.call(this);
this.type_0 = funcType;
this.filter_0 = subordinates.length > this.type_0?subordinates[this.type_0]:null;
this.dfd = newDfd;
this.cont = false;
}
defineClass(163, 7, $intern_18, Deferred$DeferredPromiseImpl$ThenFunction);
_.f = function(){
var newArgs, oldArgs, p;
oldArgs = this.arguments_0;
if (this.filter_0) {
newArgs = $setArguments(this.filter_0, oldArgs).f_0(oldArgs);
if (instanceOf(newArgs, 116)) {
p = castTo(newArgs, 739);
this.type_0 == 2?$progress(p, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_query_client_Function_2_classLit, 1), $intern_0, 7, 0, [new Deferred$DeferredPromiseImpl$ThenFunction$1(this)])):$always(p, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_query_client_Function_2_classLit, 1), $intern_0, 7, 0, [new Deferred$DeferredPromiseImpl$ThenFunction$2(this, p)]));
}
else {
newArgs = $equals_0(($clinit_Boolean() , TRUE_0), newArgs)?oldArgs:newArgs != null && (getClass__Ljava_lang_Class___devirtual$(newArgs).modifiers & 4) != 0?castTo(newArgs, 4):newArgs;
$settle(this, this.type_0, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [newArgs]));
}
}
else {
$settle(this, this.type_0, oldArgs);
}
}
;
_.cont = false;
_.type_0 = 0;
var Lcom_google_gwt_query_client_plugins_deferred_Deferred$DeferredPromiseImpl$ThenFunction_2_classLit = createForClass('com.google.gwt.query.client.plugins.deferred', 'Deferred/DeferredPromiseImpl/ThenFunction', 163);
function Deferred$DeferredPromiseImpl$ThenFunction$1(this$2){
this.this$21 = this$2;
Function_0.call(this);
}
defineClass(267, 7, $intern_18, Deferred$DeferredPromiseImpl$ThenFunction$1);
_.f = function(){
$settle(this.this$21, 2, this.arguments_0);
}
;
var Lcom_google_gwt_query_client_plugins_deferred_Deferred$DeferredPromiseImpl$ThenFunction$1_2_classLit = createForClass('com.google.gwt.query.client.plugins.deferred', 'Deferred/DeferredPromiseImpl/ThenFunction/1', 267);
function Deferred$DeferredPromiseImpl$ThenFunction$2(this$2, val$p){
this.this$21 = this$2;
this.val$p2 = val$p;
Function_0.call(this);
}
defineClass(268, 7, $intern_18, Deferred$DeferredPromiseImpl$ThenFunction$2);
_.f = function(){
$settle(this.this$21, (this.this$21.type_0 == 0 || this.this$21.type_0 == 1 && this.this$21.cont) && $equals_2('resolved', this.val$p2.dfd.state_0)?0:1, this.arguments_0);
}
;
var Lcom_google_gwt_query_client_plugins_deferred_Deferred$DeferredPromiseImpl$ThenFunction$2_2_classLit = createForClass('com.google.gwt.query.client.plugins.deferred', 'Deferred/DeferredPromiseImpl/ThenFunction/2', 268);
function $clinit_EventsListener(){
$clinit_EventsListener = emptyMethod;
special = new HashMap;
$putStringValue(special, MOUSEENTER, new EventsListener$MouseSpecialEvent);
$putStringValue(special, MOUSELEAVE, new EventsListener$MouseSpecialEvent);
}
var MOUSEENTER = 'mouseenter', MOUSELEAVE = 'mouseleave', special;
defineClass(586, 1, {});
var Lcom_google_gwt_query_client_plugins_events_SpecialEvent$DefaultSpecialEvent_2_classLit = createForClass('com.google.gwt.query.client.plugins.events', 'SpecialEvent/DefaultSpecialEvent', 586);
function EventsListener$MouseSpecialEvent(){
new SpecialEvent$DefaultSpecialEvent$1;
new EventsListener$MouseSpecialEvent$1;
}
defineClass(241, 586, {}, EventsListener$MouseSpecialEvent);
var Lcom_google_gwt_query_client_plugins_events_EventsListener$MouseSpecialEvent_2_classLit = createForClass('com.google.gwt.query.client.plugins.events', 'EventsListener/MouseSpecialEvent', 241);
function EventsListener$MouseSpecialEvent$1(){
Function_0.call(this);
}
defineClass(587, 7, $intern_18, EventsListener$MouseSpecialEvent$1);
var Lcom_google_gwt_query_client_plugins_events_EventsListener$MouseSpecialEvent$1_2_classLit = createForClass('com.google.gwt.query.client.plugins.events', 'EventsListener/MouseSpecialEvent/1', 587);
function SpecialEvent$DefaultSpecialEvent$1(){
Function_0.call(this);
}
defineClass(588, 7, $intern_18, SpecialEvent$DefaultSpecialEvent$1);
var Lcom_google_gwt_query_client_plugins_events_SpecialEvent$DefaultSpecialEvent$1_2_classLit = createForClass('com.google.gwt.query.client.plugins.events', 'SpecialEvent/DefaultSpecialEvent/1', 588);
function assureLoaded(){
if (!initialized) {
hasObjectObserve || (hasObjectObserve = hasProperty(($clinit_GQuery() , window_1), 'Object.observe')) || $load_0();
initialized = true;
}
}
var hasObjectObserve = false, initialized = false;
function $load_0(){
$wnd.observelite = true;
(function(window_0, document_0, console_0){
var Object_0 = window_0.Object;
var Array_0 = window_0.Array;
Object_0.observe || function(O, A, root){
var observed, handlers, defaultAcceptList = ['add', 'update', 'delete', 'reconfigure', 'setPrototype', 'preventExtensions'];
var isArray = A.isArray || function(toString_0){
return function(object){
return toString_0.call(object) === '[object Array]';
}
;
}
(O.prototype.toString), inArray = A.prototype.indexOf?A.indexOf || function(array, pivot, start_0){
return A.prototype.indexOf.call(array, pivot, start_0);
}
:function(array, pivot, start_0){
for (var i_0 = start_0 || 0; i_0 < array.length; i_0++)
if (array[i_0] === pivot)
return i_0;
return -1;
}
, createMap = typeof root.Map === 'undefined' || !Map.prototype.forEach?function(){
var keys_0 = [], values = [];
return {size:0, has:function(key){
return inArray(keys_0, key) > -1;
}
, get:function(key){
return values[inArray(keys_0, key)];
}
, set:function(key, value_0){
var i_0 = inArray(keys_0, key);
if (i_0 === -1) {
keys_0.push(key);
values.push(value_0);
this.size++;
}
else
values[i_0] = value_0;
}
, 'delete':function(key){
var i_0 = inArray(keys_0, key);
if (i_0 > -1) {
keys_0.splice(i_0, 1);
values.splice(i_0, 1);
this.size--;
}
}
, forEach:function(callback){
for (var i_0 = 0; i_0 < keys_0.length; i_0++)
callback.call(arguments[1], values[i_0], keys_0[i_0], this);
}
};
}
:function(){
return new Map;
}
, getProps = O.getOwnPropertyNames?function(){
var func = O.getOwnPropertyNames;
try {
}
catch (e) {
var avoid = (func(inArray).join(' ') + ' ').replace(/prototype |length |name /g, '').slice(0, -1).split(' ');
avoid.length && (func = function(object){
var props = O.getOwnPropertyNames(object);
if (typeof object === 'function')
for (var i_0 = 0, j; i_0 < avoid.length;)
(j = inArray(props, avoid[i_0++])) > -1 && props.splice(j, 1);
return props;
}
);
}
return func;
}
():function(object){
var props = [], prop, hop;
if ('hasOwnProperty' in object) {
for (prop in object)
object.hasOwnProperty(prop) && props.push(prop);
}
else {
hop = O.hasOwnProperty;
for (prop in object)
hop.call(object, prop) && props.push(prop);
}
isArray(object) && props.push('length');
return props;
}
, nextFrame = root.requestAnimationFrame || root.webkitRequestAnimationFrame || function(){
var initial = +new Date, last = initial;
return function(func){
return setTimeout(function(){
func((last = +new Date) - initial);
}
, 17);
}
;
}
(), doObserve = function(object, handler, acceptList){
var data_0 = observed.get(object);
if (data_0)
setHandler(object, data_0, handler, acceptList);
else {
data_0 = createObjectData(object);
setHandler(object, data_0, handler, acceptList);
observed.size === 1 && nextFrame(runGlobalLoop);
}
}
, createObjectData = function(object, data_0){
var props = getProps(object), values = [], i_0 = 0, data_0 = {handlers:createMap(), properties:props, values:values, notifier:retrieveNotifier(object, data_0)};
while (i_0 < props.length)
values[i_0] = object[props[i_0++]];
observed.set(object, data_0);
return data_0;
}
, performPropertyChecks = function(data_0, object, except){
if (!data_0.handlers.size)
return;
var props, proplen, keys_0, values = data_0.values, i_0 = 0, idx, key, value_0, ovalue;
props = data_0.properties.slice();
proplen = props.length;
keys_0 = getProps(object);
while (i_0 < keys_0.length) {
key = keys_0[i_0++];
idx = inArray(props, key);
value_0 = object[key];
if (idx === -1) {
addChangeRecord(object, data_0, {name:key, type:'add', object:object}, except);
data_0.properties.push(key);
values.push(value_0);
}
else {
ovalue = values[idx];
props[idx] = null;
proplen--;
if (ovalue === value_0?ovalue === 0 && 1 / ovalue !== 1 / value_0:ovalue === ovalue || value_0 === value_0) {
addChangeRecord(object, data_0, {name:key, type:'update', object:object, oldValue:ovalue}, except);
data_0.values[idx] = value_0;
}
}
}
for (i_0 = props.length; proplen && i_0--;)
if (props[i_0] !== null) {
addChangeRecord(object, data_0, {name:props[i_0], type:'delete', object:object, oldValue:values[i_0]}, except);
data_0.properties.splice(i_0, 1);
data_0.values.splice(i_0, 1);
proplen--;
}
}
, runGlobalLoop = function(){
if (observed.size) {
observed.forEach(performPropertyChecks);
handlers.forEach(deliverHandlerRecords);
nextFrame(runGlobalLoop);
}
}
, deliverHandlerRecords = function(hdata, handler){
if (hdata.changeRecords.length) {
handler(hdata.changeRecords);
hdata.changeRecords = [];
}
}
, retrieveNotifier = function(object, data_1){
arguments.length < 2 && (data_1 = observed.get(object));
return data_1 && data_1.notifier || {notify:function(changeRecord){
var data_0 = observed.get(object);
if (data_0) {
var recordCopy = {object:object}, prop;
for (prop in changeRecord)
prop !== 'object' && (recordCopy[prop] = changeRecord[prop]);
addChangeRecord(object, data_0, recordCopy);
}
}
, performChange:function(changeType, func){
if (typeof changeType !== 'string')
throw new TypeError('Invalid non-string changeType');
if (typeof func !== 'function')
throw new TypeError('Cannot perform non-function');
var data_0 = observed.get(object), prop, changeRecord, result = func.call(arguments[2]);
data_0 && performPropertyChecks(data_0, object, changeType);
if (data_0 && result && typeof result === 'object') {
changeRecord = {object:object, type:changeType};
for (prop in result)
prop !== 'object' && prop !== 'type' && (changeRecord[prop] = result[prop]);
addChangeRecord(object, data_0, changeRecord);
}
}
};
}
, setHandler = function(object, data_0, handler, acceptList){
var hdata = handlers.get(handler);
!hdata && handlers.set(handler, hdata = {observed:createMap(), changeRecords:[]});
hdata.observed.set(object, {acceptList:acceptList.slice(), data:data_0});
data_0.handlers.set(handler, hdata);
}
, addChangeRecord = function(object, data_0, changeRecord, except){
data_0.handlers.forEach(function(hdata){
var acceptList = hdata.observed.get(object).acceptList;
(typeof except !== 'string' || inArray(acceptList, except) === -1) && inArray(acceptList, changeRecord.type) > -1 && hdata.changeRecords.push(changeRecord);
}
);
}
;
observed = createMap();
handlers = createMap();
function observe(object, handler, acceptList){
if (!object || typeof object !== 'object' && typeof object !== 'function')
throw new TypeError('Object.observe cannot observe non-object');
if (typeof handler !== 'function')
throw new TypeError('Object.observe cannot deliver to non-function');
if (O.isFrozen && O.isFrozen(handler))
throw new TypeError('Object.observe cannot deliver to a frozen function object');
if (typeof acceptList === 'undefined')
acceptList = defaultAcceptList;
else if (!acceptList || typeof acceptList !== 'object')
throw new TypeError('Third argument to Object.observe must be an array of strings.');
doObserve(object, handler, acceptList);
return object;
}
O.observe = observe;
function unobserve(object_0, handler){
if (object_0 === null || typeof object_0 !== 'object' && typeof object_0 !== 'function')
throw new TypeError('Object.unobserve cannot unobserve non-object');
if (typeof handler !== 'function')
throw new TypeError('Object.unobserve cannot deliver to non-function');
var hdata = handlers.get(handler), odata_0;
if (hdata && (odata_0 = hdata.observed.get(object_0))) {
hdata.observed.forEach(function(odata, object){
performPropertyChecks(odata.data, object);
}
);
nextFrame(function(){
deliverHandlerRecords(hdata, handler);
}
);
hdata.observed.size === 1 && hdata.observed.has(object_0)?handlers['delete'](handler):hdata.observed['delete'](object_0);
odata_0.data.handlers.size === 1?observed['delete'](object_0):odata_0.data.handlers['delete'](handler);
}
return object_0;
}
O.unobserve = unobserve;
function getNotifier(object){
if (object === null || typeof object !== 'object' && typeof object !== 'function')
throw new TypeError('Object.getNotifier cannot getNotifier non-object');
if (O.isFrozen && O.isFrozen(object))
return null;
return retrieveNotifier(object);
}
O.getNotifier = getNotifier;
function deliverChangeRecords(handler){
if (typeof handler !== 'function')
throw new TypeError('Object.deliverChangeRecords cannot deliver to non-function');
var hdata = handlers.get(handler);
if (hdata) {
hdata.observed.forEach(function(odata, object){
performPropertyChecks(odata.data, object);
}
);
deliverHandlerRecords(hdata, handler);
}
}
O.deliverChangeRecords = deliverChangeRecords;
}
(Object_0, Array_0, this);
Array_0.unobserve = Object_0.unobserve;
Array_0.observe = Object_0.observe;
}
.apply($wnd, [$wnd, $doc, $wnd.console]));
}
function $clinit_Observe(){
$clinit_Observe = emptyMethod;
$clinit_Events();
map_1 = new HashMap;
observers = new HashMap;
Observe = registerPlugin(Lcom_google_gwt_query_client_plugins_observe_Observe_2_classLit, new Observe$1);
}
function $mutation(this$static, p, handler){
var e, e$array, e$index, e$max;
if (hasProperty(($clinit_GQuery() , window_1), 'MutationObserver')) {
for (e$array = this$static.elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
registerHandler(e, handler, p);
}
}
else {
$log($toJs(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, ['ERROR: this browser does not support MutationObserver: ' + $wnd.navigator.userAgent])));
}
return this$static;
}
function $mutation_0(this$static, init, f){
return $mutation(this$static, init.p, f);
}
function Observe_0(gq){
$clinit_Observe();
Events.call(this, gq);
}
function config2JsList(p){
var r, ret, s, s$array, s$index, s$max;
ret = [];
for (s$array = $keys(p) , s$index = 0 , s$max = s$array.length; s$index < s$max; ++s$index) {
s = s$array[s$index];
r = castToBoolean($get_2(p, ($clinit_String() , s == null?'null':s), Ljava_lang_Boolean_2_classLit));
r != null && unsafeCast((checkCriticalNotNull(r) , r)) && (ret[ret.length] = s , undefined);
}
return ret;
}
function createJsHandler(hdl, mutation){
var f = function(changes){
onChange(hdl, changes);
}
;
return mutation?new $wnd.MutationObserver(f):f;
}
function getJsHandler(handler, mutation){
var jsh;
jsh = castToJso($get_5(map_1, handler));
if (!jsh) {
jsh = createJsHandler(handler, mutation);
$put_2(map_1, handler, jsh);
}
return jsh;
}
function observe_0(o, cfg, handler){
assureLoaded();
registerHandler(o, handler, cfg);
}
function observe_1(o, cfg, handler){
observe_0(o, config2JsList(cfg.p), handler);
}
function observe_2(o, handler){
$clinit_Observe();
observe_1(o, $splice($update_0($delete($add_1((!jsonFactory && (jsonFactory = new JsonFactory_JsonBuilder) , castTo($create(Lcom_google_gwt_query_client_plugins_observe_Observe$ObjectObserverInit_2_classLit), 732)))))), handler);
}
function onChange(handler, mutations){
var lastArg, lastArg0, r, a, l;
r = castTo(create_1(Lcom_google_gwt_query_client_plugins_observe_Observe$Changes_2_classLit, $set_1({}, mutations)), 733);
instanceOf(handler, 7)?castTo(handler, 7).f_0(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [$changes(r)])):instanceOf(handler, 160)?$onChange((lastArg0 = castTo(handler, 734) , $changes(r) , lastArg0)):instanceOf(handler, 168) && $onMutation((lastArg = castTo(handler, 735) , a = $getArray(r.p, ($clinit_String() , 'changes')) , l = !a?0:a.length , new Arrays$ArrayList(castTo($getIsPropertiesArrayBase(a, initUnidimensionalArray(Lcom_google_gwt_query_client_plugins_observe_Observe$Changes$MutationRecord_2_classLit, {754:1, 3:1, 4:1}, 738, l, 0, 1), Lcom_google_gwt_query_client_plugins_observe_Observe$Changes$MutationRecord_2_classLit), 754)) , lastArg));
}
function registerHandler(o, handler, cfg){
var f, isElement, l;
l = castTo($get_5(observers, o), 39);
if (!l) {
l = new ArrayList;
$put_2(observers, o, l);
}
if (!l.contains_0(handler)) {
l.add_2(handler);
isElement = isElement_0(o);
f = getJsHandler(handler, isElement);
$put_2(map_1, handler, f);
isElement?(f.observe(o, cfg) , undefined):runJavascriptFunction(castToJso(prop_0(($clinit_GQuery() , window_1), isArray_0(o)?'Array':'Object')), 'observe', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [o, f, cfg]));
l.add_2(handler);
}
}
function unregisterHandler(o, handler){
$clinit_Observe();
var entry, f, h, h$iterator, i_0, l, outerIter;
l = castTo($get_5(observers, o), 39);
if (l) {
if (handler == null) {
for (h$iterator = l.iterator(); h$iterator.hasNext_0();) {
h = h$iterator.next_1();
unregisterHandler(o, h);
}
return;
}
if (l.remove_3(handler)) {
f = castToJso($get_5(map_1, handler));
if (f) {
isElement_0(o)?(f.disconnect() , undefined):runJavascriptFunction(castToJso(prop_0(window_1, isArray_0(o)?'Array':'Object')), 'unobserve', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [o, f]));
for (i_0 = (outerIter = (new AbstractMap$2(observers)).this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); i_0.val$outerIter2.hasNext_0();) {
if ((entry = castTo(i_0.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 39)).contains_0(handler)) {
return;
}
}
$remove_6(map_1, handler);
}
}
}
}
defineClass(162, 197, {25:1, 162:1}, Observe_0);
var Observe, map_1, observers;
var Lcom_google_gwt_query_client_plugins_observe_Observe_2_classLit = createForClass('com.google.gwt.query.client.plugins.observe', 'Observe', 162);
function Observe$1(){
}
defineClass(265, 1, $intern_24, Observe$1);
_.init_1 = function(gq){
return new Observe_0(gq);
}
;
var Lcom_google_gwt_query_client_plugins_observe_Observe$1_2_classLit = createForClass('com.google.gwt.query.client.plugins.observe', 'Observe/1', 265);
var Lcom_google_gwt_query_client_plugins_observe_Observe$Changes_2_classLit = createForInterface('com.google.gwt.query.client.plugins.observe', 'Observe/Changes');
var Lcom_google_gwt_query_client_plugins_observe_Observe$Changes$ChangeRecord_2_classLit = createForInterface('com.google.gwt.query.client.plugins.observe', 'Observe/Changes/ChangeRecord');
var Lcom_google_gwt_query_client_plugins_observe_Observe$Changes$MutationRecord_2_classLit = createForInterface('com.google.gwt.query.client.plugins.observe', 'Observe/Changes/MutationRecord');
var Lcom_google_gwt_query_client_plugins_observe_Observe$MutationObserverInit_2_classLit = createForInterface('com.google.gwt.query.client.plugins.observe', 'Observe/MutationObserverInit');
var Lcom_google_gwt_query_client_plugins_observe_Observe$ObjectObserverInit_2_classLit = createForInterface('com.google.gwt.query.client.plugins.observe', 'Observe/ObjectObserverInit');
function Observe_Changes_ChangeRecord_JsonBuilder(){
JsonBuilderBase.call(this);
}
defineClass(659, 101, {113:1, 86:1, 737:1}, Observe_Changes_ChangeRecord_JsonBuilder);
var Lcom_google_gwt_query_client_plugins_observe_Observe_1Changes_1ChangeRecord_1JsonBuilder_2_classLit = createForClass('com.google.gwt.query.client.plugins.observe', 'Observe_Changes_ChangeRecord_JsonBuilder', 659);
function $changes(this$static){
var a, l;
a = $getArray(this$static.p, ($clinit_String() , 'changes'));
l = !a?0:a.length;
return new Arrays$ArrayList(castTo($getIsPropertiesArrayBase(a, initUnidimensionalArray(Lcom_google_gwt_query_client_plugins_observe_Observe$Changes$ChangeRecord_2_classLit, {753:1, 3:1, 4:1}, 737, l, 0, 1), Lcom_google_gwt_query_client_plugins_observe_Observe$Changes$ChangeRecord_2_classLit), 753));
}
function Observe_Changes_JsonBuilder(){
JsonBuilderBase.call(this);
}
defineClass(658, 101, {113:1, 86:1, 733:1}, Observe_Changes_JsonBuilder);
var Lcom_google_gwt_query_client_plugins_observe_Observe_1Changes_1JsonBuilder_2_classLit = createForClass('com.google.gwt.query.client.plugins.observe', 'Observe_Changes_JsonBuilder', 658);
function Observe_Changes_MutationRecord_JsonBuilder(){
JsonBuilderBase.call(this);
}
defineClass(660, 101, {113:1, 86:1, 738:1}, Observe_Changes_MutationRecord_JsonBuilder);
var Lcom_google_gwt_query_client_plugins_observe_Observe_1Changes_1MutationRecord_1JsonBuilder_2_classLit = createForClass('com.google.gwt.query.client.plugins.observe', 'Observe_Changes_MutationRecord_JsonBuilder', 660);
function $attributes(this$static){
$setBoolean(this$static.p, 'attributes');
return this$static;
}
function $childList(this$static){
$setBoolean(this$static.p, 'childList');
return this$static;
}
function $subtree(this$static){
$setBoolean(this$static.p, 'subtree');
return this$static;
}
function Observe_MutationObserverInit_JsonBuilder(){
JsonBuilderBase.call(this);
}
defineClass(661, 101, {113:1, 86:1, 736:1}, Observe_MutationObserverInit_JsonBuilder);
var Lcom_google_gwt_query_client_plugins_observe_Observe_1MutationObserverInit_1JsonBuilder_2_classLit = createForClass('com.google.gwt.query.client.plugins.observe', 'Observe_MutationObserverInit_JsonBuilder', 661);
function $add_1(this$static){
$setBoolean(this$static.p, 'add');
return this$static;
}
function $delete(this$static){
$setBoolean(this$static.p, 'delete');
return this$static;
}
function $splice(this$static){
$setBoolean(this$static.p, 'splice');
return this$static;
}
function $update_0(this$static){
$setBoolean(this$static.p, 'update');
return this$static;
}
function Observe_ObjectObserverInit_JsonBuilder(){
JsonBuilderBase.call(this);
}
defineClass(662, 101, {113:1, 86:1, 732:1}, Observe_ObjectObserverInit_JsonBuilder);
var Lcom_google_gwt_query_client_plugins_observe_Observe_1ObjectObserverInit_1JsonBuilder_2_classLit = createForClass('com.google.gwt.query.client.plugins.observe', 'Observe_ObjectObserverInit_JsonBuilder', 662);
function attachWidget(widget, firstParentWidget){
if (!!widget && !widget.parent_0) {
if (!firstParentWidget) {
firstParentWidget = getFirstParentWidget(widget);
if (!firstParentWidget) {
$clinit_RootPanel();
$add_9(widgetsToDetach, widget);
widget.onAttach();
}
else {
attachWidget(widget, firstParentWidget);
}
}
else if (instanceOf(firstParentWidget, 154)) {
castTo(firstParentWidget, 154).setWidget(widget);
}
else if (instanceOf(firstParentWidget, 50)) {
try {
castTo(firstParentWidget, 50).add_0(widget);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 31)) {
widget.setParent(firstParentWidget);
}
else
throw unwrap($e0);
}
}
else {
widget.setParent(firstParentWidget);
}
}
}
function getFirstParentWidget(w){
var body_0, e, p;
e = $getParentElement(($clinit_DOM() , w.element));
body_0 = $doc.body;
while (!!e && body_0 != e) {
if (getEventListener(e)) {
p = $widget($(e), 0);
if (p) {
return p;
}
}
e = $getParentElement_0(($clinit_DOMImpl() , e));
}
return null;
}
function $exec_0(this$static, input_0){
return this$static.exec(input_0);
}
function $test(this$static, input_0){
return this$static.test(input_0);
}
function SafeUriString(uri_0){
this.uri_0 = uri_0;
}
defineClass(129, 1, {755:1, 129:1}, SafeUriString);
_.equals = function(obj){
if (!instanceOf(obj, 129)) {
return false;
}
return $equals_2(this.uri_0, castTo(castTo(obj, 755), 129).uri_0);
}
;
_.hashCode = function(){
return getHashCode(this.uri_0);
}
;
_.toString_0 = function(){
return 'safe: "' + this.uri_0 + '"';
}
;
var Lcom_google_gwt_safehtml_shared_SafeUriString_2_classLit = createForClass('com.google.gwt.safehtml.shared', 'SafeUriString', 129);
function $clinit_UriUtils(){
$clinit_UriUtils = emptyMethod;
new RegExp('%5B', 'g');
new RegExp('%5D', 'g');
}
function Point(x_0, y_0){
this.x_0 = x_0;
this.y_0 = y_0;
}
defineClass(152, 1, {152:1}, Point);
_.equals = function(obj){
var c;
if (!instanceOf(obj, 152)) {
return false;
}
c = castTo(obj, 152);
return this.x_0 == c.x_0 && this.y_0 == c.y_0;
}
;
_.hashCode = function(){
return round_int(this.x_0) ^ round_int(this.y_0);
}
;
_.toString_0 = function(){
return 'Point(' + this.x_0 + ',' + this.y_0 + ')';
}
;
_.x_0 = 0;
_.y_0 = 0;
var Lcom_google_gwt_touch_client_Point_2_classLit = createForClass('com.google.gwt.touch.client', 'Point', 152);
function $clinit_DOM(){
$clinit_DOM = emptyMethod;
impl_3 = castTo(create_com_google_gwt_user_client_impl_DOMImpl(), 97);
}
function createElement(tagName){
$clinit_DOM();
return $createElement_0($doc, tagName);
}
function dispatchEvent_1(evt, elem){
$clinit_DOM();
var eventListener;
eventListener = getEventListener(elem);
if (!eventListener) {
return false;
}
dispatchEvent_2(evt, elem, eventListener);
return true;
}
function dispatchEvent_2(evt, elem, listener){
$clinit_DOM();
var prevCurrentEvent;
prevCurrentEvent = currentEvent;
currentEvent = evt;
elem == sCaptureElem && $eventGetTypeInt(($clinit_DOMImpl() , evt).type) == 8192 && (sCaptureElem = null);
listener.onBrowserEvent(evt);
currentEvent = prevCurrentEvent;
}
function getChild(parent_0){
$clinit_DOM();
return impl_3.getChild(parent_0, 0);
}
function getParent(elem){
$clinit_DOM();
return $getParentElement_0(($clinit_DOMImpl() , elem));
}
function insertChild(parent_0, child, index_0){
$clinit_DOM();
impl_3.insertChild(parent_0, resolve_0(child), index_0);
}
function isPotential(o){
$clinit_DOM();
try {
return !!o && !!o.__gwt_resolve;
}
catch (e) {
return false;
}
}
function previewEvent(evt){
$clinit_DOM();
var ret;
ret = fire_1(handlers_0, evt);
if (!ret && !!evt) {
($clinit_DOMImpl() , evt).stopPropagation();
impl_0.eventPreventDefault(evt);
}
return ret;
}
function resolve_0(maybePotential){
$clinit_DOM();
return maybePotential.__gwt_resolve?maybePotential.__gwt_resolve():maybePotential;
}
function sinkBitlessEvent(elem, eventTypeName){
$clinit_DOM();
impl_3.sinkBitlessEvent(elem, eventTypeName);
}
function sinkEvents(elem, eventBits){
$clinit_DOM();
impl_3.sinkEvents(elem, eventBits);
}
var currentEvent = null, impl_3, sCaptureElem;
function $onModuleLoad(){
var allowedModes, currentMode, i_0;
currentMode = $doc.compatMode;
allowedModes = stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['CSS1Compat']);
for (i_0 = 0; i_0 < allowedModes.length; i_0++) {
if ($equals_2(allowedModes[i_0], currentMode)) {
return;
}
}
allowedModes.length == 1 && $equals_2('CSS1Compat', allowedModes[0]) && $equals_2('BackCompat', currentMode)?"GWT no longer supports Quirks Mode (document.compatMode=' BackCompat').<br>Make sure your application's host HTML page has a Standards Mode (document.compatMode=' CSS1Compat') doctype,<br>e.g. by using &lt;!doctype html&gt; at the start of your application's HTML page.<br><br>To continue using this unsupported rendering mode and risk layout problems, suppress this message by adding<br>the following line to your*.gwt.xml module file:<br>&nbsp;&nbsp;&lt;extend-configuration-property name=\"document.compatMode\" value=\"" + currentMode + '"/&gt;':"Your *.gwt.xml module configuration prohibits the use of the current document rendering mode (document.compatMode=' " + currentMode + "').<br>Modify your application's host HTML page doctype, or update your custom " + "'document.compatMode' configuration property settings.";
}
function $getTypeInt(this$static){
return $clinit_DOM() , $eventGetTypeInt(($clinit_DOMImpl() , this$static).type);
}
function addNativePreviewHandler(handler){
$clinit_DOM();
$maybeInitializeEventSystem(impl_3);
!TYPE_7 && (TYPE_7 = new GwtEvent$Type);
if (!handlers_0) {
handlers_0 = new HandlerManager_0(null, true);
singleton = new Event$NativePreviewEvent;
}
return $addHandler(handlers_0, TYPE_7, handler);
}
function getEventsSunk(elem){
return $clinit_DOM() , elem.__eventBits || 0;
}
function getTypeInt(typeName){
return $eventGetTypeInt(($clinit_DOM() , typeName));
}
function releaseCapture(elem){
$clinit_DOM();
!!sCaptureElem && elem == sCaptureElem && (sCaptureElem = null);
impl_3.releaseCapture(elem);
}
function setCapture(elem){
$clinit_DOM();
sCaptureElem = elem;
impl_3.setCapture(elem);
}
function sinkEvents_0(elem, eventBits){
$clinit_DOM();
impl_3.sinkEvents(elem, eventBits);
}
var handlers_0;
function $revive(this$static){
this$static.dead = false;
this$static.source_0 = null;
this$static.isCanceled = false;
this$static.isConsumed = false;
this$static.isFirstHandler = true;
this$static.nativeEvent = null;
}
function $setNativeEvent_0(this$static, nativeEvent){
this$static.nativeEvent = nativeEvent;
}
function Event$NativePreviewEvent(){
}
function fire_1(handlers, nativeEvent){
var lastIsCanceled, lastIsConsumed, lastIsFirstHandler, lastNativeEvent, ret;
if (!!TYPE_7 && !!handlers && $isEventHandled(handlers, TYPE_7)) {
lastIsCanceled = singleton.isCanceled;
lastIsConsumed = singleton.isConsumed;
lastIsFirstHandler = singleton.isFirstHandler;
lastNativeEvent = singleton.nativeEvent;
$revive(singleton);
$setNativeEvent_0(singleton, nativeEvent);
$fireEvent(handlers, singleton);
ret = !(singleton.isCanceled && !singleton.isConsumed);
singleton.isCanceled = lastIsCanceled;
singleton.isConsumed = lastIsConsumed;
singleton.isFirstHandler = lastIsFirstHandler;
singleton.nativeEvent = lastNativeEvent;
return ret;
}
return true;
}
defineClass(337, 700, {}, Event$NativePreviewEvent);
_.dispatch = function(handler){
castTo(handler, 105).onPreviewNativeEvent(this);
singleton.isFirstHandler = false;
}
;
_.getAssociatedType = function(){
return TYPE_7;
}
;
_.revive = function(){
$revive(this);
}
;
_.isCanceled = false;
_.isConsumed = false;
_.isFirstHandler = false;
var TYPE_7, singleton;
var Lcom_google_gwt_user_client_Event$NativePreviewEvent_2_classLit = createForClass('com.google.gwt.user.client', 'Event/NativePreviewEvent', 337);
function $clinit_Window(){
$clinit_Window = emptyMethod;
impl_4 = castTo(create_com_google_gwt_user_client_impl_WindowImpl(), 128);
}
function addCloseHandler(handler){
$clinit_Window();
maybeInitializeCloseHandlers();
return addHandler(TYPE_5?TYPE_5:(TYPE_5 = new GwtEvent$Type), handler);
}
function addHandler(type_0, handler){
return $addHandler((!handlers_1 && (handlers_1 = new Window$WindowHandlers) , handlers_1), type_0, handler);
}
function maybeInitializeCloseHandlers(){
if (!closeHandlersInitialized) {
impl_4.initWindowCloseHandler();
closeHandlersInitialized = true;
}
}
function onClosed(){
$clinit_Window();
closeHandlersInitialized && fire((!handlers_1 && (handlers_1 = new Window$WindowHandlers) , handlers_1));
}
function onClosing(){
$clinit_Window();
var event_0;
if (closeHandlersInitialized) {
event_0 = new Window$ClosingEvent;
!!handlers_1 && $fireEvent(handlers_1, event_0);
return null;
}
return null;
}
var closeHandlersInitialized = false, handlers_1, impl_4;
function $clinit_Window$ClosingEvent(){
$clinit_Window$ClosingEvent = emptyMethod;
TYPE_8 = new GwtEvent$Type;
}
function Window$ClosingEvent(){
$clinit_Window$ClosingEvent();
}
defineClass(437, 700, {}, Window$ClosingEvent);
_.dispatch = function(handler){
throwClassCastExceptionUnlessNull(handler);
null.$_nullMethod();
}
;
_.getAssociatedType = function(){
return TYPE_8;
}
;
var TYPE_8;
var Lcom_google_gwt_user_client_Window$ClosingEvent_2_classLit = createForClass('com.google.gwt.user.client', 'Window/ClosingEvent', 437);
function Window$WindowHandlers(){
HandlerManager.call(this, null);
}
defineClass(215, 73, {29:1}, Window$WindowHandlers);
var Lcom_google_gwt_user_client_Window$WindowHandlers_2_classLit = createForClass('com.google.gwt.user.client', 'Window/WindowHandlers', 215);
function $eventGetTypeInt(eventType){
switch (eventType) {
case 'blur':
return 4096;
case 'change':
return 1024;
case 'click':
return 1;
case 'dblclick':
return 2;
case 'focus':
return 2048;
case 'keydown':
return 128;
case 'keypress':
return 256;
case 'keyup':
return 512;
case 'load':
return 32768;
case 'losecapture':
return 8192;
case 'mousedown':
return 4;
case 'mousemove':
return 64;
case 'mouseout':
return 32;
case 'mouseover':
return 16;
case 'mouseup':
return 8;
case 'scroll':
return 16384;
case 'error':
return $intern_1;
case 'DOMMouseScroll':
case 'mousewheel':
return $intern_25;
case 'contextmenu':
return 262144;
case 'paste':
return $intern_14;
case 'touchstart':
return $intern_26;
case 'touchmove':
return $intern_27;
case 'touchend':
return $intern_15;
case 'touchcancel':
return $intern_28;
case 'gesturestart':
return $intern_29;
case 'gesturechange':
return $intern_30;
case 'gestureend':
return $intern_31;
default:return -1;
}
}
function $maybeInitializeEventSystem(this$static){
if (!eventSystemIsInitialized) {
this$static.initEventSystem();
eventSystemIsInitialized = true;
}
}
function getEventListener(elem){
var maybeListener = elem.__listener;
return !instanceOfJso(maybeListener) && instanceOf(maybeListener, 28)?maybeListener:null;
}
function setEventListener(elem, listener){
elem.__listener = listener;
}
defineClass(97, 1, $intern_32);
var eventSystemIsInitialized = false;
var Lcom_google_gwt_user_client_impl_DOMImpl_2_classLit = createForClass('com.google.gwt.user.client.impl', 'DOMImpl', 97);
function $clinit_DOMImplStandard(){
$clinit_DOMImplStandard = emptyMethod;
bitlessEventDispatchers = {_default_:dispatchEvent_4, dragenter:dispatchDragEvent, dragover:dispatchDragEvent};
captureEventDispatchers = {click:dispatchCapturedMouseEvent, dblclick:dispatchCapturedMouseEvent, mousedown:dispatchCapturedMouseEvent, mouseup:dispatchCapturedMouseEvent, mousemove:dispatchCapturedMouseEvent, mouseover:dispatchCapturedMouseEvent, mouseout:dispatchCapturedMouseEvent, mousewheel:dispatchCapturedMouseEvent, keydown:dispatchCapturedEvent, keyup:dispatchCapturedEvent, keypress:dispatchCapturedEvent, touchstart:dispatchCapturedMouseEvent, touchend:dispatchCapturedMouseEvent, touchmove:dispatchCapturedMouseEvent, touchcancel:dispatchCapturedMouseEvent, gesturestart:dispatchCapturedMouseEvent, gestureend:dispatchCapturedMouseEvent, gesturechange:dispatchCapturedMouseEvent};
}
function $initEventSystem(){
dispatchEvent_3 = $entry(dispatchEvent_4);
dispatchUnhandledEvent = $entry(dispatchUnhandledEvent_0);
var foreach = foreach_0;
var bitlessEvents = bitlessEventDispatchers;
foreach(bitlessEvents, function(e, fn){
bitlessEvents[e] = $entry(fn);
}
);
var captureEvents_0 = captureEventDispatchers;
foreach(captureEvents_0, function(e, fn){
captureEvents_0[e] = $entry(fn);
}
);
foreach(captureEvents_0, function(e, fn){
$wnd.addEventListener(e, fn, true);
}
);
}
function $sinkBitlessEventImpl(elem, eventTypeName){
var dispatchMap = bitlessEventDispatchers;
var dispatcher = dispatchMap[eventTypeName] || dispatchMap['_default_'];
elem.addEventListener(eventTypeName, dispatcher, false);
}
function $sinkEventsImpl(elem, bits){
var chMask = (elem.__eventBits || 0) ^ bits;
elem.__eventBits = bits;
if (!chMask)
return;
chMask & 1 && (elem.onclick = bits & 1?dispatchEvent_3:null);
chMask & 2 && (elem.ondblclick = bits & 2?dispatchEvent_3:null);
chMask & 4 && (elem.onmousedown = bits & 4?dispatchEvent_3:null);
chMask & 8 && (elem.onmouseup = bits & 8?dispatchEvent_3:null);
chMask & 16 && (elem.onmouseover = bits & 16?dispatchEvent_3:null);
chMask & 32 && (elem.onmouseout = bits & 32?dispatchEvent_3:null);
chMask & 64 && (elem.onmousemove = bits & 64?dispatchEvent_3:null);
chMask & 128 && (elem.onkeydown = bits & 128?dispatchEvent_3:null);
chMask & 256 && (elem.onkeypress = bits & 256?dispatchEvent_3:null);
chMask & 512 && (elem.onkeyup = bits & 512?dispatchEvent_3:null);
chMask & 1024 && (elem.onchange = bits & 1024?dispatchEvent_3:null);
chMask & 2048 && (elem.onfocus = bits & 2048?dispatchEvent_3:null);
chMask & 4096 && (elem.onblur = bits & 4096?dispatchEvent_3:null);
chMask & 8192 && (elem.onlosecapture = bits & 8192?dispatchEvent_3:null);
chMask & 16384 && (elem.onscroll = bits & 16384?dispatchEvent_3:null);
chMask & 32768 && (elem.onload = bits & 32768?dispatchUnhandledEvent:null);
chMask & $intern_1 && (elem.onerror = bits & $intern_1?dispatchEvent_3:null);
chMask & $intern_25 && (elem.onmousewheel = bits & $intern_25?dispatchEvent_3:null);
chMask & 262144 && (elem.oncontextmenu = bits & 262144?dispatchEvent_3:null);
chMask & $intern_14 && (elem.onpaste = bits & $intern_14?dispatchEvent_3:null);
chMask & $intern_26 && (elem.ontouchstart = bits & $intern_26?dispatchEvent_3:null);
chMask & $intern_27 && (elem.ontouchmove = bits & $intern_27?dispatchEvent_3:null);
chMask & $intern_15 && (elem.ontouchend = bits & $intern_15?dispatchEvent_3:null);
chMask & $intern_28 && (elem.ontouchcancel = bits & $intern_28?dispatchEvent_3:null);
chMask & $intern_29 && (elem.ongesturestart = bits & $intern_29?dispatchEvent_3:null);
chMask & $intern_30 && (elem.ongesturechange = bits & $intern_30?dispatchEvent_3:null);
chMask & $intern_31 && (elem.ongestureend = bits & $intern_31?dispatchEvent_3:null);
}
function dispatchCapturedEvent(evt){
previewEvent(evt);
}
function dispatchCapturedMouseEvent(evt){
$clinit_DOMImplStandard();
var cancelled;
cancelled = !previewEvent(evt);
if (cancelled || !captureElem) {
return;
}
dispatchEvent_1(evt, captureElem) && (($clinit_DOMImpl() , evt).stopPropagation() , undefined);
}
function dispatchDragEvent(evt){
($clinit_DOMImpl() , impl_0).eventPreventDefault(evt);
dispatchEvent_4(evt);
}
function dispatchEvent_4(evt){
var element;
element = getFirstAncestorWithListener(evt);
if (!element) {
return;
}
dispatchEvent_2(evt, element.nodeType != 1?null:element, getEventListener(element));
}
function dispatchUnhandledEvent_0(evt){
var element;
element = ($clinit_DOMImpl() , impl_0).eventGetCurrentTarget(evt);
element['__gwtLastUnhandledEvent'] = evt.type;
dispatchEvent_4(evt);
}
function getFirstAncestorWithListener(evt){
var curElem;
curElem = ($clinit_DOMImpl() , impl_0).eventGetCurrentTarget(evt);
while (!!curElem && !getEventListener(curElem)) {
curElem = curElem.parentNode;
}
return curElem;
}
defineClass(708, 97, $intern_32);
_.getChild = function getChild_0(elem, index_0){
var count = 0, child = elem.firstChild;
while (child) {
if (child.nodeType == 1) {
if (index_0 == count)
return child;
++count;
}
child = child.nextSibling;
}
return null;
}
;
_.getChildCount = function getChildCount(elem){
var count = 0, child = elem.firstChild;
while (child) {
child.nodeType == 1 && ++count;
child = child.nextSibling;
}
return count;
}
;
_.initEventSystem = function(){
$initEventSystem();
}
;
_.insertChild = function insertChild_0(parent_0, toAdd, index_0){
var count = 0, child = parent_0.firstChild, before = null;
while (child) {
if (child.nodeType == 1) {
if (count == index_0) {
before = child;
break;
}
++count;
}
child = child.nextSibling;
}
parent_0.insertBefore(toAdd, before);
}
;
_.releaseCapture = function(elem){
$maybeInitializeEventSystem(this);
captureElem == elem && (captureElem = null);
}
;
_.setCapture = function(elem){
$maybeInitializeEventSystem(this);
captureElem = elem;
}
;
_.sinkBitlessEvent = function(elem, eventTypeName){
$maybeInitializeEventSystem(this);
this.sinkBitlessEventImpl(elem, eventTypeName);
}
;
_.sinkBitlessEventImpl = function(elem, eventTypeName){
$sinkBitlessEventImpl(elem, eventTypeName);
}
;
_.sinkEvents = function(elem, bits){
$maybeInitializeEventSystem(this);
$sinkEventsImpl(elem, bits);
}
;
var bitlessEventDispatchers, captureElem, captureEventDispatchers, dispatchEvent_3, dispatchUnhandledEvent;
var Lcom_google_gwt_user_client_impl_DOMImplStandard_2_classLit = createForClass('com.google.gwt.user.client.impl', 'DOMImplStandard', 708);
defineClass(709, 708, $intern_32);
var Lcom_google_gwt_user_client_impl_DOMImplStandardBase_2_classLit = createForClass('com.google.gwt.user.client.impl', 'DOMImplStandardBase', 709);
function DOMImplIE9_0(){
$clinit_DOMImplStandard();
}
defineClass(535, 709, $intern_32, DOMImplIE9_0);
_.sinkBitlessEventImpl = function(elem, eventTypeName){
$sinkBitlessEventImpl(elem, eventTypeName);
$equals_2('dragover', eventTypeName) && $sinkBitlessEventImpl(elem, 'dragenter');
}
;
var Lcom_google_gwt_user_client_impl_DOMImplIE9_2_classLit = createForClass('com.google.gwt.user.client.impl', 'DOMImplIE9', 535);
function $clinit_DOMImplMozilla(){
$clinit_DOMImplMozilla = emptyMethod;
$clinit_DOMImplStandard();
captureEventDispatchers['DOMMouseScroll'] = dispatchCapturedMouseEvent;
}
function $initSyntheticMouseUpEvents(){
$wnd.addEventListener('mouseout', $entry(function(evt){
var cap = ($clinit_DOMImplStandard() , captureElem);
if (cap && !evt.relatedTarget) {
if ('html' == evt.target.tagName.toLowerCase()) {
var muEvent = $doc.createEvent('MouseEvents');
muEvent.initMouseEvent('mouseup', true, true, $wnd, 0, evt.screenX, evt.screenY, evt.clientX, evt.clientY, evt.ctrlKey, evt.altKey, evt.shiftKey, evt.metaKey, evt.button, null);
cap.dispatchEvent(muEvent);
}
}
}
), true);
}
function DOMImplMozilla_0(){
$clinit_DOMImplMozilla();
}
defineClass(536, 708, $intern_32, DOMImplMozilla_0);
_.initEventSystem = function(){
$initEventSystem();
$initSyntheticMouseUpEvents();
}
;
_.sinkEvents = function(elem, bits){
$maybeInitializeEventSystem(this);
$sinkEventsImpl(elem, bits);
bits & $intern_25 && elem.addEventListener('DOMMouseScroll', ($clinit_DOMImplStandard() , dispatchEvent_3), false);
}
;
var Lcom_google_gwt_user_client_impl_DOMImplMozilla_2_classLit = createForClass('com.google.gwt.user.client.impl', 'DOMImplMozilla', 536);
function DOMImplWebkit_0(){
$clinit_DOMImplStandard();
}
defineClass(537, 709, $intern_32, DOMImplWebkit_0);
var Lcom_google_gwt_user_client_impl_DOMImplWebkit_2_classLit = createForClass('com.google.gwt.user.client.impl', 'DOMImplWebkit', 537);
function foreach_0(map_0, fn){
for (var e in map_0) {
map_0.hasOwnProperty(e) && fn(e, map_0[e]);
}
}
function WindowImpl(){
}
defineClass(128, 1, {128:1}, WindowImpl);
_.initWindowCloseHandler = function initWindowCloseHandler(){
var oldOnBeforeUnload = $wnd.onbeforeunload;
var oldOnUnload = $wnd.onunload;
$wnd.onbeforeunload = function(evt){
var ret, oldRet;
try {
ret = $entry(onClosing)();
}
finally {
oldRet = oldOnBeforeUnload && oldOnBeforeUnload(evt);
}
if (ret != null) {
return ret;
}
if (oldRet != null) {
return oldRet;
}
}
;
$wnd.onunload = $entry(function(evt){
try {
$clinit_Window();
closeHandlersInitialized && fire((!handlers_1 && (handlers_1 = new Window$WindowHandlers) , handlers_1));
}
finally {
oldOnUnload && oldOnUnload(evt);
$wnd.onresize = null;
$wnd.onscroll = null;
$wnd.onbeforeunload = null;
$wnd.onunload = null;
}
}
);
}
;
var Lcom_google_gwt_user_client_impl_WindowImpl_2_classLit = createForClass('com.google.gwt.user.client.impl', 'WindowImpl', 128);
function WindowImplIE(){
}
defineClass(652, 128, {128:1}, WindowImplIE);
_.initWindowCloseHandler = function(){
var scriptElem;
scriptElem = $createScriptElement($doc);
$appendChild($doc.body, scriptElem);
$wnd.__gwt_initWindowCloseHandler($entry(onClosing), $entry(onClosed));
$removeChild($doc.body, scriptElem);
}
;
var Lcom_google_gwt_user_client_impl_WindowImplIE_2_classLit = createForClass('com.google.gwt.user.client.impl', 'WindowImplIE', 652);
function WindowImplMozilla(){
}
defineClass(653, 128, {128:1}, WindowImplMozilla);
var Lcom_google_gwt_user_client_impl_WindowImplMozilla_2_classLit = createForClass('com.google.gwt.user.client.impl', 'WindowImplMozilla', 653);
function $clinit_UIObject(){
$clinit_UIObject = emptyMethod;
new UIObject$DebugIdImpl;
}
function $addStyleName(this$static, style){
setStyleName(($clinit_DOM() , this$static.element), style, true);
}
function $getElement(this$static){
return $clinit_DOM() , this$static.element;
}
function $getStyleElement(this$static){
return $clinit_DOM() , this$static.element;
}
function $removeStyleName(this$static, style){
setStyleName(($clinit_DOM() , this$static.element), style, false);
}
function $setElement(this$static, elem){
$setElement_0(this$static, ($clinit_DOM() , elem));
}
function $setElement_0(this$static, elem){
this$static.element = elem;
}
function $setHeight(this$static, height){
($clinit_DOM() , this$static.element).style['height'] = height;
}
function $setStyleName(this$static, style){
$setClassName(($clinit_DOM() , this$static.element), style);
}
function $setStyleName_0(this$static, style, add_0){
setStyleName(($clinit_DOM() , this$static.element), style, add_0);
}
function $setStylePrimaryName(this$static, style){
setStylePrimaryName(($clinit_DOM() , this$static.element), style);
}
function $sinkBitlessEvent(this$static, eventTypeName){
sinkBitlessEvent(($clinit_DOM() , this$static.element), eventTypeName);
}
function getStylePrimaryName(elem){
$clinit_UIObject();
var fullClassName, spaceIdx;
fullClassName = elem.className || '';
spaceIdx = indexOf(fullClassName, fromCodePoint(32));
if (spaceIdx >= 0) {
return $clinit_String() , fullClassName.substr(0, spaceIdx);
}
return fullClassName;
}
function setStyleName(elem, style, add_0){
$clinit_UIObject();
if (!elem) {
throw new RuntimeException_0('Null widget handle. If you are creating a composite, ensure that initWidget() has been called.');
}
style = $trim(style);
if (($clinit_String() , style.length) == 0) {
throw new IllegalArgumentException('Style names cannot be empty');
}
add_0?$addClassName(elem, style):$removeClassName(elem, style);
}
function setStylePrimaryName(elem, style){
$clinit_UIObject();
if (!elem) {
throw new RuntimeException_0('Null widget handle. If you are creating a composite, ensure that initWidget() has been called.');
}
style = $trim(style);
if (($clinit_String() , style.length) == 0) {
throw new IllegalArgumentException('Style names cannot be empty');
}
updatePrimaryAndDependentStyleNames(elem, style);
}
function updatePrimaryAndDependentStyleNames(elem, newPrimaryStyle){
var classes = (elem.className || '').split(/\s+/);
if (!classes) {
return;
}
var oldPrimaryStyle = classes[0];
var oldPrimaryStyleLen = oldPrimaryStyle.length;
classes[0] = newPrimaryStyle;
for (var i_0 = 1, n = classes.length; i_0 < n; i_0++) {
var name_0 = classes[i_0];
name_0.length > oldPrimaryStyleLen && name_0.charAt(oldPrimaryStyleLen) == '-' && name_0.indexOf(oldPrimaryStyle) == 0 && (classes[i_0] = newPrimaryStyle + name_0.substring(oldPrimaryStyleLen));
}
elem.className = classes.join(' ');
}
defineClass(24, 1, {27:1, 24:1});
_.resolvePotentialElement = function(){
throw new UnsupportedOperationException;
}
;
_.toString_0 = function(){
if (!this.element) {
return '(null handle)';
}
return $getString(($clinit_DOM() , this.element));
}
;
var Lcom_google_gwt_user_client_ui_UIObject_2_classLit = createForClass('com.google.gwt.user.client.ui', 'UIObject', 24);
function $addDomHandler(this$static, handler, type_0){
var typeInt;
typeInt = getTypeInt(type_0.name_0);
typeInt == -1?$sinkBitlessEvent(this$static, type_0.name_0):this$static.sinkEvents_0(typeInt);
return $addHandler(!this$static.handlerManager?(this$static.handlerManager = new HandlerManager(this$static)):this$static.handlerManager, type_0, handler);
}
function $addHandler_0(this$static, handler, type_0){
return $addHandler(!this$static.handlerManager?(this$static.handlerManager = new HandlerManager(this$static)):this$static.handlerManager, type_0, handler);
}
function $fireEvent_0(this$static, event_0){
!!this$static.handlerManager && $fireEvent(this$static.handlerManager, event_0);
}
function $onAttach(this$static){
var bitsToAdd;
if (this$static.isAttached()) {
throw new IllegalStateException_0("Should only call onAttach when the widget is detached from the browser's document");
}
this$static.attached = true;
$clinit_DOM();
setEventListener(this$static.element, this$static);
bitsToAdd = this$static.eventsToSink;
this$static.eventsToSink = -1;
bitsToAdd > 0 && this$static.sinkEvents_0(bitsToAdd);
this$static.doAttachChildren();
this$static.onLoad();
}
function $onBrowserEvent(this$static, event_0){
var related;
switch ($clinit_DOM() , $eventGetTypeInt(($clinit_DOMImpl() , event_0).type)) {
case 16:
case 32:
related = impl_0.eventGetRelatedTarget(event_0);
if (!!related && $isOrHasChild(this$static.element, related)) {
return;
}
}
fireNativeEvent(event_0, this$static, this$static.element);
}
function $onDetach(this$static){
if (!this$static.isAttached()) {
throw new IllegalStateException_0("Should only call onDetach when the widget is attached to the browser's document");
}
try {
this$static.onUnload();
}
finally {
try {
this$static.doDetachChildren();
}
finally {
$clinit_DOM();
this$static.element.__listener = null;
this$static.attached = false;
}
}
}
function $removeFromParent_0(this$static){
if (!this$static.parent_0) {
$clinit_RootPanel();
$contains_1(widgetsToDetach, this$static) && detachNow(this$static);
}
else if (instanceOf(this$static.parent_0, 50)) {
castTo(this$static.parent_0, 50).remove(this$static);
}
else if (this$static.parent_0) {
throw new IllegalStateException_0("This widget's parent does not implement HasWidgets");
}
}
function $setParent(this$static, parent_0){
var oldParent;
oldParent = this$static.parent_0;
if (!parent_0) {
try {
!!oldParent && oldParent.isAttached() && this$static.onDetach();
}
finally {
this$static.parent_0 = null;
}
}
else {
if (oldParent) {
throw new IllegalStateException_0('Cannot set a new parent without first clearing the old parent');
}
this$static.parent_0 = parent_0;
parent_0.isAttached() && this$static.onAttach();
}
}
defineClass(14, 24, $intern_33);
_.asWidget = function(){
return this;
}
;
_.doAttachChildren = function(){
}
;
_.doDetachChildren = function(){
}
;
_.isAttached = function(){
return this.attached;
}
;
_.onAttach = function(){
$onAttach(this);
}
;
_.onBrowserEvent = function(event_0){
$onBrowserEvent(this, event_0);
}
;
_.onDetach = function(){
$onDetach(this);
}
;
_.onLoad = function(){
}
;
_.onUnload = function(){
}
;
_.setParent = function(parent_0){
$setParent(this, parent_0);
}
;
_.sinkEvents_0 = function(eventBitsToAdd){
this.eventsToSink == -1?sinkEvents(($clinit_DOM() , this.element), eventBitsToAdd | (this.element.__eventBits || 0)):(this.eventsToSink |= eventBitsToAdd);
}
;
_.attached = false;
_.eventsToSink = 0;
var Lcom_google_gwt_user_client_ui_Widget_2_classLit = createForClass('com.google.gwt.user.client.ui', 'Widget', 14);
defineClass(696, 14, $intern_34);
_.add_0 = function(child){
throw new UnsupportedOperationException_0('This panel does not support no-arg add()');
}
;
_.doAttachChildren = function(){
tryCommand(this, ($clinit_AttachDetachException() , attachCommand));
}
;
_.doDetachChildren = function(){
tryCommand(this, ($clinit_AttachDetachException() , detachCommand));
}
;
var Lcom_google_gwt_user_client_ui_Panel_2_classLit = createForClass('com.google.gwt.user.client.ui', 'Panel', 696);
function $add_2(this$static, child, container){
$removeFromParent_0(child);
$add_4(this$static.children, child);
$clinit_DOM();
$appendChild(container, resolve_0(child.element));
$setParent(child, this$static);
}
function $adjustIndex(this$static, child, beforeIndex){
var idx;
$checkIndexBoundsForInsertion(this$static, beforeIndex);
if (child.parent_0 == this$static) {
idx = $indexOf(this$static.children, child);
idx < beforeIndex && --beforeIndex;
}
return beforeIndex;
}
function $checkIndexBoundsForInsertion(this$static, index_0){
if (index_0 < 0 || index_0 > this$static.children.size_0) {
throw new IndexOutOfBoundsException;
}
}
function $insert(this$static, child, container, beforeIndex){
beforeIndex = $adjustIndex(this$static, child, beforeIndex);
$removeFromParent_0(child);
$insert_1(this$static.children, child, beforeIndex);
insertChild(container, ($clinit_DOM() , child.element), beforeIndex);
$setParent(child, this$static);
}
function $remove_0(this$static, w){
var elem;
if (w.parent_0 != this$static) {
return false;
}
try {
$setParent(w, null);
}
finally {
elem = ($clinit_DOM() , w.element);
$removeChild((null , $getParentElement_0(($clinit_DOMImpl() , elem))), elem);
$remove_3(this$static.children, w);
}
return true;
}
function ComplexPanel(){
this.children = new WidgetCollection(this);
}
defineClass(203, 696, $intern_34);
_.iterator = function(){
return new WidgetCollection$WidgetIterator(this.children);
}
;
_.remove = function(w){
return $remove_0(this, w);
}
;
var Lcom_google_gwt_user_client_ui_ComplexPanel_2_classLit = createForClass('com.google.gwt.user.client.ui', 'ComplexPanel', 203);
function changeToStaticPositioning(elem){
elem.style['left'] = '';
elem.style['top'] = '';
elem.style['position'] = '';
}
defineClass(493, 203, $intern_34);
_.add_0 = function(w){
$add_2(this, w, ($clinit_DOM() , this.element));
}
;
_.remove = function(w){
var removed;
return removed = $remove_0(this, w) , removed && changeToStaticPositioning(($clinit_DOM() , w.element)) , removed;
}
;
var Lcom_google_gwt_user_client_ui_AbsolutePanel_2_classLit = createForClass('com.google.gwt.user.client.ui', 'AbsolutePanel', 493);
function $clinit_AttachDetachException(){
$clinit_AttachDetachException = emptyMethod;
attachCommand = new AttachDetachException$1;
detachCommand = new AttachDetachException$2;
}
function AttachDetachException(causes){
UmbrellaException_0.call(this, causes);
}
function tryCommand(hasWidgets, c){
$clinit_AttachDetachException();
var caught, e, w, w$iterator;
caught = null;
for (w$iterator = hasWidgets.iterator(); w$iterator.hasNext_0();) {
w = castTo(w$iterator.next_1(), 14);
try {
c.execute_2(w);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 13)) {
e = $e0;
!caught && (caught = new HashSet);
caught.map_0.put(e, caught);
}
else
throw unwrap($e0);
}
}
if (caught) {
throw new AttachDetachException(caught);
}
}
defineClass(338, 205, $intern_11, AttachDetachException);
var attachCommand, detachCommand;
var Lcom_google_gwt_user_client_ui_AttachDetachException_2_classLit = createForClass('com.google.gwt.user.client.ui', 'AttachDetachException', 338);
function AttachDetachException$1(){
}
defineClass(339, 1, {}, AttachDetachException$1);
_.execute_2 = function(w){
w.onAttach();
}
;
var Lcom_google_gwt_user_client_ui_AttachDetachException$1_2_classLit = createForClass('com.google.gwt.user.client.ui', 'AttachDetachException/1', 339);
function AttachDetachException$2(){
}
defineClass(340, 1, {}, AttachDetachException$2);
_.execute_2 = function(w){
w.onDetach();
}
;
var Lcom_google_gwt_user_client_ui_AttachDetachException$2_2_classLit = createForClass('com.google.gwt.user.client.ui', 'AttachDetachException/2', 340);
function $clinit_FocusWidget(){
$clinit_FocusWidget = emptyMethod;
$clinit_UIObject();
impl_5 = ($clinit_FocusImpl() , $clinit_FocusImpl() , implWidget);
}
function $setEnabled(this$static, enabled){
($clinit_DOM() , this$static.element)['disabled'] = !enabled;
}
defineClass(386, 14, $intern_35);
_.addFocusHandler = function(handler){
return $addDomHandler(this, handler, ($clinit_FocusEvent() , $clinit_FocusEvent() , TYPE_1));
}
;
_.getTabIndex_0 = function(){
return $getTabIndex_0(($clinit_DOM() , this.element));
}
;
_.onAttach = function(){
var tabIndex;
$onAttach(this);
tabIndex = this.getTabIndex_0();
-1 == tabIndex && this.setTabIndex(0);
}
;
_.setFocus = function(focused){
focused?impl_5.focus_0(($clinit_DOM() , this.element)):impl_5.blur_0(($clinit_DOM() , this.element));
}
;
_.setTabIndex = function(index_0){
$setTabIndex(($clinit_DOM() , this.element), index_0);
}
;
var impl_5;
var Lcom_google_gwt_user_client_ui_FocusWidget_2_classLit = createForClass('com.google.gwt.user.client.ui', 'FocusWidget', 386);
function $getText(this$static){
return $getInnerText(($clinit_DOM() , this$static.element));
}
function $setText(this$static, text_0){
$setInnerText(($clinit_DOM() , this$static.element), text_0);
}
function ButtonBase(elem){
$setElement_0(this, ($clinit_DOM() , elem));
}
defineClass(210, 386, $intern_35);
var Lcom_google_gwt_user_client_ui_ButtonBase_2_classLit = createForClass('com.google.gwt.user.client.ui', 'ButtonBase', 210);
function Button(){
$clinit_FocusWidget();
ButtonBase.call(this, $createPushButtonElement($doc));
($clinit_DOM() , this.element).className = 'gwt-Button';
}
defineClass(176, 210, $intern_35, Button);
var Lcom_google_gwt_user_client_ui_Button_2_classLit = createForClass('com.google.gwt.user.client.ui', 'Button', 176);
function $addValueChangeHandler(this$static, handler){
if (!this$static.valueChangeHandlerInitialized) {
$addDomHandler(this$static, new CheckBox$1(this$static), ($clinit_ClickEvent() , $clinit_ClickEvent() , TYPE_0));
this$static.valueChangeHandlerInitialized = true;
}
return $addHandler_0(this$static, handler, (!TYPE_6 && (TYPE_6 = new GwtEvent$Type) , TYPE_6));
}
function $getValue(this$static){
return this$static.attached?($clinit_Boolean() , this$static.inputElem.checked?TRUE_0:FALSE_0):($clinit_Boolean() , this$static.inputElem.defaultChecked?TRUE_0:FALSE_0);
}
function $setEnabled_0(this$static, enabled){
$setDisabled(this$static.inputElem, !enabled);
enabled?$setStyleName_0(this$static, getStylePrimaryName(($clinit_DOM() , this$static.element)) + '-' + 'disabled', false):$setStyleName_0(this$static, getStylePrimaryName(($clinit_DOM() , this$static.element)) + '-' + 'disabled', true);
}
function $setValue(this$static, value_0, fireEvents){
var oldValue;
value_0 == null && (value_0 = ($clinit_Boolean() , FALSE_0));
oldValue = this$static.attached?($clinit_Boolean() , this$static.inputElem.checked?TRUE_0:FALSE_0):($clinit_Boolean() , this$static.inputElem.defaultChecked?TRUE_0:FALSE_0);
$setChecked(this$static.inputElem, unsafeCast((checkCriticalNotNull(value_0) , value_0)));
$setDefaultChecked(this$static.inputElem, unsafeCast((checkCriticalNotNull(value_0) , value_0)));
checkCriticalNotNull(value_0);
if (value_0 == oldValue) {
return;
}
fireEvents && fire_0(this$static, value_0);
}
function CheckBox(){
$clinit_FocusWidget();
CheckBox_0.call(this, ($clinit_DOM() , $createCheckInputElement($doc)));
this.element.className = 'gwt-CheckBox';
}
function CheckBox_0(elem){
var uid;
ButtonBase.call(this, ($clinit_DOM() , $createSpanElement($doc)));
this.inputElem = elem;
this.labelElem = $createLabelElement($doc);
$appendChild(this.element, this.inputElem);
$appendChild(this.element, this.labelElem);
uid = $createUniqueId($doc);
this.inputElem['id'] = uid;
$setHtmlFor(this.labelElem, uid);
new DirectionalTextHelper(this.labelElem);
!!this.inputElem && (this.inputElem.tabIndex = 0 , undefined);
}
defineClass(77, 210, {156:1, 30:1, 29:1, 28:1, 77:1, 114:1, 27:1, 26:1, 24:1, 14:1}, CheckBox);
_.getTabIndex_0 = function(){
return $getTabIndex(this.inputElem);
}
;
_.onLoad = function(){
$clinit_DOM();
this.inputElem.__listener = this;
}
;
_.onUnload = function(){
$clinit_DOM();
this.inputElem.__listener = null;
$setValue(this, this.attached?($clinit_Boolean() , this.inputElem.checked?TRUE_0:FALSE_0):($clinit_Boolean() , this.inputElem.defaultChecked?TRUE_0:FALSE_0), false);
}
;
_.setFocus = function(focused){
focused?(this.inputElem.focus() , undefined):(this.inputElem.blur() , undefined);
}
;
_.setTabIndex = function(index_0){
!!this.inputElem && $setTabIndex(this.inputElem, index_0);
}
;
_.sinkEvents_0 = function(eventBitsToAdd){
this.eventsToSink == -1?sinkEvents_0(this.inputElem, eventBitsToAdd | getEventsSunk(this.inputElem)):this.eventsToSink == -1?sinkEvents(($clinit_DOM() , this.element), eventBitsToAdd | (this.element.__eventBits || 0)):(this.eventsToSink |= eventBitsToAdd);
}
;
_.valueChangeHandlerInitialized = false;
var Lcom_google_gwt_user_client_ui_CheckBox_2_classLit = createForClass('com.google.gwt.user.client.ui', 'CheckBox', 77);
function CheckBox$1(this$0){
this.this$01 = this$0;
}
defineClass(387, 1, $intern_36, CheckBox$1);
_.onClick = function(event_0){
fire_0(this.this$01, $getValue(this.this$01));
}
;
var Lcom_google_gwt_user_client_ui_CheckBox$1_2_classLit = createForClass('com.google.gwt.user.client.ui', 'CheckBox/1', 387);
function $checkInit(this$static){
if (!this$static.widget) {
throw new IllegalStateException_0('initWidget() is not called yet');
}
}
function $initWidget(this$static, widget){
var elem;
if (this$static.widget) {
throw new IllegalStateException_0('Composite.initWidget() may only be called once.');
}
if (!widget) {
throw new NullPointerException_0('widget cannot be null');
}
instanceOf(widget, 130) && castTo(widget, 130);
$removeFromParent_0(widget);
elem = ($clinit_DOM() , widget.element);
$setElement_0(this$static, elem);
($clinit_PotentialElement() , isPotential(elem)) && $setResolver(elem, this$static);
this$static.widget = widget;
$setParent(widget, this$static);
}
function $isAttached(this$static){
if (this$static.widget) {
return this$static.widget.isAttached();
}
return false;
}
function $onAttach_0(this$static){
$checkInit(this$static);
if (this$static.eventsToSink != -1) {
this$static.widget.sinkEvents_0(this$static.eventsToSink);
this$static.eventsToSink = -1;
}
this$static.widget.onAttach();
$clinit_DOM();
setEventListener(this$static.element, this$static);
this$static.doAttachChildren();
}
function $onDetach_0(this$static){
try {
this$static.doDetachChildren();
}
finally {
this$static.widget.onDetach();
}
}
defineClass(697, 14, $intern_37);
_.isAttached = function(){
return $isAttached(this);
}
;
_.onAttach = function(){
$onAttach_0(this);
}
;
_.onBrowserEvent = function(event_0){
$onBrowserEvent(this, event_0);
this.widget.onBrowserEvent(event_0);
}
;
_.onDetach = function(){
$onDetach_0(this);
}
;
_.resolvePotentialElement = function(){
$setElement(this, this.widget.resolvePotentialElement());
return $clinit_DOM() , this.element;
}
;
var Lcom_google_gwt_user_client_ui_Composite_2_classLit = createForClass('com.google.gwt.user.client.ui', 'Composite', 697);
function $setTextOrHtml(this$static, content_0){
$setInnerHTML(this$static.element, content_0);
if (this$static.textDir != this$static.initialElementDir) {
this$static.textDir = this$static.initialElementDir;
setDirectionOnElement(this$static.element, this$static.initialElementDir);
}
}
function DirectionalTextHelper(element){
this.element = element;
this.initialElementDir = getDirectionOnElement(element);
this.textDir = this.initialElementDir;
}
defineClass(242, 1, {}, DirectionalTextHelper);
var Lcom_google_gwt_user_client_ui_DirectionalTextHelper_2_classLit = createForClass('com.google.gwt.user.client.ui', 'DirectionalTextHelper', 242);
function $add_3(this$static, w){
$add_2(this$static, w, ($clinit_DOM() , this$static.element));
}
function $insert_0(this$static, w){
$insert(this$static, w, ($clinit_DOM() , this$static.element), 0);
}
function FlowPanel(){
ComplexPanel.call(this);
$setElement(this, $createElement_0($doc, 'div'));
}
defineClass(166, 203, $intern_34, FlowPanel);
_.add_0 = function(w){
$add_3(this, w);
}
;
var Lcom_google_gwt_user_client_ui_FlowPanel_2_classLit = createForClass('com.google.gwt.user.client.ui', 'FlowPanel', 166);
function $remove_1(this$static, w){
if (this$static.widget != w) {
return false;
}
try {
$setParent(w, null);
}
finally {
$removeChild(($clinit_DOM() , this$static.element), w.element);
this$static.widget = null;
}
return true;
}
function $setWidget(this$static, w){
if (w == this$static.widget) {
return;
}
!!w && $removeFromParent_0(w);
!!this$static.widget && $remove_1(this$static, this$static.widget);
this$static.widget = w;
if (w) {
$clinit_DOM();
$appendChild(this$static.element, resolve_0($getElement(this$static.widget)));
$setParent(w, this$static);
}
}
function SimplePanel(elem){
$setElement_0(this, ($clinit_DOM() , elem));
}
defineClass(161, 696, $intern_38);
_.add_0 = function(w){
if (this.widget) {
throw new IllegalStateException_0('SimplePanel can only contain one child widget');
}
$setWidget(this, w);
}
;
_.iterator = function(){
return new SimplePanel$1(this);
}
;
_.remove = function(w){
return $remove_1(this, w);
}
;
_.setWidget = function(w){
$setWidget(this, w);
}
;
var Lcom_google_gwt_user_client_ui_SimplePanel_2_classLit = createForClass('com.google.gwt.user.client.ui', 'SimplePanel', 161);
function $clinit_FocusPanel(){
$clinit_FocusPanel = emptyMethod;
$clinit_UIObject();
impl_6 = ($clinit_FocusImpl() , $clinit_FocusImpl() , implPanel);
}
var impl_6;
function $clinit_HasHorizontalAlignment(){
$clinit_HasHorizontalAlignment = emptyMethod;
$clinit_Style$TextAlign();
}
function LabelBase(element){
$setElement_0(this, ($clinit_DOM() , element));
this.directionalTextHelper = new DirectionalTextHelper(this.element);
}
defineClass(240, 14, $intern_33);
var Lcom_google_gwt_user_client_ui_LabelBase_2_classLit = createForClass('com.google.gwt.user.client.ui', 'LabelBase', 240);
function Label(element){
LabelBase.call(this, (equalsIgnoreCase('span', ($clinit_DOMImpl() , element).tagName) , element));
}
defineClass(585, 240, $intern_33);
var Lcom_google_gwt_user_client_ui_Label_2_classLit = createForClass('com.google.gwt.user.client.ui', 'Label', 585);
function HTML(html){
$clinit_UIObject();
Label.call(this, $createDivElement($doc));
($clinit_DOM() , this.element).className = 'gwt-HTML';
$setTextOrHtml(this.directionalTextHelper, html);
}
defineClass(189, 585, $intern_33, HTML);
var Lcom_google_gwt_user_client_ui_HTML_2_classLit = createForClass('com.google.gwt.user.client.ui', 'HTML', 189);
function $addItemElement(this$static, beforeIndex, tdElem){
var tr;
if (this$static.vertical) {
tr = ($clinit_DOM() , $createTRElement($doc));
insertChild(this$static.body_0, tr, beforeIndex);
$appendChild(tr, resolve_0(tdElem));
}
else {
tr = getChild(this$static.body_0);
$clinit_DOM();
impl_3.insertChild(tr, resolve_0(tdElem), beforeIndex);
}
}
function $doItemAction(this$static, item_0, fireCommand){
var cmd;
if (!item_0.enabled) {
return;
}
$selectItem(this$static, item_0);
if (fireCommand && !!item_0.command) {
$selectItem(this$static, null);
($clinit_FocusPanel() , impl_6).blur_0(($clinit_DOM() , this$static.element));
cmd = item_0.command;
$scheduleFinally(($clinit_SchedulerImpl() , INSTANCE), new MenuBar$1(cmd));
}
}
function $findItem(this$static, hItem){
var item_0, item$iterator;
for (item$iterator = new ArrayList$1(this$static.items); item$iterator.i < item$iterator.this$01.array.length;) {
item_0 = castTo($next_3(item$iterator), 49);
if ($isOrHasChild(($clinit_DOM() , item_0.element), hItem)) {
return item_0;
}
}
return null;
}
function $focus(this$static){
($clinit_FocusPanel() , impl_6).focus_0(($clinit_DOM() , this$static.element));
}
function $init_0(this$static, vertical){
var outer_0, table, tr;
table = ($clinit_DOM() , $createTableElement($doc));
this$static.body_0 = $createTBodyElement($doc);
$appendChild(table, resolve_0(this$static.body_0));
if (!vertical) {
tr = $createTRElement($doc);
$appendChild(this$static.body_0, resolve_0(tr));
}
this$static.vertical = vertical;
outer_0 = ($clinit_FocusPanel() , impl_6).createFocusable();
$appendChild(outer_0, resolve_0(table));
$setElement_0(this$static, outer_0);
$clinit_Roles();
$set(MENUBAR, this$static.element);
this$static.eventsToSink == -1?sinkEvents(this$static.element, 2225 | (this$static.element.__eventBits || 0)):(this$static.eventsToSink |= 2225);
this$static.element.className = 'gwt-MenuBar';
vertical?$setStyleName_0(this$static, getStylePrimaryName(this$static.element) + '-' + 'vertical', true):$setStyleName_0(this$static, getStylePrimaryName(this$static.element) + '-' + 'horizontal', true);
this$static.element.style['outline'] = '0px';
this$static.element.setAttribute('hideFocus', 'true');
$addDomHandler(this$static, new MenuBar$2(this$static), ($clinit_BlurEvent() , $clinit_BlurEvent() , TYPE));
}
function $insertItem(this$static, item_0, beforeIndex){
var i_0, itemsIndex;
if (beforeIndex < 0 || beforeIndex > this$static.allItems.array.length) {
throw new IndexOutOfBoundsException;
}
$add_6(this$static.allItems, beforeIndex, item_0);
itemsIndex = 0;
for (i_0 = 0; i_0 < beforeIndex; i_0++) {
instanceOf($get_8(this$static.allItems, i_0), 49) && ++itemsIndex;
}
$add_6(this$static.items, itemsIndex, item_0);
$addItemElement(this$static, beforeIndex, ($clinit_DOM() , item_0.element));
$setStyleName_0(item_0, getStylePrimaryName(item_0.element) + '-' + 'selected', false);
$updateSubmenuIcon(this$static, item_0);
return item_0;
}
function $itemOver(this$static, item_0, focus_0){
if (!!item_0 && !item_0.enabled) {
return;
}
$selectItem(this$static, item_0);
focus_0 && this$static.focusOnHover && ($clinit_FocusPanel() , impl_6).focus_0(($clinit_DOM() , this$static.element));
!!item_0 && this$static.autoOpen && $doItemAction(this$static, item_0, false);
}
function $moveSelectionDown(this$static){
if ($selectFirstItemIfNoneSelected(this$static)) {
return;
}
this$static.vertical && $selectNextItem(this$static);
}
function $moveSelectionUp(this$static){
if ($selectFirstItemIfNoneSelected(this$static)) {
return;
}
this$static.vertical?$selectPrevItem(this$static):undefined;
}
function $moveToNextItem(this$static){
if ($selectFirstItemIfNoneSelected(this$static)) {
return;
}
!this$static.vertical && $selectNextItem(this$static);
}
function $moveToPrevItem(this$static){
if ($selectFirstItemIfNoneSelected(this$static)) {
return;
}
this$static.vertical?undefined:$selectPrevItem(this$static);
}
function $onBrowserEvent_0(this$static, event_0){
var item_0, keyCode;
item_0 = $findItem(this$static, ($clinit_DOM() , ($clinit_DOMImpl() , impl_0).eventGetTarget(event_0)));
switch ($eventGetTypeInt(event_0.type)) {
case 1:
{
($clinit_FocusPanel() , impl_6).focus_0(this$static.element);
!!item_0 && $doItemAction(this$static, item_0, true);
break;
}
case 16:
{
!!item_0 && $itemOver(this$static, item_0, true);
break;
}
case 32:
{
!!item_0 && $itemOver(this$static, null, false);
break;
}
case 2048:
{
$selectFirstItemIfNoneSelected(this$static);
break;
}
case 128:
{
keyCode = event_0.keyCode | 0;
keyCode = keyCode;
switch (keyCode) {
case 37:
$moveToPrevItem(this$static);
event_0.stopPropagation();
impl_0.eventPreventDefault(event_0);
break;
case 39:
$moveToNextItem(this$static);
event_0.stopPropagation();
impl_0.eventPreventDefault(event_0);
break;
case 38:
$moveSelectionUp(this$static);
event_0.stopPropagation();
impl_0.eventPreventDefault(event_0);
break;
case 40:
$moveSelectionDown(this$static);
event_0.stopPropagation();
impl_0.eventPreventDefault(event_0);
break;
case 27:
$selectItem(this$static, null);
event_0.stopPropagation();
impl_0.eventPreventDefault(event_0);
break;
case 9:
$selectItem(this$static, null);
break;
case 13:
if (!$selectFirstItemIfNoneSelected(this$static)) {
$doItemAction(this$static, this$static.selectedItem, true);
event_0.stopPropagation();
impl_0.eventPreventDefault(event_0);
}
}
break;
}
}
$onBrowserEvent(this$static, event_0);
}
function $removeItem(this$static, item_0){
this$static.selectedItem == item_0 && $selectItem(this$static, null);
if ($removeItemElement(this$static, item_0)) {
($clinit_DOM() , item_0.element)['colSpan'] = 1;
$remove_10(this$static.items, item_0);
}
}
function $removeItemElement(this$static, item_0){
var container, idx;
idx = $indexOf_2(this$static.allItems, item_0, 0);
if (idx == -1) {
return false;
}
container = this$static.vertical?this$static.body_0:getChild(this$static.body_0);
$removeChild(container, ($clinit_DOM() , impl_3.getChild(container, idx)));
$remove_9(this$static.allItems, idx);
return true;
}
function $selectFirstItemIfNoneSelected(this$static){
var nextItem, nextItem$iterator;
if (!this$static.selectedItem) {
for (nextItem$iterator = new ArrayList$1(this$static.items); nextItem$iterator.i < nextItem$iterator.this$01.array.length;) {
nextItem = castTo($next_3(nextItem$iterator), 49);
if (nextItem.enabled) {
$selectItem(this$static, nextItem);
break;
}
}
return true;
}
return false;
}
function $selectItem(this$static, item_0){
var td, tr;
if (item_0 == this$static.selectedItem) {
return;
}
if (this$static.selectedItem) {
$setSelectionStyle(this$static.selectedItem);
if (this$static.vertical) {
tr = getParent($getElement(this$static.selectedItem));
$clinit_DOM();
if (impl_3.getChildCount(tr) == 2) {
td = impl_3.getChild(tr, 1);
setStyleName(td, 'subMenuIcon-selected', false);
}
}
}
if (item_0) {
$setStyleName_0(item_0, getStylePrimaryName(($clinit_DOM() , item_0.element)) + '-' + 'selected', true);
if (this$static.vertical) {
tr = getParent(item_0.element);
if (impl_3.getChildCount(tr) == 2) {
td = impl_3.getChild(tr, 1);
setStyleName(td, 'subMenuIcon-selected', true);
}
}
$clinit_Roles();
$setAriaActivedescendantProperty(this$static.element, new Id(item_0.element));
}
this$static.selectedItem = item_0;
}
function $selectNextItem(this$static){
var firstIndex, index_0, itemToBeSelected;
if (!this$static.selectedItem) {
return;
}
index_0 = $indexOf_2(this$static.items, this$static.selectedItem, 0);
firstIndex = index_0;
while (true) {
index_0 = index_0 + 1;
index_0 == this$static.items.array.length && (index_0 = 0);
if (index_0 == firstIndex) {
itemToBeSelected = castTo($get_8(this$static.items, firstIndex), 49);
break;
}
else {
itemToBeSelected = castTo($get_8(this$static.items, index_0), 49);
if (itemToBeSelected.enabled) {
break;
}
}
}
$selectItem(this$static, itemToBeSelected);
}
function $selectPrevItem(this$static){
var firstIndex, index_0, itemToBeSelected;
if (!this$static.selectedItem) {
return;
}
index_0 = $indexOf_2(this$static.items, this$static.selectedItem, 0);
firstIndex = index_0;
while (true) {
index_0 = index_0 - 1;
index_0 < 0 && (index_0 = this$static.items.array.length - 1);
if (index_0 == firstIndex) {
itemToBeSelected = castTo($get_8(this$static.items, firstIndex), 49);
break;
}
else {
itemToBeSelected = castTo($get_8(this$static.items, index_0), 49);
if (itemToBeSelected.enabled) {
break;
}
}
}
$selectItem(this$static, itemToBeSelected);
}
function $updateSubmenuIcon(this$static, item_0){
var container, idx, tdCount, tr;
if (!this$static.vertical) {
return;
}
idx = $indexOf_2(this$static.allItems, item_0, 0);
if (idx == -1) {
return;
}
container = this$static.vertical?this$static.body_0:getChild(this$static.body_0);
tr = ($clinit_DOM() , impl_3.getChild(container, idx));
tdCount = impl_3.getChildCount(tr);
tdCount == 2 && $removeChild(tr, impl_3.getChild(tr, 1));
item_0.element['colSpan'] = 2;
}
defineClass(204, 14, $intern_33);
_.onBrowserEvent = function(event_0){
$onBrowserEvent_0(this, event_0);
}
;
_.onDetach = function(){
$onDetach(this);
}
;
_.autoOpen = false;
_.focusOnHover = true;
_.vertical = false;
var Lcom_google_gwt_user_client_ui_MenuBar_2_classLit = createForClass('com.google.gwt.user.client.ui', 'MenuBar', 204);
function MenuBar$1(val$cmd){
this.val$cmd2 = val$cmd;
}
defineClass(341, 1, {}, MenuBar$1);
_.execute_1 = function(){
$execute_0(this.val$cmd2);
}
;
var Lcom_google_gwt_user_client_ui_MenuBar$1_2_classLit = createForClass('com.google.gwt.user.client.ui', 'MenuBar/1', 341);
function MenuBar$2(this$0){
this.this$01 = this$0;
}
defineClass(342, 1, {744:1, 15:1}, MenuBar$2);
var Lcom_google_gwt_user_client_ui_MenuBar$2_2_classLit = createForClass('com.google.gwt.user.client.ui', 'MenuBar/2', 342);
function $clinit_MenuBar_Resources_default_InlineClientBundleGenerator$menuBarSubMenuIconInitializer(){
$clinit_MenuBar_Resources_default_InlineClientBundleGenerator$menuBarSubMenuIconInitializer = emptyMethod;
$clinit_UriUtils();
new SafeUriString('data:image/gif;base64,R0lGODlhBQAJAIAAAAAAAAAAACH5BAEAAAEALAAAAAAFAAkAAAIMRB5gp9v2YlJsJRQKADs=');
}
function $setHTML(this$static, html){
$setInnerHTML(($clinit_DOM() , this$static.element), html);
}
function $setSelectionStyle(this$static){
$setStyleName_0(this$static, getStylePrimaryName(($clinit_DOM() , this$static.element)) + '-' + 'selected', false);
}
function MenuItem(text_0, cmd){
$clinit_UIObject();
$setElement_0(this, ($clinit_DOM() , $createTDElement($doc)));
$setStyleName_0(this, getStylePrimaryName(this.element) + '-' + 'selected', false);
$setInnerHTML(this.element, text_0);
this.element.className = 'gwt-MenuItem';
$setAttribute(this.element, 'id', $createUniqueId($doc));
$clinit_Roles();
$set(MENUITEM, this.element);
this.command = cmd;
}
defineClass(49, 24, {27:1, 49:1, 24:1}, MenuItem);
_.enabled = true;
var Lcom_google_gwt_user_client_ui_MenuItem_2_classLit = createForClass('com.google.gwt.user.client.ui', 'MenuItem', 49);
function $clinit_PotentialElement(){
$clinit_PotentialElement = emptyMethod;
declareShim();
}
function $setResolver(this$static, resolver){
$clinit_PotentialElement();
this$static.__gwt_resolve = buildResolveCallback(resolver);
}
function buildResolveCallback(resolver){
return function(){
this.__gwt_resolve = cannotResolveTwice;
return resolver.resolvePotentialElement();
}
;
}
function cannotResolveTwice(){
throw 'A PotentialElement cannot be resolved twice.';
}
function declareShim(){
var shim = function(){
}
;
shim.prototype = {className:'', clientHeight:0, clientWidth:0, dir:'', getAttribute:function(name_0, value_0){
return this[name_0];
}
, href:'', id:'', lang:'', nodeType:1, removeAttribute:function(name_0, value_0){
this[name_0] = undefined;
}
, setAttribute:function(name_0, value_0){
this[name_0] = value_0;
}
, src:'', style:{}, title:''};
$wnd.GwtPotentialElementShim = shim;
}
defineClass(698, 697, $intern_37);
var Lcom_google_gwt_user_client_ui_ResizeComposite_2_classLit = createForClass('com.google.gwt.user.client.ui', 'ResizeComposite', 698);
function $clinit_RootPanel(){
$clinit_RootPanel = emptyMethod;
$clinit_UIObject();
maybeDetachCommand = new RootPanel$1;
rootPanels = new HashMap;
widgetsToDetach = new HashSet;
}
function RootPanel(elem){
$clinit_UIObject();
ComplexPanel.call(this);
$setElement_0(this, ($clinit_DOM() , elem));
$onAttach(this);
}
function detachNow(widget){
$clinit_RootPanel();
try {
widget.onDetach();
}
finally {
$remove_14(widgetsToDetach, widget);
}
}
function detachWidgets(){
$clinit_RootPanel();
try {
tryCommand(widgetsToDetach, maybeDetachCommand);
}
finally {
widgetsToDetach.map_0.clear_0();
$reset_0(rootPanels);
}
}
function get_0(){
$clinit_RootPanel();
var rp;
rp = castTo($get_5(rootPanels, null), 142);
if (rp) {
return rp;
}
$size(rootPanels) == 0 && addCloseHandler(new RootPanel$2);
rp = new RootPanel$DefaultRootPanel;
$put_2(rootPanels, null, rp);
$add_9(widgetsToDetach, rp);
return rp;
}
defineClass(142, 493, $intern_39);
var maybeDetachCommand, rootPanels, widgetsToDetach;
var Lcom_google_gwt_user_client_ui_RootPanel_2_classLit = createForClass('com.google.gwt.user.client.ui', 'RootPanel', 142);
function RootPanel$1(){
}
defineClass(495, 1, {}, RootPanel$1);
_.execute_2 = function(w){
w.isAttached() && w.onDetach();
}
;
var Lcom_google_gwt_user_client_ui_RootPanel$1_2_classLit = createForClass('com.google.gwt.user.client.ui', 'RootPanel/1', 495);
function RootPanel$2(){
}
defineClass(496, 1, {751:1, 15:1}, RootPanel$2);
var Lcom_google_gwt_user_client_ui_RootPanel$2_2_classLit = createForClass('com.google.gwt.user.client.ui', 'RootPanel/2', 496);
function RootPanel$DefaultRootPanel(){
RootPanel.call(this, ($clinit_RootPanel() , $doc.body));
}
defineClass(494, 142, $intern_39, RootPanel$DefaultRootPanel);
var Lcom_google_gwt_user_client_ui_RootPanel$DefaultRootPanel_2_classLit = createForClass('com.google.gwt.user.client.ui', 'RootPanel/DefaultRootPanel', 494);
function $next(this$static){
if (!this$static.hasElement || !this$static.this$01.widget) {
throw new NoSuchElementException;
}
this$static.hasElement = false;
return this$static.returned = this$static.this$01.widget;
}
function SimplePanel$1(this$0){
this.this$01 = this$0;
this.hasElement = !!this.this$01.widget;
}
defineClass(273, 1, {}, SimplePanel$1);
_.hasNext_0 = function(){
return this.hasElement;
}
;
_.next_1 = function(){
return $next(this);
}
;
_.remove_0 = function(){
!!this.returned && $remove_1(this.this$01, this.returned);
}
;
_.hasElement = false;
_.returned = null;
var Lcom_google_gwt_user_client_ui_SimplePanel$1_2_classLit = createForClass('com.google.gwt.user.client.ui', 'SimplePanel/1', 273);
function UIObject$DebugIdImpl(){
}
defineClass(274, 1, {}, UIObject$DebugIdImpl);
var Lcom_google_gwt_user_client_ui_UIObject$DebugIdImpl_2_classLit = createForClass('com.google.gwt.user.client.ui', 'UIObject/DebugIdImpl', 274);
function $add_4(this$static, w){
$insert_1(this$static, w, this$static.size_0);
}
function $indexOf(this$static, w){
var i_0;
for (i_0 = 0; i_0 < this$static.size_0; ++i_0) {
if (this$static.array[i_0] == w) {
return i_0;
}
}
return -1;
}
function $insert_1(this$static, w, beforeIndex){
var i_0, i0, newArray;
if (beforeIndex < 0 || beforeIndex > this$static.size_0) {
throw new IndexOutOfBoundsException;
}
if (this$static.size_0 == this$static.array.length) {
newArray = initUnidimensionalArray(Lcom_google_gwt_user_client_ui_Widget_2_classLit, $intern_0, 14, this$static.array.length * 2, 0, 1);
for (i0 = 0; i0 < this$static.array.length; ++i0) {
newArray[i0] = this$static.array[i0];
}
this$static.array = newArray;
}
++this$static.size_0;
for (i_0 = this$static.size_0 - 1; i_0 > beforeIndex; --i_0) {
this$static.array[i_0] = this$static.array[i_0 - 1];
}
this$static.array[beforeIndex] = w;
}
function $remove_2(this$static, index_0){
var i_0;
if (index_0 < 0 || index_0 >= this$static.size_0) {
throw new IndexOutOfBoundsException;
}
--this$static.size_0;
for (i_0 = index_0; i_0 < this$static.size_0; ++i_0) {
this$static.array[i_0] = this$static.array[i_0 + 1];
}
this$static.array[this$static.size_0] = null;
}
function $remove_3(this$static, w){
var index_0;
index_0 = $indexOf(this$static, w);
if (index_0 == -1) {
throw new NoSuchElementException;
}
$remove_2(this$static, index_0);
}
function WidgetCollection(parent_0){
this.parent_0 = parent_0;
this.array = initUnidimensionalArray(Lcom_google_gwt_user_client_ui_Widget_2_classLit, $intern_0, 14, 4, 0, 1);
}
defineClass(557, 1, {}, WidgetCollection);
_.iterator = function(){
return new WidgetCollection$WidgetIterator(this);
}
;
_.size_0 = 0;
var Lcom_google_gwt_user_client_ui_WidgetCollection_2_classLit = createForClass('com.google.gwt.user.client.ui', 'WidgetCollection', 557);
function $next_0(this$static){
if (this$static.index_0 >= this$static.this$01.size_0) {
throw new NoSuchElementException;
}
this$static.currentWidget = this$static.this$01.array[this$static.index_0];
++this$static.index_0;
return this$static.currentWidget;
}
function WidgetCollection$WidgetIterator(this$0){
this.this$01 = this$0;
}
defineClass(234, 1, {}, WidgetCollection$WidgetIterator);
_.hasNext_0 = function(){
return this.index_0 < this.this$01.size_0;
}
;
_.next_1 = function(){
return $next_0(this);
}
;
_.remove_0 = function(){
if (!this.currentWidget) {
throw new IllegalStateException;
}
this.this$01.parent_0.remove(this.currentWidget);
--this.index_0;
this.currentWidget = null;
}
;
_.index_0 = 0;
var Lcom_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_2_classLit = createForClass('com.google.gwt.user.client.ui', 'WidgetCollection/WidgetIterator', 234);
function $clinit_ClippedImageImpl(){
var key, global;
$clinit_ClippedImageImpl = emptyMethod;
$clinit_UriUtils();
new SafeUriString((key = '__gwtDevModeHook:' + $moduleName + ':moduleBase' , global = $wnd || self , global[key] || $moduleBase) + 'clear.cache.gif');
}
function $clinit_ClippedImagePrototype(){
$clinit_ClippedImagePrototype = emptyMethod;
$clinit_ClippedImageImpl();
}
function $clinit_FocusImpl(){
$clinit_FocusImpl = emptyMethod;
implPanel = castTo(create_com_google_gwt_user_client_ui_impl_FocusImpl(), 112);
implWidget = instanceOf(implPanel, 150)?new FocusImpl:implPanel;
}
function $getTabIndex_0(elem){
return ($clinit_DOMImpl() , impl_0).getTabIndex(elem);
}
function FocusImpl(){
$clinit_FocusImpl();
}
defineClass(112, 1, {112:1}, FocusImpl);
_.blur_0 = function(elem){
elem.blur();
}
;
_.createFocusable = function(){
var e;
e = $createDivElement($doc);
e.tabIndex = 0;
return e;
}
;
_.focus_0 = function(elem){
elem.focus();
}
;
var implPanel, implWidget;
var Lcom_google_gwt_user_client_ui_impl_FocusImpl_2_classLit = createForClass('com.google.gwt.user.client.ui.impl', 'FocusImpl', 112);
function $createFocusHandler(){
return function(evt){
var div = this.parentNode;
div.onfocus && $wnd.setTimeout(function(){
div.focus();
}
, 0);
}
;
}
function FocusImplStandard(){
$clinit_FocusImpl();
}
function createFocusable0(focusHandler){
var div = $doc.createElement('div');
div.tabIndex = 0;
var input_0 = $doc.createElement('input');
input_0.type = 'text';
input_0.tabIndex = -1;
input_0.setAttribute('role', 'presentation');
var style = input_0.style;
style.opacity = 0;
style.height = '1px';
style.width = '1px';
style.zIndex = -1;
style.overflow = 'hidden';
style.position = 'absolute';
input_0.addEventListener('focus', focusHandler, false);
div.appendChild(input_0);
return div;
}
defineClass(150, 112, $intern_40, FocusImplStandard);
_.createFocusable = function(){
return createFocusable0(focusHandler_0?focusHandler_0:(focusHandler_0 = $createFocusHandler()));
}
;
var focusHandler_0;
var Lcom_google_gwt_user_client_ui_impl_FocusImplStandard_2_classLit = createForClass('com.google.gwt.user.client.ui.impl', 'FocusImplStandard', 150);
function FocusImplSafari(){
$clinit_FocusImpl();
}
defineClass(665, 150, $intern_40, FocusImplSafari);
_.blur_0 = function blur_0(elem){
$wnd.setTimeout(function(){
elem.blur();
}
, 0);
}
;
_.focus_0 = function focus_1(elem){
$wnd.setTimeout(function(){
elem.focus();
}
, 0);
}
;
var Lcom_google_gwt_user_client_ui_impl_FocusImplSafari_2_classLit = createForClass('com.google.gwt.user.client.ui.impl', 'FocusImplSafari', 665);
function PopupImpl(){
}
defineClass(672, 1, {}, PopupImpl);
var Lcom_google_gwt_user_client_ui_impl_PopupImpl_2_classLit = createForClass('com.google.gwt.user.client.ui.impl', 'PopupImpl', 672);
function $clinit_PopupImplMozilla(){
$clinit_PopupImplMozilla = emptyMethod;
isFF2Mac();
}
function PopupImplMozilla(){
$clinit_PopupImplMozilla();
}
function isFF2Mac(){
function makeVersion(result){
return parseInt(result[1]) * 1000 + parseInt(result[2]);
}
var ua = navigator.userAgent;
if (ua.indexOf('Macintosh') != -1) {
var result_0 = /rv:([0-9]+)\.([0-9]+)/.exec(ua);
if (result_0 && result_0.length == 3) {
if (makeVersion(result_0) <= 1008) {
return true;
}
}
}
return false;
}
defineClass(674, 672, {}, PopupImplMozilla);
var Lcom_google_gwt_user_client_ui_impl_PopupImplMozilla_2_classLit = createForClass('com.google.gwt.user.client.ui.impl', 'PopupImplMozilla', 674);
function assertCompileTimeUserAgent(){
var compileTimeValue, impl, runtimeValue;
impl = castTo(create_com_google_gwt_useragent_client_UserAgent(), 195);
compileTimeValue = impl.getCompileTimeValue();
runtimeValue = impl.getRuntimeValue();
if (!$equals_2(compileTimeValue, runtimeValue)) {
throw new UserAgentAsserter$UserAgentAssertionError(compileTimeValue, runtimeValue);
}
}
function Error_0(message, cause){
Throwable.call(this, message, cause);
}
defineClass(159, 13, $intern_2);
var Ljava_lang_Error_2_classLit = createForClass('java.lang', 'Error', 159);
defineClass(44, 159, $intern_2);
var Ljava_lang_AssertionError_2_classLit = createForClass('java.lang', 'AssertionError', 44);
function UserAgentAsserter$UserAgentAssertionError(compileTimeValue, runtimeValue){
Error_0.call(this, ($clinit_String() , 'Possible problem with your *.gwt.xml module file.\nThe compile time user.agent value (' + compileTimeValue + ') ' + 'does not match the runtime user.agent value (' + runtimeValue + ').\n' + 'Expect more errors.' == null?'null':toString__Ljava_lang_String___devirtual$('Possible problem with your *.gwt.xml module file.\nThe compile time user.agent value (' + compileTimeValue + ') ' + 'does not match the runtime user.agent value (' + runtimeValue + ').\n' + 'Expect more errors.')), instanceOf('Possible problem with your *.gwt.xml module file.\nThe compile time user.agent value (' + compileTimeValue + ') ' + 'does not match the runtime user.agent value (' + runtimeValue + ').\n' + 'Expect more errors.', 13)?castTo('Possible problem with your *.gwt.xml module file.\nThe compile time user.agent value (' + compileTimeValue + ') ' + 'does not match the runtime user.agent value (' + runtimeValue + ').\n' + 'Expect more errors.', 13):null);
}
defineClass(252, 44, $intern_2, UserAgentAsserter$UserAgentAssertionError);
var Lcom_google_gwt_useragent_client_UserAgentAsserter$UserAgentAssertionError_2_classLit = createForClass('com.google.gwt.useragent.client', 'UserAgentAsserter/UserAgentAssertionError', 252);
function UserAgentImplGecko1_8(){
}
defineClass(563, 1, {195:1}, UserAgentImplGecko1_8);
_.getCompileTimeValue = function(){
return 'gecko1_8';
}
;
_.getRuntimeValue = function getRuntimeValue(){
var ua = navigator.userAgent.toLowerCase();
var docMode = $doc.documentMode;
if (function(){
return ua.indexOf('webkit') != -1;
}
())
return 'safari';
if (function(){
return ua.indexOf('msie') != -1 && docMode >= 10 && docMode < 11;
}
())
return 'ie10';
if (function(){
return ua.indexOf('msie') != -1 && docMode >= 9 && docMode < 11;
}
())
return 'ie9';
if (function(){
return ua.indexOf('msie') != -1 && docMode >= 8 && docMode < 11;
}
())
return 'ie8';
if (function(){
return ua.indexOf('gecko') != -1 || docMode >= 11;
}
())
return 'gecko1_8';
return 'unknown';
}
;
var Lcom_google_gwt_useragent_client_UserAgentImplGecko1_18_2_classLit = createForClass('com.google.gwt.useragent.client', 'UserAgentImplGecko1_8', 563);
function UserAgentImplIe10(){
}
defineClass(561, 1, {195:1}, UserAgentImplIe10);
_.getCompileTimeValue = function(){
return 'ie10';
}
;
_.getRuntimeValue = function getRuntimeValue_0(){
var ua = navigator.userAgent.toLowerCase();
var docMode = $doc.documentMode;
if (function(){
return ua.indexOf('webkit') != -1;
}
())
return 'safari';
if (function(){
return ua.indexOf('msie') != -1 && docMode >= 10 && docMode < 11;
}
())
return 'ie10';
if (function(){
return ua.indexOf('msie') != -1 && docMode >= 9 && docMode < 11;
}
())
return 'ie9';
if (function(){
return ua.indexOf('msie') != -1 && docMode >= 8 && docMode < 11;
}
())
return 'ie8';
if (function(){
return ua.indexOf('gecko') != -1 || docMode >= 11;
}
())
return 'gecko1_8';
return 'unknown';
}
;
var Lcom_google_gwt_useragent_client_UserAgentImplIe10_2_classLit = createForClass('com.google.gwt.useragent.client', 'UserAgentImplIe10', 561);
function UserAgentImplSafari(){
}
defineClass(562, 1, {195:1}, UserAgentImplSafari);
_.getCompileTimeValue = function(){
return 'safari';
}
;
_.getRuntimeValue = function getRuntimeValue_1(){
var ua = navigator.userAgent.toLowerCase();
var docMode = $doc.documentMode;
if (function(){
return ua.indexOf('webkit') != -1;
}
())
return 'safari';
if (function(){
return ua.indexOf('msie') != -1 && docMode >= 10 && docMode < 11;
}
())
return 'ie10';
if (function(){
return ua.indexOf('msie') != -1 && docMode >= 9 && docMode < 11;
}
())
return 'ie9';
if (function(){
return ua.indexOf('msie') != -1 && docMode >= 8 && docMode < 11;
}
())
return 'ie8';
if (function(){
return ua.indexOf('gecko') != -1 || docMode >= 11;
}
())
return 'gecko1_8';
return 'unknown';
}
;
var Lcom_google_gwt_useragent_client_UserAgentImplSafari_2_classLit = createForClass('com.google.gwt.useragent.client', 'UserAgentImplSafari', 562);
function $removeHandler(this$static){
$doRemove(this$static.this$01, this$static.val$type2, this$static.val$source3, this$static.val$handler4);
}
function SimpleEventBus$1(this$0, val$type, val$handler){
this.this$01 = this$0;
this.val$type2 = val$type;
this.val$source3 = null;
this.val$handler4 = val$handler;
}
defineClass(440, 1, {}, SimpleEventBus$1);
var Lcom_google_web_bindery_event_shared_SimpleEventBus$1_2_classLit = createForClass('com.google.web.bindery.event.shared', 'SimpleEventBus/1', 440);
function SimpleEventBus$2(this$0, val$type, val$handler){
this.this$01 = this$0;
this.val$type2 = val$type;
this.val$source3 = null;
this.val$handler4 = val$handler;
}
defineClass(441, 1, {684:1}, SimpleEventBus$2);
_.execute_1 = function(){
$doAddNow(this.this$01, this.val$type2, this.val$source3, this.val$handler4);
}
;
var Lcom_google_web_bindery_event_shared_SimpleEventBus$2_2_classLit = createForClass('com.google.web.bindery.event.shared', 'SimpleEventBus/2', 441);
function SimpleEventBus$3(this$0, val$type, val$source, val$handler){
this.this$01 = this$0;
this.val$type2 = val$type;
this.val$source3 = val$source;
this.val$handler4 = val$handler;
}
defineClass(442, 1, {684:1}, SimpleEventBus$3);
_.execute_1 = function(){
$doRemoveNow(this.this$01, this.val$type2, this.val$source3, this.val$handler4);
}
;
var Lcom_google_web_bindery_event_shared_SimpleEventBus$3_2_classLit = createForClass('com.google.web.bindery.event.shared', 'SimpleEventBus/3', 442);
function $clinit_BrowserInfo(){
$clinit_BrowserInfo = emptyMethod;
var browserClassnames;
browserClassnames = $getCSSClass((!instance_2 && (instance_2 = new BrowserInfo) , instance_2));
$addStyleName(($clinit_RootPanel() , get_0()), browserClassnames);
}
function $detectTouchDevice(){
try {
document.createEvent('TouchEvent');
return true;
}
catch (e) {
return false;
}
}
function $getCSSClass(this$static){
var browserEngineClass, browserIdentifier, majorVersionClass, minorVersionClass, osClass;
if (cssClass == null) {
browserIdentifier = '';
majorVersionClass = '';
minorVersionClass = '';
browserEngineClass = '';
if (this$static.browserDetails.isFirefox) {
browserIdentifier = 'ff';
majorVersionClass = 'ff' + this$static.browserDetails.browserMajorVersion;
minorVersionClass = majorVersionClass + this$static.browserDetails.browserMinorVersion;
browserEngineClass = 'gecko';
}
else if (this$static.browserDetails.isChrome) {
browserIdentifier = 'sa';
majorVersionClass = 'ch';
browserEngineClass = 'webkit';
}
else if (this$static.browserDetails.isSafari) {
browserIdentifier = 'sa';
majorVersionClass = 'sa' + this$static.browserDetails.browserMajorVersion;
minorVersionClass = majorVersionClass + this$static.browserDetails.browserMinorVersion;
browserEngineClass = 'webkit';
}
else if (this$static.browserDetails.isIE) {
browserIdentifier = 'ie';
majorVersionClass = 'ie' + this$static.browserDetails.browserMajorVersion;
minorVersionClass = majorVersionClass + this$static.browserDetails.browserMinorVersion;
browserEngineClass = 'trident';
}
else if (this$static.browserDetails.isEdge) {
browserIdentifier = 'edge';
majorVersionClass = 'edge' + this$static.browserDetails.browserMajorVersion;
minorVersionClass = majorVersionClass + this$static.browserDetails.browserMinorVersion;
browserEngineClass = '';
}
else if (this$static.browserDetails.isOpera) {
browserIdentifier = 'op';
majorVersionClass = 'op' + this$static.browserDetails.browserMajorVersion;
minorVersionClass = majorVersionClass + this$static.browserDetails.browserMinorVersion;
browserEngineClass = 'presto';
}
cssClass = 'v-' + browserIdentifier;
$equals_2('', majorVersionClass) || (cssClass = cssClass + ' ' + 'v-' + majorVersionClass);
$equals_2('', minorVersionClass) || (cssClass = cssClass + ' ' + 'v-' + minorVersionClass);
$equals_2('', browserEngineClass) || (cssClass = cssClass + ' ' + 'v-' + browserEngineClass);
osClass = $getOperatingSystemClass(this$static);
osClass != null && (cssClass = cssClass + ' ' + osClass);
this$static.touchDevice && (cssClass = cssClass + ' ' + 'v-' + 'touch');
}
return cssClass;
}
function $getIEDocumentMode(){
var mode = $wnd.document.documentMode;
if (!mode)
return -1;
return mode;
}
function $getOperatingSystemClass(this$static){
if (this$static.browserDetails.os == 5) {
return 'v-android';
}
else if (this$static.browserDetails.os == 4) {
return 'v-ios v-ios' + this$static.browserDetails.osMajorVersion;
}
else if (this$static.browserDetails.os == 1) {
return 'v-win';
}
else if (this$static.browserDetails.os == 3) {
return 'v-lin';
}
else if (this$static.browserDetails.os == 2) {
return 'v-mac';
}
return null;
}
function $isIE8(this$static){
return this$static.browserDetails.isIE && this$static.browserDetails.browserMajorVersion == 8;
}
function $isIE9(this$static){
return this$static.browserDetails.isIE && this$static.browserDetails.browserMajorVersion == 9;
}
function BrowserInfo(){
$clinit_BrowserInfo();
var documentMode;
this.browserDetails = new VBrowserDetails(getBrowserString());
if (this.browserDetails.isIE) {
documentMode = $getIEDocumentMode();
documentMode != -1 && $setIEMode(this.browserDetails, documentMode);
}
this.browserDetails.isChrome?(this.touchDevice = 'ontouchstart' in window):this.browserDetails.isIE?(this.touchDevice = !!navigator.msMaxTouchPoints):(this.touchDevice = !this.browserDetails.isPhantomJS && $detectTouchDevice());
}
function getBrowserString(){
$clinit_BrowserInfo();
return $wnd.navigator.userAgent;
}
defineClass(56, 1, {}, BrowserInfo);
_.touchDevice = false;
var cssClass = null, instance_2;
var Lcom_vaadin_client_BrowserInfo_2_classLit = createForClass('com.vaadin.client', 'BrowserInfo', 56);
function $getDoubleProperty(this$static){
var result, value_0;
value_0 = $getProperty_0(this$static, 'height');
result = parseFloat(value_0);
return result;
}
function $getProperty_0(this$static, name_0){
var cs = this$static.computedStyle;
var elem = this$static.elem;
if (name_0.indexOf('border') > -1 && name_0.indexOf('Width') > -1) {
var borderStyleProp = name_0.substring(0, name_0.length - 5) + 'Style';
if (cs.getPropertyValue)
var borderStyle = cs.getPropertyValue(borderStyleProp);
else
var borderStyle = cs[borderStyleProp];
if (borderStyle == 'none')
return '0px';
}
if (cs.getPropertyValue) {
name_0 = name_0.replace(/([A-Z])/g, '-$1').toLowerCase();
var ret = cs.getPropertyValue(name_0);
}
else {
var ret = cs[name_0];
var style = elem.style;
if (!/^\d+(px)?$/i.test(ret) && /^\d/.test(ret)) {
var left = style.left, rsLeft = elem.runtimeStyle.left;
elem.runtimeStyle.left = cs.left;
style.left = ret || 0;
ret = style.pixelLeft + 'px';
style.left = left;
elem.runtimeStyle.left = rsLeft;
}
}
if (name_0.indexOf('margin') > -1 && ret == 'auto') {
return '0px';
}
name_0 == 'width' && ret == 'auto'?(ret = elem.clientWidth + 'px'):name_0 == 'height' && ret == 'auto' && (ret = elem.clientHeight + 'px');
return ret;
}
function ComputedStyle(elem){
this.computedStyle = getComputedStyle_0(elem);
this.elem = elem;
}
function getComputedStyle_0(elem){
if (elem.nodeType != 1) {
return {};
}
if ($wnd.document.defaultView && $wnd.document.defaultView.getComputedStyle) {
return $wnd.document.defaultView.getComputedStyle(elem, null);
}
if (elem.currentStyle) {
return elem.currentStyle;
}
}
defineClass(675, 1, {}, ComputedStyle);
var Lcom_vaadin_client_ComputedStyle_2_classLit = createForClass('com.vaadin.client', 'ComputedStyle', 675);
function $scheduleDeferred_0(this$static, cmd){
++this$static.deferredCommandTrackers;
this$static.deferredCommands = push_0(this$static.deferredCommands, [cmd, false]);
$maybeSchedulePostEventPumpCommands(this$static);
$scheduleDeferred(this$static, new VSchedulerImpl$1(this$static));
}
function VSchedulerImpl(){
}
defineClass(538, 497, {}, VSchedulerImpl);
_.deferredCommandTrackers = 0;
var Lcom_vaadin_client_VSchedulerImpl_2_classLit = createForClass('com.vaadin.client', 'VSchedulerImpl', 538);
function VSchedulerImpl$1(this$0){
this.this$01 = this$0;
}
defineClass(539, 1, {}, VSchedulerImpl$1);
_.execute_1 = function(){
--this.this$01.deferredCommandTrackers;
}
;
var Lcom_vaadin_client_VSchedulerImpl$1_2_classLit = createForClass('com.vaadin.client', 'VSchedulerImpl/1', 539);
function $clinit_WidgetUtil(){
$clinit_WidgetUtil = emptyMethod;
$clinit_DOM();
$createDivElement($doc);
}
function findWidget(element, class1){
$clinit_WidgetUtil();
var eventListener, w;
if (element) {
eventListener = null;
while (!eventListener && !!element) {
eventListener = ($clinit_DOM() , getEventListener(element));
!eventListener && (element = $getParentElement_0(($clinit_DOMImpl() , element)));
}
if (instanceOf(eventListener, 14)) {
w = castTo(eventListener, 14);
while (w) {
if (!class1 || w.___clazz == class1) {
return w;
}
w = w.parent_0;
}
}
}
return null;
}
function focus_2(el){
$clinit_WidgetUtil();
try {
el.focus();
}
catch (e) {
}
}
function getBorderThickness(element, borderNames){
$clinit_WidgetUtil();
if (typeof $wnd.getComputedStyle === 'function') {
var computedStyle = $wnd.getComputedStyle(element);
var width_0 = 0;
for (i = 0; i < borderNames.length; i++) {
var borderWidth = computedStyle[borderNames[i]];
width_0 += parseFloat(borderWidth);
}
return width_0;
}
else {
var parentElement = element.offsetParent;
var cloneElement = element.cloneNode(false);
cloneElement.style.boxSizing = 'content-box';
parentElement.appendChild(cloneElement);
cloneElement.style.height = '10px';
var heightWithBorder = cloneElement.offsetHeight;
for (i = 0; i < borderNames.length; i++) {
cloneElement.style[borderNames[i]] = '0';
}
var heightWithoutBorder = cloneElement.offsetHeight;
parentElement.removeChild(cloneElement);
return heightWithBorder - heightWithoutBorder;
}
}
function getElementFromPoint(clientX, clientY){
$clinit_WidgetUtil();
var el = $wnd.document.elementFromPoint(clientX, clientY);
el = $wnd.document.elementFromPoint(clientX, clientY);
el != null && el.nodeType == 3 && (el = el.parentNode);
return el;
}
function getFocusedElement(){
$clinit_WidgetUtil();
if ($wnd.document.activeElement) {
return $wnd.document.activeElement;
}
return null;
}
function getNativeScrollbarSize(){
$clinit_WidgetUtil();
var scroller;
if (detectedScrollbarSize_0 < 0) {
scroller = ($clinit_DOM() , $createDivElement($doc));
scroller.style['width'] = '50px';
scroller.style['height'] = '50px';
scroller.style['overflow'] = 'scroll';
scroller.style['position'] = 'absolute';
scroller.style['marginLeft'] = '-5000px';
$appendChild(($clinit_RootPanel() , $doc.body), scroller);
detectedScrollbarSize_0 = ((scroller.offsetWidth || 0) | 0) - (parseInt(scroller['clientWidth']) | 0);
$removeChild($doc.body, scroller);
}
return detectedScrollbarSize_0;
}
function getRequiredHeightBoundingClientRectDouble(element){
$clinit_WidgetUtil();
var height;
if (element.getBoundingClientRect != null) {
var rect = element.getBoundingClientRect();
height = rect.bottom - rect.top;
}
else {
height = element.offsetHeight;
}
return height;
}
function getRequiredWidthBoundingClientRectDouble(element){
$clinit_WidgetUtil();
if (element.getBoundingClientRect) {
var rect = element.getBoundingClientRect();
return rect.right - rect.left;
}
else {
return element.offsetWidth;
}
}
function getSubPixelRoundingFactor(){
var computedHeight, computedStyle, div, parent_0, probeSize;
if (detectedSubPixelRoundingFactor != -1) {
return detectedSubPixelRoundingFactor;
}
div = $createDivElement($doc);
$appendChild($doc.body, div);
div.style['height'] = ($clinit_Style$Unit() , '0.999999px');
computedStyle = new ComputedStyle(div);
computedHeight = $getDoubleProperty(computedStyle);
if (computedHeight < 0.999999) {
detectedSubPixelRoundingFactor = toInt_0(fromDouble_0(Math.round(1 / (1 - computedHeight))));
}
else {
probeSize = 1;
while ($getDoubleProperty(computedStyle) != 0) {
computedHeight = $getDoubleProperty(computedStyle);
probeSize /= 2;
div.style['height'] = probeSize + 'px';
}
detectedSubPixelRoundingFactor = toInt_0(fromDouble_0(Math.round(1 / computedHeight)));
}
parent_0 = $getParentElement_0(($clinit_DOMImpl() , div));
!!parent_0 && parent_0.removeChild(div);
return detectedSubPixelRoundingFactor;
}
function getTouchOrMouseClientX(event_0){
$clinit_WidgetUtil();
return indexOf(($clinit_DOMImpl() , event_0).type, 'touch') != -1?$getClientX(event_0.changedTouches[0]):toInt32(event_0.clientX || 0);
}
function getTouchOrMouseClientY(event_0){
$clinit_WidgetUtil();
return indexOf(($clinit_DOMImpl() , event_0).type, 'touch') != -1?$getClientY(event_0.changedTouches[0]):toInt32(event_0.clientY || 0);
}
function measureVerticalBorder(element){
$clinit_WidgetUtil();
var borders, height, offsetHeight, offsetWidth, width_0;
if (($clinit_BrowserInfo() , !instance_2 && (instance_2 = new BrowserInfo) , $clinit_BrowserInfo() , instance_2).browserDetails.isIE) {
width_0 = $getProperty(element.style, 'width');
height = $getProperty(element.style, 'height');
offsetWidth = (element.offsetWidth || 0) | 0;
offsetHeight = (element.offsetHeight || 0) | 0;
offsetHeight < 1 && (offsetHeight = 1);
offsetWidth < 1 && (offsetWidth = 10);
element.style['width'] = offsetWidth + ($clinit_Style$Unit() , 'px');
element.style['height'] = offsetHeight + 'px';
borders = ((element.offsetHeight || 0) | 0) - (parseInt(element['clientHeight']) | 0);
element.style['height'] = height;
element.style['width'] = width_0;
}
else {
borders = ((element.offsetHeight || 0) | 0) - (parseInt(element['clientHeight']) | 0);
}
return borders;
}
function pixelValuesEqual(num1, num2){
$clinit_WidgetUtil();
return (num1 - num2 <= 0?0 - (num1 - num2):num1 - num2) <= 0.49;
}
function roundSize(size_0){
var integerPart, nrFractions;
$clinit_WidgetUtil();
var factor;
if ($isIE8(($clinit_BrowserInfo() , !instance_2 && (instance_2 = new BrowserInfo) , $clinit_BrowserInfo() , instance_2))) {
return round_int(size_0);
}
factor = getSubPixelRoundingFactor();
if (factor < 0 || size_0 < 0) {
return size_0;
}
return integerPart = round_int(size_0) , nrFractions = (size_0 - integerPart) * factor , integerPart + round_int(nrFractions) / factor;
}
var detectedScrollbarSize_0 = -1, detectedSubPixelRoundingFactor = -1;
function $checkCacheCoverage(this$static){
var minCacheRange, missingCachePartition, availableDataRange;
if (this$static.currentRequestCallback) {
return;
}
minCacheRange = (availableDataRange = $getAvailableRangeForCache(this$static) , $getMinCacheRange(this$static.cacheStrategy, this$static.requestedAvailability, availableDataRange));
if (!$intersects(minCacheRange, this$static.cached) || $isEmpty(this$static.cached)) {
$dropFromCache(this$static, this$static.cached);
this$static.cached = new Range_0(0, 0);
$handleMissingRows(this$static, $getMaxCacheRange(this$static));
}
else {
$discardStaleCacheEntries(this$static);
if ($isSubsetOf(minCacheRange, this$static.cached)) {
!!this$static.dataChangeHandler && $dataAvailable(this$static.dataChangeHandler, this$static.cached.start_0, $length_0(this$static.cached));
}
else {
missingCachePartition = $partitionWith($getMaxCacheRange(this$static), this$static.cached);
$handleMissingRows(this$static, missingCachePartition[0]);
$handleMissingRows(this$static, missingCachePartition[2]);
}
}
}
function $discardStaleCacheEntries(this$static){
var cacheParition;
cacheParition = $partitionWith(this$static.cached, $getMaxCacheRange(this$static));
$dropFromCache(this$static, cacheParition[0]);
this$static.cached = cacheParition[1];
$dropFromCache(this$static, cacheParition[2]);
}
function $dropFromCache(this$static, range){
var i_0, removed;
for (i_0 = range.start_0; i_0 < range.end; i_0++) {
removed = $remove_6(this$static.indexToRowMap, valueOf_2(i_0));
$remove_6(this$static.keyToIndexMap, this$static.getRowKey_0(removed));
}
}
function $ensureAvailability(this$static, firstRowIndex, numberOfRows){
this$static.requestedAvailability = withLength(firstRowIndex, numberOfRows);
$ensureCoverageCheck(this$static);
}
function $ensureCoverageCheck(this$static){
if (!this$static.coverageCheckPending) {
this$static.coverageCheckPending = true;
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), this$static.coverageChecker);
}
}
function $getAvailableRangeForCache(this$static){
var upperBound;
upperBound = this$static.size_2();
upperBound == -1 && (upperBound = $length_0(this$static.requestedAvailability));
return withLength(0, upperBound);
}
function $getHandle(this$static, row){
if (row == null) {
throw new NullPointerException_0('key may not be null (row: ' + row + ')');
}
if ($containsKey(this$static.pinnedRows, row)) {
return castTo($get_5(this$static.pinnedRows, row), 107);
}
else if ($containsKey(this$static.keyToIndexMap, row)) {
return new AbstractRemoteDataSource$RowHandleImpl(this$static, row, row);
}
else {
throw new IllegalStateException_0('The cache of this DataSource does not currently contain the row ' + row);
}
}
function $getMaxCacheRange(this$static){
var availableDataRange, maxCacheRange;
availableDataRange = $getAvailableRangeForCache(this$static);
maxCacheRange = $getMaxCacheRange_0(this$static.cacheStrategy, this$static.requestedAvailability, availableDataRange);
return maxCacheRange;
}
function $getRow(this$static, rowIndex){
return $get_5(this$static.indexToRowMap, valueOf_2(rowIndex));
}
function $handleMissingRows(this$static, range){
if (range.start_0 >= range.end) {
return;
}
this$static.currentRequestCallback = new AbstractRemoteDataSource$RequestRowsCallback(this$static, range);
this$static.requestRows(range.start_0, range.end - range.start_0, this$static.currentRequestCallback);
}
function $indexOf_0(this$static, row){
if ($containsKey(this$static.keyToIndexMap, row)) {
return castTo($get_5(this$static.keyToIndexMap, row), 22).value_0;
}
return -1;
}
function $pinHandle(this$static, handle){
var count, key;
key = handle.key;
count = castTo($get_5(this$static.pinnedCounts, key), 22);
if (!count) {
count = valueOf_2(0);
$put_2(this$static.pinnedRows, key, handle);
}
$put_2(this$static.pinnedCounts, key, valueOf_2(count.value_0 + 1));
}
function $resetDataAndSize(this$static, newSize){
this$static.size_1 = newSize;
$dropFromCache(this$static, this$static.cached);
this$static.cached = withLength(0, 0);
!!this$static.dataChangeHandler && $resetDataAndSize_0(this$static.dataChangeHandler, newSize);
}
function $setDataChangeHandler(this$static, dataChangeHandler){
this$static.dataChangeHandler = dataChangeHandler;
if (!!dataChangeHandler && !$isEmpty(this$static.cached)) {
$dataUpdated(dataChangeHandler, this$static.cached.start_0, $length_0(this$static.cached));
$dataAvailable(dataChangeHandler, this$static.cached.start_0, $length_0(this$static.cached));
}
}
function $setRowData(this$static, firstRowIndex, rowData){
var i_0, i0, maxCacheRange, newUsefulData, partition, received, row;
received = withLength(firstRowIndex, rowData.size_2());
if (this$static.currentRequestCallback) {
now_1() - this$static.currentRequestCallback.requestStart;
this$static.currentRequestCallback = null;
}
maxCacheRange = $getMaxCacheRange(this$static);
partition = $partitionWith(received, maxCacheRange);
newUsefulData = partition[1];
if (newUsefulData.start_0 < newUsefulData.end) {
for (i_0 = newUsefulData.start_0; i_0 < newUsefulData.end; i_0++) {
row = rowData.get_1(i_0 - firstRowIndex);
$put_2(this$static.indexToRowMap, valueOf_2(i_0), row);
$put_2(this$static.keyToIndexMap, this$static.getRowKey_0(row), valueOf_2(i_0));
}
!!this$static.dataChangeHandler && $dataUpdated(this$static.dataChangeHandler, newUsefulData.start_0, newUsefulData.end - newUsefulData.start_0);
if ($isEmpty(this$static.cached)) {
this$static.cached = newUsefulData;
}
else {
$discardStaleCacheEntries(this$static);
$isEmpty(this$static.cached)?(this$static.cached = newUsefulData):(this$static.cached = $combineWith(this$static.cached, newUsefulData));
}
!!this$static.dataChangeHandler && $dataAvailable(this$static.dataChangeHandler, this$static.cached.start_0, $length_0(this$static.cached));
$updatePinnedRows(this$static, rowData);
}
if (!$isEmpty(partition[0]) || !$isEmpty(partition[2])) {
for (i0 = 0; i0 < $length_0(partition[0]); ++i0) {
rowData.get_1(i0);
}
for (i_0 = 0; i_0 < $length_0(partition[2]); ++i_0) {
rowData.get_1(i_0);
}
}
$ensureCoverageCheck(this$static);
}
function $unpinHandle(this$static, handle){
var count, key;
key = handle.key;
count = castTo($get_5(this$static.pinnedCounts, key), 22);
if (!count) {
throw new IllegalStateException_0('Row ' + handle.row_0 + ' with key ' + key + ' was not pinned to begin with');
}
else if ($equals_1(count, valueOf_2(1))) {
$remove_6(this$static.pinnedRows, key);
$remove_6(this$static.pinnedCounts, key);
}
else {
$put_2(this$static.pinnedCounts, key, valueOf_2(count.value_0 - 1));
}
}
function $updatePinnedRows(this$static, rowData){
var handle, key, row, row$iterator;
for (row$iterator = rowData.iterator(); row$iterator.hasNext_0();) {
row = row$iterator.next_1();
key = this$static.getRowKey_0(row);
handle = castTo($get_5(this$static.pinnedRows, key), 119);
!!handle && (handle.row_0 = row);
}
}
defineClass(428, 1, {});
_.resetDataAndSize = function(newSize){
$resetDataAndSize(this, newSize);
}
;
_.size_2 = function(){
return this.size_1;
}
;
_.coverageCheckPending = false;
_.size_1 = -1;
var Lcom_vaadin_client_data_AbstractRemoteDataSource_2_classLit = createForClass('com.vaadin.client.data', 'AbstractRemoteDataSource', 428);
function AbstractRemoteDataSource$1(this$0){
this.this$01 = this$0;
}
defineClass(381, 1, {}, AbstractRemoteDataSource$1);
_.execute_1 = function(){
this.this$01.coverageCheckPending = false;
$checkCacheCoverage(this.this$01);
}
;
var Lcom_vaadin_client_data_AbstractRemoteDataSource$1_2_classLit = createForClass('com.vaadin.client.data', 'AbstractRemoteDataSource/1', 381);
function AbstractRemoteDataSource$RequestRowsCallback(source, requestedRange){
this.source_0 = source;
this.requestedRange = requestedRange;
this.requestStart = now_1();
}
defineClass(167, 1, {}, AbstractRemoteDataSource$RequestRowsCallback);
_.onResponse = function(rowData, totalSize){
this.source_0.size_1 != totalSize && this.source_0.resetDataAndSize(totalSize);
$setRowData(this.source_0, this.requestedRange.start_0, rowData);
}
;
_.requestStart = 0;
var Lcom_vaadin_client_data_AbstractRemoteDataSource$RequestRowsCallback_2_classLit = createForClass('com.vaadin.client.data', 'AbstractRemoteDataSource/RequestRowsCallback', 167);
defineClass(107, 1, {107:1});
_.equals = function(obj){
return $equalsExplicit(this, obj);
}
;
_.hashCode = function(){
return hashCode__I__devirtual$(this.key);
}
;
var Lcom_vaadin_client_data_DataSource$RowHandle_2_classLit = createForClass('com.vaadin.client.data', 'DataSource/RowHandle', 107);
function $equalsExplicit(this$static, obj){
var rhi;
if (instanceOf(obj, 119)) {
rhi = castTo(obj, 119);
return equals_Ljava_lang_Object__Z__devirtual$(this$static.key, rhi.key);
}
else {
return false;
}
}
function $pin(this$static){
$pinHandle(this$static.this$01, this$static);
}
function $unpin(this$static){
$unpinHandle(this$static.this$01, this$static);
}
function AbstractRemoteDataSource$RowHandleImpl(this$0, row, key){
this.this$01 = this$0;
this.row_0 = row;
this.key = key;
}
defineClass(119, 107, {119:1, 107:1}, AbstractRemoteDataSource$RowHandleImpl);
var Lcom_vaadin_client_data_AbstractRemoteDataSource$RowHandleImpl_2_classLit = createForClass('com.vaadin.client.data', 'AbstractRemoteDataSource/RowHandleImpl', 119);
function $getMaxCacheRange_0(this$static, displayedRange, estimatedAvailableRange){
var cacheSize;
cacheSize = $getMaximumCacheSize(this$static, displayedRange.end - displayedRange.start_0);
return $restrictTo(new Range_0(displayedRange.start_0 - cacheSize, displayedRange.end + cacheSize), estimatedAvailableRange);
}
function $getMinCacheRange(this$static, displayedRange, estimatedAvailableRange){
var cacheSize;
cacheSize = $getMinimumCacheSize(this$static, displayedRange.end - displayedRange.start_0);
return $restrictTo(new Range_0(displayedRange.start_0 - cacheSize, displayedRange.end + cacheSize), estimatedAvailableRange);
}
defineClass(711, 1, {});
var Lcom_vaadin_client_data_CacheStrategy$AbstractBasicSymmetricalCacheStrategy_2_classLit = createForClass('com.vaadin.client.data', 'CacheStrategy/AbstractBasicSymmetricalCacheStrategy', 711);
function $getMaximumCacheSize(this$static, pageSize){
return pageSize * this$static.maximumRatio;
}
function $getMinimumCacheSize(this$static, pageSize){
return pageSize * this$static.minimumRatio;
}
function CacheStrategy$DefaultCacheStrategy(){
this.minimumRatio = 3;
this.maximumRatio = 4;
}
defineClass(230, 711, {}, CacheStrategy$DefaultCacheStrategy);
_.maximumRatio = 0;
_.minimumRatio = 0;
var Lcom_vaadin_client_data_CacheStrategy$DefaultCacheStrategy_2_classLit = createForClass('com.vaadin.client.data', 'CacheStrategy/DefaultCacheStrategy', 230);
function $setContentVisible(cell, hasData){
var cellElement, e, n, node;
cellElement = cell.cell.element;
for (n = 0; n < cellElement.childNodes.length; n++) {
node = cellElement.childNodes[n];
if (!!node && node.nodeType == 1) {
e = node;
hasData?(e.style['visibility'] = '' , undefined):(e.style['visibility'] = ($clinit_Style$Visibility() , 'hidden') , undefined);
}
}
}
defineClass(48, 1, {48:1});
_.getConsumedEvents = function(){
return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST;
}
;
_.onBrowserEvent_0 = function(cell, event_0){
return false;
}
;
var Lcom_vaadin_client_renderers_ComplexRenderer_2_classLit = createForClass('com.vaadin.client.renderers', 'ComplexRenderer', 48);
function $getWidget(e){
var w, w0;
w0 = (w = findWidget($getFirstChildElement_0(($clinit_DOMImpl() , e)), null) , w);
return w0;
}
defineClass(80, 48, {48:1, 80:1});
_.init_2 = function(cell){
}
;
_.render = function(cell, data_0){
var w;
w = $getWidget(cell.cell.element);
this.render_0(cell, data_0, w);
}
;
var Lcom_vaadin_client_renderers_WidgetRenderer_2_classLit = createForClass('com.vaadin.client.renderers', 'WidgetRenderer', 80);
defineClass(707, 80, $intern_41);
_.onClick = function(event_0){
}
;
var Lcom_vaadin_client_renderers_ClickableRenderer_2_classLit = createForClass('com.vaadin.client.renderers', 'ClickableRenderer', 707);
function setFocus(focusable){
($clinit_DOM() , focusable.element).focus();
}
function $cancelDrag(this$static, event_0){
$onDragCancel(this$static.callback);
$onDragEnd(this$static.callback);
$stopDrag(this$static);
event_0.isCanceled = true;
$preventDefault(event_0.nativeEvent);
}
function $onDragStartOnDraggableElement(this$static, dragStartingEvent, callback){
this$static.dragStartNativePreviewHandlerRegistration = addNativePreviewHandler(new DragAndDropHandler$2(this$static, dragStartingEvent, callback));
}
function $removeNativePreviewHandlerRegistration(this$static){
if (this$static.dragStartNativePreviewHandlerRegistration) {
$removeHandler(this$static.dragStartNativePreviewHandlerRegistration.real);
this$static.dragStartNativePreviewHandlerRegistration = null;
}
}
function $startDrag(this$static, startEvent, triggerEvent, callback){
if ($onDragStart(callback, startEvent)) {
this$static.dragging = true;
setCapture(($clinit_RootPanel() , $doc.body));
this$static.callback = callback;
this$static.dragHandlerRegistration = addNativePreviewHandler(this$static.dragHandler);
$onDragUpdate(callback, triggerEvent);
}
}
function $stopDrag(this$static){
this$static.dragging = false;
if (this$static.dragHandlerRegistration) {
$removeHandler(this$static.dragHandlerRegistration.real);
this$static.dragHandlerRegistration = null;
}
releaseCapture(($clinit_RootPanel() , $doc.body));
if (this$static.callback) {
$onDragEnd(this$static.callback);
this$static.callback = null;
}
}
function DragAndDropHandler(){
this.dragHandler = new DragAndDropHandler$1(this);
}
defineClass(344, 1, {}, DragAndDropHandler);
_.dragging = false;
var Lcom_vaadin_client_ui_dd_DragAndDropHandler_2_classLit = createForClass('com.vaadin.client.ui.dd', 'DragAndDropHandler', 344);
function DragAndDropHandler$1(this$0){
this.this$01 = this$0;
}
defineClass(345, 1, $intern_42, DragAndDropHandler$1);
_.onPreviewNativeEvent = function(event_0){
var keyCode, typeInt;
if (this.this$01.dragging) {
typeInt = $getTypeInt(event_0.nativeEvent);
switch (typeInt) {
case 128:
keyCode = $getKeyCode(event_0.nativeEvent);
keyCode == 27 && $cancelDrag(this.this$01, event_0);
break;
case 64:
case $intern_27:
$onDragUpdate(this.this$01.callback, event_0);
$preventDefault(event_0.nativeEvent);
break;
case $intern_28:
$cancelDrag(this.this$01, event_0);
break;
case $intern_15:
$preventDefault(event_0.nativeEvent);
case 8:
$onDragUpdate(this.this$01.callback, event_0);
$onDrop(this.this$01.callback);
$stopDrag(this.this$01);
event_0.isCanceled = true;
}
}
else {
$stopDrag(this.this$01);
}
}
;
var Lcom_vaadin_client_ui_dd_DragAndDropHandler$1_2_classLit = createForClass('com.vaadin.client.ui.dd', 'DragAndDropHandler/1', 345);
function DragAndDropHandler$2(this$0, val$dragStartingEvent, val$callback){
this.this$01 = this$0;
this.val$dragStartingEvent2 = val$dragStartingEvent;
this.val$callback3 = val$callback;
this.startX = ($clinit_WidgetUtil() , getTouchOrMouseClientX(this.val$dragStartingEvent2));
this.startY = getTouchOrMouseClientY(this.val$dragStartingEvent2);
}
defineClass(346, 1, $intern_42, DragAndDropHandler$2);
_.onPreviewNativeEvent = function(event_0){
var currentX, currentY, typeInt;
typeInt = $getTypeInt(event_0.nativeEvent);
if (typeInt == -1 && indexOf(toLowerCase($getType(event_0.nativeEvent)), 'pointer') != -1) {
return;
}
switch (typeInt) {
case 16:
case 32:
break;
case 128:
case 256:
case 512:
case 4096:
case 2048:
break;
case 64:
case $intern_27:
currentX = ($clinit_WidgetUtil() , getTouchOrMouseClientX(event_0.nativeEvent));
currentY = getTouchOrMouseClientY(event_0.nativeEvent);
if (abs_1(this.startX - currentX) > 3 || abs_1(this.startY - currentY) > 3) {
$removeNativePreviewHandlerRegistration(this.this$01);
$startDrag(this.this$01, this.val$dragStartingEvent2, event_0, this.val$callback3);
}
break;
default:$removeNativePreviewHandlerRegistration(this.this$01);
}
}
;
_.startX = 0;
_.startY = 0;
var Lcom_vaadin_client_ui_dd_DragAndDropHandler$2_2_classLit = createForClass('com.vaadin.client.ui.dd', 'DragAndDropHandler/2', 346);
function Cell(row, column, element){
this.row_0 = row;
this.column_0 = column;
this.element = element;
}
defineClass(180, 1, {}, Cell);
_.column_0 = 0;
_.row_0 = 0;
var Lcom_vaadin_client_widget_escalator_Cell_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'Cell', 180);
function $clinit_EscalatorUpdater(){
$clinit_EscalatorUpdater = emptyMethod;
NULL = new EscalatorUpdater$1;
}
var NULL;
function EscalatorUpdater$1(){
}
defineClass(336, 1, {}, EscalatorUpdater$1);
_.postAttach = function(row, attachedCells){
}
;
_.postDetach = function(row, detachedCells){
}
;
_.preAttach = function(row, cellsToAttach){
}
;
_.preDetach = function(row, cellsToDetach){
}
;
_.update = function(row, cellsToUpdate){
}
;
var Lcom_vaadin_client_widget_escalator_EscalatorUpdater$1_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'EscalatorUpdater/1', 336);
function $adjustCellWidthForSpan(this$static, numberOfCells){
var cellsToTheRight, i_0, selfWidth, widthsOfColumnsToTheRight;
cellsToTheRight = $rawPeekNext(this$static.currentIterator, numberOfCells - 1).size_0;
selfWidth = $getColumnWidth(this$static.row_0, this$static.column_0);
widthsOfColumnsToTheRight = 0;
for (i_0 = 0; i_0 < cellsToTheRight; i_0++) {
widthsOfColumnsToTheRight += $getColumnWidth(this$static.row_0, this$static.column_0 + i_0 + 1);
}
this$static.element.style['width'] = selfWidth + widthsOfColumnsToTheRight + ($clinit_Style$Unit() , 'px');
}
function $hideOrRevealAdjacentCellElements(this$static, numberOfCells, prevColSpan){
var affectedCells, affectedCellsNumber, i_0;
affectedCellsNumber = prevColSpan > numberOfCells?prevColSpan:numberOfCells;
affectedCells = $rawPeekNext(this$static.currentIterator, affectedCellsNumber - 1);
if (prevColSpan < numberOfCells) {
for (i_0 = 0; i_0 < affectedCells.size_0; i_0++) {
(checkCriticalElementIndex(prevColSpan + i_0 - 1, affectedCells.size_0) , castTo(affectedCells.wrapped.get_1(affectedCells.fromIndex + (prevColSpan + i_0 - 1)), 41)).element.style['display'] = ($clinit_Style$Display() , 'none');
}
}
else if (prevColSpan > numberOfCells) {
for (i_0 = 0; i_0 < affectedCells.size_0; i_0++) {
(checkCriticalElementIndex(numberOfCells + i_0 - 1, affectedCells.size_0) , castTo(affectedCells.wrapped.get_1(affectedCells.fromIndex + (numberOfCells + i_0 - 1)), 41)).element.style['display'] = '';
}
}
}
function $setColSpan_0(this$static, numberOfCells){
var prevColSpan;
if (numberOfCells < 1) {
throw new IllegalArgumentException('Number of cells should be more than 0');
}
prevColSpan = $getPropertyInt(this$static.element, 'colSpan');
if (numberOfCells == 1 && prevColSpan == 1) {
return;
}
this$static.element['colSpan'] = numberOfCells;
$adjustCellWidthForSpan(this$static, numberOfCells);
$hideOrRevealAdjacentCellElements(this$static, numberOfCells, prevColSpan);
$setSkipNext(this$static.currentIterator, numberOfCells - 1);
}
function $setup(this$static, iterator){
var e;
this$static.currentIterator = iterator;
if (iterator.cellsAttached) {
e = this$static.row_0.element.cells[this$static.column_0];
e['colSpan'] = 1;
$getColumnWidth(this$static.row_0, this$static.column_0) >= 0 && (e.style['width'] = $getColumnWidth(this$static.row_0, this$static.column_0) + ($clinit_Style$Unit() , 'px') , undefined);
e.style['display'] = '';
this$static.element = e;
}
}
function FlyweightCell(row, column){
this.row_0 = row;
this.column_0 = column;
}
defineClass(41, 1, {41:1}, FlyweightCell);
_.column_0 = 0;
_.currentIterator = null;
_.element = null;
var Lcom_vaadin_client_widget_escalator_FlyweightCell_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'FlyweightCell', 41);
function $addCells(this$static, index_0, numberOfColumns){
var col, i_0;
for (i_0 = 0; i_0 < numberOfColumns; i_0++) {
col = index_0 + i_0;
$add_6(this$static.cells_0, col, new FlyweightCell(this$static, col));
}
$updateRestOfCells(this$static, index_0 + numberOfColumns);
}
function $getCells(this$static){
return new FlyweightRow$1(this$static, 0, this$static.cells_0.array.length);
}
function $getColumnWidth(this$static, column){
return this$static.columnWidths[column];
}
function $removeCells(this$static, index_0, numberOfColumns){
$clear_1(new AbstractList$SubList(this$static.cells_0, index_0, index_0 + numberOfColumns));
$updateRestOfCells(this$static, index_0);
}
function $setup_0(this$static, e, row, columnWidths){
this$static.element = e;
this$static.row_0 = row;
this$static.columnWidths = columnWidths;
}
function $updateRestOfCells(this$static, startPos){
var col;
for (col = startPos; col < this$static.cells_0.array.length; col++) {
$set_7(this$static.cells_0, col, new FlyweightCell(this$static, col));
}
}
function FlyweightRow(){
this.cells_0 = new ArrayList;
}
defineClass(575, 1, {}, FlyweightRow);
_.columnWidths = null;
_.row_0 = 0;
var Lcom_vaadin_client_widget_escalator_FlyweightRow_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'FlyweightRow', 575);
function FlyweightRow$1(this$0, val$offset, val$numberOfCells){
this.this$01 = this$0;
this.val$offset2 = val$offset;
this.val$numberOfCells3 = val$numberOfCells;
}
defineClass(188, 1, {}, FlyweightRow$1);
_.iterator = function(){
return new FlyweightRow$CellIterator(new AbstractList$SubList(this.this$01.cells_0, this.val$offset2, this.val$offset2 + this.val$numberOfCells3), true);
}
;
_.val$numberOfCells3 = 0;
_.val$offset2 = 0;
var Lcom_vaadin_client_widget_escalator_FlyweightRow$1_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'FlyweightRow/1', 188);
function FlyweightRow$2(this$0, val$offset, val$numberOfCells){
this.this$01 = this$0;
this.val$offset2 = val$offset;
this.val$numberOfCells3 = val$numberOfCells;
}
defineClass(238, 1, {}, FlyweightRow$2);
_.iterator = function(){
return new FlyweightRow$CellIterator(new AbstractList$SubList(this.this$01.cells_0, this.val$offset2, this.val$offset2 + this.val$numberOfCells3), false);
}
;
_.val$numberOfCells3 = 0;
_.val$offset2 = 0;
var Lcom_vaadin_client_widget_escalator_FlyweightRow$2_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'FlyweightRow/2', 238);
function $next_1(this$static){
var cell, i_0;
for (i_0 = 0; i_0 < this$static.skipNext; i_0++) {
$remove_9(this$static.cells_0, this$static.cursor);
}
this$static.skipNext = 0;
cell = castTo($get_8(this$static.cells_0, this$static.cursor++), 41);
$setup(cell, this$static);
return cell;
}
function $rawPeekNext(this$static, n){
var cell, cell$iterator, from, nextCells, to;
from = min_1(this$static.cursor, this$static.cells_0.array.length);
to = min_1(this$static.cursor + n, this$static.cells_0.array.length);
nextCells = new AbstractList$SubList(this$static.cells_0, from, to);
for (cell$iterator = new AbstractList$IteratorImpl(nextCells); cell$iterator.i < cell$iterator.this$01_0.size_2();) {
cell = (checkCriticalElement(cell$iterator.i < cell$iterator.this$01_0.size_2()) , castTo(cell$iterator.this$01_0.get_1(cell$iterator.last = cell$iterator.i++), 41));
$setup(cell, this$static);
}
return nextCells;
}
function $setSkipNext(this$static, colspan){
this$static.skipNext = colspan;
}
function FlyweightRow$CellIterator(cells_0, attached){
this.cells_0 = new ArrayList_1(cells_0);
this.cellsAttached = attached;
}
defineClass(127, 1, {}, FlyweightRow$CellIterator);
_.hasNext_0 = function(){
return this.cursor + this.skipNext < this.cells_0.array.length;
}
;
_.next_1 = function(){
return $next_1(this);
}
;
_.remove_0 = function(){
throw new UnsupportedOperationException_0('Cannot remove cells via iterator');
}
;
_.cellsAttached = false;
_.cursor = 0;
_.skipNext = 0;
var Lcom_vaadin_client_widget_escalator_FlyweightRow$CellIterator_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'FlyweightRow/CellIterator', 127);
function PositionFunction$AbsolutePosition(){
}
defineClass(144, 1, {144:1}, PositionFunction$AbsolutePosition);
_.reset_0 = function(e){
e.style['left'] = '';
e.style['top'] = '';
}
;
_.set_0 = function(e, x_0, y_0){
e.style['left'] = x_0 + ($clinit_Style$Unit() , 'px');
e.style['top'] = y_0 + 'px';
}
;
var Lcom_vaadin_client_widget_escalator_PositionFunction$AbsolutePosition_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'PositionFunction/AbsolutePosition', 144);
function PositionFunction$Translate3DPosition(){
}
defineClass(564, 1, {}, PositionFunction$Translate3DPosition);
_.reset_0 = function(e){
e.style['transform'] = '';
}
;
_.set_0 = function(e, x_0, y_0){
e.style['transform'] = 'translate3d(' + x_0 + 'px, ' + y_0 + 'px, 0)';
}
;
var Lcom_vaadin_client_widget_escalator_PositionFunction$Translate3DPosition_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'PositionFunction/Translate3DPosition', 564);
function PositionFunction$TranslatePosition(){
}
defineClass(565, 1, {}, PositionFunction$TranslatePosition);
_.reset_0 = function(e){
e.style['transform'] = '';
}
;
_.set_0 = function(e, x_0, y_0){
e.style['transform'] = 'translate(' + x_0 + 'px,' + y_0 + 'px)';
}
;
var Lcom_vaadin_client_widget_escalator_PositionFunction$TranslatePosition_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'PositionFunction/TranslatePosition', 565);
function PositionFunction$WebkitTranslate3DPosition(){
}
defineClass(566, 1, {}, PositionFunction$WebkitTranslate3DPosition);
_.reset_0 = function(e){
e.style['webkitTransform'] = '';
}
;
_.set_0 = function(e, x_0, y_0){
e.style['webkitTransform'] = 'translate3d(' + x_0 + 'px,' + y_0 + 'px,0)';
}
;
var Lcom_vaadin_client_widget_escalator_PositionFunction$WebkitTranslate3DPosition_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'PositionFunction/WebkitTranslate3DPosition', 566);
function $clinit_RowVisibilityChangeEvent(){
$clinit_RowVisibilityChangeEvent = emptyMethod;
TYPE_9 = new GwtEvent$Type;
}
function $dispatch_2(this$static, handler){
$onRowVisibilityChange(handler, this$static);
}
function RowVisibilityChangeEvent(firstVisibleRow, visibleRowCount){
$clinit_RowVisibilityChangeEvent();
this.firstVisibleRow = firstVisibleRow;
this.visibleRowCount = visibleRowCount;
}
defineClass(233, 700, {}, RowVisibilityChangeEvent);
_.dispatch = function(handler){
$dispatch_2(this, castTo(handler, 746));
}
;
_.getAssociatedType = function(){
return TYPE_9;
}
;
_.firstVisibleRow = 0;
_.visibleRowCount = 0;
var TYPE_9;
var Lcom_vaadin_client_widget_escalator_RowVisibilityChangeEvent_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'RowVisibilityChangeEvent', 233);
function $addScrollHandler(this$static, handler){
return $addHandler((!this$static.handlerManager && (this$static.handlerManager = new HandlerManager(this$static)) , this$static.handlerManager), ($clinit_ScrollEvent() , TYPE_15), handler);
}
function $addVisibilityHandler(this$static, handler){
return $addHandler((!this$static.handlerManager && (this$static.handlerManager = new HandlerManager(this$static)) , this$static.handlerManager), ($clinit_ScrollbarBundle$VisibilityChangeEvent() , TYPE_10), handler);
}
function $fireVisibilityChangeIfNeeded(this$static){
var event_0, oldHandleIsVisible;
oldHandleIsVisible = this$static.scrollHandleIsVisible;
this$static.scrollHandleIsVisible = parseCssDimensionToPixels(this$static.internalGetOffsetSize()) < parseCssDimensionToPixels(this$static.internalGetScrollSize());
if (oldHandleIsVisible != this$static.scrollHandleIsVisible) {
event_0 = new ScrollbarBundle$VisibilityChangeEvent;
$fireEvent((!this$static.handlerManager && (this$static.handlerManager = new HandlerManager(this$static)) , this$static.handlerManager), event_0);
}
}
function $forceScrollbar(this$static, enable){
enable?(this$static.root.style['display'] = '' , undefined):(this$static.root.style['display'] = ($clinit_Style$Display() , 'none') , undefined);
this$static.internalForceScrollbar(enable);
}
function $getHandlerManager(this$static){
!this$static.handlerManager && (this$static.handlerManager = new HandlerManager(this$static));
return this$static.handlerManager;
}
function $getScrollbarThickness(this$static){
return this$static.isInvisibleScrollbar?0:parseCssDimensionToPixels(this$static.internalGetScrollbarThickness());
}
function $isWorkPending(this$static){
return !!this$static.scrollSizeTemporaryScrollHandler || !!this$static.offsetSizeTemporaryScrollHandler;
}
function $onLoad(this$static){
this$static.internalSetScrollPos(this$static.scrollPos | 0);
}
function $recalculateMaxScrollPos(this$static){
var offsetSize, scrollSize;
scrollSize = parseCssDimensionToPixels(this$static.internalGetScrollSize());
offsetSize = parseCssDimensionToPixels(this$static.internalGetOffsetSize());
this$static.maxScrollPos = 0 > scrollSize - offsetSize?0:scrollSize - offsetSize;
$setScrollPos(this$static, this$static.scrollPos);
}
function $setLocked(this$static, isLocked){
this$static.isLocked = isLocked;
}
function $setOffsetSize(this$static, px){
var newOffsetSizeIsGreaterThanScrollSize, offsetSizeBecomesGreaterThanScrollSize;
newOffsetSizeIsGreaterThanScrollSize = px > parseCssDimensionToPixels(this$static.internalGetScrollSize());
offsetSizeBecomesGreaterThanScrollSize = parseCssDimensionToPixels(this$static.internalGetOffsetSize()) < parseCssDimensionToPixels(this$static.internalGetScrollSize()) && newOffsetSizeIsGreaterThanScrollSize;
if (offsetSizeBecomesGreaterThanScrollSize && this$static.scrollPos != 0) {
this$static.offsetSizeTemporaryScrollHandler = $addScrollHandler(this$static, new ScrollbarBundle$1(this$static, px));
$setScrollPos(this$static, 0);
}
else {
$setOffsetSizeNow(this$static, px);
}
}
function $setOffsetSizeNow(this$static, px){
this$static.internalSetOffsetSize(max_1(0, px > 0?Math.floor(px):Math.ceil(px)));
$recalculateMaxScrollPos(this$static);
$forceScrollbar(this$static, parseCssDimensionToPixels(this$static.internalGetOffsetSize()) < parseCssDimensionToPixels(this$static.internalGetScrollSize()));
$fireVisibilityChangeIfNeeded(this$static);
if (this$static.offsetSizeTemporaryScrollHandler) {
$removeHandler(this$static.offsetSizeTemporaryScrollHandler.real);
this$static.offsetSizeTemporaryScrollHandler = null;
}
}
function $setScrollPos(this$static, px){
var oldScrollPos;
if (this$static.isLocked) {
return;
}
oldScrollPos = this$static.scrollPos;
this$static.scrollPos = max_1(0, min_0(this$static.maxScrollPos, px > 0?Math.floor(px):Math.ceil(px)));
if (!pixelValuesEqual(oldScrollPos, this$static.scrollPos)) {
this$static.isInvisibleScrollbar && $show(this$static.invisibleScrollbarTemporaryResizer);
this$static.internalSetScrollPos(this$static.scrollPos | 0);
}
}
function $setScrollPosByDelta(this$static, delta){
delta != 0 && $setScrollPos(this$static, this$static.scrollPos + delta);
}
function $setScrollSize(this$static, px){
var newScrollSizeIsSmallerThanOffsetSize, scrollSizeBecomesSmallerThanOffsetSize;
newScrollSizeIsSmallerThanOffsetSize = px <= parseCssDimensionToPixels(this$static.internalGetOffsetSize());
scrollSizeBecomesSmallerThanOffsetSize = parseCssDimensionToPixels(this$static.internalGetOffsetSize()) < parseCssDimensionToPixels(this$static.internalGetScrollSize()) && newScrollSizeIsSmallerThanOffsetSize;
if (scrollSizeBecomesSmallerThanOffsetSize && this$static.scrollPos != 0) {
this$static.scrollSizeTemporaryScrollHandler = $addScrollHandler(this$static, new ScrollbarBundle$2(this$static, px));
$setScrollPos(this$static, 0);
}
else {
$setScrollSizeNow(this$static, px);
}
}
function $setScrollSizeNow(this$static, px){
this$static.internalSetScrollSize(0 > px?0:px);
$recalculateMaxScrollPos(this$static);
$forceScrollbar(this$static, parseCssDimensionToPixels(this$static.internalGetOffsetSize()) < parseCssDimensionToPixels(this$static.internalGetScrollSize()));
$fireVisibilityChangeIfNeeded(this$static);
if (this$static.scrollSizeTemporaryScrollHandler) {
$removeHandler(this$static.scrollSizeTemporaryScrollHandler.real);
this$static.scrollSizeTemporaryScrollHandler = null;
}
}
function $setScrollbarThickness(this$static, px){
this$static.isInvisibleScrollbar = px == 0;
if (this$static.isInvisibleScrollbar) {
sinkEvents_0(this$static.root, 16384);
$clinit_DOM();
setEventListener(this$static.root, new ScrollbarBundle$3(this$static));
this$static.root.style['visibility'] = ($clinit_Style$Visibility() , 'hidden');
}
else {
sinkEvents_0(this$static.root, 0);
$clinit_DOM();
this$static.root.__listener = null;
this$static.root.style['visibility'] = '';
}
this$static.internalSetScrollbarThickness(1 > px?1:px);
}
function $showsScrollHandle(this$static){
return parseCssDimensionToPixels(this$static.internalGetOffsetSize()) < parseCssDimensionToPixels(this$static.internalGetScrollSize());
}
function $updateScrollPosFromDom(this$static){
var newScrollPos;
newScrollPos = this$static.internalGetScrollPos();
if (this$static.isLocked) {
this$static.scrollPos != newScrollPos && this$static.internalSetScrollPos(this$static.scrollPos | 0);
}
else {
this$static.scrollPos = newScrollPos;
$scheduleEvent(this$static.scrollEventFirer);
}
}
function ScrollbarBundle(){
this.root = ($clinit_DOM() , $createDivElement($doc));
this.scrollSizeElement = $createDivElement($doc);
this.invisibleScrollbarTemporaryResizer = new ScrollbarBundle$TemporaryResizer(this);
this.scrollEventFirer = new ScrollbarBundle$ScrollEventFirer(this);
$appendChild(this.root, this.scrollSizeElement);
this.root.style['display'] = ($clinit_Style$Display() , 'none');
this.root.tabIndex = -1;
}
function parseCssDimensionToPixels(size_0){
return ($clinit_String() , size_0.length) == 0?0:__parseAndValidateDouble($substring_0(size_0, 0, size_0.length - 2));
}
defineClass(220, 1, {});
_.getElement = function(){
return this.root;
}
;
_.updateScrollPosFromDom = function(){
$updateScrollPosFromDom(this);
}
;
_.isInvisibleScrollbar = false;
_.isLocked = false;
_.maxScrollPos = 0;
_.scrollHandleIsVisible = false;
_.scrollPos = 0;
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'ScrollbarBundle', 220);
function ScrollbarBundle$1(this$0, val$px){
this.this$01 = this$0;
this.val$px2 = val$px;
}
defineClass(490, 1, $intern_43, ScrollbarBundle$1);
_.onScroll = function(event_0){
$setOffsetSizeNow(this.this$01, this.val$px2);
}
;
_.val$px2 = 0;
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle$1_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'ScrollbarBundle/1', 490);
function ScrollbarBundle$2(this$0, val$px){
this.this$01 = this$0;
this.val$px2 = val$px;
}
defineClass(491, 1, $intern_43, ScrollbarBundle$2);
_.onScroll = function(event_0){
$setScrollSizeNow(this.this$01, this.val$px2);
}
;
_.val$px2 = 0;
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle$2_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'ScrollbarBundle/2', 491);
function ScrollbarBundle$3(this$0){
this.this$01 = this$0;
}
defineClass(492, 1, {28:1}, ScrollbarBundle$3);
_.onBrowserEvent = function(event_0){
$show(this.this$01.invisibleScrollbarTemporaryResizer);
}
;
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle$3_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'ScrollbarBundle/3', 492);
function $clinit_ScrollbarBundle$Direction(){
$clinit_ScrollbarBundle$Direction = emptyMethod;
VERTICAL = new ScrollbarBundle$Direction('VERTICAL', 0);
HORIZONTAL = new ScrollbarBundle$Direction('HORIZONTAL', 1);
}
function ScrollbarBundle$Direction(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_7(){
$clinit_ScrollbarBundle$Direction();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_client_widget_escalator_ScrollbarBundle$Direction_2_classLit, 1), $intern_0, 141, 0, [VERTICAL, HORIZONTAL]);
}
defineClass(141, 5, {141:1, 3:1, 6:1, 5:1}, ScrollbarBundle$Direction);
var HORIZONTAL, VERTICAL;
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle$Direction_2_classLit = createForEnum('com.vaadin.client.widget.escalator', 'ScrollbarBundle/Direction', 141, values_7);
function $setStylePrimaryName_0(this$static, primaryStyleName){
$setClassName(this$static.root, primaryStyleName + '-scroller');
$addClassName(this$static.root, primaryStyleName + '-scroller-horizontal');
}
function ScrollbarBundle$HorizontalScrollbarBundle(){
ScrollbarBundle.call(this);
}
defineClass(486, 220, {}, ScrollbarBundle$HorizontalScrollbarBundle);
_.internalForceScrollbar = function(enable){
enable?(this.root.style['overflowX'] = ($clinit_Style$Overflow() , 'scroll') , undefined):(this.root.style['overflowX'] = '' , undefined);
}
;
_.internalGetOffsetSize = function(){
return $getWidth(this.root.style);
}
;
_.internalGetScrollPos = function(){
return $getScrollLeft(this.root);
}
;
_.internalGetScrollSize = function(){
return $getWidth(this.scrollSizeElement.style);
}
;
_.internalGetScrollbarThickness = function(){
return $getHeight(this.scrollSizeElement.style);
}
;
_.internalSetOffsetSize = function(px){
this.root.style['width'] = px + ($clinit_Style$Unit() , 'px');
}
;
_.internalSetScrollPos = function(px){
$setScrollLeft(this.root, px);
}
;
_.internalSetScrollSize = function(px){
this.scrollSizeElement.style['width'] = px + ($clinit_Style$Unit() , 'px');
}
;
_.internalSetScrollbarThickness = function(px){
this.root.style['paddingBottom'] = px + ($clinit_Style$Unit() , 'px');
this.root.style['height'] = '0.0px';
this.scrollSizeElement.style['height'] = px + 'px';
}
;
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle$HorizontalScrollbarBundle_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'ScrollbarBundle/HorizontalScrollbarBundle', 486);
function $scheduleEvent(this$static){
if (!this$static.isBeingFired) {
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), this$static.fireEventCommand);
this$static.isBeingFired = true;
}
}
function ScrollbarBundle$ScrollEventFirer(this$0){
this.this$01 = this$0;
this.fireEventCommand = new ScrollbarBundle$ScrollEventFirer$1(this);
}
defineClass(482, 1, {}, ScrollbarBundle$ScrollEventFirer);
_.isBeingFired = false;
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle$ScrollEventFirer_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'ScrollbarBundle/ScrollEventFirer', 482);
function ScrollbarBundle$ScrollEventFirer$1(this$1){
this.this$11 = this$1;
}
defineClass(487, 1, {}, ScrollbarBundle$ScrollEventFirer$1);
_.execute_1 = function(){
$updateScrollPosFromDom(this.this$11.this$01);
$fireEvent($getHandlerManager(this.this$11.this$01), new ScrollEvent);
this.this$11.isBeingFired = false;
}
;
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle$ScrollEventFirer$1_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'ScrollbarBundle/ScrollEventFirer/1', 487);
function $show(this$static){
this$static.this$01.internalSetScrollbarThickness(13);
this$static.this$01.root.style['visibility'] = ($clinit_Style$Visibility() , 'visible');
$schedule(this$static.timer, 1000);
}
function ScrollbarBundle$TemporaryResizer(this$0){
this.this$01 = this$0;
this.timer = new ScrollbarBundle$TemporaryResizer$1(this);
}
defineClass(483, 1, {}, ScrollbarBundle$TemporaryResizer);
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle$TemporaryResizer_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'ScrollbarBundle/TemporaryResizer', 483);
function ScrollbarBundle$TemporaryResizer$1(this$1){
this.this$11 = this$1;
Timer.call(this);
}
defineClass(488, 75, {}, ScrollbarBundle$TemporaryResizer$1);
_.run_0 = function(){
this.this$11.this$01.internalSetScrollbarThickness(1);
this.this$11.this$01.root.style['visibility'] = ($clinit_Style$Visibility() , 'hidden');
}
;
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle$TemporaryResizer$1_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'ScrollbarBundle/TemporaryResizer/1', 488);
function $setStylePrimaryName_1(this$static, primaryStyleName){
$setClassName(this$static.root, primaryStyleName + '-scroller');
$addClassName(this$static.root, primaryStyleName + '-scroller-vertical');
}
function ScrollbarBundle$VerticalScrollbarBundle(){
ScrollbarBundle.call(this);
}
defineClass(485, 220, {}, ScrollbarBundle$VerticalScrollbarBundle);
_.internalForceScrollbar = function(enable){
enable?(this.root.style['overflowY'] = ($clinit_Style$Overflow() , 'scroll') , undefined):(this.root.style['overflowY'] = '' , undefined);
}
;
_.internalGetOffsetSize = function(){
return $getHeight(this.root.style);
}
;
_.internalGetScrollPos = function(){
return (this.root.scrollTop || 0) | 0;
}
;
_.internalGetScrollSize = function(){
return $getHeight(this.scrollSizeElement.style);
}
;
_.internalGetScrollbarThickness = function(){
return $getWidth(this.scrollSizeElement.style);
}
;
_.internalSetOffsetSize = function(px){
this.root.style['height'] = px + ($clinit_Style$Unit() , 'px');
}
;
_.internalSetScrollPos = function(px){
$setScrollTop(this.root, px);
}
;
_.internalSetScrollSize = function(px){
this.scrollSizeElement.style['height'] = px + ($clinit_Style$Unit() , 'px');
}
;
_.internalSetScrollbarThickness = function(px){
this.root.style['paddingRight'] = px + ($clinit_Style$Unit() , 'px');
this.root.style['width'] = '0.0px';
this.scrollSizeElement.style['width'] = px + 'px';
}
;
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle$VerticalScrollbarBundle_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'ScrollbarBundle/VerticalScrollbarBundle', 485);
function $clinit_ScrollbarBundle$VisibilityChangeEvent(){
$clinit_ScrollbarBundle$VisibilityChangeEvent = emptyMethod;
TYPE_10 = new ScrollbarBundle$VisibilityChangeEvent$1;
}
function ScrollbarBundle$VisibilityChangeEvent(){
$clinit_ScrollbarBundle$VisibilityChangeEvent();
}
defineClass(484, 700, {}, ScrollbarBundle$VisibilityChangeEvent);
_.dispatch = function(handler){
$visibilityChanged(castTo(handler, 752));
}
;
_.getAssociatedType = function(){
return TYPE_10;
}
;
var TYPE_10;
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle$VisibilityChangeEvent_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'ScrollbarBundle/VisibilityChangeEvent', 484);
function ScrollbarBundle$VisibilityChangeEvent$1(){
GwtEvent$Type.call(this);
}
defineClass(489, 45, {}, ScrollbarBundle$VisibilityChangeEvent$1);
_.toString_0 = function(){
return 'VisibilityChangeEvent';
}
;
var Lcom_vaadin_client_widget_escalator_ScrollbarBundle$VisibilityChangeEvent$1_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'ScrollbarBundle/VisibilityChangeEvent/1', 489);
function $clinit_SpacerUpdater(){
$clinit_SpacerUpdater = emptyMethod;
NULL_0 = new SpacerUpdater$1;
}
var NULL_0;
function SpacerUpdater$1(){
}
defineClass(335, 1, {}, SpacerUpdater$1);
_.destroy = function(spacer){
}
;
_.init_3 = function(spacer){
}
;
var Lcom_vaadin_client_widget_escalator_SpacerUpdater$1_2_classLit = createForClass('com.vaadin.client.widget.escalator', 'SpacerUpdater/1', 335);
function $getFrozenColumnsWidth(this$static){
var i_0, value_0;
value_0 = $getMultiSelectColumnWidth(this$static);
for (i_0 = 0; i_0 < this$static.grid_0.frozenColumnCount; i_0++) {
value_0 += $getWidthActual($getColumn(this$static.grid_0, i_0));
}
return value_0;
}
function $getMaxScrollLeft(this$static){
return parseCssDimensionToPixels($getWidth(this$static.grid_0.escalator.horizontalScrollbar.scrollSizeElement.style)) - ((($getParentElement($getTableElement(this$static)).offsetWidth || 0) | 0) - $getFrozenColumnsWidth(this$static));
}
function $getMaxScrollTop(this$static){
var table, table0;
return parseCssDimensionToPixels($getHeight(this$static.grid_0.escalator.verticalScrollbar.scrollSizeElement.style)) - (((table0 = $getTableElement(this$static) , table0?table0.tFoot:null).offsetHeight || 0) | 0) - (((table = $getTableElement(this$static) , table?table.tHead:null).offsetHeight || 0) | 0);
}
function $getMultiSelectColumnWidth(this$static){
var table;
if (this$static.grid_0.frozenColumnCount >= 0 && !!this$static.grid_0.selectionModel.getSelectionColumnRenderer()) {
return ($getFirstChildElement($getFirstChildElement((table = $getTableElement(this$static) , table?table.tHead:null))).offsetWidth || 0) | 0;
}
return 0;
}
function $getTableElement(this$static){
var root, tablewrapper;
root = $getElement(this$static.grid_0);
tablewrapper = root.childNodes[2];
return tablewrapper?$getFirstChildElement_0(($clinit_DOMImpl() , tablewrapper)):null;
}
function $removeNativeHandler(this$static){
if (this$static.nativePreviewHandlerRegistration) {
$removeHandler(this$static.nativePreviewHandlerRegistration.real);
this$static.nativePreviewHandlerRegistration = null;
}
}
function $start(this$static, startEvent, scrollAxis, callback){
this$static.scrollDirection = scrollAxis;
this$static.callback = callback;
$removeNativeHandler(this$static);
this$static.nativePreviewHandlerRegistration = addNativePreviewHandler(new AutoScroller$TouchEventHandler(this$static));
$updateScrollBounds(this$static);
this$static.handlerRegistration = addNativePreviewHandler(this$static.scrollPreviewHandler);
this$static.autoScroller = new AutoScroller$AutoScrollingFrame(this$static, round_int(ceil_0(this$static.startingBound)), this$static.endingBound, this$static.gradientArea);
$start_0(this$static.autoScroller);
($clinit_DOMImpl() , impl_0).eventPreventDefault(startEvent);
startEvent.stopPropagation();
}
function $stop(this$static){
if (this$static.handlerRegistration) {
$removeHandler(this$static.handlerRegistration.real);
this$static.handlerRegistration = null;
}
if (this$static.autoScroller) {
$stop_0(this$static.autoScroller);
this$static.autoScroller = null;
}
$removeNativeHandler(this$static);
}
function $updateScrollBounds(this$static){
var adjustment, endBorder, startBorder, table, table0;
startBorder = this$static.scrollDirection == ($clinit_AutoScroller$ScrollAxis() , VERTICAL_0)?$getAbsoluteBottom((table0 = $getTableElement(this$static) , table0?table0.tHead:null)) + 1:$getAbsoluteLeft($getTableElement(this$static));
endBorder = this$static.scrollDirection == VERTICAL_0?$getAbsoluteTop((table = $getTableElement(this$static) , table?table.tFoot:null)) - 1:$getAbsoluteRight($getTableElement(this$static));
startBorder += $getFrozenColumnsWidth(this$static);
this$static.startingBound = startBorder + this$static.scrollAreaPX;
this$static.endingBound = endBorder - this$static.scrollAreaPX;
this$static.gradientArea = this$static.scrollAreaPX;
if (this$static.endingBound - this$static.startingBound < 50) {
adjustment = 50 - (this$static.endingBound - this$static.startingBound);
this$static.startingBound -= adjustment / 2;
this$static.endingBound = round_int(this$static.endingBound + adjustment / 2);
this$static.gradientArea = round_int(this$static.gradientArea - adjustment / 2);
}
}
function AutoScroller(grid){
this.scrollPreviewHandler = new AutoScroller$1(this);
this.grid_0 = grid;
}
defineClass(347, 1, {}, AutoScroller);
_.endingBound = -1;
_.gradientArea = 0;
_.scrollAreaPX = 100;
_.startingBound = -1;
var Lcom_vaadin_client_widget_grid_AutoScroller_2_classLit = createForClass('com.vaadin.client.widget.grid', 'AutoScroller', 347);
function AutoScroller$1(this$0){
this.this$01 = this$0;
}
defineClass(350, 1, $intern_42, AutoScroller$1);
_.onPreviewNativeEvent = function(event_0){
var nativeEvent, pageX, pageY;
if (!this.this$01.autoScroller) {
$stop(this.this$01);
return;
}
nativeEvent = event_0.nativeEvent;
switch ($getTypeInt(event_0.nativeEvent)) {
case 64:
case $intern_27:
pageY = ($clinit_WidgetUtil() , getTouchOrMouseClientY(nativeEvent));
pageX = getTouchOrMouseClientX(nativeEvent);
$updatePointerCoords(this.this$01.autoScroller, pageX, pageY);
break;
case 8:
case $intern_15:
case $intern_28:
$stop(this.this$01);
}
}
;
var Lcom_vaadin_client_widget_grid_AutoScroller$1_2_classLit = createForClass('com.vaadin.client.widget.grid', 'AutoScroller/1', 350);
function $doScrollAreaChecks(this$static, pageCordinate){
var endDidNotMove, oldBottomBound, oldTopBound, startDidNotMove, wasMovement;
if (this$static.startBound == -1) {
this$static.startBound = min_1(this$static.finalStartBound, pageCordinate);
this$static.endBound = max_2(this$static.finalEndBound, pageCordinate);
}
else {
oldTopBound = this$static.startBound;
this$static.startBound < this$static.finalStartBound && (this$static.startBound = max_2(this$static.startBound, min_1(this$static.finalStartBound, pageCordinate)));
oldBottomBound = this$static.endBound;
this$static.endBound > this$static.finalEndBound && (this$static.endBound = min_1(this$static.endBound, max_2(this$static.finalEndBound, pageCordinate)));
startDidNotMove = oldTopBound == this$static.startBound;
endDidNotMove = oldBottomBound == this$static.endBound;
wasMovement = pageCordinate != this$static.scrollingAxisPageCoordinate;
this$static.scrollAreaShouldRebound = startDidNotMove && endDidNotMove && wasMovement;
}
}
function $reboundScrollArea(this$static, timeDiff){
var reboundPx;
if (!this$static.scrollAreaShouldRebound) {
return;
}
reboundPx = round_int(Math.ceil(0.001 * timeDiff));
if (this$static.startBound < this$static.finalStartBound) {
this$static.startBound += reboundPx;
this$static.startBound = min_1(this$static.startBound, this$static.finalStartBound);
$updateScrollSpeed(this$static, this$static.scrollingAxisPageCoordinate);
}
else if (this$static.endBound > this$static.finalEndBound) {
this$static.endBound -= reboundPx;
this$static.endBound = max_2(this$static.endBound, this$static.finalEndBound);
$updateScrollSpeed(this$static, this$static.scrollingAxisPageCoordinate);
}
}
function $start_0(this$static){
this$static.running = true;
this$static.running && this$static.gradientArea >= 10 && (this$static.handle = (!instance && (instance = $isNativelySupported()?new AnimationSchedulerImplStandard:new AnimationSchedulerImplTimer) , instance).requestAnimationFrame_0(this$static, $getElement(this$static.this$01.grid_0)));
}
function $stop_0(this$static){
this$static.running = false;
if (this$static.handle) {
this$static.handle.cancel_0();
this$static.handle = null;
}
}
function $updatePointerCoords(this$static, pageX, pageY){
var pageCordinate;
this$static.this$01.scrollDirection == ($clinit_AutoScroller$ScrollAxis() , VERTICAL_0)?(pageCordinate = pageY):(pageCordinate = pageX);
$doScrollAreaChecks(this$static, pageCordinate);
$updateScrollSpeed(this$static, pageCordinate);
this$static.scrollingAxisPageCoordinate = pageCordinate;
}
function $updateScrollSpeed(this$static, pointerPageCordinate){
var distance, ratio;
if (pointerPageCordinate < this$static.startBound) {
distance = pointerPageCordinate - this$static.startBound;
ratio = max_1(-1, distance / this$static.gradientArea);
}
else if (pointerPageCordinate > this$static.endBound) {
distance = pointerPageCordinate - this$static.endBound;
ratio = min_0(1, distance / this$static.gradientArea);
}
else {
ratio = 0;
}
this$static.scrollSpeed = ratio * 500;
}
function AutoScroller$AutoScrollingFrame(this$0, startBound, endBound, gradientArea){
this.this$01 = this$0;
this.finalStartBound = startBound;
this.finalEndBound = endBound;
this.gradientArea = gradientArea;
}
defineClass(349, 1, {}, AutoScroller$AutoScrollingFrame);
_.execute = function(timestamp){
var intPixelsToScroll, maxScrollPos, newScrollPos, scrollPos, timeDiff;
timeDiff = timestamp - this.prevTimestamp;
this.prevTimestamp = timestamp;
$reboundScrollArea(this, timeDiff);
this.pixelsToScroll += this.scrollSpeed * (timeDiff / 1000);
intPixelsToScroll = round_int(this.pixelsToScroll);
this.pixelsToScroll -= intPixelsToScroll;
if (intPixelsToScroll != 0) {
if (this.this$01.scrollDirection == ($clinit_AutoScroller$ScrollAxis() , VERTICAL_0)) {
scrollPos = this.this$01.grid_0.escalator.verticalScrollbar.scrollPos;
maxScrollPos = $getMaxScrollTop(this.this$01);
}
else {
scrollPos = this.this$01.grid_0.escalator.horizontalScrollbar.scrollPos;
maxScrollPos = $getMaxScrollLeft(this.this$01);
}
if (intPixelsToScroll > 0 && scrollPos < maxScrollPos || intPixelsToScroll < 0 && scrollPos > 0) {
newScrollPos = scrollPos + intPixelsToScroll;
this.this$01.scrollDirection == VERTICAL_0?$setScrollTop_1(this.this$01.grid_0, newScrollPos):$setScrollLeft_1(this.this$01.grid_0, newScrollPos);
$onAutoScroll(this.this$01.callback, intPixelsToScroll);
newScrollPos <= 0?$onAutoScrollReachedMin(this.this$01.callback):newScrollPos >= maxScrollPos && $onAutoScrollReachedMax(this.this$01.callback);
}
}
this.running && this.gradientArea >= 10 && (this.handle = (!instance && (instance = $isNativelySupported()?new AnimationSchedulerImplStandard:new AnimationSchedulerImplTimer) , instance).requestAnimationFrame_0(this, $getElement(this.this$01.grid_0)));
}
;
_.endBound = -1;
_.finalEndBound = 0;
_.finalStartBound = 0;
_.gradientArea = 0;
_.pixelsToScroll = 0;
_.prevTimestamp = 0;
_.running = false;
_.scrollAreaShouldRebound = false;
_.scrollSpeed = 0;
_.scrollingAxisPageCoordinate = 0;
_.startBound = -1;
var Lcom_vaadin_client_widget_grid_AutoScroller$AutoScrollingFrame_2_classLit = createForClass('com.vaadin.client.widget.grid', 'AutoScroller/AutoScrollingFrame', 349);
function $clinit_AutoScroller$ScrollAxis(){
$clinit_AutoScroller$ScrollAxis = emptyMethod;
VERTICAL_0 = new AutoScroller$ScrollAxis('VERTICAL', 0);
HORIZONTAL_0 = new AutoScroller$ScrollAxis('HORIZONTAL', 1);
}
function AutoScroller$ScrollAxis(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_8(){
$clinit_AutoScroller$ScrollAxis();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_client_widget_grid_AutoScroller$ScrollAxis_2_classLit, 1), $intern_0, 132, 0, [VERTICAL_0, HORIZONTAL_0]);
}
defineClass(132, 5, {132:1, 3:1, 6:1, 5:1}, AutoScroller$ScrollAxis);
var HORIZONTAL_0, VERTICAL_0;
var Lcom_vaadin_client_widget_grid_AutoScroller$ScrollAxis_2_classLit = createForEnum('com.vaadin.client.widget.grid', 'AutoScroller/ScrollAxis', 132, values_8);
function AutoScroller$TouchEventHandler(this$0){
this.this$01 = this$0;
}
defineClass(348, 1, $intern_42, AutoScroller$TouchEventHandler);
_.onPreviewNativeEvent = function(event_0){
switch ($getTypeInt(event_0.nativeEvent)) {
case $intern_26:
{
$getTouches(event_0.nativeEvent).length == 1 && $stop(this.this$01);
break;
}
case $intern_27:
event_0.isCanceled = true;
break;
case $intern_15:
case $intern_28:
$stop(this.this$01);
}
}
;
var Lcom_vaadin_client_widget_grid_AutoScroller$TouchEventHandler_2_classLit = createForClass('com.vaadin.client.widget.grid', 'AutoScroller/TouchEventHandler', 348);
function $set_2(this$static, columnIndexDOM, columnIndex, column){
this$static.columnIndexDOM = columnIndexDOM;
this$static.columnIndex = columnIndex;
this$static.column_0 = column;
}
function CellReference(rowReference){
this.rowReference = rowReference;
}
defineClass(133, 1, {}, CellReference);
_.getElement_0 = function(){
return this.rowReference.element.cells[this.columnIndexDOM];
}
;
_.columnIndex = 0;
_.columnIndexDOM = 0;
var Lcom_vaadin_client_widget_grid_CellReference_2_classLit = createForClass('com.vaadin.client.widget.grid', 'CellReference', 133);
function $clinit_DataAvailableEvent(){
$clinit_DataAvailableEvent = emptyMethod;
TYPE_11 = new GwtEvent$Type;
}
function DataAvailableEvent(rowsAvailable){
$clinit_DataAvailableEvent();
this.rowsAvailable = rowsAvailable;
}
defineClass(179, 700, {}, DataAvailableEvent);
_.dispatch = function(handler){
castTo(handler, 248).onDataAvailable(this);
}
;
_.getAssociatedType = function(){
return TYPE_11;
}
;
var TYPE_11;
var Lcom_vaadin_client_widget_grid_DataAvailableEvent_2_classLit = createForClass('com.vaadin.client.widget.grid', 'DataAvailableEvent', 179);
function $editRow(event_0, rowIndex, colIndex){
var colCount, editorWidget, rowCount;
rowCount = event_0.cell.rowReference.grid_0.dataSource.size_0;
rowIndex = 0 > (rowCount - 1 < rowIndex?rowCount - 1:rowIndex)?0:rowCount - 1 < rowIndex?rowCount - 1:rowIndex;
colCount = $getVisibleColumns(event_0.cell.rowReference.grid_0).coll.size_2();
colIndex = 0 > (colCount - 1 < colIndex?colCount - 1:colIndex)?0:colCount - 1 < colIndex?colCount - 1:colIndex;
editorWidget = event_0.editorWidget;
!!editorWidget && $isOrHasChild(($clinit_DOM() , editorWidget.element), getFocusedElement()) && (getFocusedElement().blur() , undefined);
$editRow_2(event_0.cell.rowReference.grid_0.editor, rowIndex, colIndex);
}
function $handleCloseEvent(event_0){
var e;
e = event_0.event_0;
$clinit_DOM();
if ($eventGetTypeInt(($clinit_DOMImpl() , e).type) == 128 && (e.keyCode | 0) == 27) {
$cancel_1(event_0.cell.rowReference.grid_0.editor);
setFocus(event_0.cell.rowReference.grid_0);
return true;
}
return false;
}
function $handleEvent(this$static, event_0){
var editor, isBody;
editor = event_0.cell.rowReference.grid_0.editor;
isBody = event_0.cell.section == ($clinit_Grid$Section() , BODY);
return event_0.cell.rowReference.grid_0.editor.state_0 != ($clinit_Grid$Editor$State() , INACTIVE)?!editor.buffered && isBody && $handleMoveEvent(event_0) || $handleCloseEvent(event_0) || editor.buffered:event_0.cell.rowReference.grid_0.enabled && isBody && $handleOpenEvent(this$static, event_0);
}
function $handleMoveEvent(event_0){
var cell, e;
e = event_0.event_0;
cell = event_0.cell;
$clinit_DOM();
if ($eventGetTypeInt(($clinit_DOMImpl() , e).type) == 1) {
$editRow(event_0, cell.rowReference.rowIndex_0, cell.columnIndexDOM);
$fireEvent_0(event_0.cell.rowReference.grid_0, new EditorMoveEvent);
return true;
}
else {
if ($eventGetTypeInt(e.type) == 128 && (e.keyCode | 0) == 13) {
$editRow(event_0, event_0.cell.rowReference.grid_0.editor.rowIndex_0 + (e.shiftKey?-1:1), event_0.cell.rowReference.grid_0.editor.focusedColumnIndex);
$fireEvent_0(event_0.cell.rowReference.grid_0, new EditorMoveEvent);
return true;
}
}
return false;
}
function $handleOpenEvent(this$static, event_0){
var cell, e;
e = event_0.event_0;
$clinit_DOM();
if ($eventGetTypeInt(($clinit_DOMImpl() , e).type) == 2 || $eventGetTypeInt(e.type) == 128 && (e.keyCode | 0) == 13 || $isTouchOpenEvent(this$static, event_0)) {
cell = event_0.cell;
$editRow(event_0, cell.rowReference.rowIndex_0, cell.columnIndexDOM);
$fireEvent_0(event_0.cell.rowReference.grid_0, new EditorOpenEvent);
$preventDefault(event_0.event_0);
return true;
}
return false;
}
function $isTouchOpenEvent(this$static, event_0){
var currentX, currentY, e, now_0, type_0, validTouchOpenEvent;
e = event_0.event_0;
type_0 = ($clinit_DOM() , $eventGetTypeInt(($clinit_DOMImpl() , e).type));
now_0 = now_1();
currentX = ($clinit_WidgetUtil() , $clinit_WidgetUtil() , indexOf(e.type, 'touch') != -1?$getClientX(e.changedTouches[0]):toInt32(e.clientX || 0));
currentY = (null , indexOf(e.type, 'touch') != -1?$getClientY(e.changedTouches[0]):toInt32(e.clientY || 0));
validTouchOpenEvent = type_0 == $intern_15 && now_0 - this$static.lastTouchEventTime < 500 && this$static.lastTouchEventRow == event_0.cell.rowReference.rowIndex_0 && abs_1(this$static.lastTouchEventX - currentX) < 20 && abs_1(this$static.lastTouchEventY - currentY) < 20;
if (type_0 == $intern_26) {
this$static.lastTouchEventX = currentX;
this$static.lastTouchEventY = currentY;
}
if (type_0 == $intern_15) {
this$static.lastTouchEventTime = now_0;
this$static.lastTouchEventRow = event_0.cell.rowReference.rowIndex_0;
}
return validTouchOpenEvent;
}
function DefaultEditorEventHandler(){
}
defineClass(577, 1, {}, DefaultEditorEventHandler);
_.lastTouchEventRow = -1;
_.lastTouchEventTime = 0;
_.lastTouchEventX = -1;
_.lastTouchEventY = -1;
var Lcom_vaadin_client_widget_grid_DefaultEditorEventHandler_2_classLit = createForClass('com.vaadin.client.widget.grid', 'DefaultEditorEventHandler', 577);
function $clinit_DetailsGenerator(){
$clinit_DetailsGenerator = emptyMethod;
NULL_1 = new DetailsGenerator$1;
}
var NULL_1;
function DetailsGenerator$1(){
}
defineClass(275, 1, {}, DetailsGenerator$1);
_.getDetails = function(rowIndex){
return null;
}
;
var Lcom_vaadin_client_widget_grid_DetailsGenerator$1_2_classLit = createForClass('com.vaadin.client.widget.grid', 'DetailsGenerator/1', 275);
var Lcom_vaadin_client_widget_grid_EditorHandler_2_classLit = createForInterface('com.vaadin.client.widget.grid', 'EditorHandler');
function $set_3(this$static, targetCell, section){
var column, columnIndex, columnIndexDOM, grid, row, rowObject;
grid = this$static.rowReference.grid_0;
row = targetCell.row_0;
columnIndexDOM = targetCell.column_0;
column = castTo($get_9($getVisibleColumns(grid), columnIndexDOM), 21);
section == ($clinit_Grid$Section() , BODY)?(rowObject = $getRow(grid.dataSource, row)):(rowObject = null);
$set_5(this$static.rowReference, row, rowObject, null);
columnIndex = $indexOf_3(unmodifiableList(new ArrayList_1(grid.columns)), column);
$set_2(this$static, columnIndexDOM, columnIndex, column);
this$static.element = targetCell.element;
this$static.section = section;
}
function EventCellReference(grid){
CellReference.call(this, new RowReference(grid));
}
defineClass(549, 133, {}, EventCellReference);
_.getElement_0 = function(){
return this.element;
}
;
var Lcom_vaadin_client_widget_grid_EventCellReference_2_classLit = createForClass('com.vaadin.client.widget.grid', 'EventCellReference', 549);
function $set_4(this$static, cell, columnIndex, column){
this$static.cell = cell;
$set_2(this$static, cell.column_0, columnIndex, column);
}
function RendererCellReference(rowReference){
CellReference.call(this, rowReference);
}
defineClass(555, 133, {}, RendererCellReference);
_.getElement_0 = function(){
return this.cell.element;
}
;
var Lcom_vaadin_client_widget_grid_RendererCellReference_2_classLit = createForClass('com.vaadin.client.widget.grid', 'RendererCellReference', 555);
function $set_5(this$static, rowIndex, row, element){
this$static.rowIndex_0 = rowIndex;
this$static.row_0 = row;
this$static.element = element;
}
function RowReference(grid){
this.grid_0 = grid;
}
defineClass(169, 1, {}, RowReference);
_.rowIndex_0 = 0;
var Lcom_vaadin_client_widget_grid_RowReference_2_classLit = createForClass('com.vaadin.client.widget.grid', 'RowReference', 169);
function $clinit_ColumnReorderEvent(){
$clinit_ColumnReorderEvent = emptyMethod;
TYPE_12 = new GwtEvent$Type;
}
function ColumnReorderEvent(){
$clinit_ColumnReorderEvent();
}
defineClass(500, 700, {}, ColumnReorderEvent);
_.dispatch = function(handler){
throwClassCastExceptionUnlessNull(handler);
null.$_nullMethod();
}
;
_.getAssociatedType = function(){
return TYPE_12;
}
;
var TYPE_12;
var Lcom_vaadin_client_widget_grid_events_ColumnReorderEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'ColumnReorderEvent', 500);
function $clinit_ColumnVisibilityChangeEvent(){
$clinit_ColumnVisibilityChangeEvent = emptyMethod;
TYPE_13 = new GwtEvent$Type;
}
function ColumnVisibilityChangeEvent(){
$clinit_ColumnVisibilityChangeEvent();
}
defineClass(655, 700, {}, ColumnVisibilityChangeEvent);
_.dispatch = function(handler){
throwClassCastExceptionUnlessNull(handler);
null.$_nullMethod();
}
;
_.getAssociatedType = function(){
return TYPE_13;
}
;
var TYPE_13;
var Lcom_vaadin_client_widget_grid_events_ColumnVisibilityChangeEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'ColumnVisibilityChangeEvent', 655);
function $clinit_EditorEvent(){
$clinit_EditorEvent = emptyMethod;
TYPE_14 = new GwtEvent$Type;
}
defineClass(725, 700, {});
_.getAssociatedType = function(){
return TYPE_14;
}
;
var TYPE_14;
var Lcom_vaadin_client_widget_grid_events_EditorEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'EditorEvent', 725);
function EditorCloseEvent(){
$clinit_EditorEvent();
}
defineClass(584, 725, {}, EditorCloseEvent);
_.dispatch = function(handler){
throwClassCastExceptionUnlessNull(handler);
null.$_nullMethod();
}
;
var Lcom_vaadin_client_widget_grid_events_EditorCloseEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'EditorCloseEvent', 584);
function EditorMoveEvent(){
$clinit_EditorEvent();
}
defineClass(245, 725, {}, EditorMoveEvent);
_.dispatch = function(handler){
throwClassCastExceptionUnlessNull(handler);
null.$_nullMethod();
}
;
var Lcom_vaadin_client_widget_grid_events_EditorMoveEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'EditorMoveEvent', 245);
function EditorOpenEvent(){
$clinit_EditorEvent();
}
defineClass(678, 725, {}, EditorOpenEvent);
_.dispatch = function(handler){
throwClassCastExceptionUnlessNull(handler);
null.$_nullMethod();
}
;
var Lcom_vaadin_client_widget_grid_events_EditorOpenEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'EditorOpenEvent', 678);
function $dispatch_3(this$static, handler){
var container, section, target, targetElement;
target = $getEventTarget(this$static.nativeEvent);
if (!is_0(target)) {
return;
}
targetElement = target;
if ($isElementInChildWidget(this$static.grid_0, targetElement)) {
return;
}
container = $findRowContainer(this$static.grid_0.escalator, targetElement);
if (!container) {
return;
}
section = ($clinit_Grid$Section() , FOOTER);
container == this$static.grid_0.escalator.header?(section = HEADER):container == this$static.grid_0.escalator.body_0 && (section = BODY);
this$static.doDispatch(handler, section);
}
function Grid$AbstractGridMouseEvent(grid, targetCell){
this.associatedType = new DomEvent$Type(this.getBrowserEventType(), this);
this.grid_0 = grid;
this.targetCell = targetCell;
}
defineClass(232, 717, {});
_.dispatch = function(handler){
$dispatch_3(this, castTo(handler, 741));
}
;
_.getAssociatedType_0 = function(){
return this.associatedType;
}
;
var Lcom_vaadin_client_widgets_Grid$AbstractGridMouseEvent_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/AbstractGridMouseEvent', 232);
function GridClickEvent(grid, targetCell){
Grid$AbstractGridMouseEvent.call(this, grid, targetCell);
}
defineClass(553, 232, {}, GridClickEvent);
_.doDispatch = function(handler, section){
var row;
(section == ($clinit_Grid$Section() , BODY) && !!handler || section == HEADER && false || section == FOOTER && false) && (row = this.targetCell.rowReference.row_0 , $isSelected_0(handler.this$01.grid_0, row)?handler.this$01.deselectAllowed && $deselect(handler.this$01.grid_0, row):$select_1(handler.this$01.grid_0, row));
}
;
_.getBrowserEventType = function(){
return 'click';
}
;
var Lcom_vaadin_client_widget_grid_events_GridClickEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'GridClickEvent', 553);
function $doDispatch(section){
(section == ($clinit_Grid$Section() , BODY) && false || section == HEADER && false || section == FOOTER && false) && null.$_nullMethod();
}
function GridDoubleClickEvent(grid, targetCell){
Grid$AbstractGridMouseEvent.call(this, grid, targetCell);
}
defineClass(554, 232, {}, GridDoubleClickEvent);
_.doDispatch = function(handler, section){
$doDispatch((throwClassCastExceptionUnlessNull(handler) , section));
}
;
_.getBrowserEventType = function(){
return 'dblclick';
}
;
var Lcom_vaadin_client_widget_grid_events_GridDoubleClickEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'GridDoubleClickEvent', 554);
function $dispatch_4(this$static, handler){
var container, section, target;
target = $getEventTarget(this$static.nativeEvent);
if (is_0(target) && !$isElementInChildWidget(this$static.grid_0, target)) {
section = ($clinit_Grid$Section() , FOOTER);
container = this$static.grid_0.cellFocusHandler.containerWithFocus;
container == this$static.grid_0.escalator.header?(section = HEADER):container == this$static.grid_0.escalator.body_0 && (section = BODY);
this$static.doDispatch_0(handler, section);
}
}
function Grid$AbstractGridKeyEvent(grid, targetCell){
this.associatedType = new DomEvent$Type(this.getBrowserEventType(), this);
this.grid_0 = grid;
this.targetCell = targetCell;
}
defineClass(177, 715, {});
_.dispatch = function(handler){
$dispatch_4(this, castTo(handler, 194));
}
;
_.getAssociatedType_0 = function(){
return this.associatedType;
}
;
var Lcom_vaadin_client_widgets_Grid$AbstractGridKeyEvent_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/AbstractGridKeyEvent', 177);
function $doDispatch_0(this$static, handler, section){
(section == ($clinit_Grid$Section() , BODY) && !!handler || section == HEADER && false || section == FOOTER && false) && $onKeyDown(handler, this$static);
}
function GridKeyDownEvent(grid, targetCell){
Grid$AbstractGridKeyEvent.call(this, grid, targetCell);
}
defineClass(550, 177, {}, GridKeyDownEvent);
_.doDispatch_0 = function(handler, section){
$doDispatch_0(this, castTo(handler, 743), section);
}
;
_.getBrowserEventType = function(){
return 'keydown';
}
;
var Lcom_vaadin_client_widget_grid_events_GridKeyDownEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'GridKeyDownEvent', 550);
function $doDispatch_1(section){
(section == ($clinit_Grid$Section() , BODY) && false || section == HEADER && false || section == FOOTER && false) && null.$_nullMethod();
}
function GridKeyPressEvent(grid, targetCell){
Grid$AbstractGridKeyEvent.call(this, grid, targetCell);
}
defineClass(552, 177, {}, GridKeyPressEvent);
_.doDispatch_0 = function(handler, section){
$doDispatch_1((throwClassCastExceptionUnlessNull(handler) , section));
}
;
_.getBrowserEventType = function(){
return 'keypress';
}
;
var Lcom_vaadin_client_widget_grid_events_GridKeyPressEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'GridKeyPressEvent', 552);
function $doDispatch_2(this$static, handler, section){
(section == ($clinit_Grid$Section() , BODY) && instanceOf(handler, 175) || section == HEADER && instanceOf(handler, 682) || section == FOOTER && false) && handler.onKeyUp(this$static);
}
function GridKeyUpEvent(grid, targetCell){
Grid$AbstractGridKeyEvent.call(this, grid, targetCell);
}
defineClass(551, 177, {}, GridKeyUpEvent);
_.doDispatch_0 = function(handler, section){
$doDispatch_2(this, castTo(handler, 249), section);
}
;
_.getBrowserEventType = function(){
return 'keyup';
}
;
var Lcom_vaadin_client_widget_grid_events_GridKeyUpEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'GridKeyUpEvent', 551);
function $clinit_ScrollEvent(){
$clinit_ScrollEvent = emptyMethod;
TYPE_15 = new GwtEvent$Type;
}
function ScrollEvent(){
$clinit_ScrollEvent();
}
defineClass(178, 700, {}, ScrollEvent);
_.dispatch = function(handler){
castTo(handler, 131).onScroll(this);
}
;
_.getAssociatedType = function(){
return TYPE_15;
}
;
var TYPE_15;
var Lcom_vaadin_client_widget_grid_events_ScrollEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'ScrollEvent', 178);
function $clinit_SelectAllEvent(){
$clinit_SelectAllEvent = emptyMethod;
TYPE_16 = new GwtEvent$Type;
}
function $dispatch_5(this$static, handler){
$onSelectAll(handler, this$static);
}
function SelectAllEvent(selectionModel){
$clinit_SelectAllEvent();
this.selectionModel = selectionModel;
}
defineClass(209, 700, {}, SelectAllEvent);
_.dispatch = function(handler){
$dispatch_5(this, castTo(handler, 731));
}
;
_.getAssociatedType = function(){
return TYPE_16;
}
;
var TYPE_16;
var Lcom_vaadin_client_widget_grid_events_SelectAllEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.events', 'SelectAllEvent', 209);
defineClass(701, 1, {});
var Lcom_vaadin_client_widget_grid_selection_AbstractRowHandleSelectionModel_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'AbstractRowHandleSelectionModel', 701);
function $setDeselectAllowed(this$static, deselectAllowed){
this$static.deselectAllowed = deselectAllowed;
}
function ClickSelectHandler(grid){
this.grid_0 = grid;
this.clickHandler = $addBodyClickHandler(grid, new ClickSelectHandler$RowClickHandler(this));
}
defineClass(533, 1, {}, ClickSelectHandler);
_.deselectAllowed = true;
var Lcom_vaadin_client_widget_grid_selection_ClickSelectHandler_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'ClickSelectHandler', 533);
function ClickSelectHandler$RowClickHandler(this$0){
this.this$01 = this$0;
}
defineClass(534, 1, {15:1, 741:1}, ClickSelectHandler$RowClickHandler);
var Lcom_vaadin_client_widget_grid_selection_ClickSelectHandler$RowClickHandler_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'ClickSelectHandler/RowClickHandler', 534);
function $createWidget(this$static){
var checkBox, handler;
checkBox = new CheckBox;
$setStylePrimaryName(checkBox, getStylePrimaryName($getStyleElement(this$static.grid_0)) + '-selection-checkbox');
handler = new MultiSelectionRenderer$CheckBoxEventHandler(this$static, checkBox);
sinkBitlessEvent(($clinit_DOM() , checkBox.element), 'mousedown');
sinkBitlessEvent(checkBox.element, 'touchstart');
sinkBitlessEvent(checkBox.element, 'click');
$addDomHandler(checkBox, handler, ($clinit_MouseDownEvent() , $clinit_MouseDownEvent() , TYPE_3));
$addDomHandler(checkBox, handler, ($clinit_TouchStartEvent() , $clinit_TouchStartEvent() , TYPE_4));
$addDomHandler(checkBox, handler, ($clinit_ClickEvent() , $clinit_ClickEvent() , TYPE_0));
return checkBox;
}
function $destroy(this$static){
!!this$static.nativePreviewHandlerRegistration && $removeNativeHandler_0(this$static);
}
function $getBodyClientTop(this$static){
var table;
return $getClientTop($getElement(this$static.grid_0)) + (((table = $getTableElement_0(this$static) , table?table.tHead:null).offsetHeight || 0) | 0) + 1;
}
function $getClientTop(e){
return ($clinit_DOMImpl() , impl_0).getAbsoluteTop(e);
}
function $getLogicalRowIndex(this$static, target){
var checkbox, table, tbody, td, tr;
if (!target) {
return -1;
}
tbody = (table = $getTableElement_0(this$static) , table?table.tBodies[0]:null);
tr = $getFirstChildElement_0(($clinit_DOMImpl() , tbody));
while (tr) {
if (impl_0.isOrHasChild(tr, target)) {
td = $getFirstChildElement_0(tr);
checkbox = $getFirstChildElement_0(td);
return parseInt(checkbox['vEscalatorLogicalRow']) | 0;
}
tr = $getNextSiblingElement(tr);
}
return -1;
}
function $getTableElement_0(this$static){
var root, tablewrapper;
root = $getElement(this$static.grid_0);
tablewrapper = root.childNodes[2];
return tablewrapper?$getFirstChildElement_0(($clinit_DOMImpl() , tablewrapper)):null;
}
function $isSelected(this$static, logicalRow){
return $isSelected_0(this$static.grid_0, $getRow(this$static.grid_0.dataSource, logicalRow));
}
function $removeNativeHandler_0(this$static){
if (this$static.nativePreviewHandlerRegistration) {
$removeHandler(this$static.nativePreviewHandlerRegistration.real);
this$static.nativePreviewHandlerRegistration = null;
}
}
function $render(this$static, cell, data_0, checkBox){
$setValue(checkBox, data_0, false);
$setEnabled_0(checkBox, this$static.grid_0.editor.state_0 == ($clinit_Grid$Editor$State() , INACTIVE));
($clinit_DOM() , checkBox.element)['vEscalatorLogicalRow'] = cell.rowReference.rowIndex_0;
}
function $startDragSelect(this$static, event_0, target){
var logicalRowIndex;
$removeNativeHandler_0(this$static);
this$static.nativePreviewHandlerRegistration = addNativePreviewHandler(new MultiSelectionRenderer$TouchEventHandler(this$static));
logicalRowIndex = $getLogicalRowIndex(this$static, target);
$start_1(this$static.autoScrollHandler, logicalRowIndex);
($clinit_DOMImpl() , impl_0).eventPreventDefault(event_0);
event_0.stopPropagation();
}
function MultiSelectionRenderer(grid){
this.autoScrollHandler = new MultiSelectionRenderer$AutoScrollHandler(this);
this.grid_0 = grid;
}
defineClass(216, 707, $intern_41, MultiSelectionRenderer);
_.createWidget_0 = function(){
return $createWidget(this);
}
;
_.createWidget = function(){
return this.createWidget_0();
}
;
_.getConsumedEvents = function(){
var events;
events = new HashSet;
events.map_0.put('mousedown', events);
events.map_0.put('touchstart', events);
return events;
}
;
_.onBrowserEvent_0 = function(cell, event_0){
if ($equals_2('touchstart', ($clinit_DOMImpl() , event_0).type) || $equals_2('mousedown', event_0.type) && impl_0.eventGetButton(event_0) == 1) {
$startDragSelect(this, event_0, impl_0.eventGetTarget(event_0));
return true;
}
else {
throw new IllegalStateException_0('received unexpected event: ' + event_0.type);
}
}
;
_.render_0 = function(cell, data_0, checkBox){
$render(this, cell, castToBoolean(data_0), castTo(checkBox, 77));
}
;
_.setSelected = function(logicalRow, select){
var row;
row = $getRow(this.grid_0.dataSource, logicalRow);
select?$select_1(this.grid_0, row):$deselect(this.grid_0, row);
}
;
var Lcom_vaadin_client_widget_grid_selection_MultiSelectionRenderer_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'MultiSelectionRenderer', 216);
function $start_1(this$static, logicalRowIndex){
var batchedModel, model;
model = this$static.this$01.grid_0.selectionModel;
if (instanceOf(model, 157)) {
batchedModel = castTo(model, 157);
batchedModel.startBatchSelect();
}
$updateScrollBounds_0(this$static);
this$static.handlerRegistration = addNativePreviewHandler(this$static.scrollPreviewHandler);
this$static.autoScroller = new MultiSelectionRenderer$AutoScrollerAndSelector(this$static.this$01, this$static.topBound, this$static.bottomBound, this$static.gradientArea, !$isSelected(this$static.this$01, logicalRowIndex));
$start_2(this$static.autoScroller, logicalRowIndex);
}
function $stop_1(this$static){
var batchedModel, model;
if (this$static.handlerRegistration) {
$removeHandler(this$static.handlerRegistration.real);
this$static.handlerRegistration = null;
}
if (this$static.autoScroller) {
$stop_2(this$static.autoScroller);
this$static.autoScroller = null;
}
model = this$static.this$01.grid_0.selectionModel;
if (instanceOf(model, 157)) {
batchedModel = castTo(model, 157);
batchedModel.commitBatchSelect();
}
$removeNativeHandler_0(this$static.this$01);
}
function $updateScrollBounds_0(this$static){
var adjustment, bottomBorder, table, topBorder;
topBorder = $getBodyClientTop(this$static.this$01);
bottomBorder = $getClientTop((table = $getTableElement_0(this$static.this$01) , table?table.tFoot:null)) - 1;
this$static.topBound = topBorder + 100;
this$static.bottomBound = bottomBorder - 100;
this$static.gradientArea = 100;
if (this$static.bottomBound - this$static.topBound < 50) {
adjustment = 50 - (this$static.bottomBound - this$static.topBound);
this$static.topBound -= adjustment / 2 | 0;
this$static.bottomBound += adjustment / 2 | 0;
this$static.gradientArea -= adjustment / 2 | 0;
}
}
function MultiSelectionRenderer$AutoScrollHandler(this$0){
this.this$01 = this$0;
this.scrollPreviewHandler = new MultiSelectionRenderer$AutoScrollHandler$1(this);
}
defineClass(449, 1, {}, MultiSelectionRenderer$AutoScrollHandler);
_.bottomBound = -1;
_.gradientArea = 0;
_.topBound = -1;
var Lcom_vaadin_client_widget_grid_selection_MultiSelectionRenderer$AutoScrollHandler_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'MultiSelectionRenderer/AutoScrollHandler', 449);
function MultiSelectionRenderer$AutoScrollHandler$1(this$1){
this.this$11 = this$1;
}
defineClass(450, 1, $intern_42, MultiSelectionRenderer$AutoScrollHandler$1);
_.onPreviewNativeEvent = function(event_0){
var nativeEvent, pageX, pageY;
if (!this.this$11.autoScroller) {
$stop_1(this.this$11);
return;
}
nativeEvent = event_0.nativeEvent;
switch ($getTypeInt(event_0.nativeEvent)) {
case 64:
case $intern_27:
pageY = ($clinit_WidgetUtil() , getTouchOrMouseClientY(nativeEvent));
pageX = getTouchOrMouseClientX(nativeEvent);
$updatePointerCoords_0(this.this$11.autoScroller, pageX, pageY);
break;
case 8:
case $intern_15:
case $intern_28:
$stop_1(this.this$11);
}
}
;
var Lcom_vaadin_client_widget_grid_selection_MultiSelectionRenderer$AutoScrollHandler$1_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'MultiSelectionRenderer/AutoScrollHandler/1', 450);
function $doScrollAreaChecks_0(this$static, pageY){
var bottomDidNotMove, oldBottomBound, oldTopBound, topDidNotMove, wasVerticalMovement;
if (this$static.topBound == -1) {
this$static.topBound = min_1(this$static.finalTopBound, pageY);
this$static.bottomBound = max_2(this$static.finalBottomBound, pageY);
}
else {
oldTopBound = this$static.topBound;
this$static.topBound < this$static.finalTopBound && (this$static.topBound = max_2(this$static.topBound, min_1(this$static.finalTopBound, pageY)));
oldBottomBound = this$static.bottomBound;
this$static.bottomBound > this$static.finalBottomBound && (this$static.bottomBound = min_1(this$static.bottomBound, max_2(this$static.finalBottomBound, pageY)));
topDidNotMove = oldTopBound == this$static.topBound;
bottomDidNotMove = oldBottomBound == this$static.bottomBound;
wasVerticalMovement = pageY != this$static.pageY_0;
this$static.scrollAreaShouldRebound = topDidNotMove && bottomDidNotMove && wasVerticalMovement;
}
}
function $reboundScrollArea_0(this$static, timeDiff){
var reboundPx;
if (!this$static.scrollAreaShouldRebound) {
return;
}
reboundPx = round_int(Math.ceil(0.001 * timeDiff));
if (this$static.topBound < this$static.finalTopBound) {
this$static.topBound += reboundPx;
this$static.topBound = min_1(this$static.topBound, this$static.finalTopBound);
$updateScrollSpeed_0(this$static, this$static.pageY_0);
}
else if (this$static.bottomBound > this$static.finalBottomBound) {
this$static.bottomBound -= reboundPx;
this$static.bottomBound = max_2(this$static.bottomBound, this$static.finalBottomBound);
$updateScrollSpeed_0(this$static, this$static.pageY_0);
}
}
function $start_2(this$static, logicalRowIndex){
this$static.running = true;
this$static.this$01.setSelected(logicalRowIndex, this$static.selectionPaint);
this$static.lastModifiedLogicalRow = logicalRowIndex;
this$static.running && this$static.gradientArea >= 10 && (this$static.handle = (!instance && (instance = $isNativelySupported()?new AnimationSchedulerImplStandard:new AnimationSchedulerImplTimer) , instance).requestAnimationFrame_0(this$static, $getElement(this$static.this$01.grid_0)));
}
function $stop_2(this$static){
this$static.running = false;
if (this$static.handle) {
this$static.handle.cancel_0();
this$static.handle = null;
}
}
function $updatePointerCoords_0(this$static, pageX, pageY){
$doScrollAreaChecks_0(this$static, pageY);
$updateScrollSpeed_0(this$static, pageY);
this$static.pageY_0 = pageY;
this$static.initialPageX == -1 && (this$static.initialPageX = pageX);
}
function $updateScrollSpeed_0(this$static, pointerPageY){
var distance, ratio;
if (pointerPageY < this$static.topBound) {
distance = pointerPageY - this$static.topBound;
ratio = max_1(-1, distance / this$static.gradientArea);
}
else if (pointerPageY > this$static.bottomBound) {
distance = pointerPageY - this$static.bottomBound;
ratio = min_0(1, distance / this$static.gradientArea);
}
else {
ratio = 0;
}
this$static.scrollSpeed = ratio * 500;
}
function MultiSelectionRenderer$AutoScrollerAndSelector(this$0, topBound, bottomBound, gradientArea, selectionPaint){
var table, table0;
this.this$01 = this$0;
this.finalTopBound = topBound;
this.finalBottomBound = bottomBound;
this.gradientArea = gradientArea;
this.selectionPaint = selectionPaint;
this.bodyAbsoluteTop = $getClientTop($getElement(this$0.grid_0)) + (((table0 = $getTableElement_0(this$0) , table0?table0.tHead:null).offsetHeight || 0) | 0) + 1;
this.bodyAbsoluteBottom = $getClientTop((table = $getTableElement_0(this$0) , table?table.tFoot:null)) - 1;
}
defineClass(448, 1, {}, MultiSelectionRenderer$AutoScrollerAndSelector);
_.execute = function(timestamp){
var constrainedPageY, incrementOrDecrement, intPixelsToScroll, logicalRow, timeDiff;
timeDiff = timestamp - this.prevTimestamp;
this.prevTimestamp = timestamp;
$reboundScrollArea_0(this, timeDiff);
this.pixelsToScroll += this.scrollSpeed * (timeDiff / 1000);
intPixelsToScroll = round_int(this.pixelsToScroll);
this.pixelsToScroll -= intPixelsToScroll;
intPixelsToScroll != 0 && $setScrollTop_1(this.this$01.grid_0, this.this$01.grid_0.escalator.verticalScrollbar.scrollPos + intPixelsToScroll);
constrainedPageY = max_2(this.bodyAbsoluteTop, min_1(this.bodyAbsoluteBottom, this.pageY_0));
logicalRow = $getLogicalRowIndex(this.this$01, getElementFromPoint(this.initialPageX, constrainedPageY));
incrementOrDecrement = logicalRow > this.lastModifiedLogicalRow?1:-1;
while (logicalRow != -1 && this.lastModifiedLogicalRow != logicalRow) {
this.lastModifiedLogicalRow += incrementOrDecrement;
this.this$01.setSelected(this.lastModifiedLogicalRow, this.selectionPaint);
}
this.running && this.gradientArea >= 10 && (this.handle = (!instance && (instance = $isNativelySupported()?new AnimationSchedulerImplStandard:new AnimationSchedulerImplTimer) , instance).requestAnimationFrame_0(this, $getElement(this.this$01.grid_0)));
}
;
_.bodyAbsoluteBottom = 0;
_.bodyAbsoluteTop = 0;
_.bottomBound = -1;
_.finalBottomBound = 0;
_.finalTopBound = 0;
_.gradientArea = 0;
_.initialPageX = -1;
_.lastModifiedLogicalRow = -1;
_.pageY_0 = 0;
_.pixelsToScroll = 0;
_.prevTimestamp = 0;
_.running = false;
_.scrollAreaShouldRebound = false;
_.scrollSpeed = 0;
_.selectionPaint = false;
_.topBound = -1;
var Lcom_vaadin_client_widget_grid_selection_MultiSelectionRenderer$AutoScrollerAndSelector_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'MultiSelectionRenderer/AutoScrollerAndSelector', 448);
function MultiSelectionRenderer$CheckBoxEventHandler(this$0, checkBox){
this.this$01 = this$0;
this.checkBox = checkBox;
}
defineClass(446, 1, {87:1, 748:1, 749:1, 15:1}, MultiSelectionRenderer$CheckBoxEventHandler);
_.onClick = function(event_0){
$preventDefault(event_0.nativeEvent);
$stopPropagation(event_0.nativeEvent);
}
;
var Lcom_vaadin_client_widget_grid_selection_MultiSelectionRenderer$CheckBoxEventHandler_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'MultiSelectionRenderer/CheckBoxEventHandler', 446);
function $isInFirstColumn(this$static, element){
var cursor, table, tbody, tr;
if (!element) {
return false;
}
tbody = (table = $getTableElement_0(this$static.this$01) , table?table.tBodies[0]:null);
if (!tbody || !($clinit_DOMImpl() , impl_0).isOrHasChild(tbody, element)) {
return false;
}
cursor = element;
while (!!$getParentElement_0(($clinit_DOMImpl() , cursor)) && $getParentElement($getParentElement_0(cursor)) != tbody) {
cursor = $getParentElement_0(cursor);
}
tr = $getParentElement_0(cursor);
return $getFirstChildElement_0(tr) == cursor;
}
function MultiSelectionRenderer$TouchEventHandler(this$0){
this.this$01 = this$0;
}
defineClass(447, 1, $intern_42, MultiSelectionRenderer$TouchEventHandler);
_.onPreviewNativeEvent = function(event_0){
var targetElement;
switch ($getTypeInt(event_0.nativeEvent)) {
case $intern_26:
{
$getTouches(event_0.nativeEvent).length == 1 && $stop_1(this.this$01.autoScrollHandler);
break;
}
case $intern_27:
event_0.isCanceled = true;
break;
case $intern_15:
case $intern_28:
targetElement = $getEventTarget(event_0.nativeEvent);
if ($isInFirstColumn(this, targetElement)) {
$removeNativeHandler_0(this.this$01);
event_0.isCanceled = true;
}
}
}
;
var Lcom_vaadin_client_widget_grid_selection_MultiSelectionRenderer$TouchEventHandler_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'MultiSelectionRenderer/TouchEventHandler', 447);
function $clinit_SelectionEvent(){
$clinit_SelectionEvent = emptyMethod;
eventType_0 = new GwtEvent$Type;
}
function SelectionEvent(grid, added, removed){
$clinit_SelectionEvent();
this.grid_0 = grid;
added != null?($clinit_Collections() , new Collections$SingletonList(added)):($clinit_Collections() , $clinit_Collections() , EMPTY_LIST);
removed != null?($clinit_Collections() , new Collections$SingletonList(removed)):($clinit_Collections() , $clinit_Collections() , EMPTY_LIST);
}
function SelectionEvent_0(grid, added, removed){
$clinit_SelectionEvent();
this.grid_0 = grid;
added?new ArrayList_1(added):($clinit_Collections() , $clinit_Collections() , EMPTY_LIST);
removed?new ArrayList_1(removed):($clinit_Collections() , $clinit_Collections() , EMPTY_LIST);
}
defineClass(53, 700, {}, SelectionEvent, SelectionEvent_0);
_.dispatch = function(handler){
castTo(handler, 680).onSelect(this);
}
;
_.getAssociatedType = function(){
return eventType_0;
}
;
_.getSource = function(){
return this.grid_0;
}
;
var eventType_0;
var Lcom_vaadin_client_widget_grid_selection_SelectionEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'SelectionEvent', 53);
function $getSelectedRows(this$static){
var entry, handle, handle$iterator, outerIter, selected;
selected = new LinkedHashSet;
for (handle$iterator = (outerIter = (new AbstractMap$1(this$static.selectedRows.map_0)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter)); handle$iterator.val$outerIter2.hasNext_0();) {
handle = (entry = castTo(handle$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getKey(), 107));
$add_9(selected, handle.row_0);
}
return $clinit_Collections() , new Collections$UnmodifiableSet(selected);
}
function $isSelectedByHandle(this$static, handle){
return $contains_1(this$static.selectedRows, handle);
}
function $rowHandlesToRows(rowHandles){
var entry, handle, handle$iterator, outerIter, rows_0;
rows_0 = new ArrayList_0(rowHandles.map_0.size_2());
for (handle$iterator = (outerIter = (new AbstractMap$1(rowHandles.map_0)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter)); handle$iterator.val$outerIter2.hasNext_0();) {
handle = (entry = castTo(handle$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getKey(), 107));
$add_7(rows_0, handle.row_0);
}
return rows_0;
}
function $setGrid(this$static, grid){
if (!!this$static.grid_1 && !!grid) {
throw new IllegalStateException_0('Selection model is already attached to a grid. Remove the selection model first from the grid and then add it.');
}
this$static.grid_1 = grid;
if (this$static.grid_1) {
this$static.spaceSelectHandler = new SpaceSelectHandler(grid);
this$static.renderer_0 = new MultiSelectionRenderer(grid);
}
else {
$removeHandler_0(this$static.spaceSelectHandler);
this$static.spaceSelectHandler = null;
this$static.renderer_0 = null;
}
}
defineClass(140, 701, {85:1, 157:1, 140:1});
_.commitBatchSelect = function(){
var added, entry, handle, handle$iterator, outerIter, removed;
if (!this.batchStarted) {
return;
}
this.batchStarted = false;
added = $rowHandlesToRows(this.selectionBatch);
this.selectionBatch.map_0.clear_0();
removed = $rowHandlesToRows(this.deselectionBatch);
for (handle$iterator = (outerIter = (new AbstractMap$1(this.deselectionBatch.map_0)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter)); handle$iterator.val$outerIter2.hasNext_0();) {
handle = (entry = castTo(handle$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getKey(), 107));
$unpinHandle(handle.this$01, handle);
}
this.deselectionBatch.map_0.clear_0();
$fireEvent_0(this.grid_1, new SelectionEvent_0(this.grid_1, added, removed));
}
;
_.deselect_0 = function(rows_0){
var handle, old, removed, row, row$iterator;
removed = new LinkedHashSet;
for (row$iterator = new Collections$UnmodifiableCollectionIterator(rows_0.coll.iterator()); row$iterator.it.hasNext_0();) {
row = row$iterator.it.next_1();
handle = $getHandle(this.grid_1.dataSource, row);
this.deselectByHandle(handle) && (old = removed.map_0.put(row, removed) , old == null);
}
if (removed.map_0.size_2() > 0) {
$fireEvent_0(this.grid_1, new SelectionEvent_0(this.grid_1, null, removed));
return true;
}
return false;
}
;
_.deselectAll = function(){
var event_0, selectedRowsClone;
if (this.selectedRows.map_0.size_2() > 0) {
selectedRowsClone = new LinkedHashSet_0(this.selectedRows);
event_0 = new SelectionEvent_0(this.grid_1, null, $getSelectedRows(this));
this.selectedRows.map_0.clear_0();
if (this.batchStarted) {
this.selectionBatch.map_0.clear_0();
this.deselectionBatch.map_0.clear_0();
$addAll_0(this.deselectionBatch, selectedRowsClone);
}
$fireEvent_0(this.grid_1, event_0);
return true;
}
return false;
}
;
_.deselectByHandle = function(handle){
if ($remove_14(this.selectedRows, handle)) {
if (this.batchStarted) {
$remove_14(this.selectionBatch, handle);
$add_9(this.deselectionBatch, handle);
}
else {
$unpinHandle(handle.this$01, handle);
}
return true;
}
return false;
}
;
_.getSelectionColumnRenderer = function(){
return this.renderer_0;
}
;
_.isSelected = function(row){
return $isSelectedByHandle(this, $getHandle(this.grid_1.dataSource, row));
}
;
_.reset_1 = function(){
this.deselectAll();
}
;
_.select_1 = function(rows_0){
var added, handle, old, row, row$iterator;
added = new LinkedHashSet;
for (row$iterator = new Collections$UnmodifiableCollectionIterator(rows_0.coll.iterator()); row$iterator.it.hasNext_0();) {
row = row$iterator.it.next_1();
handle = $getHandle(this.grid_1.dataSource, row);
this.selectByHandle(handle) && (old = added.map_0.put(row, added) , old == null);
}
if (added.map_0.size_2() > 0) {
$fireEvent_0(this.grid_1, new SelectionEvent_0(this.grid_1, added, null));
return true;
}
return false;
}
;
_.selectByHandle = function(handle){
if ($add_9(this.selectedRows, handle)) {
$pinHandle(handle.this$01, handle);
if (this.batchStarted) {
$remove_14(this.deselectionBatch, handle);
$add_9(this.selectionBatch, handle);
}
return true;
}
return false;
}
;
_.setGrid = function(grid){
$setGrid(this, grid);
}
;
_.startBatchSelect = function(){
this.batchStarted = true;
}
;
_.batchStarted = false;
var Lcom_vaadin_client_widget_grid_selection_SelectionModelMulti_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'SelectionModelMulti', 140);
defineClass(719, 701, {});
_.getSelectionColumnRenderer = function(){
return null;
}
;
_.isSelected = function(row){
return false;
}
;
_.reset_1 = function(){
}
;
_.setGrid = function(grid){
}
;
var Lcom_vaadin_client_widget_grid_selection_SelectionModelNone_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'SelectionModelNone', 719);
function $deselectByHandle(this$static, handle){
if (!!handle && $equalsExplicit(handle, this$static.selectedRow_0)) {
$unpin(this$static.selectedRow_0);
this$static.selectedRow_0 = null;
return true;
}
else {
return false;
}
}
function $selectByHandle(this$static, handle){
if (!!handle && !$equalsExplicit(handle, this$static.selectedRow_0)) {
$deselectByHandle(this$static, this$static.selectedRow_0);
this$static.selectedRow_0 = handle;
$pin(this$static.selectedRow_0);
return true;
}
else {
return false;
}
}
function $setGrid_0(this$static, grid){
if (!!this$static.grid_1 && !!grid) {
throw new IllegalStateException_0('Selection model is already attached to a grid. Remove the selection model first from the grid and then add it.');
}
this$static.grid_1 = grid;
if (this$static.grid_1) {
this$static.spaceSelectHandler = new SpaceSelectHandler(grid);
this$static.clickSelectHandler = new ClickSelectHandler(grid);
!!this$static.spaceSelectHandler && $setDeselectAllowed_0(this$static.spaceSelectHandler, this$static.deselectAllowed);
!!this$static.clickSelectHandler && $setDeselectAllowed(this$static.clickSelectHandler, this$static.deselectAllowed);
}
else {
$removeHandler_0(this$static.spaceSelectHandler);
$removeHandler(this$static.clickSelectHandler.clickHandler.real);
this$static.spaceSelectHandler = null;
this$static.clickSelectHandler = null;
}
}
function SelectionModelSingle(){
}
defineClass(211, 701, {155:1}, SelectionModelSingle);
_.deselect_1 = function(row){
if (row == null) {
throw new IllegalArgumentException('Row cannot be null');
}
if (this.isSelected(row)) {
$deselectByHandle(this, this.selectedRow_0);
$fireEvent_0(this.grid_1, new SelectionEvent(this.grid_1, null, row));
return true;
}
return false;
}
;
_.getSelectionColumnRenderer = function(){
return null;
}
;
_.isSelected = function(row){
return !!this.selectedRow_0 && $equalsExplicit(this.selectedRow_0, $getHandle(this.grid_1.dataSource, row));
}
;
_.reset_1 = function(){
!!this.selectedRow_0 && this.deselect_1(this.selectedRow_0?this.selectedRow_0.row_0:null);
}
;
_.select_2 = function(row){
var removed;
if (row == null) {
throw new IllegalArgumentException('Row cannot be null');
}
removed = this.selectedRow_0?this.selectedRow_0.row_0:null;
if ($selectByHandle(this, $getHandle(this.grid_1.dataSource, row))) {
$fireEvent_0(this.grid_1, new SelectionEvent(this.grid_1, row, removed));
return true;
}
return false;
}
;
_.setGrid = function(grid){
$setGrid_0(this, grid);
}
;
_.deselectAllowed = true;
var Lcom_vaadin_client_widget_grid_selection_SelectionModelSingle_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'SelectionModelSingle', 211);
function $removeHandler_0(this$static){
$removeHandler(this$static.spaceDownHandler.real);
$removeHandler(this$static.spaceUpHandler.real);
}
function $setDeselectAllowed_0(this$static, deselectAllowed){
this$static.deselectAllowed = deselectAllowed;
}
function SpaceSelectHandler(grid){
this.grid_0 = grid;
this.spaceDownHandler = $addBodyKeyDownHandler(grid, new SpaceSelectHandler$SpaceKeyDownHandler(this));
this.spaceUpHandler = $addBodyKeyUpHandler(grid, new SpaceSelectHandler$1(this));
}
defineClass(227, 1, {}, SpaceSelectHandler);
_.deselectAllowed = true;
_.spaceDown = false;
var Lcom_vaadin_client_widget_grid_selection_SpaceSelectHandler_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'SpaceSelectHandler', 227);
function SpaceSelectHandler$1(this$0){
this.this$01 = this$0;
}
defineClass(175, 1, {15:1, 194:1, 249:1, 175:1}, SpaceSelectHandler$1);
_.onKeyUp = function(event_0){
$getKeyCode(event_0.nativeEvent) == 32 && (this.this$01.spaceDown = false);
}
;
var Lcom_vaadin_client_widget_grid_selection_SpaceSelectHandler$1_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'SpaceSelectHandler/1', 175);
function $onKeyDown(this$static, event_0){
var rowIndex;
if ($getKeyCode(event_0.nativeEvent) != 32 || this$static.this$01.spaceDown) {
return;
}
$preventDefault(event_0.nativeEvent);
this$static.this$01.spaceDown = true;
rowIndex = event_0.targetCell.rowReference.rowIndex_0;
if (this$static.scrollHandler) {
$removeHandler(this$static.scrollHandler.real);
this$static.scrollHandler = null;
}
this$static.scrollHandler = $addDataAvailableHandler(this$static.this$01.grid_0, new SpaceSelectHandler$SpaceKeyDownHandler$1(this$static, rowIndex));
$scrollToRow(this$static.this$01.grid_0, rowIndex, ($clinit_ScrollDestination() , ANY));
}
function $setSelected(this$static, grid, rowIndex){
var row;
row = $getRow(grid.dataSource, rowIndex);
grid.selectionModel.isSelected(row)?this$static.this$01.deselectAllowed && $deselect(grid, row):$select_1(grid, row);
}
function SpaceSelectHandler$SpaceKeyDownHandler(this$0){
this.this$01 = this$0;
}
defineClass(531, 1, {15:1, 194:1, 743:1}, SpaceSelectHandler$SpaceKeyDownHandler);
_.scrollHandler = null;
var Lcom_vaadin_client_widget_grid_selection_SpaceSelectHandler$SpaceKeyDownHandler_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'SpaceSelectHandler/SpaceKeyDownHandler', 531);
function SpaceSelectHandler$SpaceKeyDownHandler$1(this$1, val$rowIndex){
this.this$11 = this$1;
this.val$rowIndex2 = val$rowIndex;
}
defineClass(532, 1, $intern_44, SpaceSelectHandler$SpaceKeyDownHandler$1);
_.onDataAvailable = function(dataAvailableEvent){
if ($contains(dataAvailableEvent.rowsAvailable, this.val$rowIndex2)) {
$setSelected(this.this$11, this.this$11.this$01.grid_0, this.val$rowIndex2);
$removeHandler(this.this$11.scrollHandler.real);
this.this$11.scrollHandler = null;
}
}
;
_.val$rowIndex2 = 0;
var Lcom_vaadin_client_widget_grid_selection_SpaceSelectHandler$SpaceKeyDownHandler$1_2_classLit = createForClass('com.vaadin.client.widget.grid.selection', 'SpaceSelectHandler/SpaceKeyDownHandler/1', 532);
function $clinit_SortEvent(){
$clinit_SortEvent = emptyMethod;
TYPE_17 = new GwtEvent$Type;
}
function $dispatch_6(this$static, handler){
$sort_1(handler, this$static);
}
function SortEvent(grid, order, userOriginated){
$clinit_SortEvent();
this.grid_0 = grid;
this.order_0 = order;
this.userOriginated = userOriginated;
}
defineClass(208, 700, {}, SortEvent);
_.dispatch = function(handler){
$dispatch_6(this, castTo(handler, 730));
}
;
_.getAssociatedType = function(){
return TYPE_17;
}
;
_.getSource = function(){
return this.grid_0;
}
;
_.userOriginated = false;
var TYPE_17;
var Lcom_vaadin_client_widget_grid_sort_SortEvent_2_classLit = createForClass('com.vaadin.client.widget.grid.sort', 'SortEvent', 208);
function SortOrder(column){
SortOrder_0.call(this, column, ($clinit_SortDirection() , ASCENDING));
}
function SortOrder_0(column, direction){
if (!column) {
throw new IllegalArgumentException('Grid column reference can not be null!');
}
if (!direction) {
throw new IllegalArgumentException('Direction value can not be null!');
}
this.column_0 = column;
this.direction_0 = direction;
}
defineClass(71, 1, {71:1}, SortOrder, SortOrder_0);
var Lcom_vaadin_client_widget_grid_sort_SortOrder_2_classLit = createForClass('com.vaadin.client.widget.grid.sort', 'SortOrder', 71);
function $clinit_Escalator(){
$clinit_Escalator = emptyMethod;
$clinit_UIObject();
1 / Math.sqrt(3);
Math.tan(0.6981317007977318);
}
function $detectAndApplyPositionFunction(this$static){
var docStyle;
if (indexOf($wnd.navigator.userAgent, 'Firefox') != -1) {
this$static.position_0 = new PositionFunction$AbsolutePosition;
return;
}
docStyle = $doc.body.style;
docStyle['transform'] !== undefined?docStyle['transformStyle'] !== undefined?(this$static.position_0 = new PositionFunction$Translate3DPosition):(this$static.position_0 = new PositionFunction$TranslatePosition):docStyle['webkitTransform'] !== undefined?(this$static.position_0 = new PositionFunction$WebkitTranslate3DPosition):(this$static.position_0 = new PositionFunction$AbsolutePosition);
}
function $findRowContainer(this$static, element){
if (this$static.header.root != element && $isOrHasChild(this$static.header.root, element)) {
return this$static.header;
}
else if (this$static.body_0.root != element && $isOrHasChild(this$static.body_0.root, element)) {
return this$static.body_0;
}
else if (this$static.footer.root != element && $isOrHasChild(this$static.footer.root, element)) {
return this$static.footer;
}
return null;
}
function $fireRowVisibilityChangeEvent(this$static){
var visibleRangeEnd, visibleRangeStart, visibleRowCount;
if (this$static.body_0.visualRowOrder.size_0 == 0) {
$fireEvent_0(this$static, new RowVisibilityChangeEvent(0, 0));
}
else {
visibleRangeStart = $getLogicalRowIndex_0(this$static.body_0, castToJso($getFirst(this$static.body_0.visualRowOrder)));
visibleRangeEnd = $getLogicalRowIndex_0(this$static.body_0, castToJso($getLast(this$static.body_0.visualRowOrder))) + 1;
visibleRowCount = visibleRangeEnd - visibleRangeStart;
$fireEvent_0(this$static, new RowVisibilityChangeEvent(visibleRangeStart, visibleRowCount));
}
}
function $getViewportPixels(this$static){
var from, to;
from = round_int(floor_0(this$static.verticalScrollbar.scrollPos));
to = round_int($getHeightOfSection(this$static.body_0));
return withLength(from, to);
}
function $getVisibleRowRange(this$static){
return this$static.body_0.visualRowOrder.size_0 == 0?withLength(0, 0):withLength(this$static.body_0.topRowLogicalIndex, this$static.body_0.visualRowOrder.size_0);
}
function $hasColumnAndRowData(this$static){
return (this$static.header.rows_0 > 0 || this$static.body_0.rows_0 > 0 || this$static.footer.rows_0 > 0) && this$static.columnConfiguration.columns.array.length > 0;
}
function $hasSomethingInDom(this$static){
return this$static.headElem.hasChildNodes() || this$static.bodyElem.hasChildNodes() || this$static.footElem.hasChildNodes();
}
function $isWorkPending_0(this$static){
return this$static.body_0.domSorter.waiting || $isWorkPending(this$static.verticalScrollbar) || $isWorkPending(this$static.horizontalScrollbar);
}
function $recalculateElementSizes(this$static){
if (!this$static.attached) {
return;
}
this$static.widthOfEscalator = max_1(0, getRequiredWidthBoundingClientRectDouble(($clinit_DOM() , this$static.element)));
this$static.heightOfEscalator = max_1(0, getRequiredHeightBoundingClientRectDouble(this$static.element));
$recalculateSectionHeight(this$static.header);
$recalculateSectionHeight(this$static.footer);
$recalculateScrollbarsForVirtualViewport(this$static.scroller);
$verifyEscalatorCount(this$static.body_0);
$reapplySpacerWidths(this$static.body_0.spacerContainer);
}
function $resetSizesFromDom(this$static){
var i_0;
$autodetectRowHeightNow(this$static.header);
$autodetectRowHeightNow(this$static.body_0);
$autodetectRowHeightNow(this$static.footer);
for (i_0 = 0; i_0 < this$static.columnConfiguration.columns.array.length; i_0++) {
$setColumnWidth(this$static.columnConfiguration, i_0, $getColumnWidth_0(this$static.columnConfiguration, i_0));
}
}
function $scrollToColumn(this$static, columnIndex, destination){
validateScrollDestination(destination, 10);
$verifyValidColumnIndex(this$static, columnIndex);
if (columnIndex < this$static.columnConfiguration.frozenColumns) {
throw new IllegalArgumentException('The given column index ' + columnIndex + ' is frozen.');
}
$scrollToColumn_0(this$static.scroller, columnIndex, destination);
}
function $scrollToRowAndSpacer(this$static, rowIndex, destination, padding){
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), new Escalator$6(this$static, destination, padding, rowIndex));
}
function $setHeight_0(this$static, height){
height != null && ($clinit_String() , height.length) != 0;
$setHeightInternal(this$static, height);
}
function $setHeightInternal(this$static, height){
var escalatorRowsBefore;
escalatorRowsBefore = this$static.body_0.visualRowOrder.size_0;
height != null && ($clinit_String() , height.length) != 0?(($clinit_DOM() , this$static.element).style['height'] = height , undefined):(($clinit_DOM() , this$static.element).style['height'] = '400.0px' , undefined);
$recalculateElementSizes(this$static);
escalatorRowsBefore != this$static.body_0.visualRowOrder.size_0 && $fireRowVisibilityChangeEvent(this$static);
}
function $setScrollLeft_0(this$static, scrollLeft){
$setScrollPos(this$static.horizontalScrollbar, scrollLeft);
}
function $setScrollLocked(this$static, direction, locked){
switch (direction.ordinal) {
case 1:
$setLocked(this$static.horizontalScrollbar, locked);
break;
case 0:
$setLocked(this$static.verticalScrollbar, locked);
break;
default:throw new UnsupportedOperationException_0('Unexpected value: ' + direction);
}
}
function $setScrollTop_0(this$static, scrollTop){
$setScrollPos(this$static.verticalScrollbar, scrollTop);
}
function $setStylePrimaryName_2(this$static, style){
setStylePrimaryName(($clinit_DOM() , this$static.element), style);
$setStylePrimaryName_1(this$static.verticalScrollbar, style);
$setStylePrimaryName_0(this$static.horizontalScrollbar, style);
setStylePrimaryName(this$static.tableWrapper, style + '-tablewrapper');
setStylePrimaryName(this$static.headerDeco, style + '-header-deco');
setStylePrimaryName(this$static.footerDeco, style + '-footer-deco');
setStylePrimaryName(this$static.horizontalScrollbarDeco, style + '-horizontal-scrollbar-deco');
setStylePrimaryName(this$static.spacerDecoContainer, style + '-spacer-deco-container');
$setStylePrimaryName_6(this$static.header, style);
$setStylePrimaryName_4(this$static.body_0, style);
$setStylePrimaryName_5(this$static.footer, style);
}
function $setWidth(this$static){
($clinit_String() , '100%'.length) != 0?(($clinit_DOM() , this$static.element).style['width'] = '100%' , undefined):(($clinit_DOM() , this$static.element).style['width'] = '500.0px' , undefined);
$recalculateElementSizes(this$static);
}
function $setupScrollbars(this$static, root){
var scrollHandler, scrollbarThickness, vScrollStyle;
scrollHandler = new Escalator$2(this$static);
scrollbarThickness = getNativeScrollbarSize();
($clinit_BrowserInfo() , !instance_2 && (instance_2 = new BrowserInfo) , $clinit_BrowserInfo() , instance_2).browserDetails.isIE && ($isIE9((!instance_2 && (instance_2 = new BrowserInfo) , instance_2))?(scrollbarThickness += 2):(scrollbarThickness += 1));
$appendChild(root, this$static.verticalScrollbar.root);
$addScrollHandler(this$static.verticalScrollbar, scrollHandler);
$setScrollbarThickness(this$static.verticalScrollbar, scrollbarThickness);
if ($isIE8((!instance_2 && (instance_2 = new BrowserInfo) , instance_2))) {
vScrollStyle = this$static.verticalScrollbar.root.style;
vScrollStyle['right'] = $getScrollbarThickness(this$static.verticalScrollbar) - 1 + ($clinit_Style$Unit() , 'px');
}
$appendChild(root, this$static.horizontalScrollbar.root);
$addScrollHandler(this$static.horizontalScrollbar, scrollHandler);
$setScrollbarThickness(this$static.horizontalScrollbar, scrollbarThickness);
$addVisibilityHandler(this$static.horizontalScrollbar, new Escalator$3);
if (getNativeScrollbarSize() == 0) {
this$static.verticalScrollbar.root.style['zIndex'] = '90';
this$static.horizontalScrollbar.root.style['zIndex'] = '90';
}
}
function $verifyValidColumnIndex(this$static, columnIndex){
if (columnIndex < 0 || columnIndex >= this$static.columnConfiguration.columns.array.length) {
throw new IndexOutOfBoundsException_0('The given column index ' + columnIndex + ' does not exist.');
}
}
function $verifyValidRowIndex(this$static, rowIndex){
if (rowIndex < 0 || rowIndex >= this$static.body_0.rows_0) {
throw new IndexOutOfBoundsException_0('The given row index ' + rowIndex + ' does not exist.');
}
}
function Escalator(){
$clinit_Escalator();
var fCornerStyle, hCornerStyle, hWrapperStyle, root, table;
this.flyweightRow = new FlyweightRow;
this.headElem = ($clinit_DOM() , $createTHeadElement($doc));
this.bodyElem = $createTBodyElement($doc);
this.footElem = $createTFootElement($doc);
this.verticalScrollbar = new ScrollbarBundle$VerticalScrollbarBundle;
this.horizontalScrollbar = new ScrollbarBundle$HorizontalScrollbarBundle;
this.header = new Escalator$HeaderRowContainer(this, this.headElem);
this.body_0 = new Escalator$BodyRowContainerImpl(this, this.bodyElem);
this.footer = new Escalator$FooterRowContainer(this, this.footElem);
this.scroller = new Escalator$Scroller(this);
this.columnConfiguration = new Escalator$ColumnConfigurationImpl(this);
this.horizontalScrollbarDeco = $createDivElement($doc);
this.headerDeco = $createDivElement($doc);
this.footerDeco = $createDivElement($doc);
this.spacerDecoContainer = $createDivElement($doc);
new Escalator$1(this);
this.positions = new Escalator$ElementPositionBookkeeper(this);
$detectAndApplyPositionFunction(this);
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Escalator_2_classLit);
new Logger;
'Using ' + $getSimpleName(getClass__Ljava_lang_Class___devirtual$(this.position_0)) + ' for position';
root = $createDivElement($doc);
$setElement_0(this, root);
$setupScrollbars(this, root);
this.tableWrapper = $createDivElement($doc);
$appendChild(root, this.tableWrapper);
table = $createTableElement($doc);
$appendChild(this.tableWrapper, table);
$appendChild(table, this.headElem);
$appendChild(table, this.bodyElem);
$appendChild(table, this.footElem);
hCornerStyle = this.headerDeco.style;
hCornerStyle['width'] = $getScrollbarThickness(this.verticalScrollbar) + ($clinit_Style$Unit() , 'px');
hCornerStyle['display'] = ($clinit_Style$Display() , 'none');
$appendChild(root, this.headerDeco);
fCornerStyle = this.footerDeco.style;
fCornerStyle['width'] = $getScrollbarThickness(this.verticalScrollbar) + 'px';
fCornerStyle['display'] = 'none';
$appendChild(root, this.footerDeco);
hWrapperStyle = this.horizontalScrollbarDeco.style;
hWrapperStyle['display'] = 'none';
hWrapperStyle['height'] = $getScrollbarThickness(this.horizontalScrollbar) + 'px';
$appendChild(root, this.horizontalScrollbarDeco);
$setStylePrimaryName_2(this, 'v-escalator');
this.spacerDecoContainer.setAttribute('aria-hidden', 'true');
$setHeightInternal(this, null);
this.element.style['width'] = '500.0px';
$recalculateElementSizes(this);
}
function getScrollPos(destination, targetStartPx, targetEndPx, viewportStartPx, viewportEndPx, padding){
$clinit_Escalator();
var endScrollPos, startScrollPos, targetMiddle, viewportLength;
viewportLength = viewportEndPx - viewportStartPx;
switch (destination.ordinal) {
case 0:
{
startScrollPos = targetStartPx - padding;
endScrollPos = targetEndPx + padding - viewportLength;
return startScrollPos < viewportStartPx?startScrollPos:targetEndPx + padding > viewportEndPx?endScrollPos:viewportStartPx;
}
case 3:
{
return targetEndPx + padding - viewportLength;
}
case 2:
{
targetMiddle = targetStartPx + (targetEndPx - targetStartPx) / 2;
return targetMiddle - viewportLength / 2;
}
case 1:
{
return targetStartPx - padding;
}
default:{
throw new IllegalArgumentException('Internal: ScrollDestination has been modified, but Escalator.getScrollPos has not been updated to match new values.');
}
}
}
function validateScrollDestination(destination, padding){
$clinit_Escalator();
if (!destination) {
throw new IllegalArgumentException('Destination cannot be null');
}
if (destination == ($clinit_ScrollDestination() , MIDDLE) && padding != 0) {
throw new IllegalArgumentException('You cannot have a padding with a MIDDLE destination');
}
}
defineClass(461, 14, $intern_33, Escalator);
_.logWarning = function(message){
$clinit_Escalator();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Escalator_2_classLit);
new Logger;
}
;
_.onLoad = function(){
var column, column$iterator, columnChanged, columnsChanged;
$autodetectRowHeightLater(this.header);
$autodetectRowHeightLater(this.body_0);
$autodetectRowHeightLater(this.footer);
$paintInsertStaticRows(this.header, 0, this.header.rows_0);
$paintInsertStaticRows(this.footer, 0, this.footer.rows_0);
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), new Escalator$4(this));
columnsChanged = false;
for (column$iterator = new ArrayList$1(this.columnConfiguration.columns); column$iterator.i < column$iterator.this$01.array.length;) {
column = castTo($next_3(column$iterator), 81);
columnChanged = $measureAndSetWidthIfNeeded(column);
columnChanged && (columnsChanged = true);
}
if (columnsChanged) {
$reapplyColumnWidths(this.header);
$reapplyColumnWidths(this.body_0);
$reapplyColumnWidths(this.footer);
}
$onLoad(this.verticalScrollbar);
$onLoad(this.horizontalScrollbar);
$attachScrollListener(this.scroller, this.verticalScrollbar.root);
$attachScrollListener(this.scroller, this.horizontalScrollbar.root);
$attachMousewheelListener(this.scroller, ($clinit_DOM() , this.element));
$attachTouchListeners(this.scroller, this.element);
}
;
_.onUnload = function(){
var i_0, index_0, rowsToRemove, tr;
$detachScrollListener(this.scroller, this.verticalScrollbar.root);
$detachScrollListener(this.scroller, this.horizontalScrollbar.root);
$detachMousewheelListener(this.scroller, ($clinit_DOM() , this.element));
$detachTouchListeners(this.scroller, this.element);
$paintRemoveRows(this.header, 0, this.header.rows_0);
$paintRemoveRows(this.footer, 0, this.footer.rows_0);
rowsToRemove = $getDomRowCount(this.body_0);
for (i_0 = 0; i_0 < rowsToRemove; i_0++) {
index_0 = rowsToRemove - i_0 - 1;
tr = this.bodyElem.rows[index_0];
$paintRemoveRow(this.body_0, tr, index_0);
$remove_4(this.positions, tr);
}
$reset_1(this.body_0.visualRowOrder);
$setTopRowLogicalIndex(this.body_0, 0);
}
;
_.heightOfEscalator = 0;
_.tBodyScrollLeft = 0;
_.tBodyScrollTop = 0;
_.widthOfEscalator = 0;
var Lcom_vaadin_client_widgets_Escalator_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator', 461);
function Escalator$1(this$0){
this.this$01 = this$0;
}
defineClass(476, 1, {}, Escalator$1);
_.execute_1 = function(){
$recalculateElementSizes(this.this$01);
}
;
var Lcom_vaadin_client_widgets_Escalator$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/1', 476);
function Escalator$2(this$0){
this.this$01 = this$0;
}
defineClass(477, 1, $intern_43, Escalator$2);
_.onScroll = function(event_0){
$onScroll(this.this$01.scroller);
$fireEvent_0(this.this$01, new ScrollEvent);
}
;
var Lcom_vaadin_client_widgets_Escalator$2_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/2', 477);
function $visibilityChanged(this$static){
if (this$static.queued) {
return;
}
this$static.queued = true;
$scheduleFinally(($clinit_SchedulerImpl() , INSTANCE), new Escalator$3$1(this$static));
}
function Escalator$3(){
}
defineClass(478, 1, {15:1, 752:1}, Escalator$3);
_.queued = false;
var Lcom_vaadin_client_widgets_Escalator$3_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/3', 478);
function Escalator$3$1(this$1){
this.this$11 = this$1;
}
defineClass(479, 1, {}, Escalator$3$1);
_.execute_1 = function(){
this.this$11.queued = false;
}
;
var Lcom_vaadin_client_widgets_Escalator$3$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/3/1', 479);
function Escalator$4(this$0){
this.this$01 = this$0;
}
defineClass(480, 1, {}, Escalator$4);
_.execute_1 = function(){
$recalculateElementSizes(this.this$01);
}
;
var Lcom_vaadin_client_widgets_Escalator$4_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/4', 480);
function Escalator$6(this$0, val$destination, val$padding, val$rowIndex){
this.this$01 = this$0;
this.val$destination2 = val$destination;
this.val$padding3 = val$padding;
this.val$rowIndex4 = val$rowIndex;
}
defineClass(481, 1, {}, Escalator$6);
_.execute_1 = function(){
var rowHeight, rowRange, rowTop, scrollPos, spacer, spacerHeight, spacerRange, spacerTop, targetEnd, targetRange, targetStart, viewportEnd, viewportStart;
validateScrollDestination(this.val$destination2, this.val$padding3);
this.val$rowIndex4 != -1 && $verifyValidRowIndex(this.this$01, this.val$rowIndex4);
if (this.val$rowIndex4 != -1) {
rowTop = round_int(floor_0($getRowTop_0(this.this$01.body_0, this.val$rowIndex4)));
rowHeight = round_int(ceil_0(this.this$01.body_0.defaultRowHeight));
rowRange = withLength(rowTop, rowHeight);
}
else {
rowRange = withLength(0, 0);
}
spacer = $getSpacer(this.this$01.body_0.spacerContainer, this.val$rowIndex4);
if (this.val$rowIndex4 == -1 && !spacer) {
throw new IllegalArgumentException('Cannot scroll to row index -1, as there is no spacer open at that index.');
}
if (spacer) {
spacerTop = round_int(floor_0($getTop(spacer.this$11.this$01.positions, spacer.root)));
spacerHeight = round_int(ceil_0(spacer.height_0));
spacerRange = withLength(spacerTop, spacerHeight);
targetRange = $combineWith(rowRange, spacerRange);
}
else {
targetRange = rowRange;
}
targetStart = targetRange.start_0;
targetEnd = targetRange.end;
viewportStart = this.this$01.verticalScrollbar.scrollPos;
viewportEnd = viewportStart + $getHeightOfSection(this.this$01.body_0);
scrollPos = getScrollPos(this.val$destination2, targetStart, targetEnd, viewportStart, viewportEnd, this.val$padding3);
$setScrollTop_0(this.this$01, scrollPos);
}
;
_.val$padding3 = 0;
_.val$rowIndex4 = 0;
var Lcom_vaadin_client_widgets_Escalator$6_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/6', 481);
function $assertArgumentsAreValidAndWithinRange(this$static, index_0, numberOfRows){
if (numberOfRows < 1) {
throw new IllegalArgumentException('Number of rows must be 1 or greater (was ' + numberOfRows + ')');
}
if (index_0 < 0 || index_0 + numberOfRows > this$static.rows_0) {
throw new IndexOutOfBoundsException_0('The given row range (' + index_0 + '..' + (index_0 + numberOfRows) + ') was outside of the current number of rows (' + this$static.rows_0 + ')');
}
}
function $autodetectRowHeightLater(this$static){
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), new Escalator$AbstractRowContainer$1(this$static));
}
function $autodetectRowHeightNow(this$static){
var boundingHeight, cellElem, detectionTr;
if (!this$static.this$01_1.attached) {
this$static.defaultRowHeightShouldBeAutodetected = true;
return;
}
detectionTr = ($clinit_DOM() , $createTRElement($doc));
$setClassName(detectionTr, this$static.primaryStyleName + '-row');
cellElem = createElement(this$static.getCellElementTagName());
$setClassName(cellElem, this$static.primaryStyleName + '-cell');
($clinit_DOMImpl() , impl_0).setInnerText(cellElem, 'Ij');
detectionTr.appendChild(cellElem);
$appendChild(this$static.root, detectionTr);
boundingHeight = getRequiredHeightBoundingClientRectDouble(cellElem);
this$static.defaultRowHeight = 1 > boundingHeight?1:boundingHeight;
$removeChild(this$static.root, detectionTr);
this$static.root.hasChildNodes() && this$static.reapplyDefaultRowHeights();
}
function $calculateTotalRowHeight(this$static){
return this$static.defaultRowHeight * this$static.rows_0;
}
function $createCellElement(this$static, width_0){
var cellElem, height;
cellElem = createElement(this$static.getCellElementTagName());
height = this$static.defaultRowHeight;
cellElem.style['height'] = height + ($clinit_Style$Unit() , 'px');
width_0 >= 0 && (cellElem.style['width'] = width_0 + 'px' , undefined);
$addClassName(cellElem, this$static.primaryStyleName + '-cell');
return cellElem;
}
function $getCell(this$static, element){
var cellElement, cellElementCandidate, domColumnIndex, domRowIndex, e, e0;
if (!element) {
throw new IllegalArgumentException('Element cannot be null');
}
if (this$static.root == element || $getParentElement_0(($clinit_DOMImpl() , element)) == this$static.root || !$isOrHasChild(this$static.root, element)) {
return null;
}
cellElementCandidate = element;
while ($getParentElement($getParentElement_0(($clinit_DOMImpl() , cellElementCandidate))) != this$static.root) {
cellElementCandidate = $getParentElement_0(cellElementCandidate);
}
cellElement = cellElementCandidate;
domColumnIndex = -1;
for (e0 = cellElement; e0; e0 = $getPreviousSiblingElement(e0)) {
++domColumnIndex;
}
domRowIndex = -1;
for (e = $getParentElement_0(cellElement); e; e = $getPreviousSiblingElement(e)) {
++domRowIndex;
}
return new Cell(domRowIndex, domColumnIndex, cellElement);
}
function $getMaxCellWidth(this$static, colIndex){
var cellClone, cellOriginal, maxCellWidth, parent_0, requiredWidth, row, rowElement, rows_0, cellHasColspan, cellIsHidden;
maxCellWidth = -1;
rows_0 = this$static.root.rows;
for (row = 0; row < rows_0.length; row++) {
rowElement = rows_0[row];
cellOriginal = rowElement.cells[colIndex];
if (!cellOriginal || (cellHasColspan = cellOriginal.colSpan > 1 , cellIsHidden = $equals_2(($clinit_Style$Display() , 'none'), $getDisplay(cellOriginal.style)) , cellHasColspan || cellIsHidden)) {
continue;
}
cellClone = cellOriginal.cloneNode(true);
cellClone.style['height'] = '';
cellClone.style['width'] = '';
rowElement.insertBefore(cellClone, cellOriginal);
requiredWidth = getRequiredWidthBoundingClientRectDouble(cellClone);
($clinit_BrowserInfo() , !instance_2 && (instance_2 = new BrowserInfo) , $clinit_BrowserInfo() , instance_2).browserDetails.isIE && (requiredWidth += 0.01);
maxCellWidth = requiredWidth > maxCellWidth?requiredWidth:maxCellWidth;
parent_0 = $getParentElement_0(($clinit_DOMImpl() , cellClone));
!!parent_0 && parent_0.removeChild(cellClone);
}
return maxCellWidth;
}
function $getRowTop(this$static, tr){
return $getTop(this$static.this$01_1.positions, tr);
}
function $insertAfterReferenceAndUpdateIt(parent_0, elem, referenceNode){
var next;
referenceNode?(next = !referenceNode?null:referenceNode.nextSibling , !next?parent_0.appendChild(elem):parent_0.insertBefore(elem, next)):$insertBefore(parent_0, elem, parent_0.firstChild);
return elem;
}
function $insertRows(this$static, index_0, numberOfRows){
var col, colWidths, i_0, width_0;
if (index_0 < 0 || index_0 > this$static.rows_0) {
throw new IndexOutOfBoundsException_0('The given index (' + index_0 + ') was outside of the current number of rows (0..' + this$static.rows_0 + ')');
}
if (numberOfRows < 1) {
throw new IllegalArgumentException('Number of rows must be 1 or greater (was ' + numberOfRows + ')');
}
this$static.rows_0 += numberOfRows;
if (this$static.this$01_1.attached) {
this$static.paintInsertRows(index_0, numberOfRows);
if (this$static.rows_0 == numberOfRows) {
colWidths = new HashMap;
for (i_0 = 0; i_0 < this$static.this$01_1.columnConfiguration.columns.array.length; i_0++) {
width_0 = $getColumnWidth_0(this$static.this$01_1.columnConfiguration, i_0);
col = valueOf_2(i_0);
$put_3(colWidths.hashCodeMap, col, width_0);
}
$setColumnWidths(this$static.this$01_1.columnConfiguration, colWidths);
}
}
}
function $paintInsertCells(this$static, tr, logicalRowIndex, offset, numberOfCells){
var cell, cell$iterator, cell$iterator0, cellElem, cells_0, colWidth, referenceCell;
$setup_0(this$static.this$01_1.flyweightRow, tr, logicalRowIndex, $getCalculatedColumnWidths(this$static.this$01_1.columnConfiguration));
cells_0 = new FlyweightRow$2(this$static.this$01_1.flyweightRow, offset, numberOfCells);
for (cell$iterator0 = new FlyweightRow$CellIterator(new AbstractList$SubList(cells_0.this$01.cells_0, cells_0.val$offset2, cells_0.val$offset2 + cells_0.val$numberOfCells3), false); cell$iterator0.cursor + cell$iterator0.skipNext < cell$iterator0.cells_0.array.length;) {
cell = $next_1(cell$iterator0);
colWidth = $getColumnWidthActual(this$static.this$01_1.columnConfiguration, cell.column_0);
cellElem = $createCellElement(this$static, colWidth);
cell.element = cellElem;
}
this$static.updater.preAttach(this$static.this$01_1.flyweightRow, cells_0);
offset != 0?(referenceCell = tr.childNodes[offset - 1]):(referenceCell = null);
for (cell$iterator = new FlyweightRow$CellIterator(new AbstractList$SubList(cells_0.this$01.cells_0, cells_0.val$offset2, cells_0.val$offset2 + cells_0.val$numberOfCells3), false); cell$iterator.cursor + cell$iterator.skipNext < cell$iterator.cells_0.array.length;) {
cell = $next_1(cell$iterator);
referenceCell = $insertAfterReferenceAndUpdateIt(tr, cell.element, referenceCell);
}
this$static.updater.postAttach(this$static.this$01_1.flyweightRow, cells_0);
this$static.updater.update(this$static.this$01_1.flyweightRow, cells_0);
}
function $paintInsertColumns(this$static, offset, numberOfColumns, frozen){
var col, logicalRowIndex, row, tr;
for (row = 0; row < this$static.getDomRowCount(); row++) {
tr = this$static.getTrByVisualIndex(row);
logicalRowIndex = this$static.getLogicalRowIndex(tr);
$paintInsertCells(this$static, tr, logicalRowIndex, offset, numberOfColumns);
}
$reapplyRowWidths(this$static);
if (frozen) {
for (col = offset; col < offset + numberOfColumns; col++) {
$toggleFrozenColumnClass(this$static, col, true, 'frozen');
$updateFreezePosition(this$static, col, this$static.this$01_1.scroller.lastScrollLeft);
}
}
}
function $paintInsertRow(this$static, referenceRow, tr, logicalRowIndex){
$setup_0(this$static.this$01_1.flyweightRow, tr, logicalRowIndex, $getCalculatedColumnWidths(this$static.this$01_1.columnConfiguration));
this$static.updater.preAttach(this$static.this$01_1.flyweightRow, $getCells(this$static.this$01_1.flyweightRow));
referenceRow = $insertAfterReferenceAndUpdateIt(this$static.root, tr, referenceRow);
this$static.updater.postAttach(this$static.this$01_1.flyweightRow, $getCells(this$static.this$01_1.flyweightRow));
this$static.updater.update(this$static.this$01_1.flyweightRow, $getCells(this$static.this$01_1.flyweightRow));
return referenceRow;
}
function $paintInsertStaticRows(this$static, visualIndex, numberOfRows){
var addedRows, cellElem, col, colWidth, referenceRow, row, tr;
addedRows = new ArrayList;
if (numberOfRows < 1) {
return addedRows;
}
this$static.root.childNodes.length != 0 && visualIndex != 0?(referenceRow = $getChild(this$static.root, visualIndex - 1)):(referenceRow = null);
for (row = visualIndex; row < visualIndex + numberOfRows; row++) {
tr = ($clinit_DOM() , $createTRElement($doc));
setCheck(addedRows.array, addedRows.array.length, tr);
$addClassName(tr, this$static.primaryStyleName + '-row');
for (col = 0; col < this$static.this$01_1.columnConfiguration.columns.array.length; col++) {
colWidth = $getColumnWidthActual(this$static.this$01_1.columnConfiguration, col);
cellElem = $createCellElement(this$static, colWidth);
tr.appendChild(cellElem);
if (col < this$static.this$01_1.columnConfiguration.frozenColumns) {
$addClassName(cellElem, 'frozen');
this$static.this$01_1.position_0.set_0(cellElem, this$static.this$01_1.scroller.lastScrollLeft, 0);
}
this$static.this$01_1.columnConfiguration.frozenColumns > 0 && col == this$static.this$01_1.columnConfiguration.frozenColumns - 1 && $addClassName(cellElem, 'last-frozen');
}
referenceRow = $paintInsertRow(this$static, referenceRow, tr, row);
}
$reapplyRowWidths(this$static);
this$static.recalculateSectionHeight();
return addedRows;
}
function $paintRemoveColumns(this$static, offset, numberOfColumns){
var attachedCells, detachedCells, i_0, j, row;
for (i_0 = 0; i_0 < this$static.getDomRowCount(); i_0++) {
row = this$static.getTrByVisualIndex(i_0);
$setup_0(this$static.this$01_1.flyweightRow, row, i_0, $getCalculatedColumnWidths(this$static.this$01_1.columnConfiguration));
attachedCells = new FlyweightRow$1(this$static.this$01_1.flyweightRow, offset, numberOfColumns);
this$static.updater.preDetach(this$static.this$01_1.flyweightRow, attachedCells);
for (j = 0; j < numberOfColumns; j++) {
$removeFromParent(row.cells[offset]);
}
detachedCells = new FlyweightRow$2(this$static.this$01_1.flyweightRow, offset, numberOfColumns);
this$static.updater.postDetach(this$static.this$01_1.flyweightRow, detachedCells);
}
}
function $paintRemoveRow(this$static, tr, logicalRowIndex){
var parent_0;
$setup_0(this$static.this$01_1.flyweightRow, tr, logicalRowIndex, $getCalculatedColumnWidths(this$static.this$01_1.columnConfiguration));
this$static.updater.preDetach(this$static.this$01_1.flyweightRow, $getCells(this$static.this$01_1.flyweightRow));
parent_0 = $getParentElement_0(($clinit_DOMImpl() , tr));
!!parent_0 && parent_0.removeChild(tr);
this$static.updater.postDetach(this$static.this$01_1.flyweightRow, $getCells(this$static.this$01_1.flyweightRow));
}
function $reapplyColumnWidths(this$static){
var cell, columnIndex, row, width_0, colspan, spannedColumns;
row = $getFirstChildElement(this$static.root);
while (row) {
if (!$isSpacer(this$static.this$01_1.body_0.spacerContainer, row)) {
cell = $getFirstChildElement_0(($clinit_DOMImpl() , row));
columnIndex = 0;
while (cell) {
width_0 = (colspan = parseInt(cell['colSpan']) | 0 , spannedColumns = withLength(columnIndex, colspan) , spannedColumns.end > this$static.this$01_1.columnConfiguration.columns.array.length && (spannedColumns = new Range_0(columnIndex, this$static.this$01_1.columnConfiguration.columns.array.length)) , $getCalculatedColumnsWidth(this$static.this$01_1.columnConfiguration, spannedColumns));
cell.style['width'] = width_0 + ($clinit_Style$Unit() , 'px');
cell = $getNextSiblingElement(cell);
++columnIndex;
}
}
row = $getNextSiblingElement(($clinit_DOMImpl() , row));
}
$reapplyRowWidths(this$static);
}
function $reapplyRowHeight(tr, heightPx){
var cellElem;
cellElem = $getFirstChildElement_0(($clinit_DOMImpl() , tr));
while (cellElem) {
cellElem.style['height'] = heightPx + ($clinit_Style$Unit() , 'px');
cellElem = $getNextSiblingElement(cellElem);
}
}
function $reapplyRowWidths(this$static){
var row, rowWidth;
rowWidth = $calculateRowWidth(this$static.this$01_1.columnConfiguration);
if (rowWidth < 0) {
return;
}
row = $getFirstChildElement(this$static.root);
while (row) {
row.style['width'] = rowWidth + ($clinit_Style$Unit() , 'px');
row = $getNextSiblingElement(($clinit_DOMImpl() , row));
}
}
function $refreshRow(this$static, tr, logicalRowIndex, colRange){
var cellsToUpdate;
$setup_0(this$static.this$01_1.flyweightRow, tr, logicalRowIndex, $getCalculatedColumnWidths(this$static.this$01_1.columnConfiguration));
cellsToUpdate = new FlyweightRow$1(this$static.this$01_1.flyweightRow, colRange.start_0, colRange.end - colRange.start_0);
this$static.updater.update(this$static.this$01_1.flyweightRow, cellsToUpdate);
}
function $refreshRows(this$static, index_0, numberOfRows){
var colRange, rowRange;
rowRange = withLength(index_0, numberOfRows);
colRange = withLength(0, this$static.this$01_1.columnConfiguration.columns.array.length);
this$static.refreshCells(rowRange, colRange);
}
function $removeRows(this$static, index_0, numberOfRows){
$assertArgumentsAreValidAndWithinRange(this$static, index_0, numberOfRows);
this$static.rows_0 -= numberOfRows;
if (!this$static.this$01_1.attached) {
return;
}
$hasSomethingInDom(this$static.this$01_1) && this$static.paintRemoveRows(index_0, numberOfRows);
}
function $setColumnFrozen(this$static, column, frozen){
$toggleFrozenColumnClass(this$static, column, frozen, 'frozen');
frozen && $updateFreezePosition(this$static, column, this$static.this$01_1.scroller.lastScrollLeft);
}
function $setEscalatorUpdater(this$static, escalatorUpdater){
this$static.updater = escalatorUpdater;
$hasColumnAndRowData(this$static.this$01_1) && this$static.rows_0 > 0 && $refreshRows(this$static, 0, this$static.rows_0);
}
function $setRowPosition(this$static, tr, y_0){
$set_6(this$static.this$01_1.positions, tr, 0, y_0);
}
function $setStylePrimaryName_3(this$static, primaryStyleName){
var cell, oldStyle, row;
oldStyle = this$static.primaryStyleName;
if (equals(oldStyle, primaryStyleName)) {
return;
}
this$static.primaryStyleName = primaryStyleName;
row = this$static.root.rows[0];
while (row) {
setStylePrimaryName(row, primaryStyleName + '-row');
cell = row.cells[0];
while (cell) {
setStylePrimaryName(cell, primaryStyleName + '-cell');
cell = $getNextSiblingElement(($clinit_DOMImpl() , cell));
}
row = $getNextSiblingElement(($clinit_DOMImpl() , row));
}
}
function $toggleFrozenColumnClass(this$static, column, frozen, className){
var cell, childRows, row, tr;
childRows = this$static.root.rows;
for (row = 0; row < childRows.length; row++) {
tr = childRows[row];
if (!this$static.rowCanBeFrozen(tr)) {
continue;
}
cell = tr.cells[column];
if (frozen) {
$addClassName(cell, className);
}
else {
$removeClassName(cell, className);
this$static.this$01_1.position_0.reset_0(cell);
}
}
}
function $updateFreezePosition(this$static, column, scrollLeft){
var cell, childRows, row, tr;
childRows = this$static.root.rows;
for (row = 0; row < childRows.length; row++) {
tr = childRows[row];
if (this$static.rowCanBeFrozen(tr)) {
cell = tr.cells[column];
this$static.this$01_1.position_0.set_0(cell, scrollLeft, 0);
}
}
}
function Escalator$AbstractRowContainer(this$0, rowContainerElement){
this.this$01_1 = this$0;
this.updater = ($clinit_EscalatorUpdater() , NULL);
this.root = rowContainerElement;
}
defineClass(218, 1, {});
_.getCell = function(element){
return $getCell(this, element);
}
;
_.getDefaultRowHeight = function(){
return this.defaultRowHeight;
}
;
_.getLogicalRowIndex = function(tr){
return tr.sectionRowIndex;
}
;
_.getRowCount = function(){
return this.rows_0;
}
;
_.getRowElement = function(index_0){
return this.getTrByVisualIndex(index_0);
}
;
_.refreshRows = function(index_0, numberOfRows){
$refreshRows(this, index_0, numberOfRows);
}
;
_.defaultRowHeight = 20;
_.defaultRowHeightShouldBeAutodetected = true;
_.primaryStyleName = null;
_.rows_0 = 0;
var Lcom_vaadin_client_widgets_Escalator$AbstractRowContainer_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/AbstractRowContainer', 218);
function Escalator$AbstractRowContainer$1(this$1){
this.this$11 = this$1;
}
defineClass(473, 1, {}, Escalator$AbstractRowContainer$1);
_.execute_1 = function(){
if (this.this$11.defaultRowHeightShouldBeAutodetected && this.this$11.this$01_1.attached) {
$autodetectRowHeightNow(this.this$11);
this.this$11.defaultRowHeightShouldBeAutodetected = false;
}
}
;
var Lcom_vaadin_client_widgets_Escalator$AbstractRowContainer$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/AbstractRowContainer/1', 473);
function $getTrByVisualIndex(this$static, index_0){
if (index_0 >= 0 && index_0 < this$static.root.childNodes.length) {
return this$static.root.rows[index_0];
}
else {
throw new IndexOutOfBoundsException_0('No such visual index: ' + index_0);
}
}
function $paintRemoveRows(this$static, index_0, numberOfRows){
var i_0, tr;
for (i_0 = index_0; i_0 < index_0 + numberOfRows; i_0++) {
tr = this$static.root.rows[index_0];
$paintRemoveRow(this$static, tr, index_0);
}
$recalculateSectionHeight(this$static);
}
function $recalculateSectionHeight(this$static){
var newHeight;
newHeight = this$static.defaultRowHeight * this$static.rows_0;
if (newHeight != this$static.heightOfSection) {
this$static.heightOfSection = newHeight;
this$static.sectionHeightCalculated();
$setOffsetSize(this$static.this$01_0.verticalScrollbar, this$static.this$01_0.heightOfEscalator - max_1(0, this$static.this$01_0.header.heightOfSection) - max_1(0, this$static.this$01_0.footer.heightOfSection));
$verifyEscalatorCount(this$static.this$01_0.body_0);
$updateSpacerDecosVisibility(this$static.this$01_0.body_0.spacerContainer);
}
}
function Escalator$AbstractStaticRowContainer(this$0, headElement){
this.this$01_0 = this$0;
Escalator$AbstractRowContainer.call(this, this$0, headElement);
}
defineClass(219, 218, {});
_.getDomRowCount = function(){
return this.root.childNodes.length;
}
;
_.getTrByVisualIndex = function(index_0){
return $getTrByVisualIndex(this, index_0);
}
;
_.paintInsertRows = function(visualIndex, numberOfRows){
$paintInsertStaticRows(this, visualIndex, numberOfRows);
}
;
_.paintRemoveRows = function(index_0, numberOfRows){
$paintRemoveRows(this, index_0, numberOfRows);
}
;
_.reapplyDefaultRowHeights = function(){
var tr;
if (this.root.childNodes.length == 0) {
return;
}
tr = this.root.rows[0];
while (tr) {
$reapplyRowHeight(tr, this.defaultRowHeight);
tr = $getNextSiblingElement(($clinit_DOMImpl() , tr));
}
$recalculateSectionHeight(this);
}
;
_.recalculateSectionHeight = function(){
$recalculateSectionHeight(this);
}
;
_.refreshCells = function(logicalRowRange, colRange){
var row, tr;
$assertArgumentsAreValidAndWithinRange(this, logicalRowRange.start_0, logicalRowRange.end - logicalRowRange.start_0);
if (!this.this$01_0.attached) {
return;
}
if ($hasColumnAndRowData(this.this$01_0)) {
for (row = logicalRowRange.start_0; row < logicalRowRange.end; row++) {
tr = $getTrByVisualIndex(this, row);
$refreshRow(this, tr, row, colRange);
}
}
}
;
_.rowCanBeFrozen = function(tr){
return true;
}
;
_.heightOfSection = 0;
var Lcom_vaadin_client_widgets_Escalator$AbstractStaticRowContainer_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/AbstractStaticRowContainer', 219);
function $convertToVisual(this$static, logicalRange){
var currentTopRowIndex, insideRange, maxEscalatorRowCapacity, maxEscalatorRows, partitions;
if (logicalRange.start_0 >= logicalRange.end) {
return logicalRange;
}
else if (this$static.visualRowOrder.size_0 == 0) {
return withLength(0, 0);
}
maxEscalatorRows = (maxEscalatorRowCapacity = round_int(ceil_0($getHeightOfSection(this$static) / this$static.defaultRowHeight)) + 1 , 0 > maxEscalatorRowCapacity?0:maxEscalatorRowCapacity);
currentTopRowIndex = $getLogicalRowIndex_0(this$static, castToJso($getFirst(this$static.visualRowOrder)));
partitions = $partitionWith(logicalRange, withLength(currentTopRowIndex, maxEscalatorRows));
insideRange = partitions[1];
return -currentTopRowIndex == 0?insideRange:new Range_0(insideRange.start_0 + -currentTopRowIndex, insideRange.end + -currentTopRowIndex);
}
function $fillAndPopulateEscalatorRowsIfNeeded(this$static, index_0, numberOfRows){
var addedRows, escalatorRowsNeeded, escalatorRowsStillFit, i_0, maxEscalatorRowCapacity, tr, y_0;
escalatorRowsStillFit = (maxEscalatorRowCapacity = round_int(ceil_0($getHeightOfSection(this$static) / this$static.defaultRowHeight)) + 1 , (0 > maxEscalatorRowCapacity?0:maxEscalatorRowCapacity) - (this$static.root.childNodes.length - ($clinit_Collections() , (new Collections$UnmodifiableCollection(new AbstractMap$2(this$static.spacerContainer.rowIndexToSpacer))).coll.size_2())));
escalatorRowsNeeded = numberOfRows < escalatorRowsStillFit?numberOfRows:escalatorRowsStillFit;
if (escalatorRowsNeeded > 0) {
addedRows = $paintInsertStaticRows(this$static, index_0, escalatorRowsNeeded);
$addAll_1(this$static.visualRowOrder, index_0, addedRows);
y_0 = index_0 * this$static.defaultRowHeight + $getSpacerHeightsSumUntilIndex(this$static.spacerContainer, index_0);
for (i_0 = index_0; i_0 < this$static.visualRowOrder.size_0; i_0++) {
i_0 - index_0 < addedRows.array.length?(tr = (checkCriticalElementIndex(i_0 - index_0, addedRows.array.length) , castToJso(addedRows.array[i_0 - index_0]))):(tr = castToJso($get_7(this$static.visualRowOrder, i_0)));
$set_6(this$static.this$01_1.positions, tr, 0, y_0);
y_0 += this$static.defaultRowHeight;
y_0 += $getSpacerHeight(this$static.spacerContainer, i_0);
}
return addedRows;
}
else {
return null , EMPTY_LIST;
}
}
function $getDomRowCount(this$static){
return this$static.root.childNodes.length - ($clinit_Collections() , (new Collections$UnmodifiableCollection(new AbstractMap$2(this$static.spacerContainer.rowIndexToSpacer))).coll.size_2());
}
function $getHeightOfSection(this$static){
var footerHeight, headerHeight, heightOfSection, tableHeight;
tableHeight = (this$static.this$01.tableWrapper.offsetHeight || 0) | 0;
footerHeight = max_1(0, this$static.this$01.footer.heightOfSection);
headerHeight = max_1(0, this$static.this$01.header.heightOfSection);
heightOfSection = tableHeight - footerHeight - headerHeight;
return 0 > heightOfSection?0:heightOfSection;
}
function $getLogicalRowIndex_0(this$static, tr){
var internalIndex;
internalIndex = $indexOf_1(this$static.visualRowOrder, tr);
return this$static.topRowLogicalIndex + internalIndex;
}
function $getMaxEscalatorRowCapacity(this$static){
var maxEscalatorRowCapacity;
maxEscalatorRowCapacity = round_int(ceil_0($getHeightOfSection(this$static) / this$static.defaultRowHeight)) + 1;
return 0 > maxEscalatorRowCapacity?0:maxEscalatorRowCapacity;
}
function $getRowElement(this$static, index_0){
var visualIndex;
if (index_0 < 0 || index_0 >= this$static.rows_0) {
throw new IndexOutOfBoundsException_0('No such logical index: ' + index_0);
}
visualIndex = index_0 - $getLogicalRowIndex_0(this$static, castToJso($getFirst(this$static.visualRowOrder)));
if (visualIndex >= 0 && visualIndex < this$static.visualRowOrder.size_0) {
return $getTrByVisualIndex_0(this$static, visualIndex);
}
else {
throw new IllegalStateException_0('Row with logical index ' + index_0 + ' is currently not available in the DOM');
}
}
function $getRowHeightsSumBetweenPx(this$static, y1, y2){
var spacerPx, viewportPx;
viewportPx = y2 - y1;
spacerPx = $getSpacerHeightsSumBetweenPx(this$static.spacerContainer, y1, ($clinit_Escalator$SpacerInclusionStrategy() , PARTIAL), y2, PARTIAL);
return viewportPx - spacerPx;
}
function $getRowTop_0(this$static, logicalIndex){
var top_0;
top_0 = $getSpacerHeightsSumUntilIndex(this$static.spacerContainer, logicalIndex);
return top_0 + logicalIndex * this$static.defaultRowHeight;
}
function $getRowWithFocus(this$static){
var e, focusedElement, rowContainingFocus;
rowContainingFocus = null;
focusedElement = getFocusedElement();
if (!!focusedElement && $isOrHasChild(this$static.root, focusedElement)) {
e = focusedElement;
while (!!e && e != this$static.root) {
!!e && equalsIgnoreCase('tr', ($clinit_DOMImpl() , e).tagName) && (rowContainingFocus = e);
e = $getParentElement_0(($clinit_DOMImpl() , e));
}
}
return rowContainingFocus;
}
function $getTrByVisualIndex_0(this$static, index_0){
if (index_0 >= 0 && index_0 < this$static.visualRowOrder.size_0) {
return castToJso($get_7(this$static.visualRowOrder, index_0));
}
else {
throw new IndexOutOfBoundsException_0('No such visual index: ' + index_0);
}
}
function $getVisibleRowsAfter(this$static, logicalRow){
var allRowsAreInView, fromIndex, noRowsAreInView, sublist, toIndex, visibleRowLogicalRange;
visibleRowLogicalRange = $getVisibleRowRange(this$static.this$01);
allRowsAreInView = logicalRow < visibleRowLogicalRange.start_0;
noRowsAreInView = logicalRow >= visibleRowLogicalRange.end - 1;
if (allRowsAreInView) {
return unmodifiableList(this$static.visualRowOrder);
}
else if (noRowsAreInView) {
return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST;
}
else {
fromIndex = logicalRow - visibleRowLogicalRange.start_0 + 1;
toIndex = visibleRowLogicalRange.end - visibleRowLogicalRange.start_0;
sublist = new AbstractList$SubList(this$static.visualRowOrder, fromIndex, toIndex);
return $clinit_Collections() , new Collections$UnmodifiableList(sublist);
}
}
function $moveAndUpdateEscalatorRows(this$static, visualSourceRange, visualTargetIndex, logicalTargetIndex){
var adjustedVisualTargetIndex, i_0, iter, logicalIndex, newRowTop, removedRows, top_0, tr;
if (visualSourceRange.start_0 >= visualSourceRange.end) {
return;
}
visualSourceRange.start_0 < visualTargetIndex?(adjustedVisualTargetIndex = visualTargetIndex - (visualSourceRange.end - visualSourceRange.start_0)):(adjustedVisualTargetIndex = visualTargetIndex);
if (visualSourceRange.start_0 != adjustedVisualTargetIndex) {
removedRows = new ArrayList_0(visualSourceRange.end - visualSourceRange.start_0);
for (i_0 = 0; i_0 < visualSourceRange.end - visualSourceRange.start_0; i_0++) {
tr = castToJso($remove_8(this$static.visualRowOrder, visualSourceRange.start_0));
setCheck(removedRows.array, removedRows.array.length, tr);
}
$addAll_1(this$static.visualRowOrder, adjustedVisualTargetIndex, removedRows);
}
iter = $listIterator(this$static.visualRowOrder, adjustedVisualTargetIndex);
for (logicalIndex = logicalTargetIndex; logicalIndex < logicalTargetIndex + (visualSourceRange.end - visualSourceRange.start_0); logicalIndex++) {
tr = castToJso($next_4(iter));
$refreshRow(this$static, tr, logicalIndex, withLength(0, this$static.this$01_1.columnConfiguration.columns.array.length));
}
newRowTop = (top_0 = $getSpacerHeightsSumUntilIndex(this$static.spacerContainer, logicalTargetIndex) , top_0 + logicalTargetIndex * this$static.defaultRowHeight);
iter = $listIterator(this$static.visualRowOrder, adjustedVisualTargetIndex);
for (i_0 = 0; i_0 < visualSourceRange.end - visualSourceRange.start_0; i_0++) {
tr = castToJso($next_4(iter));
$set_6(this$static.this$01_1.positions, tr, 0, newRowTop);
newRowTop += this$static.defaultRowHeight;
newRowTop += $getSpacerHeight(this$static.spacerContainer, logicalTargetIndex + i_0);
}
}
function $moveViewportAndContent(this$static, yDelta){
var defaultRowHeight, newTop, rowIndexDelta, rowPxDelta, spacer, spacer$iterator, spacers, tr, tr$iterator;
if (yDelta == 0) {
return;
}
newTop = this$static.this$01.tBodyScrollTop + yDelta;
$setScrollPos(this$static.this$01.verticalScrollbar, newTop);
defaultRowHeight = this$static.defaultRowHeight;
rowPxDelta = yDelta - yDelta % defaultRowHeight;
rowIndexDelta = round_int(yDelta / defaultRowHeight);
$clinit_WidgetUtil();
if ((rowPxDelta <= 0?0 - rowPxDelta:rowPxDelta) > 0.49) {
spacers = $getSpacersAfterPx(this$static.spacerContainer, this$static.this$01.tBodyScrollTop, ($clinit_Escalator$SpacerInclusionStrategy() , PARTIAL));
for (spacer$iterator = spacers.iterator(); spacer$iterator.hasNext_0();) {
spacer = castTo(spacer$iterator.next_1(), 32);
$setPosition(spacer, $getLeft(spacer.this$11.this$01.positions, spacer.root), $getTop(spacer.this$11.this$01.positions, spacer.root) + rowPxDelta);
$setRowIndex(spacer, spacer.rowIndex_0 + rowIndexDelta);
}
for (tr$iterator = $listIterator(this$static.visualRowOrder, 0); tr$iterator.currentNode != tr$iterator.this$01.tail;) {
tr = castToJso($next_4(tr$iterator));
$setRowPosition(this$static, tr, $getTop(this$static.this$01_1.positions, tr) + rowPxDelta);
}
}
$setBodyScrollPosition(this$static, this$static.this$01.tBodyScrollLeft, newTop);
}
function $paintRemoveRowsAtBottom(this$static, removedLogicalInside, removedVisualInside){
var firstUpdatedIndex, i_0, iterator, logicalTargetIndex, rowTop, spacer, tr;
logicalTargetIndex = $getLogicalRowIndex_0(this$static, castToJso($getFirst(this$static.visualRowOrder))) - (removedVisualInside.end - removedVisualInside.start_0);
$moveAndUpdateEscalatorRows(this$static, removedVisualInside, 0, logicalTargetIndex);
firstUpdatedIndex = removedVisualInside.end;
iterator = $listIterator(this$static.visualRowOrder, firstUpdatedIndex);
rowTop = $getRowTop_0(this$static, removedLogicalInside.start_0);
i_0 = 0;
while (iterator.currentNode != iterator.this$01.tail) {
tr = castToJso($next_4(iterator));
$set_6(this$static.this$01_1.positions, tr, 0, rowTop);
rowTop += this$static.defaultRowHeight;
rowTop += (spacer = $getSpacer(this$static.spacerContainer, firstUpdatedIndex + i_0++) , spacer?spacer.height_0:0);
}
}
function $paintRemoveRowsAtMiddle(this$static, removedLogicalInside, removedVisualInside){
var escalatorRowCount, i_0, iterator, logicalTargetIndex, rowTop, spacer, tr;
escalatorRowCount = this$static.visualRowOrder.size_0;
logicalTargetIndex = $getLogicalRowIndex_0(this$static, castToJso($getLast(this$static.visualRowOrder))) - (removedVisualInside.end - removedVisualInside.start_0 - 1);
$moveAndUpdateEscalatorRows(this$static, removedVisualInside, escalatorRowCount, logicalTargetIndex);
iterator = $listIterator(this$static.visualRowOrder, removedVisualInside.start_0);
rowTop = $getRowTop_0(this$static, removedLogicalInside.start_0);
for (i_0 = removedVisualInside.start_0; i_0 < escalatorRowCount - (removedVisualInside.end - removedVisualInside.start_0); i_0++) {
tr = castToJso($next_4(iterator));
$set_6(this$static.this$01_1.positions, tr, 0, rowTop);
rowTop += this$static.defaultRowHeight;
rowTop += (spacer = $getSpacer(this$static.spacerContainer, i_0 + removedLogicalInside.start_0) , spacer?spacer.height_0:0);
}
}
function $setBodyScrollPosition(this$static, scrollLeft, scrollTop){
this$static.this$01.tBodyScrollLeft = scrollLeft;
this$static.this$01.tBodyScrollTop = scrollTop;
this$static.this$01.position_0.set_0(this$static.this$01.bodyElem, -this$static.this$01.tBodyScrollLeft, -this$static.this$01.tBodyScrollTop);
this$static.this$01.position_0.set_0(this$static.this$01.spacerDecoContainer, 0, -this$static.this$01.tBodyScrollTop);
}
function $setSpacer(this$static, rowIndex, height){
$setSpacer_0(this$static.spacerContainer, rowIndex, height);
}
function $setSpacerUpdater(this$static, spacerUpdater){
$setSpacerUpdater_0(this$static.spacerContainer, spacerUpdater);
}
function $setStylePrimaryName_4(this$static, primaryStyleName){
$setStylePrimaryName_3(this$static, primaryStyleName);
setStylePrimaryName(this$static.root, primaryStyleName + '-body');
$setStylePrimaryName_7(this$static.spacerContainer, primaryStyleName);
}
function $setTopRowLogicalIndex(this$static, topRowLogicalIndex){
loggingIsEnabled() && new Logger;
this$static.topRowLogicalIndex = topRowLogicalIndex;
}
function $shiftRowPositions(this$static, row, diff){
var tr, tr$iterator;
for (tr$iterator = $getVisibleRowsAfter(this$static, row).iterator(); tr$iterator.hasNext_0();) {
tr = castToJso(tr$iterator.next_1());
$setRowPosition(this$static, tr, $getTop(this$static.this$01_1.positions, tr) + diff);
}
}
function $sortDomElements(this$static){
var entry, focusedRow, i_0, i0, insertFirst, orderedBodyRows, outerIter, spacer, spacers, tr, unmovedSpacer, unmovedSpacer$iterator;
focusedRow = $getRowWithFocus(this$static);
orderedBodyRows = new ArrayList_1(this$static.visualRowOrder);
spacers = new HashMap_1(this$static.this$01.body_0.spacerContainer.rowIndexToSpacer);
for (i0 = -1; i0 < this$static.visualRowOrder.size_0; i0++) {
spacer = castTo($remove_6(spacers, valueOf_2(this$static.topRowLogicalIndex + i0)), 32);
if (spacer) {
$add_6(orderedBodyRows, i0 + 1, spacer.root);
spacer.root.style['display'] = '';
spacer.deco.style['display'] = '';
}
}
for (unmovedSpacer$iterator = (outerIter = (new AbstractMap$2(spacers)).this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); unmovedSpacer$iterator.val$outerIter2.hasNext_0();) {
unmovedSpacer = (entry = castTo(unmovedSpacer$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 32));
unmovedSpacer.root.style['display'] = ($clinit_Style$Display() , 'none');
unmovedSpacer.deco.style['display'] = 'none';
}
insertFirst = !focusedRow;
i_0 = new AbstractList$ListIteratorImpl(orderedBodyRows, orderedBodyRows.array.length);
while (i_0.i > 0) {
tr = (checkCriticalElement(i_0.i > 0) , castToJso(i_0.this$01.get_1(i_0.last = --i_0.i)));
tr == focusedRow?(insertFirst = true):insertFirst?$insertFirst(this$static.root, tr):$insertAfter(this$static.root, tr, focusedRow);
}
}
function $updateEscalatorRowsOnScroll(this$static){
var aRowWasLeftBehind, end, logicalRowIndex, maxLogicalIndex, naiveNewLogicalIndex, nextRowBottomOffset, originalRowsToMove, rowPx, rowPx0, rowsToMove, rowsWereMoved, scrollTop, start_0, strayRow, targetVisualIndex, topElementPosition, topLogicalIndex, topSpacer, viewportOffset;
if (this$static.visualRowOrder.size_0 == 0) {
return;
}
rowsWereMoved = false;
topSpacer = $getSpacer(this$static.spacerContainer, this$static.topRowLogicalIndex - 1);
if (topSpacer) {
topElementPosition = $getTop(topSpacer.this$11.this$01.positions, topSpacer.root);
nextRowBottomOffset = topSpacer.height_0 + this$static.defaultRowHeight;
}
else {
topElementPosition = $getRowTop(this$static, castToJso($getFirst(this$static.visualRowOrder)));
nextRowBottomOffset = this$static.defaultRowHeight;
}
scrollTop = this$static.this$01.tBodyScrollTop;
viewportOffset = topElementPosition - scrollTop;
if (viewportOffset > 0) {
rowPx0 = $getRowHeightsSumBetweenPx(this$static, scrollTop, topElementPosition);
originalRowsToMove = round_int(ceil_0(rowPx0 / this$static.defaultRowHeight));
rowsToMove = min_1(originalRowsToMove, this$static.visualRowOrder.size_0);
end = this$static.visualRowOrder.size_0;
start_0 = end - rowsToMove;
logicalRowIndex = (rowPx = scrollTop - $getSpacerHeightsSumUntilPx(this$static.spacerContainer, scrollTop) , round_int(rowPx / this$static.defaultRowHeight));
$moveAndUpdateEscalatorRows(this$static, new Range_0(start_0, end), 0, logicalRowIndex);
loggingIsEnabled() && new Logger;
this$static.topRowLogicalIndex = logicalRowIndex;
rowsWereMoved = true;
}
else if (viewportOffset + nextRowBottomOffset <= 0) {
rowPx0 = $getRowHeightsSumBetweenPx(this$static, topElementPosition, scrollTop);
originalRowsToMove = round_int(rowPx0 / this$static.defaultRowHeight);
rowsToMove = min_1(originalRowsToMove, this$static.visualRowOrder.size_0);
rowsToMove < this$static.visualRowOrder.size_0?(logicalRowIndex = $getLogicalRowIndex_0(this$static, castToJso($getLast(this$static.visualRowOrder))) + 1):(logicalRowIndex = (rowPx = scrollTop - $getSpacerHeightsSumUntilPx(this$static.spacerContainer, scrollTop) , round_int(rowPx / this$static.defaultRowHeight)));
targetVisualIndex = this$static.visualRowOrder.size_0;
aRowWasLeftBehind = false;
if (logicalRowIndex + rowsToMove > this$static.rows_0) {
--rowsToMove;
aRowWasLeftBehind = true;
}
rowsToMove = max_2(0, min_1(rowsToMove, this$static.rows_0 - logicalRowIndex));
$moveAndUpdateEscalatorRows(this$static, new Range_0(0, rowsToMove), targetVisualIndex, logicalRowIndex);
if (aRowWasLeftBehind) {
strayRow = new Range_0(0, 1);
topLogicalIndex = this$static.rows_0 - this$static.visualRowOrder.size_0;
$moveAndUpdateEscalatorRows(this$static, strayRow, 0, topLogicalIndex);
}
naiveNewLogicalIndex = this$static.topRowLogicalIndex + originalRowsToMove;
maxLogicalIndex = this$static.rows_0 - this$static.visualRowOrder.size_0;
loggingIsEnabled() && new Logger;
this$static.topRowLogicalIndex = naiveNewLogicalIndex < maxLogicalIndex?naiveNewLogicalIndex:maxLogicalIndex;
rowsWereMoved = true;
}
if (rowsWereMoved) {
$fireRowVisibilityChangeEvent(this$static.this$01);
$reschedule(this$static.domSorter);
}
}
function $updateTopRowLogicalIndex(this$static, diff){
$setTopRowLogicalIndex(this$static, this$static.topRowLogicalIndex + diff);
}
function $verifyEscalatorCount(this$static){
var addedRows, contentWillFit, firstRowMinTop, firstRowTop, i_0, index_0, iter, last, maxEscalatorRowCapacity, maxEscalatorRows, neededEscalatorRows, neededEscalatorRowsDiff, newLogicalIndex, nextLastLogicalIndex, oldScrollTop, parent_0;
if (!this$static.this$01.attached) {
return;
}
maxEscalatorRows = (maxEscalatorRowCapacity = round_int(ceil_0($getHeightOfSection(this$static) / this$static.defaultRowHeight)) + 1 , 0 > maxEscalatorRowCapacity?0:maxEscalatorRowCapacity);
neededEscalatorRows = min_1(maxEscalatorRows, this$static.this$01.body_0.rows_0);
neededEscalatorRowsDiff = neededEscalatorRows - this$static.visualRowOrder.size_0;
if (neededEscalatorRowsDiff > 0) {
index_0 = this$static.visualRowOrder.size_0;
this$static.visualRowOrder.size_0 == 0?(nextLastLogicalIndex = 0):(nextLastLogicalIndex = $getLogicalRowIndex_0(this$static, castToJso($getLast(this$static.visualRowOrder))) + 1);
contentWillFit = nextLastLogicalIndex < this$static.rows_0 - neededEscalatorRowsDiff;
if (contentWillFit) {
addedRows = $fillAndPopulateEscalatorRowsIfNeeded(this$static, index_0, neededEscalatorRowsDiff);
$moveAndUpdateEscalatorRows(this$static, withLength(index_0, addedRows.size_2()), index_0, nextLastLogicalIndex);
}
else {
oldScrollTop = this$static.this$01.verticalScrollbar.scrollPos;
$setScrollTop_0(this$static.this$01, 0);
$onScroll(this$static.this$01.scroller);
$fillAndPopulateEscalatorRowsIfNeeded(this$static, index_0, neededEscalatorRowsDiff);
$setScrollTop_0(this$static.this$01, oldScrollTop);
$onScroll(this$static.this$01.scroller);
}
}
else if (neededEscalatorRowsDiff < 0) {
iter = $listIterator(this$static.visualRowOrder, this$static.visualRowOrder.size_0);
for (i_0 = 0; i_0 < -neededEscalatorRowsDiff; i_0++) {
last = castToJso($previous(iter));
parent_0 = $getParentElement_0(($clinit_DOMImpl() , last));
!!parent_0 && parent_0.removeChild(last);
$remove_19(iter);
}
if (this$static.visualRowOrder.size_0 != 0) {
firstRowTop = $getRowTop(this$static, castToJso($getFirst(this$static.visualRowOrder)));
firstRowMinTop = this$static.this$01.tBodyScrollTop - this$static.defaultRowHeight;
if (firstRowTop < firstRowMinTop) {
newLogicalIndex = $getLogicalRowIndex_0(this$static, castToJso($getLast(this$static.visualRowOrder))) + 1;
$moveAndUpdateEscalatorRows(this$static, new Range_0(0, 1), this$static.visualRowOrder.size_0, newLogicalIndex);
}
}
}
neededEscalatorRowsDiff != 0 && $fireRowVisibilityChangeEvent(this$static.this$01);
}
function Escalator$BodyRowContainerImpl(this$0, bodyElement){
this.this$01 = this$0;
Escalator$AbstractRowContainer.call(this, this$0, bodyElement);
this.visualRowOrder = new LinkedList;
this.domSorter = new Escalator$BodyRowContainerImpl$DeferredDomSorter(this);
this.spacerContainer = new Escalator$SpacerContainer(this.this$01);
}
defineClass(467, 218, {}, Escalator$BodyRowContainerImpl);
_.getCell = function(element){
var cell, internalIndex, rowElement;
cell = $getCell(this, element);
if (!cell) {
return null;
}
rowElement = $getParentElement(cell.element);
return new Cell((internalIndex = $indexOf_1(this.visualRowOrder, rowElement) , this.topRowLogicalIndex + internalIndex), cell.column_0, cell.element);
}
;
_.getCellElementTagName = function(){
return 'td';
}
;
_.getDomRowCount = function(){
return $getDomRowCount(this);
}
;
_.getLogicalRowIndex = function(tr){
return $getLogicalRowIndex_0(this, tr);
}
;
_.getRowElement = function(index_0){
return $getRowElement(this, index_0);
}
;
_.getTrByVisualIndex = function(index_0){
return $getTrByVisualIndex_0(this, index_0);
}
;
_.paintInsertRows = function(index_0, numberOfRows){
var addedRows, addedRowsAboveCurrentViewport, addedRowsBelowCurrentViewport, e, end, i_0, logicalRowIndexCursor, rowTop, rowsStillNeeded, start_0, tr, unupdatedLogicalStart, unupdatedVisual, visualOffset, visualTargetIndex, yDelta;
if (numberOfRows == 0) {
return;
}
$shiftSpacersByRows(this.spacerContainer, index_0, numberOfRows);
addedRows = $fillAndPopulateEscalatorRowsIfNeeded(this, index_0, numberOfRows);
$recalculateScrollbarsForVirtualViewport(this.this$01.scroller);
addedRowsAboveCurrentViewport = index_0 * this.defaultRowHeight < this.this$01.verticalScrollbar.scrollPos;
addedRowsBelowCurrentViewport = index_0 * this.defaultRowHeight > this.this$01.verticalScrollbar.scrollPos + $getHeightOfSection(this);
if (addedRowsAboveCurrentViewport) {
yDelta = numberOfRows * this.defaultRowHeight;
$moveViewportAndContent(this, yDelta);
$setTopRowLogicalIndex(this, this.topRowLogicalIndex + numberOfRows);
}
else if (addedRowsBelowCurrentViewport)
;
else {
unupdatedLogicalStart = index_0 + addedRows.size_2();
visualOffset = $getLogicalRowIndex_0(this, castToJso($getFirst(this.visualRowOrder)));
rowsStillNeeded = numberOfRows - addedRows.size_2();
if (rowsStillNeeded > 0) {
unupdatedVisual = $convertToVisual(this, withLength(unupdatedLogicalStart, rowsStillNeeded));
end = this.root.childNodes.length - ($clinit_Collections() , (new Collections$UnmodifiableCollection(new AbstractMap$2(this.spacerContainer.rowIndexToSpacer))).coll.size_2());
start_0 = end - (unupdatedVisual.end - unupdatedVisual.start_0);
visualTargetIndex = unupdatedLogicalStart - visualOffset;
$moveAndUpdateEscalatorRows(this, new Range_0(start_0, end), visualTargetIndex, unupdatedLogicalStart);
rowTop = (unupdatedLogicalStart + (end - start_0)) * this.defaultRowHeight;
try {
i_0 = $listIterator(this.visualRowOrder, visualTargetIndex + (end - start_0));
logicalRowIndexCursor = unupdatedLogicalStart;
while (i_0.currentNode != i_0.this$01.tail) {
rowTop += $getSpacerHeight(this.spacerContainer, logicalRowIndexCursor++);
tr = castToJso($next_4(i_0));
$set_6(this.this$01_1.positions, tr, 0, rowTop);
rowTop += this.defaultRowHeight;
}
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 16)) {
e = $e0;
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Escalator_2_classLit);
new Logger;
$getName(e.___clazz);
e.getMessage();
}
else
throw unwrap($e0);
}
}
$fireRowVisibilityChangeEvent(this.this$01);
$sortDomElements(this);
}
}
;
_.paintRemoveRows = function(index_0, numberOfRows){
var allEscalatorRows, contentBottom, dirtyRowsStart, escalatorRowCount, escalatorRowsToRemove, firstLogicalRowHeight, firstVisualRowIsRemoved, i_0, i0, i1, left, logicalTargetIndex, newScrollTop, newTop, partitions, removalScrollsToShowFirstLogicalRow, removedAbove, removedLogicalInside, removedRowsRange, removedVisualInside, rowsLeft, rowsScrolled, rowsToUpdateDataOn, start_0, top_0, tr, viewportBottom, viewportRange, visualRefreshRange, y_0, yDelta;
if (numberOfRows == 0) {
return;
}
viewportRange = $getVisibleRowRange(this.this$01);
removedRowsRange = withLength(index_0, numberOfRows);
$paintRemoveSpacers(this.spacerContainer, removedRowsRange);
partitions = $partitionWith(removedRowsRange, viewportRange);
removedAbove = partitions[0];
removedLogicalInside = partitions[1];
removedVisualInside = $convertToVisual(this, removedLogicalInside);
firstVisualRowIsRemoved = removedVisualInside.start_0 < removedVisualInside.end && removedVisualInside.start_0 == 0;
if (removedAbove.start_0 < removedAbove.end || firstVisualRowIsRemoved) {
yDelta = (removedAbove.end - removedAbove.start_0) * this.defaultRowHeight;
firstLogicalRowHeight = this.defaultRowHeight;
removalScrollsToShowFirstLogicalRow = this.this$01.verticalScrollbar.scrollPos - yDelta < firstLogicalRowHeight;
removedVisualInside.start_0 >= removedVisualInside.end && (!removalScrollsToShowFirstLogicalRow || !firstVisualRowIsRemoved)?$moveViewportAndContent(this, -yDelta):removalScrollsToShowFirstLogicalRow && $moveViewportAndContent(this, -this.this$01.verticalScrollbar.scrollPos);
}
if (removedVisualInside.start_0 < removedVisualInside.end) {
escalatorRowCount = $getDomRowCount(this.this$01.body_0);
rowsLeft = this.rows_0;
if (rowsLeft < escalatorRowCount) {
escalatorRowsToRemove = escalatorRowCount - rowsLeft;
for (i0 = 0; i0 < escalatorRowsToRemove; i0++) {
tr = castToJso($remove_8(this.visualRowOrder, removedVisualInside.start_0));
$paintRemoveRow(this, tr, index_0);
$remove_4(this.this$01_1.positions, tr);
}
escalatorRowCount -= escalatorRowsToRemove;
$setBodyScrollPosition(this.this$01.body_0, this.this$01.tBodyScrollLeft, 0);
dirtyRowsStart = removedLogicalInside.start_0;
y_0 = (top_0 = $getSpacerHeightsSumUntilIndex(this.spacerContainer, dirtyRowsStart) , top_0 + dirtyRowsStart * this.defaultRowHeight);
for (i1 = dirtyRowsStart; i1 < escalatorRowCount; i1++) {
tr = castToJso($get_7(this.visualRowOrder, i1));
$set_6(this.this$01_1.positions, tr, 0, y_0);
y_0 += this.defaultRowHeight;
y_0 += $getSpacerHeight(this.spacerContainer, i1);
}
rowsToUpdateDataOn = numberOfRows - escalatorRowsToRemove;
start_0 = 0 > escalatorRowCount - rowsToUpdateDataOn?0:escalatorRowCount - rowsToUpdateDataOn;
for (i_0 = start_0; i_0 < escalatorRowCount; i_0++) {
tr = castToJso($get_7(this.visualRowOrder, i_0));
$refreshRow(this, tr, i_0, withLength(0, this.this$01_1.columnConfiguration.columns.array.length));
}
}
else {
contentBottom = this.rows_0 * this.defaultRowHeight;
viewportBottom = this.this$01.tBodyScrollTop + $getHeightOfSection(this);
if (viewportBottom <= contentBottom) {
$paintRemoveRowsAtMiddle(this, removedLogicalInside, removedVisualInside);
}
else if (removedVisualInside.start_0 <= 0 && 0 < removedVisualInside.end && numberOfRows >= this.visualRowOrder.size_0) {
left = this.this$01.horizontalScrollbar.scrollPos;
top_0 = contentBottom - this.visualRowOrder.size_0 * this.defaultRowHeight;
$setBodyScrollPosition(this, left, top_0);
allEscalatorRows = withLength(0, this.visualRowOrder.size_0);
logicalTargetIndex = this.rows_0 - (allEscalatorRows.end - allEscalatorRows.start_0);
$moveAndUpdateEscalatorRows(this, allEscalatorRows, 0, logicalTargetIndex);
}
else if (contentBottom + numberOfRows * this.defaultRowHeight - viewportBottom < this.defaultRowHeight) {
$paintRemoveRowsAtBottom(this, removedLogicalInside, removedVisualInside);
$updateTopRowLogicalIndex(this, -(removedLogicalInside.end - removedLogicalInside.start_0));
}
else {
newTop = $getRowTop(this, castToJso($get_7(this.visualRowOrder, removedVisualInside.start_0)));
for (i0 = 0; i0 < removedVisualInside.end - removedVisualInside.start_0; i0++) {
tr = castToJso($remove_8(this.visualRowOrder, removedVisualInside.start_0));
$addLast(this.visualRowOrder, tr);
}
for (i_0 = removedVisualInside.start_0; i_0 < escalatorRowCount; i_0++) {
tr = castToJso($get_7(this.visualRowOrder, i_0));
$setRowPosition(this, tr, round_int(newTop));
newTop += this.defaultRowHeight;
newTop += $getSpacerHeight(this.spacerContainer, i_0 + removedLogicalInside.start_0);
}
newScrollTop = contentBottom - $getHeightOfSection(this);
$setScrollTop_0(this.this$01, newScrollTop);
$onScroll(this.this$01.scroller);
$moveAndUpdateEscalatorRows(this, new Range_0(escalatorRowCount - 1, escalatorRowCount - 1 + 1), 0, $getLogicalRowIndex_0(this, castToJso($getFirst(this.visualRowOrder))) - 1);
$setTopRowLogicalIndex(this, this.topRowLogicalIndex + -1);
rowsScrolled = round_int(ceil_0((viewportBottom - contentBottom) / this.defaultRowHeight));
start_0 = escalatorRowCount - (removedVisualInside.end - removedVisualInside.start_0 - rowsScrolled);
visualRefreshRange = new Range_0(start_0, escalatorRowCount);
logicalTargetIndex = $getLogicalRowIndex_0(this, castToJso($getFirst(this.visualRowOrder))) + start_0;
$moveAndUpdateEscalatorRows(this, visualRefreshRange, start_0, logicalTargetIndex);
}
}
$fireRowVisibilityChangeEvent(this.this$01);
$sortDomElements(this);
}
$updateTopRowLogicalIndex(this, -(removedAbove.end - removedAbove.start_0));
$recalculateScrollbarsForVirtualViewport(this.this$01.scroller);
}
;
_.reapplyDefaultRowHeights = function(){
var i_0, logicalIndex, logicalLogical, scrollRatio, tr;
if (this.visualRowOrder.size_0 == 0) {
return;
}
for (i_0 = 0; i_0 < this.visualRowOrder.size_0; i_0++) {
tr = castToJso($get_7(this.visualRowOrder, i_0));
$reapplyRowHeight(tr, this.defaultRowHeight);
logicalIndex = this.topRowLogicalIndex + i_0;
$setRowPosition(this, tr, logicalIndex * this.defaultRowHeight);
}
scrollRatio = this.this$01.verticalScrollbar.scrollPos / parseCssDimensionToPixels($getHeight(this.this$01.verticalScrollbar.scrollSizeElement.style));
$recalculateScrollbarsForVirtualViewport(this.this$01.scroller);
$setScrollPos(this.this$01.verticalScrollbar, round_int(this.defaultRowHeight * this.rows_0 * scrollRatio));
$setBodyScrollPosition(this, this.this$01.horizontalScrollbar.scrollPos, this.this$01.verticalScrollbar.scrollPos);
$onScroll(this.this$01.scroller);
$verifyEscalatorCount(this);
logicalLogical = round_int($getRowTop(this, castToJso($getFirst(this.visualRowOrder))) / this.defaultRowHeight);
loggingIsEnabled() && new Logger;
this.topRowLogicalIndex = logicalLogical;
}
;
_.recalculateSectionHeight = function(){
}
;
_.refreshCells = function(logicalRowRange, colRange){
var firstLogicalRowIndex, rowNumber, visualRange;
visualRange = $convertToVisual(this, logicalRowRange);
if (visualRange.start_0 < visualRange.end) {
firstLogicalRowIndex = $getLogicalRowIndex_0(this, castToJso($getFirst(this.visualRowOrder)));
for (rowNumber = visualRange.start_0; rowNumber < visualRange.end; rowNumber++) {
$refreshRow(this, castToJso($get_7(this.visualRowOrder, rowNumber)), firstLogicalRowIndex + rowNumber, colRange);
}
}
}
;
_.rowCanBeFrozen = function(tr){
return $advanceToFind(this.visualRowOrder, tr, false);
}
;
_.topRowLogicalIndex = 0;
var Lcom_vaadin_client_widgets_Escalator$BodyRowContainerImpl_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/BodyRowContainerImpl', 467);
function $reschedule(this$static){
this$static.waiting = true;
$resetConditions(this$static);
this$static.animationHandle = (!instance && (instance = $isNativelySupported()?new AnimationSchedulerImplStandard:new AnimationSchedulerImplTimer) , instance).requestAnimationFrame_0(this$static.frameCounter, null);
}
function $resetConditions(this$static){
if (this$static.animationHandle) {
this$static.animationHandle.cancel_0();
this$static.animationHandle = null;
}
this$static.startTime = now_1();
this$static.framesPassed = 0;
}
function $sortIfConditionsMet(this$static){
var conditionsMet, enoughFramesHavePassed, enoughTimeHasPassed, notTouchActivity;
enoughFramesHavePassed = this$static.framesPassed >= 3;
enoughTimeHasPassed = now_1() - this$static.startTime >= 50;
notTouchActivity = !this$static.this$11.this$01.scroller.touchHandlerBundle.touching;
conditionsMet = enoughFramesHavePassed && enoughTimeHasPassed && notTouchActivity;
if (conditionsMet) {
$resetConditions(this$static);
$sortDomElements(this$static.this$11);
}
return conditionsMet;
}
function Escalator$BodyRowContainerImpl$DeferredDomSorter(this$1){
this.this$11 = this$1;
this.frameCounter = new Escalator$BodyRowContainerImpl$DeferredDomSorter$1(this);
}
defineClass(468, 1, {}, Escalator$BodyRowContainerImpl$DeferredDomSorter);
_.framesPassed = 0;
_.startTime = 0;
_.waiting = false;
var Lcom_vaadin_client_widgets_Escalator$BodyRowContainerImpl$DeferredDomSorter_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/BodyRowContainerImpl/DeferredDomSorter', 468);
function Escalator$BodyRowContainerImpl$DeferredDomSorter$1(this$2){
this.this$21 = this$2;
}
defineClass(474, 1, {}, Escalator$BodyRowContainerImpl$DeferredDomSorter$1);
_.execute = function(timestamp){
var domWasSorted;
++this.this$21.framesPassed;
domWasSorted = $sortIfConditionsMet(this.this$21);
if (domWasSorted) {
this.this$21.waiting = false;
$removeClassName(this.this$21.this$11.this$01.bodyElem, 'scrolling');
}
else {
this.this$21.animationHandle = (!instance && (instance = $isNativelySupported()?new AnimationSchedulerImplStandard:new AnimationSchedulerImplTimer) , instance).requestAnimationFrame_0(this, null);
}
}
;
var Lcom_vaadin_client_widgets_Escalator$BodyRowContainerImpl$DeferredDomSorter$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/BodyRowContainerImpl/DeferredDomSorter/1', 474);
function $assertArgumentsAreValidAndWithinRange_0(this$static, index_0, numberOfColumns){
if (numberOfColumns < 1) {
throw new IllegalArgumentException("Number of columns can't be less than 1 (was " + numberOfColumns + ')');
}
if (index_0 < 0 || index_0 + numberOfColumns > this$static.columns.array.length) {
throw new IndexOutOfBoundsException_0('The given column range (' + index_0 + '..' + (index_0 + numberOfColumns) + ') was outside of the current ' + 'number of columns (' + this$static.columns.array.length + ')');
}
}
function $calculateRowWidth(this$static){
return $getCalculatedColumnsWidth(this$static, new Range_0(0, this$static.columns.array.length));
}
function $checkValidColumnIndex(this$static, index_0){
if (!$contains(withLength(0, this$static.columns.array.length), index_0)) {
throw new IllegalArgumentException('The given column index (' + index_0 + ') does not exist');
}
}
function $getCalculatedColumnWidths(this$static){
var i_0;
if (this$static.widthsArray == null || this$static.widthsArray.length != this$static.columns.array.length) {
this$static.widthsArray = initUnidimensionalArray(D_classLit, {3:1}, 728, this$static.columns.array.length, 12, 1);
for (i_0 = 0; i_0 < this$static.columns.array.length; i_0++) {
this$static.widthsArray[i_0] = $getCalculatedWidth(castTo($get_8(this$static.columns, i_0), 81));
}
}
return this$static.widthsArray;
}
function $getCalculatedColumnsWidth(this$static, columns){
var columnWidthActual, i_0, sum;
sum = 0;
for (i_0 = columns.start_0; i_0 < columns.end; i_0++) {
columnWidthActual = $getCalculatedWidth(castTo($get_8(this$static.columns, i_0), 81));
sum += columnWidthActual;
}
return sum;
}
function $getColumnWidth_0(this$static, index_0){
$checkValidColumnIndex(this$static, index_0);
return castTo($get_8(this$static.columns, index_0), 81).definedWidth;
}
function $getColumnWidthActual(this$static, index_0){
return $getCalculatedWidth(castTo($get_8(this$static.columns, index_0), 81));
}
function $getMaxCellWidth_0(this$static, colIndex){
var bodyWidth, footerWidth, headerWidth, maxWidth;
headerWidth = $getMaxCellWidth(this$static.this$01.header, colIndex);
bodyWidth = $getMaxCellWidth(this$static.this$01.body_0, colIndex);
footerWidth = $getMaxCellWidth(this$static.this$01.footer, colIndex);
maxWidth = headerWidth > (bodyWidth > footerWidth?bodyWidth:footerWidth)?headerWidth:bodyWidth > footerWidth?bodyWidth:footerWidth;
return maxWidth;
}
function $insertColumns(this$static, index_0, numberOfColumns){
var col, colWidths, columnsWereAddedToTheLeftOfViewport, frozen, i_0, i0, insertedColumnsWidth, pixelsToInsertedColumn, scrollbarIsNowNeeded, scrollbarWasNeeded, width_0;
if (index_0 < 0 || index_0 > this$static.columns.array.length) {
throw new IndexOutOfBoundsException_0('The given index(' + index_0 + ') was outside of the current number of columns (0..' + this$static.columns.array.length + ')');
}
if (numberOfColumns < 1) {
throw new IllegalArgumentException('Number of columns must be 1 or greater (was ' + numberOfColumns);
}
$addCells(this$static.this$01.flyweightRow, index_0, numberOfColumns);
for (i0 = 0; i0 < numberOfColumns; i0++) {
$add_6(this$static.columns, index_0, new Escalator$ColumnConfigurationImpl$Column(this$static));
}
frozen = index_0 < this$static.frozenColumns;
frozen && (this$static.frozenColumns += numberOfColumns);
scrollbarWasNeeded = parseCssDimensionToPixels($getWidth(this$static.this$01.horizontalScrollbar.root.style)) < parseCssDimensionToPixels($getWidth(this$static.this$01.horizontalScrollbar.scrollSizeElement.style));
$recalculateScrollbarsForVirtualViewport(this$static.this$01.scroller);
scrollbarIsNowNeeded = parseCssDimensionToPixels($getWidth(this$static.this$01.horizontalScrollbar.root.style)) < parseCssDimensionToPixels($getWidth(this$static.this$01.horizontalScrollbar.scrollSizeElement.style));
!scrollbarWasNeeded && scrollbarIsNowNeeded && $verifyEscalatorCount(this$static.this$01.body_0);
$paintInsertColumns(this$static.this$01.header, index_0, numberOfColumns, frozen);
$paintInsertColumns(this$static.this$01.body_0, index_0, numberOfColumns, frozen);
$paintInsertColumns(this$static.this$01.footer, index_0, numberOfColumns, frozen);
if (this$static.this$01.header.rows_0 > 0 || this$static.this$01.body_0.rows_0 > 0 || this$static.this$01.footer.rows_0 > 0) {
colWidths = new HashMap;
width_0 = 100;
for (i_0 = index_0; i_0 < index_0 + numberOfColumns; i_0++) {
col = valueOf_2(i_0);
$put_3(colWidths.hashCodeMap, col, width_0);
}
$setColumnWidths(this$static.this$01.columnConfiguration, colWidths);
}
pixelsToInsertedColumn = $getCalculatedColumnsWidth(this$static.this$01.columnConfiguration, withLength(0, index_0));
columnsWereAddedToTheLeftOfViewport = this$static.this$01.scroller.lastScrollLeft > pixelsToInsertedColumn;
if (columnsWereAddedToTheLeftOfViewport) {
insertedColumnsWidth = $getCalculatedColumnsWidth(this$static.this$01.columnConfiguration, withLength(index_0, numberOfColumns));
$setScrollPos(this$static.this$01.horizontalScrollbar, this$static.this$01.scroller.lastScrollLeft + insertedColumnsWidth);
}
}
function $reapplyRowWidths_0(container){
container.rows_0 > 0 && $reapplyRowWidths(container);
}
function $removeColumns(this$static, index_0, numberOfColumns){
$assertArgumentsAreValidAndWithinRange_0(this$static, index_0, numberOfColumns);
$removeColumnsAdjustScrollbar(this$static, index_0, numberOfColumns);
$paintRemoveColumns(this$static.this$01.header, index_0, numberOfColumns);
$paintRemoveColumns(this$static.this$01.body_0, index_0, numberOfColumns);
$paintRemoveColumns(this$static.this$01.footer, index_0, numberOfColumns);
$removeCells(this$static.this$01.flyweightRow, index_0, numberOfColumns);
$clear_1(new AbstractList$SubList(this$static.columns, index_0, index_0 + numberOfColumns));
index_0 < this$static.frozenColumns && (index_0 + numberOfColumns < this$static.frozenColumns?(this$static.frozenColumns -= numberOfColumns):(this$static.frozenColumns = index_0));
$recalculateScrollbarsForVirtualViewport(this$static.this$01.scroller);
$verifyEscalatorCount(this$static.this$01.body_0);
if (this$static.this$01.columnConfiguration.columns.array.length > 0) {
$reapplyRowWidths_0(this$static.this$01.header);
$reapplyRowWidths_0(this$static.this$01.body_0);
$reapplyRowWidths_0(this$static.this$01.footer);
}
}
function $removeColumnsAdjustScrollbar(this$static, index_0, numberOfColumns){
var adjustedScrollLeft, leftPosOfFirstColumnToRemove, scrollLeft, widthOfColumnsToRemove;
if (parseCssDimensionToPixels($getWidth(this$static.this$01.horizontalScrollbar.root.style)) >= parseCssDimensionToPixels($getWidth(this$static.this$01.horizontalScrollbar.scrollSizeElement.style))) {
return;
}
leftPosOfFirstColumnToRemove = $getCalculatedColumnsWidth(this$static, new Range_0(0, index_0));
widthOfColumnsToRemove = $getCalculatedColumnsWidth(this$static, withLength(index_0, numberOfColumns));
scrollLeft = this$static.this$01.horizontalScrollbar.scrollPos;
if (scrollLeft <= leftPosOfFirstColumnToRemove) {
return;
}
adjustedScrollLeft = leftPosOfFirstColumnToRemove > scrollLeft - widthOfColumnsToRemove?leftPosOfFirstColumnToRemove:scrollLeft - widthOfColumnsToRemove;
$setScrollPos(this$static.this$01.horizontalScrollbar, adjustedScrollLeft);
}
function $setColumnWidth(this$static, index_0, px){
$setColumnWidths(this$static, singletonMap(valueOf_2(index_0), px));
}
function $setColumnWidths(this$static, indexWidthMap){
var entry, entry$iterator, index_0, width_0;
if (indexWidthMap.isEmpty()) {
return;
}
for (entry$iterator = indexWidthMap.entrySet_0().iterator(); entry$iterator.hasNext_0();) {
entry = castTo(entry$iterator.next_1(), 9);
index_0 = castTo(entry.getKey(), 22).value_0;
width_0 = checkNotNull(castToDouble(entry.getValue_0()));
$checkValidColumnIndex(this$static, index_0);
width_0 = ($clinit_WidgetUtil() , roundSize(width_0));
$setWidth_0(castTo($get_8(this$static.columns, index_0), 81), width_0);
}
this$static.widthsArray = null;
$reapplyColumnWidths(this$static.this$01.header);
$reapplyColumnWidths(this$static.this$01.body_0);
$reapplyColumnWidths(this$static.this$01.footer);
$recalculateElementSizes(this$static.this$01);
}
function $setFrozenColumnCount(this$static, count){
var col, firstAffectedCol, firstUnaffectedCol, frozen, oldCount;
if (count < 0 || count > this$static.columns.array.length) {
throw new IllegalArgumentException('count must be between 0 and the current number of columns (' + this$static.columns.array.length + ')');
}
oldCount = this$static.frozenColumns;
if (count == oldCount) {
return;
}
this$static.frozenColumns = count;
if ($hasSomethingInDom(this$static.this$01)) {
frozen = count > oldCount;
if (frozen) {
firstAffectedCol = oldCount;
firstUnaffectedCol = count;
}
else {
firstAffectedCol = count;
firstUnaffectedCol = oldCount;
}
if (oldCount > 0) {
$toggleFrozenColumnClass(this$static.this$01.header, oldCount - 1, false, 'last-frozen');
$toggleFrozenColumnClass(this$static.this$01.body_0, oldCount - 1, false, 'last-frozen');
$toggleFrozenColumnClass(this$static.this$01.footer, oldCount - 1, false, 'last-frozen');
}
if (count > 0) {
$toggleFrozenColumnClass(this$static.this$01.header, count - 1, true, 'last-frozen');
$toggleFrozenColumnClass(this$static.this$01.body_0, count - 1, true, 'last-frozen');
$toggleFrozenColumnClass(this$static.this$01.footer, count - 1, true, 'last-frozen');
}
for (col = firstAffectedCol; col < firstUnaffectedCol; col++) {
$setColumnFrozen(this$static.this$01.header, col, frozen);
$setColumnFrozen(this$static.this$01.body_0, col, frozen);
$setColumnFrozen(this$static.this$01.footer, col, frozen);
}
}
$recalculateScrollbarsForVirtualViewport(this$static.this$01.scroller);
}
function Escalator$ColumnConfigurationImpl(this$0){
this.this$01 = this$0;
this.columns = new ArrayList;
}
defineClass(469, 1, {}, Escalator$ColumnConfigurationImpl);
_.frozenColumns = 0;
_.widthsArray = null;
var Lcom_vaadin_client_widgets_Escalator$ColumnConfigurationImpl_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/ColumnConfigurationImpl', 469);
function $getCalculatedWidth(this$static){
return this$static.measuringRequested?-1:this$static.calculatedWidth;
}
function $measureAndSetWidthIfNeeded(this$static){
if (this$static.measuringRequested) {
this$static.measuringRequested = false;
$setWidth_0(this$static, this$static.definedWidth);
return true;
}
return false;
}
function $setWidth_0(this$static, px){
this$static.definedWidth = px;
px < 0?this$static.this$11.this$01.attached?(this$static.calculatedWidth = $getMaxCellWidth_0(this$static.this$11, $indexOf_2(this$static.this$11.columns, this$static, 0))):(this$static.measuringRequested = true):(this$static.calculatedWidth = px);
}
function Escalator$ColumnConfigurationImpl$Column(this$1){
this.this$11 = this$1;
}
defineClass(81, 1, {81:1}, Escalator$ColumnConfigurationImpl$Column);
_.calculatedWidth = 100;
_.definedWidth = -1;
_.measuringRequested = false;
var Lcom_vaadin_client_widgets_Escalator$ColumnConfigurationImpl$Column_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/ColumnConfigurationImpl/Column', 81);
function $getLeft(this$static, e){
var left;
left = castToDouble($get_5(this$static.elementLeftPositionMap, e));
if (left == null) {
throw new IllegalArgumentException('Element ' + e + ' was not found in the position bookkeeping');
}
return checkCriticalNotNull(left) , left;
}
function $getTop(this$static, e){
var top_0;
top_0 = castToDouble($get_5(this$static.elementTopPositionMap, e));
if (top_0 == null) {
throw new IllegalArgumentException('Element ' + e + ' was not found in the position bookkeeping');
}
return checkCriticalNotNull(top_0) , top_0;
}
function $remove_4(this$static, e){
$remove_6(this$static.elementTopPositionMap, e);
$remove_6(this$static.elementLeftPositionMap, e);
}
function $set_6(this$static, e, x_0, y_0){
this$static.this$01.position_0.set_0(e, x_0, y_0);
$put_2(this$static.elementTopPositionMap, e, y_0);
$put_2(this$static.elementLeftPositionMap, e, x_0);
}
function Escalator$ElementPositionBookkeeper(this$0){
this.this$01 = this$0;
this.elementTopPositionMap = new HashMap;
this.elementLeftPositionMap = new HashMap;
}
defineClass(471, 1, {}, Escalator$ElementPositionBookkeeper);
var Lcom_vaadin_client_widgets_Escalator$ElementPositionBookkeeper_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/ElementPositionBookkeeper', 471);
function $setStylePrimaryName_5(this$static, primaryStyleName){
$setStylePrimaryName_3(this$static, primaryStyleName);
setStylePrimaryName(this$static.root, primaryStyleName + '-footer');
}
function Escalator$FooterRowContainer(this$0, footElement){
this.this$01 = this$0;
Escalator$AbstractStaticRowContainer.call(this, this$0, footElement);
}
defineClass(466, 219, {}, Escalator$FooterRowContainer);
_.getCellElementTagName = function(){
return 'td';
}
;
_.sectionHeightCalculated = function(){
var footerHeight, headerHeight, horizontalScrollbarNeeded, vscrollHeight;
headerHeight = max_1(0, this.this$01.header.heightOfSection);
footerHeight = max_1(0, this.this$01.footer.heightOfSection);
vscrollHeight = round_int(floor_0(this.this$01.heightOfEscalator - headerHeight - footerHeight));
horizontalScrollbarNeeded = $calculateRowWidth(this.this$01.columnConfiguration) > this.this$01.widthOfEscalator;
horizontalScrollbarNeeded && (vscrollHeight = round_int(vscrollHeight - $getScrollbarThickness(this.this$01.horizontalScrollbar)));
this.this$01.footerDeco.style['height'] = max_1(0, this.this$01.footer.heightOfSection) + ($clinit_Style$Unit() , 'px');
$setOffsetSize(this.this$01.verticalScrollbar, vscrollHeight);
}
;
var Lcom_vaadin_client_widgets_Escalator$FooterRowContainer_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/FooterRowContainer', 466);
function $setStylePrimaryName_6(this$static, primaryStyleName){
$setStylePrimaryName_3(this$static, primaryStyleName);
setStylePrimaryName(this$static.root, primaryStyleName + '-header');
}
function Escalator$HeaderRowContainer(this$0, headElement){
this.this$01 = this$0;
Escalator$AbstractStaticRowContainer.call(this, this$0, headElement);
}
defineClass(465, 219, {}, Escalator$HeaderRowContainer);
_.getCellElementTagName = function(){
return 'th';
}
;
_.sectionHeightCalculated = function(){
var heightOfSection;
heightOfSection = max_1(0, this.heightOfSection);
this.this$01.bodyElem.style['marginTop'] = heightOfSection + ($clinit_Style$Unit() , 'px');
this.this$01.spacerDecoContainer.style['marginTop'] = heightOfSection + 'px';
this.this$01.verticalScrollbar.root.style['top'] = heightOfSection + 'px';
this.this$01.headerDeco.style['height'] = heightOfSection + 'px';
}
;
var Lcom_vaadin_client_widgets_Escalator$HeaderRowContainer_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/HeaderRowContainer', 465);
function eventOnBody(escalator, event_0){
var e;
e = ($clinit_DOMImpl() , impl_0).eventGetTarget(event_0);
return !!e && equalsIgnoreCase('table', e.tagName) || $isOrHasChild(escalator.bodyElem, e);
}
function moveScrollFromEvent(escalator, deltaX, deltaY, event_0){
var e, movex, movey, warrantedXScroll, warrantedYScroll;
e = ($clinit_DOMImpl() , impl_0).eventGetTarget(event_0);
if (!(!!e && equalsIgnoreCase('table', e.tagName) || $isOrHasChild(escalator.bodyElem, e))) {
return;
}
movex = !isNaN(deltaX);
movey = !isNaN(deltaY);
if (movex || movey) {
$addClassName(escalator.bodyElem, 'scrolling');
movex && $setScrollPosByDelta(escalator.horizontalScrollbar, deltaX);
movey && $setScrollPosByDelta(escalator.verticalScrollbar, deltaY);
$reschedule(escalator.body_0.domSorter);
warrantedYScroll = deltaY != 0 && $showsScrollHandle(escalator.verticalScrollbar);
warrantedXScroll = deltaX != 0 && $showsScrollHandle(escalator.horizontalScrollbar);
(warrantedYScroll || warrantedXScroll) && impl_0.eventPreventDefault(event_0);
}
}
function $clinit_Escalator$JsniUtil$TouchHandlerBundle(){
$clinit_Escalator$JsniUtil$TouchHandlerBundle = emptyMethod;
DURATION = ($clinit_Window() , $getViewportElement($doc).clientHeight | 0);
}
function $easingInOutCos(val){
return 0.5 - 0.5 * Math.cos(3.141592653589793 * (val > 0?1:val < 0?-1:0) * ((val <= 0?0 - val:val) < 4?val <= 0?0 - val:val:4) / 4);
}
function $getTouchEndHandler(this$static){
var self_0 = this$static;
return $entry(function(e){
self_0.touchEnd(e);
}
);
}
function $getTouchMoveHandler(this$static){
var self_0 = this$static;
return $entry(function(e){
self_0.touchMove(e);
}
);
}
function $getTouchStartHandler(this$static){
var self_0 = this$static;
return $entry(function(e){
self_0.touchStart(e);
}
);
}
function Escalator$JsniUtil$TouchHandlerBundle(escalator){
$clinit_Escalator$JsniUtil$TouchHandlerBundle();
this.animation = new Escalator$JsniUtil$TouchHandlerBundle$1(this);
this.escalator = escalator;
}
defineClass(462, 1, {}, Escalator$JsniUtil$TouchHandlerBundle);
_.touchEnd = function(event_0){
var delta, vert;
if (this.touching) {
$endTouch(this.xMov, event_0);
$endTouch(this.yMov, event_0);
$validate(this.xMov, this.yMov);
$validate(this.yMov, this.xMov);
vert = !this.xMov.run || this.yMov.run && abs_0(this.yMov.offset) > abs_0(this.xMov.offset);
delta = abs_0((vert?this.yMov:this.xMov).offset);
$run_1(this.animation, round_int(3 * DURATION * (1 - Math.pow(2, -delta / 1000))));
}
}
;
_.touchMove = function(event_0){
if (this.touching && event_0.cancelable) {
$moveTouch(this.xMov, event_0);
$moveTouch(this.yMov, event_0);
$validate(this.xMov, this.yMov);
$validate(this.yMov, this.xMov);
this.xMov.run && $setScrollPosByDelta(this.xMov.scroll_0, this.xMov.delta);
this.yMov.run && $setScrollPosByDelta(this.yMov.scroll_0, this.yMov.delta);
(this.xMov.run || this.yMov.run) && ($clinit_DOMImpl() , impl_0).eventPreventDefault(event_0);
}
}
;
_.touchStart = function(event_0){
if (eventOnBody(this.escalator, event_0) && ($clinit_DOMImpl() , event_0).touches.length == 1) {
if (!this.yMov) {
this.yMov = new Escalator$JsniUtil$TouchHandlerBundle$Movement(this, true);
this.xMov = new Escalator$JsniUtil$TouchHandlerBundle$Movement(this, false);
$addClassName(this.escalator.bodyElem, 'touch');
}
if (this.animation.isRunning) {
this.acceleration = round_int(this.acceleration + 0.7);
($clinit_DOMImpl() , impl_0).eventPreventDefault(event_0);
$cancel(this.animation);
}
else {
this.acceleration = 1;
}
$startTouch(this.xMov, event_0);
$startTouch(this.yMov, event_0);
this.touching = true;
}
else {
this.touching = false;
$cancel(this.animation);
this.acceleration = 1;
}
}
;
_.acceleration = 1;
_.touching = false;
var DURATION = 0;
var Lcom_vaadin_client_widgets_Escalator$JsniUtil$TouchHandlerBundle_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/JsniUtil/TouchHandlerBundle', 462);
function $onUpdate(this$static, progress){
$stepAnimation(this$static.this$21.xMov, progress);
$stepAnimation(this$static.this$21.yMov, progress);
!this$static.this$21.xMov.run && !this$static.this$21.yMov.run && $cancel(this$static);
}
function $run_1(this$static, duration){
this$static.this$21.xMov.run || this$static.this$21.yMov.run?$run(this$static, duration, now_1()):(this$static.this$21.touching = false , $reschedule(this$static.this$21.escalator.body_0.domSorter));
}
function Escalator$JsniUtil$TouchHandlerBundle$1(this$2){
this.this$21 = this$2;
Animation.call(this, (!instance && (instance = $isNativelySupported()?new AnimationSchedulerImplStandard:new AnimationSchedulerImplTimer) , instance));
}
defineClass(472, 206, {}, Escalator$JsniUtil$TouchHandlerBundle$1);
var Lcom_vaadin_client_widgets_Escalator$JsniUtil$TouchHandlerBundle$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/JsniUtil/TouchHandlerBundle/1', 472);
function $endTouch(this$static, event_0){
var s, s$iterator;
this$static.velocity = 0;
for (s$iterator = new ArrayList$1(this$static.speeds); s$iterator.i < s$iterator.this$01.array.length;) {
s = checkNotNull(castToDouble($next_3(s$iterator)));
this$static.velocity += s / this$static.speeds.array.length;
}
this$static.position_0 = this$static.scroll_0.scrollPos;
this$static.offset = 1500 * this$static.velocity * this$static.this$21.acceleration * $easingInOutCos(this$static.velocity);
this$static.run = $validSpeed(this$static.velocity);
this$static.run && ($clinit_DOMImpl() , impl_0).eventPreventDefault(event_0);
}
function $inScrollRange(this$static, p){
return p > 0 && p < this$static.scrollMax;
}
function $moveTouch(this$static, event_0){
var a, ellapsed, now_0, pagePosition;
pagePosition = (a = ($clinit_DOMImpl() , event_0).touches , this$static.vertical?$getPageY(a[0]):$getPageX(a[0]));
this$static.run = false;
if (this$static.scrollMax > 1) {
this$static.delta = this$static.prevPos - pagePosition;
now_0 = now_1();
ellapsed = now_0 - this$static.prevTime;
this$static.velocity = this$static.delta / ellapsed;
this$static.speeds.array.length > 0 && !$validSpeed(checkNotNull(castToDouble($get_8(this$static.speeds, 0)))) && (this$static.speeds.array = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_0, 1, 0, 4, 1));
$add_6(this$static.speeds, 0, this$static.velocity);
this$static.prevTime = now_0;
this$static.prevPos = pagePosition;
this$static.position_0 = this$static.scroll_0.scrollPos;
}
}
function $startTouch(this$static, event_0){
var a;
this$static.speeds.array = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_0, 1, 0, 4, 1);
this$static.prevPos = (a = ($clinit_DOMImpl() , event_0).touches , this$static.vertical?$getPageY(a[0]):$getPageX(a[0]));
this$static.prevTime = now_1();
this$static.scrollMax = parseCssDimensionToPixels(this$static.scroll_0.internalGetScrollSize()) - parseCssDimensionToPixels(this$static.scroll_0.internalGetOffsetSize());
this$static.delta = 0;
}
function $stepAnimation(this$static, progress){
var p;
if (this$static.run) {
p = this$static.position_0 + this$static.offset * progress;
$setScrollPos(this$static.scroll_0, p);
this$static.run = p > 0 && p < this$static.scrollMax;
}
}
function $validSpeed(speed){
return (speed <= 0?0 - speed:speed) > 0.6;
}
function $validate(this$static, other){
this$static.run = this$static.delta != 0 && $inScrollRange(this$static, this$static.position_0 + this$static.delta) && abs_0(other.delta / this$static.delta) < 1;
this$static.run || (this$static.delta = 0);
}
function Escalator$JsniUtil$TouchHandlerBundle$Movement(this$2, vertical){
this.this$21 = this$2;
this.speeds = new ArrayList;
this.vertical = vertical;
this.scroll_0 = vertical?this$2.escalator.verticalScrollbar:this$2.escalator.horizontalScrollbar;
}
defineClass(217, 1, {}, Escalator$JsniUtil$TouchHandlerBundle$Movement);
_.delta = 0;
_.offset = 0;
_.position_0 = 0;
_.prevPos = 0;
_.prevTime = 0;
_.run = false;
_.scrollMax = 0;
_.velocity = 0;
_.vertical = false;
var Lcom_vaadin_client_widgets_Escalator$JsniUtil$TouchHandlerBundle$Movement_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/JsniUtil/TouchHandlerBundle/Movement', 217);
defineClass(463, 1, {});
var Lcom_vaadin_client_widgets_JsniWorkaround_2_classLit = createForClass('com.vaadin.client.widgets', 'JsniWorkaround', 463);
function $attachMousewheelListener(this$static, element){
if (element.addEventListener) {
var eventName = 'onmousewheel' in element?'mousewheel':'wheel';
element.addEventListener(eventName, this$static.mousewheelListenerFunction);
}
else {
element.attachEvent('onmousewheel', this$static.mousewheelListenerFunction);
}
}
function $attachScrollListener(this$static, element){
element.addEventListener?element.addEventListener('scroll', this$static.scrollListenerFunction):element.attachEvent('onscroll', this$static.scrollListenerFunction);
}
function $attachTouchListeners(this$static, element){
if (element.addEventListener) {
element.addEventListener('touchstart', this$static.touchStartFunction);
element.addEventListener('touchmove', this$static.touchMoveFunction);
element.addEventListener('touchend', this$static.touchEndFunction);
element.addEventListener('touchcancel', this$static.touchEndFunction);
}
}
function $createMousewheelListenerFunction(esc){
return $entry(function(e){
var deltaX = e.deltaX?e.deltaX:-0.5 * e.wheelDeltaX;
var deltaY = e.deltaY?e.deltaY:-0.5 * e.wheelDeltaY;
if (e.deltaMode === 1) {
var brc = esc.body_0;
deltaY *= brc.getDefaultRowHeight();
}
if (e.deltaMode !== undefined && (e.deltaMode >= 2 || e.deltaMode < 0)) {
var msg = 'Unsupported wheel delta mode "' + e.deltaMode + '"';
esc.logWarning(msg);
}
isNaN(deltaY) && (deltaY = -0.5 * e.wheelDelta);
moveScrollFromEvent(esc, deltaX, deltaY, e);
}
);
}
function $createScrollListenerFunction(esc){
var vScroll = esc.verticalScrollbar;
var vScrollElem = vScroll.getElement();
var hScroll = esc.horizontalScrollbar;
var hScrollElem = hScroll.getElement();
return $entry(function(e){
var target = e.target || e.srcElement;
target === vScrollElem?vScroll.updateScrollPosFromDom():target === hScrollElem?hScroll.updateScrollPosFromDom():$wnd.console.error('unexpected scroll target: ' + target);
}
);
}
function $detachMousewheelListener(this$static, element){
if (element.addEventListener) {
var eventName = element.onwheel === undefined?'mousewheel':'wheel';
element.removeEventListener(eventName, this$static.mousewheelListenerFunction);
}
else {
element.detachEvent('onmousewheel', this$static.mousewheelListenerFunction);
}
}
function $detachScrollListener(this$static, element){
element.addEventListener?element.removeEventListener('scroll', this$static.scrollListenerFunction):element.detachEvent('onscroll', this$static.scrollListenerFunction);
}
function $detachTouchListeners(this$static, element){
if (element.removeEventListener) {
element.removeEventListener('touchstart', this$static.touchStartFunction);
element.removeEventListener('touchmove', this$static.touchMoveFunction);
element.removeEventListener('touchend', this$static.touchEndFunction);
element.removeEventListener('touchcancel', this$static.touchEndFunction);
}
}
function $onScroll(this$static){
var i_0, scrollLeft, scrollTop;
scrollTop = this$static.this$01.verticalScrollbar.scrollPos;
scrollLeft = this$static.this$01.horizontalScrollbar.scrollPos;
if (this$static.lastScrollLeft != scrollLeft) {
for (i_0 = 0; i_0 < this$static.this$01.columnConfiguration.frozenColumns; i_0++) {
$updateFreezePosition(this$static.this$01.header, i_0, scrollLeft);
$updateFreezePosition(this$static.this$01.body_0, i_0, scrollLeft);
$updateFreezePosition(this$static.this$01.footer, i_0, scrollLeft);
}
this$static.this$01.position_0.set_0(this$static.this$01.headElem, -scrollLeft, 0);
instanceOf(this$static.this$01.position_0, 144)?(this$static.this$01.footElem.style['left'] = -scrollLeft + ($clinit_Style$Unit() , 'px') , undefined):this$static.this$01.position_0.set_0(this$static.this$01.footElem, -scrollLeft, 0);
this$static.lastScrollLeft = scrollLeft;
}
$setBodyScrollPosition(this$static.this$01.body_0, scrollLeft, scrollTop);
$updateEscalatorRowsOnScroll(this$static.this$01.body_0);
$updateSpacerDecosVisibility(this$static.this$01.body_0.spacerContainer);
}
function $recalculateScrollbarsForVirtualViewport(this$static){
var fCornerStyle, footerHeight, frozenPixels, hCornerStyle, hScrollOffsetWidth, headerHeight, horizontalScrollNeeded, offset, prevScrollPos, scrollContentHeight, scrollContentWidth, tableWrapperHeight, tableWrapperWidth, unfrozenPixels, vScrollbarHeight, verticalScrollNeeded;
scrollContentHeight = $calculateTotalRowHeight(this$static.this$01.body_0) + $getHeights(new AbstractMap$2(this$static.this$01.body_0.spacerContainer.rowIndexToSpacer));
scrollContentWidth = $calculateRowWidth(this$static.this$01.columnConfiguration);
tableWrapperHeight = this$static.this$01.heightOfEscalator;
tableWrapperWidth = this$static.this$01.widthOfEscalator;
verticalScrollNeeded = scrollContentHeight > tableWrapperHeight + 0.49 - max_1(0, this$static.this$01.header.heightOfSection) - max_1(0, this$static.this$01.footer.heightOfSection);
horizontalScrollNeeded = scrollContentWidth > tableWrapperWidth + 0.49;
verticalScrollNeeded != horizontalScrollNeeded && (!verticalScrollNeeded && horizontalScrollNeeded?(verticalScrollNeeded = scrollContentHeight > tableWrapperHeight + 0.49 - max_1(0, this$static.this$01.header.heightOfSection) - max_1(0, this$static.this$01.footer.heightOfSection) - $getScrollbarThickness(this$static.this$01.horizontalScrollbar)):(horizontalScrollNeeded = scrollContentWidth > tableWrapperWidth + 0.49 - $getScrollbarThickness(this$static.this$01.verticalScrollbar)));
if (verticalScrollNeeded) {
tableWrapperWidth -= $getScrollbarThickness(this$static.this$01.verticalScrollbar);
tableWrapperWidth = 0 > tableWrapperWidth?0:tableWrapperWidth;
}
if (horizontalScrollNeeded) {
tableWrapperHeight -= $getScrollbarThickness(this$static.this$01.horizontalScrollbar);
tableWrapperHeight = 0 > tableWrapperHeight?0:tableWrapperHeight;
}
this$static.this$01.tableWrapper.style['height'] = tableWrapperHeight + ($clinit_Style$Unit() , 'px');
this$static.this$01.tableWrapper.style['width'] = tableWrapperWidth + 'px';
footerHeight = max_1(0, this$static.this$01.footer.heightOfSection);
headerHeight = max_1(0, this$static.this$01.header.heightOfSection);
vScrollbarHeight = 0 > tableWrapperHeight - footerHeight - headerHeight?0:tableWrapperHeight - footerHeight - headerHeight;
$setOffsetSize(this$static.this$01.verticalScrollbar, vScrollbarHeight);
$setScrollSize(this$static.this$01.verticalScrollbar, scrollContentHeight);
prevScrollPos = this$static.this$01.horizontalScrollbar.scrollPos;
unfrozenPixels = $getCalculatedColumnsWidth(this$static.this$01.columnConfiguration, new Range_0(this$static.this$01.columnConfiguration.frozenColumns, this$static.this$01.columnConfiguration.columns.array.length));
frozenPixels = scrollContentWidth - unfrozenPixels;
hScrollOffsetWidth = tableWrapperWidth - frozenPixels;
$setOffsetSize(this$static.this$01.horizontalScrollbar, hScrollOffsetWidth);
$setScrollSize(this$static.this$01.horizontalScrollbar, unfrozenPixels);
this$static.this$01.horizontalScrollbar.root.style['left'] = frozenPixels + 'px';
$setScrollPos(this$static.this$01.horizontalScrollbar, prevScrollPos);
$showsScrollHandle(this$static.this$01.horizontalScrollbar)?(this$static.this$01.horizontalScrollbarDeco.style['display'] = '' , undefined):(this$static.this$01.horizontalScrollbarDeco.style['display'] = ($clinit_Style$Display() , 'none') , undefined);
hCornerStyle = this$static.this$01.headerDeco.style;
fCornerStyle = this$static.this$01.footerDeco.style;
if ($showsScrollHandle(this$static.this$01.verticalScrollbar)) {
hCornerStyle['display'] = '';
fCornerStyle['display'] = '';
if ($showsScrollHandle(this$static.this$01.horizontalScrollbar)) {
offset = $getScrollbarThickness(this$static.this$01.horizontalScrollbar);
fCornerStyle['bottom'] = offset + 'px';
}
else {
fCornerStyle['bottom'] = '';
}
}
else {
hCornerStyle['display'] = ($clinit_Style$Display() , 'none');
fCornerStyle['display'] = 'none';
}
}
function $scrollToColumn_0(this$static, columnIndex, destination){
var frozenPixels, scrollLeft, targetEndPx, targetStartPx, viewportEndPx, viewportStartPx;
frozenPixels = $getCalculatedColumnsWidth(this$static.this$01.columnConfiguration, withLength(0, this$static.this$01.columnConfiguration.frozenColumns));
targetStartPx = $getCalculatedColumnsWidth(this$static.this$01.columnConfiguration, withLength(0, columnIndex)) - frozenPixels;
targetEndPx = targetStartPx + $getColumnWidthActual(this$static.this$01.columnConfiguration, columnIndex);
viewportStartPx = this$static.this$01.horizontalScrollbar.scrollPos;
viewportEndPx = viewportStartPx + getRequiredWidthBoundingClientRectDouble($getElement(this$static.this$01)) - frozenPixels;
$showsScrollHandle(this$static.this$01.verticalScrollbar) && (viewportEndPx -= getNativeScrollbarSize());
scrollLeft = getScrollPos(destination, targetStartPx, targetEndPx, viewportStartPx, viewportEndPx, 10);
$setScrollLeft_0(this$static.this$01, scrollLeft);
}
function Escalator$Scroller(this$0){
this.this$01 = this$0;
this.scrollListenerFunction = $createScrollListenerFunction(this$0);
this.mousewheelListenerFunction = $createMousewheelListenerFunction(this$0);
this.touchHandlerBundle = new Escalator$JsniUtil$TouchHandlerBundle(this$0);
this.touchStartFunction = $getTouchStartHandler(this.touchHandlerBundle);
this.touchMoveFunction = $getTouchMoveHandler(this.touchHandlerBundle);
this.touchEndFunction = $getTouchEndHandler(this.touchHandlerBundle);
}
defineClass(464, 463, {}, Escalator$Scroller);
_.lastScrollLeft = 0;
var Lcom_vaadin_client_widgets_Escalator$Scroller_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/Scroller', 464);
function $destroySpacerContent(this$static, spacers){
var entry, outerIter, spacer, spacer$iterator;
for (spacer$iterator = (outerIter = spacers.this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); spacer$iterator.val$outerIter2.hasNext_0();) {
spacer = (entry = castTo(spacer$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 32));
this$static.spacerUpdater.destroy(spacer);
}
}
function $getHeights(spacers){
var entry, heights, outerIter, spacer, spacer$iterator;
heights = 0;
for (spacer$iterator = (outerIter = spacers.this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); spacer$iterator.val$outerIter2.hasNext_0();) {
spacer = (entry = castTo(spacer$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 32));
heights += spacer.height_0;
}
return heights;
}
function $getSpacer(this$static, rowIndex){
return castTo($get_6(this$static.rowIndexToSpacer, valueOf_2(rowIndex)), 32);
}
function $getSpacerHeight(this$static, rowIndex){
var spacer;
spacer = castTo($get_6(this$static.rowIndexToSpacer, valueOf_2(rowIndex)), 32);
return spacer?spacer.height_0:0;
}
function $getSpacerHeightsSumBetweenPx(this$static, rangeTop, topInclusion, rangeBottom, bottomInclusion){
var bottom, bottomIsAboveRange, bottomIsBelowRange, bottomIsInRange, entry, height, heights, outerIter, spacer, spacer$iterator, top_0, topIsAboveRange, topIsBelowRange, topIsInRange;
heights = 0;
for (spacer$iterator = (outerIter = (new AbstractMap$2(this$static.rowIndexToSpacer)).this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); spacer$iterator.val$outerIter2.hasNext_0();) {
spacer = (entry = castTo(spacer$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 32));
top_0 = $getTop(spacer.this$11.this$01.positions, spacer.root);
height = spacer.height_0;
bottom = top_0 + height;
topIsAboveRange = top_0 < rangeTop;
topIsInRange = rangeTop <= top_0 && top_0 <= rangeBottom;
topIsBelowRange = rangeBottom < top_0;
bottomIsAboveRange = bottom < rangeTop;
bottomIsInRange = rangeTop <= bottom && bottom <= rangeBottom;
bottomIsBelowRange = rangeBottom < bottom;
if (bottomIsAboveRange) {
continue;
}
else if (topIsBelowRange) {
return heights;
}
else if (topIsAboveRange && bottomIsInRange) {
switch (topInclusion.ordinal) {
case 1:
heights += bottom - rangeTop;
break;
case 0:
heights += height;
}
}
else if (topIsAboveRange && bottomIsBelowRange) {
switch (topInclusion.ordinal) {
case 2:
return 0;
case 0:
return height;
case 1:
return rangeBottom - rangeTop;
default:throw new IllegalArgumentException('Unexpected inclusion state :' + topInclusion);
}
}
else if (topIsInRange && bottomIsInRange) {
heights += height;
}
else if (topIsInRange && bottomIsBelowRange) {
switch (bottomInclusion.ordinal) {
case 1:
heights += rangeBottom - top_0;
break;
case 0:
heights += height;
}
return heights;
}
}
return heights;
}
function $getSpacerHeightsSumUntilIndex(this$static, logicalIndex){
return $getHeights(new AbstractMap$2($headMap(this$static.rowIndexToSpacer, valueOf_2(logicalIndex))));
}
function $getSpacerHeightsSumUntilPx(this$static, px){
return $getSpacerHeightsSumBetweenPx(this$static, 0, ($clinit_Escalator$SpacerInclusionStrategy() , PARTIAL), px, PARTIAL);
}
function $getSpacersAfterPx(this$static, px, strategy){
var bottom, i_0, spacer, spacers, top_0;
spacers = new ArrayList_1(new AbstractMap$2(this$static.rowIndexToSpacer));
for (i_0 = 0; i_0 < spacers.array.length; i_0++) {
spacer = (checkCriticalElementIndex(i_0, spacers.array.length) , castTo(spacers.array[i_0], 32));
top_0 = $getTop(spacer.this$11.this$01.positions, spacer.root);
bottom = top_0 + spacer.height_0;
if (top_0 > px) {
return new AbstractList$SubList(spacers, i_0, spacers.array.length);
}
else if (bottom > px) {
return strategy == ($clinit_Escalator$SpacerInclusionStrategy() , NONE_0)?new AbstractList$SubList(spacers, i_0 + 1, spacers.array.length):new AbstractList$SubList(spacers, i_0, spacers.array.length);
}
}
return $clinit_Collections() , $clinit_Collections() , EMPTY_SET;
}
function $initSpacerContent(this$static, spacers){
var entry, outerIter, spacer, spacer$iterator;
for (spacer$iterator = (outerIter = spacers.this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); spacer$iterator.val$outerIter2.hasNext_0();) {
spacer = (entry = castTo(spacer$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 32));
this$static.spacerUpdater.init_3(spacer);
$isInViewport(spacer)?(spacer.root.style['display'] = '' , undefined , spacer.deco.style['display'] = '' , undefined):(spacer.root.style['display'] = ($clinit_Style$Display() , 'none') , undefined , spacer.deco.style['display'] = 'none' , undefined);
}
}
function $insertNewSpacer(this$static, rowIndex, height){
var spacer, spacerRoot;
!this$static.spacerScrollerRegistration && (this$static.spacerScrollerRegistration = $addHandler_0(this$static.this$01, this$static.spacerScroller, ($clinit_ScrollEvent() , TYPE_15)));
spacer = new Escalator$SpacerContainer$SpacerImpl(this$static, rowIndex);
$put_6(this$static.rowIndexToSpacer, valueOf_2(rowIndex), spacer);
$set_6(this$static.this$01.positions, spacer.root, this$static.this$01.horizontalScrollbar.scrollPos, $getRowTop_0(this$static.this$01.body_0, rowIndex) + this$static.this$01.body_0.defaultRowHeight);
spacerRoot = spacer.root;
spacerRoot.style['width'] = $calculateRowWidth(this$static.this$01.columnConfiguration) + ($clinit_Style$Unit() , 'px');
$appendChild(this$static.this$01.body_0.root, spacerRoot);
spacer.root.style['width'] = getRequiredWidthBoundingClientRectDouble(spacer.this$11.this$01.tableWrapper) + 'px';
$setHeight_1(spacer, height);
$setColSpan(spacer.spacerElement, spacer.this$11.this$01.columnConfiguration.columns.array.length);
$setStylePrimaryName_8(spacer, getStylePrimaryName($getStyleElement(spacer.this$11.this$01)));
$set_6(this$static.this$01.positions, spacer.deco, 0, $getTop(spacer.this$11.this$01.positions, spacer.root) - spacer.this$11.this$01.body_0.defaultRowHeight);
$appendChild(this$static.this$01.spacerDecoContainer, spacer.deco);
if (!$getParentElement(this$static.this$01.spacerDecoContainer)) {
$appendChild($getElement(this$static.this$01), this$static.this$01.spacerDecoContainer);
this$static.spacerDecoWidth = getRequiredWidthBoundingClientRectDouble(spacer.deco);
}
this$static.spacerUpdater.init_3(spacer);
$isInViewport(spacer)?(spacer.root.style['display'] = '' , undefined , spacer.deco.style['display'] = '' , undefined):(spacer.root.style['display'] = ($clinit_Style$Display() , 'none') , undefined , spacer.deco.style['display'] = 'none' , undefined);
$sortDomElements(this$static.this$01.body_0);
}
function $isSpacer(this$static, row){
var entry, outerIter, spacer, spacer$iterator;
for (spacer$iterator = (outerIter = (new AbstractMap$2(this$static.rowIndexToSpacer)).this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); spacer$iterator.val$outerIter2.hasNext_0();) {
spacer = (entry = castTo(spacer$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 32));
if (spacer.root == row) {
return true;
}
}
return false;
}
function $paintRemoveSpacers(this$static, removedRowsRange){
$removeSpacers(this$static, removedRowsRange);
$shiftSpacersByRows(this$static, removedRowsRange.start_0, -(removedRowsRange.end - removedRowsRange.start_0));
}
function $reapplySpacerWidths(this$static){
var entry, outerIter, spacer, spacer$iterator, width_0;
width_0 = getRequiredWidthBoundingClientRectDouble(this$static.this$01.tableWrapper) - this$static.spacerDecoWidth;
for (spacer$iterator = (outerIter = (new AbstractMap$2(this$static.rowIndexToSpacer)).this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); spacer$iterator.val$outerIter2.hasNext_0();) {
spacer = (entry = castTo(spacer$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 32));
spacer.root.style['width'] = width_0 + ($clinit_Style$Unit() , 'px');
}
}
function $removeSpacers(this$static, removedRange){
var entry, entry0, outerIter, removedSpacers, spacer, spacer$iterator;
removedSpacers = $subMap(this$static.rowIndexToSpacer, valueOf_2(removedRange.start_0), valueOf_2(removedRange.end));
removedSpacers.type_0.fromKeyValid()?removedSpacers.fromInclusive?(entry0 = $getNodeAfter(removedSpacers.this$01, removedSpacers.fromKey, true)):(entry0 = $getNodeAfter(removedSpacers.this$01, removedSpacers.fromKey, false)):(entry0 = $getFirstEntry(removedSpacers.this$01));
if (!(!!entry0 && $inRange_0(removedSpacers, entry0.key)?entry0:null)) {
return;
}
for (spacer$iterator = (outerIter = (new AbstractMap$2(removedSpacers)).this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); spacer$iterator.val$outerIter2.hasNext_0();) {
spacer = (entry = castTo(spacer$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 32));
this$static.spacerUpdater.destroy(spacer);
$setHeight_1(spacer, 0);
$removeFromParent(spacer.root);
$removeFromParent(spacer.deco);
}
$clear_0(new TreeMap$SubMap$1(removedSpacers, removedSpacers));
if (this$static.rowIndexToSpacer.size_0 == 0) {
$removeHandler(this$static.spacerScrollerRegistration.real);
this$static.spacerScrollerRegistration = null;
}
}
function $setSpacer_0(this$static, rowIndex, height){
if (rowIndex < -1 || rowIndex >= this$static.this$01.body_0.rows_0) {
throw new IllegalArgumentException('invalid row index: ' + rowIndex + ', while the body only has ' + this$static.this$01.body_0.rows_0 + ' rows.');
}
height >= 0?$containsKey_0(this$static.rowIndexToSpacer, valueOf_2(rowIndex))?$setHeight_1(castTo($get_6(this$static.rowIndexToSpacer, valueOf_2(rowIndex)), 32), height):$insertNewSpacer(this$static, rowIndex, height):$containsKey_0(this$static.rowIndexToSpacer, valueOf_2(rowIndex)) && $removeSpacers(this$static, new Range_0(rowIndex, rowIndex + 1));
$updateSpacerDecosVisibility(this$static);
}
function $setSpacerUpdater_0(this$static, spacerUpdater){
$destroySpacerContent(this$static, new AbstractMap$2(this$static.rowIndexToSpacer));
this$static.spacerUpdater = spacerUpdater;
$initSpacerContent(this$static, new AbstractMap$2(this$static.rowIndexToSpacer));
}
function $setStylePrimaryName_7(this$static, style){
var entry, outerIter, spacer, spacer$iterator;
for (spacer$iterator = (outerIter = (new AbstractMap$2(this$static.rowIndexToSpacer)).this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); spacer$iterator.val$outerIter2.hasNext_0();) {
spacer = (entry = castTo(spacer$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 32));
setStylePrimaryName(spacer.root, style + '-spacer');
setStylePrimaryName(spacer.deco, style + '-spacer-deco');
}
}
function $shiftSpacerPositionsAfterRow(this$static, changedRowIndex, diffPx){
var entry, outerIter, spacer, spacer$iterator;
for (spacer$iterator = (outerIter = (new AbstractMap$2($tailMap(this$static.rowIndexToSpacer, valueOf_2(changedRowIndex), false))).this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); spacer$iterator.val$outerIter2.hasNext_0();) {
spacer = (entry = castTo(spacer$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 32));
$setPosition(spacer, $getLeft(spacer.this$11.this$01.positions, spacer.root), $getTop(spacer.this$11.this$01.positions, spacer.root) + diffPx);
}
}
function $shiftSpacersByRows(this$static, index_0, numberOfRows){
var pxDiff, spacer, spacer$iterator;
pxDiff = numberOfRows * this$static.this$01.body_0.defaultRowHeight;
for (spacer$iterator = new ArrayList$1(new ArrayList_1(new AbstractMap$2($tailMap(this$static.rowIndexToSpacer, valueOf_2(index_0), true)))); spacer$iterator.i < spacer$iterator.this$01.array.length;) {
spacer = castTo($next_3(spacer$iterator), 32);
$setPosition(spacer, $getLeft(spacer.this$11.this$01.positions, spacer.root), $getTop(spacer.this$11.this$01.positions, spacer.root) + pxDiff);
$setRowIndex(spacer, spacer.rowIndex_0 + numberOfRows);
}
}
function $updateSpacerDecosVisibility(this$static){
var bottom, entry, outerIter, spacer, spacer$iterator, top_0, visibleRowRange, visibleSpacers;
visibleRowRange = $getVisibleRowRange(this$static.this$01);
visibleSpacers = new AbstractMap$2($subMap(this$static.rowIndexToSpacer, valueOf_2(visibleRowRange.start_0 - 1), valueOf_2(visibleRowRange.end + 1)));
if (visibleSpacers.this$01.size_2() != 0) {
top_0 = $getAbsoluteTop(this$static.this$01.tableWrapper) + max_1(0, this$static.this$01.header.heightOfSection);
bottom = $getAbsoluteBottom(this$static.this$01.tableWrapper) - max_1(0, this$static.this$01.footer.heightOfSection);
for (spacer$iterator = (outerIter = visibleSpacers.this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); spacer$iterator.val$outerIter2.hasNext_0();) {
spacer = (entry = castTo(spacer$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 32));
$updateDecoClip(spacer, top_0, bottom, this$static.spacerDecoWidth);
}
}
}
function Escalator$SpacerContainer(this$0){
this.this$01 = this$0;
this.rowIndexToSpacer = new TreeMap;
this.spacerUpdater = ($clinit_SpacerUpdater() , NULL_0);
this.spacerScroller = new Escalator$SpacerContainer$1(this);
}
defineClass(470, 1, {}, Escalator$SpacerContainer);
_.spacerDecoWidth = 0;
var Lcom_vaadin_client_widgets_Escalator$SpacerContainer_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/SpacerContainer', 470);
function Escalator$SpacerContainer$1(this$1){
this.this$11 = this$1;
}
defineClass(475, 1, $intern_43, Escalator$SpacerContainer$1);
_.onScroll = function(event_0){
var entry, outerIter, spacer, spacer$iterator;
if (pixelValuesEqual(this.this$11.this$01.horizontalScrollbar.scrollPos, this.prevScrollX)) {
return;
}
this.prevScrollX = this.this$11.this$01.horizontalScrollbar.scrollPos;
for (spacer$iterator = (outerIter = (new AbstractMap$2(this.this$11.rowIndexToSpacer)).this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); spacer$iterator.val$outerIter2.hasNext_0();) {
spacer = (entry = castTo(spacer$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 32));
$setPosition(spacer, this.prevScrollX, $getTop(spacer.this$11.this$01.positions, spacer.root));
}
}
;
_.prevScrollX = 0;
var Lcom_vaadin_client_widgets_Escalator$SpacerContainer$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/SpacerContainer/1', 475);
function $isInViewport(this$static){
var height, location_0, top_0;
top_0 = round_int(ceil_0($getTop(this$static.this$11.this$01.positions, this$static.root)));
height = round_int(floor_0(this$static.height_0));
location_0 = withLength(top_0, height);
return $intersects($getViewportPixels(this$static.this$11.this$01), location_0);
}
function $setHeight_1(this$static, height){
var bottom, heightDiff, minusOneSpacerException, moveDiff, oldHeight, row, row$iterator, scrollTop, spacerIsGrowing, top_0, viewportNeedsScrolling, viewportTopIsAtMidSpacer, style;
heightDiff = height - max_1(0, this$static.height_0);
oldHeight = this$static.height_0;
this$static.height_0 = height;
this$static.defaultCellBorderBottomSize < 0 && (this$static.defaultCellBorderBottomSize = ($clinit_WidgetUtil() , getBorderThickness($getFirstChildElement($getRowElement(this$static.this$11.this$01.body_0, $getVisibleRowRange(this$static.this$11.this$01).start_0)), stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['borderBottomWidth']))));
this$static.root.style['height'] = height + this$static.defaultCellBorderBottomSize + ($clinit_Style$Unit() , 'px');
$shiftSpacerPositionsAfterRow(this$static.this$11, this$static.rowIndex_0, heightDiff);
spacerIsGrowing = heightDiff > 0;
spacerIsGrowing && $setScrollSize(this$static.this$11.this$01.verticalScrollbar, parseCssDimensionToPixels($getHeight(this$static.this$11.this$01.verticalScrollbar.scrollSizeElement.style)) + heightDiff);
minusOneSpacerException = spacerIsGrowing && this$static.rowIndex_0 == -1 && this$static.this$11.this$01.body_0.topRowLogicalIndex == 0;
viewportNeedsScrolling = this$static.rowIndex_0 < this$static.this$11.this$01.body_0.topRowLogicalIndex && !minusOneSpacerException;
if (viewportNeedsScrolling) {
for (row$iterator = $listIterator(this$static.this$11.this$01.body_0.visualRowOrder, 0); row$iterator.currentNode != row$iterator.this$01.tail;) {
row = castToJso($next_4(row$iterator));
$setRowPosition(this$static.this$11.this$01.body_0, row, $getRowTop(this$static.this$11.this$01.body_0, row) + heightDiff);
}
top_0 = $getTop(this$static.this$11.this$01.positions, this$static.root);
bottom = top_0 + oldHeight;
scrollTop = this$static.this$11.this$01.verticalScrollbar.scrollPos;
viewportTopIsAtMidSpacer = top_0 < scrollTop && scrollTop < bottom;
viewportTopIsAtMidSpacer && !spacerIsGrowing?(moveDiff = heightDiff > top_0 - scrollTop?heightDiff:top_0 - scrollTop):(moveDiff = heightDiff);
$setBodyScrollPosition(this$static.this$11.this$01.body_0, this$static.this$11.this$01.tBodyScrollLeft, this$static.this$11.this$01.tBodyScrollTop + moveDiff);
$setScrollPosByDelta(this$static.this$11.this$01.verticalScrollbar, moveDiff);
}
else {
$shiftRowPositions(this$static.this$11.this$01.body_0, this$static.rowIndex_0, heightDiff);
}
spacerIsGrowing || $setScrollSize(this$static.this$11.this$01.verticalScrollbar, parseCssDimensionToPixels($getHeight(this$static.this$11.this$01.verticalScrollbar.scrollSizeElement.style)) + heightDiff);
style = this$static.deco.style;
this$static.decoHeight = height + this$static.this$11.this$01.body_0.defaultRowHeight;
style['height'] = this$static.decoHeight + 'px';
}
function $setPosition(this$static, x_0, y_0){
$set_6(this$static.this$11.this$01.positions, this$static.root, x_0, y_0);
$set_6(this$static.this$11.this$01.positions, this$static.deco, 0, y_0 - this$static.this$11.this$01.body_0.defaultRowHeight);
}
function $setRowIndex(this$static, rowIndex){
castTo($remove_20(this$static.this$11.rowIndexToSpacer, valueOf_2(this$static.rowIndex_0)), 32);
this$static.rowIndex_0 = rowIndex;
this$static.root['vLogicalRow'] = rowIndex;
$put_6(this$static.this$11.rowIndexToSpacer, valueOf_2(this$static.rowIndex_0), this$static);
}
function $setStylePrimaryName_8(this$static, style){
setStylePrimaryName(this$static.root, style + '-spacer');
setStylePrimaryName(this$static.deco, style + '-spacer-deco');
}
function $updateDecoClip(this$static, bodyTop, bodyBottom, decoWidth){
var bottom, bottomClip, clip, height, top_0, topClip;
top_0 = $getAbsoluteTop(this$static.deco);
bottom = $getAbsoluteBottom(this$static.deco);
height = bottom - top_0;
if (top_0 < bodyTop || bottom > bodyBottom) {
topClip = 0 > bodyTop - top_0?0:bodyTop - top_0;
bottomClip = height - (0 > bottom - bodyBottom?0:bottom - bodyBottom);
clip = $append_1($append($append_1($append($append_1($append(new StringBuilder_1('rect('), topClip), 'px,'), decoWidth), 'px,'), bottomClip), 'px,0)').string;
this$static.deco.style['clip'] = clip;
}
else {
this$static.deco.style['clip'] = 'auto';
}
}
function Escalator$SpacerContainer$SpacerImpl(this$1, rowIndex){
this.this$11 = this$1;
this.rowIndex_0 = rowIndex;
this.root = ($clinit_DOM() , $createTRElement($doc));
this.spacerElement = $createTDElement($doc);
$appendChild(this.root, this.spacerElement);
this.root['vLogicalRow'] = rowIndex;
this.deco = $createDivElement($doc);
}
defineClass(32, 1, {32:1}, Escalator$SpacerContainer$SpacerImpl);
_.decoHeight = 0;
_.defaultCellBorderBottomSize = -1;
_.height_0 = -1;
_.rowIndex_0 = 0;
var Lcom_vaadin_client_widgets_Escalator$SpacerContainer$SpacerImpl_2_classLit = createForClass('com.vaadin.client.widgets', 'Escalator/SpacerContainer/SpacerImpl', 32);
function $clinit_Escalator$SpacerInclusionStrategy(){
$clinit_Escalator$SpacerInclusionStrategy = emptyMethod;
COMPLETE = new Escalator$SpacerInclusionStrategy('COMPLETE', 0);
PARTIAL = new Escalator$SpacerInclusionStrategy('PARTIAL', 1);
NONE_0 = new Escalator$SpacerInclusionStrategy('NONE', 2);
}
function Escalator$SpacerInclusionStrategy(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_9(){
$clinit_Escalator$SpacerInclusionStrategy();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_client_widgets_Escalator$SpacerInclusionStrategy_2_classLit, 1), $intern_0, 124, 0, [COMPLETE, PARTIAL, NONE_0]);
}
defineClass(124, 5, {124:1, 3:1, 6:1, 5:1}, Escalator$SpacerInclusionStrategy);
var COMPLETE, NONE_0, PARTIAL;
var Lcom_vaadin_client_widgets_Escalator$SpacerInclusionStrategy_2_classLit = createForEnum('com.vaadin.client.widgets', 'Escalator/SpacerInclusionStrategy', 124, values_9);
function $$init_0(this$static){
this$static.eventCell = new EventCellReference(this$static);
this$static.keyDown = new GridKeyDownEvent(this$static, this$static.eventCell);
this$static.keyUp = new GridKeyUpEvent(this$static, this$static.eventCell);
new GridKeyPressEvent(this$static, this$static.eventCell);
this$static.clickEvent = new GridClickEvent(this$static, this$static.eventCell);
new GridDoubleClickEvent(this$static, this$static.eventCell);
this$static.escalator = new Escalator;
this$static.header = new Grid$Header;
this$static.footer = new Grid$Footer;
this$static.sidebar_0 = new Grid$Sidebar(this$static);
this$static.columns = new ArrayList;
this$static.currentDataAvailable = withLength(0, 0);
this$static.sortOrder_0 = new ArrayList;
this$static.sorter = new Grid$UserSorter(this$static);
this$static.editor = new Grid$Editor;
this$static.autoColumnWidthsRecalculator = new Grid$AutoColumnWidthsRecalculator(this$static);
this$static.detailsGenerator = ($clinit_DetailsGenerator() , NULL_1);
this$static.gridSpacerUpdater = new Grid$GridSpacerUpdater(this$static);
this$static.visibleDetails = new HashSet;
this$static.columnHider = new Grid$ColumnHider(this$static);
this$static.dndHandler = new DragAndDropHandler;
this$static.autoScroller = new AutoScroller(this$static);
this$static.headerCellDndCallback = new Grid$1(this$static);
this$static.rowReference = new RowReference(this$static);
this$static.cellReference = new CellReference(this$static.rowReference);
this$static.rendererCellReference = new RendererCellReference(this$static.rowReference);
}
function $addBodyClickHandler(this$static, handler){
return $addHandler_0(this$static, handler, this$static.clickEvent.associatedType);
}
function $addBodyKeyDownHandler(this$static, handler){
return $addHandler_0(this$static, handler, this$static.keyDown.associatedType);
}
function $addBodyKeyUpHandler(this$static, handler){
return $addHandler_0(this$static, handler, this$static.keyUp.associatedType);
}
function $addColumn(this$static, column, index_0){
if (column == this$static.selectionColumn) {
throw new IllegalArgumentException('The selection column many not be added manually');
}
else if (!!this$static.selectionColumn && index_0 == 0) {
throw new IllegalStateException_0('A column cannot be inserted before the selection column');
}
$addColumnSkipSelectionColumnCheck(this$static, column, index_0);
return column;
}
function $addColumnSkipSelectionColumnCheck(this$static, column, index_0){
var escalatorIndex, events, existingColumn;
$add_6(this$static.columns, index_0, column);
$addColumn_1(this$static.header, column);
$addColumn_0(this$static.footer, column);
$setGrid_1(column, this$static);
if (!column.hidden_0) {
escalatorIndex = index_0;
for (existingColumn = 0; existingColumn < index_0; existingColumn++) {
$getColumn(this$static, existingColumn).hidden_0 && --escalatorIndex;
}
$insertColumns(this$static.escalator.columnConfiguration, escalatorIndex, 1);
}
!!column.grid_0 && $schedule_0(column.grid_0.autoColumnWidthsRecalculator);
events = new HashSet;
$addAll_0(events, $getConsumedEventsForRenderer(column.bodyRenderer));
column.hidable_0 && $updateColumnHidable(this$static.columnHider, column);
$sinkEvents(this$static, events);
}
function $addDataAvailableHandler(this$static, handler){
$scheduleFinally(($clinit_SchedulerImpl() , INSTANCE), new Grid$8(this$static, handler));
return $addHandler_0(this$static, handler, ($clinit_DataAvailableEvent() , TYPE_11));
}
function $addFooterRowAt(this$static, index_0){
return castTo($addRowAt(this$static.footer, index_0), 118);
}
function $addHeaderKeyUpHandler(this$static, handler){
return $addHandler_0(this$static, handler, this$static.keyUp.associatedType);
}
function $addHeaderRowAt(this$static, index_0){
return castTo($addRowAt(this$static.header, index_0), 52);
}
function $deselect(this$static, row){
if (instanceOf(this$static.selectionModel, 155)) {
return castTo(this$static.selectionModel, 155).deselect_1(row);
}
else if (instanceOf(this$static.selectionModel, 85)) {
return castTo(this$static.selectionModel, 85).deselect_0(singleton_0(row));
}
else {
throw new IllegalStateException_0('Unsupported selection model');
}
}
function $editRow_0(this$static, rowIndex){
$editRow_1(this$static.editor, rowIndex);
}
function $focusCell(this$static, rowIndex, columnIndex){
var cell, row, rowElement, visibleRows;
row = new RowReference(this$static);
visibleRows = $getVisibleRowRange(this$static.escalator);
if (visibleRows.start_0 <= rowIndex && rowIndex < visibleRows.end) {
rowElement = $getRowElement(this$static.escalator.body_0, rowIndex);
}
else {
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
return;
}
$set_5(row, rowIndex, $getRow(this$static.dataSource, rowIndex), rowElement);
cell = new CellReference(row);
$set_2(cell, columnIndex, columnIndex, $getVisibleColumn(this$static, columnIndex));
$setCellFocus_0(this$static.cellFocusHandler, cell);
focus_2(($clinit_DOM() , this$static.element));
}
function $getColumn(this$static, index_0){
if (index_0 < 0 || index_0 >= this$static.columns.array.length) {
throw new IllegalStateException_0('Column not found.');
}
return castTo($get_8(this$static.columns, index_0), 21);
}
function $getConsumedEventsForRenderer(renderer){
var consumedEvents, events;
events = new HashSet;
if (instanceOf(renderer, 48)) {
consumedEvents = castTo(renderer, 48).getConsumedEvents();
!!consumedEvents && $addAll_0(events, consumedEvents);
}
return events;
}
function $getFirstVisibleRowIndex(this$static){
var firstRow, firstRowIndex, headerBottom;
firstRowIndex = $getVisibleRowRange(this$static.escalator).start_0;
headerBottom = $getAbsoluteBottom(this$static.escalator.header.root);
firstRow = $getRowElement(this$static.escalator.body_0, firstRowIndex);
while (($clinit_DOMImpl() , impl_0).getAbsoluteTop(firstRow) + ((firstRow.offsetHeight || 0) | 0) < headerBottom) {
firstRow = $getRowElement(this$static.escalator.body_0, ++firstRowIndex);
}
return firstRowIndex;
}
function $getFooterRow(this$static, rowIndex){
return castTo($getRow_0(this$static.footer, rowIndex), 118);
}
function $getHeaderRow(this$static, rowIndex){
return castTo($getRow_0(this$static.header, rowIndex), 52);
}
function $getLastVisibleRowIndex(this$static){
var footerTop, lastRow, lastRowIndex;
lastRowIndex = $getVisibleRowRange(this$static.escalator).end;
footerTop = $getAbsoluteTop(this$static.escalator.footer.root);
do {
lastRow = $getRowElement(this$static.escalator.body_0, --lastRowIndex);
}
while (($clinit_DOMImpl() , impl_0).getAbsoluteTop(lastRow) > footerTop);
return lastRowIndex;
}
function $getSectionFromContainer(this$static, container){
if (container == this$static.escalator.body_0) {
return $clinit_Grid$Section() , BODY;
}
else if (container == this$static.escalator.footer) {
return $clinit_Grid$Section() , FOOTER;
}
else if (container == this$static.escalator.header) {
return $clinit_Grid$Section() , HEADER;
}
return null;
}
function $getSortOrder(this$static, column){
var order, order$iterator;
for (order$iterator = new Collections$UnmodifiableCollectionIterator(unmodifiableList(this$static.sortOrder_0).coll.iterator()); order$iterator.it.hasNext_0();) {
order = castTo(order$iterator.it.next_1(), 71);
if (order.column_0 == column) {
return order;
}
}
return null;
}
function $getVisibleColumn(this$static, index_0){
var visibleColumns;
visibleColumns = $getVisibleColumns(this$static);
if (index_0 < 0 || index_0 >= visibleColumns.coll.size_2()) {
throw new IllegalStateException_0('Column not found.');
}
return castTo(visibleColumns.list.get_1(index_0), 21);
}
function $getVisibleColumns(this$static){
var c, c$iterator, visible;
visible = new ArrayList;
for (c$iterator = new ArrayList$1(this$static.columns); c$iterator.i < c$iterator.this$01.array.length;) {
c = castTo($next_3(c$iterator), 21);
c.hidden_0 || (setCheck(visible.array, visible.array.length, c) , true);
}
return $clinit_Collections() , new Collections$UnmodifiableRandomAccessList(visible);
}
function $getVisibleFrozenColumnCount(this$static){
var i_0, numberOfColumns;
numberOfColumns = this$static.frozenColumnCount;
for (i_0 = 0; i_0 < this$static.frozenColumnCount; i_0++) {
$getColumn(this$static, i_0).hidden_0 && --numberOfColumns;
}
numberOfColumns == -1?(numberOfColumns = 0):!!this$static.selectionColumn && ++numberOfColumns;
return numberOfColumns;
}
function $handleHeaderCellDragStartEvent(this$static, event_0, container){
if (!this$static.columnReorderingAllowed) {
return false;
}
if (container != this$static.escalator.header) {
return false;
}
if (this$static.eventCell.columnIndex < this$static.escalator.columnConfiguration.frozenColumns) {
return false;
}
$clinit_DOM();
if ($eventGetTypeInt(($clinit_DOMImpl() , event_0).type) == 4 && impl_0.eventGetButton(event_0) == 1 || $eventGetTypeInt(event_0.type) == $intern_26) {
$onDragStartOnDraggableElement(this$static.dndHandler, event_0, this$static.headerCellDndCallback);
impl_0.eventPreventDefault(event_0);
event_0.stopPropagation();
return true;
}
return false;
}
function $handleHeaderDefaultRowEvent(this$static, event_0, container){
var diffX, diffY, touch;
if (container != this$static.escalator.header) {
return false;
}
if (!castTo($getRow_0(this$static.header, this$static.eventCell.rowReference.rowIndex_0), 52).isDefault) {
return false;
}
if (!this$static.eventCell.column_0.sortable_0) {
return false;
}
$equals_2('mousedown', ($clinit_DOMImpl() , event_0).type) && !!event_0.shiftKey && impl_0.eventPreventDefault(event_0);
if ($equals_2('touchstart', event_0.type)) {
if (event_0.touches.length > 1) {
return false;
}
impl_0.eventPreventDefault(event_0);
touch = event_0.changedTouches[0];
this$static.rowEventTouchStartingPoint = new Point(toInt32(touch.clientX || 0), toInt32(touch.clientY || 0));
$sortAfterDelay(this$static.sorter);
return true;
}
else if ($equals_2('touchmove', event_0.type)) {
if (event_0.touches.length > 1) {
return false;
}
impl_0.eventPreventDefault(event_0);
touch = event_0.changedTouches[0];
diffX = abs_0(toInt32(touch.clientX || 0) - this$static.rowEventTouchStartingPoint.x_0);
diffY = abs_0(toInt32(touch.clientY || 0) - this$static.rowEventTouchStartingPoint.y_0);
(diffX > 3 || diffY > 3) && $cancel_0(this$static.sorter.timer);
return true;
}
else if ($equals_2('touchend', event_0.type)) {
if (event_0.touches.length > 1) {
return false;
}
if (this$static.sorter.timer.timerId) {
$cancel_0(this$static.sorter.timer);
$sort_0(this$static.sorter, this$static.eventCell.column_0, false);
}
return true;
}
else if ($equals_2('touchcancel', event_0.type)) {
if (event_0.touches.length > 1) {
return false;
}
$cancel_0(this$static.sorter.timer);
return true;
}
else if ($equals_2('click', event_0.type)) {
$sort_0(this$static.sorter, this$static.eventCell.column_0, !!event_0.shiftKey);
return false;
}
else {
return false;
}
}
function $handleRendererEvent(this$static, event_0, container){
var cplxRenderer, gridColumn;
if (container == this$static.escalator.body_0) {
gridColumn = this$static.eventCell.column_0;
$equals_2(($clinit_DOMImpl() , event_0).type, 'keydown') && (event_0.keyCode | 0) == 13;
$equals_2(event_0.type, 'dblclick');
if (instanceOf(gridColumn.bodyRenderer, 48)) {
cplxRenderer = castTo(gridColumn.bodyRenderer, 48);
if (cplxRenderer.getConsumedEvents().contains_0(event_0.type)) {
if (cplxRenderer.onBrowserEvent_0(this$static.eventCell, event_0)) {
return true;
}
}
}
}
return false;
}
function $isElementInChildWidget(this$static, e){
var w;
w = findWidget(e, null);
if (w == this$static) {
return false;
}
while (!!w && w != this$static) {
w = w.parent_0;
}
return !!w;
}
function $isOrContainsInSpacer(this$static, node){
var className, isElement, n;
n = node;
while (!!n && n != ($clinit_DOM() , this$static.element)) {
isElement = !!n && n.nodeType == 1;
if (isElement) {
className = n.className || '';
if (indexOf(className, getStylePrimaryName(($clinit_DOM() , this$static.element)) + '-spacer') != -1) {
return true;
}
}
n = n.parentNode;
}
return false;
}
function $isSelected_0(this$static, row){
return this$static.selectionModel.isSelected(row);
}
function $isWorkPending_1(this$static){
return $isWorkPending_0(this$static.escalator) || this$static.dataIsBeingFetched || this$static.autoColumnWidthsRecalculator.isScheduled;
}
function $onBrowserEvent_1(this$static, event_0){
var cell, container, e, eventType, target, navigation;
if (!this$static.enabled) {
return;
}
eventType = ($clinit_DOMImpl() , event_0).type;
if ($equals_2(eventType, 'focus') || $equals_2(eventType, 'blur')) {
$onBrowserEvent(this$static, event_0);
this$static.widget.onBrowserEvent(event_0);
return;
}
target = impl_0.eventGetTarget(event_0);
if (!is_0(target) || $isOrContainsInSpacer(this$static, target)) {
return;
}
e = target;
container = $findRowContainer(this$static.escalator, e);
if (!container) {
if ($equals_2(eventType, 'keydown') || $equals_2(eventType, 'keyup') || $equals_2(eventType, 'keypress')) {
cell = $getFocusedCell(this$static.cellFocusHandler);
container = this$static.cellFocusHandler.containerWithFocus;
}
else {
return;
}
}
else {
cell = container.getCell(e);
$equals_2(eventType, 'mousedown')?(this$static.cellOnPrevMouseDown = cell):!cell && $equals_2(eventType, 'click') && (cell = this$static.cellOnPrevMouseDown);
}
$set_3(this$static.eventCell, cell, $getSectionFromContainer(this$static, container));
if (this$static.editor.enabled && $handleEvent(this$static.editor.eventHandler, new Grid$EditorDomEvent(event_0, this$static.eventCell, $getWidget_0(this$static.editor, this$static.eventCell.column_0)))) {
return;
}
$onBrowserEvent(this$static, event_0);
this$static.widget.onBrowserEvent(event_0);
if (!$isElementInChildWidget(this$static, e)) {
if ($handleHeaderCellDragStartEvent(this$static, event_0, container)) {
return;
}
if ($handleHeaderDefaultRowEvent(this$static, event_0, container)) {
return;
}
if ($handleRendererEvent(this$static, event_0, container)) {
return;
}
if (navigation = new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['keydown', 'click'])) , $indexOf_1(navigation, event_0.type) != -1 && $handleNavigationEvent(this$static.cellFocusHandler, event_0, this$static.eventCell) , false) {
return;
}
}
}
function $refreshBody(this$static){
$refreshRows(this$static.escalator.body_0, 0, this$static.escalator.body_0.rows_0);
}
function $refreshFooter(this$static){
$refreshRowContainer(this$static.escalator.footer, this$static.footer);
}
function $refreshHeader(this$static){
$refreshRowContainer(this$static.escalator.header, this$static.header);
}
function $refreshRowContainer(rows_0, section){
var rowDiff, oldScrollPos;
rowDiff = (section.visible?section.rows_0.array.length:0) - rows_0.rows_0;
rowDiff > 0?($insertRows(rows_0, 0, rowDiff) , $recalculateElementSizes(rows_0.this$01_0)):rowDiff < 0 && (oldScrollPos = rows_0.this$01_0.verticalScrollbar.scrollPos , $removeRows(rows_0, 0, -rowDiff) , $recalculateElementSizes(rows_0.this$01_0) , $setScrollPos(rows_0.this$01_0.verticalScrollbar, oldScrollPos) , undefined);
rows_0.rows_0 > 0 && $refreshRows(rows_0, 0, rows_0.rows_0);
}
function $removeColumn(this$static, column){
if (!!column && column == this$static.selectionColumn) {
throw new IllegalArgumentException('The selection column may not be removed manually.');
}
$removeColumnSkipSelectionColumnCheck(this$static, column);
}
function $removeColumnSkipSelectionColumnCheck(this$static, column){
var columnIndex;
columnIndex = $indexOf_2(this$static.columns, column, 0);
$removeColumns(this$static.escalator.columnConfiguration, $indexOf_3($getVisibleColumns(this$static), column), 1);
$setFrozenColumnCount(this$static.escalator.columnConfiguration, $getVisibleFrozenColumnCount(this$static));
$removeColumn_0(this$static.header, column);
$removeColumn_0(this$static.footer, column);
$setGrid_1(column, null);
$remove_9(this$static.columns, columnIndex);
column.hidable_0 && $removeColumnHidingToggle(this$static.columnHider, column);
}
function $removeFooterRow(this$static, rowIndex){
$removeRow(this$static.footer, rowIndex);
}
function $removeHeaderRow(this$static, rowIndex){
$removeRow_0(this$static.header, rowIndex);
}
function $scrollToEnd(this$static){
$scrollToRow(this$static, this$static.escalator.body_0.rows_0 - 1, ($clinit_ScrollDestination() , END));
}
function $scrollToRow(this$static, rowIndex, destination){
$scrollToRow_0(this$static, rowIndex, destination, destination == ($clinit_ScrollDestination() , MIDDLE)?0:0);
}
function $scrollToRow_0(this$static, rowIndex, destination, paddingPx){
var maxsize;
maxsize = this$static.escalator.body_0.rows_0 - 1;
if (rowIndex < 0) {
throw new IllegalArgumentException('Row index (' + rowIndex + ') is below zero!');
}
if (rowIndex > maxsize) {
throw new IllegalArgumentException('Row index (' + rowIndex + ') is above maximum (' + maxsize + ')!');
}
$scrollToRowAndSpacer(this$static.escalator, rowIndex, destination, paddingPx);
}
function $select_1(this$static, row){
if (instanceOf(this$static.selectionModel, 155)) {
return castTo(this$static.selectionModel, 155).select_2(row);
}
else if (instanceOf(this$static.selectionModel, 85)) {
return castTo(this$static.selectionModel, 85).select_1(singleton_0(row));
}
else {
throw new IllegalStateException_0('Unsupported selection model');
}
}
function $setCellStyleGenerator(this$static, cellStyleGenerator){
this$static.cellStyleGenerator = cellStyleGenerator;
$refreshRows(this$static.escalator.body_0, 0, this$static.escalator.body_0.rows_0);
}
function $setColumnOrder(this$static, orderedColumns){
var column, column$index, column$iterator, column$max, conf, i_0, newOrder, row, row$iterator, row$iterator0, visibleColumns;
conf = this$static.escalator.columnConfiguration;
$removeColumns(conf, 0, conf.columns.array.length);
newOrder = new ArrayList;
!!this$static.selectionColumn && $add_7(newOrder, this$static.selectionColumn);
i_0 = 0;
for (column$index = 0 , column$max = orderedColumns.length; column$index < column$max; ++column$index) {
column = orderedColumns[column$index];
if ($indexOf_2(this$static.columns, column, 0) != -1) {
setCheck(newOrder.array, newOrder.array.length, column);
++i_0;
}
else {
throw new IllegalArgumentException('Given column at index ' + i_0 + ' does not exist in Grid');
}
}
if (this$static.columns.array.length != newOrder.array.length) {
$removeAll(this$static.columns, newOrder);
$addAll_2(newOrder, this$static.columns);
}
this$static.columns = newOrder;
visibleColumns = $getVisibleColumns(this$static);
$insertColumns(conf, 0, visibleColumns.coll.size_2());
$setFrozenColumnCount(this$static.escalator.columnConfiguration, $getVisibleFrozenColumnCount(this$static));
for (column$iterator = new ArrayList$1(this$static.columns); column$iterator.i < column$iterator.this$01.array.length;) {
column = castTo($next_3(column$iterator), 21);
!!column.grid_0 && $schedule_0(column.grid_0.autoColumnWidthsRecalculator);
}
for (row$iterator0 = new ArrayList$1(this$static.header.rows_0); row$iterator0.i < row$iterator0.this$01.array.length;) {
row = castTo($next_3(row$iterator0), 52);
$calculateColspans(row);
}
for (row$iterator = new ArrayList$1(this$static.footer.rows_0); row$iterator.i < row$iterator.this$01.array.length;) {
row = castTo($next_3(row$iterator), 118);
$calculateColspans(row);
}
$updateTogglesOrder(this$static.columnHider);
$fireEvent_0(this$static, new ColumnReorderEvent);
}
function $setDataSource(this$static, dataSource){
var previousRowCount;
this$static.selectionModel.reset_1();
!!this$static.dataSource && $setDataChangeHandler(this$static.dataSource, null);
this$static.dataSource = dataSource;
$setDataChangeHandler(dataSource, new Grid$7(this$static, dataSource));
previousRowCount = this$static.escalator.body_0.rows_0;
previousRowCount != 0 && $removeRows(this$static.escalator.body_0, 0, previousRowCount);
$setEscalatorSizeFromDataSource(this$static);
}
function $setDefaultHeaderRow(this$static, row){
$setDefaultRow(this$static.header, row);
}
function $setDetailsGenerator(this$static, detailsGenerator){
var entry, index_0, index$iterator, outerIter;
if (!detailsGenerator) {
throw new IllegalArgumentException('Details generator may not be null');
}
for (index$iterator = (outerIter = (new AbstractMap$1(this$static.visibleDetails.map_0)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter)); index$iterator.val$outerIter2.hasNext_0();) {
index_0 = (entry = castTo(index$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getKey(), 22));
$setDetailsVisible(this$static, index_0.value_0, false);
}
this$static.detailsGenerator = detailsGenerator;
$setSpacerUpdater(this$static.escalator.body_0, this$static.gridSpacerUpdater);
}
function $setDetailsVisible(this$static, rowIndex, visible){
var isVisible, rowIndexInteger;
if (($clinit_DetailsGenerator() , NULL_1) == this$static.detailsGenerator) {
return;
}
rowIndexInteger = valueOf_2(rowIndex);
isVisible = $contains_1(this$static.visibleDetails, valueOf_2(rowIndex));
if (visible && !isVisible) {
$setSpacer(this$static.escalator.body_0, rowIndex, 50);
$add_9(this$static.visibleDetails, rowIndexInteger);
}
else if (!visible && isVisible) {
$setSpacer(this$static.escalator.body_0, rowIndex, -1);
$remove_14(this$static.visibleDetails, rowIndexInteger);
}
}
function $setEditorCancelCaption(this$static, cancelCaption){
$setCancelCaption(this$static.editor, cancelCaption);
}
function $setEditorEnabled(this$static, enabled){
$setEnabled_2(this$static.editor, enabled);
}
function $setEditorHandler(this$static, handler){
$setHandler(this$static.editor, handler);
}
function $setEditorSaveCaption(this$static, saveCaption){
$setSaveCaption(this$static.editor, saveCaption);
}
function $setEnabled_1(this$static, enabled){
var editorOpen;
if (enabled == this$static.enabled) {
return;
}
this$static.enabled = enabled;
$setTabIndex(($clinit_DOM() , this$static.element), enabled?0:-1);
editorOpen = this$static.editor.state_0 != ($clinit_Grid$Editor$State() , INACTIVE);
editorOpen && $setGridEnabled(this$static.editor, enabled);
$setScrollLocked(this$static.escalator, ($clinit_ScrollbarBundle$Direction() , VERTICAL), !enabled || editorOpen);
$setScrollLocked(this$static.escalator, HORIZONTAL, !enabled);
}
function $setEscalatorSizeFromDataSource(this$static){
var size_0;
size_0 = this$static.dataSource.size_0;
size_0 == -1 && $isAttached(this$static) && (size_0 = $getMaxEscalatorRowCapacity(this$static.escalator.body_0));
size_0 > 0 && $insertRows(this$static.escalator.body_0, 0, size_0);
}
function $setFooterVisible(this$static, visible){
$setVisible(this$static.footer, visible);
}
function $setFrozenColumnCount_0(this$static, numberOfColumns){
if (numberOfColumns < -1 || numberOfColumns > this$static.columns.array.length) {
throw new IllegalArgumentException('count must be between -1 and the current number of columns (' + this$static.columns.array.length + ')');
}
this$static.frozenColumnCount = numberOfColumns;
$setFrozenColumnCount(this$static.escalator.columnConfiguration, $getVisibleFrozenColumnCount(this$static));
}
function $setHeaderVisible(this$static, visible){
$setVisible(this$static.header, visible);
}
function $setHeight_2(this$static, height){
$setHeight_0(this$static.escalator, height);
}
function $setRowStyleGenerator(this$static, rowStyleGenerator){
this$static.rowStyleGenerator = rowStyleGenerator;
$refreshRows(this$static.escalator.body_0, 0, this$static.escalator.body_0.rows_0);
}
function $setScrollLeft_1(this$static, px){
$setScrollLeft_0(this$static.escalator, px);
}
function $setScrollTop_1(this$static, px){
$setScrollTop_0(this$static.escalator, px);
}
function $setSelectColumnRenderer(this$static, selectColumnRenderer){
var colToRemove;
if (this$static.selectColumnRenderer == selectColumnRenderer) {
return;
}
if (this$static.selectColumnRenderer) {
!!this$static.selectColumnRenderer && $destroy(this$static.selectColumnRenderer);
colToRemove = this$static.selectionColumn;
this$static.selectionColumn = null;
$removeColumnSkipSelectionColumnCheck(this$static, colToRemove);
$offsetRangeBy(this$static.cellFocusHandler, -1);
}
this$static.selectColumnRenderer = selectColumnRenderer;
if (selectColumnRenderer) {
$offsetRangeBy(this$static.cellFocusHandler, 1);
this$static.selectionColumn = new Grid$SelectionColumn(this$static, selectColumnRenderer);
$addColumnSkipSelectionColumnCheck(this$static, this$static.selectionColumn, 0);
$initDone(this$static.selectionColumn);
}
else {
this$static.selectionColumn = null;
$refreshRows(this$static.escalator.body_0, 0, this$static.escalator.body_0.rows_0);
}
$setFrozenColumnCount(this$static.escalator.columnConfiguration, $getVisibleFrozenColumnCount(this$static));
}
function $setSelectionMode(this$static){
var model;
model = new SelectionModelSingle;
$setSelectionModel(this$static, model);
}
function $setSelectionModel(this$static, selectionModel){
if (!selectionModel) {
throw new IllegalArgumentException("Selection model can't be null");
}
!!this$static.selectionModel && this$static.selectionModel.setGrid(null);
this$static.selectionModel = selectionModel;
selectionModel.setGrid(this$static);
$setSelectColumnRenderer(this$static, this$static.selectionModel.getSelectionColumnRenderer());
$refreshRows(this$static.escalator.body_0, 0, this$static.escalator.body_0.rows_0);
}
function $setSortOrder(this$static, order){
if (order != this$static.sortOrder_0) {
this$static.sortOrder_0.array = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_0, 1, 0, 4, 1);
$addAll_2(this$static.sortOrder_0, order);
}
$refreshRowContainer(this$static.escalator.header, this$static.header);
$fireEvent_0(this$static, new SortEvent(this$static, unmodifiableList(this$static.sortOrder_0), false));
}
function $setStylePrimaryName_9(this$static, style){
var rowStyle;
setStylePrimaryName(($clinit_DOM() , this$static.element), style);
$setStylePrimaryName_2(this$static.escalator, style);
$setStylePrimaryName_10(this$static.editor, style);
$setStylePrimaryName_11(this$static.sidebar_0, style + '-sidebar');
$addStyleName(this$static.sidebar_0, 'v-contextmenu');
rowStyle = getStylePrimaryName(this$static.element) + '-row';
this$static.rowHasDataStyleName = rowStyle + '-has-data';
this$static.rowSelectedStyleName = rowStyle + '-selected';
this$static.rowStripeStyleName = rowStyle + '-stripe';
this$static.cellFocusStyleName = getStylePrimaryName(this$static.element) + '-cell-focused';
this$static.rowFocusStyleName = getStylePrimaryName(this$static.element) + '-row-focused';
if ($isAttached(this$static)) {
$refreshRowContainer(this$static.escalator.header, this$static.header);
$refreshRows(this$static.escalator.body_0, 0, this$static.escalator.body_0.rows_0);
$refreshRowContainer(this$static.escalator.footer, this$static.footer);
}
}
function $sinkEvents(this$static, events){
var eventsToSink, typeInt, typeName, typeName$iterator;
eventsToSink = 0;
for (typeName$iterator = events.iterator(); typeName$iterator.hasNext_0();) {
typeName = castToString(typeName$iterator.next_1());
typeInt = $eventGetTypeInt(($clinit_DOM() , typeName));
typeInt < 0?sinkBitlessEvent(this$static.element, typeName):(eventsToSink |= typeInt);
}
eventsToSink > 0 && (this$static.eventsToSink == -1?sinkEvents(($clinit_DOM() , this$static.element), eventsToSink | (this$static.element.__eventBits || 0)):(this$static.eventsToSink |= eventsToSink));
}
function $sort(this$static){
$refreshRowContainer(this$static.escalator.header, this$static.header);
$fireEvent_0(this$static, new SortEvent(this$static, unmodifiableList(this$static.sortOrder_0), true));
}
function setCustomStyleName(element, styleName){
$clinit_UIObject();
var oldStyleName;
oldStyleName = $getPropertyString(element, 'customStyle');
if (!equals(oldStyleName, styleName)) {
oldStyleName != null && $removeClassName(element, oldStyleName);
styleName != null && $addClassName(element, styleName);
element['customStyle'] = styleName;
}
}
function setParent(widget, parent_0){
$clinit_UIObject();
widget.setParent(parent_0);
}
defineClass(281, 698, $intern_45);
_.add_0 = function(w){
throw new UnsupportedOperationException_0('Cannot add widgets to Grid with this method');
}
;
_.doAttachChildren = function(){
this.sidebar_0.parent_0 == this && (this.sidebar_0.onAttach() , undefined);
}
;
_.doDetachChildren = function(){
this.sidebar_0.parent_0 == this && (this.sidebar_0.onDetach() , undefined);
}
;
_.focus_1 = function(){
($clinit_DOM() , this.element).focus();
}
;
_.iterator = function(){
throw new UnsupportedOperationException_0('Cannot iterate through widgets in Grid this way');
}
;
_.onAttach = function(){
$onAttach_0(this);
this.escalator.body_0.rows_0 == 0 && !!this.dataSource && $setEscalatorSizeFromDataSource(this);
}
;
_.onBrowserEvent = function(event_0){
$onBrowserEvent_1(this, event_0);
}
;
_.onDetach = function(){
var details, entry, outerIter, row, row$iterator;
details = new HashSet_1(this.visibleDetails);
for (row$iterator = (outerIter = (new AbstractMap$1(details.map_0)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter)); row$iterator.val$outerIter2.hasNext_0();) {
row = (entry = castTo(row$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getKey(), 22)).value_0;
$setDetailsVisible(this, row, false);
}
$onDetach_0(this);
}
;
_.refreshFooter = function(){
$refreshFooter(this);
}
;
_.refreshHeader = function(){
$refreshHeader(this);
}
;
_.remove = function(w){
return false;
}
;
_.setFocus = function(focused){
focused?(($clinit_DOM() , this.element).focus() , undefined):(($clinit_DOM() , this.element).blur() , undefined);
}
;
_.columnReorderingAllowed = false;
_.dataIsBeingFetched = false;
_.enabled = true;
_.frozenColumnCount = 0;
_.selectColumnRenderer = null;
var Lcom_vaadin_client_widgets_Grid_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid', 281);
function $calculatePossibleDropPositions(this$static){
var cell, cellColumnIndex, cellColumnRightIndex, cellRange, colspan, column, draggedCellRange, draggedCellRow, draggedColumnIndex, draggedColumnRightIndex, frozenColumns, i_0, intersects, isDraggedCellRow, leftBound, position, rightBound, row, row$iterator, rows_0, unavailableColumnDropIndices;
$clear_2(this$static.possibleDropPositions);
draggedColumnIndex = this$static.this$01.eventCell.columnIndex;
draggedCellRow = $getRow_0(this$static.this$01.header, this$static.this$01.eventCell.rowReference.rowIndex_0);
draggedColumnRightIndex = draggedColumnIndex + $getCell_0(draggedCellRow, this$static.this$01.eventCell.column_0).colspan_0;
frozenColumns = this$static.this$01.selectionModel.getSelectionColumnRenderer()?max_2(0, this$static.this$01.frozenColumnCount) + 1:max_2(0, this$static.this$01.frozenColumnCount);
draggedCellRange = new Range_0(draggedColumnIndex, draggedColumnRightIndex);
leftBound = -1;
rightBound = this$static.this$01.columns.array.length + 1;
unavailableColumnDropIndices = new HashSet;
rows_0 = new ArrayList;
$addAll_2(rows_0, this$static.this$01.header.rows_0);
$addAll_2(rows_0, this$static.this$01.footer.rows_0);
for (row$iterator = new ArrayList$1(rows_0); row$iterator.i < row$iterator.this$01.array.length;) {
row = castTo($next_3(row$iterator), 67);
if ($size(row.cellGroups) == 0) {
continue;
}
isDraggedCellRow = row == draggedCellRow;
for (cellColumnIndex = frozenColumns; cellColumnIndex < this$static.this$01.columns.array.length; cellColumnIndex++) {
cell = $getCell_0(row, $getColumn(this$static.this$01, cellColumnIndex));
colspan = cell.colspan_0;
if (colspan <= 1) {
continue;
}
cellColumnRightIndex = cellColumnIndex + colspan;
cellRange = new Range_0(cellColumnIndex, cellColumnRightIndex);
intersects = draggedCellRange.start_0 < cellRange.end && cellRange.start_0 < draggedCellRange.end;
if (intersects && !isDraggedCellRow) {
if ($isSubsetOf(cellRange, draggedCellRange)) {
cellColumnIndex = cellColumnRightIndex - 1;
continue;
}
if (!$isSubsetOf(draggedCellRange, cellRange)) {
return;
}
cellColumnIndex <= draggedColumnIndex && cellColumnIndex > leftBound && (leftBound = cellColumnIndex);
cellColumnRightIndex < rightBound && (rightBound = cellColumnRightIndex);
cellColumnIndex = cellColumnRightIndex - 1;
}
else {
while (colspan > 1) {
++cellColumnIndex;
--colspan;
$add_9(unavailableColumnDropIndices, valueOf_2(cellColumnIndex));
}
}
}
}
if (leftBound == rightBound - 1) {
return;
}
position = $getFrozenColumnsWidth_0(this$static);
for (i_0 = frozenColumns; i_0 < this$static.this$01.columns.array.length; i_0++) {
column = $getColumn(this$static.this$01, i_0);
!$contains_1(unavailableColumnDropIndices, valueOf_2(i_0)) && !column.hidden_0 && (leftBound != -1?i_0 >= leftBound && i_0 <= rightBound && $put_6(this$static.possibleDropPositions, position, valueOf_2(i_0)):$put_6(this$static.possibleDropPositions, position, valueOf_2(i_0)));
position += $getWidthActual(column);
}
leftBound == -1 && $put_6(this$static.possibleDropPositions, position, valueOf_2(this$static.this$01.columns.array.length));
}
function $getFrozenColumnsWidth_0(this$static){
var i_0, value_0;
value_0 = $getMultiSelectColumnWidth_0(this$static);
for (i_0 = 0; i_0 < this$static.this$01.frozenColumnCount; i_0++) {
value_0 += $getWidthActual($getColumn(this$static.this$01, i_0));
}
return value_0;
}
function $getMultiSelectColumnWidth_0(this$static){
if (this$static.this$01.selectionModel.getSelectionColumnRenderer()) {
return ($getFirstChildElement($getFirstChildElement(this$static.this$01.escalator.header.root)).offsetWidth || 0) | 0;
}
return 0;
}
function $getSidebarBoundaryComparedTo(this$static, left){
var absoluteLeft, diff, sidebarLeft;
if (this$static.this$01.eventCell.rowReference.rowIndex_0 == 0 && !!this$static.this$01.sidebar_0.parent_0 && !$isOpen(this$static.this$01.sidebar_0)) {
absoluteLeft = left + $getAbsoluteLeft($getElement(this$static.this$01));
sidebarLeft = $getAbsoluteLeft($getElement(this$static.this$01.sidebar_0));
diff = absoluteLeft - sidebarLeft;
if (diff > 0) {
return left - diff;
}
}
return $intern_46;
}
function $initHeaderDragElementDOM(this$static){
var i_0, topOffset;
if (!this$static.table) {
this$static.tableHeader = ($clinit_DOM() , $createTHeadElement($doc));
this$static.dropMarker = $createDivElement($doc);
$appendChild(this$static.tableHeader, this$static.dropMarker);
this$static.table = $createTableElement($doc);
$appendChild(this$static.table, this$static.tableHeader);
this$static.table.className = 'header-drag-table';
}
$setClassName(this$static.tableHeader, this$static.this$01.escalator.header.root.className || '');
$setClassName(this$static.dropMarker, getStylePrimaryName($getStyleElement(this$static.this$01)) + '-drop-marker');
topOffset = 0;
for (i_0 = 0; i_0 < this$static.this$01.eventCell.rowReference.rowIndex_0; i_0++) {
topOffset += ($getFirstChildElement($getTrByVisualIndex(this$static.this$01.escalator.header, i_0)).offsetHeight || 0) | 0;
}
this$static.tableHeader.style['top'] = topOffset + ($clinit_Style$Unit() , 'px');
$appendChild($getElement(this$static.this$01), this$static.table);
this$static.dropMarkerWidthOffset = getRequiredWidthBoundingClientRectDouble(this$static.dropMarker) / 2;
}
function $onDragCancel(this$static){
!this$static.columnSortPreventRegistration && (this$static.columnSortPreventRegistration = addNativePreviewHandler(new Grid$1$2(this$static)));
$stop(this$static.this$01.autoScroller);
}
function $onDragEnd(this$static){
$removeFromParent(this$static.table);
$removeFromParent(this$static.dragElement);
$removeClassName(this$static.this$01.eventCell.element, 'dragged');
}
function $onDragStart(this$static, startingEvent){
$calculatePossibleDropPositions(this$static);
if (this$static.possibleDropPositions.size_0 == 0) {
return false;
}
$initHeaderDragElementDOM(this$static);
this$static.dragElement = ($clinit_DOM() , this$static.this$01.eventCell.element.cloneNode(true));
this$static.dragElement.style['width'] = '';
this$static.dropMarker.style['height'] = $getHeight(this$static.dragElement.style);
$appendChild(this$static.tableHeader, this$static.dragElement);
$addClassName(this$static.this$01.eventCell.element, 'dragged');
$addClassName(this$static.dragElement, 'dragged-column-header');
this$static.this$01.autoScroller.scrollAreaPX = 60;
$start(this$static.this$01.autoScroller, startingEvent, ($clinit_AutoScroller$ScrollAxis() , HORIZONTAL_0), this$static.autoScrollerCallback);
return true;
}
function $onDragUpdate(this$static, event_0){
if (event_0) {
this$static.clientX_0 = ($clinit_WidgetUtil() , getTouchOrMouseClientX(event_0.nativeEvent));
this$static.autoScrollX = 0;
}
$resolveDragElementHorizontalPosition(this$static, this$static.clientX_0);
$updateDragDropMarker(this$static, this$static.clientX_0);
}
function $onDrop(this$static){
var array, colspan, columns, draggedColumnIndex, focusedCell, reordered;
draggedColumnIndex = this$static.this$01.eventCell.columnIndex;
colspan = castTo($getCell_0(castTo($getRow_0(this$static.this$01.header, this$static.this$01.eventCell.rowReference.rowIndex_0), 52), this$static.this$01.eventCell.column_0), 63).colspan_0;
if (this$static.latestColumnDropIndex != draggedColumnIndex && this$static.latestColumnDropIndex != draggedColumnIndex + colspan) {
columns = unmodifiableList(new ArrayList_1(this$static.this$01.columns));
reordered = new ArrayList;
if (draggedColumnIndex < this$static.latestColumnDropIndex) {
$addAll_2(reordered, new Collections$UnmodifiableList(columns.list.subList(0, draggedColumnIndex)));
$addAll_2(reordered, $subList(columns, draggedColumnIndex + colspan, this$static.latestColumnDropIndex));
$addAll_2(reordered, new Collections$UnmodifiableList(columns.list.subList(draggedColumnIndex, draggedColumnIndex + colspan)));
$addAll_2(reordered, $subList(columns, this$static.latestColumnDropIndex, columns.coll.size_2()));
}
else {
$addAll_2(reordered, $subList(columns, 0, this$static.latestColumnDropIndex));
$addAll_2(reordered, new Collections$UnmodifiableList(columns.list.subList(draggedColumnIndex, draggedColumnIndex + colspan)));
$addAll_2(reordered, $subList(columns, this$static.latestColumnDropIndex, draggedColumnIndex));
$addAll_2(reordered, $subList(columns, draggedColumnIndex + colspan, columns.coll.size_2()));
}
$remove_10(reordered, this$static.this$01.selectionColumn);
focusedCell = $getFocusedCell(this$static.this$01.cellFocusHandler);
this$static.focusedColumnIndex = $indexOf_3(unmodifiableList(new ArrayList_1(this$static.this$01.columns)), $getVisibleColumn(this$static.this$01, focusedCell.column_0));
array = castTo($toArray_1(reordered, initUnidimensionalArray(Lcom_vaadin_client_widgets_Grid$Column_2_classLit, {246:1, 3:1, 4:1}, 21, reordered.array.length, 0, 1)), 246);
$setColumnOrder(this$static.this$01, array);
$transferCellFocusOnDrop(this$static);
}
}
function $resolveDragElementHorizontalPosition(this$static, clientX){
var frozenColumnsWidth, gridBoundary, left, leftBound, rightBound, rightBoundary, scrollLeft, sidebarBoundary;
left = clientX - $getAbsoluteLeft(this$static.table);
leftBound = castToDouble(getKeyOrNSE($getFirstEntry(this$static.possibleDropPositions)));
rightBound = castToDouble(getKeyOrNSE($getLastEntry(this$static.possibleDropPositions)));
scrollLeft = this$static.this$01.escalator.horizontalScrollbar.scrollPos;
left + scrollLeft < (checkCriticalNotNull(leftBound) , leftBound)?(left = (checkCriticalNotNull(leftBound) , leftBound) - scrollLeft + this$static.autoScrollX):left + scrollLeft > (checkCriticalNotNull(rightBound) , rightBound) && (left = (checkCriticalNotNull(rightBound) , rightBound) - scrollLeft + this$static.autoScrollX);
sidebarBoundary = $getSidebarBoundaryComparedTo(this$static, left);
gridBoundary = getRequiredWidthBoundingClientRectDouble(this$static.this$01.escalator.tableWrapper);
rightBoundary = sidebarBoundary < gridBoundary?sidebarBoundary:gridBoundary;
frozenColumnsWidth = round_int($getFrozenColumnsWidth_0(this$static));
left = frozenColumnsWidth > (left < rightBoundary?left:rightBoundary)?frozenColumnsWidth:left < rightBoundary?left:rightBoundary;
left -= (this$static.dragElement.clientWidth | 0) / 2 | 0;
this$static.dragElement.style['left'] = left + ($clinit_Style$Unit() , 'px');
}
function $transferCellFocusOnDrop(this$static){
var adjustedDropIndex, draggedColumnIndex, focusedCell, focusedColumnIndexDOM, focusedRowIndex, rowContainer;
focusedCell = $getFocusedCell(this$static.this$01.cellFocusHandler);
focusedColumnIndexDOM = focusedCell.column_0;
focusedRowIndex = focusedCell.row_0;
draggedColumnIndex = this$static.this$01.eventCell.columnIndex;
rowContainer = $findRowContainer(this$static.this$01.escalator, focusedCell.element);
if (this$static.focusedColumnIndex == draggedColumnIndex) {
adjustedDropIndex = this$static.latestColumnDropIndex > draggedColumnIndex?this$static.latestColumnDropIndex - 1:this$static.latestColumnDropIndex;
adjustedDropIndex = $indexOf_3($getVisibleColumns(this$static.this$01), $getColumn(this$static.this$01, adjustedDropIndex));
$setCellFocus(this$static.this$01.cellFocusHandler, focusedRowIndex, adjustedDropIndex, rowContainer);
}
else
this$static.latestColumnDropIndex <= this$static.focusedColumnIndex && draggedColumnIndex > this$static.focusedColumnIndex?$setCellFocus(this$static.this$01.cellFocusHandler, focusedRowIndex, focusedColumnIndexDOM + 1, rowContainer):this$static.latestColumnDropIndex > this$static.focusedColumnIndex && draggedColumnIndex < this$static.focusedColumnIndex && $setCellFocus(this$static.this$01.cellFocusHandler, focusedRowIndex, focusedColumnIndexDOM - 1, rowContainer);
}
function $updateDragDropMarker(this$static, clientX){
var cellEdgeOnLeft, cellEdgeOnRight, cursorXCoordinate, diffToLeftEdge, diffToRightEdge, dropMarkerLeft, frozenColumnsWidth, rightBoundaryForDrag, scrollLeft, visibleColumns;
scrollLeft = this$static.this$01.escalator.horizontalScrollbar.scrollPos;
cursorXCoordinate = clientX - $getAbsoluteLeft(this$static.this$01.escalator.header.root);
cellEdgeOnRight = copyOf($getNodeAfter(this$static.possibleDropPositions, cursorXCoordinate, true));
cellEdgeOnLeft = copyOf($getNodeBefore(this$static.possibleDropPositions, cursorXCoordinate));
diffToRightEdge = !cellEdgeOnRight?$intern_46:checkNotNull(castToDouble(cellEdgeOnRight.key)) - cursorXCoordinate;
diffToLeftEdge = !cellEdgeOnLeft?$intern_46:cursorXCoordinate - checkNotNull(castToDouble(cellEdgeOnLeft.key));
dropMarkerLeft = 0 - scrollLeft;
if (diffToRightEdge > diffToLeftEdge) {
this$static.latestColumnDropIndex = castTo(cellEdgeOnLeft.value_0, 22).value_0;
dropMarkerLeft += checkNotNull(castToDouble(cellEdgeOnLeft.key));
}
else {
this$static.latestColumnDropIndex = castTo(cellEdgeOnRight.value_0, 22).value_0;
dropMarkerLeft += checkNotNull(castToDouble(cellEdgeOnRight.key));
}
dropMarkerLeft += this$static.autoScrollX;
frozenColumnsWidth = $getFrozenColumnsWidth_0(this$static);
rightBoundaryForDrag = $getSidebarBoundaryComparedTo(this$static, dropMarkerLeft);
visibleColumns = $getVisibleColumns(this$static.this$01).coll.size_2();
this$static.latestColumnDropIndex == visibleColumns && rightBoundaryForDrag < dropMarkerLeft && dropMarkerLeft <= getRequiredWidthBoundingClientRectDouble(this$static.this$01.escalator.tableWrapper)?(dropMarkerLeft = rightBoundaryForDrag - this$static.dropMarkerWidthOffset):(dropMarkerLeft < frozenColumnsWidth || dropMarkerLeft > min_0(rightBoundaryForDrag, getRequiredWidthBoundingClientRectDouble(this$static.this$01.escalator.tableWrapper)) || dropMarkerLeft < 0) && (dropMarkerLeft = -10000000);
this$static.dropMarker.style['left'] = dropMarkerLeft + ($clinit_Style$Unit() , 'px');
}
function Grid$1(this$0){
this.this$01 = this$0;
this.autoScrollerCallback = new Grid$1$1(this);
this.possibleDropPositions = new TreeMap;
}
defineClass(324, 1, {}, Grid$1);
_.autoScrollX = 0;
_.clientX_0 = 0;
_.dropMarkerWidthOffset = 0;
_.focusedColumnIndex = 0;
_.latestColumnDropIndex = 0;
var Lcom_vaadin_client_widgets_Grid$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/1', 324);
function $onAutoScroll(this$static, scrollDiff){
this$static.this$11.autoScrollX = scrollDiff;
$onDragUpdate(this$static.this$11, null);
}
function $onAutoScrollReachedMax(this$static){
this$static.this$11.autoScrollX = 0;
$updateDragDropMarker(this$static.this$11, this$static.this$11.clientX_0);
}
function $onAutoScrollReachedMin(this$static){
this$static.this$11.autoScrollX = 0;
$updateDragDropMarker(this$static.this$11, this$static.this$11.clientX_0);
}
function Grid$1$1(this$1){
this.this$11 = this$1;
}
defineClass(325, 1, {}, Grid$1$1);
var Lcom_vaadin_client_widgets_Grid$1$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/1/1', 325);
function Grid$1$2(this$1){
this.this$11 = this$1;
}
defineClass(326, 1, $intern_42, Grid$1$2);
_.onPreviewNativeEvent = function(event_0){
if ($getTypeInt(event_0.nativeEvent) == 1) {
event_0.isCanceled = true;
$preventDefault(event_0.nativeEvent);
$removeHandler(this.this$11.columnSortPreventRegistration.real);
this.this$11.columnSortPreventRegistration = null;
}
}
;
var Lcom_vaadin_client_widgets_Grid$1$2_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/1/2', 326);
function Grid$2(this$0){
this.this$01 = this$0;
}
defineClass(327, 1, $intern_43, Grid$2);
_.onScroll = function(event_0){
$fireEvent_0(this.this$01, new ScrollEvent);
}
;
var Lcom_vaadin_client_widgets_Grid$2_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/2', 327);
function $onRowVisibilityChange(this$static, event_0){
if (!!this$static.this$01.dataSource && this$static.this$01.dataSource.size_0 != 0) {
this$static.this$01.dataIsBeingFetched = true;
$ensureAvailability(this$static.this$01.dataSource, event_0.firstVisibleRow, event_0.visibleRowCount);
}
}
function Grid$3(this$0){
this.this$01 = this$0;
}
defineClass(328, 1, {15:1, 746:1}, Grid$3);
var Lcom_vaadin_client_widgets_Grid$3_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/3', 328);
function Grid$4(this$0){
this.this$01 = this$0;
}
defineClass(329, 1, {15:1, 680:1}, Grid$4);
_.onSelect = function(event_0){
$refreshBody(this.this$01);
}
;
var Lcom_vaadin_client_widgets_Grid$4_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/4', 329);
function Grid$5(this$0){
this.this$01 = this$0;
}
defineClass(330, 1, $intern_47, Grid$5);
_.onKeyUp = function(event_0){
if ($getKeyCode(event_0.nativeEvent) != 13) {
return;
}
castTo($getRow_0(this.this$01.header, event_0.targetCell.rowReference.rowIndex_0), 52).isDefault && $sort_0(this.this$01.sorter, event_0.targetCell.column_0, $getShiftKey(event_0.nativeEvent));
}
;
var Lcom_vaadin_client_widgets_Grid$5_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/5', 330);
function Grid$6(this$0){
this.this$01 = this$0;
}
defineClass(331, 1, $intern_44, Grid$6);
_.onDataAvailable = function(event_0){
this.this$01.dataIsBeingFetched = false;
}
;
var Lcom_vaadin_client_widgets_Grid$6_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/6', 331);
function $dataAvailable(this$static, firstIndex, numberOfItems){
this$static.this$01.currentDataAvailable = withLength(firstIndex, numberOfItems);
$fireEvent_0(this$static.this$01, new DataAvailableEvent(this$static.this$01.currentDataAvailable));
}
function $dataUpdated(this$static, firstIndex, numberOfItems){
$refreshRows(this$static.this$01.escalator.body_0, firstIndex, numberOfItems);
}
function $resetDataAndSize_0(this$static, newSize){
var body_0, entry, i_0, i$iterator, oldDetails, oldSize, outerIter, visibleRowRange;
body_0 = this$static.this$01.escalator.body_0;
oldSize = body_0.rows_0;
oldDetails = new HashSet_1(this$static.this$01.visibleDetails);
for (i$iterator = (outerIter = (new AbstractMap$1(oldDetails.map_0)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter)); i$iterator.val$outerIter2.hasNext_0();) {
i_0 = (entry = castTo(i$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getKey(), 22)).value_0;
$setDetailsVisible(this$static.this$01, i_0, false);
}
if (newSize > oldSize) {
$insertRows(body_0, oldSize, newSize - oldSize);
$rowsAddedToBody(this$static.this$01.cellFocusHandler, withLength(oldSize, newSize - oldSize));
}
else if (newSize < oldSize) {
$removeRows(body_0, newSize, oldSize - newSize);
$rowsRemovedFromBody(this$static.this$01.cellFocusHandler, withLength(newSize, oldSize - newSize));
}
if (newSize > 0) {
this$static.this$01.dataIsBeingFetched = true;
visibleRowRange = $getVisibleRowRange(this$static.this$01.escalator);
$ensureAvailability(this$static.val$dataSource2, visibleRowRange.start_0, visibleRowRange.end - visibleRowRange.start_0);
}
else {
this$static.this$01.currentDataAvailable = withLength(0, 0);
$fireEvent_0(this$static.this$01, new DataAvailableEvent(this$static.this$01.currentDataAvailable));
}
}
function Grid$7(this$0, val$dataSource){
this.this$01 = this$0;
this.val$dataSource2 = val$dataSource;
}
defineClass(332, 1, {}, Grid$7);
var Lcom_vaadin_client_widgets_Grid$7_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/7', 332);
function Grid$8(this$0, val$handler){
this.this$01 = this$0;
this.val$handler2 = val$handler;
}
defineClass(333, 1, {}, Grid$8);
_.execute_1 = function(){
this.this$01.dataIsBeingFetched || this.val$handler2.onDataAvailable(new DataAvailableEvent(this.this$01.currentDataAvailable));
}
;
var Lcom_vaadin_client_widgets_Grid$8_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/8', 333);
function $applyColumnWidths(this$static){
var actualWidth, column, columns, constrainedWidths, hasAutoWidth, index_0, index0, maxWidth, minWidth, selfWidths;
selfWidths = new LinkedHashMap;
columns = $getVisibleColumns(this$static.this$01);
for (index0 = 0; index0 < columns.coll.size_2(); index0++) {
$put_5(selfWidths, valueOf_2(index0), castTo(columns.list.get_1(index0), 21).widthUser);
}
$setColumnWidths(this$static.this$01.escalator.columnConfiguration, selfWidths);
constrainedWidths = new LinkedHashMap;
for (index_0 = 0; index_0 < columns.coll.size_2(); index_0++) {
column = castTo(columns.list.get_1(index_0), 21);
hasAutoWidth = column.widthUser < 0;
if (!hasAutoWidth) {
continue;
}
actualWidth = $getWidthActual(column);
actualWidth < (minWidth = column.getMinimumWidth() , minWidth >= 0?minWidth:4.9E-324)?$put_5(constrainedWidths, valueOf_2(index_0), column.getMinimumWidth()):actualWidth > (maxWidth = column.getMaximumWidth() , maxWidth >= 0?maxWidth:$intern_46) && $put_5(constrainedWidths, valueOf_2(index_0), column.getMaximumWidth());
}
$setColumnWidths(this$static.this$01.escalator.columnConfiguration, constrainedWidths);
}
function $applyColumnWidthsWithExpansion(this$static){
var aColumnHasMaxedOut, autoWidth, colIndex, column, column$iterator, column$iterator0, column$iterator1, column$iterator2, column$iterator3, column$iterator4, columnIndex, columnSizes, columnsToExpand, currentWidth, defaultExpandRatios, entry, expandRatio, expandRatio0, expandedWidth, hasAutoWidth, i_0, isFixedWidth, leftOver, maxWidth, maxWidth0, minWidth, minWidth0, minWidthsCausedReflows, newWidth, nonFixedColumns, outerIter, outerIter0, outerIter1, pixelsToDistribute, pixelsToRemove, pixelsToRemoveFromOtherColumns, pixelsToRemovePerRatio, reservedPixels, shouldExpand, totalRatios, totalWidth, visibleColumns, widthAsIs, widthFixed, widthPerRatio, widthPerRatio0;
defaultExpandRatios = true;
totalRatios = 0;
reservedPixels = 0;
columnsToExpand = new HashSet;
nonFixedColumns = new ArrayList;
columnSizes = new HashMap;
visibleColumns = $getVisibleColumns(this$static.this$01);
for (column$iterator0 = new Collections$UnmodifiableCollectionIterator(visibleColumns.coll.iterator()); column$iterator0.it.hasNext_0();) {
column = castTo(column$iterator0.it.next_1(), 21);
widthAsIs = column.widthUser;
isFixedWidth = widthAsIs >= 0;
widthFixed = max_1(min_0((maxWidth = column.getMaximumWidth() , maxWidth >= 0?maxWidth:$intern_46), widthAsIs), column.getMinimumWidth());
defaultExpandRatios = defaultExpandRatios && (column.getExpandRatio() == -1 || column == this$static.this$01.selectionColumn);
if (isFixedWidth) {
$put_2(columnSizes, valueOf_2(visibleColumns.list.indexOf_0(column)), widthFixed);
reservedPixels += widthFixed;
}
else {
setCheck(nonFixedColumns.array, nonFixedColumns.array.length, column);
$put_2(columnSizes, valueOf_2(visibleColumns.list.indexOf_0(column)), -1);
}
}
$setColumnWidths(this$static.this$01.escalator.columnConfiguration, columnSizes);
for (column$iterator1 = new ArrayList$1(nonFixedColumns); column$iterator1.i < column$iterator1.this$01.array.length;) {
column = castTo($next_3(column$iterator1), 21);
expandRatio = defaultExpandRatios?1:column.getExpandRatio();
maxWidth0 = (maxWidth = column.getMaximumWidth() , maxWidth >= 0?maxWidth:$intern_46);
newWidth = min_0(maxWidth0, $getWidthActual(column));
shouldExpand = newWidth < maxWidth0 && expandRatio > 0 && column != this$static.this$01.selectionColumn;
if (shouldExpand) {
totalRatios += expandRatio;
columnsToExpand.map_0.put(column, columnsToExpand);
}
reservedPixels += newWidth;
$put_2(columnSizes, valueOf_2(visibleColumns.list.indexOf_0(column)), newWidth);
}
pixelsToDistribute = getRequiredWidthBoundingClientRectDouble(this$static.this$01.escalator.tableWrapper) - reservedPixels;
if (pixelsToDistribute <= 0 || totalRatios <= 0) {
pixelsToDistribute <= 0 && $setColumnWidths(this$static.this$01.escalator.columnConfiguration, columnSizes);
return;
}
do {
aColumnHasMaxedOut = false;
widthPerRatio0 = pixelsToDistribute / totalRatios;
i_0 = (outerIter0 = (new AbstractMap$1(columnsToExpand.map_0)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter0));
while (i_0.val$outerIter2.hasNext_0()) {
column = (entry = castTo(i_0.val$outerIter2.next_1(), 9) , castTo(entry.getKey(), 21));
expandRatio0 = (expandRatio = column.getExpandRatio() , expandRatio > 0?expandRatio:expandRatio < 0?1:0);
columnIndex = visibleColumns.list.indexOf_0(column);
autoWidth = checkNotNull(castToDouble($get_5(columnSizes, valueOf_2(columnIndex))));
maxWidth0 = (maxWidth = column.getMaximumWidth() , maxWidth >= 0?maxWidth:$intern_46);
expandedWidth = autoWidth + widthPerRatio0 * expandRatio0;
if (maxWidth0 <= expandedWidth) {
i_0.val$outerIter2.remove_0();
totalRatios -= expandRatio0;
aColumnHasMaxedOut = true;
pixelsToDistribute -= maxWidth0 - autoWidth;
$put_2(columnSizes, valueOf_2(columnIndex), maxWidth0);
}
}
}
while (aColumnHasMaxedOut);
if (totalRatios <= 0 && columnsToExpand.map_0.size_2() == 0) {
$setColumnWidths(this$static.this$01.escalator.columnConfiguration, columnSizes);
return;
}
leftOver = 0;
if ($isIE8(($clinit_BrowserInfo() , !instance_2 && (instance_2 = new BrowserInfo) , $clinit_BrowserInfo() , instance_2)) || $isIE9((!instance_2 && (instance_2 = new BrowserInfo) , instance_2)) || indexOf(getBrowserString(), 'PhantomJS') != -1) {
widthPerRatio = round_int(pixelsToDistribute / totalRatios);
leftOver = round_int(pixelsToDistribute - widthPerRatio * totalRatios);
}
else {
widthPerRatio = pixelsToDistribute / totalRatios;
}
for (column$iterator2 = (outerIter1 = (new AbstractMap$1(columnsToExpand.map_0)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter1)); column$iterator2.val$outerIter2.hasNext_0();) {
column = (entry = castTo(column$iterator2.val$outerIter2.next_1(), 9) , castTo(entry.getKey(), 21));
expandRatio0 = (expandRatio = column.getExpandRatio() , expandRatio > 0?expandRatio:expandRatio < 0?1:0);
columnIndex = visibleColumns.list.indexOf_0(column);
autoWidth = checkNotNull(castToDouble($get_5(columnSizes, valueOf_2(columnIndex))));
totalWidth = autoWidth + widthPerRatio * expandRatio0;
if (leftOver > 0) {
totalWidth += 1;
--leftOver;
}
$put_2(columnSizes, valueOf_2(columnIndex), totalWidth);
totalRatios -= expandRatio0;
}
do {
minWidthsCausedReflows = false;
pixelsToRemoveFromOtherColumns = 0;
for (column$iterator3 = new Collections$UnmodifiableCollectionIterator(visibleColumns.coll.iterator()); column$iterator3.it.hasNext_0();) {
column = castTo(column$iterator3.it.next_1(), 21);
minWidth0 = (minWidth = column.getMinimumWidth() , minWidth >= 0?minWidth:4.9E-324);
columnIndex = visibleColumns.list.indexOf_0(column);
currentWidth = checkNotNull(castToDouble($get_5(columnSizes, valueOf_2(columnIndex))));
hasAutoWidth = column.widthUser < 0;
if (hasAutoWidth && currentWidth < minWidth0) {
$put_2(columnSizes, valueOf_2(columnIndex), minWidth0);
pixelsToRemoveFromOtherColumns += minWidth0 - currentWidth;
minWidthsCausedReflows = true;
columnsToExpand.map_0.remove_1(column) != null;
}
}
totalRatios = 0;
for (column$iterator4 = (outerIter0 = (new AbstractMap$1(columnsToExpand.map_0)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter0)); column$iterator4.val$outerIter2.hasNext_0();) {
column = (entry = castTo(column$iterator4.val$outerIter2.next_1(), 9) , castTo(entry.getKey(), 21));
totalRatios += (expandRatio = column.getExpandRatio() , expandRatio > 0?expandRatio:expandRatio < 0?1:0);
}
pixelsToRemovePerRatio = pixelsToRemoveFromOtherColumns / totalRatios;
for (column$iterator = (outerIter = (new AbstractMap$1(columnsToExpand.map_0)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter)); column$iterator.val$outerIter2.hasNext_0();) {
column = (entry = castTo(column$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getKey(), 21));
pixelsToRemove = pixelsToRemovePerRatio * (expandRatio = column.getExpandRatio() , expandRatio > 0?expandRatio:expandRatio < 0?1:0);
colIndex = visibleColumns.list.indexOf_0(column);
$put_2(columnSizes, valueOf_2(colIndex), checkNotNull(castToDouble($get_5(columnSizes, valueOf_2(colIndex)))) - pixelsToRemove);
}
}
while (minWidthsCausedReflows);
$setColumnWidths(this$static.this$01.escalator.columnConfiguration, columnSizes);
}
function $calculate(this$static){
this$static.isScheduled = false;
this$static.rescheduleCount = 0;
$columnsAreGuaranteedToBeWiderThanGrid(this$static)?$applyColumnWidths(this$static):$applyColumnWidthsWithExpansion(this$static);
}
function $columnsAreGuaranteedToBeWiderThanGrid(this$static){
var column, column$iterator, freeSpace;
freeSpace = getRequiredWidthBoundingClientRectDouble(this$static.this$01.escalator.tableWrapper);
for (column$iterator = new Collections$UnmodifiableCollectionIterator($getVisibleColumns(this$static.this$01).coll.iterator()); column$iterator.it.hasNext_0();) {
column = castTo(column$iterator.it.next_1(), 21);
column.widthUser >= 0?(freeSpace -= column.widthUser):column.getMinimumWidth() >= 0 && (freeSpace -= column.getMinimumWidth());
}
return freeSpace < 0;
}
function $schedule_0(this$static){
if (!this$static.isScheduled) {
this$static.isScheduled = true;
$scheduleFinally(($clinit_SchedulerImpl() , INSTANCE), this$static.calculateCommand);
}
}
function Grid$AutoColumnWidthsRecalculator(this$0){
this.this$01 = this$0;
this.calculateCommand = new Grid$AutoColumnWidthsRecalculator$1(this);
}
defineClass(292, 1, {}, Grid$AutoColumnWidthsRecalculator);
_.isScheduled = false;
_.rescheduleCount = 0;
var Lcom_vaadin_client_widgets_Grid$AutoColumnWidthsRecalculator_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/AutoColumnWidthsRecalculator', 292);
function Grid$AutoColumnWidthsRecalculator$1(this$1){
this.this$11 = this$1;
}
defineClass(312, 1, {}, Grid$AutoColumnWidthsRecalculator$1);
_.execute_1 = function(){
if (!this.this$11.isScheduled) {
return;
}
if (this.this$11.this$01.header.markAsDirty || this.this$11.this$01.footer.markAsDirty) {
if (this.this$11.rescheduleCount < 10) {
$scheduleFinally(($clinit_SchedulerImpl() , INSTANCE), this);
++this.this$11.rescheduleCount;
}
else {
this.this$11.rescheduleCount = 0;
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), this);
}
}
else
this.this$11.this$01.dataIsBeingFetched?$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), this):$calculate(this.this$11);
getRequiredWidthBoundingClientRectDouble(this.this$11.this$01.escalator.tableWrapper);
}
;
var Lcom_vaadin_client_widgets_Grid$AutoColumnWidthsRecalculator$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/AutoColumnWidthsRecalculator/1', 312);
function Grid$BodyUpdater(this$0){
this.this$01 = this$0;
}
defineClass(297, 1, {}, Grid$BodyUpdater);
_.postAttach = function(row, attachedCells){
var cell, cell$iterator, column, renderer, widget, widgetRenderer;
for (cell$iterator = attachedCells.iterator(); cell$iterator.hasNext_0();) {
cell = castTo(cell$iterator.next_1(), 41);
renderer = (column = $getVisibleColumn(this.this$01, cell.column_0) , column.bodyRenderer);
if (instanceOf(renderer, 80)) {
try {
widgetRenderer = castTo(renderer, 80);
widget = widgetRenderer.createWidget();
$appendChild(cell.element, ($clinit_DOM() , widget.element));
setParent(widget, this.this$01);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 12)) {
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
}
else
throw unwrap($e0);
}
}
}
}
;
_.postDetach = function(row, detachedCells){
var cell, cell$iterator, column, column0, renderer, rowIndex;
rowIndex = row.row_0;
$set_5(this.this$01.rowReference, rowIndex, null, row.element);
for (cell$iterator = detachedCells.iterator(); cell$iterator.hasNext_0();) {
cell = castTo(cell$iterator.next_1(), 41);
renderer = (column0 = $getVisibleColumn(this.this$01, cell.column_0) , column0.bodyRenderer);
if (instanceOf(renderer, 48)) {
try {
column = $getVisibleColumn(this.this$01, cell.column_0);
$set_4(this.this$01.rendererCellReference, cell, $indexOf_3(unmodifiableList(new ArrayList_1(this.this$01.columns)), column), column);
castTo(renderer, 48);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 12)) {
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
}
else
throw unwrap($e0);
}
}
}
}
;
_.preAttach = function(row, cellsToAttach){
var cell, cell$iterator, column, column0, renderer, rowIndex;
rowIndex = row.row_0;
$set_5(this.this$01.rowReference, rowIndex, $getRow(this.this$01.dataSource, rowIndex), row.element);
for (cell$iterator = cellsToAttach.iterator(); cell$iterator.hasNext_0();) {
cell = castTo(cell$iterator.next_1(), 41);
renderer = (column0 = $getVisibleColumn(this.this$01, cell.column_0) , column0.bodyRenderer);
if (instanceOf(renderer, 48)) {
try {
column = $getVisibleColumn(this.this$01, cell.column_0);
$set_4(this.this$01.rendererCellReference, cell, $indexOf_3(unmodifiableList(new ArrayList_1(this.this$01.columns)), column), column);
castTo(renderer, 48).init_2(this.this$01.rendererCellReference);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 12)) {
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
}
else
throw unwrap($e0);
}
}
}
}
;
_.preDetach = function(row, cellsToDetach){
var cell, cell$iterator, column, renderer, w;
for (cell$iterator = new FlyweightRow$CellIterator(new AbstractList$SubList(cellsToDetach.this$01.cells_0, cellsToDetach.val$offset2, cellsToDetach.val$offset2 + cellsToDetach.val$numberOfCells3), true); cell$iterator.cursor + cell$iterator.skipNext < cell$iterator.cells_0.array.length;) {
cell = $next_1(cell$iterator);
renderer = (column = $getVisibleColumn(this.this$01, cell.column_0) , column.bodyRenderer);
if (instanceOf(renderer, 80)) {
try {
w = findWidget($getFirstChildElement(cell.element), Lcom_google_gwt_user_client_ui_Widget_2_classLit);
if (w) {
setParent(w, null);
$removeChild(cell.element, ($clinit_DOM() , w.element));
}
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 12)) {
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
}
else
throw unwrap($e0);
}
}
}
}
;
_.update = function(row, cellsToUpdate){
var cell, cell$iterator, clxRenderer, column, columnIndex, generatedStyle, hasData, isEvenIndex, renderer, rowData, rowElement, rowIndex, rowStylename, usedToHaveData, value_0;
rowIndex = row.row_0;
rowElement = row.element;
rowData = $getRow(this.this$01.dataSource, rowIndex);
hasData = rowData != null;
usedToHaveData = $hasClassName(rowElement, this.this$01.rowHasDataStyleName);
usedToHaveData != hasData && setStyleName(rowElement, this.this$01.rowHasDataStyleName, hasData);
isEvenIndex = row.row_0 % 2 == 0;
setStyleName(rowElement, this.this$01.rowStripeStyleName, !isEvenIndex);
$set_5(this.this$01.rowReference, rowIndex, rowData, rowElement);
if (hasData) {
setStyleName(rowElement, this.this$01.rowSelectedStyleName, $isSelected_0(this.this$01, rowData));
if (this.this$01.rowStyleGenerator) {
try {
rowStylename = $getStyle(this.this$01.rowStyleGenerator, this.this$01.rowReference);
setCustomStyleName(rowElement, rowStylename);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 12)) {
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
}
else
throw unwrap($e0);
}
}
else {
setCustomStyleName(rowElement, null);
}
}
else if (usedToHaveData) {
setStyleName(rowElement, this.this$01.rowSelectedStyleName, false);
setCustomStyleName(rowElement, null);
}
$updateFocusedRowStyle(this.this$01.cellFocusHandler, row);
for (cell$iterator = cellsToUpdate.iterator(); cell$iterator.hasNext_0();) {
cell = castTo(cell$iterator.next_1(), 41);
column = $getVisibleColumn(this.this$01, cell.column_0);
columnIndex = $indexOf_3(unmodifiableList(new ArrayList_1(this.this$01.columns)), column);
$updateFocusedCellStyle(this.this$01.cellFocusHandler, cell, this.this$01.escalator.body_0);
if (hasData && !!this.this$01.cellStyleGenerator) {
try {
$set_2(this.this$01.cellReference, cell.column_0, columnIndex, column);
generatedStyle = $getStyle_0(this.this$01.cellStyleGenerator, this.this$01.cellReference);
setCustomStyleName(cell.element, generatedStyle);
}
catch ($e1) {
$e1 = wrap_0($e1);
if (instanceOf($e1, 12)) {
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
}
else
throw unwrap($e1);
}
}
else
(hasData || usedToHaveData) && setCustomStyleName(cell.element, null);
renderer = column.bodyRenderer;
try {
$set_4(this.this$01.rendererCellReference, cell, columnIndex, column);
if (instanceOf(renderer, 48)) {
clxRenderer = castTo(renderer, 48);
if (hasData) {
usedToHaveData || $setContentVisible(this.this$01.rendererCellReference, true);
value_0 = column.getValue(rowData);
clxRenderer.render(this.this$01.rendererCellReference, value_0);
}
else {
$setContentVisible(this.this$01.rendererCellReference, false);
}
}
else if (hasData) {
value_0 = column.getValue(rowData);
renderer.render(this.this$01.rendererCellReference, value_0);
}
else {
$removeAllChildren(cell.element);
}
}
catch ($e2) {
$e2 = wrap_0($e2);
if (instanceOf($e2, 12)) {
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
}
else
throw unwrap($e2);
}
}
}
;
var Lcom_vaadin_client_widgets_Grid$BodyUpdater_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/BodyUpdater', 297);
function $getFocusedCell(this$static){
return new Cell(this$static.rowWithFocus, this$static.cellFocusRange.start_0, this$static.cellWithFocusStyle);
}
function $getNextContainer(this$static, current){
if (current == this$static.this$01.escalator.header) {
current = this$static.this$01.escalator.body_0;
}
else if (current == this$static.this$01.escalator.body_0) {
current = this$static.this$01.escalator.footer;
}
else {
return current;
}
if (current.getRowCount() == 0) {
return $getNextContainer(this$static, current);
}
return current;
}
function $getPreviousContainer(this$static, current){
if (current == this$static.this$01.escalator.footer) {
current = this$static.this$01.escalator.body_0;
}
else if (current == this$static.this$01.escalator.body_0) {
current = this$static.this$01.escalator.header;
}
else {
return current;
}
if (current.getRowCount() == 0) {
return $getPreviousContainer(this$static, current);
}
return current;
}
function $handleNavigationEvent(this$static, event_0, cell){
var down, firstVisible, lastVisible, moveFocusBy, newColumn, newContainer, newRow;
if ($equals_2(($clinit_DOMImpl() , event_0).type, 'click')) {
$setCellFocus(this$static, cell.rowReference.rowIndex_0, cell.columnIndexDOM, $findRowContainer(this$static.this$01.escalator, cell.element));
$getElement(this$static.this$01).focus();
}
else if ($equals_2(event_0.type, 'keydown')) {
newRow = this$static.rowWithFocus;
newContainer = this$static.containerWithFocus;
newColumn = this$static.cellFocusRange.start_0;
switch (event_0.keyCode | 0) {
case 40:
++newRow;
break;
case 38:
--newRow;
break;
case 39:
if (this$static.cellFocusRange.end >= $getVisibleColumns(this$static.this$01).coll.size_2()) {
return;
}
newColumn = this$static.cellFocusRange.end;
break;
case 37:
if (newColumn == 0) {
return;
}
--newColumn;
break;
case 9:
event_0.shiftKey?(newContainer = $getPreviousContainer(this$static, this$static.containerWithFocus)):(newContainer = $getNextContainer(this$static, this$static.containerWithFocus));
if (newContainer == this$static.containerWithFocus) {
return;
}
break;
case 36:
newContainer.getRowCount() > 0 && (newRow = 0);
break;
case 35:
newContainer.getRowCount() > 0 && (newRow = newContainer.getRowCount() - 1);
break;
case 34:
case 33:
if (newContainer.getRowCount() > 0) {
down = (event_0.keyCode | 0) == 34;
firstVisible = $getFirstVisibleRowIndex(this$static.this$01);
lastVisible = $getLastVisibleRowIndex(this$static.this$01);
(newRow < firstVisible || newRow > lastVisible) && (newRow = down?lastVisible:firstVisible);
moveFocusBy = 1 > lastVisible - firstVisible - 1?1:lastVisible - firstVisible - 1;
moveFocusBy *= down?1:-1;
newRow += moveFocusBy;
newRow = max_2(0, min_1(newContainer.getRowCount() - 1, newRow));
}
break;
default:return;
}
if (newContainer != this$static.containerWithFocus) {
newContainer == this$static.this$01.escalator.body_0?(newRow = this$static.lastFocusedBodyRow):newContainer == this$static.this$01.escalator.header?(newRow = this$static.lastFocusedHeaderRow):(newRow = this$static.lastFocusedFooterRow);
}
else if (newRow < 0) {
newContainer = $getPreviousContainer(this$static, newContainer);
newContainer == this$static.containerWithFocus?(newRow = 0):newContainer == this$static.this$01.escalator.body_0?(newRow = $getLastVisibleRowIndex(this$static.this$01)):(newRow = newContainer.getRowCount() - 1);
}
else if (newRow >= this$static.containerWithFocus.getRowCount()) {
newContainer = $getNextContainer(this$static, newContainer);
newContainer == this$static.containerWithFocus?(newRow = this$static.containerWithFocus.getRowCount() - 1):newContainer == this$static.this$01.escalator.body_0?(newRow = $getFirstVisibleRowIndex(this$static.this$01)):(newRow = 0);
}
if (newContainer.getRowCount() == 0) {
return;
}
impl_0.eventPreventDefault(event_0);
event_0.stopPropagation();
$setCellFocus(this$static, newRow, newColumn, newContainer);
}
}
function $offsetRangeBy(this$static, offset){
this$static.cellFocusRange = $offsetBy(this$static.cellFocusRange, offset);
}
function $refreshRow_0(this$static, row){
this$static.containerWithFocus.refreshRows(row, 1);
}
function $rowsAddedToBody(this$static, added){
var bodyHasFocus, insertionIsAboveFocusedCell;
bodyHasFocus = this$static.containerWithFocus == this$static.this$01.escalator.body_0;
insertionIsAboveFocusedCell = added.start_0 <= this$static.rowWithFocus;
if (bodyHasFocus && insertionIsAboveFocusedCell) {
this$static.rowWithFocus += added.end - added.start_0;
this$static.rowWithFocus = min_1(this$static.rowWithFocus, this$static.this$01.escalator.body_0.rows_0 - 1);
$refreshRow_0(this$static, this$static.rowWithFocus);
}
}
function $rowsRemovedFromBody(this$static, removed){
if (this$static.containerWithFocus != this$static.this$01.escalator.body_0) {
return;
}
else if ($contains(removed, this$static.rowWithFocus)) {
if (this$static.containerWithFocus.getRowCount() > removed.end) {
this$static.rowWithFocus = removed.start_0;
}
else if (removed.start_0 > 0) {
this$static.rowWithFocus = removed.start_0 - 1;
}
else {
if (this$static.this$01.escalator.header.rows_0 > 0) {
this$static.rowWithFocus = min_1(this$static.lastFocusedHeaderRow, this$static.this$01.escalator.header.rows_0 - 1);
this$static.containerWithFocus = this$static.this$01.escalator.header;
}
else if (this$static.this$01.escalator.footer.rows_0 > 0) {
this$static.rowWithFocus = min_1(this$static.lastFocusedFooterRow, this$static.this$01.escalator.footer.rows_0 - 1);
this$static.containerWithFocus = this$static.this$01.escalator.footer;
}
}
}
else {
if (removed.start_0 > this$static.rowWithFocus) {
return;
}
this$static.rowWithFocus = this$static.rowWithFocus - (removed.end - removed.start_0);
}
$refreshRow_0(this$static, this$static.rowWithFocus);
}
function $setCellFocus(this$static, rowIndex, columnIndexDOM, container){
var cell, cellRange, colSpan, columnIndex, i_0, oldContainer, oldRange, oldRow;
if (rowIndex == this$static.rowWithFocus && $contains(this$static.cellFocusRange, columnIndexDOM) && container == this$static.containerWithFocus) {
$refreshRow_0(this$static, this$static.rowWithFocus);
return;
}
oldRow = this$static.rowWithFocus;
this$static.rowWithFocus = rowIndex;
oldRange = this$static.cellFocusRange;
if (container == this$static.this$01.escalator.body_0) {
$scrollToRow_0(this$static.this$01, this$static.rowWithFocus, ($clinit_ScrollDestination() , ANY), 0);
this$static.cellFocusRange = withLength(columnIndexDOM, 1);
}
else {
i_0 = 0;
cell = $getFirstChildElement(container.getRowElement(this$static.rowWithFocus));
do {
colSpan = parseInt(cell['colSpan']) | 0;
cellRange = withLength(i_0, colSpan);
if (cellRange.start_0 <= columnIndexDOM && columnIndexDOM < cellRange.end) {
this$static.cellFocusRange = cellRange;
break;
}
cell = $getNextSiblingElement(($clinit_DOMImpl() , cell));
++i_0;
}
while (cell);
}
columnIndex = $indexOf_3(unmodifiableList(new ArrayList_1(this$static.this$01.columns)), $getVisibleColumn(this$static.this$01, columnIndexDOM));
columnIndex >= this$static.this$01.escalator.columnConfiguration.frozenColumns && $scrollToColumn(this$static.this$01.escalator, columnIndexDOM, ($clinit_ScrollDestination() , ANY));
if (this$static.containerWithFocus == container) {
if ($equals(oldRange, this$static.cellFocusRange) && oldRow != this$static.rowWithFocus) {
this$static.containerWithFocus.refreshRows(oldRow, 1);
}
else {
$refreshHeader(this$static.this$01);
$refreshFooter(this$static.this$01);
}
}
else {
oldContainer = this$static.containerWithFocus;
this$static.containerWithFocus = container;
oldContainer == this$static.this$01.escalator.body_0?(this$static.lastFocusedBodyRow = oldRow):oldContainer == this$static.this$01.escalator.header?(this$static.lastFocusedHeaderRow = oldRow):(this$static.lastFocusedFooterRow = oldRow);
if ($equals(oldRange, this$static.cellFocusRange)) {
oldContainer.refreshRows(oldRow, 1);
}
else {
$refreshHeader(this$static.this$01);
$refreshFooter(this$static.this$01);
oldContainer == this$static.this$01.escalator.body_0 && oldContainer.refreshRows(oldRow, 1);
}
}
$refreshRow_0(this$static, this$static.rowWithFocus);
}
function $setCellFocus_0(this$static, cell){
$setCellFocus(this$static, cell.rowReference.rowIndex_0, cell.columnIndexDOM, $findRowContainer(this$static.this$01.escalator, cell.rowReference.element.cells[cell.columnIndexDOM]));
}
function $updateFocusedCellStyle(this$static, cell, cellContainer){
var cellColumn, cellRow, colSpan, columnHasFocus;
cellRow = cell.row_0.row_0;
cellColumn = cell.column_0;
colSpan = $getPropertyInt(cell.element, 'colSpan');
columnHasFocus = $intersects(withLength(cellColumn, colSpan), this$static.cellFocusRange);
if (cellContainer == this$static.containerWithFocus) {
if (cellRow == this$static.rowWithFocus && columnHasFocus) {
if (this$static.cellWithFocusStyle != cell.element) {
!!this$static.cellWithFocusStyle && setStyleName(this$static.cellWithFocusStyle, this$static.this$01.cellFocusStyleName, false);
this$static.cellWithFocusStyle = cell.element;
setStyleName(this$static.cellWithFocusStyle, this$static.this$01.cellFocusStyleName, true);
}
}
else if (this$static.cellWithFocusStyle == cell.element) {
setStyleName(this$static.cellWithFocusStyle, this$static.this$01.cellFocusStyleName, false);
this$static.cellWithFocusStyle = null;
}
}
}
function $updateFocusedRowStyle(this$static, row){
if (this$static.rowWithFocus == row.row_0 && this$static.containerWithFocus == this$static.this$01.escalator.body_0) {
if (row.element != this$static.rowWithFocusStyle) {
!!this$static.rowWithFocusStyle && setStyleName(this$static.rowWithFocusStyle, this$static.this$01.rowFocusStyleName, false);
this$static.rowWithFocusStyle = row.element;
setStyleName(this$static.rowWithFocusStyle, this$static.this$01.rowFocusStyleName, true);
}
}
else if (this$static.rowWithFocusStyle == row.element || this$static.containerWithFocus != this$static.this$01.escalator.body_0 && !!this$static.rowWithFocusStyle) {
setStyleName(this$static.rowWithFocusStyle, this$static.this$01.rowFocusStyleName, false);
this$static.rowWithFocusStyle = null;
}
}
function Grid$CellFocusHandler(this$0){
this.this$01 = this$0;
this.containerWithFocus = this.this$01.escalator.body_0;
this.cellFocusRange = withLength(0, 1);
$sinkEvents(this$0, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['keydown', 'click'])));
}
defineClass(289, 1, {}, Grid$CellFocusHandler);
_.cellWithFocusStyle = null;
_.lastFocusedBodyRow = 0;
_.lastFocusedFooterRow = 0;
_.lastFocusedHeaderRow = 0;
_.rowWithFocus = 0;
_.rowWithFocusStyle = null;
var Lcom_vaadin_client_widgets_Grid$CellFocusHandler_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/CellFocusHandler', 289);
function $getWidthActual(this$static){
if (this$static.hidden_0) {
return 0;
}
return $getColumnWidthActual(this$static.grid_0.escalator.columnConfiguration, $indexOf_3($getVisibleColumns(this$static.grid_0), this$static));
}
function $setEditable(this$static, editable){
if (editable != this$static.editable && this$static.grid_0.editor.state_0 != ($clinit_Grid$Editor$State() , INACTIVE)) {
throw new IllegalStateException_0('Cannot change column editable status while the editor is active');
}
this$static.editable = editable;
return this$static;
}
function $setExpandRatio(this$static, ratio){
if (this$static.expandRatio != ratio) {
this$static.expandRatio = ratio;
!!this$static.grid_0 && $schedule_0(this$static.grid_0.autoColumnWidthsRecalculator);
}
return this$static;
}
function $setGrid_1(this$static, grid){
if (!!this$static.grid_0 && !!grid) {
throw new IllegalStateException_0('Column already is attached to a grid. Remove the column first from the grid and then add it. (in: ' + $toString_1(this$static) + ')');
}
!!this$static.grid_0 && $schedule_0(this$static.grid_0.autoColumnWidthsRecalculator);
this$static.grid_0 = grid;
!!this$static.grid_0 && $schedule_0(this$static.grid_0.autoColumnWidthsRecalculator);
}
function $setHeaderCaption(this$static, caption){
if (caption == null) {
throw new IllegalArgumentException('Caption cannot be null.');
}
if (!$equals_2(this$static.headerCaption, caption)) {
this$static.headerCaption = caption;
!!this$static.grid_0 && $updateHeader(this$static);
}
return this$static;
}
function $setHidable(this$static, hidable){
if (this$static.hidable_0 != hidable) {
this$static.hidable_0 = hidable;
$updateColumnHidable(this$static.grid_0.columnHider, this$static);
}
}
function $setHidden(this$static, hidden){
var columnIndex, escalatorFrozenColumns, gridFrozenColumns;
if (this$static.hidden_0 != hidden) {
if (hidden) {
$removeColumns(this$static.grid_0.escalator.columnConfiguration, $indexOf_3($getVisibleColumns(this$static.grid_0), this$static), 1);
this$static.hidden_0 = true;
}
else {
this$static.hidden_0 = false;
columnIndex = $indexOf_3($getVisibleColumns(this$static.grid_0), this$static);
$insertColumns(this$static.grid_0.escalator.columnConfiguration, columnIndex, 1);
gridFrozenColumns = this$static.grid_0.frozenColumnCount;
escalatorFrozenColumns = this$static.grid_0.escalator.columnConfiguration.frozenColumns;
gridFrozenColumns > escalatorFrozenColumns && escalatorFrozenColumns == columnIndex && $setFrozenColumnCount(this$static.grid_0.escalator.columnConfiguration, ++escalatorFrozenColumns);
}
$updateHidingToggle(this$static.grid_0.columnHider, this$static);
$updateColSpans(this$static.grid_0.header);
$updateColSpans(this$static.grid_0.footer);
!!this$static.grid_0 && $schedule_0(this$static.grid_0.autoColumnWidthsRecalculator);
$fireEvent_0(this$static.grid_0, new ColumnVisibilityChangeEvent);
}
}
function $setHidingToggleCaption(this$static, hidingToggleCaption){
this$static.hidingToggleCaption = hidingToggleCaption;
this$static.hidable_0 && $updateHidingToggle(this$static.grid_0.columnHider, this$static);
}
function $setMaximumWidth(this$static, pixels){
var minwidth;
minwidth = this$static.minimumWidthPx;
if (pixels >= 0 && pixels < minwidth && minwidth >= 0) {
throw new IllegalArgumentException('New maximum width (' + pixels + ') was less than minimum width (' + minwidth + ')');
}
if (this$static.maximumWidthPx != pixels) {
this$static.maximumWidthPx = pixels;
!!this$static.grid_0 && $schedule_0(this$static.grid_0.autoColumnWidthsRecalculator);
}
return this$static;
}
function $setMinimumWidth(this$static, pixels){
var maxwidth;
maxwidth = this$static.maximumWidthPx;
if (pixels >= 0 && pixels > maxwidth && maxwidth >= 0) {
throw new IllegalArgumentException('New minimum width (' + pixels + ') was greater than maximum width (' + maxwidth + ')');
}
if (this$static.minimumWidthPx != pixels) {
this$static.minimumWidthPx = pixels;
!!this$static.grid_0 && $schedule_0(this$static.grid_0.autoColumnWidthsRecalculator);
}
return this$static;
}
function $setRenderer(this$static, renderer){
if (!renderer) {
throw new IllegalArgumentException('Renderer cannot be null.');
}
if (renderer != this$static.bodyRenderer) {
this$static.bodyRenderer = renderer;
!!this$static.grid_0 && $refreshBody(this$static.grid_0);
}
return this$static;
}
function $setSortable(this$static, sortable){
if (this$static.sortable_0 != sortable) {
this$static.sortable_0 = sortable;
!!this$static.grid_0 && $refreshHeader(this$static.grid_0);
}
return this$static;
}
function $setWidth_1(this$static, pixels){
if (!pixelValuesEqual(this$static.widthUser, pixels)) {
this$static.widthUser = pixels;
this$static.hidden_0 || !!this$static.grid_0 && $schedule_0(this$static.grid_0.autoColumnWidthsRecalculator);
}
return this$static;
}
function $toString_1(this$static){
var details, index_0;
details = '';
this$static.headerCaption != null && length_1(this$static.headerCaption) != 0?(details += 'header:"' + this$static.headerCaption + '" '):(details += 'header:empty ');
if (this$static.grid_0) {
index_0 = $indexOf_3(unmodifiableList(new ArrayList_1(this$static.grid_0.columns)), this$static);
index_0 != -1?(details += 'attached:#' + index_0 + ' '):(details += 'attached:unindexed ');
}
else {
details += 'detached ';
}
details += 'sortable:' + this$static.sortable_0 + ' ';
return $getSimpleName(this$static.___clazz) + '[' + $trim(details) + ']';
}
function $updateHeader(this$static){
var row;
row = this$static.grid_0.header.defaultRow;
if (row) {
$setText_0(castTo($getCell_0(row, this$static), 63), this$static.headerCaption);
this$static.hidable_0 && $updateHidingToggle(this$static.grid_0.columnHider, this$static);
}
}
defineClass(21, 1, {21:1});
_.getExpandRatio = function(){
return this.expandRatio;
}
;
_.getMaximumWidth = function(){
return this.maximumWidthPx;
}
;
_.getMinimumWidth = function(){
return this.minimumWidthPx;
}
;
_.setDefaultHeaderContent = function(cell){
$setText_0(cell, this.headerCaption);
}
;
_.toString_0 = function(){
return $toString_1(this);
}
;
_.editable = true;
_.expandRatio = -1;
_.headerCaption = '';
_.hidable_0 = false;
_.hidden_0 = false;
_.hidingToggleCaption = null;
_.maximumWidthPx = -1;
_.minimumWidthPx = 10;
_.sortable_0 = false;
_.widthUser = -1;
var Lcom_vaadin_client_widgets_Grid$Column_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Column', 21);
function Grid$Column$DefaultTextRenderer(this$1){
this.this$11 = this$1;
}
defineClass(296, 1, {}, Grid$Column$DefaultTextRenderer);
_.render = function(cell, data_0){
var text_0;
if (!this.warned && !instanceOfString(data_0)) {
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
$toString_1(this.this$11) + ': ' + 'This column uses a dummy default TextRenderer. A more suitable renderer should be set using the setRenderer() method.';
this.warned = true;
}
data_0 == null?(text_0 = ''):(text_0 = toString__Ljava_lang_String___devirtual$(data_0));
$setInnerText(cell.cell.element, text_0);
}
;
_.warned = false;
var Lcom_vaadin_client_widgets_Grid$Column$DefaultTextRenderer_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Column/DefaultTextRenderer', 296);
function $createHTML(column){
var buf, caption;
buf = new StringBuffer;
buf.string += '<span class="';
column.hidden_0?(buf.string += 'v-off' , buf):(buf.string += 'v-on' , buf);
buf.string += '"><div>';
caption = column.hidingToggleCaption;
caption == null && (caption = column.headerCaption);
buf.string += '' + caption;
buf.string += '<\/div><\/span>';
return buf.string;
}
function $removeColumnHidingToggle(this$static, column){
$removeItem_0(this$static.this$01.sidebar_0.menuBar, castTo($get_5(this$static.columnToHidingToggleMap, column), 49));
}
function $updateColumnHidable(this$static, column){
var toggle, toggle_0;
if (column.hidable_0) {
toggle = castTo($get_5(this$static.columnToHidingToggleMap, column), 49);
!toggle && (toggle = (toggle_0 = new MenuItem($createHTML(column), new Grid$ColumnHider$1(this$static, column)) , setStyleName(($clinit_DOM() , toggle_0.element), 'column-hiding-toggle', true) , $put_2(this$static.columnToHidingToggleMap, column, toggle_0) , toggle_0));
$setStyleName_0(toggle, 'hidden', column.hidden_0);
}
else
$containsKey(this$static.columnToHidingToggleMap, column) && $removeItem_0(this$static.this$01.sidebar_0.menuBar, castTo($remove_6(this$static.columnToHidingToggleMap, column), 49));
$updateTogglesOrder(this$static);
}
function $updateHidingToggle(this$static, column){
var toggle;
if (column.hidable_0) {
toggle = castTo($get_5(this$static.columnToHidingToggleMap, column), 49);
$setHTML(toggle, $createHTML(column));
$setStyleName_0(toggle, 'hidden', column.hidden_0);
}
}
function $updateTogglesOrder(this$static){
var column, column$iterator, lastIndex, menuItem;
if (!this$static.hidingColumn) {
lastIndex = 0;
for (column$iterator = new Collections$UnmodifiableCollectionIterator(unmodifiableList(new ArrayList_1(this$static.this$01.columns)).coll.iterator()); column$iterator.it.hasNext_0();) {
column = castTo(column$iterator.it.next_1(), 21);
if (column.hidable_0) {
menuItem = castTo($get_5(this$static.columnToHidingToggleMap, column), 49);
$removeItem_0(this$static.this$01.sidebar_0.menuBar, menuItem);
$insertItem_0(this$static.this$01.sidebar_0.menuBar, menuItem, lastIndex++);
}
}
}
}
function Grid$ColumnHider(this$0){
this.this$01 = this$0;
this.columnToHidingToggleMap = new HashMap;
}
defineClass(295, 1, {}, Grid$ColumnHider);
_.hidingColumn = false;
var Lcom_vaadin_client_widgets_Grid$ColumnHider_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/ColumnHider', 295);
function $execute_0(this$static){
this$static.this$11.hidingColumn = true;
$setHidden(this$static.val$column2, !this$static.val$column2.hidden_0);
this$static.this$11.hidingColumn = false;
}
function Grid$ColumnHider$1(this$1, val$column){
this.this$11 = this$1;
this.val$column2 = val$column;
}
defineClass(320, 1, {}, Grid$ColumnHider$1);
_.execute_1 = function(){
$execute_0(this);
}
;
var Lcom_vaadin_client_widgets_Grid$ColumnHider$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/ColumnHider/1', 320);
function $attachWidget(this$static, w, parent_0){
$appendChild(parent_0, ($clinit_DOM() , w.element));
setParent(w, this$static.grid_0);
}
function $cancel_1(this$static){
if (!this$static.enabled) {
throw new IllegalStateException_0('Cannot cancel edit: editor is not enabled');
}
if (this$static.state_0 == ($clinit_Grid$Editor$State() , INACTIVE)) {
throw new IllegalStateException_0('Cannot cancel edit: editor is not in edit mode');
}
$cancel_2(this$static.handler, new Grid$EditorRequestImpl(this$static.grid_0, this$static.rowIndex_0, null));
$doCancel(this$static);
}
function $clearEditorColumnErrors(this$static){
var e;
e = $getFirstChildElement(this$static.editorOverlay);
while (e) {
$removeClassName(e, 'error');
e = $getNextSiblingElement(($clinit_DOMImpl() , e));
}
this$static.columnErrors.map_0.clear_0();
}
function $createCell(td){
var cell, height, width_0;
cell = ($clinit_DOM() , $createDivElement($doc));
width_0 = getRequiredWidthBoundingClientRectDouble(td);
height = getRequiredHeightBoundingClientRectDouble(td);
setBounds(cell, (td.offsetLeft || 0) | 0, (td.offsetTop || 0) | 0, width_0, height);
return cell;
}
function $detachWidget(w){
setParent(w, null);
$removeFromParent(($clinit_DOM() , w.element));
}
function $doCancel(this$static){
$hideOverlay(this$static);
this$static.state_0 = ($clinit_Grid$Editor$State() , INACTIVE);
this$static.rowIndex_0 = -1;
this$static.focusedColumnIndex = -1;
$setScrollLocked(this$static.grid_0.escalator, ($clinit_ScrollbarBundle$Direction() , VERTICAL), false);
$updateSelectionCheckboxesAsNeeded(this$static, true);
$fireEvent_0(this$static.grid_0, new EditorCloseEvent);
}
function $editRow_1(this$static, rowIndex){
var focusedCell, focusedElement;
focusedCell = $getFocusedCell(this$static.grid_0.cellFocusHandler);
focusedElement = getFocusedElement();
!!focusedElement && $isOrHasChild($getElement(this$static.grid_0), focusedElement)?$editRow_2(this$static, rowIndex, focusedCell.column_0):$editRow_2(this$static, rowIndex, -1);
}
function $editRow_2(this$static, rowIndex, columnIndex){
if (!this$static.enabled) {
throw new IllegalStateException_0('Cannot edit row: editor is not enabled');
}
if (this$static.state_0 != ($clinit_Grid$Editor$State() , INACTIVE)) {
if (this$static.buffered) {
throw new IllegalStateException_0('Cannot edit row: editor already in edit mode');
}
}
this$static.rowIndex_0 = rowIndex;
this$static.focusedColumnIndex = columnIndex;
this$static.state_0 = ACTIVATING;
if ($contains($getVisibleRowRange(this$static.grid_0.escalator), rowIndex)) {
$show_0(this$static, rowIndex);
}
else {
$hideOverlay(this$static);
this$static.dataAvailableHandler = $addDataAvailableHandler(this$static.grid_0, new Grid$Editor$7(this$static, rowIndex));
$scrollToRow(this$static.grid_0, rowIndex, ($clinit_ScrollDestination() , MIDDLE));
}
}
function $getWidget_0(this$static, column){
return castTo($get_5(this$static.columnToWidget, column), 14);
}
function $hideOverlay(this$static){
var entry, outerIter, r, r$iterator, w, w$iterator;
if (!$getParentElement(this$static.editorOverlay)) {
return;
}
if (this$static.pinnedRowHandle) {
$unpin(this$static.pinnedRowHandle);
this$static.pinnedRowHandle = null;
}
for (r$iterator = new ArrayList$1(this$static.focusHandlers); r$iterator.i < r$iterator.this$01.array.length;) {
r = castTo($next_3(r$iterator), 740);
$removeHandler(r.real);
}
this$static.focusHandlers.array = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_0, 1, 0, 4, 1);
for (w$iterator = (outerIter = (new AbstractMap$2(this$static.columnToWidget)).this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter)); w$iterator.val$outerIter2.hasNext_0();) {
w = (entry = castTo(w$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 14));
setParent(w, null);
}
$reset_0(this$static.columnToWidget);
$detachWidget(this$static.saveButton);
$detachWidget(this$static.cancelButton);
$removeAllChildren(this$static.editorOverlay);
$removeAllChildren(this$static.cellWrapper);
$removeAllChildren(this$static.frozenCellWrapper);
$removeFromParent(this$static.editorOverlay);
$removeHandler(this$static.scrollHandler.real);
$clearEditorColumnErrors(this$static);
this$static.focusedColumnIndex != -1 && $focusCell(this$static.grid_0, this$static.rowIndex_0, this$static.focusedColumnIndex);
}
function $save(this$static){
var request;
if (!this$static.enabled) {
throw new IllegalStateException_0('Cannot save: editor is not enabled');
}
if (this$static.state_0 != ($clinit_Grid$Editor$State() , ACTIVE)) {
throw new IllegalStateException_0('Cannot save: editor is not in edit mode');
}
this$static.state_0 = SAVING;
$setEnabled(this$static.saveButton, false);
$setEnabled(this$static.cancelButton, false);
$schedule(this$static.saveTimeout, 5000);
request = new Grid$EditorRequestImpl(this$static.grid_0, this$static.rowIndex_0, this$static.saveRequestCallback);
$save_0(this$static.handler, request);
$updateSelectionCheckboxesAsNeeded(this$static, true);
}
function $setButtonsEnabled(this$static){
$setEnabled(this$static.saveButton, true);
$setEnabled(this$static.cancelButton, true);
}
function $setCancelCaption(this$static, cancelCaption){
if (cancelCaption == null) {
throw new IllegalArgumentException('Cancel caption cannot be null');
}
$setText(this$static.cancelButton, cancelCaption);
}
function $setEditorColumnError(this$static, column, hasError){
var editorCell;
if (this$static.state_0 != ($clinit_Grid$Editor$State() , ACTIVE) && this$static.state_0 != SAVING) {
throw new IllegalStateException_0('Cannot set cell error status: editor is neither active nor saving.');
}
if ($contains_1(this$static.columnErrors, column) == hasError) {
return;
}
editorCell = $getParentElement($getElement(castTo($get_5(this$static.columnToWidget, column), 14)));
if (hasError) {
$addClassName(editorCell, 'error');
$add_9(this$static.columnErrors, column);
}
else {
$removeClassName(editorCell, 'error');
$remove_14(this$static.columnErrors, column);
}
}
function $setEditorError(this$static, errorMessage, errorColumns){
var c, c$iterator;
if (errorMessage == null) {
$removeFromParent(this$static.message_0);
}
else {
$setInnerText(this$static.message_0, errorMessage);
!$getParentElement(this$static.message_0) && $appendChild(this$static.messageWrapper, this$static.message_0);
}
this$static.buffered || (errorMessage != null?(this$static.messageAndButtonsWrapper.style['display'] = '' , undefined):(this$static.messageAndButtonsWrapper.style['display'] = ($clinit_Style$Display() , 'none') , undefined));
if (this$static.state_0 == ($clinit_Grid$Editor$State() , ACTIVE) || this$static.state_0 == SAVING) {
for (c$iterator = new Collections$UnmodifiableCollectionIterator(unmodifiableList(new ArrayList_1(this$static.grid_0.columns)).coll.iterator()); c$iterator.it.hasNext_0();) {
c = castTo(c$iterator.it.next_1(), 21);
$setEditorColumnError(this$static.grid_0.editor, c, errorColumns.contains_0(c));
}
}
}
function $setEnabled_2(this$static, enabled){
if (!enabled && this$static.state_0 != ($clinit_Grid$Editor$State() , INACTIVE)) {
throw new IllegalStateException_0('Cannot disable: editor is in edit mode');
}
else if (enabled && !this$static.handler) {
throw new IllegalStateException_0('Cannot enable: EditorHandler not set');
}
this$static.enabled = enabled;
}
function $setGridEnabled(this$static, enabled){
$setEnabled(this$static.saveButton, enabled);
$setEnabled(this$static.cancelButton, enabled);
}
function $setHandler(this$static, rowHandler){
if (this$static.state_0 != ($clinit_Grid$Editor$State() , INACTIVE)) {
throw new IllegalStateException_0('Cannot set EditorHandler: editor is currently in edit mode');
}
this$static.handler = rowHandler;
}
function $setMessageAndButtonsWrapperVisible(this$static, visible){
visible?(this$static.messageAndButtonsWrapper.style['display'] = '' , undefined):(this$static.messageAndButtonsWrapper.style['display'] = ($clinit_Style$Display() , 'none') , undefined);
}
function $setSaveCaption(this$static, saveCaption){
if (saveCaption == null) {
throw new IllegalArgumentException('Save caption cannot be null');
}
$setText(this$static.saveButton, saveCaption);
}
function $setStylePrimaryName_10(this$static, primaryName){
if (this$static.styleName != null) {
$removeClassName(this$static.editorOverlay, this$static.styleName);
$removeClassName(this$static.cellWrapper, this$static.styleName + '-cells');
$removeClassName(this$static.frozenCellWrapper, this$static.styleName + '-cells');
$removeClassName(this$static.messageAndButtonsWrapper, this$static.styleName + '-footer');
$removeClassName(this$static.messageWrapper, this$static.styleName + '-message');
$removeClassName(this$static.buttonsWrapper, this$static.styleName + '-buttons');
$removeStyleName(this$static.saveButton, this$static.styleName + '-save');
$removeStyleName(this$static.cancelButton, this$static.styleName + '-cancel');
}
this$static.styleName = primaryName + '-editor';
$setClassName(this$static.editorOverlay, this$static.styleName);
$setClassName(this$static.cellWrapper, this$static.styleName + '-cells');
$setClassName(this$static.frozenCellWrapper, this$static.styleName + '-cells frozen');
$setClassName(this$static.messageAndButtonsWrapper, this$static.styleName + '-footer');
$setClassName(this$static.messageWrapper, this$static.styleName + '-message');
$setClassName(this$static.buttonsWrapper, this$static.styleName + '-buttons');
$setStyleName(this$static.saveButton, this$static.styleName + '-save');
$setStyleName(this$static.cancelButton, this$static.styleName + '-cancel');
}
function $show_0(this$static, rowIndex){
var request;
if (this$static.state_0 == ($clinit_Grid$Editor$State() , ACTIVATING)) {
this$static.state_0 = BINDING;
$schedule(this$static.bindTimeout, 5000);
request = new Grid$EditorRequestImpl(this$static.grid_0, rowIndex, this$static.bindRequestCallback);
$bind(this$static.handler, request);
$setScrollLocked(this$static.grid_0.escalator, ($clinit_ScrollbarBundle$Direction() , VERTICAL), this$static.buffered);
$updateSelectionCheckboxesAsNeeded(this$static, false);
}
}
function $showOverlay(this$static){
var body_0, bodyTop, cell, cellHeight, checkBox, column, editor, frozenColumns, frozenColumnsWidth, gridElement, gridHeight, gridTop, i_0, overlayTop, rowTop, scrollLeft, tr, tfoot, tfootPageTop, trPageBottom, messageAndButtonsHeight, bottomOfButtons;
$hideOverlay(this$static);
gridElement = $getElement(this$static.grid_0);
tr = $getRowElement(this$static.grid_0.escalator.body_0, this$static.rowIndex_0);
this$static.scrollHandler = $addHandler_0(this$static.grid_0, new Grid$Editor$8(this$static), ($clinit_ScrollEvent() , TYPE_15));
$appendChild(gridElement, this$static.editorOverlay);
$appendChild(this$static.editorOverlay, this$static.frozenCellWrapper);
$appendChild(this$static.editorOverlay, this$static.cellWrapper);
$appendChild(this$static.editorOverlay, this$static.messageAndButtonsWrapper);
frozenColumns = $getVisibleFrozenColumnCount(this$static.grid_0);
frozenColumnsWidth = 0;
cellHeight = 0;
for (i_0 = 0; i_0 < tr.cells.length; i_0++) {
cell = $createCell(tr.cells[i_0]);
cellHeight = max_1(cellHeight, getRequiredHeightBoundingClientRectDouble(tr.cells[i_0]));
column = $getVisibleColumn(this$static.grid_0, i_0);
if (i_0 < frozenColumns) {
$appendChild(this$static.frozenCellWrapper, cell);
frozenColumnsWidth += getRequiredWidthBoundingClientRectDouble(tr.cells[i_0]);
}
else {
$appendChild(this$static.cellWrapper, cell);
}
if (column.editable) {
editor = $getWidget_2(this$static.handler, column);
if (editor) {
$put_2(this$static.columnToWidget, column, editor);
$appendChild(cell, ($clinit_DOM() , editor.element));
setParent(editor, this$static.grid_0);
}
instanceOf(editor, 156)?$add_7(this$static.focusHandlers, castTo(editor, 156).addFocusHandler(new Grid$Editor$9(this$static, i_0))):$add_7(this$static.focusHandlers, $addDomHandler(editor, new Grid$Editor$10(this$static, i_0), ($clinit_FocusEvent() , $clinit_FocusEvent() , TYPE_1)));
i_0 == this$static.focusedColumnIndex && (instanceOf(editor, 247)?castTo(editor, 247).focus_1():instanceOf(editor, 114) && castTo(editor, 114).setFocus(true));
}
else {
$addClassName(cell, 'not-editable');
$addClassName(cell, tr.cells[i_0].className || '');
$removeClassName(cell, this$static.grid_0.cellFocusStyleName);
$removeClassName(cell, 'frozen');
if (column == this$static.grid_0.selectionColumn) {
this$static.pinnedRowHandle = $getHandle(this$static.grid_0.dataSource, $getRow(this$static.grid_0.dataSource, this$static.rowIndex_0));
$pin(this$static.pinnedRowHandle);
checkBox = new CheckBox;
$setValue(checkBox, ($clinit_Boolean() , $isSelected_0(this$static.grid_0, this$static.pinnedRowHandle.row_0)?TRUE_0:FALSE_0), false);
checkBox.eventsToSink == -1?sinkEvents_0(checkBox.inputElem, 1 | getEventsSunk(checkBox.inputElem)):checkBox.eventsToSink == -1?sinkEvents(($clinit_DOM() , checkBox.element), 1 | (checkBox.element.__eventBits || 0)):(checkBox.eventsToSink |= 1);
$addDomHandler(checkBox, new Grid$Editor$11(this$static), ($clinit_ClickEvent() , $clinit_ClickEvent() , TYPE_0));
$appendChild(cell, ($clinit_DOM() , checkBox.element));
setParent(checkBox, this$static.grid_0);
$put_2(this$static.columnToWidget, column, checkBox);
$setEnabled_0(checkBox, !this$static.buffered);
}
else
instanceOf(column.bodyRenderer, 80) || $setInnerHTML(cell, $getInnerHTML(tr.cells[i_0]));
}
}
setBounds(this$static.frozenCellWrapper, 0, 0, frozenColumnsWidth, 0);
setBounds(this$static.cellWrapper, frozenColumnsWidth, 0, ((tr.offsetWidth || 0) | 0) - frozenColumnsWidth, cellHeight);
if (!$isOrHasChild(this$static.messageAndButtonsWrapper, this$static.messageWrapper)) {
$appendChild(this$static.messageAndButtonsWrapper, this$static.messageWrapper);
$appendChild(this$static.messageAndButtonsWrapper, this$static.buttonsWrapper);
}
if (this$static.buffered) {
$attachWidget(this$static, this$static.saveButton, this$static.buttonsWrapper);
$attachWidget(this$static, this$static.cancelButton, this$static.buttonsWrapper);
}
$setMessageAndButtonsWrapperVisible(this$static, this$static.buffered);
scrollLeft = this$static.grid_0.escalator.horizontalScrollbar.scrollPos;
this$static.cellWrapper.style['left'] = ((this$static.frozenCellWrapper.offsetWidth || 0) | 0) - scrollLeft + ($clinit_Style$Unit() , 'px');
body_0 = this$static.grid_0.escalator.body_0;
rowTop = $getTop(body_0.this$01_1.positions, tr);
bodyTop = $getAbsoluteTop(body_0.root);
gridTop = ($clinit_DOMImpl() , impl_0).getAbsoluteTop(gridElement);
overlayTop = rowTop + bodyTop - gridTop;
this$static.originalScrollTop = this$static.grid_0.escalator.verticalScrollbar.scrollPos;
if (!this$static.buffered || (tfoot = this$static.grid_0.escalator.footer.root , tfootPageTop = ($clinit_WidgetUtil() , tfoot.getBoundingClientRect()).top , trPageBottom = tr.getBoundingClientRect().bottom , messageAndButtonsHeight = (this$static.messageAndButtonsWrapper.offsetHeight || 0) | 0 , bottomOfButtons = trPageBottom + messageAndButtonsHeight , bottomOfButtons < tfootPageTop)) {
this$static.editorOverlay.style['top'] = overlayTop + 'px';
this$static.originalTop = overlayTop;
this$static.editorOverlay.style['bottom'] = '';
}
else {
$insertFirst(this$static.editorOverlay, this$static.messageAndButtonsWrapper);
gridHeight = ($getElement(this$static.grid_0).offsetHeight || 0) | 0;
this$static.editorOverlay.style['bottom'] = gridHeight - overlayTop - ((tr.offsetHeight || 0) | 0) + 'px';
this$static.editorOverlay.style['top'] = '';
}
this$static.editorOverlay.style['width'] = getRequiredWidthBoundingClientRectDouble(this$static.grid_0.escalator.tableWrapper) + 'px';
}
function $updateHorizontalScrollPosition(this$static){
var scrollLeft;
scrollLeft = this$static.grid_0.escalator.horizontalScrollbar.scrollPos;
this$static.cellWrapper.style['left'] = ((this$static.frozenCellWrapper.offsetWidth || 0) | 0) - scrollLeft + ($clinit_Style$Unit() , 'px');
}
function $updateSelectionCheckboxesAsNeeded(this$static, isEnabled){
var checkBox;
if (instanceOf(this$static.grid_0.selectionModel, 85)) {
$refreshBody(this$static.grid_0);
checkBox = castTo($getWidget_1(castTo($getCell_0(this$static.grid_0.header.defaultRow, this$static.grid_0.selectionColumn), 63)), 77);
$setDisabled(checkBox.inputElem, !isEnabled);
isEnabled?$setStyleName_0(checkBox, getStylePrimaryName(($clinit_DOM() , checkBox.element)) + '-' + 'disabled', false):$setStyleName_0(checkBox, getStylePrimaryName(($clinit_DOM() , checkBox.element)) + '-' + 'disabled', true);
}
}
function $updateVerticalScrollPosition(this$static){
var editorHeight, escalator, footerTop, gridTop, header, headerBottom, newScrollTop, newTop;
newScrollTop = this$static.grid_0.escalator.verticalScrollbar.scrollPos;
gridTop = $getAbsoluteTop($getElement(this$static.grid_0));
editorHeight = (this$static.editorOverlay.offsetHeight || 0) | 0;
escalator = this$static.grid_0.escalator;
header = escalator.header.root;
footerTop = $getAbsoluteTop(escalator.footer.root);
headerBottom = ($clinit_DOMImpl() , impl_0).getAbsoluteTop(header) + ((header.offsetHeight || 0) | 0);
newTop = this$static.originalTop - (newScrollTop - this$static.originalScrollTop);
newTop + gridTop < headerBottom?(newTop = (header.offsetHeight || 0) | 0):newTop + gridTop > footerTop - editorHeight && (newTop = footerTop - editorHeight - gridTop);
this$static.editorOverlay.style['top'] = newTop + ($clinit_Style$Unit() , 'px');
}
function Grid$Editor(){
this.eventHandler = new DefaultEditorEventHandler;
this.editorOverlay = ($clinit_DOM() , $createDivElement($doc));
this.cellWrapper = $createDivElement($doc);
this.frozenCellWrapper = $createDivElement($doc);
this.messageAndButtonsWrapper = $createDivElement($doc);
this.messageWrapper = $createDivElement($doc);
this.buttonsWrapper = $createDivElement($doc);
this.message_0 = $createDivElement($doc);
this.columnToWidget = new HashMap;
this.focusHandlers = new ArrayList;
this.state_0 = ($clinit_Grid$Editor$State() , INACTIVE);
this.saveTimeout = new Grid$Editor$1;
this.saveRequestCallback = new Grid$Editor$2(this);
this.bindTimeout = new Grid$Editor$3;
this.bindRequestCallback = new Grid$Editor$4(this);
this.columnErrors = new HashSet;
this.saveButton = new Button;
$setText(this.saveButton, 'Save');
$addDomHandler(this.saveButton, new Grid$Editor$5(this), ($clinit_ClickEvent() , $clinit_ClickEvent() , TYPE_0));
this.cancelButton = new Button;
$setText(this.cancelButton, 'Cancel');
$addDomHandler(this.cancelButton, new Grid$Editor$6(this), (null , TYPE_0));
}
function setBounds(e, left, top_0, width_0, height){
var style;
style = e.style;
style['left'] = left + ($clinit_Style$Unit() , 'px');
style['top'] = top_0 + 'px';
style['width'] = width_0 + 'px';
style['height'] = height + 'px';
}
defineClass(288, 1, {}, Grid$Editor);
_.buffered = true;
_.enabled = false;
_.focusedColumnIndex = -1;
_.originalScrollTop = 0;
_.originalTop = 0;
_.rowIndex_0 = -1;
_.styleName = null;
var Lcom_vaadin_client_widgets_Grid$Editor_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Editor', 288);
function Grid$Editor$1(){
Timer.call(this);
}
defineClass(298, 75, {}, Grid$Editor$1);
_.run_0 = function(){
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
$ensureNamesAreInitialized(Lcom_vaadin_client_widget_grid_EditorHandler_2_classLit);
}
;
var Lcom_vaadin_client_widgets_Grid$Editor$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Editor/1', 298);
function Grid$Editor$10(this$1, val$currentColumnIndex){
this.this$11 = this$1;
this.val$currentColumnIndex2 = val$currentColumnIndex;
}
defineClass(307, 1, $intern_48, Grid$Editor$10);
_.onFocus = function(event_0){
this.this$11.focusedColumnIndex = this.val$currentColumnIndex2;
}
;
_.val$currentColumnIndex2 = 0;
var Lcom_vaadin_client_widgets_Grid$Editor$10_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Editor/10', 307);
function Grid$Editor$11(this$1){
this.this$11 = this$1;
}
defineClass(308, 1, $intern_36, Grid$Editor$11);
_.onClick = function(event_0){
var row;
row = this.this$11.pinnedRowHandle.row_0;
$isSelected_0(this.this$11.grid_0, row)?$deselect(this.this$11.grid_0, row):$select_1(this.this$11.grid_0, row);
}
;
var Lcom_vaadin_client_widgets_Grid$Editor$11_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Editor/11', 308);
function $cleanup(this$static){
this$static.this$11.state_0 = ($clinit_Grid$Editor$State() , ACTIVE);
$setButtonsEnabled(this$static.this$11);
$cancel_0(this$static.this$11.saveTimeout);
}
function Grid$Editor$2(this$1){
this.this$11 = this$1;
}
defineClass(299, 1, {}, Grid$Editor$2);
_.onError = function(request){
if (this.this$11.state_0 == ($clinit_Grid$Editor$State() , SAVING)) {
$cleanup(this);
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
}
}
;
_.onSuccess = function(request){
if (this.this$11.state_0 == ($clinit_Grid$Editor$State() , SAVING)) {
$cleanup(this);
$cancel_1(this.this$11);
}
}
;
var Lcom_vaadin_client_widgets_Grid$Editor$2_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Editor/2', 299);
function Grid$Editor$3(){
Timer.call(this);
}
defineClass(300, 75, {}, Grid$Editor$3);
_.run_0 = function(){
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
$ensureNamesAreInitialized(Lcom_vaadin_client_widget_grid_EditorHandler_2_classLit);
}
;
var Lcom_vaadin_client_widgets_Grid$Editor$3_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Editor/3', 300);
function Grid$Editor$4(this$1){
this.this$11 = this$1;
}
defineClass(301, 1, {}, Grid$Editor$4);
_.onError = function(request){
if (this.this$11.state_0 == ($clinit_Grid$Editor$State() , BINDING)) {
this.this$11.rowIndex_0 == -1?$doCancel(this.this$11):(this.this$11.state_0 = ACTIVE);
$cancel_0(this.this$11.bindTimeout);
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
}
}
;
_.onSuccess = function(request){
if (this.this$11.state_0 == ($clinit_Grid$Editor$State() , BINDING)) {
this.this$11.state_0 = ACTIVE;
$cancel_0(this.this$11.bindTimeout);
this.this$11.rowIndex_0 = request.rowIndex_0;
$showOverlay(this.this$11);
}
}
;
var Lcom_vaadin_client_widgets_Grid$Editor$4_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Editor/4', 301);
function Grid$Editor$5(this$1){
this.this$11 = this$1;
}
defineClass(302, 1, $intern_36, Grid$Editor$5);
_.onClick = function(event_0){
$save(this.this$11);
}
;
var Lcom_vaadin_client_widgets_Grid$Editor$5_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Editor/5', 302);
function Grid$Editor$6(this$1){
this.this$11 = this$1;
}
defineClass(303, 1, $intern_36, Grid$Editor$6);
_.onClick = function(event_0){
$cancel_1(this.this$11);
}
;
var Lcom_vaadin_client_widgets_Grid$Editor$6_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Editor/6', 303);
function Grid$Editor$7(this$1, val$rowIndex){
this.this$11 = this$1;
this.val$rowIndex2 = val$rowIndex;
}
defineClass(304, 1, $intern_44, Grid$Editor$7);
_.onDataAvailable = function(event_0){
if ($contains(event_0.rowsAvailable, this.val$rowIndex2)) {
$show_0(this.this$11, this.val$rowIndex2);
$removeHandler(this.this$11.dataAvailableHandler.real);
}
}
;
_.val$rowIndex2 = 0;
var Lcom_vaadin_client_widgets_Grid$Editor$7_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Editor/7', 304);
function Grid$Editor$8(this$1){
this.this$11 = this$1;
}
defineClass(305, 1, $intern_43, Grid$Editor$8);
_.onScroll = function(event_0){
$updateHorizontalScrollPosition(this.this$11);
this.this$11.buffered || $updateVerticalScrollPosition(this.this$11);
}
;
var Lcom_vaadin_client_widgets_Grid$Editor$8_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Editor/8', 305);
function Grid$Editor$9(this$1, val$currentColumnIndex){
this.this$11 = this$1;
this.val$currentColumnIndex2 = val$currentColumnIndex;
}
defineClass(306, 1, $intern_48, Grid$Editor$9);
_.onFocus = function(event_0){
this.this$11.focusedColumnIndex = this.val$currentColumnIndex2;
}
;
_.val$currentColumnIndex2 = 0;
var Lcom_vaadin_client_widgets_Grid$Editor$9_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Editor/9', 306);
function $clinit_Grid$Editor$State(){
$clinit_Grid$Editor$State = emptyMethod;
INACTIVE = new Grid$Editor$State('INACTIVE', 0);
ACTIVATING = new Grid$Editor$State('ACTIVATING', 1);
BINDING = new Grid$Editor$State('BINDING', 2);
ACTIVE = new Grid$Editor$State('ACTIVE', 3);
SAVING = new Grid$Editor$State('SAVING', 4);
}
function Grid$Editor$State(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_10(){
$clinit_Grid$Editor$State();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_client_widgets_Grid$Editor$State_2_classLit, 1), $intern_0, 88, 0, [INACTIVE, ACTIVATING, BINDING, ACTIVE, SAVING]);
}
defineClass(88, 5, {88:1, 3:1, 6:1, 5:1}, Grid$Editor$State);
var ACTIVATING, ACTIVE, BINDING, INACTIVE, SAVING;
var Lcom_vaadin_client_widgets_Grid$Editor$State_2_classLit = createForEnum('com.vaadin.client.widgets', 'Grid/Editor/State', 88, values_10);
defineClass(286, 1, {});
var Lcom_vaadin_client_widgets_Grid$GridEvent_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/GridEvent', 286);
function Grid$EditorDomEvent(event_0, cell, editorWidget){
this.event_0 = event_0;
this.cell = cell;
this.editorWidget = editorWidget;
}
defineClass(287, 286, {}, Grid$EditorDomEvent);
var Lcom_vaadin_client_widgets_Grid$EditorDomEvent_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/EditorDomEvent', 287);
function $complete(this$static, errorMessage, errorColumns){
if (this$static.completed) {
throw new IllegalStateException_0('An EditorRequest must be completed exactly once');
}
this$static.completed = true;
!errorColumns && (errorColumns = ($clinit_Collections() , $clinit_Collections() , EMPTY_SET));
$setEditorError(this$static.grid_0.editor, errorMessage, errorColumns);
}
function $failure(this$static, errorMessage, errorColumns){
$complete(this$static, errorMessage, errorColumns);
!!this$static.callback && this$static.callback.onError(this$static);
}
function $success(this$static){
$complete(this$static, null, null);
!!this$static.callback && this$static.callback.onSuccess(this$static);
}
function Grid$EditorRequestImpl(grid, rowIndex, callback){
this.grid_0 = grid;
this.rowIndex_0 = rowIndex;
this.callback = callback;
}
defineClass(164, 1, {}, Grid$EditorRequestImpl);
_.completed = false;
_.rowIndex_0 = 0;
var Lcom_vaadin_client_widgets_Grid$EditorRequestImpl_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/EditorRequestImpl', 164);
function $addColumn_0(this$static, column){
var row, row$iterator;
for (row$iterator = new ArrayList$1(this$static.rows_0); row$iterator.i < row$iterator.this$01.array.length;) {
row = castTo($next_3(row$iterator), 67);
$addCell(row, column);
}
}
function $addRowAt(this$static, index_0){
var i_0, row;
row = this$static.createRow();
row.section = this$static;
for (i_0 = 0; i_0 < this$static.grid_0.columns.array.length; ++i_0) {
$addCell(row, $getColumn(this$static.grid_0, i_0));
}
$add_6(this$static.rows_0, index_0, row);
this$static.requestSectionRefresh();
return row;
}
function $appendRow(this$static){
return $addRowAt(this$static, this$static.rows_0.array.length);
}
function $getRow_0(this$static, index_0){
try {
return castTo($get_8(this$static.rows_0, index_0), 67);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 33)) {
throw new IllegalArgumentException('Row with index ' + index_0 + ' does not exist');
}
else
throw unwrap($e0);
}
}
function $removeColumn_0(this$static, column){
var row, row$iterator;
for (row$iterator = new ArrayList$1(this$static.rows_0); row$iterator.i < row$iterator.this$01.array.length;) {
row = castTo($next_3(row$iterator), 67);
$remove_6(row.cells_0, column);
}
}
function $removeRow(this$static, index_0){
$remove_9(this$static.rows_0, index_0);
this$static.markAsDirty = true;
$scheduleFinally(($clinit_SchedulerImpl() , INSTANCE), new Grid$Footer$1(this$static));
}
function $setVisible(this$static, visible){
this$static.visible = visible;
this$static.requestSectionRefresh();
}
function $updateColSpans(this$static){
var row, row$iterator;
for (row$iterator = new ArrayList$1(this$static.rows_0); row$iterator.i < row$iterator.this$01.array.length;) {
row = castTo($next_3(row$iterator), 67);
$size(row.cellGroups) != 0 && $calculateColspans(row);
}
}
function Grid$StaticSection(){
this.rows_0 = new ArrayList;
}
defineClass(200, 1, {});
_.visible = true;
var Lcom_vaadin_client_widgets_Grid$StaticSection_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/StaticSection', 200);
function Grid$Footer(){
Grid$StaticSection.call(this);
}
defineClass(284, 200, {}, Grid$Footer);
_.createRow = function(){
return new Grid$FooterRow;
}
;
_.requestSectionRefresh = function(){
this.markAsDirty = true;
$scheduleFinally(($clinit_SchedulerImpl() , INSTANCE), new Grid$Footer$1(this));
}
;
_.markAsDirty = false;
var Lcom_vaadin_client_widgets_Grid$Footer_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Footer', 284);
function Grid$Footer$1(this$1){
this.this$11 = this$1;
}
defineClass(202, 1, {}, Grid$Footer$1);
_.execute_1 = function(){
if (this.this$11.markAsDirty) {
this.this$11.markAsDirty = false;
$refreshFooter(this.this$11.grid_0);
}
}
;
var Lcom_vaadin_client_widgets_Grid$Footer$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Footer/1', 202);
function $getHtml(this$static){
if (this$static.type_0 != ($clinit_GridStaticCellType() , HTML_0)) {
throw new IllegalStateException_0('Cannot fetch HTML from a cell with type ' + this$static.type_0);
}
return castToString(this$static.content_0);
}
function $getText_0(this$static){
if (this$static.type_0 != ($clinit_GridStaticCellType() , TEXT)) {
throw new IllegalStateException_0('Cannot fetch Text from a cell with type ' + this$static.type_0);
}
return castToString(this$static.content_0);
}
function $getWidget_1(this$static){
if (this$static.type_0 != ($clinit_GridStaticCellType() , WIDGET)) {
throw new IllegalStateException_0('Cannot fetch Widget from a cell with type ' + this$static.type_0);
}
return castTo(this$static.content_0, 14);
}
function $setColspan(this$static, colspan){
if (colspan < 1) {
throw new IllegalArgumentException('Colspan cannot be less than 1');
}
this$static.colspan_0 = colspan;
this$static.section.requestSectionRefresh();
}
function $setHtml(this$static, html){
this$static.content_0 = html;
this$static.type_0 = ($clinit_GridStaticCellType() , HTML_0);
this$static.section.requestSectionRefresh();
}
function $setSection(this$static, section){
this$static.section = section;
}
function $setStyleName_1(this$static, styleName){
this$static.styleName = styleName;
this$static.section.requestSectionRefresh();
}
function $setText_0(this$static, text_0){
this$static.content_0 = text_0;
this$static.type_0 = ($clinit_GridStaticCellType() , TEXT);
this$static.section.requestSectionRefresh();
}
function $setWidget_0(this$static, widget){
this$static.content_0 = widget;
this$static.type_0 = ($clinit_GridStaticCellType() , WIDGET);
this$static.section.requestSectionRefresh();
}
function Grid$StaticSection$StaticCell(){
this.type_0 = ($clinit_GridStaticCellType() , TEXT);
}
defineClass(66, 1, {66:1});
_.colspan_0 = 1;
_.content_0 = null;
_.styleName = null;
var Lcom_vaadin_client_widgets_Grid$StaticSection$StaticCell_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/StaticSection/StaticCell', 66);
function Grid$FooterCell(){
Grid$StaticSection$StaticCell.call(this);
}
defineClass(285, 66, {66:1}, Grid$FooterCell);
var Lcom_vaadin_client_widgets_Grid$FooterCell_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/FooterCell', 285);
function $addCell(this$static, column){
var cell;
cell = this$static.createCell();
$setSection(cell, this$static.section);
$put_2(this$static.cells_0, column, cell);
}
function $calculateColspans(this$static){
var cell, cell$iterator, colSpan, column, column$iterator, entry, group, group$iterator, outerIter, outerIter0;
for (cell$iterator = (outerIter0 = (new AbstractMap$2(this$static.cells_0)).this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter0)); cell$iterator.val$outerIter2.hasNext_0();) {
cell = (entry = castTo(cell$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getValue_0(), 66));
$setColspan(cell, 1);
}
for (group$iterator = (outerIter = (new AbstractMap$1(this$static.cellGroups)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter)); group$iterator.val$outerIter2.hasNext_0();) {
group = (entry = castTo(group$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getKey(), 55));
if ($checkMergedCellIsContinuous(this$static, group)) {
colSpan = 0;
for (column$iterator = group.iterator(); column$iterator.hasNext_0();) {
column = castTo(column$iterator.next_1(), 21);
column.hidden_0 || ++colSpan;
}
$setColspan(castTo($get_5(this$static.cellGroups, group), 66), 1 > colSpan?1:colSpan);
}
else {
$setColspan(castTo($get_5(this$static.cellGroups, group), 66), 1);
}
}
}
function $checkMergedCellIsContinuous(this$static, mergedCell){
var columnOrder, i_0, j;
columnOrder = new ArrayList_1(unmodifiableList(new ArrayList_1(this$static.section.grid_0.columns)));
if (!$containsAll(columnOrder, mergedCell)) {
return false;
}
for (i_0 = 0; i_0 < columnOrder.array.length; ++i_0) {
if (!mergedCell.contains_0((checkCriticalElementIndex(i_0, columnOrder.array.length) , columnOrder.array[i_0]))) {
continue;
}
for (j = 1; j < mergedCell.size_2(); ++j) {
if (!mergedCell.contains_0((checkCriticalElementIndex(i_0 + j, columnOrder.array.length) , columnOrder.array[i_0 + j]))) {
return false;
}
}
return true;
}
return false;
}
function $getCell_0(this$static, column){
var cellGroup;
cellGroup = $getCellGroupForColumn(this$static, column);
if (cellGroup) {
return castTo($get_5(this$static.cellGroups, cellGroup), 66);
}
return castTo($get_5(this$static.cells_0, column), 66);
}
function $getCellGroupForColumn(this$static, column){
var entry, group, group$iterator, outerIter;
for (group$iterator = (outerIter = (new AbstractMap$1(this$static.cellGroups)).this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter)); group$iterator.val$outerIter2.hasNext_0();) {
group = (entry = castTo(group$iterator.val$outerIter2.next_1(), 9) , castTo(entry.getKey(), 55));
if (group.contains_0(column)) {
return group;
}
}
return null;
}
function $setStyleName_2(this$static, styleName){
this$static.styleName = styleName;
this$static.section.requestSectionRefresh();
}
function Grid$StaticSection$StaticRow(){
this.cells_0 = new HashMap;
this.cellGroups = new HashMap;
}
defineClass(67, 1, {67:1});
_.styleName = null;
var Lcom_vaadin_client_widgets_Grid$StaticSection$StaticRow_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/StaticSection/StaticRow', 67);
function Grid$FooterRow(){
Grid$StaticSection$StaticRow.call(this);
}
defineClass(118, 67, {118:1, 67:1}, Grid$FooterRow);
_.createCell = function(){
return new Grid$FooterCell;
}
;
var Lcom_vaadin_client_widgets_Grid$FooterRow_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/FooterRow', 118);
function Grid$GridSpacerUpdater(this$0){
this.this$01 = this$0;
this.elementToWidgetMap = new HashMap;
}
defineClass(293, 1, {}, Grid$GridSpacerUpdater);
_.destroy = function(spacer){
var detailsWidget, spacerElement;
spacerElement = spacer.spacerElement;
detailsWidget = castTo($remove_6(this.elementToWidgetMap, $getFirstChildElement_0(($clinit_DOMImpl() , spacerElement))), 14);
if (detailsWidget) {
setParent(detailsWidget, null);
$removeAllChildren(spacerElement);
}
}
;
_.init_3 = function(spacer){
var borderTopAndBottomHeight, detailsWidget, element, measuredHeight, requiredHeightBoundingClientRectDouble, rowIndex, spacerElement, spacerHeight, spacerRoot;
spacerRoot = spacer.spacerElement;
spacer.rowIndex_0 % 2 == 1?$addClassName($getParentElement_0(($clinit_DOMImpl() , spacerRoot)), 'stripe'):$removeClassName($getParentElement_0(($clinit_DOMImpl() , spacerRoot)), 'stripe');
rowIndex = spacer.rowIndex_0;
detailsWidget = null;
try {
detailsWidget = this.this$01.detailsGenerator.getDetails(rowIndex);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 13)) {
$clinit_UIObject();
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
}
else
throw unwrap($e0);
}
spacerElement = spacer.spacerElement;
if (!detailsWidget) {
$removeAllChildren(spacerElement);
spacerHeight = 50;
}
else {
element = ($clinit_DOM() , detailsWidget.element);
spacerElement.appendChild(element);
setParent(detailsWidget, this.this$01);
castTo($put_2(this.elementToWidgetMap, element, detailsWidget), 14);
requiredHeightBoundingClientRectDouble = getRequiredHeightBoundingClientRectDouble(element);
borderTopAndBottomHeight = ($clinit_WidgetUtil() , getBorderThickness(spacerElement, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['borderTopWidth', 'borderBottomWidth'])));
measuredHeight = requiredHeightBoundingClientRectDouble + borderTopAndBottomHeight;
spacerHeight = measuredHeight;
}
$setSpacer(this.this$01.escalator.body_0, rowIndex, spacerHeight);
}
;
var Lcom_vaadin_client_widgets_Grid$GridSpacerUpdater_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/GridSpacerUpdater', 293);
function $addColumn_1(this$static, column){
$addColumn_0(this$static, column);
!!this$static.defaultRow && column.setDefaultHeaderContent(castTo($getCell_0(this$static.defaultRow, column), 63));
}
function $removeRow_0(this$static, index_0){
var removedRow;
removedRow = castTo($getRow_0(this$static, index_0), 52);
$remove_9(this$static.rows_0, index_0);
this$static.markAsDirty = true;
$scheduleFinally(($clinit_SchedulerImpl() , INSTANCE), new Grid$Header$1(this$static));
removedRow == this$static.defaultRow && $setDefaultRow(this$static, null);
}
function $setDefaultRow(this$static, row){
if (row == this$static.defaultRow) {
return;
}
if (!!row && $indexOf_2(this$static.rows_0, row, 0) == -1) {
throw new IllegalArgumentException('Cannot set a default row that does not exist in the container');
}
!!this$static.defaultRow && $setDefault(this$static.defaultRow, false);
!!row && $setDefault(row, true);
this$static.defaultRow = row;
this$static.markAsDirty = true;
$scheduleFinally(($clinit_SchedulerImpl() , INSTANCE), new Grid$Header$1(this$static));
}
function Grid$Header(){
Grid$StaticSection.call(this);
}
defineClass(283, 200, {}, Grid$Header);
_.createRow = function(){
return new Grid$HeaderRow;
}
;
_.requestSectionRefresh = function(){
this.markAsDirty = true;
$scheduleFinally(($clinit_SchedulerImpl() , INSTANCE), new Grid$Header$1(this));
}
;
_.markAsDirty = false;
var Lcom_vaadin_client_widgets_Grid$Header_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Header', 283);
function Grid$Header$1(this$1){
this.this$11 = this$1;
}
defineClass(165, 1, {}, Grid$Header$1);
_.execute_1 = function(){
if (this.this$11.markAsDirty) {
this.this$11.markAsDirty = false;
$refreshHeader(this.this$11.grid_0);
}
}
;
var Lcom_vaadin_client_widgets_Grid$Header$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Header/1', 165);
function Grid$HeaderCell(){
Grid$StaticSection$StaticCell.call(this);
}
defineClass(63, 66, {63:1, 66:1}, Grid$HeaderCell);
var Lcom_vaadin_client_widgets_Grid$HeaderCell_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/HeaderCell', 63);
function $setDefault(this$static, isDefault){
var column, column$iterator;
this$static.isDefault = isDefault;
if (isDefault) {
for (column$iterator = new Collections$UnmodifiableCollectionIterator(unmodifiableList(new ArrayList_1(this$static.section.grid_0.columns)).coll.iterator()); column$iterator.it.hasNext_0();) {
column = castTo(column$iterator.it.next_1(), 21);
column.setDefaultHeaderContent(castTo($getCell_0(this$static, column), 63));
}
}
}
function Grid$HeaderRow(){
Grid$StaticSection$StaticRow.call(this);
}
defineClass(52, 67, {52:1, 67:1}, Grid$HeaderRow);
_.createCell = function(){
return new Grid$HeaderCell;
}
;
_.isDefault = false;
var Lcom_vaadin_client_widgets_Grid$HeaderRow_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/HeaderRow', 52);
function $clinit_Grid$Section(){
$clinit_Grid$Section = emptyMethod;
HEADER = new Grid$Section('HEADER', 0);
BODY = new Grid$Section('BODY', 1);
FOOTER = new Grid$Section('FOOTER', 2);
}
function Grid$Section(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_11(){
$clinit_Grid$Section();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_client_widgets_Grid$Section_2_classLit, 1), $intern_0, 117, 0, [HEADER, BODY, FOOTER]);
}
defineClass(117, 5, {117:1, 3:1, 6:1, 5:1}, Grid$Section);
var BODY, FOOTER, HEADER;
var Lcom_vaadin_client_widgets_Grid$Section_2_classLit = createForEnum('com.vaadin.client.widgets', 'Grid/Section', 117, values_11);
function $initDone(this$static){
$setWidth_2(this$static);
$setEditable_0(this$static);
this$static.initDone = true;
}
function $setEditable_0(this$static){
if (this$static.initDone) {
throw new UnsupportedOperationException_0("can't set the selection column editable");
}
$setEditable(this$static, false);
return this$static;
}
function $setWidth_2(this$static){
if (-1 != this$static.widthUser && this$static.initDone) {
throw new UnsupportedOperationException_0('The selection column cannot be modified after init');
}
else {
$setWidth_1(this$static, -1);
}
return this$static;
}
function Grid$SelectionColumn(this$0, selectColumnRenderer){
this.this$01 = this$0;
$setRenderer(this, selectColumnRenderer);
this.initDone = false;
this.selected_0 = false;
}
defineClass(290, 21, {21:1}, Grid$SelectionColumn);
_.getExpandRatio = function(){
return 0;
}
;
_.getMaximumWidth = function(){
return -1;
}
;
_.getMinimumWidth = function(){
return -1;
}
;
_.getValue = function(row){
return $clinit_Boolean() , $isSelected_0(this.this$01, row)?TRUE_0:FALSE_0;
}
;
_.setDefaultHeaderContent = function(selectionCell){
var model, row, row$iterator;
model = castTo(this.this$01.selectionModel, 85);
if (!this.selectAllCheckBox) {
this.selectAllCheckBox = new CheckBox;
$setStylePrimaryName(this.selectAllCheckBox, getStylePrimaryName($getStyleElement(this.this$01)) + '-select-all-checkbox');
$addValueChangeHandler(this.selectAllCheckBox, new Grid$SelectionColumn$1(this, model));
$setValue(this.selectAllCheckBox, ($clinit_Boolean() , this.selected_0?TRUE_0:FALSE_0), false);
$addHeaderKeyUpHandler(this.this$01, new Grid$SelectionColumn$2(this));
}
else {
for (row$iterator = new ArrayList$1(this.this$01.header.rows_0); row$iterator.i < row$iterator.this$01.array.length;) {
row = castTo($next_3(row$iterator), 52);
castTo($getCell_0(row, this), 63).type_0 == ($clinit_GridStaticCellType() , WIDGET) && $setText_0(castTo($getCell_0(row, this), 63), '');
}
}
$setWidget_0(selectionCell, this.selectAllCheckBox);
}
;
_.initDone = false;
_.selected_0 = false;
var Lcom_vaadin_client_widgets_Grid$SelectionColumn_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/SelectionColumn', 290);
function Grid$SelectionColumn$1(this$1, val$model){
this.this$11 = this$1;
this.val$model2 = val$model;
}
defineClass(309, 1, {742:1, 15:1}, Grid$SelectionColumn$1);
_.onValueChange = function(event_0){
if (unsafeCast(checkNotNull(event_0.value_0))) {
$fireEvent_0(this.this$11.this$01, new SelectAllEvent(this.val$model2));
this.this$11.selected_0 = true;
}
else {
this.val$model2.deselectAll();
this.this$11.selected_0 = false;
}
}
;
var Lcom_vaadin_client_widgets_Grid$SelectionColumn$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/SelectionColumn/1', 309);
function Grid$SelectionColumn$2(this$1){
this.this$11 = this$1;
}
defineClass(310, 1, $intern_47, Grid$SelectionColumn$2);
_.onKeyUp = function(event_0){
var targetHeaderRow;
if ($getKeyCode(event_0.nativeEvent) != 32) {
return;
}
targetHeaderRow = castTo($getRow_0(this.this$11.this$01.header, event_0.targetCell.rowReference.rowIndex_0), 52);
if (!targetHeaderRow.isDefault) {
return;
}
event_0.targetCell.column_0 == this.this$11 && $setValue(this.this$11.selectAllCheckBox, ($clinit_Boolean() , unsafeCast(checkNotNull($getValue(this.this$11.selectAllCheckBox)))?FALSE_0:TRUE_0), true);
}
;
var Lcom_vaadin_client_widgets_Grid$SelectionColumn$2_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/SelectionColumn/2', 310);
function $clinit_Grid$SelectionMode(){
$clinit_Grid$SelectionMode = emptyMethod;
SINGLE = new Grid$SelectionMode$1;
MULTI = new Grid$SelectionMode$2;
NONE_1 = new Grid$SelectionMode$3;
}
function Grid$SelectionMode(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_12(){
$clinit_Grid$SelectionMode();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_client_widgets_Grid$SelectionMode_2_classLit, 1), $intern_0, 76, 0, [SINGLE, MULTI, NONE_1]);
}
defineClass(76, 5, $intern_49);
var MULTI, NONE_1, SINGLE;
var Lcom_vaadin_client_widgets_Grid$SelectionMode_2_classLit = createForEnum('com.vaadin.client.widgets', 'Grid/SelectionMode', 76, values_12);
function Grid$SelectionMode$1(){
Grid$SelectionMode.call(this, 'SINGLE', 0);
}
defineClass(321, 76, $intern_49, Grid$SelectionMode$1);
var Lcom_vaadin_client_widgets_Grid$SelectionMode$1_2_classLit = createForEnum('com.vaadin.client.widgets', 'Grid/SelectionMode/1', 321, null);
function Grid$SelectionMode$2(){
Grid$SelectionMode.call(this, 'MULTI', 1);
}
defineClass(322, 76, $intern_49, Grid$SelectionMode$2);
var Lcom_vaadin_client_widgets_Grid$SelectionMode$2_2_classLit = createForEnum('com.vaadin.client.widgets', 'Grid/SelectionMode/2', 322, null);
function Grid$SelectionMode$3(){
Grid$SelectionMode.call(this, 'NONE', 2);
}
defineClass(323, 76, $intern_49, Grid$SelectionMode$3);
var Lcom_vaadin_client_widgets_Grid$SelectionMode$3_2_classLit = createForEnum('com.vaadin.client.widgets', 'Grid/SelectionMode/3', 323, null);
function $close(this$static){
if (this$static.content_0.parent_0 == this$static.rootContainer) {
setStyleName(($clinit_DOM() , this$static.element), 'open', false);
setStyleName(this$static.element, 'closed', true);
$removeFromParent_0(this$static.content_0);
$setHeightToHeaderCellHeight(this$static);
if (this$static.clickOutsideToCloseHandlerRegistration) {
$removeHandler(this$static.clickOutsideToCloseHandlerRegistration.real);
this$static.clickOutsideToCloseHandlerRegistration = null;
}
}
}
function $isOpen(this$static){
return this$static.content_0.parent_0 == this$static.rootContainer;
}
function $open(this$static){
if (this$static.content_0.parent_0 != this$static.rootContainer && !!this$static.parent_0) {
setStyleName(($clinit_DOM() , this$static.element), 'open', true);
setStyleName(this$static.element, 'closed', false);
$add_3(this$static.rootContainer, this$static.content_0);
this$static.clickOutsideToCloseHandlerRegistration = addNativePreviewHandler(this$static.clickOutsideToCloseHandler);
}
}
function $setHeightToHeaderCellHeight(this$static){
var firstHeaderCell, header, height;
header = this$static.grid_0.escalator.header;
if (header.rows_0 == 0 || !$getTrByVisualIndex(header, 0).hasChildNodes()) {
$ensureNamesAreInitialized(Lcom_vaadin_client_widgets_Grid_2_classLit);
new Logger;
$setHeight(this$static.openCloseButton, header.defaultRowHeight + 'px');
return;
}
firstHeaderCell = $getFirstChildElement($getTrByVisualIndex(header, 0));
height = getRequiredHeightBoundingClientRectDouble(firstHeaderCell) - (measureVerticalBorder(($clinit_DOM() , this$static.element)) / 2 | 0);
$setHeight(this$static.openCloseButton, height + 'px');
}
function $setStylePrimaryName_11(this$static, styleName){
setStylePrimaryName(($clinit_DOM() , this$static.element), styleName);
$setStylePrimaryName(this$static.content_0, styleName + '-content');
$setStylePrimaryName(this$static.openCloseButton, styleName + '-button');
if (this$static.content_0.parent_0 == this$static.rootContainer) {
setStyleName(this$static.element, 'open', true);
setStyleName(this$static.element, 'closed', false);
}
else {
setStyleName(this$static.element, 'open', false);
setStyleName(this$static.element, 'closed', true);
}
}
function $updateVisibility(this$static){
var hasWidgets, isVisible;
hasWidgets = this$static.content_0.children.size_0 > 0;
isVisible = !!this$static.parent_0;
if (isVisible && !hasWidgets) {
setParent(this$static, null);
$removeFromParent(($clinit_DOM() , this$static.element));
}
else if (!isVisible && hasWidgets) {
$close(this$static);
$appendChild($getElement(this$static.grid_0), ($clinit_DOM() , this$static.element));
setParent(this$static, this$static.grid_0);
$setHeightToHeaderCellHeight(this$static);
}
}
function Grid$Sidebar(grid){
var keyDownHandler;
this.openCloseButtonHandler = new Grid$Sidebar$1(this);
this.clickOutsideToCloseHandler = new Grid$Sidebar$2(this);
this.grid_0 = grid;
this.rootContainer = new FlowPanel;
$initWidget(this, this.rootContainer);
this.openCloseButton = new Button;
$addDomHandler(this.openCloseButton, this.openCloseButtonHandler, ($clinit_ClickEvent() , $clinit_ClickEvent() , TYPE_0));
$add_3(this.rootContainer, this.openCloseButton);
this.content_0 = new Grid$Sidebar$3(this);
this.menuBar = new Grid$Sidebar$4(this);
keyDownHandler = new Grid$Sidebar$5(this);
$addDomHandler(this.openCloseButton, keyDownHandler, ($clinit_KeyDownEvent() , $clinit_KeyDownEvent() , TYPE_2));
$addDomHandler(this.menuBar, keyDownHandler, (null , TYPE_2));
}
defineClass(294, 697, $intern_37, Grid$Sidebar);
_.onAttach = function(){
$onAttach_0(this);
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), new Grid$Sidebar$6(this));
}
;
var Lcom_vaadin_client_widgets_Grid$Sidebar_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Sidebar', 294);
function Grid$Sidebar$1(this$1){
this.this$11 = this$1;
}
defineClass(313, 1, $intern_36, Grid$Sidebar$1);
_.onClick = function(event_0){
$isOpen(this.this$11)?$close(this.this$11):$open(this.this$11);
}
;
var Lcom_vaadin_client_widgets_Grid$Sidebar$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Sidebar/1', 313);
function Grid$Sidebar$2(this$1){
this.this$11 = this$1;
}
defineClass(314, 1, $intern_42, Grid$Sidebar$2);
_.onPreviewNativeEvent = function(event_0){
var clickTarget;
if ($getTypeInt(event_0.nativeEvent) != 4) {
return;
}
clickTarget = $getEventTarget(event_0.nativeEvent);
$isOrHasChild($getElement(this.this$11.rootContainer), clickTarget) || $close(this.this$11);
}
;
var Lcom_vaadin_client_widgets_Grid$Sidebar$2_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Sidebar/2', 314);
function Grid$Sidebar$3(this$1){
this.this$11 = this$1;
FlowPanel.call(this);
}
defineClass(315, 166, $intern_34, Grid$Sidebar$3);
_.remove = function(w){
var removed;
removed = $remove_0(this, w);
removed && $updateVisibility(this.this$11);
return removed;
}
;
var Lcom_vaadin_client_widgets_Grid$Sidebar$3_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Sidebar/3', 315);
function $insertItem_0(this$static, item_0, beforeIndex){
if (!this$static.parent_0) {
$insert_0(this$static.this$11.content_0, this$static);
$updateVisibility(this$static.this$11);
}
return $insertItem(this$static, item_0, beforeIndex);
}
function $removeItem_0(this$static, item_0){
$removeItem(this$static, item_0);
this$static.items.array.length == 0 && $removeFromParent_0(this$static.this$11.menuBar);
}
function Grid$Sidebar$4(this$1){
this.this$11 = this$1;
this.allItems = new ArrayList;
this.items = new ArrayList;
$init_0(this, ($clinit_MenuBar_Resources_default_InlineClientBundleGenerator$menuBarSubMenuIconInitializer() , $clinit_ClippedImagePrototype() , true));
}
defineClass(316, 204, $intern_33, Grid$Sidebar$4);
_.onBrowserEvent = function(event_0){
var item_0;
$clinit_DOM();
if ($eventGetTypeInt(($clinit_DOMImpl() , event_0).type) == 128 && (event_0.keyCode | 0) == 13) {
item_0 = this.selectedItem;
$onBrowserEvent_0(this, event_0);
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), new Grid$Sidebar$4$1(this, item_0));
}
else {
$onBrowserEvent_0(this, event_0);
}
}
;
var Lcom_vaadin_client_widgets_Grid$Sidebar$4_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Sidebar/4', 316);
function Grid$Sidebar$4$1(this$2, val$item){
this.this$21 = this$2;
this.val$item2 = val$item;
}
defineClass(317, 1, {}, Grid$Sidebar$4$1);
_.execute_1 = function(){
$selectItem(this.this$21, this.val$item2);
$focus(this.this$21);
}
;
var Lcom_vaadin_client_widgets_Grid$Sidebar$4$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Sidebar/4/1', 317);
function Grid$Sidebar$5(this$1){
this.this$11 = this$1;
}
defineClass(318, 1, {745:1, 15:1}, Grid$Sidebar$5);
var Lcom_vaadin_client_widgets_Grid$Sidebar$5_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Sidebar/5', 318);
function Grid$Sidebar$6(this$1){
this.this$11 = this$1;
}
defineClass(319, 1, {}, Grid$Sidebar$6);
_.execute_1 = function(){
$setHeightToHeaderCellHeight(this.this$11);
}
;
var Lcom_vaadin_client_widgets_Grid$Sidebar$6_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/Sidebar/6', 319);
function $addSortingIndicatorsToHeaderRow(this$static, headerRow, cell){
var cellElement, column, sortIndex, sortingOrder, cellElement_0;
cellElement_0 = cell.element;
cellElement_0.removeAttribute('sort-order');
$removeClassName(cellElement_0, 'sort-desc');
$removeClassName(cellElement_0, 'sort-asc');
column = $getVisibleColumn(this$static.this$01, cell.column_0);
sortingOrder = $getSortOrder_0(this$static, column);
if (!headerRow.isDefault || !column.sortable_0 || !sortingOrder) {
return;
}
cellElement = cell.element;
($clinit_SortDirection() , ASCENDING) == sortingOrder.direction_0?$addClassName(cellElement, 'sort-asc'):$addClassName(cellElement, 'sort-desc');
sortIndex = $indexOf_3(unmodifiableList(this$static.this$01.sortOrder_0), sortingOrder);
sortIndex > -1 && unmodifiableList(this$static.this$01.sortOrder_0).coll.size_2() > 1 && $setAttribute(cellElement, 'sort-order', ($clinit_String() , '' + (sortIndex + 1)));
}
function $getSortOrder_0(this$static, column){
var order, order$iterator;
for (order$iterator = new Collections$UnmodifiableCollectionIterator(unmodifiableList(this$static.this$01.sortOrder_0).coll.iterator()); order$iterator.it.hasNext_0();) {
order = castTo(order$iterator.it.next_1(), 71);
if (order.column_0 == column) {
return order;
}
}
return null;
}
function $postAttach(this$static, row, attachedCells){
var cell, cell$iterator, cellElement, columns, gridRow, metadata, widget;
gridRow = $getRow_0(this$static.section, row.row_0);
columns = $getVisibleColumns(this$static.this$01);
for (cell$iterator = attachedCells.iterator(); cell$iterator.hasNext_0();) {
cell = castTo(cell$iterator.next_1(), 41);
metadata = $getCell_0(gridRow, castTo($get_9(columns, cell.column_0), 21));
if (($clinit_GridStaticCellType() , WIDGET) == metadata.type_0) {
widget = $getWidget_1(metadata);
cellElement = cell.element;
if (!widget.isAttached()) {
$appendChild(cellElement, ($clinit_DOM() , widget.element));
setParent(widget, this$static.this$01);
}
}
}
}
function $preDetach(this$static, row, cellsToDetach){
var cell, cell$iterator, columns, gridRow, metadata, widget;
if (this$static.section.rows_0.array.length > row.row_0) {
gridRow = $getRow_0(this$static.section, row.row_0);
columns = $getVisibleColumns(this$static.this$01);
for (cell$iterator = cellsToDetach.iterator(); cell$iterator.hasNext_0();) {
cell = castTo(cell$iterator.next_1(), 41);
metadata = $getCell_0(gridRow, castTo($get_9(columns, cell.column_0), 21));
if (($clinit_GridStaticCellType() , WIDGET) == metadata.type_0 && $getWidget_1(metadata).isAttached()) {
widget = $getWidget_1(metadata);
setParent(widget, null);
$removeFromParent(($clinit_DOM() , widget.element));
}
}
}
}
function Grid$StaticSectionUpdater(this$0, section, container){
this.this$01 = this$0;
this.section = section;
this.container = container;
}
defineClass(201, 1, {}, Grid$StaticSectionUpdater);
_.postAttach = function(row, attachedCells){
$postAttach(this, row, attachedCells);
}
;
_.postDetach = function(row, detachedCells){
}
;
_.preAttach = function(row, cellsToAttach){
}
;
_.preDetach = function(row, cellsToDetach){
$preDetach(this, row, cellsToDetach);
}
;
_.update = function(row, cellsToUpdate){
var cell, cell$iterator, columns, element, metadata, staticRow;
staticRow = $getRow_0(this.section, row.row_0);
columns = $getVisibleColumns(this.this$01);
setCustomStyleName(row.element, staticRow.styleName);
for (cell$iterator = cellsToUpdate.iterator(); cell$iterator.hasNext_0();) {
cell = castTo(cell$iterator.next_1(), 41);
metadata = $getCell_0(staticRow, castTo($get_9(columns, cell.column_0), 21));
instanceOf(staticRow, 52) && $addSortingIndicatorsToHeaderRow(this, castTo(staticRow, 52), cell);
$setColSpan_0(cell, metadata.colspan_0);
element = cell.element;
switch (metadata.type_0.ordinal) {
case 0:
$setInnerText(element, $getText_0(metadata));
break;
case 1:
$setInnerHTML(element, $getHtml(metadata));
break;
case 2:
$preDetach(this, row, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_client_widget_escalator_FlyweightCell_2_classLit, 1), $intern_0, 41, 0, [cell])));
element.innerHTML = '';
$postAttach(this, row, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_client_widget_escalator_FlyweightCell_2_classLit, 1), $intern_0, 41, 0, [cell])));
}
setCustomStyleName(element, metadata.styleName);
$updateFocusedCellStyle(this.this$01.cellFocusHandler, cell, this.container);
}
}
;
var Lcom_vaadin_client_widgets_Grid$StaticSectionUpdater_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/StaticSectionUpdater', 201);
function $sort_0(this$static, column, multisort){
var idx, items, so;
if ($indexOf_2(this$static.this$01.columns, column, 0) == -1) {
throw new IllegalArgumentException('Given column is not a column in this grid. ' + $toString_1(column));
}
if (!column.sortable_0) {
return;
}
so = $getSortOrder(this$static.this$01, column);
if (multisort) {
if (so) {
idx = $indexOf_2(this$static.this$01.sortOrder_0, so, 0);
$set_7(this$static.this$01.sortOrder_0, idx, new SortOrder_0(so.column_0, so.direction_0.getOpposite()));
}
else {
$add_7(this$static.this$01.sortOrder_0, new SortOrder(column));
}
}
else {
items = this$static.this$01.sortOrder_0.array.length;
this$static.this$01.sortOrder_0.array = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_0, 1, 0, 4, 1);
!!so && items == 1?$add_7(this$static.this$01.sortOrder_0, new SortOrder_0(so.column_0, so.direction_0.getOpposite())):$add_7(this$static.this$01.sortOrder_0, new SortOrder(column));
}
$sort(this$static.this$01);
}
function $sortAfterDelay(this$static){
this$static.column_0 = this$static.this$01.eventCell.column_0;
this$static.scheduledMultisort = true;
$schedule(this$static.timer, 500);
}
function Grid$UserSorter(this$0){
this.this$01 = this$0;
this.timer = new Grid$UserSorter$1(this);
}
defineClass(291, 1, {}, Grid$UserSorter);
_.scheduledMultisort = false;
var Lcom_vaadin_client_widgets_Grid$UserSorter_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/UserSorter', 291);
function Grid$UserSorter$1(this$1){
this.this$11 = this$1;
Timer.call(this);
}
defineClass(311, 75, {}, Grid$UserSorter$1);
_.run_0 = function(){
$sort_0(this.this$11, this.this$11.column_0, this.this$11.scheduledMultisort);
}
;
var Lcom_vaadin_client_widgets_Grid$UserSorter$1_2_classLit = createForClass('com.vaadin.client.widgets', 'Grid/UserSorter/1', 311);
function asList(o){
var l = new ArrayList;
l.array = o;
return l;
}
function createJsType(clz){
if (clz == Lcom_google_gwt_core_client_JavaScriptObject_2_classLit || clz == Lcom_google_gwt_core_client_JavaScriptObject_2_classLit) {
return [];
}
return {};
}
function definePropertyAccessors(jsObject, propertyName, setter, getter){
var _value = jsObject[propertyName];
Object.defineProperty(jsObject, propertyName, {get:function(){
if (getter) {
return getter()[0];
}
return _value;
}
, set:function(value_0){
setter && setter(value_0, {value:value_0});
_value = value_0;
}
});
_value !== undefined && (jsObject[propertyName] = _value);
}
function definePropertyAccessors_0(jso, propertyName, setter, getter){
var getterJSO, setterJSO;
setterJSO = setter?wrapFunction(new JS$1(setter)):null;
getterJSO = getter?wrapFunction(new JS$2(getter)):null;
definePropertyAccessors(castToJso(jso), propertyName, setterJSO, getterJSO);
}
function exec_0(o, arg){
return runJavascriptFunction(o, 'call', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [o, arg]));
}
function getError(msg){
return new Error(msg || '');
}
function isPrimitiveType(dataItem){
return Object(dataItem) !== dataItem;
}
function isUndefinedOrNull(o){
return o === undefined || o === null;
}
function JS$1(val$setter){
this.val$setter1 = val$setter;
Function_0.call(this);
}
defineClass(360, 7, $intern_18, JS$1);
_.f = function(){
var jsonValue;
jsonValue = $get(new JSONObject(castToJso($getArgument(this, 1))), 'value');
!isUndefinedOrNull(jsonValue) && !!jsonValue.isString() && $equals_2('', jsonValue.isString().value_0)?this.val$setter1.setValue(''):this.val$setter1.setValue($getArgument(this, 0));
}
;
var Lcom_vaadin_elements_common_js_JS$1_2_classLit = createForClass('com.vaadin.elements.common.js', 'JS/1', 360);
function JS$2(val$getter){
this.val$getter1 = val$getter;
Function_0.call(this);
}
defineClass(361, 7, $intern_18, JS$2);
_.f_0 = function(args){
var array;
array = createJsType(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit);
runJavascriptFunction(array, 'push', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [this.val$getter1.getValue_0()]));
return array;
}
;
var Lcom_vaadin_elements_common_js_JS$2_2_classLit = createForClass('com.vaadin.elements.common.js', 'JS/2', 361);
function $add_5(this$static, value_0, index_0){
jsni(this$static, 'splice', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [valueOf_2(index_0), valueOf_2(0), value_0]));
}
function $remove_5(this$static, value_0){
var val;
runJavascriptFunction(this$static, 'splice', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [valueOf_2((val = checkNotNull(castToDouble(runJavascriptFunction(this$static, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [value_0])))) , round_int(val))), valueOf_2(1)]));
}
function $clinit_JSEnums(){
$clinit_JSEnums = emptyMethod;
Direction = new JSEnums('Direction', 0, 'sort direction', ($clinit_SortDirection() , stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_shared_data_sort_SortDirection_2_classLit, 1), $intern_0, 79, 0, [ASCENDING, DESCENDING])), 'asc', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['asc', 'desc']));
Selection_0 = new JSEnums('Selection', 1, 'selection mode', ($clinit_IndexBasedSelectionMode() , stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_elements_grid_selection_IndexBasedSelectionMode_2_classLit, 1), $intern_0, 60, 0, [SINGLE_0, MULTI_0, ALL, DISABLED])), 'single', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, []));
}
function $val_0(this$static, e){
var s, s$iterator;
for (s$iterator = this$static.vals.iterator(); s$iterator.hasNext_0();) {
s = castToString(s$iterator.next_1());
if ($startsWith(toLowerCase(e.name_1 != null?e.name_1:'' + e.ordinal), ($clinit_String() , s.toLowerCase()))) {
return s;
}
}
return this$static.def;
}
function $val_1(this$static, s){
var e, e$array, e$index, e$max;
s = s == null || ($clinit_String() , s.length) == 0?this$static.def:($clinit_String() , s.toLowerCase());
if (!this$static.vals.contains_0(s)) {
throw new RuntimeException_0('Invalid ' + this$static.name_0 + ', valid options are: ' + this$static.vals);
}
if (this$static.enums != null) {
for (e$array = this$static.enums , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
if ($equals_2($val_0(this$static, e), s)) {
return e;
}
}
}
return null;
}
function JSEnums(enum$name, enum$ordinal, message, enumVals, defaultStr, strVals){
var e, e$index, e$max, l;
Enum.call(this, enum$name, enum$ordinal);
this.name_0 = message;
this.enums = enumVals;
this.def = defaultStr;
if (strVals.length == 0) {
l = new ArrayList;
for (e$index = 0 , e$max = enumVals.length; e$index < e$max; ++e$index) {
e = enumVals[e$index];
$add_7(l, toLowerCase(e.name_1 != null?e.name_1:'' + e.ordinal));
}
this.vals = l;
}
else {
this.vals = new Arrays$ArrayList(strVals);
}
}
function values_13(){
$clinit_JSEnums();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_elements_common_js_JSEnums_2_classLit, 1), $intern_0, 139, 0, [Direction, Selection_0]);
}
defineClass(139, 5, {139:1, 3:1, 6:1, 5:1}, JSEnums);
var Direction, Selection_0;
var Lcom_vaadin_elements_common_js_JSEnums_2_classLit = createForEnum('com.vaadin.elements.common.js', 'JSEnums', 139, values_13);
function $defineCatch(this$static){
this$static['catch'] = this$static.fail;
}
function JSPromise(){
this.dfd = ($clinit_GQuery() , new Deferred);
this.p = $promise(this.dfd);
$defineCatch(this);
}
function JSPromise_0(then){
this.p = then;
$defineCatch(this);
}
defineClass(214, 1, {}, JSPromise, JSPromise_0);
_.always = function(f){
$always(this.p, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_query_client_Function_2_classLit, 1), $intern_0, 7, 0, [new JsUtils$JsFunction(f)]));
return this;
}
;
_.done = function(f){
$done(this.p, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_query_client_Function_2_classLit, 1), $intern_0, 7, 0, [new JsUtils$JsFunction(f)]));
return this;
}
;
_.fail = function(f){
$fail(this.p, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_query_client_Function_2_classLit, 1), $intern_0, 7, 0, [new JsUtils$JsFunction(f)]));
return this;
}
;
_.state = function(){
return this.p.dfd.state_0;
}
;
_.then = function(f){
return new JSPromise_0($then(this.p, stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_gwt_query_client_Function_2_classLit, 1), $intern_0, 7, 0, [new JSPromise$1(f)])));
}
;
var Lcom_vaadin_elements_common_js_JSPromise_2_classLit = createForClass('com.vaadin.elements.common.js', 'JSPromise', 214);
function JSPromise$1(val$f){
this.val$f2 = val$f;
Function_0.call(this);
}
defineClass(436, 7, $intern_18, JSPromise$1);
_.f_0 = function(args){
return exec_0(this.val$f2, $getArgument(this, 0));
}
;
var Lcom_vaadin_elements_common_js_JSPromise$1_2_classLit = createForClass('com.vaadin.elements.common.js', 'JSPromise/1', 436);
function $clinit_JSValidate(){
$clinit_JSValidate = emptyMethod;
String_0 = new JSValidate('String', 0, 'string value', '(.+)', Ljava_lang_String_2_classLit, '', '');
Pixel = new JSValidate('Pixel', 1, 'pixel value', '([\\d\\.]+)(px)?$', Ljava_lang_Double_2_classLit, null, null);
Integer = new JSValidate('Integer', 2, 'int value', '([+-]?\\d+)', Ljava_lang_Integer_2_classLit, valueOf_2(0), valueOf_2(0));
Double = new JSValidate('Double', 3, 'double value', '([+-]?[\\d\\.]+)', Ljava_lang_Double_2_classLit, 0, 0);
Boolean_0 = new JSValidate('Boolean', 4, 'boolean value', '(|true|false)', Ljava_lang_Boolean_2_classLit, ($clinit_Boolean() , $clinit_Boolean() , TRUE_0), (null , FALSE_0));
}
function $attr_0(this$static, el, s, defaultIfEmpty, defaultIfNull){
return $val_4(this$static, !!el && $hasAttribute(($clinit_DOMImpl() , el), s)?$getAttribute(($clinit_DOMImpl() , el), s):null, defaultIfEmpty, defaultIfNull);
}
function $attr_1(this$static, g, s){
return $attr_0(this$static, $get_0(g, 0), s, this$static.defaultIfEmpty, this$static.defaultIfNull);
}
function $attr_2(this$static, g, s, defaultIfEmpty, defaultIfNull){
return $attr_0(this$static, $get_0(g, 0), s, defaultIfEmpty, defaultIfNull);
}
function $val_2(this$static, o, defaultIfEmpty, defaultIfNull){
var string;
string = isUndefinedOrNull(o)?null:($clinit_String() , o == null?'null':toString__Ljava_lang_String___devirtual$(o));
return $val_4(this$static, string, defaultIfEmpty, defaultIfNull);
}
function $val_3(this$static, s){
return $val_4(this$static, s, this$static.defaultIfEmpty, this$static.defaultIfNull);
}
function $val_4(this$static, s, defaultIfEmpty, defaultIfNull){
var r, v;
if (s == null || isUndefinedOrNull(s)) {
return defaultIfNull;
}
if (length_1($trim(s)) == 0) {
return defaultIfEmpty;
}
r = $exec_0(this$static.regex, s);
if (!r || (v = r[1]) == null) {
throw new RuntimeException_0('Invalid ' + this$static.message_0 + '(' + s + '), valid format is ' + toStringSimple(this$static.regex));
}
try {
if (this$static.type_0 == Ljava_lang_String_2_classLit) {
return v;
}
if (this$static.type_0 == Ljava_lang_Integer_2_classLit) {
return valueOf_2(__parseAndValidateInt(v));
}
if (this$static.type_0 == Ljava_lang_Double_2_classLit) {
return __parseAndValidateDouble(v);
}
if (this$static.type_0 == Ljava_lang_Boolean_2_classLit) {
return $clinit_Boolean() , equalsIgnoreCase('true', v)?TRUE_0:FALSE_0;
}
return v;
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 16)) {
throw new RuntimeException_0('Invalid ' + this$static.message_0 + ', valid format is ' + toStringSimple(this$static.regex));
}
else
throw unwrap($e0);
}
}
function JSValidate(enum$name, enum$ordinal, message, regex, type_0, defaultIfEmpty, defaultIfNull){
Enum.call(this, enum$name, enum$ordinal);
this.message_0 = message;
this.regex = new RegExp('^' + regex + '$', 'i');
this.type_0 = type_0;
this.defaultIfEmpty = defaultIfEmpty;
this.defaultIfNull = defaultIfNull;
}
function values_14(){
$clinit_JSValidate();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_elements_common_js_JSValidate_2_classLit, 1), $intern_0, 91, 0, [String_0, Pixel, Integer, Double, Boolean_0]);
}
defineClass(91, 5, {91:1, 3:1, 6:1, 5:1}, JSValidate);
var Boolean_0, Double, Integer, Pixel, String_0;
var Lcom_vaadin_elements_common_js_JSValidate_2_classLit = createForEnum('com.vaadin.elements.common.js', 'JSValidate', 91, values_14);
function $createJSEditorRequest(this$static, request, clearEditorsOnSuccess){
var dataItem, result;
result = castToAllowJso(createJsType(Lcom_vaadin_elements_grid_config_JSEditorRequest_2_classLit), 758);
result.rowIndex = request.rowIndex_0;
dataItem = extractDataItem($getRow(request.grid_0.dataSource, request.rowIndex_0));
result.dataItem = dataItem;
result.grid = this$static.container;
result.success = wrapFunction(new GridEditor$1(this$static, request, clearEditorsOnSuccess));
result.failure = wrapFunction(new GridEditor$2(this$static, request));
result.getCellEditor = wrapFunction(new GridEditor$3(this$static));
return result;
}
function $getEditor(this$static, jscol){
var e, w;
w = castTo($get_5(this$static.editors, jscol), 14);
if (!w) {
if (this$static.handler.getCellEditor) {
e = castToJso(exec_0(this$static.handler.getCellEditor, jscol));
}
else {
e = $createTextInputElement($doc);
$addClassName(e, 'vaadin-grid style-scope');
}
if (e) {
w = new GridEditor$5(e);
$put_2(this$static.editors, jscol, w);
}
}
return w;
}
function $setContainer(this$static, containerElement){
this$static.container = containerElement;
}
function GridEditor(gridElement){
GridEditor_0.call(this, gridElement, castToAllowJso({}, 757));
}
function GridEditor_0(gridElement, handler){
this.editors = new HashMap;
this.gridElement = gridElement;
this.grid_0 = gridElement.grid_0;
this.handler = handler;
$setEditorHandler(this.grid_0, new GridEditor$4(this));
}
defineClass(199, 1, {}, GridEditor);
_.cancel = function(){
this.grid_0.editor.state_0 != ($clinit_Grid$Editor$State() , INACTIVE) && $cancel_1(this.grid_0.editor);
}
;
_.editRow = function(row){
this.grid_0.editor.state_0 != ($clinit_Grid$Editor$State() , INACTIVE) && this.grid_0.editor.state_0 != INACTIVE && $cancel_1(this.grid_0.editor);
$editRow_0(this.grid_0, row);
}
;
_.getCancelButtonText = function(){
return $getText(this.grid_0.editor.cancelButton);
}
;
_.getHandler = function(){
return this.handler;
}
;
_.getSaveButtonText = function(){
return $getText(this.grid_0.editor.saveButton);
}
;
_.isEnabled = function(){
return this.grid_0.editor.enabled;
}
;
_.save = function(){
$save(this.grid_0.editor);
}
;
_.setCancelButtonText = function(cancelButtonText){
$setEditorCancelCaption(this.grid_0, cancelButtonText);
}
;
_.setContainer = function(containerElement){
$setContainer(this, containerElement);
}
;
_.setEnabled = function(enabled){
$setEditorEnabled(this.grid_0, enabled);
}
;
_.setHandler = function(handler){
this.handler = handler;
}
;
_.setSaveButtonText = function(saveButtonText){
$setEditorSaveCaption(this.grid_0, saveButtonText);
}
;
var Lcom_vaadin_elements_grid_GridEditor_2_classLit = createForClass('com.vaadin.elements.grid', 'GridEditor', 199);
function GridEditor$1(this$0, val$request, val$clearEditorsOnSuccess){
this.this$01 = this$0;
this.val$request2 = val$request;
this.val$clearEditorsOnSuccess3 = val$clearEditorsOnSuccess;
Function_0.call(this);
}
defineClass(276, 7, $intern_18, GridEditor$1);
_.f = function(){
$success(this.val$request2);
this.val$clearEditorsOnSuccess3 && $reset_0(this.this$01.editors);
}
;
_.val$clearEditorsOnSuccess3 = false;
var Lcom_vaadin_elements_grid_GridEditor$1_2_classLit = createForClass('com.vaadin.elements.grid', 'GridEditor/1', 276);
function GridEditor$2(this$0, val$request){
this.this$01 = this$0;
this.val$request2 = val$request;
Function_0.call(this);
}
defineClass(277, 7, $intern_18, GridEditor$2);
_.f = function(){
var column, column$iterator, errorColumns, jsErrorColumns, val;
jsErrorColumns = castToJso($getArgument(this, 1));
errorColumns = new ArrayList;
for (column$iterator = $getDataColumns(this.this$01.gridElement).iterator(); column$iterator.hasNext_0();) {
column = castTo(column$iterator.next_1(), 51);
!!jsErrorColumns && (val = checkNotNull(castToDouble(runJavascriptFunction(jsErrorColumns, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [column.jsColumn])))) , round_int(val) != -1) && (setCheck(errorColumns.array, errorColumns.array.length, column) , true);
}
$failure(this.val$request2, castToString($getArgument(this, 0)), errorColumns);
}
;
var Lcom_vaadin_elements_grid_GridEditor$2_2_classLit = createForClass('com.vaadin.elements.grid', 'GridEditor/2', 277);
function GridEditor$3(this$0){
this.this$01 = this$0;
Function_0.call(this);
}
defineClass(278, 7, $intern_18, GridEditor$3);
_.f_0 = function(args){
return $getElement($getEditor(this.this$01, castToAllowJso($getArgument(this, 0), 193)));
}
;
var Lcom_vaadin_elements_grid_GridEditor$3_2_classLit = createForClass('com.vaadin.elements.grid', 'GridEditor/3', 278);
function $bind(this$static, request){
var c, c$iterator, value_0;
if (this$static.this$01.handler.bind) {
exec_0(this$static.this$01.handler.bind, $createJSEditorRequest(this$static.this$01, request, false));
}
else {
for (c$iterator = new Collections$UnmodifiableCollectionIterator(unmodifiableList(new ArrayList_1(this$static.this$01.grid_0.columns)).coll.iterator()); c$iterator.it.hasNext_0();) {
c = castTo(c$iterator.it.next_1(), 21);
if (c.editable) {
value_0 = valueOf_5(c.getValue($getRow(request.grid_0.dataSource, request.rowIndex_0)));
$val($($getEditor(this$static.this$01, castTo(c, 51).jsColumn)), value_0);
}
}
$complete(request, null, null);
!!request.callback && request.callback.onSuccess(request);
}
$clearTextSelection();
}
function $cancel_2(this$static, request){
this$static.this$01.handler.cancel?exec_0(this$static.this$01.handler.cancel, $createJSEditorRequest(this$static.this$01, request, true)):($complete(request, null, null) , !!request.callback && request.callback.onSuccess(request));
$reset_0(this$static.this$01.editors);
}
function $clearTextSelection(){
if ($doc.selection && $doc.selection.empty) {
document.selection.empty();
}
else if ($wnd.getSelection) {
var sel = $wnd.getSelection();
sel.removeAllRanges();
}
}
function $getWidget_2(this$static, column){
return $getEditor(this$static.this$01, castTo(column, 51).jsColumn);
}
function $save_0(this$static, request){
if (this$static.this$01.handler.save) {
exec_0(this$static.this$01.handler.save, $createJSEditorRequest(this$static.this$01, request, true));
$clearCache(this$static.this$01.gridElement.grid_0.dataSource, null);
}
else {
$complete(request, "'grid.editor.handler.save' is undefined. Please refer to the documentation for more information.", null);
!!request.callback && request.callback.onError(request);
}
}
function GridEditor$4(this$0){
this.this$01 = this$0;
}
defineClass(279, 1, {}, GridEditor$4);
var Lcom_vaadin_elements_grid_GridEditor$4_2_classLit = createForClass('com.vaadin.elements.grid', 'GridEditor/4', 279);
function GridEditor$5($anonymous0){
$clinit_UIObject();
SimplePanel.call(this, $anonymous0);
}
defineClass(280, 161, $intern_38, GridEditor$5);
_.onAttach = function(){
$onAttach(this);
$addClassName($getParentElement(($clinit_DOM() , this.element)), 'vaadin-grid style-scope');
}
;
var Lcom_vaadin_elements_grid_GridEditor$5_2_classLit = createForClass('com.vaadin.elements.grid', 'GridEditor/5', 280);
function $columnsPending(this$static){
var col, col$iterator, result, val;
result = $getDataColumns(this$static).size_2() != this$static.cols_0.length;
if (!result) {
for (col$iterator = $getDataColumns(this$static).iterator(); col$iterator.hasNext_0();) {
col = castTo(col$iterator.next_1(), 51);
val = checkNotNull(castToDouble(runJavascriptFunction(this$static.cols_0, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [col.jsColumn]))));
round_int(val) == -1 && (result = true);
}
}
return result;
}
function $getColumnIndexByIndexOrName(this$static, indexOrName){
var i_0, index_0, stringId;
stringId = ($clinit_String() , indexOrName == null?'null':toString__Ljava_lang_String___devirtual$(indexOrName));
if (matches(stringId, '[+-]?\\d+')) {
index_0 = castTo($val_3(($clinit_JSValidate() , Integer), stringId), 22).value_0;
if (index_0 >= 0 && index_0 <= this$static.cols_0.length) {
return index_0;
}
}
else {
for (i_0 = 0; i_0 < this$static.cols_0.length; i_0++) {
if ($equals_2(stringId, castToAllowJso(prop_0(this$static.cols_0, valueOf_2(i_0)), 193).name)) {
return i_0;
}
}
}
throw new IllegalArgumentException('Column not found.');
}
function $getDataColumns(this$static){
var result;
result = unmodifiableList(new ArrayList_1(this$static.grid_0.columns));
instanceOf(castToAllowJso(this$static.grid_0.selectionModel, 38), 85) && (result = result.subList(1, result.size_2()));
return result;
}
function $getSelectAllCheckBox(this$static){
var result;
result = null;
instanceOf(castToAllowJso(this$static.grid_0.selectionModel, 38), 85) && (result = castTo($getWidget_1(castTo($getCell_0(this$static.grid_0.header.defaultRow, $getColumn(this$static.grid_0, 0)), 63)), 77));
return result;
}
function $isWorkPending_2(this$static){
return !!this$static.grid_0.dataSource && !!this$static.grid_0.dataSource.currentRequestCallback || $isWorkPending_1(this$static.grid_0) || !!this$static.sizeUpdater.timerId || $columnsPending(this$static);
}
function $lambda$2(this$static, generator_1, row_1){
return castToString(exec_0(generator_1, create_4(row_1, this$static.container)));
}
function $lambda$3(this$static, generator_1, cell_1){
return castToString(exec_0(generator_1, create_3(cell_1, this$static.container)));
}
function $lambda$5(generator_1, rowIndex_1){
var details;
details = exec_0(generator_1, valueOf_2(rowIndex_1));
return isUndefinedOrNull(details)?null:new GridElement$5(castToJso(details));
}
function $mapToJSSortOrders(this$static, sortOrders){
var dataColumns, jsSortOrders, order, order$iterator, sortOrder;
jsSortOrders = [];
jsSortOrders.length = 0;
dataColumns = $getDataColumns(this$static);
for (order$iterator = new Collections$UnmodifiableCollectionIterator(sortOrders.coll.iterator()); order$iterator.it.hasNext_0();) {
order = castTo(order$iterator.it.next_1(), 71);
sortOrder = castToAllowJso(createJsType(Lcom_vaadin_elements_grid_config_JSSortOrder_2_classLit), 679);
sortOrder.column = dataColumns.indexOf_0(order.column_0);
sortOrder.direction = $val_0(($clinit_JSEnums() , Direction), order.direction_0);
runJavascriptFunction(jsSortOrders, 'push', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [sortOrder]));
}
return jsSortOrders;
}
function $mapToSortOrders(this$static, jsOrders){
var column, dataColumns, direction, jsOrder, jsOrder$iterator, order;
order = new ArrayList;
dataColumns = $getDataColumns(this$static);
for (jsOrder$iterator = asList(jsOrders).iterator(); jsOrder$iterator.hasNext_0();) {
jsOrder = castToAllowJso(jsOrder$iterator.next_1(), 679);
column = castTo(dataColumns.get_1(jsOrder.column), 21);
direction = castTo($val_1(($clinit_JSEnums() , Direction), jsOrder.direction), 79);
jsOrder.direction = $val_0(Direction, direction);
$add_7(order, new SortOrder_0(column, direction));
}
return order;
}
function $nativePromise(this$static, f){
var _this = this$static;
return (new Promise(function(resolve, reject){
_this.onReady(resolve);
}
)).then(f);
}
function $onReady(this$static, f){
scheduleFixedPeriodImpl(($clinit_SchedulerImpl() , new GridElement$3(this$static, f)), 30);
}
function $onSelectAll(this$static, event0){
var all, event_0, event1;
if (!this$static.updating) {
this$static.updating = true;
if (event0.selectionModel != castToAllowJso(this$static.grid_0.selectionModel, 38)) {
$setSelectionModel(this$static.grid_0, event0.selectionModel);
event1 = $createHtmlEvent($doc, 'selection-mode-changed');
$dispatchEvent(this$static.container, event1);
castToAllowJso(this$static.grid_0.selectionModel, 38).reset_1();
}
else {
all = unsafeCast(checkNotNull($getValue($getSelectAllCheckBox(this$static))));
$setSelectionMode_0(this$static, all?$name(($clinit_IndexBasedSelectionMode() , ALL)):$name(($clinit_IndexBasedSelectionMode() , MULTI_0)), true);
}
$updateSelectAllCheckBox(this$static);
this$static.updating = false;
$updateSelectAllCheckBox(this$static);
this$static.updating || (event_0 = $createHtmlEvent($doc, 'selected-items-changed') , $dispatchEvent(this$static.container, event_0));
}
}
function $setColumns(this$static, columns){
var array, c, c$iterator, column, column$iterator, column$iterator0, currentColumns, val, result;
currentColumns = new ArrayList;
for (c$iterator = $getDataColumns(this$static).iterator(); c$iterator.hasNext_0();) {
c = castTo(c$iterator.next_1(), 51);
$add_7(currentColumns, c.jsColumn);
}
for (column$iterator0 = asList(columns).iterator(); column$iterator0.hasNext_0();) {
column = castToAllowJso(column$iterator0.next_1(), 193);
$indexOf_2(currentColumns, column, 0) != -1 || (result = new GridColumn(column, this$static) , $addColumn(this$static.grid_0, result, $getVisibleColumns(this$static.grid_0).coll.size_2()) , definePropertyAccessors_0(result.jsColumn, 'headerContent', new GridColumn$lambda$1$Type(result), new GridColumn$lambda$2$Type(result)) , definePropertyAccessors_0(result.jsColumn, 'hidden', new GridColumn$lambda$3$Type(result), new com_vaadin_elements_grid_table_GridColumn$$__$$com_vaadin_elements_common_js_JS$Getter$$__$$instance$$com_vaadin_client_widgets_Grid$Column$$isHidden__Z$Type(result)) , $bind_0(result, 'name', new GridColumn$lambda$4$Type(result)) , $bind_0(result, 'hidingToggleText', new GridColumn$lambda$5$Type(result)) , $bind_0(result, 'flex', new GridColumn$lambda$6$Type(result)) , $bind_0(result, 'sortable', new GridColumn$lambda$7$Type(result)) , $bind_0(result, 'hidable', new GridColumn$lambda$8$Type(result)) , $bind_0(result, 'readOnly', new GridColumn$lambda$9$Type(result)) , $bind_0(result, 'renderer', new GridColumn$lambda$10$Type(result)) , $bind_0(result, 'minWidth', new GridColumn$lambda$11$Type(result)) , $bind_0(result, 'maxWidth', new GridColumn$lambda$12$Type(result)) , $bind_0(result, 'width', new GridColumn$lambda$13$Type(result)) , undefined , result);
}
for (column$iterator = $getDataColumns(this$static).iterator(); column$iterator.hasNext_0();) {
column = castTo(column$iterator.next_1(), 51);
val = checkNotNull(castToDouble(runJavascriptFunction(columns, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [column.jsColumn]))));
round_int(val) == -1 && $removeColumn_1(this$static.grid_0, column);
}
array = castTo($getDataColumns(this$static).toArray_0(initUnidimensionalArray(Lcom_vaadin_elements_grid_table_GridColumn_2_classLit, {246:1, 729:1, 3:1, 4:1}, 51, 0, 0, 1)), 729);
sort_0(array, new GridElement$lambda$1$Type(columns));
array.length > 0 && $setColumnOrder(this$static.grid_0, array);
if (this$static.cols_0 != columns) {
$clinit_Observe();
unregisterHandler(this$static.cols_0, null);
observe_2(this$static.cols_0 = columns, new GridElement$2(this$static));
}
!!this$static.grid_0.dataSource && this$static.grid_0.dataSource.refresh();
}
function $setLoadingDataClass(this$static, loadingData){
loadingData?$addClassName($getElement(this$static.grid_0), 'vaadin-grid-loading-data'):$removeClassName($getElement(this$static.grid_0), 'vaadin-grid-loading-data');
}
function $setSelectionMode_0(this$static, selectionMode, force){
var currentModelIsMulti, event_0, mode, newModeIsAll, newModeIsMulti;
if (force || !equalsIgnoreCase(toLowerCase($name(castToAllowJso(this$static.grid_0.selectionModel, 38).getMode())), selectionMode)) {
this$static.updating = true;
mode = castTo($val_1(($clinit_JSEnums() , Selection_0), selectionMode), 60);
newModeIsAll = mode == ($clinit_IndexBasedSelectionMode() , ALL);
newModeIsMulti = mode == MULTI_0;
currentModelIsMulti = instanceOf(castToAllowJso(this$static.grid_0.selectionModel, 38), 123);
if (!(currentModelIsMulti && (newModeIsAll || newModeIsMulti))) {
$setSelectionModel(this$static.grid_0, mode.createModel());
$setWidth(this$static.grid_0.escalator);
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), new GridElement$lambda$4$Type(this$static));
}
newModeIsAll?castToAllowJso(this$static.grid_0.selectionModel, 38).selectAll():castToAllowJso(this$static.grid_0.selectionModel, 38).reset_1();
event_0 = $createHtmlEvent($doc, 'selection-mode-changed');
$dispatchEvent(this$static.container, event_0);
$updateSelectAllCheckBox(this$static);
this$static.updating = false;
}
}
function $sort_1(this$static, event_0){
var dataSource;
event_0.userOriginated && prop_1(this$static.container, $mapToJSSortOrders(this$static, event_0.order_0));
castToAllowJso(this$static.grid_0.selectionModel, 38).reset_1();
dataSource = this$static.grid_0.dataSource;
!!dataSource && $clearCache(dataSource, null);
}
function $then_0(this$static, f){
var p;
if (($clinit_GQuery() , browser).msie || browser.mozilla && indexOf(toLowerCase($wnd.navigator.userAgent), 'trident') != -1) {
p = new JSPromise;
$onReady(this$static, new GridElement$4(f, p));
return p;
}
else {
return $nativePromise(this$static, f);
}
}
function $updateHeight(this$static){
var ds;
if (!this$static.updating) {
$setHeight_2(this$static.grid_0, '100%');
if ((this$static.container.clientHeight | 0) == 0) {
if (this$static.visibleRows > 0) {
$setHeightByRows(this$static.grid_0, this$static.visibleRows);
}
else {
ds = this$static.grid_0.dataSource;
ds?$setHeightByRows(this$static.grid_0, min_1(ds.size_0, 10)):$setHeightByRows(this$static.grid_0, 0);
}
}
(this$static.measureObject.clientHeight | 0) > 0?(this$static.measureObject.style['height'] = '' , undefined):(this$static.measureObject.style['height'] = ($clinit_Style$Unit() , '1.0px') , undefined);
}
}
function $updateSelectAllCheckBox(this$static){
var model, selectAllCheckBox;
selectAllCheckBox = $getSelectAllCheckBox(this$static);
if (selectAllCheckBox) {
$addClass($children($(selectAllCheckBox)), stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['vaadin-grid', 'style-scope']));
model = castTo(castToAllowJso(this$static.grid_0.selectionModel, 38), 123);
$prop($find($(selectAllCheckBox), stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['input'])), ($clinit_Boolean() , (model.invertedSelection?model.grid_0.dataSource.size_0 - model.indexes.length:model.indexes.length) > 0 && (model.invertedSelection?model.grid_0.dataSource.size_0 - model.indexes.length:model.indexes.length) != model.grid_0.dataSource.size_0?TRUE_0:FALSE_0));
$setValue(selectAllCheckBox, (model.invertedSelection?model.grid_0.dataSource.size_0 - model.indexes.length:model.indexes.length) > 0 && (model.invertedSelection?model.grid_0.dataSource.size_0 - model.indexes.length:model.indexes.length) == model.grid_0.dataSource.size_0?TRUE_0:FALSE_0, false);
}
}
function $updateWidth(this$static){
$setWidth(this$static.grid_0.escalator);
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), new GridElement$lambda$4$Type(this$static));
}
function GridElement(){
this.sizeUpdater = new GridElement$1(this);
this.grid_0 = new ViolatedGrid;
$setSelectionModel(this.grid_0, new IndexBasedSelectionModelSingle);
$addHandler_0(this.grid_0, this, ($clinit_SelectionEvent() , $clinit_SelectionEvent() , eventType_0));
$addHandler_0(this.grid_0, this, ($clinit_SortEvent() , $clinit_SortEvent() , TYPE_17));
$addHandler_0(this.grid_0, this, ($clinit_SelectAllEvent() , $clinit_SelectAllEvent() , TYPE_16));
$getElement(this.grid_0).style['height'] = ($clinit_Style$Unit() , '0.0px');
$setColumns(this, createJsType(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit));
this.editor = new GridEditor(this);
this.staticSection = new GridStaticSection(this);
$setStylePrimaryName_9(this.grid_0, 'vaadin-grid style-scope vaadin-grid');
}
function lambda$1(columns_0, o1_1, o2_2){
var val, val0;
return val0 = checkNotNull(castToDouble(runJavascriptFunction(columns_0, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [o1_1.jsColumn])))) , round_int(val0) > (val = checkNotNull(castToDouble(runJavascriptFunction(columns_0, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [o2_2.jsColumn])))) , round_int(val))?1:-1;
}
defineClass(695, 1, {15:1, 731:1, 680:1, 730:1}, GridElement);
_.addColumn = function(jsColumn, beforeColumnId){
var index_0;
index_0 = this.cols_0.length;
beforeColumnId != null && (index_0 = $getColumnIndexByIndexOrName(this, beforeColumnId));
$add_5(this.cols_0, jsColumn, index_0);
$setColumns(this, this.cols_0);
return jsColumn;
}
;
_.getCellClassGenerator = function(){
return this.cellClassGenerator;
}
;
_.getColumns = function(){
return this.cols_0;
}
;
_.getDataSource = function(){
return this.grid_0.dataSource;
}
;
_.getEditor = function(){
return this.editor;
}
;
_.getFrozenColumns = function(){
return this.grid_0.frozenColumnCount;
}
;
_.getGrid = function(){
return this.grid_0;
}
;
_.getGridElement = function(){
return $getElement(this.grid_0);
}
;
_.getItem = function(rowIndex, callback, onlyCached){
$getItem(this.grid_0.dataSource, rowIndex, callback, onlyCached);
}
;
_.getRowClassGenerator = function(){
return this.rowClassGenerator;
}
;
_.getRowDetailsGenerator = function(){
return this.rowDetailsGenerator;
}
;
_.getScrollTop = function(){
return this.grid_0.escalator.verticalScrollbar.scrollPos;
}
;
_.getSelectionMode = function(){
return toLowerCase($name(castToAllowJso(this.grid_0.selectionModel, 38).getMode()));
}
;
_.getSelectionModel = function(){
return castToAllowJso(this.grid_0.selectionModel, 38);
}
;
_.getStaticSection = function(){
return this.staticSection;
}
;
_.getVisibleRows = function(){
return this.visibleRows;
}
;
_.init = function(container, lightDomElement, gridContainer, measureObject){
var dataSource, ds;
if (!this.container) {
this.container = container;
this.measureObject = measureObject;
if (lightDomElement) {
new GridLightDomTable(lightDomElement, this);
ds = (dataSource = new GridDomTableDataSource(lightDomElement, this) , dataSource);
$setDataSource(this.grid_0, ds);
}
$appendChild(gridContainer, $getElement(this.grid_0));
attachWidget(this.grid_0, null);
$setContainer(this.editor, container);
}
this.updating = false;
$scheduleFinally(($clinit_SchedulerImpl() , INSTANCE), new GridElement$lambda$0$Type(this));
}
;
_.isDisabled = function(){
return !this.grid_0.enabled;
}
;
_.isWorkPending = function(){
return $isWorkPending_2(this);
}
;
_.onReady = function(f){
$onReady(this, new JsUtils$JsFunction(f));
}
;
_.onSelect = function(ev){
var event_0;
$updateSelectAllCheckBox(this);
this.updating || (event_0 = $createHtmlEvent($doc, 'selected-items-changed') , $dispatchEvent(this.container, event_0));
}
;
_.removeColumn = function(columnId){
$remove_5(this.cols_0, castToAllowJso(prop_0(this.cols_0, valueOf_2($getColumnIndexByIndexOrName(this, columnId))), 193));
}
;
_.scrollToEnd = function(){
$scrollToEnd(this.grid_0);
}
;
_.scrollToRow = function(index_0, scrollDestination){
scrollDestination != null?$scrollToRow(this.grid_0, index_0, valueOf_0(($clinit_String() , scrollDestination.toLocaleUpperCase()))):$scrollToRow_0(this.grid_0, index_0, ($clinit_ScrollDestination() , ANY), 0);
}
;
_.scrollToStart = function(){
$scrollToRow(this.grid_0, 0, ($clinit_ScrollDestination() , START));
}
;
_.setCellClassGenerator = function(generator){
$setCellStyleGenerator(this.grid_0, isUndefinedOrNull(generator)?null:new GridElement$lambda$3$Type(this, generator));
this.cellClassGenerator = generator;
}
;
_.setColumns = function(columns){
$setColumns(this, columns);
}
;
_.setDataSource = function(data_0){
if (isFunction(data_0)) {
instanceOf(this.grid_0.dataSource, 135)?$setJSFunction(castTo(this.grid_0.dataSource, 135), data_0):$setDataSource(this.grid_0, new GridJsFuncDataSource(data_0, this));
$updateHeight(this);
}
else {
throw new RuntimeException_0('Unknown data source type: ' + data_0 + '. Functions are supported only.');
}
}
;
_.setDisabled = function(disabled){
$setEnabled_1(this.grid_0, !disabled);
}
;
_.setFrozenColumns = function(frozenColumn){
$setFrozenColumnCount_0(this.grid_0, castTo($val_2(($clinit_JSValidate() , Integer), valueOf_2(frozenColumn), valueOf_2(0), valueOf_2(0)), 22).value_0);
}
;
_.setHeight = function(height){
$setHeight_2(this.grid_0, height);
}
;
_.setRowClassGenerator = function(generator){
$setRowStyleGenerator(this.grid_0, isUndefinedOrNull(generator)?null:new GridElement$lambda$2$Type(this, generator));
this.rowClassGenerator = generator;
}
;
_.setRowDetailsGenerator = function(generator){
$setDetailsGenerator(this.grid_0, isUndefinedOrNull(generator)?($clinit_DetailsGenerator() , NULL_1):new GridElement$lambda$5$Type(generator));
this.rowDetailsGenerator = generator;
}
;
_.setRowDetailsVisible = function(rowIndex, visible){
$then_0(this, wrapFunction(new GridElement$6(this, rowIndex, visible)));
}
;
_.setSelectionMode = function(selectionMode){
$setSelectionMode_0(this, selectionMode, false);
}
;
_.setSortOrder = function(jsOrders){
var newOrder;
newOrder = $mapToSortOrders(this, jsOrders);
$setSortOrder(this.grid_0, newOrder);
}
;
_.setVisibleRows = function(visibleRows){
this.visibleRows = castTo($val_2(($clinit_JSValidate() , Integer), valueOf_2(visibleRows), valueOf_2(-1), valueOf_2(-1)), 22).value_0;
$updateHeight(this);
}
;
_.sort = function(event_0){
$sort_1(this, event_0);
}
;
_.then = function(f){
return $then_0(this, f);
}
;
_.updateSize = function(){
$schedule(this.sizeUpdater, 50);
}
;
_.resetSizesFromDomCalled = false;
_.updating = true;
_.visibleRows = -1;
var Lcom_vaadin_elements_grid_GridElement_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement', 695);
function GridElement$1(this$0){
this.this$01 = this$0;
Timer.call(this);
}
defineClass(254, 75, {}, GridElement$1);
_.run_0 = function(){
if (!this.this$01.resetSizesFromDomCalled && (this.this$01.measureObject.clientHeight | 0) > 0) {
$resetSizesFromDom(this.this$01.grid_0.escalator);
$then_0(this.this$01, wrapFunction(new GridElement$1$1(this)));
this.this$01.resetSizesFromDomCalled = true;
}
$updateWidth(this.this$01);
$updateHeight(this.this$01);
}
;
var Lcom_vaadin_elements_grid_GridElement$1_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/1', 254);
function GridElement$1$1(this$1){
this.this$11 = this$1;
Function_0.call(this);
}
defineClass(255, 7, $intern_18, GridElement$1$1);
_.f = function(){
$resetSizesFromDom(this.this$11.this$01.grid_0.escalator);
}
;
var Lcom_vaadin_elements_grid_GridElement$1$1_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/1/1', 255);
function $onChange(this$static){
$setColumns(this$static.this$01, this$static.this$01.cols_0);
}
function GridElement$2(this$0){
this.this$01 = this$0;
}
defineClass(160, 1, {734:1, 160:1}, GridElement$2);
var Lcom_vaadin_elements_grid_GridElement$2_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/2', 160);
function GridElement$3(this$0, val$f){
this.this$01 = this$0;
this.val$f2 = val$f;
}
defineClass(260, 1, {}, GridElement$3);
_.execute_0 = function(){
if (!$isWorkPending_2(this.this$01)) {
this.val$f2.f();
return false;
}
return true;
}
;
var Lcom_vaadin_elements_grid_GridElement$3_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/3', 260);
function GridElement$4(val$f, val$p){
this.val$f2 = val$f;
this.val$p3 = val$p;
Function_0.call(this);
}
defineClass(261, 7, $intern_18, GridElement$4);
_.f = function(){
var e, v;
try {
v = exec_0(this.val$f2, null);
$resolve(this.val$p3.dfd, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [v]));
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 78)) {
e = $e0;
$reject(this.val$p3.dfd, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [e.getThrown()]));
}
else
throw unwrap($e0);
}
}
;
var Lcom_vaadin_elements_grid_GridElement$4_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/4', 261);
function GridElement$5($anonymous0){
$clinit_UIObject();
SimplePanel.call(this, $anonymous0);
}
defineClass(262, 161, $intern_38, GridElement$5);
var Lcom_vaadin_elements_grid_GridElement$5_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/5', 262);
function GridElement$6(this$0, val$rowIndex, val$visible){
this.this$01 = this$0;
this.val$rowIndex2 = val$rowIndex;
this.val$visible3 = val$visible;
Function_0.call(this);
}
defineClass(264, 7, $intern_18, GridElement$6);
_.f = function(){
var validatedRowIndex, validatedVisible;
validatedRowIndex = castTo($val_2(($clinit_JSValidate() , Integer), valueOf_2(this.val$rowIndex2), null, null), 22);
validatedVisible = castToBoolean($val_2(Boolean_0, this.val$visible3, ($clinit_Boolean() , $clinit_Boolean() , TRUE_0), (null , TRUE_0)));
($clinit_DetailsGenerator() , NULL_1) != this.this$01.grid_0.detailsGenerator && !!validatedRowIndex && $setDetailsVisible(this.this$01.grid_0, validatedRowIndex.value_0, unsafeCast((checkCriticalNotNull(validatedVisible) , validatedVisible)));
}
;
_.val$rowIndex2 = 0;
var Lcom_vaadin_elements_grid_GridElement$6_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/6', 264);
function GridElement$lambda$0$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(256, 1, {}, GridElement$lambda$0$Type);
_.execute_1 = function(){
$updateHeight(this.$$outer_0);
}
;
var Lcom_vaadin_elements_grid_GridElement$lambda$0$Type_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/lambda$0$Type', 256);
function GridElement$lambda$1$Type(columns_0){
this.columns_0 = columns_0;
}
defineClass(257, 1, {}, GridElement$lambda$1$Type);
_.compare = function(arg0, arg1){
return lambda$1(this.columns_0, arg0, arg1);
}
;
var Lcom_vaadin_elements_grid_GridElement$lambda$1$Type_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/lambda$1$Type', 257);
function $getStyle(this$static, arg0){
return $lambda$2(this$static.$$outer_0, this$static.generator_1, arg0);
}
function GridElement$lambda$2$Type($$outer_0, generator_1){
this.$$outer_0 = $$outer_0;
this.generator_1 = generator_1;
}
defineClass(258, 1, {3:1}, GridElement$lambda$2$Type);
var Lcom_vaadin_elements_grid_GridElement$lambda$2$Type_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/lambda$2$Type', 258);
function $getStyle_0(this$static, arg0){
return $lambda$3(this$static.$$outer_0, this$static.generator_1, arg0);
}
function GridElement$lambda$3$Type($$outer_0, generator_1){
this.$$outer_0 = $$outer_0;
this.generator_1 = generator_1;
}
defineClass(259, 1, {}, GridElement$lambda$3$Type);
var Lcom_vaadin_elements_grid_GridElement$lambda$3$Type_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/lambda$3$Type', 259);
function GridElement$lambda$4$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(196, 1, {}, GridElement$lambda$4$Type);
_.execute_1 = function(){
$schedule_0(this.$$outer_0.grid_0.autoColumnWidthsRecalculator);
}
;
var Lcom_vaadin_elements_grid_GridElement$lambda$4$Type_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/lambda$4$Type', 196);
function GridElement$lambda$5$Type(generator_1){
this.generator_1 = generator_1;
}
defineClass(263, 1, {}, GridElement$lambda$5$Type);
_.getDetails = function(arg0){
return $lambda$5(this.generator_1, arg0);
}
;
var Lcom_vaadin_elements_grid_GridElement$lambda$5$Type_2_classLit = createForClass('com.vaadin.elements.grid', 'GridElement/lambda$5$Type', 263);
function GridEntryPoint$1(){
}
defineClass(251, 1, {}, GridEntryPoint$1);
_.execute_1 = function(){
$setStyleName_0(($clinit_RootPanel() , get_0()), $getCSSClass(($clinit_BrowserInfo() , !instance_2 && (instance_2 = new BrowserInfo) , $clinit_BrowserInfo() , instance_2)), false);
}
;
var Lcom_vaadin_elements_grid_GridEntryPoint$1_2_classLit = createForClass('com.vaadin.elements.grid', 'GridEntryPoint/1', 251);
function $focusGridIfSelectAllClicked(this$static, event_0){
var target, targetElement;
target = ($clinit_DOMImpl() , impl_0).eventGetTarget(event_0);
if (is_0(target)) {
targetElement = target;
$equals_2('label', targetElement.tagName) && $hasClassName($getParentElement_0(targetElement), 'gwt-CheckBox') && (($clinit_DOM() , this$static.element).focus() , undefined);
}
}
function $refreshStaticSection(this$static, cell){
instanceOf(cell, 63)?(this$static.refreshHeader() , undefined):(this$static.refreshFooter() , undefined);
}
function $removeColumn_1(this$static, column){
var initialFrozenColumnCount, maxFrozenColumnCount;
initialFrozenColumnCount = this$static.frozenColumnCount;
maxFrozenColumnCount = this$static.columns.array.length - 1;
instanceOf(this$static.selectionModel, 140) && --maxFrozenColumnCount;
maxFrozenColumnCount < initialFrozenColumnCount && $setFrozenColumnCount_0(this$static, maxFrozenColumnCount);
try {
$removeColumn(this$static, column);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 16)) {
$setFrozenColumnCount_0(this$static, initialFrozenColumnCount);
}
else
throw unwrap($e0);
}
}
function $setHeightByRows(this$static, bodyRows){
var bodyHeight, bodyRowHeight, footerHeight, footerRowHeight, footerRows, headerHeight, headerRowHeight, headerRows;
headerRowHeight = this$static.escalator.header.defaultRowHeight;
headerRows = this$static.header.visible?this$static.header.rows_0.array.length:0;
headerHeight = headerRowHeight * headerRows;
bodyRowHeight = this$static.escalator.body_0.defaultRowHeight;
bodyHeight = bodyRowHeight * bodyRows;
footerRowHeight = this$static.escalator.footer.defaultRowHeight;
footerRows = this$static.footer.visible?this$static.footer.rows_0.array.length:0;
footerHeight = footerRowHeight * footerRows;
$setHeight_0(this$static.escalator, headerHeight + bodyHeight + footerHeight + 'px');
}
function ViolatedGrid(){
var defaultRow, lastArg, iFrame, contentDocument, scroller, detectedScrollbarSize;
$clinit_UIObject();
var scrollers;
$$init_0(this);
$initWidget(this, this.escalator);
($clinit_DOM() , this.element).tabIndex = 0;
this.cellFocusHandler = new Grid$CellFocusHandler(this);
$setStylePrimaryName_9(this, 'v-grid');
$setEscalatorUpdater(this.escalator.header, new Grid$StaticSectionUpdater(this, this.header, this.escalator.header));
$setEscalatorUpdater(this.escalator.body_0, new Grid$BodyUpdater(this));
$setEscalatorUpdater(this.escalator.footer, new Grid$StaticSectionUpdater(this, this.footer, this.escalator.footer));
this.header.grid_0 = this;
defaultRow = castTo($appendRow(this.header), 52);
$setDefaultRow(this.header, defaultRow);
this.footer.grid_0 = this;
this.editor.grid_0 = this;
$setSelectionMode((lastArg = this , $clinit_Grid$SelectionMode() , lastArg));
$setSpacerUpdater(this.escalator.body_0, this.gridSpacerUpdater);
$addHandler_0(this.escalator, new Grid$2(this), ($clinit_ScrollEvent() , TYPE_15));
$addHandler_0(this.escalator, new Grid$3(this), ($clinit_RowVisibilityChangeEvent() , TYPE_9));
$addHandler_0(this, new Grid$4(this), ($clinit_SelectionEvent() , $clinit_SelectionEvent() , eventType_0));
$sinkEvents(this, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['touchstart', 'touchmove', 'touchend', 'touchcancel', 'click'])));
$sinkEvents(this, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['keydown', 'keyup', 'keypress', 'dblclick', 'mousedown', 'click'])));
$addHeaderKeyUpHandler(this, new Grid$5(this));
$addDataAvailableHandler(this, new Grid$6(this));
($clinit_BrowserInfo() , !instance_2 && (instance_2 = new BrowserInfo) , $clinit_BrowserInfo() , instance_2).browserDetails.isChrome && setWidgetUtilNativeScrollbarSize((iFrame = $createIFrameElement($doc) , iFrame.style['position'] = 'absolute' , undefined , iFrame.style['marginLeft'] = '-5000px' , undefined , $appendChild(($clinit_RootPanel() , $doc.body), iFrame) , contentDocument = iFrame.contentWindow.document , scroller = ($clinit_DOMImpl() , contentDocument).createElement('div') , scroller.style['width'] = '50px' , undefined , scroller.style['height'] = '50px' , undefined , scroller.style['overflow'] = 'scroll' , undefined , $appendChild(contentDocument.body, scroller) , detectedScrollbarSize = ((scroller.offsetWidth || 0) | 0) - (parseInt(scroller['clientWidth']) | 0) , $removeChild($doc.body, iFrame) , detectedScrollbarSize));
if (getNativeScrollbarSize() == 0) {
if ((!instance_2 && (instance_2 = new BrowserInfo) , instance_2).browserDetails.isSafari) {
scrollers = $wrap($css(($clinit_GQuery() , $_0('.vaadin-grid-scroller', this.element)), 'position', 'relative'), $_0("<div style='position: absolute; z-index: 10' />", document_1));
$css($parent($filter(scrollers, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['.vaadin-grid-scroller-vertical']))), 'right', '0');
$css($parent($filter(scrollers, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['.vaadin-grid-scroller-horizontal']))), 'bottom', '0');
}
else
(!instance_2 && (instance_2 = new BrowserInfo) , instance_2).browserDetails.isChrome && $attr(($clinit_GQuery() , $_0('.vaadin-grid-scroller', this.element)));
}
}
function setWidgetUtilNativeScrollbarSize(size_0){
$clinit_WidgetUtil();
detectedScrollbarSize_0 = size_0;
}
defineClass(282, 281, $intern_45, ViolatedGrid);
_.onBrowserEvent = function(event_0){
$focusGridIfSelectAllClicked(this, event_0);
$onBrowserEvent_1(this, event_0);
}
;
var Lcom_vaadin_elements_grid_ViolatedGrid_2_classLit = createForClass('com.vaadin.elements.grid', 'ViolatedGrid', 282);
function create_3(cell, container){
var column, jsCell, row;
jsCell = castToAllowJso(createJsType(Lcom_vaadin_elements_grid_config_JSCell_2_classLit), 760);
column = castTo(cell.column_0, 51);
definePropertyAccessors_0(jsCell, 'element', null, new JSCell$lambda$0$Type(cell));
definePropertyAccessors_0(jsCell, 'index', null, new JSCell$lambda$1$Type(cell));
definePropertyAccessors_0(jsCell, 'columnName', null, new JSCell$lambda$2$Type(column));
definePropertyAccessors_0(jsCell, 'data', null, new JSCell$lambda$3$Type(column, cell));
row = castToAllowJso(createJsType(Lcom_vaadin_elements_grid_config_JSRow_2_classLit), 750);
definePropertyAccessors_0(row, 'index', null, new JSCell$lambda$4$Type(cell));
definePropertyAccessors_0(row, 'data', null, new JSCell$lambda$5$Type(cell));
definePropertyAccessors_0(row, 'element', null, new JSCell$lambda$6$Type(cell));
row.grid = container;
jsCell.row = row;
return jsCell;
}
function lambda$1_0(cell_0){
return valueOf_2(cell_0.columnIndex);
}
function lambda$3(column_0, cell_1){
return $getValue_0(column_0, cell_1.rowReference.row_0);
}
function lambda$4(cell_0){
return valueOf_2(cell_0.rowReference.rowIndex_0);
}
function lambda$5(cell_0){
return extractDataItem(cell_0.rowReference.row_0);
}
function lambda$6(cell_0){
return $getParentElement(cell_0.getElement_0());
}
var Lcom_vaadin_elements_grid_config_JSCell_2_classLit = createForInterface('com.vaadin.elements.grid.config', 'JSCell');
function JSCell$lambda$0$Type(cell_0){
this.cell_0 = cell_0;
}
defineClass(454, 1, {}, JSCell$lambda$0$Type);
_.getValue_0 = function(){
return this.cell_0.getElement_0();
}
;
var Lcom_vaadin_elements_grid_config_JSCell$lambda$0$Type_2_classLit = createForClass('com.vaadin.elements.grid.config', 'JSCell/lambda$0$Type', 454);
function JSCell$lambda$1$Type(cell_0){
this.cell_0 = cell_0;
}
defineClass(455, 1, {}, JSCell$lambda$1$Type);
_.getValue_0 = function(){
return lambda$1_0(this.cell_0);
}
;
var Lcom_vaadin_elements_grid_config_JSCell$lambda$1$Type_2_classLit = createForClass('com.vaadin.elements.grid.config', 'JSCell/lambda$1$Type', 455);
function JSCell$lambda$2$Type(column_0){
this.column_0 = column_0;
}
defineClass(456, 1, {}, JSCell$lambda$2$Type);
_.getValue_0 = function(){
return this.column_0.jsColumn.name;
}
;
var Lcom_vaadin_elements_grid_config_JSCell$lambda$2$Type_2_classLit = createForClass('com.vaadin.elements.grid.config', 'JSCell/lambda$2$Type', 456);
function JSCell$lambda$3$Type(column_0, cell_1){
this.column_0 = column_0;
this.cell_1 = cell_1;
}
defineClass(457, 1, {}, JSCell$lambda$3$Type);
_.getValue_0 = function(){
return lambda$3(this.column_0, this.cell_1);
}
;
var Lcom_vaadin_elements_grid_config_JSCell$lambda$3$Type_2_classLit = createForClass('com.vaadin.elements.grid.config', 'JSCell/lambda$3$Type', 457);
function JSCell$lambda$4$Type(cell_0){
this.cell_0 = cell_0;
}
defineClass(458, 1, {}, JSCell$lambda$4$Type);
_.getValue_0 = function(){
return lambda$4(this.cell_0);
}
;
var Lcom_vaadin_elements_grid_config_JSCell$lambda$4$Type_2_classLit = createForClass('com.vaadin.elements.grid.config', 'JSCell/lambda$4$Type', 458);
function JSCell$lambda$5$Type(cell_0){
this.cell_0 = cell_0;
}
defineClass(459, 1, {}, JSCell$lambda$5$Type);
_.getValue_0 = function(){
return lambda$5(this.cell_0);
}
;
var Lcom_vaadin_elements_grid_config_JSCell$lambda$5$Type_2_classLit = createForClass('com.vaadin.elements.grid.config', 'JSCell/lambda$5$Type', 459);
function JSCell$lambda$6$Type(cell_0){
this.cell_0 = cell_0;
}
defineClass(460, 1, {}, JSCell$lambda$6$Type);
_.getValue_0 = function(){
return lambda$6(this.cell_0);
}
;
var Lcom_vaadin_elements_grid_config_JSCell$lambda$6$Type_2_classLit = createForClass('com.vaadin.elements.grid.config', 'JSCell/lambda$6$Type', 460);
var Lcom_vaadin_elements_grid_config_JSColumn_2_classLit = createForInterface('com.vaadin.elements.grid.config', 'JSColumn');
var Lcom_vaadin_elements_grid_config_JSDataRequest_2_classLit = createForInterface('com.vaadin.elements.grid.config', 'JSDataRequest');
var Lcom_vaadin_elements_grid_config_JSEditorRequest_2_classLit = createForInterface('com.vaadin.elements.grid.config', 'JSEditorRequest');
function create_4(row, container){
var jsRow;
jsRow = castToAllowJso(createJsType(Lcom_vaadin_elements_grid_config_JSRow_2_classLit), 750);
definePropertyAccessors_0(jsRow, 'index', null, new JSRow$lambda$0$Type(row));
definePropertyAccessors_0(jsRow, 'data', null, new JSRow$lambda$1$Type(row));
definePropertyAccessors_0(jsRow, 'element', null, new JSRow$lambda$2$Type(row));
jsRow.grid = container;
return jsRow;
}
function lambda$0(row_0){
return valueOf_2(row_0.rowIndex_0);
}
function lambda$1_1(row_0){
return extractDataItem(row_0.row_0);
}
var Lcom_vaadin_elements_grid_config_JSRow_2_classLit = createForInterface('com.vaadin.elements.grid.config', 'JSRow');
function JSRow$lambda$0$Type(row_0){
this.row_0 = row_0;
}
defineClass(451, 1, {}, JSRow$lambda$0$Type);
_.getValue_0 = function(){
return lambda$0(this.row_0);
}
;
var Lcom_vaadin_elements_grid_config_JSRow$lambda$0$Type_2_classLit = createForClass('com.vaadin.elements.grid.config', 'JSRow/lambda$0$Type', 451);
function JSRow$lambda$1$Type(row_0){
this.row_0 = row_0;
}
defineClass(452, 1, {}, JSRow$lambda$1$Type);
_.getValue_0 = function(){
return lambda$1_1(this.row_0);
}
;
var Lcom_vaadin_elements_grid_config_JSRow$lambda$1$Type_2_classLit = createForClass('com.vaadin.elements.grid.config', 'JSRow/lambda$1$Type', 452);
function JSRow$lambda$2$Type(row_0){
this.row_0 = row_0;
}
defineClass(453, 1, {}, JSRow$lambda$2$Type);
_.getValue_0 = function(){
return this.row_0.element;
}
;
var Lcom_vaadin_elements_grid_config_JSRow$lambda$2$Type_2_classLit = createForClass('com.vaadin.elements.grid.config', 'JSRow/lambda$2$Type', 453);
var Lcom_vaadin_elements_grid_config_JSSortOrder_2_classLit = createForInterface('com.vaadin.elements.grid.config', 'JSSortOrder');
var Lcom_vaadin_elements_grid_config_JSStaticCell_2_classLit = createForInterface('com.vaadin.elements.grid.config', 'JSStaticCell');
function DataItemContainer(dataItem){
this.dataItem_0 = dataItem;
}
defineClass(136, 1, {136:1}, DataItemContainer);
var Lcom_vaadin_elements_grid_data_DataItemContainer_2_classLit = createForClass('com.vaadin.elements.grid.data', 'DataItemContainer', 136);
function $clearCache(this$static, newSize){
var intSize, range;
intSize = castTo($val_2(($clinit_JSValidate() , Integer), newSize, valueOf_2(this$static.size_0), valueOf_2(this$static.size_0)), 22);
if (intSize.value_0 == this$static.size_0 || this$static.size_0 == 0) {
range = this$static.cached;
this$static.requestRows(range.start_0, range.end - range.start_0, new GridDataSource$1(this$static, range));
}
else {
$resetDataAndSize_1(this$static, intSize.value_0);
}
castToAllowJso(this$static.gridElement.grid_0.selectionModel, 38).reset_1();
}
function $getItem(this$static, rowIndex, callback, onlyCached){
var index_0, range, row;
index_0 = castTo($val_2(($clinit_JSValidate() , Integer), rowIndex, valueOf_2(-1), valueOf_2(-1)), 22);
if (index_0.value_0 >= 0 && index_0.value_0 < this$static.size_0) {
row = $getRow(this$static, index_0.value_0);
if (row != null) {
jsni(callback, 'call', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [callback, undefined, extractDataItem(row)]));
}
else if (onlyCached) {
exec_0(callback, getError('Unable to retrieve row #' + index_0 + ', it has not been cached yet'));
}
else {
range = withOnly(index_0.value_0);
this$static.requestRows(range.start_0, range.end - range.start_0, new GridDataSource$2(this$static, range, callback));
}
}
else {
exec_0(callback, getError('Index value #' + index_0 + ' is out of range'));
}
}
function $resetDataAndSize_1(this$static, newSize){
$resetDataAndSize(this$static, newSize);
castToAllowJso(this$static.gridElement.grid_0.selectionModel, 38).dataSizeUpdated(newSize);
}
function $setSize(this$static, nsize){
var isEmpty, wasUpdating;
if (nsize != this$static.size_0) {
isEmpty = this$static.size_0 == 0;
this$static.size_0 = nsize;
if (isEmpty) {
wasUpdating = this$static.gridElement.updating;
this$static.gridElement.updating = true;
$setDataSource(this$static.gridElement.grid_0, this$static);
this$static.gridElement.updating = wasUpdating;
}
$updateHeight(this$static.gridElement);
}
}
function GridDataSource(gridElement){
this.requestedAvailability = new Range_0(0, 0);
this.cached = new Range_0(0, 0);
this.indexToRowMap = new HashMap;
this.keyToIndexMap = new HashMap;
this.cacheStrategy = new CacheStrategy$DefaultCacheStrategy;
this.coverageChecker = new AbstractRemoteDataSource$1(this);
this.pinnedCounts = new HashMap;
this.pinnedRows = new HashMap;
this.gridElement = gridElement;
}
function extractDataItem(itemOrContainer){
if (instanceOf(itemOrContainer, 136)) {
return castTo(itemOrContainer, 136).dataItem_0;
}
return itemOrContainer;
}
defineClass(213, 428, {}, GridDataSource);
_.clearCache = function(newSize){
$clearCache(this, newSize);
}
;
_.getItem = function(rowIndex, callback, onlyCached){
$getItem(this, rowIndex, callback, onlyCached);
}
;
_.getRowKey = function(row){
return row;
}
;
_.getRowKey_0 = function(row){
return this.getRowKey(row);
}
;
_.refresh = function(){
$resetDataAndSize_1(this, this.size_0);
castToAllowJso(this.gridElement.grid_0.selectionModel, 38).reset_1();
}
;
_.resetDataAndSize = function(newSize){
$resetDataAndSize_1(this, newSize);
}
;
_.size = function(){
return this.size_0;
}
;
_.size_2 = function(){
return this.size();
}
;
_.size_0 = 0;
var Lcom_vaadin_elements_grid_data_GridDataSource_2_classLit = createForClass('com.vaadin.elements.grid.data', 'GridDataSource', 213);
function GridDataSource$1($anonymous0, $anonymous1){
AbstractRemoteDataSource$RequestRowsCallback.call(this, $anonymous0, $anonymous1);
}
defineClass(379, 167, {}, GridDataSource$1);
var Lcom_vaadin_elements_grid_data_GridDataSource$1_2_classLit = createForClass('com.vaadin.elements.grid.data', 'GridDataSource/1', 379);
function GridDataSource$2($anonymous0, $anonymous1, val$callback){
this.val$callback4 = val$callback;
AbstractRemoteDataSource$RequestRowsCallback.call(this, $anonymous0, $anonymous1);
}
defineClass(380, 167, {}, GridDataSource$2);
_.onResponse = function(rowData, totalSize){
runJavascriptFunction(this.val$callback4, 'call', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [this.val$callback4, undefined, rowData.get_1(0)]));
}
;
var Lcom_vaadin_elements_grid_data_GridDataSource$2_2_classLit = createForClass('com.vaadin.elements.grid.data', 'GridDataSource/2', 380);
function GridDomTableDataSource(table, grid){
GridDataSource.call(this, grid);
this.table = table;
$setSize(this, ((!this.tableRows || this.tableRows.elements_0.length == 0) && (this.tableRows = $find($(this.table), stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['tbody tr:not([template])']))) , this.tableRows).elements_0.length);
}
defineClass(170, 213, {170:1}, GridDomTableDataSource);
_.refresh = function(){
this.tableRows = null;
$setSize(this, ((!this.tableRows || this.tableRows.elements_0.length == 0) && (this.tableRows = $find($(this.table), stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['tbody tr:not([template])']))) , this.tableRows).elements_0.length);
$resetDataAndSize_1(this, this.size_0);
castToAllowJso(this.gridElement.grid_0.selectionModel, 38).reset_1();
}
;
_.requestRows = function(firstRowIndex, numberOfRows, callback){
var e, e$array, e$index, e$max, list, row, row$array, row$index, row$max, values;
list = new ArrayList;
for (row$array = $slice($slice(((!this.tableRows || this.tableRows.elements_0.length == 0) && (this.tableRows = $find($(this.table), stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['tbody tr:not([template])']))) , this.tableRows), firstRowIndex - 1 + 1, -1), 0, numberOfRows).elements_0 , row$index = 0 , row$max = row$array.length; row$index < row$max; ++row$index) {
row = row$array[row$index];
values = [];
for (e$array = $find($(row), stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['td'])).elements_0 , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) {
e = e$array[e$index];
$push(values, $html($(e)));
}
setCheck(list.array, list.array.length, values);
}
$setRowData(this, firstRowIndex, list);
}
;
var Lcom_vaadin_elements_grid_data_GridDomTableDataSource_2_classLit = createForClass('com.vaadin.elements.grid.data', 'GridDomTableDataSource', 170);
function $requestRows(this$static, firstRowIndex, numberOfRows, callback){
var jsDataRequest;
jsDataRequest = castToAllowJso(createJsType(Lcom_vaadin_elements_grid_config_JSDataRequest_2_classLit), 759);
jsDataRequest.index = firstRowIndex;
jsDataRequest.count = numberOfRows;
jsDataRequest.sortOrder = castToJso(prop_0(this$static.gridElement.container, 'sortOrder'));
$setLoadingDataClass(this$static.gridElement, true);
runJavascriptFunction(this$static.jsFunction, 'call', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [this$static.jsFunction, jsDataRequest, wrapFunction(new GridJsFuncDataSource$1(this$static, callback))]));
}
function $setJSFunction(this$static, jso){
this$static.jsFunction = jso;
$clearCache(this$static, null);
castToAllowJso(this$static.gridElement.grid_0.selectionModel, 38).reset_1();
}
function GridJsFuncDataSource(jso, grid){
GridDataSource.call(this, grid);
this.jsFunction = jso;
$requestRows(this, 0, 0, null);
}
defineClass(135, 213, {135:1}, GridJsFuncDataSource);
_.requestRows = function(firstRowIndex, numberOfRows, callback){
$requestRows(this, firstRowIndex, numberOfRows, callback);
}
;
_.initialRowSetReceived = false;
var Lcom_vaadin_elements_grid_data_GridJsFuncDataSource_2_classLit = createForClass('com.vaadin.elements.grid.data', 'GridJsFuncDataSource', 135);
function GridJsFuncDataSource$1(this$0, val$callback){
this.this$01 = this$0;
this.val$callback2 = val$callback;
Function_0.call(this);
}
defineClass(431, 7, $intern_18, GridJsFuncDataSource$1);
_.f = function(){
var i_0, list, totalSize;
list = asList(castToJso($getArgument(this, 0)));
totalSize = castToDouble($getArgument(this, 1));
for (i_0 = 0; i_0 < list.size_2(); i_0++) {
isPrimitiveType(list.get_1(i_0)) && list.set_1(i_0, new DataItemContainer(list.get_1(i_0)));
}
totalSize != null && $setSize(this.this$01, round_int((checkCriticalNotNull(totalSize) , totalSize)));
!!this.val$callback2 && this.val$callback2.onResponse(list, this.this$01.size_0);
$setLoadingDataClass(this.this$01.gridElement, false);
if (!this.this$01.initialRowSetReceived && !list.isEmpty()) {
this.this$01.initialRowSetReceived = true;
$updateWidth(this.this$01.gridElement);
}
}
;
var Lcom_vaadin_elements_grid_data_GridJsFuncDataSource$1_2_classLit = createForClass('com.vaadin.elements.grid.data', 'GridJsFuncDataSource/1', 431);
function $clinit_IndexBasedSelectionMode(){
$clinit_IndexBasedSelectionMode = emptyMethod;
SINGLE_0 = new IndexBasedSelectionMode$1;
MULTI_0 = new IndexBasedSelectionMode$2;
ALL = new IndexBasedSelectionMode$3;
DISABLED = new IndexBasedSelectionMode$4;
}
function IndexBasedSelectionMode(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_15(){
$clinit_IndexBasedSelectionMode();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_elements_grid_selection_IndexBasedSelectionMode_2_classLit, 1), $intern_0, 60, 0, [SINGLE_0, MULTI_0, ALL, DISABLED]);
}
defineClass(60, 5, $intern_50);
var ALL, DISABLED, MULTI_0, SINGLE_0;
var Lcom_vaadin_elements_grid_selection_IndexBasedSelectionMode_2_classLit = createForEnum('com.vaadin.elements.grid.selection', 'IndexBasedSelectionMode', 60, values_15);
function IndexBasedSelectionMode$1(){
IndexBasedSelectionMode.call(this, 'SINGLE', 0);
}
defineClass(432, 60, $intern_50, IndexBasedSelectionMode$1);
_.createModel = function(){
return new IndexBasedSelectionModelSingle;
}
;
var Lcom_vaadin_elements_grid_selection_IndexBasedSelectionMode$1_2_classLit = createForEnum('com.vaadin.elements.grid.selection', 'IndexBasedSelectionMode/1', 432, null);
function IndexBasedSelectionMode$2(){
IndexBasedSelectionMode.call(this, 'MULTI', 1);
}
defineClass(433, 60, $intern_50, IndexBasedSelectionMode$2);
_.createModel = function(){
return new IndexBasedSelectionModelMulti(false);
}
;
var Lcom_vaadin_elements_grid_selection_IndexBasedSelectionMode$2_2_classLit = createForEnum('com.vaadin.elements.grid.selection', 'IndexBasedSelectionMode/2', 433, null);
function IndexBasedSelectionMode$3(){
IndexBasedSelectionMode.call(this, 'ALL', 2);
}
defineClass(434, 60, $intern_50, IndexBasedSelectionMode$3);
_.createModel = function(){
return new IndexBasedSelectionModelMulti(true);
}
;
var Lcom_vaadin_elements_grid_selection_IndexBasedSelectionMode$3_2_classLit = createForEnum('com.vaadin.elements.grid.selection', 'IndexBasedSelectionMode/3', 434, null);
function IndexBasedSelectionMode$4(){
IndexBasedSelectionMode.call(this, 'DISABLED', 3);
}
defineClass(435, 60, $intern_50, IndexBasedSelectionMode$4);
_.createModel = function(){
return new IndexBasedSelectionModelDisabled;
}
;
var Lcom_vaadin_elements_grid_selection_IndexBasedSelectionMode$4_2_classLit = createForEnum('com.vaadin.elements.grid.selection', 'IndexBasedSelectionMode/4', 435, null);
function IndexBasedSelectionModelDisabled(){
}
defineClass(560, 719, {38:1}, IndexBasedSelectionModelDisabled);
_.clear = function(){
}
;
_.dataSizeUpdated = function(newSize){
}
;
_.deselect = function(index_0, skipOwnEvents){
return false;
}
;
_.deselected = function(mapper, from, to){
return createJsType(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit);
}
;
_.getMode = function(){
return $clinit_IndexBasedSelectionMode() , DISABLED;
}
;
_.select = function(index_0, skipOwnEvents){
return false;
}
;
_.selectAll = function(){
}
;
_.selected = function(mapper, from, to){
return createJsType(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit);
}
;
_.size = function(){
return 0;
}
;
var Lcom_vaadin_elements_grid_selection_IndexBasedSelectionModelDisabled_2_classLit = createForClass('com.vaadin.elements.grid.selection', 'IndexBasedSelectionModelDisabled', 560);
function $addIndex(this$static, index_0, skipOwnEvents){
var val;
if (index_0 >= 0 && (!this$static.dataSizeUpdated_0 || index_0 < this$static.grid_0.dataSource.size_0) && (val = checkNotNull(castToDouble(runJavascriptFunction(this$static.indexes, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [index_0])))) , round_int(val) == -1)) {
runJavascriptFunction(this$static.indexes, 'push', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [index_0]));
skipOwnEvents = unsafeCast(checkNotNull(castToBoolean($val_2(($clinit_JSValidate() , Boolean_0), ($clinit_Boolean() , skipOwnEvents?TRUE_0:FALSE_0), (null , FALSE_0), (null , FALSE_0)))));
skipOwnEvents || $fireEvent_0(this$static.grid_0, new SelectionEvent_0(this$static.grid_0, null, null));
if (this$static.invertedSelection && (this$static.invertedSelection?this$static.grid_0.dataSource.size_0 - this$static.indexes.length:this$static.indexes.length) == 0) {
$reset(this$static);
return false;
}
else if (!this$static.invertedSelection && (this$static.invertedSelection?this$static.grid_0.dataSource.size_0 - this$static.indexes.length:this$static.indexes.length) > 0 && (this$static.invertedSelection?this$static.grid_0.dataSource.size_0 - this$static.indexes.length:this$static.indexes.length) == this$static.grid_0.dataSource.size_0) {
$selectAll(this$static);
return false;
}
return true;
}
return false;
}
function $deselect_0(this$static, index_0, skipOwnEvents){
return this$static.invertedSelection?$addIndex(this$static, index_0, skipOwnEvents):$removeIndex(this$static, index_0, skipOwnEvents);
}
function $removeIndex(this$static, index_0, skipOwnEvents){
var val;
val = checkNotNull(castToDouble(runJavascriptFunction(this$static.indexes, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [index_0]))));
if (round_int(val) != -1) {
$remove_5(this$static.indexes, index_0);
skipOwnEvents = unsafeCast(checkNotNull(castToBoolean($val_2(($clinit_JSValidate() , Boolean_0), ($clinit_Boolean() , skipOwnEvents?TRUE_0:FALSE_0), (null , FALSE_0), (null , FALSE_0)))));
skipOwnEvents || $fireEvent_0(this$static.grid_0, new SelectionEvent_0(this$static.grid_0, null, null));
return true;
}
return false;
}
function $reset(this$static){
this$static.invertedSelection = false;
this$static.indexes.length = 0;
$fireEvent_0(this$static.grid_0, new SelectionEvent_0(this$static.grid_0, null, null));
}
function $select_2(this$static, index_0, skipOwnEvents){
return this$static.invertedSelection?$removeIndex(this$static, index_0, skipOwnEvents):$addIndex(this$static, index_0, skipOwnEvents);
}
function $selectAll(this$static){
this$static.indexes.length = 0;
this$static.invertedSelection = true;
$fireEvent_0(this$static.grid_0, new SelectionEvent_0(this$static.grid_0, null, null));
}
function IndexBasedSelectionModelMulti(invertedSelection){
this.selectionBatch = new LinkedHashSet;
this.deselectionBatch = new LinkedHashSet;
this.grid_1 = null;
this.renderer_0 = null;
this.selectedRows = new LinkedHashSet;
this.indexes = createJsType(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit);
this.invertedSelection = invertedSelection;
}
defineClass(123, 140, {85:1, 157:1, 140:1, 38:1, 123:1}, IndexBasedSelectionModelMulti);
_.clear = function(){
$reset(this);
}
;
_.commitBatchSelect = function(){
this.lastSelected = -1;
}
;
_.dataSizeUpdated = function(newSize){
var changed, i_0;
this.dataSizeUpdated_0 = true;
changed = false;
for (i_0 = 0; i_0 < this.indexes.length; i_0++) {
if (checkNotNull(castToDouble(prop_0(this.indexes, valueOf_2(i_0)))) >= newSize) {
$remove_5(this.indexes, castToDouble(prop_0(this.indexes, valueOf_2(i_0--))));
changed = true;
}
}
changed && $fireEvent_0(this.grid_0, new SelectionEvent_0(this.grid_0, null, null));
}
;
_.deselect = function(index_0, skipOwnEvents){
return $deselect_0(this, index_0, skipOwnEvents);
}
;
_.deselectAll = function(){
this.indexes.length = 0;
this.invertedSelection = false;
$fireEvent_0(this.grid_0, new SelectAllEvent(this));
return true;
}
;
_.deselectByHandle = function(handle){
return $deselect_0(this, getRowIndex(this.grid_0, handle), true);
}
;
_.deselected = function(mapper, from, to){
var defaultTo, fromIndex, i_0, mappedValue, result, toIndex;
if (this.invertedSelection) {
result = createJsType(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit);
mapper = verifyMapper(mapper);
fromIndex = castTo($val_2(($clinit_JSValidate() , Integer), from, valueOf_2(0), valueOf_2(0)), 22).value_0;
fromIndex = min_1(fromIndex, this.indexes.length - 1);
defaultTo = this.indexes.length - 1;
toIndex = castTo($val_2(Integer, to, valueOf_2(defaultTo), valueOf_2(defaultTo)), 22).value_0;
toIndex = min_1(toIndex, this.indexes.length - 1);
for (i_0 = fromIndex; i_0 <= toIndex; i_0++) {
mappedValue = jsni(mapper, 'call', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [mapper, prop_0(this.indexes, valueOf_2(i_0))]));
mappedValue != null && runJavascriptFunction(result, 'push', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [mappedValue]));
}
return result;
}
else {
return createJsType(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit);
}
}
;
_.getMode = function(){
return this.invertedSelection?($clinit_IndexBasedSelectionMode() , ALL):($clinit_IndexBasedSelectionMode() , MULTI_0);
}
;
_.getSelectionColumnRenderer = function(){
return this.renderer;
}
;
_.isSelected = function(row){
var val, val0;
return this.invertedSelection?(val0 = checkNotNull(castToDouble(runJavascriptFunction(this.indexes, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [getRowIndexByRow(this.grid_0, row)])))) , round_int(val0) == -1):(val = checkNotNull(castToDouble(runJavascriptFunction(this.indexes, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [getRowIndexByRow(this.grid_0, row)])))) , round_int(val) != -1);
}
;
_.reset_1 = function(){
$reset(this);
}
;
_.select = function(index_0, skipOwnEvents){
return $select_2(this, index_0, skipOwnEvents);
}
;
_.selectAll = function(){
$selectAll(this);
}
;
_.selectByHandle = function(handle){
return $select_2(this, getRowIndex(this.grid_0, handle), true);
}
;
_.selected = function(mapper, from, to){
var addedSelectedIndexCount, count, defaultTo, fromIndex, i_0, index_0, mappedValue, result, selectedIndexCount, size_0, toIndex, val;
result = createJsType(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit);
mapper = verifyMapper(mapper);
if (this.invertedSelection) {
size_0 = this.invertedSelection?this.grid_0.dataSource.size_0 - this.indexes.length:this.indexes.length;
fromIndex = castTo($val_2(($clinit_JSValidate() , Integer), from, valueOf_2(0), valueOf_2(0)), 22).value_0;
fromIndex = (fromIndex > 0?fromIndex:0) < size_0 - 1?fromIndex > 0?fromIndex:0:size_0 - 1;
defaultTo = (this.invertedSelection?this.grid_0.dataSource.size_0 - this.indexes.length:this.indexes.length) - 1;
toIndex = castTo($val_2(Integer, to, valueOf_2(defaultTo), valueOf_2(defaultTo)), 22).value_0;
toIndex = (toIndex > 0?toIndex:0) < size_0 - 1?toIndex > 0?toIndex:0:size_0 - 1;
count = toIndex - fromIndex + 1;
index_0 = 0;
selectedIndexCount = 0;
addedSelectedIndexCount = 0;
while (addedSelectedIndexCount < count) {
val = checkNotNull(castToDouble(runJavascriptFunction(this.indexes, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [index_0]))));
if (round_int(val) == -1) {
if (selectedIndexCount++ >= fromIndex) {
++addedSelectedIndexCount;
mappedValue = jsni(mapper, 'call', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [mapper, valueOf_2(index_0)]));
mappedValue != null && runJavascriptFunction(result, 'push', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [mappedValue]));
}
}
++index_0;
}
}
else {
fromIndex = castTo($val_2(($clinit_JSValidate() , Integer), from, valueOf_2(0), valueOf_2(0)), 22).value_0;
fromIndex = min_1(fromIndex, this.indexes.length - 1);
defaultTo = this.indexes.length - 1;
toIndex = castTo($val_2(Integer, to, valueOf_2(defaultTo), valueOf_2(defaultTo)), 22).value_0;
toIndex = min_1(toIndex, this.indexes.length - 1);
for (i_0 = fromIndex; i_0 <= toIndex; i_0++) {
mappedValue = jsni(mapper, 'call', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [mapper, prop_0(this.indexes, valueOf_2(i_0))]));
mappedValue != null && runJavascriptFunction(result, 'push', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [mappedValue]));
}
}
return result;
}
;
_.setGrid = function(grid){
$setGrid(this, grid);
this.grid_0 = grid;
this.renderer = new IndexBasedSelectionModelMulti$1(this, grid);
}
;
_.size = function(){
return this.invertedSelection?this.grid_0.dataSource.size_0 - this.indexes.length:this.indexes.length;
}
;
_.startBatchSelect = function(){
this.lastSelected = -1;
}
;
_.dataSizeUpdated_0 = false;
_.invertedSelection = false;
_.lastSelected = -1;
var Lcom_vaadin_elements_grid_selection_IndexBasedSelectionModelMulti_2_classLit = createForClass('com.vaadin.elements.grid.selection', 'IndexBasedSelectionModelMulti', 123);
function IndexBasedSelectionModelMulti$1(this$0, $anonymous0){
this.this$01 = this$0;
MultiSelectionRenderer.call(this, $anonymous0);
}
defineClass(445, 216, $intern_41, IndexBasedSelectionModelMulti$1);
_.createWidget_0 = function(){
var checkBox;
checkBox = $createWidget(this);
!!checkBox.inputElem && (checkBox.inputElem.tabIndex = -1 , undefined);
setStyleName(($clinit_DOM() , checkBox.element), 'vaadin-grid style-scope', true);
$addClass($children($(checkBox)), stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['vaadin-grid', 'style-scope']));
return checkBox;
}
;
_.setSelected = function(logicalRow, select){
var row;
if (this.this$01.lastSelected == -1) {
row = $getRow(this.grid_0.dataSource, logicalRow);
select?$select_1(this.grid_0, row):$deselect(this.grid_0, row);
this.this$01.lastSelected = logicalRow;
}
}
;
var Lcom_vaadin_elements_grid_selection_IndexBasedSelectionModelMulti$1_2_classLit = createForClass('com.vaadin.elements.grid.selection', 'IndexBasedSelectionModelMulti/1', 445);
function $deselect_1(this$static, index_0, skipOwnEvents){
if (this$static.selectedRow == index_0) {
this$static.selectedRow = -1;
skipOwnEvents = unsafeCast(checkNotNull(castToBoolean($val_2(($clinit_JSValidate() , Boolean_0), ($clinit_Boolean() , skipOwnEvents?TRUE_0:FALSE_0), (null , FALSE_0), (null , FALSE_0)))));
skipOwnEvents || $fireEvent_0(this$static.grid_0, new SelectionEvent_0(this$static.grid_0, null, null));
return true;
}
return false;
}
function $select_3(this$static, index_0, skipOwnEvents){
if (index_0 >= 0 && (!this$static.dataSizeUpdated_0 || index_0 < this$static.grid_0.dataSource.size_0)) {
this$static.selectedRow = index_0;
skipOwnEvents = unsafeCast(checkNotNull(castToBoolean($val_2(($clinit_JSValidate() , Boolean_0), ($clinit_Boolean() , skipOwnEvents?TRUE_0:FALSE_0), (null , FALSE_0), (null , FALSE_0)))));
skipOwnEvents || $fireEvent_0(this$static.grid_0, new SelectionEvent_0(this$static.grid_0, null, null));
return true;
}
return false;
}
function IndexBasedSelectionModelSingle(){
}
defineClass(212, 211, {155:1, 38:1}, IndexBasedSelectionModelSingle);
_.clear = function(){
$deselect_1(this, this.selectedRow, false);
}
;
_.dataSizeUpdated = function(newSize){
this.dataSizeUpdated_0 = true;
this.selectedRow >= newSize && (this.selectedRow = -1);
}
;
_.deselect = function(index_0, skipOwnEvents){
return $deselect_1(this, index_0, skipOwnEvents);
}
;
_.deselect_1 = function(row){
return $deselect_1(this, getRowIndexByRow(this.grid_0, row), false);
}
;
_.deselected = function(mapper, from, to){
return createJsType(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit);
}
;
_.getMode = function(){
return $clinit_IndexBasedSelectionMode() , SINGLE_0;
}
;
_.isSelected = function(row){
return this.selectedRow == getRowIndexByRow(this.grid_0, row);
}
;
_.reset_1 = function(){
this.selectedRow = -1;
$fireEvent_0(this.grid_0, new SelectionEvent_0(this.grid_0, null, null));
}
;
_.select = function(index_0, skipOwnEvents){
return $select_3(this, index_0, skipOwnEvents);
}
;
_.select_2 = function(row){
return $select_3(this, getRowIndexByRow(this.grid_0, row), false);
}
;
_.selectAll = function(){
$deselect_1(this, this.selectedRow, false);
}
;
_.selected = function(mapper, from, to){
var mappedValue, result;
result = createJsType(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit);
mapper = verifyMapper(mapper);
if (this.selectedRow != -1) {
mappedValue = jsni(mapper, 'call', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [mapper, valueOf_2(this.selectedRow)]));
mappedValue != null && runJavascriptFunction(result, 'push', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [mappedValue]));
}
return result;
}
;
_.setGrid = function(grid){
this.grid_0 = grid;
$setGrid_0(this, grid);
}
;
_.size = function(){
return this.selectedRow == -1?0:1;
}
;
_.dataSizeUpdated_0 = false;
_.selectedRow = -1;
var Lcom_vaadin_elements_grid_selection_IndexBasedSelectionModelSingle_2_classLit = createForClass('com.vaadin.elements.grid.selection', 'IndexBasedSelectionModelSingle', 212);
function getRowIndex(grid, rowHandle){
var result;
$pinHandle(rowHandle.this$01, rowHandle);
result = getRowIndexByRow(grid, rowHandle.row_0);
$unpinHandle(rowHandle.this$01, rowHandle);
return result;
}
function getRowIndexByRow(grid, row){
return $indexOf_0(grid.dataSource, row);
}
function verifyMapper(mapper){
var result;
result = mapper;
!mapper && (result = wrapFunction(new SelectionUtil$1));
return result;
}
function SelectionUtil$1(){
Function_0.call(this);
}
defineClass(530, 7, $intern_18, SelectionUtil$1);
_.f_0 = function(args){
return this.arguments_0[0];
}
;
var Lcom_vaadin_elements_grid_selection_SelectionUtil$1_2_classLit = createForClass('com.vaadin.elements.grid.selection', 'SelectionUtil/1', 530);
function $bind_0(this$static, propertyName, setter){
definePropertyAccessors_0(this$static.jsColumn, propertyName, new GridColumn$lambda$14$Type(this$static, setter), null);
}
function $contentOrNameChanged(this$static, name_0, content_0){
var staticSection;
$setHeaderCaption(this$static, name_0 == null?'':name_0);
if (content_0 == null || instanceOfString(content_0) && length_1(castToString(content_0)) == 0) {
(staticSection = this$static.gridElement.staticSection , $getHeaderCellByColumn(staticSection, $getDefaultHeader(staticSection), this$static)).content = content_0;
}
else if (instanceOfJso(content_0) && isElement_0(content_0)) {
name_0 != null?$setHeaderCaption(this$static, name_0):$setHeaderCaption(this$static, $getInnerText(castToJso(content_0)));
(staticSection = this$static.gridElement.staticSection , $getHeaderCellByColumn(staticSection, $getDefaultHeader(staticSection), this$static)).content = content_0;
}
else {
$setHeaderCaption(this$static, toString__Ljava_lang_String___devirtual$(content_0));
(staticSection = this$static.gridElement.staticSection , $getHeaderCellByColumn(staticSection, $getDefaultHeader(staticSection), this$static)).content = content_0;
}
$updateWidth(this$static.gridElement);
}
function $getNestedProperty(this$static, o, props){
var result;
result = null;
props.isEmpty()?(result = o):typeof o === 'object' && o !== null && (result = $getNestedProperty(this$static, prop_0(castToJso(o), props.get_1(0)), props.subList(1, props.size_2())));
return result;
}
function $getValue_0(this$static, dataItem){
var result, val, val0;
dataItem = extractDataItem(dataItem);
result = null;
Object(dataItem) !== dataItem?(val0 = checkNotNull(castToDouble(runJavascriptFunction(this$static.gridElement.cols_0, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [this$static.jsColumn])))) , round_int(val0) == 0 && (result = dataItem)):isArray_0(castToJso(dataItem))?(result = prop_0(castToJso(dataItem), valueOf_2((val = checkNotNull(castToDouble(runJavascriptFunction(this$static.gridElement.cols_0, 'indexOf', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [this$static.jsColumn])))) , round_int(val))))):(result = $getNestedProperty(this$static, dataItem, new Arrays$ArrayList($split(this$static.jsColumn.name, '\\.'))));
return result;
}
function $lambda$1(this$static, v_0){
$contentOrNameChanged(this$static, this$static.jsColumn.name, v_0);
}
function $lambda$10(this$static, v_0){
return $setRenderer(this$static, new GridColumn$lambda$15$Type(this$static, v_0));
}
function $lambda$11(this$static, v_0){
return $setMinimumWidth(this$static, isUndefinedOrNull(v_0)?10:checkNotNull(castToDouble(v_0)));
}
function $lambda$12(this$static, v_0){
return $setMaximumWidth(this$static, isUndefinedOrNull(v_0)?-1:checkNotNull(castToDouble(v_0)));
}
function $lambda$13(this$static, v_0){
return $setWidth_1(this$static, isUndefinedOrNull(v_0)?-1:checkNotNull(castToDouble(v_0)));
}
function $lambda$14(this$static, setter_1, v_1){
setter_1.setValue(v_1);
$updateWidth(this$static.gridElement);
}
function $lambda$15(this$static, v_1, cell_1){
var jsCell;
jsCell = create_3(cell_1, this$static.gridElement.container);
runJavascriptFunction(castToJso(v_1), 'call', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [castToJso(v_1), jsCell]));
}
function $lambda$2_0(this$static){
var staticSection;
return (staticSection = this$static.gridElement.staticSection , $getHeaderCellByColumn(staticSection, $getDefaultHeader(staticSection), this$static)).content;
}
function $lambda$3_0(this$static, v_0){
$setHidden(this$static, unsafeCast(checkNotNull(castToBoolean(v_0))));
$updateWidth(this$static.gridElement);
}
function $lambda$4(this$static, v_0){
var staticSection;
$contentOrNameChanged(this$static, castToString(v_0), (staticSection = this$static.gridElement.staticSection , $getHeaderCellByColumn(staticSection, $getDefaultHeader(staticSection), this$static)).content);
}
function $lambda$5_0(this$static, v_0){
$setHidingToggleCaption(this$static, v_0 == null?null:toString__Ljava_lang_String___devirtual$(v_0));
}
function GridColumn(jsColumn, gridElement){
$setRenderer(this, new Grid$Column$DefaultTextRenderer(this));
this.jsColumn = jsColumn;
this.gridElement = gridElement;
$setRenderer(this, new GridColumn$lambda$0$Type(gridElement));
}
function lambda$0_0(gridElement_0, cell_1, data_2){
var content_0, element, wrapper;
element = cell_1.cell.element;
content_0 = isUndefinedOrNull(data_2)?'':toString__Ljava_lang_String___devirtual$(data_2);
if (instanceOf(gridElement_0.grid_0.dataSource, 170) && !!$getFirstChildElement($getElement(new HTML(content_0)))) {
element.innerHTML = content_0 || '';
}
else {
wrapper = $getFirstChildElement_0(($clinit_DOMImpl() , element));
if (!wrapper || !wrapper['iswrapper']) {
wrapper = ($clinit_DOM() , $createSpanElement($doc));
wrapper.style['overflow'] = ($clinit_Style$Overflow() , 'hidden');
wrapper.style['textOverflow'] = ($clinit_Style$TextOverflow() , 'ellipsis');
wrapper['iswrapper'] = true;
$removeAllChildren(element);
element.appendChild(wrapper);
}
impl_0.setInnerText(wrapper, content_0);
}
}
defineClass(51, 21, {21:1, 51:1}, GridColumn);
_.getValue = function(dataItem){
return $getValue_0(this, dataItem);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn', 51);
function GridColumn$lambda$0$Type(gridElement_0){
this.gridElement_0 = gridElement_0;
}
defineClass(362, 1, {}, GridColumn$lambda$0$Type);
_.render = function(arg0, arg1){
lambda$0_0(this.gridElement_0, arg0, arg1);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$0$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$0$Type', 362);
function GridColumn$lambda$1$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(363, 1, {}, GridColumn$lambda$1$Type);
_.setValue = function(arg0){
$lambda$1(this.$$outer_0, arg0);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$1$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$1$Type', 363);
function GridColumn$lambda$10$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(374, 1, {}, GridColumn$lambda$10$Type);
_.setValue = function(arg0){
$lambda$10(this.$$outer_0, arg0);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$10$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$10$Type', 374);
function GridColumn$lambda$11$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(375, 1, {}, GridColumn$lambda$11$Type);
_.setValue = function(arg0){
$lambda$11(this.$$outer_0, arg0);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$11$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$11$Type', 375);
function GridColumn$lambda$12$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(376, 1, {}, GridColumn$lambda$12$Type);
_.setValue = function(arg0){
$lambda$12(this.$$outer_0, arg0);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$12$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$12$Type', 376);
function GridColumn$lambda$13$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(377, 1, {}, GridColumn$lambda$13$Type);
_.setValue = function(arg0){
$lambda$13(this.$$outer_0, arg0);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$13$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$13$Type', 377);
function GridColumn$lambda$14$Type($$outer_0, setter_1){
this.$$outer_0 = $$outer_0;
this.setter_1 = setter_1;
}
defineClass(378, 1, {}, GridColumn$lambda$14$Type);
_.setValue = function(arg0){
$lambda$14(this.$$outer_0, this.setter_1, arg0);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$14$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$14$Type', 378);
function GridColumn$lambda$15$Type($$outer_0, v_1){
this.$$outer_0 = $$outer_0;
this.v_1 = v_1;
}
defineClass(373, 1, {}, GridColumn$lambda$15$Type);
_.render = function(arg0, arg1){
$lambda$15(this.$$outer_0, this.v_1, arg0);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$15$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$15$Type', 373);
function GridColumn$lambda$2$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(364, 1, {}, GridColumn$lambda$2$Type);
_.getValue_0 = function(){
return $lambda$2_0(this.$$outer_0);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$2$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$2$Type', 364);
function GridColumn$lambda$3$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(365, 1, {}, GridColumn$lambda$3$Type);
_.setValue = function(arg0){
$lambda$3_0(this.$$outer_0, arg0);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$3$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$3$Type', 365);
function GridColumn$lambda$4$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(367, 1, {}, GridColumn$lambda$4$Type);
_.setValue = function(arg0){
$lambda$4(this.$$outer_0, arg0);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$4$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$4$Type', 367);
function GridColumn$lambda$5$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(368, 1, {}, GridColumn$lambda$5$Type);
_.setValue = function(arg0){
$lambda$5_0(this.$$outer_0, arg0);
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$5$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$5$Type', 368);
function GridColumn$lambda$6$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(369, 1, {}, GridColumn$lambda$6$Type);
_.setValue = function(arg0){
$setExpandRatio(this.$$outer_0, $intValue(castToDouble(arg0)));
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$6$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$6$Type', 369);
function GridColumn$lambda$7$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(370, 1, {}, GridColumn$lambda$7$Type);
_.setValue = function(arg0){
$setSortable(this.$$outer_0, unsafeCast(checkNotNull(castToBoolean(arg0))));
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$7$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$7$Type', 370);
function GridColumn$lambda$8$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(371, 1, {}, GridColumn$lambda$8$Type);
_.setValue = function(arg0){
$setHidable(this.$$outer_0, unsafeCast(checkNotNull(castToBoolean(arg0))));
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$8$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$8$Type', 371);
function GridColumn$lambda$9$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(372, 1, {}, GridColumn$lambda$9$Type);
_.setValue = function(arg0){
$setEditable(this.$$outer_0, !unsafeCast(checkNotNull(castToBoolean(arg0))));
}
;
var Lcom_vaadin_elements_grid_table_GridColumn$lambda$9$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridColumn/lambda$9$Type', 372);
function $configureColumns(this$static){
var $ths, i_0, max_0;
for (i_0 = 0 , max_0 = 0; i_0 < this$static.numberHeaderRows; i_0++) {
$ths = $children_0($($get_0(this$static.$head_tr, i_0)), stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['th, td']));
max_0 = max_2(max_0, $ths.elements_0.length);
($ths.elements_0.length == max_0 || $filter($ths, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['[sortable]'])).elements_0.length != 0) && (this$static.defaultHeaderRow = i_0);
}
this$static.$cols.elements_0.length == 0 || $configureColumnsFromDom(this$static, $children_0(this$static.$cols, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['col'])));
}
function $configureColumnsFromDom(this$static, columns){
var $th, column, direction, headerHtml, i_0, jsColumns, jsSortOrder, maxWidth, minWidth, sortOrders, width_0;
jsColumns = this$static.gridElement.cols_0;
jsColumns.length = 0;
this$static.numberColumns = columns.elements_0.length;
sortOrders = createJsType(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit);
for (i_0 = 0; i_0 < this$static.numberColumns; i_0++) {
$th = $($get_0(columns, i_0));
column = castToAllowJso(createJsType(Lcom_vaadin_elements_grid_config_JSColumn_2_classLit), 193);
runJavascriptFunction(jsColumns, 'push', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [column]));
column.sortable = unsafeCast(checkNotNull(castToBoolean($attr_1(($clinit_JSValidate() , Boolean_0), $th, 'sortable'))));
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), new GridLightDomTable$lambda$0$Type(column, $th));
column.hidden = unsafeCast(checkNotNull(castToBoolean($attr_1(Boolean_0, $th, 'hidden'))));
column.flex = castTo($attr_2(Integer, $th, 'flex', valueOf_2(1), valueOf_2(-1)), 22).value_0;
width_0 = castToDouble($attr_1(Pixel, $th, 'width'));
width_0 != null && (column.width = (checkCriticalNotNull(width_0) , width_0));
minWidth = castToDouble($attr_1(Pixel, $th, 'min-width'));
minWidth != null && (column.minWidth = (checkCriticalNotNull(minWidth) , minWidth));
maxWidth = castToDouble($attr_1(Pixel, $th, 'max-width'));
maxWidth != null && (column.maxWidth = (checkCriticalNotNull(maxWidth) , maxWidth));
column.name = castToString($attr_1(String_0, $th, 'name'));
direction = castToString($attr_1(String_0, $th, 'sort-direction'));
if (($clinit_String() , direction.length) != 0) {
jsSortOrder = castToAllowJso(createJsType(Lcom_vaadin_elements_grid_config_JSSortOrder_2_classLit), 679);
jsSortOrder.direction = direction;
jsSortOrder.column = i_0;
runJavascriptFunction(sortOrders, 'push', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_0, 1, 4, [jsSortOrder]));
}
column.hidingToggleText = castToString($attr_2(String_0, $th, 'hiding-toggle-text', null, null));
headerHtml = castToString($attr_2(String_0, $th, 'header-text', $th.elements_0.length == 0?'':$getInnerHTML($get_0($th, 0)), column.name));
headerHtml != null && (column.headerContent = headerHtml);
}
$setColumns(this$static.gridElement, jsColumns);
sortOrders.length == 0 || $then_0(this$static.gridElement, wrapFunction(new GridLightDomTable$2(this$static, sortOrders)));
}
function $configureHeadersFooters(this$static, isHeader){
var $rows, $th, $ths, $tr, cell, className, colIndex, colspan, dataColumns, i_0, i0, i1, j, js, n, nrows, row;
n = isHeader?this$static.grid_0.header.rows_0.array.length:this$static.grid_0.footer.rows_0.array.length;
nrows = isHeader?this$static.numberHeaderRows:this$static.numberFooterRows;
$rows = isHeader?this$static.$head_tr:this$static.$foot_tr;
if (n != nrows) {
for (i0 = nrows; i0 < n; i0++) {
isHeader?$removeHeaderRow(this$static.grid_0, i0):$removeFooterRow(this$static.grid_0, i0);
}
for (i1 = n; i1 < nrows; i1++) {
isHeader?$addHeaderRowAt(this$static.grid_0, i1):$addFooterRowAt(this$static.grid_0, i1);
}
}
for (i_0 = 0; i_0 < nrows; i_0++) {
row = isHeader?$getHeaderRow(this$static.grid_0, i_0):$getFooterRow(this$static.grid_0, i_0);
dataColumns = $getDataColumns(this$static.gridElement);
$tr = $($get_0($rows, i_0));
$ths = $children_0($tr, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['th, td']));
className = castToString($attr_1(($clinit_JSValidate() , String_0), $tr, 'class'));
($clinit_String() , className.length) == 0 || (row.styleName = className , row.section.requestSectionRefresh());
for (j = 0 , colIndex = 0; j < $ths.elements_0.length && j < this$static.numberColumns; j++) {
$th = $($get_0($ths, j));
cell = $getCell_0(row, castTo(dataColumns.get_1(colIndex), 21));
js = $obtainJSStaticCell(this$static.gridElement.staticSection, cell);
className = castToString($attr_1(String_0, $th, 'class'));
className.length == 0 || (js.className = className);
colspan = castTo($attr_2(Integer, $th, 'colspan', valueOf_2(1), valueOf_2(1)), 22).value_0;
$schedule(new GridLightDomTable$3(js, $th, colspan), 0);
colIndex += colspan;
}
}
isHeader && $setDefaultHeader(this$static.gridElement.staticSection, this$static.defaultHeaderRow);
}
function $onMutation(this$static){
$parseDom(this$static);
this$static.gridElement.grid_0.dataSource.refresh();
}
function $parseDom(this$static){
var txt;
this$static.$thead = $find(this$static.$light, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['thead']));
this$static.$tfoot = $find(this$static.$light, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['tfoot']));
this$static.$cols = $find(this$static.$light, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['colgroup']));
txt = $toString_0(this$static.$thead) + $toString_0(this$static.$cols) + $toString_0(this$static.$tfoot);
if (!$equals_2(txt, this$static.lastConfigString)) {
this$static.lastConfigString = txt;
this$static.$head_tr = $find(this$static.$thead, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['tr']));
this$static.$foot_tr = $find(this$static.$tfoot, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_0, 2, 5, ['tr']));
this$static.numberHeaderRows = this$static.$head_tr.elements_0.length;
this$static.numberFooterRows = this$static.$foot_tr.elements_0.length;
$configureColumns(this$static);
if (this$static.numberColumns > 0) {
this$static.numberHeaderRows > 0 && $configureHeadersFooters(this$static, true);
this$static.numberFooterRows > 0 && $configureHeadersFooters(this$static, false);
}
}
$schedule(new GridLightDomTable$1(this$static), 0);
$schedule(this$static.gridElement.sizeUpdater, 50);
}
function GridLightDomTable(tableElement, gridElement){
this.gridElement = gridElement;
this.grid_0 = gridElement.grid_0;
this.$light = $(tableElement);
$parseDom(this);
$mutation_0(castTo($as(this.$light, ($clinit_Observe() , Observe)), 162), $subtree($childList($attributes((!jsonFactory && (jsonFactory = new JsonFactory_JsonBuilder) , castTo($create(Lcom_google_gwt_query_client_plugins_observe_Observe$MutationObserverInit_2_classLit), 736))))), this);
}
function lambda$0_1(column_0, $th_1){
column_0.hidable = unsafeCast(checkNotNull(castToBoolean($attr_1(($clinit_JSValidate() , Boolean_0), $th_1, 'hidable'))));
}
defineClass(168, 1, {735:1, 168:1}, GridLightDomTable);
_.defaultHeaderRow = 0;
_.lastConfigString = null;
_.numberColumns = 0;
_.numberFooterRows = 0;
_.numberHeaderRows = 0;
var Lcom_vaadin_elements_grid_table_GridLightDomTable_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridLightDomTable', 168);
function GridLightDomTable$1(this$0){
this.this$01 = this$0;
Timer.call(this);
}
defineClass(382, 75, {}, GridLightDomTable$1);
_.run_0 = function(){
this.this$01.$thead.elements_0.length == 0 || $setHeaderVisible(this.this$01.grid_0, !unsafeCast(checkNotNull(castToBoolean($attr_1(($clinit_JSValidate() , Boolean_0), this.this$01.$thead, 'hidden')))));
this.this$01.$tfoot.elements_0.length == 0 || $setFooterVisible(this.this$01.grid_0, !unsafeCast(checkNotNull(castToBoolean($attr_1(($clinit_JSValidate() , Boolean_0), this.this$01.$tfoot, 'hidden')))));
}
;
var Lcom_vaadin_elements_grid_table_GridLightDomTable$1_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridLightDomTable/1', 382);
function GridLightDomTable$2(this$0, val$sortOrders){
this.this$01 = this$0;
this.val$sortOrders2 = val$sortOrders;
Function_0.call(this);
}
defineClass(384, 7, $intern_18, GridLightDomTable$2);
_.f = function(){
prop_1(this.this$01.gridElement.container, this.val$sortOrders2);
}
;
var Lcom_vaadin_elements_grid_table_GridLightDomTable$2_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridLightDomTable/2', 384);
function GridLightDomTable$3(val$js, val$$th, val$colspan){
this.val$js2 = val$js;
this.val$$th3 = val$$th;
this.val$colspan4 = val$colspan;
Timer.call(this);
}
defineClass(385, 75, {}, GridLightDomTable$3);
_.run_0 = function(){
this.val$js2.content = $getElement(new HTML($html(this.val$$th3)));
this.val$js2.colspan = this.val$colspan4;
}
;
_.val$colspan4 = 0;
var Lcom_vaadin_elements_grid_table_GridLightDomTable$3_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridLightDomTable/3', 385);
function GridLightDomTable$lambda$0$Type(column_0, $th_1){
this.column_0 = column_0;
this.$th_1 = $th_1;
}
defineClass(383, 1, {}, GridLightDomTable$lambda$0$Type);
_.execute_1 = function(){
lambda$0_1(this.column_0, this.$th_1);
}
;
var Lcom_vaadin_elements_grid_table_GridLightDomTable$lambda$0$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridLightDomTable/lambda$0$Type', 383);
function $bind_1(this$static, cell, staticCell, propertyName, setter){
definePropertyAccessors_0(cell, propertyName, new GridStaticSection$lambda$4$Type(this$static, setter, staticCell), null);
}
function $getColumnByDefaultHeaderCell(this$static, cell){
var col, col$iterator, result, staticSection;
result = null;
for (col$iterator = $getDataColumns(this$static.gridElement).iterator(); col$iterator.hasNext_0();) {
col = castTo(col$iterator.next_1(), 51);
staticSection = col.gridElement.staticSection;
if ($getHeaderCellByColumn(staticSection, $getDefaultHeader(staticSection), col) == cell) {
result = col;
break;
}
}
return result;
}
function $getDefaultHeader(this$static){
var result, rowIndex;
result = 0;
for (rowIndex = 0; rowIndex < this$static.grid_0.header.rows_0.array.length; rowIndex++) {
if ($getHeaderRow(this$static.grid_0, rowIndex).isDefault) {
result = rowIndex;
break;
}
}
return result;
}
function $getHeaderCellByColumn(this$static, rowIndex, column){
var cell;
cell = $getCell_0($getHeaderRow(this$static.grid_0, rowIndex), column);
return $obtainJSStaticCell(this$static, cell);
}
function $getInteger(value_0, defaultValue){
return value_0 != null?__parseAndValidateInt(($clinit_String() , value_0 == null?'null':toString__Ljava_lang_String___devirtual$(value_0))):defaultValue;
}
function $lambda$2_1(this$static, cell_1, jsCell_2, v_2){
if (v_2 == null) {
$setHtml(cell_1, null);
$scheduleDeferred_0(($clinit_SchedulerImpl() , INSTANCE), new GridStaticSection$lambda$3$Type(this$static, jsCell_2));
}
else
Object(v_2) !== v_2 || instanceOf(v_2, 58)?$setHtml(cell_1, ($clinit_String() , "<span style='overflow: hidden;text-overflow: ellipsis;'>" + (v_2 == null?'null':toString__Ljava_lang_String___devirtual$(v_2)) + '<\/span>')):isElement_0(v_2) && $setWidget_0(cell_1, new GridStaticSection$1(castToJso(v_2)));
}
function $lambda$3_1(this$static, jsCell_1){
var column, name_0;
column = $getColumnByDefaultHeaderCell(this$static, jsCell_1);
if (column) {
name_0 = column.jsColumn.name;
$setHeaderCaption(column, '');
$setHeaderCaption(column, name_0 == null?'':name_0);
}
}
function $lambda$4_0(this$static, setter_1, staticCell_2, v_2){
setter_1.setValue(v_2);
$updateWidth(this$static.gridElement);
$refreshStaticSection(this$static.grid_0, staticCell_2);
}
function $obtainJSStaticCell(this$static, cell){
var jsCell;
if (!$containsKey(this$static.cells_0, cell)) {
jsCell = castToAllowJso(createJsType(Lcom_vaadin_elements_grid_config_JSStaticCell_2_classLit), 747);
jsCell.colspan = cell.colspan_0;
cell.type_0 == ($clinit_GridStaticCellType() , WIDGET)?(jsCell.content = $getElement($getWidget_1(cell))):cell.type_0 == TEXT?(jsCell.content = $equals_2('', $getText_0(cell))?null:$getText_0(cell)):cell.type_0 == HTML_0 && (jsCell.content = $getHtml(cell));
$bind_1(this$static, jsCell, cell, 'colspan', new GridStaticSection$lambda$0$Type(cell));
$bind_1(this$static, jsCell, cell, 'className', new GridStaticSection$lambda$1$Type(cell));
$bind_1(this$static, jsCell, cell, 'content', new GridStaticSection$lambda$2$Type(this$static, cell, jsCell));
$put_2(this$static.cells_0, cell, jsCell);
}
return castToAllowJso($get_5(this$static.cells_0, cell), 747);
}
function $setDefaultHeader(this$static, rowIndex){
$setDefaultHeaderRow(this$static.grid_0, $getHeaderRow(this$static.grid_0, rowIndex));
this$static.grid_0.refreshHeader();
}
function $setStaticRowCellContent(this$static, row, cellContent){
var cell, column, dataColumns, i_0;
dataColumns = $getDataColumns(this$static.gridElement);
for (i_0 = 0; i_0 < dataColumns.size_2(); i_0++) {
column = castTo(dataColumns.get_1(i_0), 51);
if (i_0 < cellContent.length) {
cell = $getCell_0(row, column);
$obtainJSStaticCell(this$static, cell).content = prop_0(cellContent, valueOf_2(i_0));
}
}
}
function GridStaticSection(gridElement){
this.cells_0 = new HashMap;
this.gridElement = gridElement;
this.grid_0 = gridElement.grid_0;
}
defineClass(353, 1, {}, GridStaticSection);
_.addFooter = function(rowIndex, cellContent){
var index_0, row;
index_0 = $getInteger(rowIndex, this.grid_0.footer.rows_0.array.length);
row = $addFooterRowAt(this.grid_0, index_0);
!!cellContent && $setStaticRowCellContent(this, row, cellContent);
this.grid_0.refreshFooter();
$updateHeight(this.gridElement);
}
;
_.addHeader = function(rowIndex, cellContent){
var index_0, row;
index_0 = $getInteger(rowIndex, this.grid_0.header.rows_0.array.length);
row = $addHeaderRowAt(this.grid_0, index_0);
!!cellContent && $setStaticRowCellContent(this, row, cellContent);
this.grid_0.refreshHeader();
$updateHeight(this.gridElement);
}
;
_.getDefaultHeader = function(){
return $getDefaultHeader(this);
}
;
_.getFooterCell = function(rowIndex, columnId){
var cell, column;
column = castTo($getDataColumns(this.gridElement).get_1($getColumnIndexByIndexOrName(this.gridElement, columnId)), 51);
cell = $getCell_0($getFooterRow(this.grid_0, rowIndex), column);
return $obtainJSStaticCell(this, cell);
}
;
_.getFooterRowCount = function(){
return this.grid_0.footer.rows_0.array.length;
}
;
_.getHeaderCell = function(rowIndex, columnId){
var cell, column;
column = castTo($getDataColumns(this.gridElement).get_1($getColumnIndexByIndexOrName(this.gridElement, columnId)), 51);
return cell = $getCell_0($getHeaderRow(this.grid_0, rowIndex), column) , $obtainJSStaticCell(this, cell);
}
;
_.getHeaderRowCount = function(){
return this.grid_0.header.rows_0.array.length;
}
;
_.isFooterHidden = function(){
return !this.grid_0.footer.visible;
}
;
_.isHeaderHidden = function(){
return !this.grid_0.header.visible;
}
;
_.removeFooter = function(rowIndex){
$removeFooterRow(this.grid_0, rowIndex);
this.grid_0.refreshFooter();
$updateHeight(this.gridElement);
}
;
_.removeHeader = function(rowIndex){
$removeHeaderRow(this.grid_0, rowIndex);
this.grid_0.refreshHeader();
$updateHeight(this.gridElement);
}
;
_.setDefaultHeader = function(rowIndex){
$setDefaultHeader(this, rowIndex);
}
;
_.setFooterHidden = function(hidden){
$setFooterVisible(this.grid_0, !hidden);
this.grid_0.refreshFooter();
$updateHeight(this.gridElement);
}
;
_.setFooterRowClassName = function(rowIndex, styleName){
$setStyleName_2($getFooterRow(this.grid_0, rowIndex), styleName);
this.grid_0.refreshFooter();
}
;
_.setHeaderHidden = function(hidden){
$setHeaderVisible(this.grid_0, !hidden);
this.grid_0.refreshHeader();
$updateHeight(this.gridElement);
}
;
_.setHeaderRowClassName = function(rowIndex, styleName){
$setStyleName_2($getHeaderRow(this.grid_0, rowIndex), styleName);
this.grid_0.refreshHeader();
}
;
var Lcom_vaadin_elements_grid_table_GridStaticSection_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridStaticSection', 353);
function GridStaticSection$1($anonymous0){
$clinit_UIObject();
SimplePanel.call(this, $anonymous0);
}
defineClass(356, 161, $intern_38, GridStaticSection$1);
var Lcom_vaadin_elements_grid_table_GridStaticSection$1_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridStaticSection/1', 356);
function GridStaticSection$lambda$0$Type(cell_0){
this.cell_0 = cell_0;
}
defineClass(354, 1, {}, GridStaticSection$lambda$0$Type);
_.setValue = function(arg0){
$setColspan(this.cell_0, round_int(checkNotNull(castToDouble(arg0))));
}
;
var Lcom_vaadin_elements_grid_table_GridStaticSection$lambda$0$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridStaticSection/lambda$0$Type', 354);
function GridStaticSection$lambda$1$Type(cell_0){
this.cell_0 = cell_0;
}
defineClass(355, 1, {}, GridStaticSection$lambda$1$Type);
_.setValue = function(arg0){
$setStyleName_1(this.cell_0, castToString(arg0));
}
;
var Lcom_vaadin_elements_grid_table_GridStaticSection$lambda$1$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridStaticSection/lambda$1$Type', 355);
function GridStaticSection$lambda$2$Type($$outer_0, cell_1, jsCell_2){
this.$$outer_0 = $$outer_0;
this.cell_1 = cell_1;
this.jsCell_2 = jsCell_2;
}
defineClass(357, 1, {}, GridStaticSection$lambda$2$Type);
_.setValue = function(arg0){
$lambda$2_1(this.$$outer_0, this.cell_1, this.jsCell_2, arg0);
}
;
var Lcom_vaadin_elements_grid_table_GridStaticSection$lambda$2$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridStaticSection/lambda$2$Type', 357);
function GridStaticSection$lambda$3$Type($$outer_0, jsCell_1){
this.$$outer_0 = $$outer_0;
this.jsCell_1 = jsCell_1;
}
defineClass(358, 1, {}, GridStaticSection$lambda$3$Type);
_.execute_1 = function(){
$lambda$3_1(this.$$outer_0, this.jsCell_1);
}
;
var Lcom_vaadin_elements_grid_table_GridStaticSection$lambda$3$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridStaticSection/lambda$3$Type', 358);
function GridStaticSection$lambda$4$Type($$outer_0, setter_1, staticCell_2){
this.$$outer_0 = $$outer_0;
this.setter_1 = setter_1;
this.staticCell_2 = staticCell_2;
}
defineClass(359, 1, {}, GridStaticSection$lambda$4$Type);
_.setValue = function(arg0){
$lambda$4_0(this.$$outer_0, this.setter_1, this.staticCell_2, arg0);
}
;
var Lcom_vaadin_elements_grid_table_GridStaticSection$lambda$4$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'GridStaticSection/lambda$4$Type', 359);
function com_vaadin_elements_grid_table_GridColumn$$__$$com_vaadin_elements_common_js_JS$Getter$$__$$instance$$com_vaadin_client_widgets_Grid$Column$$isHidden__Z$Type($$outer_0){
this.$$outer_0 = $$outer_0;
}
defineClass(366, 1, {}, com_vaadin_elements_grid_table_GridColumn$$__$$com_vaadin_elements_common_js_JS$Getter$$__$$instance$$com_vaadin_client_widgets_Grid$Column$$isHidden__Z$Type);
_.getValue_0 = function(){
return $clinit_Boolean() , this.$$outer_0.hidden_0?TRUE_0:FALSE_0;
}
;
var Lcom_vaadin_elements_grid_table_com_1vaadin_1elements_1grid_1table_1GridColumn$$_1_1$$com_1vaadin_1elements_1common_1js_1JS$Getter$$_1_1$$instance$$com_1vaadin_1client_1widgets_1Grid$Column$$isHidden_1_1Z$Type_2_classLit = createForClass('com.vaadin.elements.grid.table', 'Grid/Column/lements_grid_table_GridColumn$$__$$com_vaadin_elements_common_js_JS$Getter$$__$$instance$$com_vaadin_client_widgets_Grid$Column$$isHidden__Z$Type', 366);
function $parseAndroidVersion(this$static, userAgent){
var osVersionString, parts;
if (($clinit_String() , userAgent.indexOf('android')) == -1) {
return;
}
osVersionString = $safeSubstring(userAgent, userAgent.indexOf('android ') + 8, userAgent.length);
osVersionString = $safeSubstring(osVersionString, 0, osVersionString.indexOf(';'));
parts = $split(osVersionString, '\\.');
$parseOsVersion(this$static, parts);
}
function $parseIOSVersion(this$static, userAgent){
var osVersionString, parts;
if (($clinit_String() , userAgent.indexOf('os ')) == -1 || userAgent.indexOf(' like mac') == -1) {
return;
}
osVersionString = $safeSubstring(userAgent, userAgent.indexOf('os ') + 3, userAgent.indexOf(' like mac'));
parts = $split(osVersionString, '_');
$parseOsVersion(this$static, parts);
}
function $parseOsVersion(this$static, parts){
this$static.osMajorVersion = -1;
this$static.osMinorVersion = -1;
if (parts.length >= 1) {
try {
this$static.osMajorVersion = __parseAndValidateInt(parts[0]);
}
catch ($e0) {
$e0 = wrap_0($e0);
if (!instanceOf($e0, 16))
throw unwrap($e0);
}
}
if (parts.length >= 2) {
try {
this$static.osMinorVersion = __parseAndValidateInt(parts[1]);
}
catch ($e1) {
$e1 = wrap_0($e1);
if (!instanceOf($e1, 16))
throw unwrap($e1);
}
if (this$static.osMinorVersion == -1 && ($clinit_String() , parts[1].indexOf('-')) != -1) {
try {
this$static.osMinorVersion = __parseAndValidateInt($substring_0(parts[1], 0, indexOf(parts[1], fromCodePoint(45))));
}
catch ($e2) {
$e2 = wrap_0($e2);
if (!instanceOf($e2, 16))
throw unwrap($e2);
}
}
}
}
function $parseVersionString(this$static, versionString){
var idx, idx2;
idx = indexOf(versionString, fromCodePoint(46));
idx < 0 && (idx = ($clinit_String() , versionString.length));
this$static.browserMajorVersion = __parseAndValidateInt($safeSubstring(versionString, 0, idx));
idx2 = indexOf_0(versionString, fromCodePoint(46), idx + 1);
idx2 < 0 && (idx2 = ($clinit_String() , versionString.length));
try {
this$static.browserMinorVersion = __parseAndValidateInt($replaceAll_0($safeSubstring(versionString, idx + 1, idx2), '[^0-9].*', ''));
}
catch ($e0) {
$e0 = wrap_0($e0);
if (!instanceOf($e0, 95))
throw unwrap($e0);
}
}
function $safeSubstring(string, beginIndex, endIndex){
beginIndex < 0 && (beginIndex = 0);
(endIndex < 0 || endIndex > ($clinit_String() , string.length)) && (endIndex = ($clinit_String() , string.length));
return $clinit_String() , string.substr(beginIndex, endIndex - beginIndex);
}
function $setIEMode(this$static, documentMode){
this$static.browserMajorVersion = documentMode;
this$static.browserMinorVersion = 0;
}
function VBrowserDetails(userAgent){
var i_0, ieVersionString, rvPos, tmp, tridentPos;
userAgent = ($clinit_String() , userAgent.toLowerCase());
this.isGecko = userAgent.indexOf('gecko') != -1 && userAgent.indexOf('webkit') == -1 && userAgent.indexOf('trident/') == -1;
userAgent.indexOf(' presto/') != -1;
this.isTrident = userAgent.indexOf('trident/') != -1;
this.isWebKit = !this.isTrident && userAgent.indexOf('applewebkit') != -1;
this.isChrome = userAgent.indexOf(' chrome/') != -1;
this.isOpera = userAgent.indexOf('opera') != -1;
this.isIE = userAgent.indexOf('msie') != -1 && !this.isOpera && userAgent.indexOf('webtv') == -1;
this.isIE = this.isIE || this.isTrident;
this.isSafari = !this.isChrome && !this.isIE && userAgent.indexOf('safari') != -1;
this.isFirefox = userAgent.indexOf(' firefox/') != -1;
this.isPhantomJS = userAgent.indexOf('phantomjs/') != -1;
if (userAgent.indexOf(' edge/') != -1) {
this.isEdge = true;
this.isChrome = false;
this.isOpera = false;
this.isIE = false;
this.isSafari = false;
this.isFirefox = false;
this.isWebKit = false;
this.isGecko = false;
}
userAgent.indexOf('chromeframe') != -1;
try {
if (this.isGecko) {
rvPos = userAgent.indexOf('rv:');
if (rvPos >= 0) {
tmp = __substr(userAgent, rvPos + 3, userAgent.length - (rvPos + 3));
tmp = $replaceFirst(tmp, '(\\.[0-9]+).+', '$1');
parseFloat_0(tmp);
}
}
else if (this.isWebKit) {
tmp = $substring(userAgent, userAgent.indexOf('webkit/') + 7);
tmp = $replaceFirst(tmp, '([0-9]+)[^0-9].+', '$1');
parseFloat_0(tmp);
}
else if (this.isIE) {
tridentPos = userAgent.indexOf('trident/');
if (tridentPos >= 0) {
tmp = __substr(userAgent, tridentPos + 8, userAgent.length - (tridentPos + 8));
tmp = $replaceFirst(tmp, '([0-9]+\\.[0-9]+).*', '$1');
parseFloat_0(tmp);
}
}
}
catch ($e0) {
$e0 = wrap_0($e0);
if (instanceOf($e0, 16)) {
$clinit_System();
}
else
throw unwrap($e0);
}
try {
if (this.isIE) {
if (userAgent.indexOf('msie') == -1) {
rvPos = userAgent.indexOf('rv:');
if (rvPos >= 0) {
tmp = __substr(userAgent, rvPos + 3, userAgent.length - (rvPos + 3));
tmp = $replaceFirst(tmp, '(\\.[0-9]+).+', '$1');
$parseVersionString(this, tmp);
}
}
else {
ieVersionString = $substring(userAgent, userAgent.indexOf('msie ') + 5);
ieVersionString = $safeSubstring(ieVersionString, 0, ieVersionString.indexOf(';'));
$parseVersionString(this, ieVersionString);
}
}
else if (this.isFirefox) {
i_0 = userAgent.indexOf(' firefox/') + 9;
$parseVersionString(this, $safeSubstring(userAgent, i_0, i_0 + 5));
}
else if (this.isChrome) {
i_0 = userAgent.indexOf(' chrome/') + 8;
$parseVersionString(this, $safeSubstring(userAgent, i_0, i_0 + 5));
}
else if (this.isSafari) {
i_0 = userAgent.indexOf(' version/') + 9;
$parseVersionString(this, $safeSubstring(userAgent, i_0, i_0 + 5));
}
else if (this.isOpera) {
i_0 = userAgent.indexOf(' version/');
i_0 != -1?(i_0 += 9):(i_0 = userAgent.indexOf('opera/') + 6);
$parseVersionString(this, $safeSubstring(userAgent, i_0, i_0 + 5));
}
else if (this.isEdge) {
i_0 = userAgent.indexOf(' edge/') + 6;
$parseVersionString(this, $safeSubstring(userAgent, i_0, i_0 + 8));
}
}
catch ($e1) {
$e1 = wrap_0($e1);
if (instanceOf($e1, 16)) {
$clinit_System();
}
else
throw unwrap($e1);
}
if (userAgent.indexOf('windows ') != -1) {
this.os = 1;
userAgent.indexOf('windows phone') != -1;
}
else if (userAgent.indexOf('android') != -1) {
this.os = 5;
$parseAndroidVersion(this, userAgent);
}
else if (userAgent.indexOf('linux') != -1) {
this.os = 3;
}
else if (userAgent.indexOf('macintosh') != -1 || userAgent.indexOf('mac osx') != -1 || userAgent.indexOf('mac os x') != -1) {
this.isIPad = userAgent.indexOf('ipad') != -1;
this.isIPhone = userAgent.indexOf('iphone') != -1;
if (this.isIPad || userAgent.indexOf('ipod') != -1 || this.isIPhone) {
this.os = 4;
$parseIOSVersion(this, userAgent);
}
else {
this.os = 2;
}
}
}
defineClass(520, 1, {3:1}, VBrowserDetails);
_.browserMajorVersion = -1;
_.browserMinorVersion = -1;
_.isChrome = false;
_.isEdge = false;
_.isFirefox = false;
_.isGecko = false;
_.isIE = false;
_.isIPad = false;
_.isIPhone = false;
_.isOpera = false;
_.isPhantomJS = false;
_.isSafari = false;
_.isTrident = false;
_.isWebKit = false;
_.os = 0;
_.osMajorVersion = -1;
_.osMinorVersion = -1;
var Lcom_vaadin_shared_VBrowserDetails_2_classLit = createForClass('com.vaadin.shared', 'VBrowserDetails', 520);
function $clinit_SortDirection(){
$clinit_SortDirection = emptyMethod;
ASCENDING = new SortDirection$1;
DESCENDING = new SortDirection$2;
}
function SortDirection(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_16(){
$clinit_SortDirection();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_shared_data_sort_SortDirection_2_classLit, 1), $intern_0, 79, 0, [ASCENDING, DESCENDING]);
}
defineClass(79, 5, $intern_51);
var ASCENDING, DESCENDING;
var Lcom_vaadin_shared_data_sort_SortDirection_2_classLit = createForEnum('com.vaadin.shared.data.sort', 'SortDirection', 79, values_16);
function SortDirection$1(){
SortDirection.call(this, 'ASCENDING', 0);
}
defineClass(443, 79, $intern_51, SortDirection$1);
_.getOpposite = function(){
return DESCENDING;
}
;
var Lcom_vaadin_shared_data_sort_SortDirection$1_2_classLit = createForEnum('com.vaadin.shared.data.sort', 'SortDirection/1', 443, null);
function SortDirection$2(){
SortDirection.call(this, 'DESCENDING', 1);
}
defineClass(444, 79, $intern_51, SortDirection$2);
_.getOpposite = function(){
return ASCENDING;
}
;
var Lcom_vaadin_shared_data_sort_SortDirection$2_2_classLit = createForEnum('com.vaadin.shared.data.sort', 'SortDirection/2', 444, null);
function $clinit_GridStaticCellType(){
$clinit_GridStaticCellType = emptyMethod;
TEXT = new GridStaticCellType('TEXT', 0);
HTML_0 = new GridStaticCellType('HTML', 1);
WIDGET = new GridStaticCellType('WIDGET', 2);
}
function GridStaticCellType(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function values_17(){
$clinit_GridStaticCellType();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_shared_ui_grid_GridStaticCellType_2_classLit, 1), $intern_0, 121, 0, [TEXT, HTML_0, WIDGET]);
}
defineClass(121, 5, {121:1, 3:1, 6:1, 5:1}, GridStaticCellType);
var HTML_0, TEXT, WIDGET;
var Lcom_vaadin_shared_ui_grid_GridStaticCellType_2_classLit = createForEnum('com.vaadin.shared.ui.grid', 'GridStaticCellType', 121, values_17);
function $combineWith(this$static, other){
if (this$static.start_0 > other.end || other.start_0 > this$static.end) {
throw new IllegalArgumentException('There is a gap between ' + this$static + ' and ' + other);
}
return new Range_0(min_1(this$static.start_0, other.start_0), max_2(this$static.end, other.end));
}
function $contains(this$static, integer){
return this$static.start_0 <= integer && integer < this$static.end;
}
function $equals(this$static, obj){
var other;
if (this$static === obj) {
return true;
}
if (obj == null) {
return false;
}
if (Lcom_vaadin_shared_ui_grid_Range_2_classLit != getClass__Ljava_lang_Class___devirtual$(obj)) {
return false;
}
other = castTo(obj, 19);
if (this$static.end != other.end) {
return false;
}
if (this$static.start_0 != other.start_0) {
return false;
}
return true;
}
function $intersects(this$static, other){
return this$static.start_0 < other.end && other.start_0 < this$static.end;
}
function $isEmpty(this$static){
return this$static.start_0 >= this$static.end;
}
function $isSubsetOf(this$static, other){
if (this$static.start_0 >= this$static.end && other.start_0 >= other.end) {
return true;
}
return other.start_0 <= this$static.start_0 && this$static.end <= other.end;
}
function $length_0(this$static){
return this$static.end - this$static.start_0;
}
function $offsetBy(this$static, offset){
return offset == 0?this$static:new Range_0(this$static.start_0 + offset, this$static.end + offset);
}
function $partitionWith(this$static, other){
var rangeAfter, rangeBefore, rangeInside, splitAfter, splitBefore;
splitBefore = $splitAt(this$static, other.start_0);
rangeBefore = splitBefore[0];
splitAfter = $splitAt(splitBefore[1], other.end);
rangeInside = splitAfter[0];
rangeAfter = splitAfter[1];
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_shared_ui_grid_Range_2_classLit, 1), $intern_0, 19, 0, [rangeBefore, rangeInside, rangeAfter]);
}
function $restrictTo(this$static, bounds){
var boundsWithin, endWithin, startWithin;
startWithin = $contains(bounds, this$static.start_0);
endWithin = $contains(bounds, this$static.end);
boundsWithin = this$static.start_0 < bounds.start_0 && this$static.end >= bounds.end;
return startWithin?endWithin?this$static:new Range_0(this$static.start_0, bounds.end):endWithin?new Range_0(bounds.start_0, this$static.end):boundsWithin?bounds:withLength(this$static.start_0, 0);
}
function $splitAt(this$static, integer){
return integer < this$static.start_0?stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_shared_ui_grid_Range_2_classLit, 1), $intern_0, 19, 0, [withLength(this$static.start_0, 0), this$static]):integer >= this$static.end?stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_shared_ui_grid_Range_2_classLit, 1), $intern_0, 19, 0, [this$static, withLength(this$static.end, 0)]):stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_shared_ui_grid_Range_2_classLit, 1), $intern_0, 19, 0, [new Range_0(this$static.start_0, integer), new Range_0(integer, this$static.end)]);
}
function Range_0(start_0, end){
if (start_0 > end) {
throw new IllegalArgumentException('start must not be greater than end');
}
this.start_0 = start_0;
this.end = end;
}
function withLength(start_0, length_0){
if (length_0 < 0) {
throw new IllegalArgumentException('length must not be negative');
}
return new Range_0(start_0, start_0 + length_0);
}
function withOnly(integer){
return new Range_0(integer, integer + 1);
}
defineClass(19, 1, {19:1, 3:1}, Range_0);
_.equals = function(obj){
return $equals(this, obj);
}
;
_.hashCode = function(){
var result;
result = 31 + this.end;
result = 31 * result + this.start_0;
return result;
}
;
_.toString_0 = function(){
return $ensureNamesAreInitialized(Lcom_vaadin_shared_ui_grid_Range_2_classLit) , Lcom_vaadin_shared_ui_grid_Range_2_classLit.simpleName + ' [' + this.start_0 + '..' + this.end + '[' + (this.start_0 >= this.end?' (empty)':'');
}
;
_.end = 0;
_.start_0 = 0;
var Lcom_vaadin_shared_ui_grid_Range_2_classLit = createForClass('com.vaadin.shared.ui.grid', 'Range', 19);
function $clinit_ScrollDestination(){
$clinit_ScrollDestination = emptyMethod;
ANY = new ScrollDestination('ANY', 0);
START = new ScrollDestination('START', 1);
MIDDLE = new ScrollDestination('MIDDLE', 2);
END = new ScrollDestination('END', 3);
}
function ScrollDestination(enum$name, enum$ordinal){
Enum.call(this, enum$name, enum$ordinal);
}
function valueOf_0(name_0){
$clinit_ScrollDestination();
return valueOf(($clinit_ScrollDestination$Map() , $MAP), name_0);
}
function values_18(){
$clinit_ScrollDestination();
return stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_shared_ui_grid_ScrollDestination_2_classLit, 1), $intern_0, 92, 0, [ANY, START, MIDDLE, END]);
}
defineClass(92, 5, {92:1, 3:1, 6:1, 5:1}, ScrollDestination);
var ANY, END, MIDDLE, START;
var Lcom_vaadin_shared_ui_grid_ScrollDestination_2_classLit = createForEnum('com.vaadin.shared.ui.grid', 'ScrollDestination', 92, values_18);
function $clinit_ScrollDestination$Map(){
$clinit_ScrollDestination$Map = emptyMethod;
$MAP = createValueOfMap(($clinit_ScrollDestination() , stampJavaTypeInfo(getClassLiteralForArray(Lcom_vaadin_shared_ui_grid_ScrollDestination_2_classLit, 1), $intern_0, 92, 0, [ANY, START, MIDDLE, END])));
}
var $MAP;
function equals(o1, o2){
if (o1 == null) {
return o2 == null;
}
return $equals_2(o1, o2);
}
defineClass(720, 1, {});
var Ljava_io_OutputStream_2_classLit = createForClass('java.io', 'OutputStream', 720);
defineClass(721, 720, {});
var Ljava_io_FilterOutputStream_2_classLit = createForClass('java.io', 'FilterOutputStream', 721);
function PrintStream(){
}
defineClass(235, 721, {}, PrintStream);
var Ljava_io_PrintStream_2_classLit = createForClass('java.io', 'PrintStream', 235);
function AbstractStringBuilder(string){
this.string = string;
}
defineClass(143, 1, {});
_.toString_0 = function(){
return this.string;
}
;
var Ljava_lang_AbstractStringBuilder_2_classLit = createForClass('java.lang', 'AbstractStringBuilder', 143);
function ArithmeticException(){
RuntimeException_0.call(this, 'divide by zero');
}
defineClass(548, 12, $intern_3, ArithmeticException);
var Ljava_lang_ArithmeticException_2_classLit = createForClass('java.lang', 'ArithmeticException', 548);
function ArrayStoreException(){
RuntimeException.call(this);
}
defineClass(547, 12, $intern_3, ArrayStoreException);
var Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang', 'ArrayStoreException', 547);
function $clinit_Boolean(){
$clinit_Boolean = emptyMethod;
FALSE_0 = ($clinit_Boolean() , false);
TRUE_0 = true;
}
function $compareTo_0(this$static, b){
return compare_2(unsafeCast((checkCriticalNotNull(this$static) , this$static)), unsafeCast((checkCriticalNotNull(b) , b)));
}
function $equals_0(this$static, o){
return checkCriticalNotNull(this$static) , this$static === o;
}
function compare_2(x_0, y_0){
$clinit_Boolean();
return x_0 == y_0?0:x_0?1:-1;
}
function compareTo_Ljava_lang_Object__I__devirtual$(this$static, other){
$clinit_Boolean();
return instanceOfString(this$static)?compareTo(this$static, castToString(other)):instanceOfDouble(this$static)?$compareTo_2(this$static, castToDouble(other)):instanceOfBoolean(this$static)?$compareTo_0(this$static, castToBoolean(other)):this$static.compareTo(other);
}
function toString_6(x_0){
$clinit_Boolean();
return $clinit_String() , '' + x_0;
}
function unsafeCast(value_0){
$clinit_Boolean();
return value_0;
}
booleanCastMap = {3:1, 388:1, 6:1};
var FALSE_0, TRUE_0;
var Ljava_lang_Boolean_2_classLit = createForClass('java.lang', 'Boolean', 388);
function __parseAndValidateDouble(s){
floatRegex == null && (floatRegex = /^\s*[+-]?(NaN|Infinity|((\d+\.?\d*)|(\.\d+))([eE][+-]?\d+)?[dDfF]?)\s*$/);
if (!regexTest(floatRegex, s)) {
throw new NumberFormatException('For input string: "' + s + '"');
}
return parseFloat(s);
}
function __parseAndValidateInt(s){
var i_0, isTooLow, length_0, startIndex, toReturn;
if (s == null) {
throw new NumberFormatException('null');
}
length_0 = ($clinit_String() , s.length);
startIndex = length_0 > 0 && (s.charCodeAt(0) == 45 || s.charCodeAt(0) == 43)?1:0;
for (i_0 = startIndex; i_0 < length_0; i_0++) {
if (digit(s.charCodeAt(i_0)) == -1) {
throw new NumberFormatException('For input string: "' + s + '"');
}
}
toReturn = parseInt(s, 10);
isTooLow = toReturn < -2147483648;
if (isNaN(toReturn)) {
throw new NumberFormatException('For input string: "' + s + '"');
}
else if (isTooLow || toReturn > 2147483647) {
throw new NumberFormatException('For input string: "' + s + '"');
}
return toReturn;
}
function doubleValue__D__devirtual$(this$static){
return instanceOfDouble(this$static)?(checkCriticalNotNull(this$static) , this$static):this$static.doubleValue();
}
function regexTest(regex, value_0){
return regex.test(value_0);
}
defineClass(58, 1, {3:1, 58:1});
var floatRegex;
var Ljava_lang_Number_2_classLit = createForClass('java.lang', 'Number', 58);
function $compareTo_1(this$static, b){
return this$static.value_0 - b.value_0;
}
function Byte(value_0){
this.value_0 = value_0;
}
function toString_7(b){
return $clinit_String() , '' + b;
}
function valueOf_1(b){
var rebase, result;
rebase = b + 128;
result = ($clinit_Byte$BoxedValues() , boxedValues)[rebase];
!result && (result = boxedValues[rebase] = new Byte(b));
return result;
}
defineClass(108, 58, {3:1, 108:1, 6:1, 58:1}, Byte);
_.compareTo = function(b){
return $compareTo_1(this, castTo(b, 108));
}
;
_.doubleValue = function(){
return this.value_0;
}
;
_.equals = function(o){
return instanceOf(o, 108) && castTo(o, 108).value_0 == this.value_0;
}
;
_.hashCode = function(){
return this.value_0;
}
;
_.toString_0 = function(){
return toString_7(this.value_0);
}
;
_.value_0 = 0;
var Ljava_lang_Byte_2_classLit = createForClass('java.lang', 'Byte', 108);
function $clinit_Byte$BoxedValues(){
$clinit_Byte$BoxedValues = emptyMethod;
boxedValues = initUnidimensionalArray(Ljava_lang_Byte_2_classLit, $intern_0, 108, 256, 0, 1);
}
var boxedValues;
function digit(c){
if (c >= 48 && c < 58) {
return c - 48;
}
if (c >= 97 && c < 97) {
return c - 97 + 10;
}
if (c >= 65 && c < 65) {
return c - 65 + 10;
}
return -1;
}
function ClassCastException(){
RuntimeException.call(this);
}
defineClass(389, 12, $intern_3, ClassCastException);
var Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang', 'ClassCastException', 389);
function $compareTo_2(this$static, b){
return compare_3((checkCriticalNotNull(this$static) , this$static), (checkCriticalNotNull(b) , b));
}
function $intValue(this$static){
return round_int((checkCriticalNotNull(this$static) , this$static));
}
function compare_3(x_0, y_0){
if (x_0 < y_0) {
return -1;
}
if (x_0 > y_0) {
return 1;
}
if (x_0 == y_0) {
return 0;
}
return isNaN(x_0)?isNaN(y_0)?0:1:-1;
}
function toString_8(b){
return $clinit_String() , '' + b;
}
doubleCastMap = {3:1, 6:1, 351:1, 58:1};
var Ljava_lang_Double_2_classLit = createForClass('java.lang', 'Double', 351);
function $compareTo_3(this$static, b){
return compare_3(this$static.value_0, b.value_0);
}
function Float(value_0){
this.value_0 = value_0;
}
function parseFloat_0(s){
var doubleValue;
doubleValue = __parseAndValidateDouble(s);
if (doubleValue > 3.4028234663852886E38) {
return Infinity;
}
else if (doubleValue < -3.4028234663852886E38) {
return -Infinity;
}
return doubleValue;
}
function toString_9(b){
return $clinit_String() , '' + b;
}
defineClass(120, 58, {3:1, 6:1, 120:1, 58:1}, Float);
_.compareTo = function(b){
return $compareTo_3(this, castTo(b, 120));
}
;
_.doubleValue = function(){
return this.value_0;
}
;
_.equals = function(o){
return instanceOf(o, 120) && castTo(o, 120).value_0 == this.value_0;
}
;
_.hashCode = function(){
return round_int(this.value_0);
}
;
_.toString_0 = function(){
return toString_9(this.value_0);
}
;
_.value_0 = 0;
var Ljava_lang_Float_2_classLit = createForClass('java.lang', 'Float', 120);
function IllegalArgumentException(message){
RuntimeException_0.call(this, message);
}
defineClass(10, 12, $intern_3, IllegalArgumentException);
var Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang', 'IllegalArgumentException', 10);
function IllegalStateException(){
RuntimeException.call(this);
}
function IllegalStateException_0(s){
RuntimeException_0.call(this, s);
}
defineClass(17, 12, $intern_3, IllegalStateException, IllegalStateException_0);
var Ljava_lang_IllegalStateException_2_classLit = createForClass('java.lang', 'IllegalStateException', 17);
function IndexOutOfBoundsException(){
RuntimeException.call(this);
}
function IndexOutOfBoundsException_0(message){
RuntimeException_0.call(this, message);
}
defineClass(33, 12, {3:1, 16:1, 33:1, 12:1, 13:1}, IndexOutOfBoundsException, IndexOutOfBoundsException_0);
var Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang', 'IndexOutOfBoundsException', 33);
function $compareTo_4(this$static, b){
return compare_4(this$static.value_0, b.value_0);
}
function $equals_1(this$static, o){
return instanceOf(o, 22) && castTo(o, 22).value_0 == this$static.value_0;
}
function Integer_0(value_0){
this.value_0 = value_0;
}
function compare_4(x_0, y_0){
return x_0 < y_0?-1:x_0 > y_0?1:0;
}
function numberOfLeadingZeros_0(i_0){
var m, n, y_0;
if (i_0 < 0) {
return 0;
}
else if (i_0 == 0) {
return 32;
}
else {
y_0 = -(i_0 >> 16);
m = y_0 >> 16 & 16;
n = 16 - m;
i_0 = i_0 >> m;
y_0 = i_0 - 256;
m = y_0 >> 16 & 8;
n += m;
i_0 <<= m;
y_0 = i_0 - 4096;
m = y_0 >> 16 & 4;
n += m;
i_0 <<= m;
y_0 = i_0 - 16384;
m = y_0 >> 16 & 2;
n += m;
i_0 <<= m;
y_0 = i_0 >> 14;
m = y_0 & ~(y_0 >> 1);
return n + 2 - m;
}
}
function numberOfTrailingZeros(i_0){
var r, rtn;
if (i_0 == 0) {
return 32;
}
else {
rtn = 0;
for (r = 1; (r & i_0) == 0; r <<= 1) {
++rtn;
}
return rtn;
}
}
function toString_10(value_0){
return $clinit_String() , '' + value_0;
}
function valueOf_2(i_0){
var rebase, result;
if (i_0 > -129 && i_0 < 128) {
rebase = i_0 + 128;
result = ($clinit_Integer$BoxedValues() , boxedValues_0)[rebase];
!result && (result = boxedValues_0[rebase] = new Integer_0(i_0));
return result;
}
return new Integer_0(i_0);
}
defineClass(22, 58, {3:1, 6:1, 22:1, 58:1}, Integer_0);
_.compareTo = function(b){
return $compareTo_4(this, castTo(b, 22));
}
;
_.doubleValue = function(){
return this.value_0;
}
;
_.equals = function(o){
return $equals_1(this, o);
}
;
_.hashCode = function(){
return this.value_0;
}
;
_.toString_0 = function(){
return toString_10(this.value_0);
}
;
_.value_0 = 0;
var Ljava_lang_Integer_2_classLit = createForClass('java.lang', 'Integer', 22);
function $clinit_Integer$BoxedValues(){
$clinit_Integer$BoxedValues = emptyMethod;
boxedValues_0 = initUnidimensionalArray(Ljava_lang_Integer_2_classLit, $intern_0, 22, 256, 0, 1);
}
var boxedValues_0;
function $compareTo_5(this$static, b){
return compare_5(this$static.value_0, b.value_0);
}
function Long(value_0){
this.value_0 = value_0;
}
function compare_5(x_0, y_0){
return compare_1(x_0, y_0) < 0?-1:compare_1(x_0, y_0) > 0?1:0;
}
function toString_11(value_0){
return $clinit_String() , '' + toString_5(value_0);
}
function valueOf_3(i_0){
var rebase, result;
if (compare_1(i_0, -129) > 0 && compare_1(i_0, 128) < 0) {
rebase = toInt_0(i_0) + 128;
result = ($clinit_Long$BoxedValues() , boxedValues_1)[rebase];
!result && (result = boxedValues_1[rebase] = new Long(i_0));
return result;
}
return new Long(i_0);
}
defineClass(89, 58, {3:1, 6:1, 89:1, 58:1}, Long);
_.compareTo = function(b){
return $compareTo_5(this, castTo(b, 89));
}
;
_.doubleValue = function(){
return toDouble_0(this.value_0);
}
;
_.equals = function(o){
return instanceOf(o, 89) && eq(castTo(o, 89).value_0, this.value_0);
}
;
_.hashCode = function(){
return toInt_0(this.value_0);
}
;
_.toString_0 = function(){
return toString_11(this.value_0);
}
;
_.value_0 = 0;
var Ljava_lang_Long_2_classLit = createForClass('java.lang', 'Long', 89);
function $clinit_Long$BoxedValues(){
$clinit_Long$BoxedValues = emptyMethod;
boxedValues_1 = initUnidimensionalArray(Ljava_lang_Long_2_classLit, $intern_0, 89, 256, 0, 1);
}
var boxedValues_1;
function abs_0(x_0){
return x_0 <= 0?0 - x_0:x_0;
}
function abs_1(x_0){
return x_0 < 0?-x_0:x_0;
}
function ceil_0(x_0){
return Math.ceil(x_0);
}
function floor_0(x_0){
return Math.floor(x_0);
}
function max_1(x_0, y_0){
return x_0 > y_0?x_0:y_0;
}
function max_2(x_0, y_0){
return x_0 > y_0?x_0:y_0;
}
function min_0(x_0, y_0){
return x_0 < y_0?x_0:y_0;
}
function min_1(x_0, y_0){
return x_0 < y_0?x_0:y_0;
}
function NullPointerException(){
RuntimeException.call(this);
}
function NullPointerException_0(message){
RuntimeException_0.call(this, message);
}
defineClass(84, 12, $intern_3, NullPointerException, NullPointerException_0);
var Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang', 'NullPointerException', 84);
function NumberFormatException(message){
IllegalArgumentException.call(this, message);
}
defineClass(95, 10, {3:1, 16:1, 95:1, 12:1, 13:1}, NumberFormatException);
var Ljava_lang_NumberFormatException_2_classLit = createForClass('java.lang', 'NumberFormatException', 95);
function $compareTo_6(this$static, b){
return this$static.value_0 - b.value_0;
}
function Short(value_0){
this.value_0 = value_0;
}
function toString_12(b){
return $clinit_String() , '' + b;
}
function valueOf_4(s){
var rebase, result;
if (s > -129 && s < 128) {
rebase = s + 128;
result = ($clinit_Short$BoxedValues() , boxedValues_2)[rebase];
!result && (result = boxedValues_2[rebase] = new Short(s));
return result;
}
return new Short(s);
}
defineClass(90, 58, {3:1, 6:1, 58:1, 90:1}, Short);
_.compareTo = function(b){
return $compareTo_6(this, castTo(b, 90));
}
;
_.doubleValue = function(){
return this.value_0;
}
;
_.equals = function(o){
return instanceOf(o, 90) && castTo(o, 90).value_0 == this.value_0;
}
;
_.hashCode = function(){
return this.value_0;
}
;
_.toString_0 = function(){
return toString_12(this.value_0);
}
;
_.value_0 = 0;
var Ljava_lang_Short_2_classLit = createForClass('java.lang', 'Short', 90);
function $clinit_Short$BoxedValues(){
$clinit_Short$BoxedValues = emptyMethod;
boxedValues_2 = initUnidimensionalArray(Ljava_lang_Short_2_classLit, $intern_0, 90, 256, 0, 1);
}
var boxedValues_2;
function StringBuffer(){
AbstractStringBuilder.call(this, '');
}
defineClass(574, 143, {683:1}, StringBuffer);
var Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang', 'StringBuffer', 574);
function $append(this$static, x_0){
this$static.string += x_0;
return this$static;
}
function $append_0(this$static, x_0){
this$static.string += '' + x_0;
return this$static;
}
function $append_1(this$static, x_0){
this$static.string += '' + x_0;
return this$static;
}
function StringBuilder(){
AbstractStringBuilder.call(this, '');
}
function StringBuilder_0(){
AbstractStringBuilder.call(this, '');
}
function StringBuilder_1(s){
AbstractStringBuilder.call(this, s);
}
defineClass(83, 143, {683:1}, StringBuilder, StringBuilder_0, StringBuilder_1);
var Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang', 'StringBuilder', 83);
function $clinit_System(){
$clinit_System = emptyMethod;
err = new PrintStream;
new PrintStream;
}
var err;
function UnsupportedOperationException(){
RuntimeException.call(this);
}
function UnsupportedOperationException_0(message){
RuntimeException_0.call(this, message);
}
defineClass(31, 12, {3:1, 16:1, 12:1, 13:1, 31:1}, UnsupportedOperationException, UnsupportedOperationException_0);
var Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang', 'UnsupportedOperationException', 31);
function $addAll_0(this$static, c){
var changed, e, e$iterator, old;
checkCriticalNotNull(c);
changed = false;
for (e$iterator = c.iterator(); e$iterator.hasNext_0();) {
e = e$iterator.next_1();
changed = changed | (old = this$static.map_0.put(e, this$static) , old == null);
}
return changed;
}
function $advanceToFind(this$static, o, remove){
var e, iter;
for (iter = this$static.iterator(); iter.hasNext_0();) {
e = iter.next_1();
if (maskUndefined(o) === maskUndefined(e) || o != null && equals_Ljava_lang_Object__Z__devirtual$(o, e)) {
remove && iter.remove_0();
return true;
}
}
return false;
}
function $clear_0(this$static){
var iter;
for (iter = this$static.this$01.entryIterator(); $hasNext(iter.iter);) {
iter.last = castTo($next_2(iter.iter), 9);
$remove_21(iter);
}
}
function $containsAll(this$static, c){
var e, e$iterator;
checkCriticalNotNull(c);
for (e$iterator = c.iterator(); e$iterator.hasNext_0();) {
e = e$iterator.next_1();
if (!this$static.contains_0(e)) {
return false;
}
}
return true;
}
function $removeAll(this$static, c){
var changed, iter, o;
checkCriticalNotNull(c);
changed = false;
for (iter = new ArrayList$1(this$static); iter.i < iter.this$01.array.length;) {
o = $next_3(iter);
if ($indexOf_2(c, o, 0) != -1) {
$remove_11(iter);
changed = true;
}
}
return changed;
}
function $toArray(this$static, a){
var i_0, it, result, size_0;
size_0 = this$static.size_2();
a.length < size_0 && (a = (result = new Array(size_0) , stampJavaTypeInfo_0(result, a)));
it = this$static.iterator();
for (i_0 = 0; i_0 < size_0; ++i_0) {
setCheck(a, i_0, it.next_1());
}
a.length > size_0 && setCheck(a, size_0, null);
return a;
}
function $toString_2(this$static){
var comma, e, e$iterator, sb;
sb = new StringBuilder_1('[');
comma = false;
for (e$iterator = this$static.iterator(); e$iterator.hasNext_0();) {
e = e$iterator.next_1();
comma?(sb.string += ', ' , sb):(comma = true);
$append_1(sb, e === this$static?'(this Collection)':($clinit_String() , e == null?'null':toString__Ljava_lang_String___devirtual$(e)));
}
sb.string += ']';
return sb.string;
}
defineClass(703, 1, {});
_.contains_0 = function(o){
return $advanceToFind(this, o, false);
}
;
_.isEmpty = function(){
return this.size_2() == 0;
}
;
_.toArray = function(){
return this.toArray_0(initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_0, 1, this.size_2(), 4, 1));
}
;
_.toArray_0 = function(a){
return $toArray(this, a);
}
;
_.toString_0 = function(){
return $toString_2(this);
}
;
var Ljava_util_AbstractCollection_2_classLit = createForClass('java.util', 'AbstractCollection', 703);
function $containsEntry(this$static, entry){
var key, ourValue, value_0;
key = entry.getKey();
value_0 = entry.getValue_0();
ourValue = this$static.get_0(key);
if (!(maskUndefined(value_0) === maskUndefined(ourValue) || value_0 != null && equals_Ljava_lang_Object__Z__devirtual$(value_0, ourValue))) {
return false;
}
if (ourValue == null && !this$static.containsKey(key)) {
return false;
}
return true;
}
function $equals_3(this$static, obj){
var entry, entry$iterator, otherMap;
if (obj === this$static) {
return true;
}
if (!instanceOf(obj, 62)) {
return false;
}
otherMap = castTo(obj, 62);
if (this$static.size_2() != otherMap.size_2()) {
return false;
}
for (entry$iterator = otherMap.entrySet_0().iterator(); entry$iterator.hasNext_0();) {
entry = castTo(entry$iterator.next_1(), 9);
if (!this$static.containsEntry(entry)) {
return false;
}
}
return true;
}
function $implFindEntry(this$static, key, remove){
var entry, iter, k;
for (iter = this$static.entrySet_0().iterator(); iter.hasNext_0();) {
entry = castTo(iter.next_1(), 9);
k = entry.getKey();
if (maskUndefined(key) === maskUndefined(k) || key != null && equals_Ljava_lang_Object__Z__devirtual$(key, k)) {
if (remove) {
entry = new AbstractMap$SimpleEntry(entry.getKey(), entry.getValue_0());
iter.remove_0();
}
return entry;
}
}
return null;
}
function $putAll(this$static, map_0){
var e, e$iterator;
checkCriticalNotNull(map_0);
for (e$iterator = (new TreeMap$EntrySet(map_0)).this$01.entryIterator(); $hasNext(e$iterator.iter);) {
e = e$iterator.last = castTo($next_2(e$iterator.iter), 9);
this$static.put(e.getKey(), e.getValue_0());
}
}
function $toString_3(this$static){
var comma, entry, entry$iterator, sb;
sb = new StringBuilder_1('{');
comma = false;
for (entry$iterator = this$static.entrySet_0().iterator(); entry$iterator.hasNext_0();) {
entry = castTo(entry$iterator.next_1(), 9);
comma?(sb.string += ', ' , sb):(comma = true);
$append_1(sb, $toString_4(this$static, entry.getKey()));
sb.string += '=';
$append_1(sb, $toString_4(this$static, entry.getValue_0()));
}
sb.string += '}';
return sb.string;
}
function $toString_4(this$static, o){
return o === this$static?'(this Map)':($clinit_String() , o == null?'null':toString__Ljava_lang_String___devirtual$(o));
}
function getEntryValueOrNull(entry){
return !entry?null:entry.getValue_0();
}
defineClass(702, 1, $intern_52);
_.containsEntry = function(entry){
return $containsEntry(this, entry);
}
;
_.containsKey = function(key){
return !!$implFindEntry(this, key, false);
}
;
_.containsValue = function(value_0){
var entry, entry$iterator, v;
for (entry$iterator = this.entrySet_0().iterator(); entry$iterator.hasNext_0();) {
entry = castTo(entry$iterator.next_1(), 9);
v = entry.getValue_0();
if (maskUndefined(value_0) === maskUndefined(v) || value_0 != null && equals_Ljava_lang_Object__Z__devirtual$(value_0, v)) {
return true;
}
}
return false;
}
;
_.equals = function(obj){
return $equals_3(this, obj);
}
;
_.get_0 = function(key){
return getEntryValueOrNull($implFindEntry(this, key, false));
}
;
_.hashCode = function(){
return hashCode_0(this.entrySet_0());
}
;
_.isEmpty = function(){
return this.size_2() == 0;
}
;
_.put = function(key, value_0){
throw new UnsupportedOperationException_0('Put not supported on this map');
}
;
_.remove_1 = function(key){
return getEntryValueOrNull($implFindEntry(this, key, true));
}
;
_.size_2 = function(){
return this.entrySet_0().size_2();
}
;
_.toString_0 = function(){
return $toString_3(this);
}
;
var Ljava_util_AbstractMap_2_classLit = createForClass('java.util', 'AbstractMap', 702);
function $containsKey(this$static, key){
return instanceOfString(key)?key == null?!!$getEntry(this$static.hashCodeMap, null):$contains_2(this$static.stringMap, key):!!$getEntry(this$static.hashCodeMap, key);
}
function $containsValue(this$static, value_0, entries){
var entry, entry$iterator;
for (entry$iterator = entries.iterator(); entry$iterator.hasNext_0();) {
entry = castTo(entry$iterator.next_1(), 9);
if (this$static.equals_0(value_0, entry.getValue_0())) {
return true;
}
}
return false;
}
function $get_5(this$static, key){
return instanceOfString(key)?key == null?getEntryValueOrNull($getEntry(this$static.hashCodeMap, null)):$get_12(this$static.stringMap, key):getEntryValueOrNull($getEntry(this$static.hashCodeMap, key));
}
function $put_2(this$static, key, value_0){
return instanceOfString(key)?$putStringValue(this$static, key, value_0):$put_3(this$static.hashCodeMap, key, value_0);
}
function $putStringValue(this$static, key, value_0){
return key == null?$put_3(this$static.hashCodeMap, null, value_0):$put_4(this$static.stringMap, key, value_0);
}
function $remove_6(this$static, key){
return instanceOfString(key)?key == null?$remove_15(this$static.hashCodeMap, null):$remove_16(this$static.stringMap, key):$remove_15(this$static.hashCodeMap, key);
}
function $reset_0(this$static){
var modCount;
this$static.hashCodeMap = new InternalHashCodeMap(this$static);
this$static.stringMap = new InternalStringMap(this$static);
modCount = this$static['_gwt_modCount'] | 0;
this$static['_gwt_modCount'] = modCount + 1;
}
function $size(this$static){
return this$static.hashCodeMap.size_0 + this$static.stringMap.size_0;
}
defineClass(134, 702, $intern_52);
_.clear_0 = function(){
$reset_0(this);
}
;
_.containsKey = function(key){
return $containsKey(this, key);
}
;
_.containsValue = function(value_0){
return $containsValue(this, value_0, this.stringMap) || $containsValue(this, value_0, this.hashCodeMap);
}
;
_.entrySet_0 = function(){
return new AbstractHashMap$EntrySet(this);
}
;
_.get_0 = function(key){
return $get_5(this, key);
}
;
_.put = function(key, value_0){
return $put_2(this, key, value_0);
}
;
_.remove_1 = function(key){
return $remove_6(this, key);
}
;
_.size_2 = function(){
return $size(this);
}
;
var Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util', 'AbstractHashMap', 134);
defineClass(704, 703, $intern_53);
_.equals = function(o){
var other;
if (o === this) {
return true;
}
if (!instanceOf(o, 55)) {
return false;
}
other = castTo(o, 55);
if (other.size_2() != this.size_2()) {
return false;
}
return $containsAll(this, other);
}
;
_.hashCode = function(){
return hashCode_0(this);
}
;
var Ljava_util_AbstractSet_2_classLit = createForClass('java.util', 'AbstractSet', 704);
function $contains_0(this$static, o){
if (instanceOf(o, 9)) {
return $containsEntry(this$static.this$01, castTo(o, 9));
}
return false;
}
function AbstractHashMap$EntrySet(this$0){
this.this$01 = this$0;
}
defineClass(171, 704, $intern_53, AbstractHashMap$EntrySet);
_.contains_0 = function(o){
return $contains_0(this, o);
}
;
_.iterator = function(){
return new AbstractHashMap$EntrySetIterator(this.this$01);
}
;
_.size_2 = function(){
return this.this$01.size_2();
}
;
var Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util', 'AbstractHashMap/EntrySet', 171);
function $computeHasNext(this$static){
if (this$static.current.hasNext_0()) {
return true;
}
if (this$static.current != this$static.stringMapEntries) {
return false;
}
this$static.current = new InternalHashCodeMap$1(this$static.this$01.hashCodeMap);
return this$static.current.hasNext_0();
}
function AbstractHashMap$EntrySetIterator(this$0){
var modCount;
this.this$01 = this$0;
this.stringMapEntries = new InternalStringMap$1(this.this$01.stringMap);
this.current = this.stringMapEntries;
this.hasNext = $computeHasNext(this);
modCount = this$0['_gwt_modCount'];
this['_gwt_modCount'] = modCount;
}
defineClass(429, 1, {}, AbstractHashMap$EntrySetIterator);
_.hasNext_0 = function(){
return this.hasNext;
}
;
_.next_1 = function(){
var rv;
return checkStructuralChange(this.this$01, this) , checkCriticalElement(this.hasNext) , this.last = this.current , rv = castTo(this.current.next_1(), 9) , this.hasNext = $computeHasNext(this) , rv;
}
;
_.remove_0 = function(){
checkCritcalState(!!this.last);
checkStructuralChange(this.this$01, this);
this.last.remove_0();
this.last = null;
this.hasNext = $computeHasNext(this);
recordLastKnownStructure(this.this$01, this);
}
;
_.hasNext = false;
var Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util', 'AbstractHashMap/EntrySetIterator', 429);
function $clear_1(this$static){
$removeRange(this$static, this$static.size_0);
}
function $indexOf_1(this$static, toFind){
var i_0, n;
for (i_0 = 0 , n = this$static.size_2(); i_0 < n; ++i_0) {
if (equals_0(toFind, this$static.get_1(i_0))) {
return i_0;
}
}
return -1;
}
function $removeRange(this$static, endIndex){
var i_0, iter;
iter = new AbstractList$ListIteratorImpl(this$static, 0);
for (i_0 = 0; i_0 < endIndex; ++i_0) {
checkCriticalElement(iter.i < iter.this$01_0.size_2());
iter.this$01_0.get_1(iter.last = iter.i++);
$remove_7(iter);
}
}
defineClass(705, 703, $intern_54);
_.add_1 = function(index_0, element){
throw new UnsupportedOperationException_0('Add not supported on this list');
}
;
_.add_2 = function(obj){
this.add_1(this.size_2(), obj);
return true;
}
;
_.equals = function(o){
var elem, elem$iterator, elemOther, iterOther, other;
if (o === this) {
return true;
}
if (!instanceOf(o, 39)) {
return false;
}
other = castTo(o, 39);
if (this.size_2() != other.size_2()) {
return false;
}
iterOther = other.iterator();
for (elem$iterator = this.iterator(); elem$iterator.hasNext_0();) {
elem = elem$iterator.next_1();
elemOther = iterOther.next_1();
if (!(maskUndefined(elem) === maskUndefined(elemOther) || elem != null && equals_Ljava_lang_Object__Z__devirtual$(elem, elemOther))) {
return false;
}
}
return true;
}
;
_.hashCode = function(){
return hashCode_1(this);
}
;
_.indexOf_0 = function(toFind){
return $indexOf_1(this, toFind);
}
;
_.iterator = function(){
return new AbstractList$IteratorImpl(this);
}
;
_.listIterator = function(){
return this.listIterator_0(0);
}
;
_.listIterator_0 = function(from){
return new AbstractList$ListIteratorImpl(this, from);
}
;
_.remove_2 = function(index_0){
throw new UnsupportedOperationException_0('Remove not supported on this list');
}
;
_.remove_3 = function(o){
return $advanceToFind(this, o, true);
}
;
_.set_1 = function(index_0, o){
throw new UnsupportedOperationException_0('Set not supported on this list');
}
;
_.subList = function(fromIndex, toIndex){
return new AbstractList$SubList(this, fromIndex, toIndex);
}
;
var Ljava_util_AbstractList_2_classLit = createForClass('java.util', 'AbstractList', 705);
function $remove_7(this$static){
checkCritcalState(this$static.last != -1);
this$static.this$01_0.remove_2(this$static.last);
this$static.i = this$static.last;
this$static.last = -1;
}
function AbstractList$IteratorImpl(this$0){
this.this$01_0 = this$0;
}
defineClass(137, 1, {}, AbstractList$IteratorImpl);
_.hasNext_0 = function(){
return this.i < this.this$01_0.size_2();
}
;
_.next_1 = function(){
return checkCriticalElement(this.hasNext_0()) , this.this$01_0.get_1(this.last = this.i++);
}
;
_.remove_0 = function(){
$remove_7(this);
}
;
_.i = 0;
_.last = -1;
var Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util', 'AbstractList/IteratorImpl', 137);
function $hasNext(this$static){
return this$static.i < this$static.this$01_0.size_2();
}
function $next_2(this$static){
return checkCriticalElement(this$static.i < this$static.this$01_0.size_2()) , this$static.this$01_0.get_1(this$static.last = this$static.i++);
}
function AbstractList$ListIteratorImpl(this$0, start_0){
this.this$01 = this$0;
AbstractList$IteratorImpl.call(this, this$0);
checkCriticalPositionIndex(start_0, this$0.size_2());
this.i = start_0;
}
defineClass(138, 137, {}, AbstractList$ListIteratorImpl);
_.hasPrevious = function(){
return this.i > 0;
}
;
_.previous = function(){
return checkCriticalElement(this.i > 0) , this.this$01.get_1(this.last = --this.i);
}
;
var Ljava_util_AbstractList$ListIteratorImpl_2_classLit = createForClass('java.util', 'AbstractList/ListIteratorImpl', 138);
function AbstractList$SubList(wrapped, fromIndex, toIndex){
checkCriticalPositionIndexes(fromIndex, toIndex, wrapped.size_2());
this.wrapped = wrapped;
this.fromIndex = fromIndex;
this.size_0 = toIndex - fromIndex;
}
defineClass(57, 705, $intern_54, AbstractList$SubList);
_.add_1 = function(index_0, element){
checkCriticalPositionIndex(index_0, this.size_0);
this.wrapped.add_1(this.fromIndex + index_0, element);
++this.size_0;
}
;
_.get_1 = function(index_0){
return checkCriticalElementIndex(index_0, this.size_0) , this.wrapped.get_1(this.fromIndex + index_0);
}
;
_.remove_2 = function(index_0){
var result;
checkCriticalElementIndex(index_0, this.size_0);
result = this.wrapped.remove_2(this.fromIndex + index_0);
--this.size_0;
return result;
}
;
_.set_1 = function(index_0, element){
checkCriticalElementIndex(index_0, this.size_0);
return this.wrapped.set_1(this.fromIndex + index_0, element);
}
;
_.size_2 = function(){
return this.size_0;
}
;
_.fromIndex = 0;
_.size_0 = 0;
var Ljava_util_AbstractList$SubList_2_classLit = createForClass('java.util', 'AbstractList/SubList', 57);
function AbstractMap$1(this$0){
this.this$01 = this$0;
}
defineClass(46, 704, $intern_53, AbstractMap$1);
_.contains_0 = function(key){
return this.this$01.containsKey(key);
}
;
_.iterator = function(){
var outerIter;
return outerIter = this.this$01.entrySet_0().iterator() , new AbstractMap$1$1(outerIter);
}
;
_.size_2 = function(){
return this.this$01.size_2();
}
;
var Ljava_util_AbstractMap$1_2_classLit = createForClass('java.util', 'AbstractMap/1', 46);
function AbstractMap$1$1(val$outerIter){
this.val$outerIter2 = val$outerIter;
}
defineClass(47, 1, {}, AbstractMap$1$1);
_.hasNext_0 = function(){
return this.val$outerIter2.hasNext_0();
}
;
_.next_1 = function(){
var entry;
return entry = castTo(this.val$outerIter2.next_1(), 9) , entry.getKey();
}
;
_.remove_0 = function(){
this.val$outerIter2.remove_0();
}
;
var Ljava_util_AbstractMap$1$1_2_classLit = createForClass('java.util', 'AbstractMap/1/1', 47);
function AbstractMap$2(this$0){
this.this$01 = this$0;
}
defineClass(35, 703, {}, AbstractMap$2);
_.contains_0 = function(value_0){
return this.this$01.containsValue(value_0);
}
;
_.iterator = function(){
var outerIter;
return outerIter = this.this$01.entrySet_0().iterator() , new AbstractMap$2$1(outerIter);
}
;
_.size_2 = function(){
return this.this$01.size_2();
}
;
var Ljava_util_AbstractMap$2_2_classLit = createForClass('java.util', 'AbstractMap/2', 35);
function AbstractMap$2$1(val$outerIter){
this.val$outerIter2 = val$outerIter;
}
defineClass(42, 1, {}, AbstractMap$2$1);
_.hasNext_0 = function(){
return this.val$outerIter2.hasNext_0();
}
;
_.next_1 = function(){
var entry;
return entry = castTo(this.val$outerIter2.next_1(), 9) , entry.getValue_0();
}
;
_.remove_0 = function(){
this.val$outerIter2.remove_0();
}
;
var Ljava_util_AbstractMap$2$1_2_classLit = createForClass('java.util', 'AbstractMap/2/1', 42);
function $setValue_0(this$static, value_0){
var oldValue;
oldValue = this$static.value_0;
this$static.value_0 = value_0;
return oldValue;
}
function AbstractMap$AbstractEntry(key, value_0){
this.key = key;
this.value_0 = value_0;
}
defineClass(93, 1, {93:1, 9:1});
_.equals = function(other){
var entry;
if (!instanceOf(other, 9)) {
return false;
}
entry = castTo(other, 9);
return equals_0(this.key, entry.getKey()) && equals_0(this.value_0, entry.getValue_0());
}
;
_.getKey = function(){
return this.key;
}
;
_.getValue_0 = function(){
return this.value_0;
}
;
_.hashCode = function(){
return hashCode_2(this.key) ^ hashCode_2(this.value_0);
}
;
_.setValue_0 = function(value_0){
return $setValue_0(this, value_0);
}
;
_.toString_0 = function(){
return this.key + '=' + this.value_0;
}
;
var Ljava_util_AbstractMap$AbstractEntry_2_classLit = createForClass('java.util', 'AbstractMap/AbstractEntry', 93);
function AbstractMap$SimpleEntry(key, value_0){
AbstractMap$AbstractEntry.call(this, key, value_0);
}
defineClass(94, 93, {93:1, 94:1, 9:1}, AbstractMap$SimpleEntry);
var Ljava_util_AbstractMap$SimpleEntry_2_classLit = createForClass('java.util', 'AbstractMap/SimpleEntry', 94);
function AbstractMap$SimpleImmutableEntry(entry){
AbstractMap$AbstractEntry.call(this, entry.key, entry.value_0);
}
defineClass(430, 93, {93:1, 9:1}, AbstractMap$SimpleImmutableEntry);
_.setValue_0 = function(value_0){
throw new UnsupportedOperationException;
}
;
var Ljava_util_AbstractMap$SimpleImmutableEntry_2_classLit = createForClass('java.util', 'AbstractMap/SimpleImmutableEntry', 430);
defineClass(710, 1, {9:1});
_.equals = function(other){
var entry;
if (!instanceOf(other, 9)) {
return false;
}
entry = castTo(other, 9);
return equals_0(this.val$entry2.value[0], entry.getKey()) && equals_0($getValue_1(this), entry.getValue_0());
}
;
_.hashCode = function(){
return hashCode_2(this.val$entry2.value[0]) ^ hashCode_2($getValue_1(t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment